Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
This commit is contained in:
commit
7173b42d67
|
@ -633,7 +633,7 @@ bool Image::WriteRaw( const char *filename ) const
|
||||||
|
|
||||||
bool Image::ReadJpeg( const char *filename, int p_colours, int p_subpixelorder)
|
bool Image::ReadJpeg( const char *filename, int p_colours, int p_subpixelorder)
|
||||||
{
|
{
|
||||||
unsigned int new_width, new_height, new_colours, new_subpixelorder;
|
int new_width, new_height, new_colours, new_subpixelorder;
|
||||||
struct jpeg_decompress_struct *cinfo = jpg_dcinfo;
|
struct jpeg_decompress_struct *cinfo = jpg_dcinfo;
|
||||||
|
|
||||||
if ( !cinfo )
|
if ( !cinfo )
|
||||||
|
@ -886,7 +886,7 @@ bool Image::WriteJpeg( const char *filename, int quality_override ) const
|
||||||
|
|
||||||
bool Image::DecodeJpeg( const JOCTET *inbuffer, int inbuffer_size, int p_colours, int p_subpixelorder)
|
bool Image::DecodeJpeg( const JOCTET *inbuffer, int inbuffer_size, int p_colours, int p_subpixelorder)
|
||||||
{
|
{
|
||||||
unsigned int new_width, new_height, new_colours, new_subpixelorder;
|
int new_width, new_height, new_colours, new_subpixelorder;
|
||||||
struct jpeg_decompress_struct *cinfo = jpg_dcinfo;
|
struct jpeg_decompress_struct *cinfo = jpg_dcinfo;
|
||||||
|
|
||||||
if ( !cinfo )
|
if ( !cinfo )
|
||||||
|
|
|
@ -2727,7 +2727,7 @@ int Monitor::Capture()
|
||||||
}
|
}
|
||||||
if ( true ) {
|
if ( true ) {
|
||||||
|
|
||||||
if ( capture_image->Size() != camera->ImageSize() )
|
if ( capture_image->Size() != (int)camera->ImageSize() )
|
||||||
{
|
{
|
||||||
Error( "Captured image does not match expected size, check width, height and colour depth" );
|
Error( "Captured image does not match expected size, check width, height and colour depth" );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
|
@ -240,14 +240,14 @@ int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read );
|
n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read );
|
||||||
if (n_bytes < 0) break; // break on error
|
if (n_bytes < 0) break; // break on error
|
||||||
if (n_bytes < frame_header.image_length)
|
if (n_bytes < (int)frame_header.image_length)
|
||||||
{
|
{
|
||||||
// print some informational messages
|
// print some informational messages
|
||||||
if (bytes_read == 0)
|
if (bytes_read == 0)
|
||||||
{
|
{
|
||||||
// Warning("Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length);
|
// Warning("Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length);
|
||||||
}
|
}
|
||||||
else if (bytes_read+n_bytes == frame_header.image_length)
|
else if (bytes_read+n_bytes == (int)frame_header.image_length)
|
||||||
{
|
{
|
||||||
// Warning("Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length);
|
// Warning("Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2167,7 +2167,7 @@ function logState()
|
||||||
Logger::WARNING => array( ZM_LOG_ALERT_WAR_COUNT, ZM_LOG_ALARM_WAR_COUNT ),
|
Logger::WARNING => array( ZM_LOG_ALERT_WAR_COUNT, ZM_LOG_ALARM_WAR_COUNT ),
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = "select Level, count(Level) as LevelCount from Logs where Level < ".Logger::INFO." and from_unixtime(TimeKey) + interval ".ZM_LOG_CHECK_PERIOD." second > now() group by Level order by Level asc";
|
$sql = "select Level, count(Level) as LevelCount from Logs where Level < ".Logger::INFO." and TimeKey > unix_timestamp(now() - interval ".ZM_LOG_CHECK_PERIOD." second) group by Level order by Level asc";
|
||||||
$counts = dbFetchAll( $sql );
|
$counts = dbFetchAll( $sql );
|
||||||
|
|
||||||
foreach ( $counts as $count )
|
foreach ( $counts as $count )
|
||||||
|
|
Loading…
Reference in New Issue