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

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: Minor fixes + counting bugfix 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..33788e22a78354b687841d4e5abc45c3d26e81a9 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,11 @@ class AudioEncoderPcm : public AudioEncoder {
virtual size_t BytesPerSample() const = 0;
+ // The default implementation returns kOther, which means no name,
+ // other or unknown codec. Used to set EncodedInfoLeaf::encoder_type
+ // in AudioEncoderPcm::EncodeImpl
+ virtual AudioEncoder::CodecType GetCodecType() const;
kwiberg-webrtc 2016/05/12 23:30:21 Again, it's probably much simpler to =0 here and j
aleloi 2016/05/13 09:02:27 To clarify: you suggest changing this to =0, make
kwiberg-webrtc 2016/05/15 02:06:13 Exactly.
aleloi 2016/05/16 08:02:23 Done.
+
private:
const int sample_rate_hz_;
const size_t num_channels_;
@@ -84,6 +89,8 @@ class AudioEncoderPcmA final : public AudioEncoderPcm {
size_t BytesPerSample() const override;
+ AudioEncoder::CodecType GetCodecType() const override;
+
private:
static const int kSampleRateHz = 8000;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmA);
@@ -106,6 +113,8 @@ class AudioEncoderPcmU final : public AudioEncoderPcm {
size_t BytesPerSample() const override;
+ AudioEncoder::CodecType GetCodecType() const override;
+
private:
static const int kSampleRateHz = 8000;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU);

Powered by Google App Engine
This is Rietveld 408576698