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

Unified Diff: webrtc/modules/audio_coding/codecs/pcm16b/include/audio_decoder_pcm16b.h

Issue 1348113002: Move AudioDecoderPcm16B next to AudioEncoderPcm16B (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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/pcm16b/include/audio_decoder_pcm16b.h
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/interface/audio_decoder_ilbc.h b/webrtc/modules/audio_coding/codecs/pcm16b/include/audio_decoder_pcm16b.h
similarity index 52%
copy from webrtc/modules/audio_coding/codecs/ilbc/interface/audio_decoder_ilbc.h
copy to webrtc/modules/audio_coding/codecs/pcm16b/include/audio_decoder_pcm16b.h
index ada73e563565b0a8f293ace2e4f62d9021d437d5..6814c307a9eaa36d65c9c7b2b95ad5068e9f6d80 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/interface/audio_decoder_ilbc.h
+++ b/webrtc/modules/audio_coding/codecs/pcm16b/include/audio_decoder_pcm16b.h
@@ -8,22 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_DECODER_ILBC_H_
-#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_DECODER_ILBC_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_INCLUDE_AUDIO_DECODER_PCM16B_H_
+#define WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_INCLUDE_AUDIO_DECODER_PCM16B_H_
+#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
-typedef struct iLBC_decinst_t_ IlbcDecoderInstance;
-
namespace webrtc {
-class AudioDecoderIlbc : public AudioDecoder {
+class AudioDecoderPcm16B : public AudioDecoder {
public:
- AudioDecoderIlbc();
- ~AudioDecoderIlbc() override;
- bool HasDecodePlc() const override;
- size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
+ AudioDecoderPcm16B();
void Reset() override;
+ int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
size_t Channels() const override;
protected:
@@ -34,9 +31,18 @@ class AudioDecoderIlbc : public AudioDecoder {
SpeechType* speech_type) override;
private:
- IlbcDecoderInstance* dec_state_;
- RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIlbc);
+ RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16B);
+};
+
+class AudioDecoderPcm16BMultiCh : public AudioDecoderPcm16B {
+ public:
+ explicit AudioDecoderPcm16BMultiCh(size_t num_channels);
+ size_t Channels() const override;
+
+ private:
+ const size_t channels_;
+ RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16BMultiCh);
};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_DECODER_ILBC_H_
+#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_INCLUDE_AUDIO_DECODER_PCM16B_H_

Powered by Google App Engine
This is Rietveld 408576698