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

Unified Diff: webrtc/modules/audio_coding/main/acm2/codec_manager.cc

Issue 1178053002: Add UMA logging for target audio bitrate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing a problem that was revealed in tests, and silencing a few warnings Created 5 years, 6 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/modules/audio_coding/main/acm2/codec_manager.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_manager.cc b/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
index cad6ee908939b9c1523924f5b2d1b372b7077f1d..d28dcc6ff5e6d63a2fbba52a7873c4869fce93cf 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
+++ b/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
@@ -13,6 +13,8 @@
#include "webrtc/base/checks.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
+#include "webrtc/system_wrappers/interface/metrics.h"
#include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
@@ -312,6 +314,9 @@ int CodecManager::RegisterEncoder(const CodecInst& send_codec) {
// Check if a change in Rate is required.
if (send_codec.rate != send_codec_inst_.rate) {
codec_owner_.SpeechEncoder()->SetTargetBitrate(send_codec.rate);
+ RTC_HISTOGRAM_COUNTS_100(
+ HISTOGRAM_NAME_AUDIO_TARGET_BITRATE_IN_KBPS,
+ codec_owner_.SpeechEncoder()->GetTargetBitrate() / 1000);
send_codec_inst_.rate = send_codec.rate;
}

Powered by Google App Engine
This is Rietveld 408576698