#include "modules/audio_coding/include/audio_coding_module.h"
#include <algorithm>
#include <cstdint>
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "api/array_view.h"
#include "modules/audio_coding/acm2/acm_remixing.h"
#include "modules/audio_coding/acm2/acm_resampler.h"
#include "modules/include/module_common_types.h"
#include "modules/include/module_common_types_public.h"
#include "rtc_base/buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
#include "system_wrappers/include/metrics.h"
namespace webrtc {
namespace {
constexpr size_t kInitialInputDataBufferSize = …;
constexpr int32_t kMaxInputSampleRateHz = …;
class AudioCodingModuleImpl final : public AudioCodingModule { … };
void UpdateCodecTypeHistogram(size_t codec_type) { … }
void AudioCodingModuleImpl::ChangeLogger::MaybeLog(int value) { … }
AudioCodingModuleImpl::AudioCodingModuleImpl()
: … { … }
AudioCodingModuleImpl::~AudioCodingModuleImpl() = default;
int32_t AudioCodingModuleImpl::Encode(
const InputData& input_data,
absl::optional<int64_t> absolute_capture_timestamp_ms) { … }
void AudioCodingModuleImpl::ModifyEncoder(
rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) { … }
int AudioCodingModuleImpl::RegisterTransportCallback(
AudioPacketizationCallback* transport) { … }
int AudioCodingModuleImpl::Add10MsData(const AudioFrame& audio_frame) { … }
int AudioCodingModuleImpl::Add10MsDataInternal(const AudioFrame& audio_frame,
InputData* input_data) { … }
int AudioCodingModuleImpl::PreprocessToAddData(const AudioFrame& in_frame,
const AudioFrame** ptr_out) { … }
int AudioCodingModuleImpl::SetPacketLossRate(int loss_rate) { … }
bool AudioCodingModuleImpl::HaveValidEncoder(
absl::string_view caller_name) const { … }
ANAStats AudioCodingModuleImpl::GetANAStats() const { … }
int AudioCodingModuleImpl::GetTargetBitrate() const { … }
}
std::unique_ptr<AudioCodingModule> AudioCodingModule::Create() { … }
}