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

Unified Diff: webrtc/modules/audio_coding/neteq/decoder_database.h

Issue 1928293002: NetEq: Use a BuiltinAudioDecoderFactory to create decoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/neteq/decoder_database.h
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.h b/webrtc/modules/audio_coding/neteq/decoder_database.h
index ec8a5d69bc27dfb1b19e472dc5121dbadedffbbf..3a40e08c8a64a2aade03dfcef6e555b8a63635a7 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.h
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.h
@@ -17,6 +17,8 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/common_types.h" // NULL
+#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h"
+#include "webrtc/modules/audio_coding/codecs/audio_format.h"
#include "webrtc/modules/audio_coding/codecs/cng/webrtc_cng.h"
#include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h"
#include "webrtc/modules/audio_coding/neteq/packet.h"
@@ -47,7 +49,7 @@ class DecoderDatabase {
~DecoderInfo();
// Get the AudioDecoder object, creating it first if necessary.
- AudioDecoder* GetDecoder();
+ AudioDecoder* GetDecoder(AudioDecoderFactory* factory);
// Delete the AudioDecoder object, unless it's external. (This means we can
// always recreate it later if we need it.)
@@ -59,6 +61,7 @@ class DecoderDatabase {
AudioDecoder* const external_decoder;
private:
+ const rtc::Optional<SdpAudioFormat> audio_format_;
std::unique_ptr<AudioDecoder> decoder_;
};
@@ -66,7 +69,7 @@ class DecoderDatabase {
// only 7 bits).
static const uint8_t kRtpPayloadTypeError = 0xFF;
- DecoderDatabase();
+ DecoderDatabase(std::unique_ptr<AudioDecoderFactory> decoder_factory);
virtual ~DecoderDatabase();
@@ -157,6 +160,7 @@ class DecoderDatabase {
int active_decoder_type_;
int active_cng_decoder_type_;
std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_;
+ const std::unique_ptr<AudioDecoderFactory> decoder_factory_;
ossu 2016/04/29 12:21:33 Since the decoder_factory_ will (eventually) be cr
kwiberg-webrtc 2016/04/29 23:10:13 I know. I'm just using unique_ptr for now so that
ossu 2016/05/02 10:59:40 Yeah, keep it like this for now. No reason to bloc
RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase);
};

Powered by Google App Engine
This is Rietveld 408576698