Move content of setMaxVideoPcakets into .cpp

This commit is contained in:
Isaac Connor 2021-02-18 11:54:50 -05:00
parent b1f337b6e7
commit b40a31d76f
2 changed files with 8 additions and 6 deletions

View File

@ -631,3 +631,10 @@ bool PacketQueue::is_there_an_iterator_pointing_to_packet(ZMPacket *zm_packet) {
} // end foreach iterator
return false;
}
void PacketQueue::setMaxVideoPackets(int p) {
max_video_packet_count = p;
Debug(1, "Setting max_video_packet_count to %d", p);
if ( max_video_packet_count < 1 )
max_video_packet_count = 1 ;
// We can simplify a lot of logic in queuePacket if we can assume at least 1 packet in queue
}

View File

@ -49,12 +49,7 @@ class PacketQueue {
std::list<ZMPacket *>::const_iterator begin() const { return pktQueue.begin(); }
void addStreamId(int p_stream_id);
void setMaxVideoPackets(int p) {
max_video_packet_count = p;
if ( max_video_packet_count < 1 )
max_video_packet_count = 1 ;
// We can simplify a lot of logic in queuePacket if we can assume at least 1 packet in queue
}
void setMaxVideoPackets(int p);
bool queuePacket(ZMPacket* packet);
ZMPacket * popPacket();