diff --git a/src/zm_image.cpp b/src/zm_image.cpp index d9cf1ded8..a302b4be5 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1789,7 +1789,7 @@ void Image::MaskPrivacy( const unsigned char *p_bitmask, const Rgb pixel_colour } /* RGB32 compatible: complete */ -void Image::Annotate( const char *p_text, const Coord &coord, const int size, const Rgb fg_colour, const Rgb bg_colour ) +void Image::Annotate( const char *p_text, const Coord &coord, const unsigned int size, const Rgb fg_colour, const Rgb bg_colour ) { strncpy( text, p_text, sizeof(text) ); diff --git a/src/zm_image.h b/src/zm_image.h index eb320bcdd..016a64a3c 100644 --- a/src/zm_image.h +++ b/src/zm_image.h @@ -232,7 +232,7 @@ public: const Coord centreCoord( const char *text ) const; void MaskPrivacy( const unsigned char *p_bitmask, const Rgb pixel_colour=0x00222222 ); - void Annotate( const char *p_text, const Coord &coord, const int size=1, const Rgb fg_colour=RGB_WHITE, const Rgb bg_colour=RGB_BLACK ); + void Annotate( const char *p_text, const Coord &coord, const unsigned int size=1, const Rgb fg_colour=RGB_WHITE, const Rgb bg_colour=RGB_BLACK ); Image *HighlightEdges( Rgb colour, unsigned int p_colours, unsigned int p_subpixelorder, const Box *limits=0 ); //Image *HighlightEdges( Rgb colour, const Polygon &polygon ); void Timestamp( const char *label, const time_t when, const Coord &coord, const int size ); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index c798cdb5a..44f3d71d3 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2085,15 +2085,13 @@ Debug( 1, "Server ID %d", staticConfig.SERVER_ID ); const char *device = dbrow[col]; col++; int channel = atoi(dbrow[col]); col++; int format = atoi(dbrow[col]); col++; - bool v4l_multi_buffer; + bool v4l_multi_buffer = config.v4l_multi_buffer; if ( dbrow[col] ) { if (*dbrow[col] == '0' ) { v4l_multi_buffer = false; } else if ( *dbrow[col] == '1' ) { v4l_multi_buffer = true; } - } else { - v4l_multi_buffer = config.v4l_multi_buffer; } col++; @@ -2727,15 +2725,13 @@ Monitor *Monitor::Load( unsigned int p_id, bool load_zones, Purpose purpose ) int channel = atoi(dbrow[col]); col++; int format = atoi(dbrow[col]); col++; - bool v4l_multi_buffer; + bool v4l_multi_buffer = config.v4l_multi_buffer; if ( dbrow[col] ) { if (*dbrow[col] == '0' ) { v4l_multi_buffer = false; } else if ( *dbrow[col] == '1' ) { v4l_multi_buffer = true; } - } else { - v4l_multi_buffer = config.v4l_multi_buffer; } col++; diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 511d93aa9..8a9fb34c6 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -168,7 +168,7 @@ protected: #else // ZM_MEM_MAPPED int shm_id; #endif // ZM_MEM_MAPPED - unsigned long mem_size; + off_t mem_size; unsigned char *mem_ptr; volatile SharedData *shared_data; @@ -279,7 +279,7 @@ protected: #else // ZM_MEM_MAPPED int shm_id; #endif // ZM_MEM_MAPPED - unsigned long mem_size; + off_t mem_size; unsigned char *mem_ptr; SharedData *shared_data; @@ -295,11 +295,13 @@ protected: int n_zones; Zone **zones; - const unsigned char *privacy_bitmask; struct timeval **timestamps; Image **images; + const unsigned char *privacy_bitmask; + + int iDoNativeMotDet; int n_linked_monitors;