AudioCodingModule::Create(): Require caller to supply an AudioDecoderFactory
So that we don't have to be capable of creating one ourselves, which
requires a dependency on the audio decoders.
BUG=webrtc:5801, webrtc:8396
Change-Id: I80749ec3b86cba73994307046d05964f59167d44
Reviewed-on: https://webrtc-review.googlesource.com/18440
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22774}
diff --git a/modules/audio_coding/include/audio_coding_module.h b/modules/audio_coding/include/audio_coding_module.h
index 12c98ee..85225c2 100644
--- a/modules/audio_coding/include/audio_coding_module.h
+++ b/modules/audio_coding/include/audio_coding_module.h
@@ -66,7 +66,8 @@
public:
struct Config {
- Config();
+ explicit Config(
+ rtc::scoped_refptr<AudioDecoderFactory> decoder_factory = nullptr);
Config(const Config&);
~Config();
@@ -75,17 +76,6 @@
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory;
};
- ///////////////////////////////////////////////////////////////////////////
- // Creation and destruction of a ACM.
- //
- // The second method is used for testing where a simulated clock can be
- // injected into ACM. ACM will take the ownership of the object clock and
- // delete it when destroyed.
- //
- // TODO(solenberg): Remove once downstream projects are updated.
- RTC_DEPRECATED static AudioCodingModule* Create(int id);
- static AudioCodingModule* Create();
- static AudioCodingModule* Create(Clock* clock);
static AudioCodingModule* Create(const Config& config);
virtual ~AudioCodingModule() = default;