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

Side by Side Diff: webrtc/modules/audio_coding/neteq/audio_decoder_impl.h

Issue 1336923002: Remove the preprocessor symbol WEBRTC_CODEC_PCM16 (it was always defined) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 : AudioDecoderPcmA(), channels_(channels) { 86 : AudioDecoderPcmA(), channels_(channels) {
87 assert(channels > 0); 87 assert(channels > 0);
88 } 88 }
89 size_t Channels() const override; 89 size_t Channels() const override;
90 90
91 private: 91 private:
92 const size_t channels_; 92 const size_t channels_;
93 DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmAMultiCh); 93 DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmAMultiCh);
94 }; 94 };
95 95
96 #ifdef WEBRTC_CODEC_PCM16
97 // This class handles all four types (i.e., sample rates) of PCM16B codecs. 96 // This class handles all four types (i.e., sample rates) of PCM16B codecs.
98 // The type is specified in the constructor parameter |type|. 97 // The type is specified in the constructor parameter |type|.
99 class AudioDecoderPcm16B : public AudioDecoder { 98 class AudioDecoderPcm16B : public AudioDecoder {
100 public: 99 public:
101 AudioDecoderPcm16B(); 100 AudioDecoderPcm16B();
102 void Reset() override; 101 void Reset() override;
103 int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; 102 int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
104 size_t Channels() const override; 103 size_t Channels() const override;
105 104
106 protected: 105 protected:
(...skipping 12 matching lines...) Expand all
119 // of channels is derived from the type. 118 // of channels is derived from the type.
120 class AudioDecoderPcm16BMultiCh : public AudioDecoderPcm16B { 119 class AudioDecoderPcm16BMultiCh : public AudioDecoderPcm16B {
121 public: 120 public:
122 explicit AudioDecoderPcm16BMultiCh(size_t num_channels); 121 explicit AudioDecoderPcm16BMultiCh(size_t num_channels);
123 size_t Channels() const override; 122 size_t Channels() const override;
124 123
125 private: 124 private:
126 const size_t channels_; 125 const size_t channels_;
127 DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16BMultiCh); 126 DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16BMultiCh);
128 }; 127 };
129 #endif
130 128
131 #ifdef WEBRTC_CODEC_ILBC 129 #ifdef WEBRTC_CODEC_ILBC
132 class AudioDecoderIlbc : public AudioDecoder { 130 class AudioDecoderIlbc : public AudioDecoder {
133 public: 131 public:
134 AudioDecoderIlbc(); 132 AudioDecoderIlbc();
135 ~AudioDecoderIlbc() override; 133 ~AudioDecoderIlbc() override;
136 bool HasDecodePlc() const override; 134 bool HasDecodePlc() const override;
137 size_t DecodePlc(size_t num_frames, int16_t* decoded) override; 135 size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
138 void Reset() override; 136 void Reset() override;
139 size_t Channels() const override; 137 size_t Channels() const override;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // Returns the sample rate for |codec_type|. 270 // Returns the sample rate for |codec_type|.
273 int CodecSampleRateHz(NetEqDecoder codec_type); 271 int CodecSampleRateHz(NetEqDecoder codec_type);
274 272
275 // Creates an AudioDecoder object of type |codec_type|. Returns NULL for for 273 // Creates an AudioDecoder object of type |codec_type|. Returns NULL for for
276 // unsupported codecs, and when creating an AudioDecoder is not applicable 274 // unsupported codecs, and when creating an AudioDecoder is not applicable
277 // (e.g., for RED and DTMF/AVT types). 275 // (e.g., for RED and DTMF/AVT types).
278 AudioDecoder* CreateAudioDecoder(NetEqDecoder codec_type); 276 AudioDecoder* CreateAudioDecoder(NetEqDecoder codec_type);
279 277
280 } // namespace webrtc 278 } // namespace webrtc
281 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_AUDIO_DECODER_IMPL_H_ 279 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_AUDIO_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/test/TestStereo.cc ('k') | webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698