Delete enum NetEqDecoder.

A trimmed down version is moved to legacy_encoded_audio_frame_unittest.cc
where it's used for test parameterization.

Bug: webrtc:10185
Change-Id: I9abda22f9806b831b6ca4b27d6bcc888285f50f2
Reviewed-on: https://webrtc-review.googlesource.com/c/116961
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26218}
This commit is contained in:
Niels Möller
2019-01-11 09:36:13 +01:00
committed by Commit Bot
parent 6c4b1b7ade
commit 7289906437
13 changed files with 61 additions and 264 deletions

View File

@ -42,7 +42,6 @@ rtc_static_library("audio_coding") {
deps = [
":audio_coding_module_typedefs",
":neteq",
":neteq_decoder_enum",
"..:module_api",
"..:module_api_public",
"../..:webrtc_common",
@ -907,18 +906,6 @@ rtc_static_library("audio_network_adaptor") {
}
}
rtc_source_set("neteq_decoder_enum") {
sources = [
"neteq/neteq_decoder_enum.cc",
"neteq/neteq_decoder_enum.h",
]
deps = [
"../../api/audio_codecs:audio_codecs_api",
"../../rtc_base:rtc_base_approved",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_static_library("neteq") {
visibility += webrtc_default_visibility
sources = [
@ -991,7 +978,6 @@ rtc_static_library("neteq") {
deps = [
":audio_coding_module_typedefs",
":neteq_decoder_enum",
":webrtc_cng",
"..:module_api",
"..:module_api_public",
@ -2028,7 +2014,6 @@ if (rtc_include_tests) {
":legacy_encoded_audio_frame",
":mocks",
":neteq",
":neteq_decoder_enum",
":neteq_test_support",
":neteq_test_tools",
":pcm16b",

View File

@ -21,7 +21,6 @@
#include "modules/audio_coding/acm2/acm_resampler.h"
#include "modules/audio_coding/acm2/call_statistics.h"
#include "modules/audio_coding/neteq/include/neteq.h"
#include "modules/audio_coding/neteq/neteq_decoder_enum.h"
#include "modules/include/module_common_types.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

View File

@ -10,12 +10,28 @@
#include "modules/audio_coding/codecs/legacy_encoded_audio_frame.h"
#include "modules/audio_coding/neteq/neteq_decoder_enum.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "test/gtest.h"
namespace webrtc {
enum class NetEqDecoder {
kDecoderPCMu,
kDecoderPCMa,
kDecoderPCMu_2ch,
kDecoderPCMa_2ch,
kDecoderPCM16B,
kDecoderPCM16Bwb,
kDecoderPCM16Bswb32kHz,
kDecoderPCM16Bswb48kHz,
kDecoderPCM16B_2ch,
kDecoderPCM16Bwb_2ch,
kDecoderPCM16Bswb32kHz_2ch,
kDecoderPCM16Bswb48kHz_2ch,
kDecoderPCM16B_5ch,
kDecoderG722,
};
class SplitBySamplesTest : public ::testing::TestWithParam<NetEqDecoder> {
protected:
virtual void SetUp() {

View File

@ -52,12 +52,6 @@ DecoderDatabase::DecoderInfo::DecoderInfo(
AudioDecoderFactory* factory)
: DecoderInfo(audio_format, codec_pair_id, factory, audio_format.name) {}
DecoderDatabase::DecoderInfo::DecoderInfo(
NetEqDecoder ct,
absl::optional<AudioCodecPairId> codec_pair_id,
AudioDecoderFactory* factory)
: DecoderInfo(*NetEqDecoderToSdpAudioFormat(ct), codec_pair_id, factory) {}
DecoderDatabase::DecoderInfo::DecoderInfo(DecoderInfo&&) = default;
DecoderDatabase::DecoderInfo::~DecoderInfo() = default;

View File

@ -18,7 +18,6 @@
#include "api/audio_codecs/audio_decoder_factory.h"
#include "api/audio_codecs/audio_format.h"
#include "modules/audio_coding/codecs/cng/webrtc_cng.h"
#include "modules/audio_coding/neteq/neteq_decoder_enum.h"
#include "modules/audio_coding/neteq/packet.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/scoped_ref_ptr.h"
@ -47,9 +46,6 @@ class DecoderDatabase {
explicit DecoderInfo(const SdpAudioFormat& audio_format,
absl::optional<AudioCodecPairId> codec_pair_id,
AudioDecoderFactory* factory = nullptr);
explicit DecoderInfo(NetEqDecoder ct,
absl::optional<AudioCodecPairId> codec_pair_id,
AudioDecoderFactory* factory = nullptr);
DecoderInfo(DecoderInfo&&);
~DecoderInfo();

View File

@ -13,15 +13,16 @@
#include <string.h> // Provide access to size_t.
#include <map>
#include <string>
#include <vector>
#include "absl/types/optional.h"
#include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_format.h"
#include "api/rtp_headers.h"
#include "modules/audio_coding/neteq/defines.h"
#include "modules/audio_coding/neteq/neteq_decoder_enum.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/scoped_ref_ptr.h"

View File

@ -1,85 +0,0 @@
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <map>
#include <string>
#include "modules/audio_coding/neteq/neteq_decoder_enum.h"
namespace webrtc {
absl::optional<SdpAudioFormat> NetEqDecoderToSdpAudioFormat(NetEqDecoder nd) {
switch (nd) {
case NetEqDecoder::kDecoderPCMu:
return SdpAudioFormat("pcmu", 8000, 1);
case NetEqDecoder::kDecoderPCMa:
return SdpAudioFormat("pcma", 8000, 1);
case NetEqDecoder::kDecoderPCMu_2ch:
return SdpAudioFormat("pcmu", 8000, 2);
case NetEqDecoder::kDecoderPCMa_2ch:
return SdpAudioFormat("pcma", 8000, 2);
case NetEqDecoder::kDecoderILBC:
return SdpAudioFormat("ilbc", 8000, 1);
case NetEqDecoder::kDecoderISAC:
return SdpAudioFormat("isac", 16000, 1);
case NetEqDecoder::kDecoderISACswb:
return SdpAudioFormat("isac", 32000, 1);
case NetEqDecoder::kDecoderPCM16B:
return SdpAudioFormat("l16", 8000, 1);
case NetEqDecoder::kDecoderPCM16Bwb:
return SdpAudioFormat("l16", 16000, 1);
case NetEqDecoder::kDecoderPCM16Bswb32kHz:
return SdpAudioFormat("l16", 32000, 1);
case NetEqDecoder::kDecoderPCM16Bswb48kHz:
return SdpAudioFormat("l16", 48000, 1);
case NetEqDecoder::kDecoderPCM16B_2ch:
return SdpAudioFormat("l16", 8000, 2);
case NetEqDecoder::kDecoderPCM16Bwb_2ch:
return SdpAudioFormat("l16", 16000, 2);
case NetEqDecoder::kDecoderPCM16Bswb32kHz_2ch:
return SdpAudioFormat("l16", 32000, 2);
case NetEqDecoder::kDecoderPCM16Bswb48kHz_2ch:
return SdpAudioFormat("l16", 48000, 2);
case NetEqDecoder::kDecoderPCM16B_5ch:
return SdpAudioFormat("l16", 8000, 5);
case NetEqDecoder::kDecoderG722:
return SdpAudioFormat("g722", 8000, 1);
case NetEqDecoder::kDecoderG722_2ch:
return SdpAudioFormat("g722", 8000, 2);
case NetEqDecoder::kDecoderOpus:
return SdpAudioFormat("opus", 48000, 2);
case NetEqDecoder::kDecoderOpus_2ch:
return SdpAudioFormat(
"opus", 48000, 2,
std::map<std::string, std::string>{{"stereo", "1"}});
case NetEqDecoder::kDecoderRED:
return SdpAudioFormat("red", 8000, 1);
case NetEqDecoder::kDecoderAVT:
return SdpAudioFormat("telephone-event", 8000, 1);
case NetEqDecoder::kDecoderAVT16kHz:
return SdpAudioFormat("telephone-event", 16000, 1);
case NetEqDecoder::kDecoderAVT32kHz:
return SdpAudioFormat("telephone-event", 32000, 1);
case NetEqDecoder::kDecoderAVT48kHz:
return SdpAudioFormat("telephone-event", 48000, 1);
case NetEqDecoder::kDecoderCNGnb:
return SdpAudioFormat("cn", 8000, 1);
case NetEqDecoder::kDecoderCNGwb:
return SdpAudioFormat("cn", 16000, 1);
case NetEqDecoder::kDecoderCNGswb32kHz:
return SdpAudioFormat("cn", 32000, 1);
case NetEqDecoder::kDecoderCNGswb48kHz:
return SdpAudioFormat("cn", 48000, 1);
default:
return absl::nullopt;
}
}
} // namespace webrtc

View File

@ -1,57 +0,0 @@
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef MODULES_AUDIO_CODING_NETEQ_NETEQ_DECODER_ENUM_H_
#define MODULES_AUDIO_CODING_NETEQ_NETEQ_DECODER_ENUM_H_
#include "absl/types/optional.h"
#include "api/audio_codecs/audio_format.h"
namespace webrtc {
// TODO(bugs.webrtc.org/10080): Delete, together with RegisterExternalDecoder.
enum class NetEqDecoder {
kDecoderPCMu,
kDecoderPCMa,
kDecoderPCMu_2ch,
kDecoderPCMa_2ch,
kDecoderILBC,
kDecoderISAC,
kDecoderISACswb,
kDecoderPCM16B,
kDecoderPCM16Bwb,
kDecoderPCM16Bswb32kHz,
kDecoderPCM16Bswb48kHz,
kDecoderPCM16B_2ch,
kDecoderPCM16Bwb_2ch,
kDecoderPCM16Bswb32kHz_2ch,
kDecoderPCM16Bswb48kHz_2ch,
kDecoderPCM16B_5ch,
kDecoderG722,
kDecoderG722_2ch,
kDecoderRED,
kDecoderAVT,
kDecoderAVT16kHz,
kDecoderAVT32kHz,
kDecoderAVT48kHz,
kDecoderCNGnb,
kDecoderCNGwb,
kDecoderCNGswb32kHz,
kDecoderCNGswb48kHz,
kDecoderArbitrary,
kDecoderOpus,
kDecoderOpus_2ch,
};
absl::optional<SdpAudioFormat> NetEqDecoderToSdpAudioFormat(NetEqDecoder nd);
} // namespace webrtc
#endif // MODULES_AUDIO_CODING_NETEQ_NETEQ_DECODER_ENUM_H_

View File

@ -331,8 +331,8 @@ TEST_F(NetEqImplTest, InsertPacket) {
*dec = std::move(mock_decoder);
}));
DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, absl::nullopt,
mock_decoder_factory);
DecoderDatabase::DecoderInfo info(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, mock_decoder_factory);
// Expectations for decoder database.
EXPECT_CALL(*mock_decoder_database_, GetDecoderInfo(kPayloadType))

View File

@ -258,7 +258,6 @@ class NetEqDecodingTest : public ::testing::Test {
NetEqDecodingTest();
virtual void SetUp();
virtual void TearDown();
void SelectDecoders(NetEqDecoder* used_codec);
void OpenInputFile(const std::string& rtp_file);
void Process();

View File

@ -175,7 +175,7 @@ TEST(PacketBuffer, InsertPacketList) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info));
@ -220,11 +220,11 @@ TEST(PacketBuffer, InsertPacketListChangePayloadType) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info0(NetEqDecoder::kDecoderPCMu,
const DecoderDatabase::DecoderInfo info0(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info0));
const DecoderDatabase::DecoderInfo info1(NetEqDecoder::kDecoderPCMa,
const DecoderDatabase::DecoderInfo info1(SdpAudioFormat("pcma", 8000, 1),
absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(1))
.WillRepeatedly(Return(&info1));
@ -407,7 +407,7 @@ TEST(PacketBuffer, Reordering) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info));
@ -447,12 +447,12 @@ TEST(PacketBuffer, CngFirstThenSpeechWithNewSampleRate) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info_cng(NetEqDecoder::kDecoderCNGnb,
const DecoderDatabase::DecoderInfo info_cng(SdpAudioFormat("cn", 8000, 1),
absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(kCngPt))
.WillRepeatedly(Return(&info_cng));
const DecoderDatabase::DecoderInfo info_speech(NetEqDecoder::kDecoderPCM16Bwb,
absl::nullopt, factory);
const DecoderDatabase::DecoderInfo info_speech(
SdpAudioFormat("l16", 16000, 1), absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(kSpeechPt))
.WillRepeatedly(Return(&info_speech));
@ -549,7 +549,7 @@ TEST(PacketBuffer, Failures) {
list.push_back(gen.NextPacket(payload_len)); // Valid packet.
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info));

View File

@ -25,7 +25,7 @@ TEST(TimestampScaler, TestNoScaling) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use PCMu, because it doesn't use scaled timestamps.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 0;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -47,7 +47,7 @@ TEST(TimestampScaler, TestNoScalingLargeStep) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use PCMu, because it doesn't use scaled timestamps.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("pcmu", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 0;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -74,7 +74,7 @@ TEST(TimestampScaler, TestG722) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use G722, which has a factor 2 scaling.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("g722", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -100,7 +100,7 @@ TEST(TimestampScaler, TestG722LargeStep) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use G722, which has a factor 2 scaling.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("g722", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -130,9 +130,9 @@ TEST(TimestampScaler, TestG722WithCng) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use G722, which has a factor 2 scaling.
const DecoderDatabase::DecoderInfo info_g722(NetEqDecoder::kDecoderG722,
const DecoderDatabase::DecoderInfo info_g722(SdpAudioFormat("g722", 8000, 1),
absl::nullopt, factory);
const DecoderDatabase::DecoderInfo info_cng(NetEqDecoder::kDecoderCNGwb,
const DecoderDatabase::DecoderInfo info_cng(SdpAudioFormat("cn", 16000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadTypeG722 = 17;
static const uint8_t kRtpPayloadTypeCng = 13;
@ -174,7 +174,7 @@ TEST(TimestampScaler, TestG722Packet) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use G722, which has a factor 2 scaling.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("g722", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -204,7 +204,7 @@ TEST(TimestampScaler, TestG722PacketList) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use G722, which has a factor 2 scaling.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("g722", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -238,7 +238,7 @@ TEST(TimestampScaler, TestG722Reset) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
// Use G722, which has a factor 2 scaling.
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("g722", 8000, 1),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
@ -279,7 +279,7 @@ TEST(TimestampScaler, TestG722Reset) {
TEST(TimestampScaler, TestOpusLargeStep) {
MockDecoderDatabase db;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderOpus,
const DecoderDatabase::DecoderInfo info(SdpAudioFormat("opus", 48000, 2),
absl::nullopt, factory);
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))

View File

@ -154,82 +154,31 @@ WEBRTC_DEFINE_bool(enable_fast_accelerate,
false,
"Enables jitter buffer fast accelerate");
// Maps a codec type to a printable name string.
std::string CodecName(NetEqDecoder codec) {
switch (codec) {
case NetEqDecoder::kDecoderPCMu:
return "PCM-u";
case NetEqDecoder::kDecoderPCMa:
return "PCM-a";
case NetEqDecoder::kDecoderILBC:
return "iLBC";
case NetEqDecoder::kDecoderISAC:
return "iSAC";
case NetEqDecoder::kDecoderISACswb:
return "iSAC-swb (32 kHz)";
case NetEqDecoder::kDecoderOpus:
return "Opus";
case NetEqDecoder::kDecoderPCM16B:
return "PCM16b-nb (8 kHz)";
case NetEqDecoder::kDecoderPCM16Bwb:
return "PCM16b-wb (16 kHz)";
case NetEqDecoder::kDecoderPCM16Bswb32kHz:
return "PCM16b-swb32 (32 kHz)";
case NetEqDecoder::kDecoderPCM16Bswb48kHz:
return "PCM16b-swb48 (48 kHz)";
case NetEqDecoder::kDecoderG722:
return "G.722";
case NetEqDecoder::kDecoderRED:
return "redundant audio (RED)";
case NetEqDecoder::kDecoderAVT:
return "AVT/DTMF (8 kHz)";
case NetEqDecoder::kDecoderAVT16kHz:
return "AVT/DTMF (16 kHz)";
case NetEqDecoder::kDecoderAVT32kHz:
return "AVT/DTMF (32 kHz)";
case NetEqDecoder::kDecoderAVT48kHz:
return "AVT/DTMF (48 kHz)";
case NetEqDecoder::kDecoderCNGnb:
return "comfort noise (8 kHz)";
case NetEqDecoder::kDecoderCNGwb:
return "comfort noise (16 kHz)";
case NetEqDecoder::kDecoderCNGswb32kHz:
return "comfort noise (32 kHz)";
case NetEqDecoder::kDecoderCNGswb48kHz:
return "comfort noise (48 kHz)";
default:
FATAL();
return "undefined";
}
}
void PrintCodecMappingEntry(NetEqDecoder codec, int flag) {
std::cout << CodecName(codec) << ": " << flag << std::endl;
void PrintCodecMappingEntry(const char* codec, int flag) {
std::cout << codec << ": " << flag << std::endl;
}
void PrintCodecMapping() {
PrintCodecMappingEntry(NetEqDecoder::kDecoderPCMu, FLAG_pcmu);
PrintCodecMappingEntry(NetEqDecoder::kDecoderPCMa, FLAG_pcma);
PrintCodecMappingEntry(NetEqDecoder::kDecoderILBC, FLAG_ilbc);
PrintCodecMappingEntry(NetEqDecoder::kDecoderISAC, FLAG_isac);
PrintCodecMappingEntry(NetEqDecoder::kDecoderISACswb, FLAG_isac_swb);
PrintCodecMappingEntry(NetEqDecoder::kDecoderOpus, FLAG_opus);
PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16B, FLAG_pcm16b);
PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16Bwb, FLAG_pcm16b_wb);
PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16Bswb32kHz,
FLAG_pcm16b_swb32);
PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16Bswb48kHz,
FLAG_pcm16b_swb48);
PrintCodecMappingEntry(NetEqDecoder::kDecoderG722, FLAG_g722);
PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT, FLAG_avt);
PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT16kHz, FLAG_avt_16);
PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT32kHz, FLAG_avt_32);
PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT48kHz, FLAG_avt_48);
PrintCodecMappingEntry(NetEqDecoder::kDecoderRED, FLAG_red);
PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGnb, FLAG_cn_nb);
PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGwb, FLAG_cn_wb);
PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGswb32kHz, FLAG_cn_swb32);
PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGswb48kHz, FLAG_cn_swb48);
PrintCodecMappingEntry("PCM-u", FLAG_pcmu);
PrintCodecMappingEntry("PCM-a", FLAG_pcma);
PrintCodecMappingEntry("iLBC", FLAG_ilbc);
PrintCodecMappingEntry("iSAC", FLAG_isac);
PrintCodecMappingEntry("iSAC-swb (32 kHz)", FLAG_isac_swb);
PrintCodecMappingEntry("Opus", FLAG_opus);
PrintCodecMappingEntry("PCM16b-nb (8 kHz)", FLAG_pcm16b);
PrintCodecMappingEntry("PCM16b-wb (16 kHz)", FLAG_pcm16b_wb);
PrintCodecMappingEntry("PCM16b-swb32 (32 kHz)", FLAG_pcm16b_swb32);
PrintCodecMappingEntry("PCM16b-swb48 (48 kHz)", FLAG_pcm16b_swb48);
PrintCodecMappingEntry("G.722", FLAG_g722);
PrintCodecMappingEntry("AVT/DTMF (8 kHz)", FLAG_avt);
PrintCodecMappingEntry("AVT/DTMF (16 kHz)", FLAG_avt_16);
PrintCodecMappingEntry("AVT/DTMF (32 kHz)", FLAG_avt_32);
PrintCodecMappingEntry("AVT/DTMF (48 kHz)", FLAG_avt_48);
PrintCodecMappingEntry("redundant audio (RED)", FLAG_red);
PrintCodecMappingEntry("comfort noise (8 kHz)", FLAG_cn_nb);
PrintCodecMappingEntry("comfort noise (16 kHz)", FLAG_cn_wb);
PrintCodecMappingEntry("comfort noise (32 kHz)", FLAG_cn_swb32);
PrintCodecMappingEntry("comfort noise (48 kHz)", FLAG_cn_swb48);
}
absl::optional<int> CodecSampleRate(uint8_t payload_type) {