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

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

Issue 1178053002: Add UMA logging for target audio bitrate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing a problem that was revealed in tests, and silencing a few warnings Created 5 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 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 EXPECT_CALL(mock_encoder, SampleRateHz()) 1557 EXPECT_CALL(mock_encoder, SampleRateHz())
1558 .Times(AtLeast(1)) 1558 .Times(AtLeast(1))
1559 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::SampleRateHz)); 1559 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::SampleRateHz));
1560 EXPECT_CALL(mock_encoder, NumChannels()) 1560 EXPECT_CALL(mock_encoder, NumChannels())
1561 .Times(AtLeast(1)) 1561 .Times(AtLeast(1))
1562 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::NumChannels)); 1562 .WillRepeatedly(Invoke(&encoder, &AudioEncoderMutablePcmU::NumChannels));
1563 EXPECT_CALL(mock_encoder, EncodeInternal(_, _, _, _)) 1563 EXPECT_CALL(mock_encoder, EncodeInternal(_, _, _, _))
1564 .Times(AtLeast(1)) 1564 .Times(AtLeast(1))
1565 .WillRepeatedly( 1565 .WillRepeatedly(
1566 Invoke(&encoder, &AudioEncoderMutablePcmU::EncodeInternal)); 1566 Invoke(&encoder, &AudioEncoderMutablePcmU::EncodeInternal));
1567 EXPECT_CALL(mock_encoder, GetTargetBitrate())
1568 .Times(AtLeast(1))
1569 .WillRepeatedly(Invoke(
1570 &encoder, &AudioEncoderMutablePcmU::GetTargetBitrate));
1567 ASSERT_NO_FATAL_FAILURE( 1571 ASSERT_NO_FATAL_FAILURE(
1568 SetUpTestExternalEncoder(&mock_encoder, codec_inst.pltype)); 1572 SetUpTestExternalEncoder(&mock_encoder, codec_inst.pltype));
1569 Run("81a9d4c0bb72e9becc43aef124c981e9", "8f9b8750bd80fe26b6cbf6659b89f0f9", 1573 Run("81a9d4c0bb72e9becc43aef124c981e9", "8f9b8750bd80fe26b6cbf6659b89f0f9",
1570 50, test::AcmReceiveTestOldApi::kMonoOutput); 1574 50, test::AcmReceiveTestOldApi::kMonoOutput);
1571 } 1575 }
1572 1576
1573 // This test fixture is implemented to run ACM and change the desired output 1577 // This test fixture is implemented to run ACM and change the desired output
1574 // frequency during the call. The input packets are simply PCM16b-wb encoded 1578 // frequency during the call. The input packets are simply PCM16b-wb encoded
1575 // payloads with a constant value of |kSampleValue|. The test fixture itself 1579 // payloads with a constant value of |kSampleValue|. The test fixture itself
1576 // acts as PacketSource in between the receive test class and the constant- 1580 // acts as PacketSource in between the receive test class and the constant-
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 Run(16000, 8000, 1000); 1684 Run(16000, 8000, 1000);
1681 } 1685 }
1682 1686
1683 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1687 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1684 Run(8000, 16000, 1000); 1688 Run(8000, 16000, 1000);
1685 } 1689 }
1686 1690
1687 #endif 1691 #endif
1688 1692
1689 } // namespace webrtc 1693 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698