Clean up the NetEqFactory API.
This CL decouples NetEqFactory and AudioDecoderFactory. AudioDecoderFactory is used in more places than just inside of NetEq, so decoupling these makes sense. Bug: webrtc:11005 Change-Id: I78dd856e4248e398e69a65816b062ef30555b055 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161005 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29961}
This commit is contained in:
@ -15,8 +15,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include "absl/flags/flag.h"
|
||||
#include "api/neteq/custom_neteq_factory.h"
|
||||
#include "api/neteq/default_neteq_controller_factory.h"
|
||||
#include "modules/audio_coding/neteq/default_neteq_factory.h"
|
||||
#include "modules/audio_coding/neteq/tools/neteq_quality_test.h"
|
||||
#include "modules/audio_coding/neteq/tools/output_audio_file.h"
|
||||
#include "modules/audio_coding/neteq/tools/output_wav_file.h"
|
||||
@ -95,9 +94,7 @@ std::unique_ptr<NetEq> CreateNetEq(
|
||||
const NetEq::Config& config,
|
||||
Clock* clock,
|
||||
const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) {
|
||||
CustomNetEqFactory neteq_factory(
|
||||
decoder_factory, std::make_unique<DefaultNetEqControllerFactory>());
|
||||
return neteq_factory.CreateNetEq(config, clock);
|
||||
return DefaultNetEqFactory().CreateNetEq(config, decoder_factory, clock);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user