OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |