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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 2871623002: Update video adaptation stats to support degradations in both resolution and framerate. (Closed)
Patch Set: address comments Created 3 years, 7 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 | « no previous file | 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 10d72c7796e69e7b0130c6fcf2e1e64583bfa0a3..763a7a8f87f819467a487177fd226ad1106daa48 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -57,10 +57,14 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
// Used to update incoming frame rate.
void OnIncomingFrame(int width, int height);
- void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution);
- void OnQualityRestrictedResolutionChanged(int num_quality_downscales);
- void SetCpuScalingStats(int num_cpu_downscales); // -1: disabled.
- void SetQualityScalingStats(int num_quality_downscales); // -1: disabled.
+ // Adaptation stats.
+ void SetAdaptationStats(const ViEEncoder::AdaptCounts& cpu_counts,
+ const ViEEncoder::AdaptCounts& quality_counts);
+ void OnCpuAdaptationChanged(const ViEEncoder::AdaptCounts& cpu_counts,
+ const ViEEncoder::AdaptCounts& quality_counts);
+ void OnQualityAdaptationChanged(
+ const ViEEncoder::AdaptCounts& cpu_counts,
+ const ViEEncoder::AdaptCounts& quality_counts);
void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate);
void OnSuspendChange(bool is_suspended);
@@ -160,6 +164,12 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ void SetAdaptTimer(const ViEEncoder::AdaptCounts& counts, StatsTimer* timer)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ void UpdateAdaptationStats(const ViEEncoder::AdaptCounts& cpu_counts,
+ const ViEEncoder::AdaptCounts& quality_counts)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
Clock* const clock_;
const std::string payload_name_;
const VideoSendStream::Config::Rtp rtp_config_;
@@ -215,8 +225,8 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
RateAccCounter fec_byte_counter_;
int64_t first_rtcp_stats_time_ms_;
int64_t first_rtp_stats_time_ms_;
- StatsTimer cpu_scaling_timer_;
- StatsTimer quality_scaling_timer_;
+ StatsTimer cpu_adapt_timer_;
+ StatsTimer quality_adapt_timer_;
BoolSampleCounter paused_time_counter_;
TargetRateUpdates target_rate_updates_;
ReportBlockStats report_block_stats_;
« no previous file with comments | « no previous file | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698