Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc

Issue 2021063002: NetEq decoder database: Don't keep track of sample rate for builtin decoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@decoder-samp-rate
Patch Set: explicit capture Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
index 1a77abcd5054d89bd725ba682236de8637e68abf..cf413a4ca8d8733b0205b7b43fc9fbf8e8ade110 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
@@ -113,16 +113,17 @@ struct NetEqNetworkStatsCheck {
NetEqNetworkStatistics stats_ref;
};
- NetEqNetworkStatsTest(NetEqDecoder codec,
- MockAudioDecoder* decoder)
- : NetEqExternalDecoderTest(codec, decoder),
- external_decoder_(decoder),
- samples_per_ms_(CodecSampleRateHz(codec) / 1000),
- frame_size_samples_(kFrameSizeMs * samples_per_ms_),
- rtp_generator_(new test::RtpGenerator(samples_per_ms_)),
- last_lost_time_(0),
- packet_loss_interval_(0xffffffff) {
- Init();
+NetEqNetworkStatsTest(NetEqDecoder codec,
+ int sample_rate_hz,
+ MockAudioDecoder* decoder)
+ : NetEqExternalDecoderTest(codec, sample_rate_hz, decoder),
+ external_decoder_(decoder),
+ samples_per_ms_(sample_rate_hz / 1000),
+ frame_size_samples_(kFrameSizeMs * samples_per_ms_),
+ rtp_generator_(new test::RtpGenerator(samples_per_ms_)),
+ last_lost_time_(0),
+ packet_loss_interval_(0xffffffff) {
+ Init();
}
bool Lost(uint32_t send_time) {
@@ -278,21 +279,21 @@ struct NetEqNetworkStatsCheck {
TEST(NetEqNetworkStatsTest, DecodeFec) {
MockAudioDecoder decoder(1);
- NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, &decoder);
+ NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, 48000, &decoder);
test.DecodeFecTest();
EXPECT_CALL(decoder, Die()).Times(1);
}
TEST(NetEqNetworkStatsTest, StereoDecodeFec) {
MockAudioDecoder decoder(2);
- NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, &decoder);
+ NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, 48000, &decoder);
test.DecodeFecTest();
EXPECT_CALL(decoder, Die()).Times(1);
}
TEST(NetEqNetworkStatsTest, NoiseExpansionTest) {
MockAudioDecoder decoder(1);
- NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, &decoder);
+ NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, 48000, &decoder);
test.NoiseExpansionTest();
EXPECT_CALL(decoder, Die()).Times(1);
}

Powered by Google App Engine
This is Rietveld 408576698