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}
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/testsupport/fileutils.h"
|
||||
|
||||
@ -127,7 +128,9 @@ void PacketLossTest::Perform() {
|
||||
#ifndef WEBRTC_CODEC_OPUS
|
||||
return;
|
||||
#else
|
||||
std::unique_ptr<AudioCodingModule> acm(AudioCodingModule::Create());
|
||||
AudioCodingModule::Config config;
|
||||
config.decoder_factory = CreateBuiltinAudioDecoderFactory();
|
||||
std::unique_ptr<AudioCodingModule> acm(AudioCodingModule::Create(config));
|
||||
|
||||
int codec_id = acm->Codec("opus", 48000, channels_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user