From e163a3c93ac7d1fc6dbd2733f9429fcc0cdbe877 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 25 Sep 2020 16:20:19 -0400 Subject: [PATCH] spacing more debug --- src/zm_packet.h | 5 ++++- src/zm_packetqueue.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/zm_packet.h b/src/zm_packet.h index 1f0dbf704..a2e914bd7 100644 --- a/src/zm_packet.h +++ b/src/zm_packet.h @@ -67,7 +67,10 @@ class ZMPacket { mutex.lock(); Debug(2,"packet %d locked", this->image_index); }; - void unlock() { Debug(2,"packet %d unlocked", this->image_index);mutex.unlock(); }; + void unlock() { + Debug(2,"packet %d unlocked", this->image_index); + mutex.unlock(); + }; AVFrame *get_out_frame( const AVCodecContext *ctx ); int get_codec_imgsize() { return codec_imgsize; }; }; diff --git a/src/zm_packetqueue.cpp b/src/zm_packetqueue.cpp index b87ea3ba8..2ca976657 100644 --- a/src/zm_packetqueue.cpp +++ b/src/zm_packetqueue.cpp @@ -89,9 +89,9 @@ ZMPacket* zm_packetqueue::popPacket( ) { if ( pktQueue.empty() ) { return NULL; } - Debug(2,"Mutex locking"); + Debug(2, "poPacket Mutex locking"); mutex.lock(); - Debug(2,"Have Mutex lock"); + Debug(2, "Have Mutex lock"); ZMPacket *packet = pktQueue.front(); if ( *analysis_it == packet ) @@ -102,7 +102,7 @@ ZMPacket* zm_packetqueue::popPacket( ) { video_packet_count -= 1; if ( video_packet_count ) { // There is another video packet, so it must be the next one - Debug(2,"Incrementing first video packet index was (%d)", first_video_packet_index); + Debug(2, "Incrementing first video packet index was (%d)", first_video_packet_index); first_video_packet_index += 1; first_video_packet_index %= max_video_packet_count; } else { @@ -114,7 +114,7 @@ ZMPacket* zm_packetqueue::popPacket( ) { // Should we lock the packet? return packet; -} +} // popPacket unsigned int zm_packetqueue::clearQueue(unsigned int frames_to_keep, int stream_id) { @@ -328,9 +328,9 @@ ZMPacket *zm_packetqueue::get_analysis_packet() { //Debug(2, "Distance from head: (%d)", std::distance( pktQueue.begin(), analysis_it ) ); //Debug(2, "Distance from end: (%d)", std::distance( analysis_it, pktQueue.end() ) ); ZMPacket *p = *analysis_it; - Debug(2,"analysis_packet image_index: %d, about to lock packet", p->image_index); + Debug(2, "get_analysis_packet image_index: %d, about to lock packet", p->image_index); p->lock(); - Debug(2, "Locked packet, unlocking mutex"); + Debug(2, "Locked packet, unlocking packetqueue mutex"); mutex.unlock(); return p;