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

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

Issue 1702943002: Pass ownership of external encoders to the ACM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 1625
1626 TEST_F(AcmSenderBitExactnessOldApi, External_Pcmu_20ms) { 1626 TEST_F(AcmSenderBitExactnessOldApi, External_Pcmu_20ms) {
1627 CodecInst codec_inst; 1627 CodecInst codec_inst;
1628 codec_inst.channels = 1; 1628 codec_inst.channels = 1;
1629 codec_inst.pacsize = 160; 1629 codec_inst.pacsize = 160;
1630 codec_inst.pltype = 0; 1630 codec_inst.pltype = 0;
1631 AudioEncoderPcmU encoder(codec_inst); 1631 AudioEncoderPcmU encoder(codec_inst);
1632 MockAudioEncoder mock_encoder; 1632 MockAudioEncoder mock_encoder;
1633 // Set expectations on the mock encoder and also delegate the calls to the 1633 // Set expectations on the mock encoder and also delegate the calls to the
1634 // real encoder. 1634 // real encoder.
1635 EXPECT_CALL(mock_encoder, Die());
1635 EXPECT_CALL(mock_encoder, SampleRateHz()) 1636 EXPECT_CALL(mock_encoder, SampleRateHz())
1636 .Times(AtLeast(1)) 1637 .Times(AtLeast(1))
1637 .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::SampleRateHz)); 1638 .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::SampleRateHz));
1638 EXPECT_CALL(mock_encoder, NumChannels()) 1639 EXPECT_CALL(mock_encoder, NumChannels())
1639 .Times(AtLeast(1)) 1640 .Times(AtLeast(1))
1640 .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::NumChannels)); 1641 .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::NumChannels));
1641 EXPECT_CALL(mock_encoder, RtpTimestampRateHz()) 1642 EXPECT_CALL(mock_encoder, RtpTimestampRateHz())
1642 .Times(AtLeast(1)) 1643 .Times(AtLeast(1))
1643 .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::RtpTimestampRateHz)); 1644 .WillRepeatedly(Invoke(&encoder, &AudioEncoderPcmU::RtpTimestampRateHz));
1644 EXPECT_CALL(mock_encoder, Num10MsFramesInNextPacket()) 1645 EXPECT_CALL(mock_encoder, Num10MsFramesInNextPacket())
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 Run(16000, 8000, 1000); 1779 Run(16000, 8000, 1000);
1779 } 1780 }
1780 1781
1781 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1782 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1782 Run(8000, 16000, 1000); 1783 Run(8000, 16000, 1000);
1783 } 1784 }
1784 1785
1785 #endif 1786 #endif
1786 1787
1787 } // namespace webrtc 1788 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698