Introduce packetqueue::stop which just sets the deleting flag and sends out a notify. The idea is to call it before clear().
parent
1af63e151b
commit
5a73e16bd2
|
@ -327,6 +327,11 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
|||
return;
|
||||
} // end voidPacketQueue::clearPackets(ZMPacket* zm_packet)
|
||||
|
||||
void PacketQueue::stop() {
|
||||
deleting = true;
|
||||
condition.notify_all();
|
||||
}
|
||||
|
||||
void PacketQueue::clear() {
|
||||
deleting = true;
|
||||
condition.notify_all();
|
||||
|
|
|
@ -60,6 +60,7 @@ class PacketQueue {
|
|||
void setKeepKeyframes(bool k) { keep_keyframes = k; };
|
||||
|
||||
bool queuePacket(std::shared_ptr<ZMPacket> packet);
|
||||
void stop();
|
||||
void clear();
|
||||
void dumpQueue();
|
||||
unsigned int size();
|
||||
|
|
Loading…
Reference in New Issue