Chromium Code Reviews| Index: webrtc/video/receive_statistics_proxy.h |
| diff --git a/webrtc/video/receive_statistics_proxy.h b/webrtc/video/receive_statistics_proxy.h |
| index 8aff1a254c47ec6c79f50696cb13009350822d98..b0732533bd4d1b8e26430e5ba95ae4c85605604a 100644 |
| --- a/webrtc/video/receive_statistics_proxy.h |
| +++ b/webrtc/video/receive_statistics_proxy.h |
| @@ -18,6 +18,7 @@ |
| #include "webrtc/common_video/include/frame_callback.h" |
| #include "webrtc/modules/video_coding/include/video_coding_defines.h" |
| #include "webrtc/rtc_base/criticalsection.h" |
| +#include "webrtc/rtc_base/optional.h" |
| #include "webrtc/rtc_base/rate_statistics.h" |
| #include "webrtc/rtc_base/ratetracker.h" |
| #include "webrtc/rtc_base/thread_annotations.h" |
| @@ -94,16 +95,23 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, |
| SampleCounter() : sum(0), num_samples(0) {} |
| void Add(int sample); |
| int Avg(int64_t min_required_samples) const; |
| + int Max() const; |
| void Reset(); |
| private: |
| int64_t sum; |
| int64_t num_samples; |
| + rtc::Optional<int64_t> max; |
|
sprang_webrtc
2017/07/26 14:13:43
Why int64_t instead of int?
ilnik
2017/07/26 14:49:49
No particular reason. Changed to int.
|
| }; |
| struct QpCounters { |
| SampleCounter vp8; |
| }; |
| + struct ContentSpecificStats { |
| + SampleCounter e2e_delay_counter; |
| + SampleCounter interframe_delay_counter; |
| + }; |
| + |
| void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| void QualitySample() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| @@ -144,14 +152,8 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, |
| SampleCounter target_delay_counter_ GUARDED_BY(crit_); |
| SampleCounter current_delay_counter_ GUARDED_BY(crit_); |
| SampleCounter delay_counter_ GUARDED_BY(crit_); |
| - SampleCounter e2e_delay_counter_video_ GUARDED_BY(crit_); |
| - SampleCounter e2e_delay_counter_screenshare_ GUARDED_BY(crit_); |
| - SampleCounter interframe_delay_counter_video_ GUARDED_BY(crit_); |
| - SampleCounter interframe_delay_counter_screenshare_ GUARDED_BY(crit_); |
| - int64_t e2e_delay_max_ms_video_ GUARDED_BY(crit_); |
| - int64_t e2e_delay_max_ms_screenshare_ GUARDED_BY(crit_); |
| - int64_t interframe_delay_max_ms_video_ GUARDED_BY(crit_); |
| - int64_t interframe_delay_max_ms_screenshare_ GUARDED_BY(crit_); |
| + std::map<VideoContentType, ContentSpecificStats> content_specific_stats_ |
| + GUARDED_BY(crit_); |
| MaxCounter freq_offset_counter_ GUARDED_BY(crit_); |
| int64_t first_report_block_time_ms_ GUARDED_BY(crit_); |
| ReportBlockStats report_block_stats_ GUARDED_BY(crit_); |