Bug 13 - Added prototype signal loss detection code into remote monitors.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1824 e3e1d417-86f3-4887-817a-d78f3d33393fpull/27/merge
parent
91f92b3291
commit
33cb9ab66f
|
@ -178,7 +178,7 @@ void Monitor::Setup()
|
|||
shared_data->size = sizeof(SharedData);
|
||||
shared_data->valid = true;
|
||||
shared_data->active = enabled;
|
||||
shared_data->signal = true;
|
||||
shared_data->signal = false;
|
||||
shared_data->state = IDLE;
|
||||
shared_data->last_write_index = image_buffer_count;
|
||||
shared_data->last_read_index = image_buffer_count;
|
||||
|
@ -826,7 +826,7 @@ bool Monitor::Analyse()
|
|||
if ( !signal )
|
||||
text = "Signal Lost";
|
||||
else
|
||||
text = "Signal Regained";
|
||||
text = "Signal Reacquired";
|
||||
Warning(( text ));
|
||||
if ( event )
|
||||
{
|
||||
|
@ -1953,6 +1953,7 @@ int Monitor::PostCapture()
|
|||
}
|
||||
return( 0 );
|
||||
}
|
||||
shared_data->signal = false;
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -309,8 +309,6 @@ int RemoteCamera::GetResponse()
|
|||
if ( status_code < 200 || status_code > 299 )
|
||||
{
|
||||
Error(( "Invalid response status %d: %s", status_code, status_mesg ));
|
||||
if ( status_code >= 400 )
|
||||
exit( -1 );
|
||||
return( -1 );
|
||||
}
|
||||
Debug( 3, ( "Got status '%d' (%s), http version %s", status_code, status_mesg, http_version ));
|
||||
|
@ -356,7 +354,7 @@ int RemoteCamera::GetResponse()
|
|||
if ( !content_boundary[0] )
|
||||
{
|
||||
Error(( "No content boundary found in header '%s'", header ));
|
||||
exit( -1 );
|
||||
return( -1 );
|
||||
}
|
||||
mode = MULTI_JPEG;
|
||||
state = SUBHEADER;
|
||||
|
@ -752,7 +750,7 @@ int RemoteCamera::GetResponse()
|
|||
if ( !content_boundary )
|
||||
{
|
||||
Error(( "No content boundary found in header '%s'", content_type_header ));
|
||||
exit( -1 );
|
||||
return( -1 );
|
||||
}
|
||||
mode = MULTI_JPEG;
|
||||
state = SUBHEADER;
|
||||
|
|
10
src/zmc.cpp
10
src/zmc.cpp
|
@ -201,7 +201,10 @@ int main( int argc, char *argv[] )
|
|||
sigaddset( &block_set, SIGUSR2 );
|
||||
if ( device[0] && n_monitors == 1 )
|
||||
{
|
||||
monitors[0]->PreCapture();
|
||||
if ( monitors[0]->PreCapture() < 0 )
|
||||
{
|
||||
exit( -1 );
|
||||
}
|
||||
}
|
||||
|
||||
long *capture_delays = new long[n_monitors];
|
||||
|
@ -252,7 +255,10 @@ int main( int argc, char *argv[] )
|
|||
}
|
||||
if ( next_delays[i] <= min_delay || next_delays[i] <= 0 )
|
||||
{
|
||||
monitors[i]->PreCapture();
|
||||
if ( monitors[i]->PreCapture() < 0 )
|
||||
{
|
||||
exit( -1 );
|
||||
}
|
||||
monitors[i]->PostCapture();
|
||||
|
||||
if ( next_delays[i] > 0 )
|
||||
|
|
Loading…
Reference in New Issue