diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 625735cc1..2b14f6979 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -1133,14 +1133,14 @@ bool EventStream::sendFrame( int delta_us ) { static struct stat filestat; FILE *fdj = NULL; - // This needs to be abstracted. + // This needs to be abstracted. If we are saving jpgs, then load the capture file. If we are only saving analysis frames, then send that. if ( monitor->GetOptSaveJPEGs() & 1 ) { snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id ); } else if ( monitor->GetOptSaveJPEGs() & 2 ) { snprintf( filepath, sizeof(filepath), Event::analyse_file_format, event_data->path, curr_frame_id ); if ( stat( filepath, &filestat ) < 0 ) { - Debug(1, "%s not found, dalling back to capture"); - snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id ); + Debug(1, "%s not found, dalling back to capture"); + snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id ); } } else { diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index fea7d5b13..f45a70633 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -463,7 +463,6 @@ Monitor::Monitor( Debug( 1, "Monitor %s IBC = %d, WUC = %d, pEC = %d, PEC = %d, EAF = %d, FRI = %d, RBP = %d, ARBP = %d, FM = %d", name, image_buffer_count, warmup_count, pre_event_count, post_event_count, alarm_frame_count, fps_report_interval, ref_blend_perc, alarm_ref_blend_perc, track_motion ); //Set video recording flag for event start constructor and easy reference in code - // TODO: Use enum instead of the # 2. Makes for easier reading videoRecording = ((GetOptVideoWriter() == H264PASSTHROUGH) && camera->SupportsNativeVideo()); if ( purpose == ANALYSIS ) { @@ -2835,10 +2834,10 @@ int Monitor::Capture() { //Check if FFMPEG camera // Icon: I don't think we can support de-interlacing on ffmpeg input.... most of the time it will be h264 or mpeg4 - if(( videowriter == H264PASSTHROUGH ) && camera->SupportsNativeVideo()){ + if ( ( videowriter == H264PASSTHROUGH ) && camera->SupportsNativeVideo() ) { captureResult = camera->CaptureAndRecord(*(next_buffer.image), - video_store_data->recording, - video_store_data->event_file ); + video_store_data->recording, + video_store_data->event_file ); } else { captureResult = camera->Capture(*(next_buffer.image)); } diff --git a/src/zm_monitor.h b/src/zm_monitor.h index de7ceec41..1b7f49d41 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -234,7 +234,7 @@ protected: unsigned int v4l_captures_per_frame; Orientation orientation; // Whether the image has to be rotated at all unsigned int deinterlacing; -bool videoRecording; + bool videoRecording; int savejpegspref; VideoWriter videowriter;