OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // will create a NiceMock of a voe::ChannelProxy. | 45 // will create a NiceMock of a voe::ChannelProxy. |
46 // TODO(ossu): As long as AudioReceiveStream is implemented as a wrapper | 46 // TODO(ossu): As long as AudioReceiveStream is implemented as a wrapper |
47 // around Channel, we need to make sure ChannelProxy returns the same | 47 // around Channel, we need to make sure ChannelProxy returns the same |
48 // decoder factory as the one passed in when creating an AudioReceiveStream. | 48 // decoder factory as the one passed in when creating an AudioReceiveStream. |
49 ON_CALL(*this, ChannelProxyFactory(testing::_)) | 49 ON_CALL(*this, ChannelProxyFactory(testing::_)) |
50 .WillByDefault(testing::Invoke([this](int channel_id) { | 50 .WillByDefault(testing::Invoke([this](int channel_id) { |
51 auto* proxy = | 51 auto* proxy = |
52 new testing::NiceMock<webrtc::test::MockVoEChannelProxy>(); | 52 new testing::NiceMock<webrtc::test::MockVoEChannelProxy>(); |
53 EXPECT_CALL(*proxy, GetAudioDecoderFactory()) | 53 EXPECT_CALL(*proxy, GetAudioDecoderFactory()) |
54 .WillRepeatedly(testing::ReturnRef(decoder_factory_)); | 54 .WillRepeatedly(testing::ReturnRef(decoder_factory_)); |
55 EXPECT_CALL(*proxy, SetReceiveCodecs(testing::_)) | |
56 .WillRepeatedly(testing::Invoke( | |
57 [](const std::map<int, SdpAudioFormat>& codecs) { | |
58 EXPECT_THAT(codecs, testing::IsEmpty()); | |
59 })); | |
60 return proxy; | 55 return proxy; |
61 })); | 56 })); |
62 | 57 |
63 ON_CALL(mock_audio_device_, TimeUntilNextProcess()) | 58 ON_CALL(mock_audio_device_, TimeUntilNextProcess()) |
64 .WillByDefault(testing::Return(1000)); | 59 .WillByDefault(testing::Return(1000)); |
65 ON_CALL(*this, audio_device_module()) | 60 ON_CALL(*this, audio_device_module()) |
66 .WillByDefault(testing::Return(&mock_audio_device_)); | 61 .WillByDefault(testing::Return(&mock_audio_device_)); |
67 ON_CALL(*this, audio_processing()) | 62 ON_CALL(*this, audio_processing()) |
68 .WillByDefault(testing::Return(&mock_audio_processing_)); | 63 .WillByDefault(testing::Return(&mock_audio_processing_)); |
69 ON_CALL(*this, audio_transport()) | 64 ON_CALL(*this, audio_transport()) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 237 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
243 | 238 |
244 MockAudioDeviceModule mock_audio_device_; | 239 MockAudioDeviceModule mock_audio_device_; |
245 MockAudioProcessing mock_audio_processing_; | 240 MockAudioProcessing mock_audio_processing_; |
246 MockAudioTransport mock_audio_transport_; | 241 MockAudioTransport mock_audio_transport_; |
247 }; | 242 }; |
248 } // namespace test | 243 } // namespace test |
249 } // namespace webrtc | 244 } // namespace webrtc |
250 | 245 |
251 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ | 246 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ |
OLD | NEW |