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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Fix broken test RunOnTqNormalUsage. Created 4 years, 2 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
Index: webrtc/video/send_statistics_proxy.h
diff --git a/webrtc/video/send_statistics_proxy.h b/webrtc/video/send_statistics_proxy.h
index 49f0bf383bb292216970bdda595b5ac8a2131ab6..b80474e5fb746b4fe28eb5b3a5a844cedf7a2cdd 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -40,6 +40,9 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
public SendSideDelayObserver {
public:
static const int kStatsTimeoutMs;
+ // Number of required UMA samples to be collected before a metric is added
åsapersson 2016/10/24 07:54:06 Number of required samples..
perkj_webrtc 2016/10/26 16:40:17 Done.
+ // to a UMA histogram.
åsapersson 2016/10/24 07:54:06 UMA histogram -> rtc histogram
perkj_webrtc 2016/10/26 16:40:17 Done.
+ static const int kMinRequiredUMASamples = 200;
åsapersson 2016/10/24 07:54:06 maybe MinRequiredMetricsSamples
perkj_webrtc 2016/10/26 16:40:17 Done.
SendStatisticsProxy(Clock* clock,
const VideoSendStream::Config& config,
@@ -51,7 +54,10 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
virtual void OnSendEncodedImage(const EncodedImage& encoded_image,
const CodecSpecificInfo* codec_info);
// Used to update incoming frame rate.
- void OnIncomingFrame(int width, int height);
+ void OnIncomingFrame(int width, int height, bool is_cpu_restricted);
+
+ void SetCpuRestrictedResolution(bool cpu_restricted);
+ void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution);
void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate);
void OnSuspendChange(bool is_suspended);
@@ -170,6 +176,7 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
BoolSampleCounter key_frame_counter_;
BoolSampleCounter quality_limited_frame_counter_;
SampleCounter quality_downscales_counter_;
+ BoolSampleCounter cpu_limited_frame_counter_;
BoolSampleCounter bw_limited_frame_counter_;
SampleCounter bw_resolutions_disabled_counter_;
SampleCounter delay_counter_;

Powered by Google App Engine
This is Rietveld 408576698