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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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/send_statistics_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..89c40659b5959ed080d005c531ae725f4e3e08ac 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 samples to be collected before a metric is added
+ // to a rtc histogram.
+ static const int kMinRequiredMetricsSamples = 200;
SendStatisticsProxy(Clock* clock,
const VideoSendStream::Config& config,
@@ -53,6 +56,13 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
// Used to update incoming frame rate.
void OnIncomingFrame(int width, int height);
+ // Used to indicate that the current input frame resolution is restricted due
+ // to cpu usage.
+ void SetCpuRestrictedResolution(bool cpu_restricted);
+ // Used to update the number of times the input frame resolution has changed
+ // due to cpu adaptation.
+ void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution);
+
void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate);
void OnSuspendChange(bool is_suspended);
void OnInactiveSsrc(uint32_t ssrc);
@@ -170,6 +180,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_;
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698