Check if videoing for bulk frame adding too
This commit is contained in:
parent
8da327e9a3
commit
9c168a9af5
|
@ -507,8 +507,18 @@ void Event::AddFrames( int n_frames, Image **images, struct timeval **timestamps
|
||||||
static char event_file[PATH_MAX];
|
static char event_file[PATH_MAX];
|
||||||
snprintf( event_file, sizeof(event_file), capture_file_format, path, frames );
|
snprintf( event_file, sizeof(event_file), capture_file_format, path, frames );
|
||||||
|
|
||||||
|
if(videoEvent){
|
||||||
|
//If this is the first frame, we should add a thumbnail to the event directory
|
||||||
|
if(frames == 10){
|
||||||
|
char snapshot_file[PATH_MAX];
|
||||||
|
snprintf( snapshot_file, sizeof(snapshot_file), "%s/snapshot.jpg", path );
|
||||||
|
WriteFrameImage( images[i], *(timestamps[i]), snapshot_file );
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
Debug( 1, "Writing pre-capture frame %d", frames );
|
Debug( 1, "Writing pre-capture frame %d", frames );
|
||||||
WriteFrameImage( images[i], *(timestamps[i]), event_file );
|
WriteFrameImage( images[i], *(timestamps[i]), event_file );
|
||||||
|
}
|
||||||
|
|
||||||
struct DeltaTimeval delta_time;
|
struct DeltaTimeval delta_time;
|
||||||
DELTA_TIMEVAL( delta_time, *(timestamps[i]), start_time, DT_PREC_2 );
|
DELTA_TIMEVAL( delta_time, *(timestamps[i]), start_time, DT_PREC_2 );
|
||||||
|
|
Loading…
Reference in New Issue