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

Unified Diff: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc

Issue 1967503002: Audio codec usage statistics (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Moved logging to AudioCodingModuleImpl Created 4 years, 7 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/codecs/g711/audio_encoder_pcm.cc
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
index e4da8d7440bc5520342474ca6e9a9360f885c9bc..1133b1b42e0385e8ef94a26d976cee86d02364fb 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
@@ -96,9 +96,14 @@ AudioEncoder::EncodedInfo AudioEncoderPcm::EncodeImpl(
encoded.data());
});
speech_buffer_.clear();
+ info.encoder_name = GetCodecName();
return info;
}
+const char* AudioEncoderPcm::GetCodecName() const {
+ return nullptr;
+}
kwiberg-webrtc 2016/05/12 13:01:52 There are only three subclasses. It'll be easier t
+
void AudioEncoderPcm::Reset() {
speech_buffer_.clear();
}
@@ -116,6 +121,10 @@ size_t AudioEncoderPcmA::BytesPerSample() const {
return 1;
}
+const char* AudioEncoderPcmA::GetCodecName() const {
+ return "g711A";
hlundin-webrtc 2016/05/12 12:23:39 Please, educate me. What is the lifetime of a lite
ossu 2016/05/12 12:50:14 FOREVER! Well, it's static data, so I guess until
aleloi 2016/05/12 12:52:18 The same as the lifetime of the whole program acco
+}
+
AudioEncoderPcmU::AudioEncoderPcmU(const CodecInst& codec_inst)
: AudioEncoderPcmU(CreateConfig<AudioEncoderPcmU>(codec_inst)) {}
@@ -129,4 +138,8 @@ size_t AudioEncoderPcmU::BytesPerSample() const {
return 1;
}
+const char* AudioEncoderPcmU::GetCodecName() const {
+ return "g711U";
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698