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

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

Issue 1178053002: Add UMA logging for target audio bitrate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Using GetTargetBitrate 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_owner.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_owner.cc b/webrtc/modules/audio_coding/main/acm2/codec_owner.cc
index 4d214be24281e313700fa43aca2efd2b20afa8e5..12dec0ae5085ab81d79a70d312e8328e178183ad 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_owner.cc
+++ b/webrtc/modules/audio_coding/main/acm2/codec_owner.cc
@@ -21,6 +21,8 @@
#include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/audio_encoder_pcm16b.h"
#include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
+#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
+#include "webrtc/system_wrappers/interface/metrics.h"
namespace webrtc {
namespace acm2 {
@@ -178,6 +180,8 @@ void CodecOwner::SetEncoders(const CodecInst& speech_inst,
int red_payload_type) {
CreateSpeechEncoder(speech_inst, &speech_encoder_, &isac_codec_,
&isac_is_encoder_);
+ RTC_HISTOGRAM_COUNTS_100(kHistogrameNameAudioTargetBitrateInKbps,
+ SpeechEncoder()->GetTargetBitrate() / 1000);
external_speech_encoder_ = nullptr;
ChangeCngAndRed(cng_payload_type, vad_mode, red_payload_type);
}
@@ -187,6 +191,8 @@ void CodecOwner::SetEncoders(AudioEncoderMutable* external_speech_encoder,
ACMVADMode vad_mode,
int red_payload_type) {
external_speech_encoder_ = external_speech_encoder;
+ RTC_HISTOGRAM_COUNTS_100(kHistogrameNameAudioTargetBitrateInKbps,
+ SpeechEncoder()->GetTargetBitrate() / 1000);
speech_encoder_.reset();
isac_is_encoder_ = false;
ChangeCngAndRed(cng_payload_type, vad_mode, red_payload_type);

Powered by Google App Engine
This is Rietveld 408576698