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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_external_decoder_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_external_decoder_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
index f92e36c0264a0fc663b8fd220cf8c366c51f78d9..f4f65aed2d8610ab2c65470f960b0545ec8989b6 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
@@ -31,10 +31,11 @@ class NetEqExternalDecoderUnitTest : public test::NetEqExternalDecoderTest {
static const int kFrameSizeMs = 10; // Frame size of Pcm16B.
NetEqExternalDecoderUnitTest(NetEqDecoder codec,
+ int sample_rate_hz,
MockExternalPcm16B* decoder)
- : NetEqExternalDecoderTest(codec, decoder),
+ : NetEqExternalDecoderTest(codec, sample_rate_hz, decoder),
external_decoder_(decoder),
- samples_per_ms_(CodecSampleRateHz(codec) / 1000),
+ samples_per_ms_(sample_rate_hz / 1000),
frame_size_samples_(kFrameSizeMs * samples_per_ms_),
rtp_generator_(new test::RtpGenerator(samples_per_ms_)),
input_(new int16_t[frame_size_samples_]),
@@ -173,12 +174,11 @@ class NetEqExternalVsInternalDecoderTest : public NetEqExternalDecoderUnitTest,
NetEqExternalVsInternalDecoderTest()
: NetEqExternalDecoderUnitTest(NetEqDecoder::kDecoderPCM16Bswb32kHz,
+ 32000,
new MockExternalPcm16B),
- sample_rate_hz_(
- CodecSampleRateHz(NetEqDecoder::kDecoderPCM16Bswb32kHz)) {
+ sample_rate_hz_(32000) {
NetEq::Config config;
- config.sample_rate_hz =
- CodecSampleRateHz(NetEqDecoder::kDecoderPCM16Bswb32kHz);
+ config.sample_rate_hz = sample_rate_hz_;
neteq_internal_.reset(
NetEq::Create(config, CreateBuiltinAudioDecoderFactory()));
}
@@ -247,6 +247,7 @@ class LargeTimestampJumpTest : public NetEqExternalDecoderUnitTest,
LargeTimestampJumpTest()
: NetEqExternalDecoderUnitTest(NetEqDecoder::kDecoderPCM16B,
+ 8000,
new MockExternalPcm16B),
test_state_(kInitialPhase) {
EXPECT_CALL(*external_decoder(), HasDecodePlc())
« no previous file with comments | « webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698