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

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

Issue 1303413003: AudioCodingModuleImpl::Encode: Use a Buffer instead of a stack-allocated array (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-common-defs
Patch Set: Created 5 years, 4 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 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 EXPECT_CALL(mock_encoder, Max10MsFramesInAPacket()) 1612 EXPECT_CALL(mock_encoder, Max10MsFramesInAPacket())
1613 .Times(AtLeast(1)) 1613 .Times(AtLeast(1))
1614 .WillRepeatedly( 1614 .WillRepeatedly(
1615 Invoke(&encoder, &AudioEncoderMutablePcmU::Max10MsFramesInAPacket)); 1615 Invoke(&encoder, &AudioEncoderMutablePcmU::Max10MsFramesInAPacket));
1616 EXPECT_CALL(mock_encoder, SampleRateHz()) 1616 EXPECT_CALL(mock_encoder, SampleRateHz())
1617 .Times(AtLeast(1)) 1617 .Times(AtLeast(1))
1618 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::SampleRateHz)); 1618 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::SampleRateHz));
1619 EXPECT_CALL(mock_encoder, NumChannels()) 1619 EXPECT_CALL(mock_encoder, NumChannels())
1620 .Times(AtLeast(1)) 1620 .Times(AtLeast(1))
1621 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::NumChannels)); 1621 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::NumChannels));
1622 EXPECT_CALL(mock_encoder, MaxEncodedBytes())
1623 .Times(AtLeast(1))
1624 .WillRepeatedly(
1625 Invoke(&encoder, &AudioEncoderMutablePcmU::MaxEncodedBytes));
1622 EXPECT_CALL(mock_encoder, EncodeInternal(_, _, _, _)) 1626 EXPECT_CALL(mock_encoder, EncodeInternal(_, _, _, _))
1623 .Times(AtLeast(1)) 1627 .Times(AtLeast(1))
1624 .WillRepeatedly( 1628 .WillRepeatedly(
1625 Invoke(&encoder, &AudioEncoderMutablePcmU::EncodeInternal)); 1629 Invoke(&encoder, &AudioEncoderMutablePcmU::EncodeInternal));
1626 EXPECT_CALL(mock_encoder, GetTargetBitrate()) 1630 EXPECT_CALL(mock_encoder, GetTargetBitrate())
1627 .Times(AtLeast(1)) 1631 .Times(AtLeast(1))
1628 .WillRepeatedly(Invoke( 1632 .WillRepeatedly(Invoke(
1629 &encoder, &AudioEncoderMutablePcmU::GetTargetBitrate)); 1633 &encoder, &AudioEncoderMutablePcmU::GetTargetBitrate));
1630 ASSERT_NO_FATAL_FAILURE( 1634 ASSERT_NO_FATAL_FAILURE(
1631 SetUpTestExternalEncoder(&mock_encoder, codec_inst.pltype)); 1635 SetUpTestExternalEncoder(&mock_encoder, codec_inst.pltype));
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 Run(16000, 8000, 1000); 1747 Run(16000, 8000, 1000);
1744 } 1748 }
1745 1749
1746 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1750 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1747 Run(8000, 16000, 1000); 1751 Run(8000, 16000, 1000);
1748 } 1752 }
1749 1753
1750 #endif 1754 #endif
1751 1755
1752 } // namespace webrtc 1756 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698