Index: webrtc/modules/video_coding/frame_buffer2.h |
diff --git a/webrtc/modules/video_coding/frame_buffer2.h b/webrtc/modules/video_coding/frame_buffer2.h |
index 10cae426f620345868668eaf57083cafc36a6db2..3201f627ce88d8d51919763397806b42e1912740 100644 |
--- a/webrtc/modules/video_coding/frame_buffer2.h |
+++ b/webrtc/modules/video_coding/frame_buffer2.h |
@@ -46,6 +46,14 @@ class FrameBuffer { |
// unique ptr if there is no available frame for decoding. |
std::unique_ptr<FrameObject> NextFrame(int64_t max_wait_time_ms); |
+ // Start the frame buffer, has no effect if the frame buffer is started. |
+ // The frame buffer is started upon construction. |
+ void Start(); |
+ |
+ // Stop the frame buffer, causing any sleeping thread in NextFrame to |
+ // return immediately. |
+ void Stop(); |
+ |
private: |
// FrameKey is a pair of (picture id, spatial layer). |
using FrameKey = std::pair<uint16_t, uint8_t>; |
@@ -73,6 +81,7 @@ class FrameBuffer { |
VCMJitterEstimator* const jitter_estimator_; |
const VCMTiming* const timing_; |
int newest_picture_id_ GUARDED_BY(crit_); |
+ bool stopped_ GUARDED_BY(crit_); |
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer); |
}; |