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

@ -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))