Chromium Code Reviews| 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 |