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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 2368223002: Add VideoSendStream::Stats::prefered_media_bitrate_bps (Closed)
Patch Set: Addressed nits Created 4 years, 3 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/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index d47ccbdfec52b64da17cd2947db8508dd1316e35..039e039354cff415c9484c8742f6babe78b0e565 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -339,14 +339,17 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
}
}
-void SendStatisticsProxy::SetContentType(
- VideoEncoderConfig::ContentType content_type) {
+void SendStatisticsProxy::OnEncoderReconfigured(
+ const VideoEncoderConfig& config,
+ uint32_t preferred_bitrate_bps) {
rtc::CritScope lock(&crit_);
- if (content_type_ != content_type) {
+ stats_.preferred_media_bitrate_bps = preferred_bitrate_bps;
+
+ if (content_type_ != config.content_type) {
uma_container_->UpdateHistograms(rtp_config_, stats_);
- uma_container_.reset(
- new UmaSamplesContainer(GetUmaPrefix(content_type), stats_, clock_));
- content_type_ = content_type;
+ uma_container_.reset(new UmaSamplesContainer(
+ GetUmaPrefix(config.content_type), stats_, clock_));
+ content_type_ = config.content_type;
}
}
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698