Better debugging

pull/2077/head
Isaac Connor 2018-01-29 07:22:05 -08:00
parent b1b8b42f2b
commit 7e2f132cdd
1 changed files with 4 additions and 4 deletions

View File

@ -338,7 +338,7 @@ void MonitorStream::processCommand( const CmdMsg *msg ) {
//exit( -1 );
}
}
Debug(2, "NUmber of bytes sent: (%d)", nbytes );
Debug(2, "NUmber of bytes sent to (%s): (%d)", rem_addr.sun_path, nbytes );
// quit after sending a status, if this was a quit request
if ( (MsgCommand)msg->msg_data[0]==CMD_QUIT ) {
@ -663,7 +663,7 @@ Debug(2, "Have checking command Queue for connkey: %d", connkey );
if ( last_read_index != monitor->shared_data->last_write_index ) {
int index = monitor->shared_data->last_write_index % monitor->image_buffer_count; // % shouldn't be neccessary
last_read_index = monitor->shared_data->last_write_index;
Debug( 1, "index: %d: frame_mod: %d frame count: %d", index, frame_mod, frame_count );
Debug( 3, "index: %d: frame_mod: %d frame count: %d", index, frame_mod, frame_count );
if ( (frame_mod == 1) || ((frame_count%frame_mod) == 0) ) {
if ( !paused && !delayed ) {
// Send the next frame
@ -712,11 +712,11 @@ Debug(2, "Have checking command Queue for connkey: %d", connkey );
} // end if buffered playback
frame_count++;
} else {
Debug(2,"Waiting for capture");
Debug(5,"Waiting for capture");
} // end if ( (unsigned int)last_read_index != monitor->shared_data->last_write_index )
unsigned long sleep_time = (unsigned long)((1000000 * ZM_RATE_BASE)/((base_fps?base_fps:1)*abs(replay_rate*2)));
Debug(2, "Sleeping for (%d)", sleep_time);
Debug(4, "Sleeping for (%d)", sleep_time);
usleep( sleep_time );
if ( ttl ) {
if ( (now.tv_sec - stream_start_time) > ttl ) {