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..0902f5cb1a8640b8dfd3404147249491b81bb672 100644 |
--- a/webrtc/modules/video_coding/frame_buffer2.cc |
+++ b/webrtc/modules/video_coding/frame_buffer2.cc |
@@ -207,6 +207,20 @@ 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; |
+ |
+ timing_->set_min_playout_delay( |
+ (minimal_playout_delay_ms >= 0) ? minimal_playout_delay_ms : -1); |
philipel
2017/05/09 14:34:47
What happens if you set the min/max playout delay
|
+ timing_->set_max_playout_delay( |
+ (maximal_playout_delay_ms >= 0) ? maximal_playout_delay_ms : -1); |
+} |
+ |
int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) { |
TRACE_EVENT0("webrtc", "FrameBuffer::InsertFrame"); |
RTC_DCHECK(frame); |
@@ -216,6 +230,8 @@ int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) { |
rtc::CritScope lock(&crit_); |
+ UpdatePlayoutDelays(*frame); |
+ |
int last_continuous_picture_id = |
last_continuous_frame_it_ == frames_.end() |
? -1 |