From baf65819cb15f7f2ab655db99bc42d2e17db9c72 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 23a593b22..9601499af 100644 --- a/src/zm_packet.h +++ b/src/zm_packet.h @@ -77,6 +77,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 { @@ -119,6 +122,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 */