Preparing VideoReceiveStream for move to TaskQueue.
Extracting the work that's thread dependent from the work that will
also be done when using task queue.
Bug: webrtc:10365
Change-Id: I648796fe016c966c731c9b7f85d2a871c1f2a349
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131241
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27454}
diff --git a/modules/video_coding/frame_buffer2.h b/modules/video_coding/frame_buffer2.h
index fda496e..78a6171 100644
--- a/modules/video_coding/frame_buffer2.h
+++ b/modules/video_coding/frame_buffer2.h
@@ -45,7 +45,7 @@
FrameBuffer(Clock* clock,
VCMJitterEstimator* jitter_estimator,
VCMTiming* timing,
- VCMReceiveStatisticsCallback* stats_proxy);
+ VCMReceiveStatisticsCallback* stats_callback);
virtual ~FrameBuffer();
@@ -118,6 +118,9 @@
// Check that the references of |frame| are valid.
bool ValidReferences(const EncodedFrame& frame) const;
+ int64_t FindNextFrame(int64_t now_ms) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ EncodedFrame* GetNextFrame() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
// Update all directly dependent and indirectly dependent frames and mark
// them as continuous if all their references has been fulfilled.
void PropagateContinuity(FrameMap::iterator start)
@@ -160,6 +163,9 @@
rtc::CriticalSection crit_;
Clock* const clock_;
+ int64_t latest_return_time_ms_ RTC_GUARDED_BY(crit_);
+ bool keyframe_required_ RTC_GUARDED_BY(crit_);
+
rtc::Event new_continuous_frame_event_;
VCMJitterEstimator* const jitter_estimator_ RTC_GUARDED_BY(crit_);
VCMTiming* const timing_ RTC_GUARDED_BY(crit_);