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:
parent
e6ef3bbcd7
commit
5693da40bc
|
@ -466,7 +466,7 @@ void Event::StreamEvent( int event_id, int rate, int scale )
|
||||||
|
|
||||||
write( fileno(stdout), buffer, n_bytes );
|
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-length: %d\r\n", n_bytes );
|
||||||
fprintf( stdout, "Content-type: image/jpeg\r\n\r\n" );
|
fprintf( stdout, "Content-type: image/jpeg\r\n\r\n" );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
|
|
|
@ -1125,9 +1125,9 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
|
||||||
scaled_image.EncodeJpeg( img_buffer, &img_buffer_size );
|
scaled_image.EncodeJpeg( img_buffer, &img_buffer_size );
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf( stdout, "\r\n--ZoneMinderFrame\r\n" );
|
fprintf( stdout, "--ZoneMinderFrame\r\n" );
|
||||||
fprintf( stdout, "Content-type: image/jpeg\r\n" );
|
fprintf( stdout, "Content-length: %d\r\n", img_buffer_size );
|
||||||
fprintf( stdout, "Content-length: %d\r\n\r\n", img_buffer_size );
|
fprintf( stdout, "Content-type: image/jpeg\r\n\r\n" );
|
||||||
fwrite( img_buffer, img_buffer_size, 1, stdout );
|
fwrite( img_buffer, img_buffer_size, 1, stdout );
|
||||||
}
|
}
|
||||||
usleep( refresh*1000 );
|
usleep( refresh*1000 );
|
||||||
|
|
Loading…
Reference in New Issue