Improve debug logging of packetqueue cleaning
This commit is contained in:
parent
c05200d2a7
commit
3f6d6fe7a0
|
@ -260,6 +260,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
||||||
zm_packet = *it;
|
zm_packet = *it;
|
||||||
lp = new ZMLockedPacket(zm_packet);
|
lp = new ZMLockedPacket(zm_packet);
|
||||||
if (!lp->trylock()) {
|
if (!lp->trylock()) {
|
||||||
|
Debug(3, "Failed locking packet %d", zm_packet->index);
|
||||||
delete lp;
|
delete lp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -280,7 +281,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
||||||
next_front = it;
|
next_front = it;
|
||||||
}
|
}
|
||||||
++video_packets_to_delete;
|
++video_packets_to_delete;
|
||||||
Debug(4, "Counted %d video packets. Which would leave %d in packetqueue tail count is %d",
|
Debug(3, "Counted %d video packets. Which would leave %d in packetqueue tail count is %d",
|
||||||
video_packets_to_delete, packet_counts[video_stream_id]-video_packets_to_delete, tail_count);
|
video_packets_to_delete, packet_counts[video_stream_id]-video_packets_to_delete, tail_count);
|
||||||
if (packet_counts[video_stream_id] - video_packets_to_delete <= pre_event_video_packet_count + tail_count) {
|
if (packet_counts[video_stream_id] - video_packets_to_delete <= pre_event_video_packet_count + tail_count) {
|
||||||
break;
|
break;
|
||||||
|
@ -289,7 +290,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
||||||
++it;
|
++it;
|
||||||
} // end while
|
} // end while
|
||||||
} // end if first packet not locked
|
} // end if first packet not locked
|
||||||
Debug(1, "Resulting pointing at latest packet? %d, next front points to begin? %d",
|
Debug(1, "Resulting it pointing at latest packet? %d, next front points to begin? %d",
|
||||||
( *it == add_packet ),
|
( *it == add_packet ),
|
||||||
( next_front == pktQueue.begin() )
|
( next_front == pktQueue.begin() )
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue