diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp index b48ddd1b4..cb6025ffb 100644 --- a/src/zm_local_camera.cpp +++ b/src/zm_local_camera.cpp @@ -782,6 +782,7 @@ void LocalCamera::Initialise() memset( &v4l2_data.reqbufs, 0, sizeof(v4l2_data.reqbufs) ); if ( channel_count > 1 ) { + Debug( 3, "Channel count is %d", channel_count ); if ( v4l_multi_buffer ){ v4l2_data.reqbufs.count = 2*channel_count; } else { @@ -790,6 +791,7 @@ void LocalCamera::Initialise() } else { v4l2_data.reqbufs.count = 8; } + Debug( 3, "Request buffers count is %d", v4l2_data.reqbufs.count ); v4l2_data.reqbufs.type = v4l2_data.fmt.type; v4l2_data.reqbufs.memory = V4L2_MEMORY_MMAP; @@ -809,7 +811,7 @@ void LocalCamera::Initialise() if ( v4l2_data.reqbufs.count < (v4l_multi_buffer?2:1) ) Fatal( "Insufficient buffer memory %d on video device", v4l2_data.reqbufs.count ); - Debug( 3, "Setting up data buffers: Channels %d MultiBuffer %d Buffers: %s", channel_count, v4l_multi_buffer, v4l2_data.reqbufs.count ); + Debug( 3, "Setting up data buffers: Channels %d MultiBuffer %d Buffers: %d", channel_count, v4l_multi_buffer, v4l2_data.reqbufs.count ); v4l2_data.buffers = new V4L2MappedBuffer[v4l2_data.reqbufs.count]; #if HAVE_LIBSWSCALE diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 2f93b2d1c..9557164d4 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1872,37 +1872,24 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose int channel = atoi(dbrow[col]); col++; int format = atoi(dbrow[col]); col++; bool v4l_multi_buffer; -//Error( "Got %s for v4l_multi_vuffer", dbrow[col] ); - if (*dbrow[col] == '0' ) { -//Error( "setting false for v4l_multi_vuffer" ); - v4l_multi_buffer = false; - } else if ( *dbrow[col] == '1' ) { -//Error( "setting true for v4l_multi_vuffer" ); - v4l_multi_buffer = true; + if ( dbrow[col] ) { + if (*dbrow[col] == '0' ) { + v4l_multi_buffer = false; + } else if ( *dbrow[col] == '1' ) { + v4l_multi_buffer = true; + } } else { -//Error( "setting config for v4l_multi_vuffer" ); v4l_multi_buffer = config.v4l_multi_buffer; } - if ( v4l_multi_buffer ) { -//Error( "Got true for v4l_multi_vuffer" ); - } else { -//Error( "Got false for v4l_multi_vuffer" ); - } col++; int v4l_captures_per_frame = 0; -//Error( "Got %s for v4l_captures", dbrow[col] ); - if ( ! dbrow[col] ) { -//Error( "Got nothing for v4l_captures" ); - - } else if ( * dbrow[col] == '\0' ) { - //Error( "setting to config for v4l_captures " ); - v4l_captures_per_frame = config.captures_per_frame; - } else { - //Error( "setting from MOnitor for v4l_captures " ); + if ( dbrow[col] ) { v4l_captures_per_frame = atoi(dbrow[col]); + } else { + v4l_captures_per_frame = config.captures_per_frame; } -Error( "Got %d for v4l_captures", v4l_captures_per_frame ); +Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); col++; const char *method = dbrow[col]; col++;