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:
@ -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