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

Unified Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.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/audio_coding_module_impl.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
index 4e665ea45525e3db61fb6ef7a3ebce74e53478e5..1ce33a80e32098e70f411f4f98e817f6e2fd75dd 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
@@ -23,6 +23,7 @@
#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/logging.h"
+#include "webrtc/system_wrappers/interface/metrics.h"
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/typedefs.h"
@@ -288,9 +289,11 @@ int AudioCodingModuleImpl::SendBitrate() const {
void AudioCodingModuleImpl::SetBitRate(int bitrate_bps) {
CriticalSectionScoped lock(acm_crit_sect_);
-
if (codec_manager_.CurrentEncoder()) {
codec_manager_.CurrentEncoder()->SetTargetBitrate(bitrate_bps);
+ RTC_HISTOGRAM_COUNTS_100(
+ HISTOGRAM_NAME_AUDIO_TARGET_BITRATE_IN_KBPS,
+ codec_manager_.CurrentEncoder()->GetTargetBitrate() / 1000);
}
}

Powered by Google App Engine
This is Rietveld 408576698