#include "modules/audio_coding/neteq/tools/neteq_test.h"
#include <iomanip>
#include <iostream>
#include "api/environment/environment.h"
#include "api/environment/environment_factory.h"
#include "api/field_trials.h"
#include "api/units/timestamp.h"
#include "modules/audio_coding/neteq/default_neteq_factory.h"
#include "modules/rtp_rtcp/source/byte_io.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
namespace test {
namespace {
absl::optional<NetEq::Operation> ActionToOperations(
absl::optional<NetEqSimulator::Action> a) { … }
std::unique_ptr<NetEq> CreateNetEq(
const Environment& env,
const NetEq::Config& config,
scoped_refptr<AudioDecoderFactory> decoder_factory) { … }
}
void DefaultNetEqTestErrorCallback::OnInsertPacketError(
const NetEqInput::PacketData& packet) { … }
void DefaultNetEqTestErrorCallback::OnGetAudioError() { … }
NetEqTest::NetEqTest(const NetEq::Config& config,
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory,
const DecoderMap& codecs,
std::unique_ptr<std::ofstream> text_log,
NetEqFactory* neteq_factory,
std::unique_ptr<NetEqInput> input,
std::unique_ptr<AudioSink> output,
Callbacks callbacks,
absl::string_view field_trials)
: … { … }
NetEqTest::~NetEqTest() = default;
int64_t NetEqTest::Run() { … }
NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() { … }
void NetEqTest::SetNextAction(NetEqTest::Action next_operation) { … }
NetEqTest::NetEqState NetEqTest::GetNetEqState() { … }
NetEqNetworkStatistics NetEqTest::SimulationStats() { … }
NetEqLifetimeStatistics NetEqTest::LifetimeStats() const { … }
NetEqTest::DecoderMap NetEqTest::StandardDecoderMap() { … }
void NetEqTest::RegisterDecoders(const DecoderMap& codecs) { … }
}
}