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

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc

Issue 2027993002: NetEq: Ask AudioDecoder for sample rate instead of passing it as an argument (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@samprate1
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 }; 1012 };
1013 1013
1014 AudioDecoderPcmU decoder(1); 1014 AudioDecoderPcmU decoder(1);
1015 DecodeForwarder decode_forwarder(&decoder); 1015 DecodeForwarder decode_forwarder(&decoder);
1016 MockAudioDecoder mock_decoder; 1016 MockAudioDecoder mock_decoder;
1017 // Set expectations on the mock decoder and also delegate the calls to the 1017 // Set expectations on the mock decoder and also delegate the calls to the
1018 // real decoder. 1018 // real decoder.
1019 EXPECT_CALL(mock_decoder, IncomingPacket(_, _, _, _, _)) 1019 EXPECT_CALL(mock_decoder, IncomingPacket(_, _, _, _, _))
1020 .Times(AtLeast(1)) 1020 .Times(AtLeast(1))
1021 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::IncomingPacket)); 1021 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::IncomingPacket));
1022 EXPECT_CALL(mock_decoder, SampleRateHz())
1023 .Times(AtLeast(1))
1024 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::SampleRateHz));
1022 EXPECT_CALL(mock_decoder, Channels()) 1025 EXPECT_CALL(mock_decoder, Channels())
1023 .Times(AtLeast(1)) 1026 .Times(AtLeast(1))
1024 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::Channels)); 1027 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::Channels));
1025 EXPECT_CALL(mock_decoder, DecodeInternal(_, _, _, _, _)) 1028 EXPECT_CALL(mock_decoder, DecodeInternal(_, _, _, _, _))
1026 .Times(AtLeast(1)) 1029 .Times(AtLeast(1))
1027 .WillRepeatedly(Invoke(&decode_forwarder, &DecodeForwarder::Decode)); 1030 .WillRepeatedly(Invoke(&decode_forwarder, &DecodeForwarder::Decode));
1028 EXPECT_CALL(mock_decoder, HasDecodePlc()) 1031 EXPECT_CALL(mock_decoder, HasDecodePlc())
1029 .Times(AtLeast(1)) 1032 .Times(AtLeast(1))
1030 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::HasDecodePlc)); 1033 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::HasDecodePlc));
1031 EXPECT_CALL(mock_decoder, PacketDuration(_, _)) 1034 EXPECT_CALL(mock_decoder, PacketDuration(_, _))
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 Run(16000, 8000, 1000); 1797 Run(16000, 8000, 1000);
1795 } 1798 }
1796 1799
1797 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1800 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1798 Run(8000, 16000, 1000); 1801 Run(8000, 16000, 1000);
1799 } 1802 }
1800 1803
1801 #endif 1804 #endif
1802 1805
1803 } // namespace webrtc 1806 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698