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

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
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..438f1f8887407d6d9832b36e8d047c0bceb3da3d 100644
--- a/webrtc/modules/video_coding/frame_buffer2.cc
+++ b/webrtc/modules/video_coding/frame_buffer2.cc
@@ -207,6 +207,21 @@ void FrameBuffer::Stop() {
new_continuous_frame_event_.Set();
}
+void FrameBuffer::UpdatePlayoutDelays(const FrameObject& frame) {
+ TRACE_EVENT0("webrtc", "FrameBuffer::UpdatePlayoutDelays");
+ int minimal_playout_delay_ms = -1;
+ int maximal_playout_delay_ms = -1;
+
+ minimal_playout_delay_ms = frame.EncodedImage().playout_delay_.min_ms;
+ maximal_playout_delay_ms = frame.EncodedImage().playout_delay_.max_ms;
+
+ if (minimal_playout_delay_ms >= 0)
+ timing_->set_min_playout_delay(minimal_playout_delay_ms);
+
+ if (maximal_playout_delay_ms >= 0)
+ timing_->set_max_playout_delay(maximal_playout_delay_ms);
+}
+
int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) {
TRACE_EVENT0("webrtc", "FrameBuffer::InsertFrame");
RTC_DCHECK(frame);
@@ -216,6 +231,8 @@ int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) {
rtc::CritScope lock(&crit_);
+ UpdatePlayoutDelays(*frame);
philipel 2017/05/09 16:12:58 I just realized this now, but I think we should on
gnish 2017/05/09 16:24:12 Done.
+
int last_continuous_picture_id =
last_continuous_frame_it_ == frames_.end()
? -1

Powered by Google App Engine
This is Rietveld 408576698