From ab1c9f7c9814ed52446ddf765147a1900eff3097 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 31 Oct 2017 16:27:43 -0400 Subject: [PATCH] add more debugging --- src/zm_monitorstream.cpp | 3 +++ src/zm_stream.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index 85b223f6a..ac99aefdb 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -693,6 +693,8 @@ Debug(2, "checking command Queue"); } // end if buffered playback frame_count++; } + unsigned long sleep_time = (unsigned long)((1000000 * ZM_RATE_BASE)/((base_fps?base_fps:1)*abs(replay_rate*2))); + Debug(2,"Sleep for (%d) microseconds"); usleep( (unsigned long)((1000000 * ZM_RATE_BASE)/((base_fps?base_fps:1)*abs(replay_rate*2))) ); if ( ttl ) { if ( (now.tv_sec - stream_start_time) > ttl ) { @@ -704,6 +706,7 @@ Debug(2, "checking command Queue"); break; } } // end while + if ( buffered_playback ) { Debug( 1, "Cleaning swap files from %s", swap_path ); struct stat stat_buf; diff --git a/src/zm_stream.cpp b/src/zm_stream.cpp index 8002c4f18..cee3ffa25 100644 --- a/src/zm_stream.cpp +++ b/src/zm_stream.cpp @@ -88,6 +88,7 @@ bool StreamBase::checkCommandQueue() { //Error( "Partial message received, expected %d bytes, got %d", sizeof(msg), nbytes ); //} else { +Debug(2, "Message length is (%d)", nbytes ); processCommand( &msg ); return( true ); }