Move NetEq headers to api/

This CL also introduces NetEqFactory and NetEqControllerFactory
interfaces, as well as several convenience classes for working with
them: DefaultNetEqFactory, DefaultNetEqControllerFactory and
CustomNetEqFactory.

Bug: webrtc:11005
Change-Id: I1e8fc5154636ac2aad1a856828f80a2a758ad392
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156945
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29671}
This commit is contained in:
Ivo Creusen
2019-10-31 14:38:11 +01:00
committed by Commit Bot
parent 739a5b3692
commit 3ce44a3540
50 changed files with 851 additions and 389 deletions

View File

@ -17,8 +17,9 @@
#include "api/audio/audio_frame.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/neteq/neteq.h"
#include "api/test/neteq_factory_with_codecs.h"
#include "modules/audio_coding/codecs/pcm16b/pcm16b.h"
#include "modules/audio_coding/neteq/include/neteq.h"
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
#include "modules/audio_coding/neteq/tools/rtp_generator.h"
#include "rtc_base/strings/string_builder.h"
@ -67,10 +68,10 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
last_arrival_time_(0) {
NetEq::Config config;
config.sample_rate_hz = sample_rate_hz_;
rtc::scoped_refptr<AudioDecoderFactory> factory =
CreateBuiltinAudioDecoderFactory();
neteq_mono_ = NetEq::Create(config, &clock_, factory);
neteq_ = NetEq::Create(config, &clock_, factory);
std::unique_ptr<NetEqFactory> neteq_factory =
CreateNetEqFactoryWithCodecs();
neteq_mono_ = neteq_factory->CreateNetEq(config, &clock_);
neteq_ = neteq_factory->CreateNetEq(config, &clock_);
input_ = new int16_t[frame_size_samples_];
encoded_ = new uint8_t[2 * frame_size_samples_];
input_multi_channel_ = new int16_t[frame_size_samples_ * num_channels_];
@ -79,8 +80,6 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
}
~NetEqStereoTest() {
delete neteq_mono_;
delete neteq_;
delete[] input_;
delete[] encoded_;
delete[] input_multi_channel_;
@ -206,8 +205,8 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
const size_t frame_size_samples_;
const size_t output_size_samples_;
SimulatedClock clock_;
NetEq* neteq_mono_;
NetEq* neteq_;
std::unique_ptr<NetEq> neteq_mono_;
std::unique_ptr<NetEq> neteq_;
test::RtpGenerator rtp_generator_mono_;
test::RtpGenerator rtp_generator_;
int16_t* input_;