Make an enum class out of NetEqDecoder, and hide the neteq_decoders_ table
This operation was relatively simple, since no one was doing anything fishy with this enum. A large number of lines had to be changed because the enum values now live in their own namespace, but this is arguably worth it since it is now much clearer what sort of constant they are. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1424083002 Cr-Commit-Position: refs/heads/master@{#10449}
This commit is contained in:
@ -24,7 +24,8 @@ namespace webrtc {
|
||||
TEST(TimestampScaler, TestNoScaling) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderPCMu; // Does not use scaled timestamps.
|
||||
info.codec_type =
|
||||
NetEqDecoder::kDecoderPCMu; // Does not use scaled timestamps.
|
||||
static const uint8_t kRtpPayloadType = 0;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -44,7 +45,8 @@ TEST(TimestampScaler, TestNoScaling) {
|
||||
TEST(TimestampScaler, TestNoScalingLargeStep) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderPCMu; // Does not use scaled timestamps.
|
||||
info.codec_type =
|
||||
NetEqDecoder::kDecoderPCMu; // Does not use scaled timestamps.
|
||||
static const uint8_t kRtpPayloadType = 0;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -69,7 +71,7 @@ TEST(TimestampScaler, TestNoScalingLargeStep) {
|
||||
TEST(TimestampScaler, TestG722) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderG722; // Uses a factor 2 scaling.
|
||||
info.codec_type = NetEqDecoder::kDecoderG722; // Uses a factor 2 scaling.
|
||||
static const uint8_t kRtpPayloadType = 17;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -93,7 +95,7 @@ TEST(TimestampScaler, TestG722) {
|
||||
TEST(TimestampScaler, TestG722LargeStep) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderG722; // Uses a factor 2 scaling.
|
||||
info.codec_type = NetEqDecoder::kDecoderG722; // Uses a factor 2 scaling.
|
||||
static const uint8_t kRtpPayloadType = 17;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -121,8 +123,9 @@ TEST(TimestampScaler, TestG722LargeStep) {
|
||||
TEST(TimestampScaler, TestG722WithCng) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info_g722, info_cng;
|
||||
info_g722.codec_type = kDecoderG722; // Uses a factor 2 scaling.
|
||||
info_cng.codec_type = kDecoderCNGwb;
|
||||
info_g722.codec_type =
|
||||
NetEqDecoder::kDecoderG722; // Uses a factor 2 scaling.
|
||||
info_cng.codec_type = NetEqDecoder::kDecoderCNGwb;
|
||||
static const uint8_t kRtpPayloadTypeG722 = 17;
|
||||
static const uint8_t kRtpPayloadTypeCng = 13;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadTypeG722))
|
||||
@ -162,7 +165,8 @@ TEST(TimestampScaler, TestG722WithCng) {
|
||||
TEST(TimestampScaler, TestG722Packet) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderG722; // Does uses a factor 2 scaling.
|
||||
info.codec_type =
|
||||
NetEqDecoder::kDecoderG722; // Does uses a factor 2 scaling.
|
||||
static const uint8_t kRtpPayloadType = 17;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -190,7 +194,7 @@ TEST(TimestampScaler, TestG722Packet) {
|
||||
TEST(TimestampScaler, TestG722PacketList) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderG722; // Uses a factor 2 scaling.
|
||||
info.codec_type = NetEqDecoder::kDecoderG722; // Uses a factor 2 scaling.
|
||||
static const uint8_t kRtpPayloadType = 17;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -219,7 +223,7 @@ TEST(TimestampScaler, TestG722PacketList) {
|
||||
TEST(TimestampScaler, TestG722Reset) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderG722; // Uses a factor 2 scaling.
|
||||
info.codec_type = NetEqDecoder::kDecoderG722; // Uses a factor 2 scaling.
|
||||
static const uint8_t kRtpPayloadType = 17;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
@ -259,7 +263,7 @@ TEST(TimestampScaler, TestG722Reset) {
|
||||
TEST(TimestampScaler, TestOpusLargeStep) {
|
||||
MockDecoderDatabase db;
|
||||
DecoderDatabase::DecoderInfo info;
|
||||
info.codec_type = kDecoderOpus;
|
||||
info.codec_type = NetEqDecoder::kDecoderOpus;
|
||||
static const uint8_t kRtpPayloadType = 17;
|
||||
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
|
||||
.WillRepeatedly(Return(&info));
|
||||
|
||||
Reference in New Issue
Block a user