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

Unified Diff: webrtc/video/receive_statistics_proxy.h

Issue 2986893002: Piggybacking simulcast id and ALR experiment id into video content type extension. (Closed)
Patch Set: use namespace instead of struct Created 3 years, 4 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/video/end_to_end_tests.cc ('k') | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/receive_statistics_proxy.h
diff --git a/webrtc/video/receive_statistics_proxy.h b/webrtc/video/receive_statistics_proxy.h
index 2e93d70f153770d775a3fd08112b7570ca7cb518..9a6807c4b2c734a5c695510ef57b684930ecd7af 100644
--- a/webrtc/video/receive_statistics_proxy.h
+++ b/webrtc/video/receive_statistics_proxy.h
@@ -20,6 +20,7 @@
#include "webrtc/modules/video_coding/include/video_coding_defines.h"
#include "webrtc/rtc_base/criticalsection.h"
#include "webrtc/rtc_base/moving_max_counter.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"
@@ -66,7 +67,9 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
void OnReceiveRatesUpdated(uint32_t bitRate, uint32_t frameRate) override;
void OnFrameCountsUpdated(const FrameCounts& frame_counts) override;
void OnDiscardedPacketsUpdated(int discarded_packets) override;
- void OnCompleteFrame(bool is_keyframe, size_t size_bytes) override;
+ void OnCompleteFrame(bool is_keyframe,
+ size_t size_bytes,
+ VideoContentType content_type) override;
void OnFrameBufferTimingsUpdated(int decode_ms,
int max_decode_ms,
int current_delay_ms,
@@ -98,16 +101,33 @@ 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();
+ void Add(const SampleCounter& other);
private:
int64_t sum;
int64_t num_samples;
+ rtc::Optional<int> max;
};
+
struct QpCounters {
SampleCounter vp8;
};
+ struct ContentSpecificStats {
+ void Add(const ContentSpecificStats& other);
+
+ SampleCounter e2e_delay_counter;
+ SampleCounter interframe_delay_counter;
+ int64_t flow_duration_ms = 0;
+ int64_t total_media_bytes = 0;
+ SampleCounter received_width;
+ SampleCounter received_height;
+ SampleCounter qp_counter;
+ FrameCounts frame_counts;
+ };
+
void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_);
void QualitySample() EXCLUSIVE_LOCKS_REQUIRED(crit_);
@@ -140,24 +160,16 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_);
rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_);
rtc::RateTracker total_byte_tracker_ GUARDED_BY(crit_);
- SampleCounter render_width_counter_ GUARDED_BY(crit_);
- SampleCounter render_height_counter_ GUARDED_BY(crit_);
SampleCounter sync_offset_counter_ GUARDED_BY(crit_);
SampleCounter decode_time_counter_ GUARDED_BY(crit_);
SampleCounter jitter_buffer_delay_counter_ GUARDED_BY(crit_);
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_);
mutable rtc::MovingMaxCounter<int> interframe_delay_max_moving_
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_);
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698