Bug 110 - Moved frame boundaries before frames.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1479 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-06-23 08:40:43 +00:00
parent 42d05eed86
commit 8a710e3a89
2 changed files with 5 additions and 5 deletions

View File

@ -448,7 +448,6 @@ void Event::StreamEvent( int event_id, int scale, int rate, int maxfps )
}
fprintf( stdout, "Content-Type: multipart/x-mixed-replace;boundary=ZoneMinderFrame\r\n\r\n" );
fprintf( stdout, "--ZoneMinderFrame\r\n" );
FILE *fdj = NULL;
int n_bytes = 0;
@ -500,10 +499,11 @@ void Event::StreamEvent( int event_id, int scale, int rate, int maxfps )
image.EncodeJpeg( buffer, &n_bytes );
}
fprintf( stdout, "--ZoneMinderFrame\r\n" );
fprintf( stdout, "Content-Length: %d\r\n", n_bytes );
fprintf( stdout, "Content-Type: image/jpeg\r\n\r\n" );
write( fileno(stdout), buffer, n_bytes );
fprintf( stdout, "\r\n\r\n--ZoneMinderFrame\r\n" );
fwrite( buffer, n_bytes, 1, stdout );
fprintf( stdout, "\r\n\r\n" );
fflush( stdout );
last_delta = this_delta;
db_written = true;

View File

@ -1265,7 +1265,6 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
void Monitor::StreamImages( int scale, int maxfps, time_t ttl )
{
fprintf( stdout, "Content-Type: multipart/x-mixed-replace;boundary=ZoneMinderFrame\r\n\r\n" );
fprintf( stdout, "--ZoneMinderFrame\r\n" );
int fps = int(GetFPS());
if ( !fps )
@ -1328,10 +1327,11 @@ void Monitor::StreamImages( int scale, int maxfps, time_t ttl )
}
snap_image->EncodeJpeg( img_buffer, &img_buffer_size );
fprintf( stdout, "--ZoneMinderFrame\r\n" );
fprintf( stdout, "Content-Length: %d\r\n", img_buffer_size );
fprintf( stdout, "Content-Type: image/jpeg\r\n\r\n" );
fwrite( img_buffer, img_buffer_size, 1, stdout );
fprintf( stdout, "\r\n\r\n--ZoneMinderFrame\r\n" );
fprintf( stdout, "\r\n\r\n" );
if ( ttl )
{