From d568d0633a2d7dbcce9b0bc27a2131994aae8dbe Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 2 Aug 2022 20:43:20 -0400 Subject: [PATCH] add notify_all functions --- src/zm_packet.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/zm_packet.h b/src/zm_packet.h index b08a64558..737441f0c 100644 --- a/src/zm_packet.h +++ b/src/zm_packet.h @@ -79,6 +79,9 @@ class ZMPacket { //AVFrame *get_out_frame(const AVCodecContext *ctx); AVFrame *get_out_frame(int width, int height, AVPixelFormat format); int get_codec_imgsize() { return codec_imgsize; }; + void notify_all() { + this->condition_.notify_all(); + } }; class ZMLockedPacket { @@ -120,6 +123,10 @@ class ZMLockedPacket { Debug(4, "packet %d waiting", packet_->image_index); packet_->condition_.wait(lck_); } + void notify_all() { + packet_->notify_all(); + } + }; #endif /* ZM_PACKET_H */