Clones annotated images before writing.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@862 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2004-02-16 11:12:28 +00:00
parent 2452b48239
commit 317873afcc
1 changed files with 12 additions and 4 deletions

View File

@ -206,14 +206,22 @@ bool Event::SendFrameImage( const Image *image, bool alarm_frame )
bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char *event_file, bool alarm_frame )
{
if ( !timestamp_on_capture )
if ( timestamp_on_capture )
{
monitor->TimestampImage( image, timestamp.tv_sec );
}
if ( !(bool)config.Item( ZM_OPT_FRAME_SERVER ) || !SendFrameImage( image, alarm_frame) )
{
image->WriteJpeg( event_file );
}
}
else
{
Image ts_image( *image );
monitor->TimestampImage( &ts_image, timestamp.tv_sec );
if ( !(bool)config.Item( ZM_OPT_FRAME_SERVER ) || !SendFrameImage( image, alarm_frame) )
{
ts_image.WriteJpeg( event_file );
}
}
return( true );
}