mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-26 09:42:42 -04:00
Log the # of packets removed
This commit is contained in:
@@ -268,6 +268,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
||||
Debug(1, "Tail count is %d, queue size is %zu, video_packets %d", tail_count, pktQueue.size(), packet_counts[video_stream_id]);
|
||||
|
||||
if (!keep_keyframes) {
|
||||
int packets_removed = 0;
|
||||
Debug(3, "Not keeping keyframes");
|
||||
// If not doing passthrough, we don't care about starting with a keyframe so logic is simpler
|
||||
while ((*pktQueue.begin() != add_packet) and (packet_counts[video_stream_id] > pre_event_video_packet_count + tail_count)) {
|
||||
@@ -280,6 +281,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
||||
break;
|
||||
}
|
||||
|
||||
packets_removed ++;
|
||||
pktQueue.pop_front();
|
||||
int stream_index = zm_packet->packet ? zm_packet->packet->stream_index : 0;
|
||||
packet_counts[stream_index] -= 1;
|
||||
@@ -292,8 +294,8 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
||||
pre_event_video_packet_count,
|
||||
pktQueue.size());
|
||||
} // end while
|
||||
Debug(3, "Done removing packets from queue. packet_counts %d >? pre_event %d + tail %d = %d",
|
||||
packet_counts[video_stream_id], pre_event_video_packet_count, tail_count, pre_event_video_packet_count + tail_count);
|
||||
Debug(3, "Done removing %d packets from queue. packet_counts %d >? pre_event %d + tail %d = %d",
|
||||
packets_removed, packet_counts[video_stream_id], pre_event_video_packet_count, tail_count, pre_event_video_packet_count + tail_count);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user