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

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

Issue 2946413002: Report timing frames info in GetStats. (Closed)
Patch Set: rebase Created 3 years, 5 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/timing.h ('k') | webrtc/pc/statscollector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webrtc/modules/video_coding/timing.h ('k') | webrtc/pc/statscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698