Delete NetEqTest::ExtDecoderMap
Bug: webrtc:10080 Change-Id: Ica2c3b8b94bd31cd3af98b2e918dafc223c341ef Reviewed-on: https://webrtc-review.googlesource.com/c/115417 Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26164}
This commit is contained in:
@ -184,11 +184,9 @@ NetEqNetworkStatistics RunTest(int loss_cadence, std::string* checksum) {
|
||||
// No callback objects.
|
||||
NetEqTest::Callbacks callbacks;
|
||||
|
||||
NetEqTest::ExtDecoderMap external_decoders;
|
||||
NetEqTest neteq_test(
|
||||
config, new rtc::RefCountedObject<test::AudioDecoderProxyFactory>(&dec),
|
||||
decoders, external_decoders, nullptr, std::move(lossy_input),
|
||||
std::move(output), callbacks);
|
||||
decoders, nullptr, std::move(lossy_input), std::move(output), callbacks);
|
||||
EXPECT_LE(kRunTimeMs, neteq_test.Run());
|
||||
|
||||
auto lifetime_stats = neteq_test.LifetimeStats();
|
||||
|
@ -1712,7 +1712,6 @@ TEST(NetEqNoTimeStretchingMode, RunTest) {
|
||||
NetEq::Config config;
|
||||
config.for_test_no_time_stretching = true;
|
||||
auto codecs = NetEqTest::StandardDecoderMap();
|
||||
NetEqTest::ExtDecoderMap ext_codecs;
|
||||
NetEqPacketSourceInput::RtpHeaderExtensionMap rtp_ext_map = {
|
||||
{1, kRtpExtensionAudioLevel},
|
||||
{3, kRtpExtensionAbsoluteSendTime},
|
||||
@ -1726,9 +1725,8 @@ TEST(NetEqNoTimeStretchingMode, RunTest) {
|
||||
new TimeLimitedNetEqInput(std::move(input), 20000));
|
||||
std::unique_ptr<AudioSink> output(new VoidAudioSink);
|
||||
NetEqTest::Callbacks callbacks;
|
||||
NetEqTest test(config, CreateBuiltinAudioDecoderFactory(), codecs, ext_codecs,
|
||||
nullptr, std::move(input_time_limit), std::move(output),
|
||||
callbacks);
|
||||
NetEqTest test(config, CreateBuiltinAudioDecoderFactory(), codecs, nullptr,
|
||||
std::move(input_time_limit), std::move(output), callbacks);
|
||||
test.Run();
|
||||
const auto stats = test.SimulationStats();
|
||||
EXPECT_EQ(0, stats.accelerate_rate);
|
||||
|
@ -53,7 +53,6 @@ void DefaultNetEqTestErrorCallback::OnGetAudioError() {
|
||||
NetEqTest::NetEqTest(const NetEq::Config& config,
|
||||
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory,
|
||||
const DecoderMap& codecs,
|
||||
const ExtDecoderMap& ext_codecs,
|
||||
std::unique_ptr<std::ofstream> text_log,
|
||||
std::unique_ptr<NetEqInput> input,
|
||||
std::unique_ptr<AudioSink> output,
|
||||
@ -67,7 +66,6 @@ NetEqTest::NetEqTest(const NetEq::Config& config,
|
||||
RTC_CHECK(!config.enable_muted_state)
|
||||
<< "The code does not handle enable_muted_state";
|
||||
RegisterDecoders(codecs);
|
||||
RegisterExternalDecoders(ext_codecs);
|
||||
}
|
||||
|
||||
NetEqTest::~NetEqTest() = default;
|
||||
@ -322,16 +320,5 @@ void NetEqTest::RegisterDecoders(const DecoderMap& codecs) {
|
||||
}
|
||||
}
|
||||
|
||||
void NetEqTest::RegisterExternalDecoders(const ExtDecoderMap& codecs) {
|
||||
for (const auto& c : codecs) {
|
||||
RTC_CHECK_EQ(
|
||||
neteq_->RegisterExternalDecoder(c.second.decoder, c.second.codec,
|
||||
c.second.codec_name, c.first),
|
||||
NetEq::kOK)
|
||||
<< "Cannot register " << c.second.codec_name << " to payload type "
|
||||
<< c.first;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
@ -69,14 +69,6 @@ class NetEqTest : public NetEqSimulator {
|
||||
public:
|
||||
using DecoderMap = std::map<int, std::pair<NetEqDecoder, std::string> >;
|
||||
|
||||
struct ExternalDecoderInfo {
|
||||
AudioDecoder* decoder;
|
||||
NetEqDecoder codec;
|
||||
std::string codec_name;
|
||||
};
|
||||
|
||||
using ExtDecoderMap = std::map<int, ExternalDecoderInfo>;
|
||||
|
||||
struct Callbacks {
|
||||
NetEqTestErrorCallback* error_callback = nullptr;
|
||||
NetEqPostInsertPacket* post_insert_packet = nullptr;
|
||||
@ -89,7 +81,6 @@ class NetEqTest : public NetEqSimulator {
|
||||
NetEqTest(const NetEq::Config& config,
|
||||
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory,
|
||||
const DecoderMap& codecs,
|
||||
const ExtDecoderMap& ext_codecs,
|
||||
std::unique_ptr<std::ofstream> text_log,
|
||||
std::unique_ptr<NetEqInput> input,
|
||||
std::unique_ptr<AudioSink> output,
|
||||
@ -115,7 +106,6 @@ class NetEqTest : public NetEqSimulator {
|
||||
|
||||
private:
|
||||
void RegisterDecoders(const DecoderMap& codecs);
|
||||
void RegisterExternalDecoders(const ExtDecoderMap& codecs);
|
||||
absl::optional<Action> next_action_;
|
||||
absl::optional<int> last_packet_time_ms_;
|
||||
std::unique_ptr<NetEq> neteq_;
|
||||
|
@ -500,10 +500,9 @@ std::unique_ptr<NetEqTest> NetEqTestFactory::InitializeTest(
|
||||
config.sample_rate_hz = *sample_rate_hz;
|
||||
config.max_packets_in_buffer = FLAG_max_nr_packets_in_buffer;
|
||||
config.enable_fast_accelerate = FLAG_enable_fast_accelerate;
|
||||
NetEqTest::ExtDecoderMap ext_codecs;
|
||||
return absl::make_unique<NetEqTest>(
|
||||
config, decoder_factory, codecs, ext_codecs, std::move(text_log),
|
||||
std::move(input), std::move(output), callbacks);
|
||||
return absl::make_unique<NetEqTest>(config, decoder_factory, codecs,
|
||||
std::move(text_log), std::move(input),
|
||||
std::move(output), callbacks);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
Reference in New Issue
Block a user