Merge branch 'master' into storageareas

This commit is contained in:
Isaac Connor 2017-05-19 15:09:44 -04:00
commit 7caeee6bf8
3 changed files with 7 additions and 8 deletions

View File

@ -1133,14 +1133,14 @@ bool EventStream::sendFrame( int delta_us ) {
static struct stat filestat; static struct stat filestat;
FILE *fdj = NULL; 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 ) { if ( monitor->GetOptSaveJPEGs() & 1 ) {
snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id ); snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id );
} else if ( monitor->GetOptSaveJPEGs() & 2 ) { } else if ( monitor->GetOptSaveJPEGs() & 2 ) {
snprintf( filepath, sizeof(filepath), Event::analyse_file_format, event_data->path, curr_frame_id ); snprintf( filepath, sizeof(filepath), Event::analyse_file_format, event_data->path, curr_frame_id );
if ( stat( filepath, &filestat ) < 0 ) { if ( stat( filepath, &filestat ) < 0 ) {
Debug(1, "%s not found, dalling back to capture"); Debug(1, "%s not found, dalling back to capture");
snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id ); snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id );
} }
} else { } else {

View File

@ -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 ); 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 //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()); videoRecording = ((GetOptVideoWriter() == H264PASSTHROUGH) && camera->SupportsNativeVideo());
if ( purpose == ANALYSIS ) { if ( purpose == ANALYSIS ) {
@ -2835,10 +2834,10 @@ int Monitor::Capture() {
//Check if FFMPEG camera //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 // 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), captureResult = camera->CaptureAndRecord(*(next_buffer.image),
video_store_data->recording, video_store_data->recording,
video_store_data->event_file ); video_store_data->event_file );
} else { } else {
captureResult = camera->Capture(*(next_buffer.image)); captureResult = camera->Capture(*(next_buffer.image));
} }

View File

@ -234,7 +234,7 @@ protected:
unsigned int v4l_captures_per_frame; unsigned int v4l_captures_per_frame;
Orientation orientation; // Whether the image has to be rotated at all Orientation orientation; // Whether the image has to be rotated at all
unsigned int deinterlacing; unsigned int deinterlacing;
bool videoRecording; bool videoRecording;
int savejpegspref; int savejpegspref;
VideoWriter videowriter; VideoWriter videowriter;