use storageareas when outputting zone diag images
This commit is contained in:
parent
e277456682
commit
38a4ca1a6f
|
@ -112,7 +112,7 @@ void Zone::Setup(
|
||||||
if ( config.record_diag_images ) {
|
if ( config.record_diag_images ) {
|
||||||
static char diag_path[PATH_MAX] = "";
|
static char diag_path[PATH_MAX] = "";
|
||||||
if ( ! diag_path[0] ) {
|
if ( ! diag_path[0] ) {
|
||||||
snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-poly.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id);
|
snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-poly.jpg", monitor->getStorage()->Path(), id);
|
||||||
}
|
}
|
||||||
pg_image->WriteJpeg( diag_path );
|
pg_image->WriteJpeg( diag_path );
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) {
|
||||||
if ( config.record_diag_images ) {
|
if ( config.record_diag_images ) {
|
||||||
static char diag_path[PATH_MAX] = "";
|
static char diag_path[PATH_MAX] = "";
|
||||||
if ( ! diag_path[0] ) {
|
if ( ! diag_path[0] ) {
|
||||||
snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 1 );
|
snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 1 );
|
||||||
}
|
}
|
||||||
diff_image->WriteJpeg( diag_path );
|
diff_image->WriteJpeg( diag_path );
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) {
|
||||||
if ( config.record_diag_images ) {
|
if ( config.record_diag_images ) {
|
||||||
static char diag_path[PATH_MAX] = "";
|
static char diag_path[PATH_MAX] = "";
|
||||||
if ( !diag_path[0] ) {
|
if ( !diag_path[0] ) {
|
||||||
snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 2 );
|
snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 2 );
|
||||||
}
|
}
|
||||||
diff_image->WriteJpeg( diag_path );
|
diff_image->WriteJpeg( diag_path );
|
||||||
}
|
}
|
||||||
|
@ -525,7 +525,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) {
|
||||||
if ( config.record_diag_images ) {
|
if ( config.record_diag_images ) {
|
||||||
static char diag_path[PATH_MAX] = "";
|
static char diag_path[PATH_MAX] = "";
|
||||||
if ( !diag_path[0] ) {
|
if ( !diag_path[0] ) {
|
||||||
snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 3 );
|
snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 3 );
|
||||||
}
|
}
|
||||||
diff_image->WriteJpeg( diag_path );
|
diff_image->WriteJpeg( diag_path );
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) {
|
||||||
if ( config.record_diag_images ) {
|
if ( config.record_diag_images ) {
|
||||||
static char diag_path[PATH_MAX] = "";
|
static char diag_path[PATH_MAX] = "";
|
||||||
if ( !diag_path[0] ) {
|
if ( !diag_path[0] ) {
|
||||||
snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 4 );
|
snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 4 );
|
||||||
}
|
}
|
||||||
diff_image->WriteJpeg( diag_path );
|
diff_image->WriteJpeg( diag_path );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue