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

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

Issue 2870823003: Configured VCMTiming with sender defining delay times. (Closed)
Patch Set: empty Created 3 years, 7 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 | « webrtc/modules/video_coding/frame_buffer2.h ('k') | webrtc/modules/video_coding/frame_buffer2_unittest.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.cc
diff --git a/webrtc/modules/video_coding/frame_buffer2.cc b/webrtc/modules/video_coding/frame_buffer2.cc
index 4dcea53f6a6b4a0e993e5da827ea6a24fb531c9b..8d86a6412a076f295f22b4546b84d21d3189651c 100644
--- a/webrtc/modules/video_coding/frame_buffer2.cc
+++ b/webrtc/modules/video_coding/frame_buffer2.cc
@@ -43,6 +43,7 @@ FrameBuffer::FrameBuffer(Clock* clock,
jitter_estimator_(jitter_estimator),
timing_(timing),
inter_frame_delay_(clock_->TimeInMilliseconds()),
+ last_decoded_frame_timestamp_(0),
last_decoded_frame_it_(frames_.end()),
last_continuous_frame_it_(frames_.end()),
num_frames_history_(0),
@@ -207,6 +208,16 @@ void FrameBuffer::Stop() {
new_continuous_frame_event_.Set();
}
+void FrameBuffer::UpdatePlayoutDelays(const FrameObject& frame) {
+ TRACE_EVENT0("webrtc", "FrameBuffer::UpdatePlayoutDelays");
+ PlayoutDelay playout_delay = frame.EncodedImage().playout_delay_;
+ if (playout_delay.min_ms >= 0)
+ timing_->set_min_playout_delay(playout_delay.min_ms);
+
+ if (playout_delay.max_ms >= 0)
+ timing_->set_max_playout_delay(playout_delay.max_ms);
+}
+
int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) {
TRACE_EVENT0("webrtc", "FrameBuffer::InsertFrame");
RTC_DCHECK(frame);
@@ -283,7 +294,7 @@ int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) {
if (!UpdateFrameInfoWithIncomingFrame(*frame, info))
return last_continuous_picture_id;
-
+ UpdatePlayoutDelays(*frame);
info->second.frame = std::move(frame);
++num_frames_buffered_;
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2.h ('k') | webrtc/modules/video_coding/frame_buffer2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698