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

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: 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_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..5c1e37b5b0c2f493c067067369ab0c2a60038618 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 {
@@ -180,6 +182,8 @@ void CodecOwner::SetEncoders(const CodecInst& speech_inst,
&isac_is_encoder_);
external_speech_encoder_ = nullptr;
ChangeCngAndRed(cng_payload_type, vad_mode, red_payload_type);
+ RTC_HISTOGRAM_COUNTS_100(HISTOGRAM_NAME_AUDIO_TARGET_BITRATE_IN_KBPS,
+ SpeechEncoder()->GetTargetBitrate() / 1000);
}
void CodecOwner::SetEncoders(AudioEncoderMutable* external_speech_encoder,
@@ -190,6 +194,8 @@ void CodecOwner::SetEncoders(AudioEncoderMutable* external_speech_encoder,
speech_encoder_.reset();
isac_is_encoder_ = false;
ChangeCngAndRed(cng_payload_type, vad_mode, red_payload_type);
+ RTC_HISTOGRAM_COUNTS_100(HISTOGRAM_NAME_AUDIO_TARGET_BITRATE_IN_KBPS,
+ SpeechEncoder()->GetTargetBitrate() / 1000);
}
void CodecOwner::ChangeCngAndRed(int cng_payload_type,
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/codec_manager.cc ('k') | webrtc/modules/audio_coding/main/acm2/codec_owner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698