#include "modules/audio_coding/neteq/decoder_database.h"
#include <stddef.h>
#include <cstdint>
#include <list>
#include <type_traits>
#include <utility>
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "api/audio_codecs/audio_decoder.h"
#include "api/environment/environment.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/audio_format_to_string.h"
namespace webrtc {
DecoderDatabase::DecoderDatabase(
const Environment& env,
scoped_refptr<AudioDecoderFactory> decoder_factory,
absl::optional<AudioCodecPairId> codec_pair_id)
: … { … }
DecoderDatabase::~DecoderDatabase() = default;
DecoderDatabase::DecoderInfo::DecoderInfo(
const Environment& env,
const SdpAudioFormat& audio_format,
absl::optional<AudioCodecPairId> codec_pair_id,
AudioDecoderFactory* factory)
: … { … }
DecoderDatabase::DecoderInfo::DecoderInfo(DecoderInfo&&) = default;
DecoderDatabase::DecoderInfo::~DecoderInfo() = default;
AudioDecoder* DecoderDatabase::DecoderInfo::GetDecoder() const { … }
bool DecoderDatabase::DecoderInfo::IsType(absl::string_view name) const { … }
absl::optional<DecoderDatabase::DecoderInfo::CngDecoder>
DecoderDatabase::DecoderInfo::CngDecoder::Create(const SdpAudioFormat& format) { … }
DecoderDatabase::DecoderInfo::Subtype
DecoderDatabase::DecoderInfo::SubtypeFromFormat(const SdpAudioFormat& format) { … }
bool DecoderDatabase::Empty() const { … }
int DecoderDatabase::Size() const { … }
std::vector<int> DecoderDatabase::SetCodecs(
const std::map<int, SdpAudioFormat>& codecs) { … }
int DecoderDatabase::RegisterPayload(int rtp_payload_type,
const SdpAudioFormat& audio_format) { … }
int DecoderDatabase::Remove(uint8_t rtp_payload_type) { … }
void DecoderDatabase::RemoveAll() { … }
const DecoderDatabase::DecoderInfo* DecoderDatabase::GetDecoderInfo(
uint8_t rtp_payload_type) const { … }
int DecoderDatabase::SetActiveDecoder(uint8_t rtp_payload_type,
bool* new_decoder) { … }
AudioDecoder* DecoderDatabase::GetActiveDecoder() const { … }
int DecoderDatabase::SetActiveCngDecoder(uint8_t rtp_payload_type) { … }
ComfortNoiseDecoder* DecoderDatabase::GetActiveCngDecoder() const { … }
AudioDecoder* DecoderDatabase::GetDecoder(uint8_t rtp_payload_type) const { … }
bool DecoderDatabase::IsComfortNoise(uint8_t rtp_payload_type) const { … }
bool DecoderDatabase::IsDtmf(uint8_t rtp_payload_type) const { … }
bool DecoderDatabase::IsRed(uint8_t rtp_payload_type) const { … }
int DecoderDatabase::CheckPayloadTypes(const PacketList& packet_list) const { … }
}