Stopped using the NetEqDecoder enum internally in NetEq.

NetEqDecoder is still used in the external interfaces, but this change
opens up the ability to use SdpAudioFormats directly, once appropriate
interfaces have been added.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2355503002
Cr-Commit-Position: refs/heads/master@{#14368}
This commit is contained in:
ossu
2016-09-23 02:19:43 -07:00
committed by Commit bot
parent 1490f7aa55
commit f1b08da5b4
17 changed files with 149 additions and 179 deletions

View File

@ -174,8 +174,7 @@ TEST(PacketBuffer, InsertPacketList) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "",
factory);
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info));
rtc::Optional<uint8_t> current_pt;
@ -218,12 +217,10 @@ TEST(PacketBuffer, InsertPacketListChangePayloadType) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info0(NetEqDecoder::kDecoderPCMu, "",
factory);
const DecoderDatabase::DecoderInfo info0(NetEqDecoder::kDecoderPCMu, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info0));
const DecoderDatabase::DecoderInfo info1(NetEqDecoder::kDecoderPCMa, "",
factory);
const DecoderDatabase::DecoderInfo info1(NetEqDecoder::kDecoderPCMa, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(1))
.WillRepeatedly(Return(&info1));
rtc::Optional<uint8_t> current_pt;
@ -356,8 +353,7 @@ TEST(PacketBuffer, Reordering) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "",
factory);
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info));
rtc::Optional<uint8_t> current_pt;
@ -396,12 +392,12 @@ TEST(PacketBuffer, CngFirstThenSpeechWithNewSampleRate) {
MockDecoderDatabase decoder_database;
auto factory = CreateBuiltinAudioDecoderFactory();
const DecoderDatabase::DecoderInfo info_cng(NetEqDecoder::kDecoderCNGnb, "",
const DecoderDatabase::DecoderInfo info_cng(NetEqDecoder::kDecoderCNGnb,
factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(kCngPt))
.WillRepeatedly(Return(&info_cng));
const DecoderDatabase::DecoderInfo info_speech(NetEqDecoder::kDecoderPCM16Bwb,
"", factory);
factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(kSpeechPt))
.WillRepeatedly(Return(&info_speech));
@ -490,8 +486,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, "",
factory);
const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, factory);
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
.WillRepeatedly(Return(&info));
rtc::Optional<uint8_t> current_pt;