Messed around with jpeg stream header.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@943 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2004-03-11 11:19:37 +00:00
parent e6ef3bbcd7
commit 5693da40bc
2 changed files with 4 additions and 4 deletions

View File

@ -466,7 +466,7 @@ void Event::StreamEvent( int event_id, int rate, int scale )
write( fileno(stdout), buffer, n_bytes );
}
fprintf( stdout, "\r\n--ZoneMinderFrame\r\n" );
fprintf( stdout, "--ZoneMinderFrame\r\n" );
fprintf( stdout, "Content-length: %d\r\n", n_bytes );
fprintf( stdout, "Content-type: image/jpeg\r\n\r\n" );
fflush( stdout );

View File

@ -1125,9 +1125,9 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
scaled_image.EncodeJpeg( img_buffer, &img_buffer_size );
}
fprintf( stdout, "\r\n--ZoneMinderFrame\r\n" );
fprintf( stdout, "Content-type: image/jpeg\r\n" );
fprintf( stdout, "Content-length: %d\r\n\r\n", 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 );
}
usleep( refresh*1000 );