Index: webrtc/modules/video_coding/timing.cc |
diff --git a/webrtc/modules/video_coding/timing.cc b/webrtc/modules/video_coding/timing.cc |
index 21f4a3dc71159f99e0e93a129998cff2186e62fe..340f2c187f318fdf6861a3f31529c87bf697ea83 100644 |
--- a/webrtc/modules/video_coding/timing.cc |
+++ b/webrtc/modules/video_coding/timing.cc |
@@ -21,21 +21,22 @@ |
namespace webrtc { |
VCMTiming::VCMTiming(Clock* clock, VCMTiming* master_timing) |
- : clock_(clock), |
- master_(false), |
- ts_extrapolator_(), |
- codec_timer_(new VCMCodecTimer()), |
- render_delay_ms_(kDefaultRenderDelayMs), |
- min_playout_delay_ms_(0), |
- max_playout_delay_ms_(10000), |
- jitter_delay_ms_(0), |
- current_delay_ms_(0), |
- last_decode_ms_(0), |
- prev_frame_timestamp_(0), |
- num_decoded_frames_(0), |
- num_delayed_decoded_frames_(0), |
- first_decoded_frame_ms_(-1), |
- sum_missed_render_deadline_ms_(0) { |
+ : clock_(clock), |
+ master_(false), |
+ ts_extrapolator_(), |
+ codec_timer_(new VCMCodecTimer()), |
+ render_delay_ms_(kDefaultRenderDelayMs), |
+ min_playout_delay_ms_(0), |
+ max_playout_delay_ms_(10000), |
+ jitter_delay_ms_(0), |
+ current_delay_ms_(0), |
+ last_decode_ms_(0), |
+ prev_frame_timestamp_(0), |
+ timing_frame_info_(), |
+ num_decoded_frames_(0), |
+ num_delayed_decoded_frames_(0), |
+ first_decoded_frame_ms_(-1), |
+ sum_missed_render_deadline_ms_(0) { |
if (master_timing == NULL) { |
master_ = true; |
ts_extrapolator_ = new TimestampExtrapolator(clock_->TimeInMilliseconds()); |
@@ -304,4 +305,14 @@ bool VCMTiming::GetTimings(int* decode_ms, |
return (num_decoded_frames_ > 0); |
} |
+void VCMTiming::SetTimingFrameInfo(const TimingFrameInfo& info) { |
+ rtc::CritScope cs(&crit_sect_); |
+ timing_frame_info_.emplace(info); |
+} |
+ |
+rtc::Optional<TimingFrameInfo> VCMTiming::GetTimingFrameInfo() { |
+ rtc::CritScope cs(&crit_sect_); |
+ return timing_frame_info_; |
+} |
+ |
} // namespace webrtc |