Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: webrtc/modules/video_coding/frame_buffer2.h

Issue 2105323002: FrameBuffer2 now has Start/Stop methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Nit fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_buffer2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_buffer2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698