Index: webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc |
diff --git a/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc b/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc |
index 91e1342c704079d85c41ad02205e2dfadb5c7ca3..a136bdfc0704a7187d76eb16962079fb9c0481ba 100644 |
--- a/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc |
+++ b/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc |
@@ -12,6 +12,7 @@ |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" |
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h" |
#include "webrtc/modules/audio_coding/neteq/packet.h" |
@@ -23,8 +24,11 @@ namespace webrtc { |
TEST(TimestampScaler, TestNoScaling) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
kwiberg-webrtc
2016/08/26 09:07:53
Consider using auto in cases like this. You have a
ossu
2016/08/26 09:22:33
Do big, scary types frighten you? :)
Yeah, alright
ossu
2016/08/26 11:20:51
Done.
|
// Use PCMu, because it doesn't use scaled timestamps. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 0; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -43,8 +47,11 @@ TEST(TimestampScaler, TestNoScaling) { |
TEST(TimestampScaler, TestNoScalingLargeStep) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use PCMu, because it doesn't use scaled timestamps. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 0; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -68,8 +75,11 @@ TEST(TimestampScaler, TestNoScalingLargeStep) { |
TEST(TimestampScaler, TestG722) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use G722, which has a factor 2 scaling. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 17; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -92,8 +102,11 @@ TEST(TimestampScaler, TestG722) { |
TEST(TimestampScaler, TestG722LargeStep) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use G722, which has a factor 2 scaling. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 17; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -120,9 +133,13 @@ TEST(TimestampScaler, TestG722LargeStep) { |
TEST(TimestampScaler, TestG722WithCng) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use G722, which has a factor 2 scaling. |
- const DecoderDatabase::DecoderInfo info_g722(NetEqDecoder::kDecoderG722, ""); |
- const DecoderDatabase::DecoderInfo info_cng(NetEqDecoder::kDecoderCNGwb, ""); |
+ const DecoderDatabase::DecoderInfo info_g722(NetEqDecoder::kDecoderG722, "", |
+ factory); |
+ const DecoderDatabase::DecoderInfo info_cng(NetEqDecoder::kDecoderCNGwb, "", |
+ factory); |
static const uint8_t kRtpPayloadTypeG722 = 17; |
static const uint8_t kRtpPayloadTypeCng = 13; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadTypeG722)) |
@@ -161,8 +178,11 @@ TEST(TimestampScaler, TestG722WithCng) { |
// as many tests here. |
TEST(TimestampScaler, TestG722Packet) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use G722, which has a factor 2 scaling. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 17; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -189,8 +209,11 @@ TEST(TimestampScaler, TestG722Packet) { |
// we are not doing as many tests here. |
TEST(TimestampScaler, TestG722PacketList) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use G722, which has a factor 2 scaling. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 17; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -218,8 +241,11 @@ TEST(TimestampScaler, TestG722PacketList) { |
TEST(TimestampScaler, TestG722Reset) { |
MockDecoderDatabase db; |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
// Use G722, which has a factor 2 scaling. |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, ""); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderG722, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 17; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |
@@ -258,7 +284,10 @@ TEST(TimestampScaler, TestG722Reset) { |
// timestamp scaler. |
TEST(TimestampScaler, TestOpusLargeStep) { |
MockDecoderDatabase db; |
- const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderOpus, ""); |
+ rtc::scoped_refptr<AudioDecoderFactory> factory = |
+ CreateBuiltinAudioDecoderFactory(); |
+ const DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderOpus, "", |
+ factory); |
static const uint8_t kRtpPayloadType = 17; |
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) |
.WillRepeatedly(Return(&info)); |