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

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

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.h
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
index eb5ad0287844ca7bfb78995a232f9c4ae48119d5..3a2c05e0b39a071d64ae19296264c0e657aa3777 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
@@ -55,6 +55,12 @@ class AudioEncoderPcm : public AudioEncoder {
virtual size_t BytesPerSample() const = 0;
+ // Returns a pointer to a statically allocated string with the codec
+ // name, e.g. "g711A" or "g711U". The default implementation returns
+ // null, which means no name. Used to set
+ // EncodedInfoLeaf::encoder_name in AudioEncoderPcm::EncodeImpl
+ virtual const char* GetCodecName() const;
ossu 2016/05/12 12:50:14 I think this should have a name that refers to log
aleloi 2016/05/12 13:25:47 The names in WebRTC and histograms.xml do not have
+
private:
const int sample_rate_hz_;
const size_t num_channels_;
@@ -84,6 +90,8 @@ class AudioEncoderPcmA final : public AudioEncoderPcm {
size_t BytesPerSample() const override;
+ const char* GetCodecName() const override;
+
private:
static const int kSampleRateHz = 8000;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmA);
@@ -106,6 +114,8 @@ class AudioEncoderPcmU final : public AudioEncoderPcm {
size_t BytesPerSample() const override;
+ const char* GetCodecName() const override;
+
private:
static const int kSampleRateHz = 8000;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU);

Powered by Google App Engine
This is Rietveld 408576698