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

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

Issue 2516993002: Pass SdpAudioFormat through Channel, without converting to CodecInst (Closed)
Patch Set: add TODO Created 3 years, 11 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 Invoke(&pcmu_decoder_, &AudioDecoderPcmU::HasDecodePlc)); 1034 Invoke(&pcmu_decoder_, &AudioDecoderPcmU::HasDecodePlc));
1035 EXPECT_CALL(*mock_decoder_, PacketDuration(_, _)) 1035 EXPECT_CALL(*mock_decoder_, PacketDuration(_, _))
1036 .Times(AtLeast(1)) 1036 .Times(AtLeast(1))
1037 .WillRepeatedly( 1037 .WillRepeatedly(
1038 Invoke(&pcmu_decoder_, &AudioDecoderPcmU::PacketDuration)); 1038 Invoke(&pcmu_decoder_, &AudioDecoderPcmU::PacketDuration));
1039 EXPECT_CALL(*mock_decoder_, Die()); 1039 EXPECT_CALL(*mock_decoder_, Die());
1040 } 1040 }
1041 std::vector<AudioCodecSpec> GetSupportedDecoders() override { 1041 std::vector<AudioCodecSpec> GetSupportedDecoders() override {
1042 return fact_->GetSupportedDecoders(); 1042 return fact_->GetSupportedDecoders();
1043 } 1043 }
1044 bool IsSupportedDecoder(const SdpAudioFormat& format) override {
1045 return format.name == "MockPCMu" ? true
1046 : fact_->IsSupportedDecoder(format);
1047 }
1044 std::unique_ptr<AudioDecoder> MakeAudioDecoder( 1048 std::unique_ptr<AudioDecoder> MakeAudioDecoder(
1045 const SdpAudioFormat& format) override { 1049 const SdpAudioFormat& format) override {
1046 return format.name == "MockPCMu" ? std::move(mock_decoder_) 1050 return format.name == "MockPCMu" ? std::move(mock_decoder_)
1047 : fact_->MakeAudioDecoder(format); 1051 : fact_->MakeAudioDecoder(format);
1048 } 1052 }
1049 1053
1050 private: 1054 private:
1051 // Class intended to forward a call from a mock DecodeInternal to Decode on 1055 // Class intended to forward a call from a mock DecodeInternal to Decode on
1052 // the real decoder's Decode. DecodeInternal for the real decoder isn't 1056 // the real decoder's Decode. DecodeInternal for the real decoder isn't
1053 // public. 1057 // public.
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 Run(16000, 8000, 1000); 1839 Run(16000, 8000, 1000);
1836 } 1840 }
1837 1841
1838 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1842 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1839 Run(8000, 16000, 1000); 1843 Run(8000, 16000, 1000);
1840 } 1844 }
1841 1845
1842 #endif 1846 #endif
1843 1847
1844 } // namespace webrtc 1848 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/modules/audio_coding/acm2/rent_a_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698