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 |
| 11 #include <map> |
11 #include <string> | 12 #include <string> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "webrtc/api/test/mock_audio_mixer.h" | 15 #include "webrtc/api/test/mock_audio_mixer.h" |
15 #include "webrtc/audio/audio_receive_stream.h" | 16 #include "webrtc/audio/audio_receive_stream.h" |
16 #include "webrtc/audio/conversion.h" | 17 #include "webrtc/audio/conversion.h" |
17 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" | 18 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" |
18 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h" | 19 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h" |
19 #include "webrtc/modules/bitrate_controller/include/mock/mock_bitrate_controller
.h" | 20 #include "webrtc/modules/bitrate_controller/include/mock/mock_bitrate_controller
.h" |
20 #include "webrtc/modules/pacing/packet_router.h" | 21 #include "webrtc/modules/pacing/packet_router.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 .Times(1); | 105 .Times(1); |
105 EXPECT_CALL(*channel_proxy_, GetAudioDecoderFactory()) | 106 EXPECT_CALL(*channel_proxy_, GetAudioDecoderFactory()) |
106 .WillOnce(ReturnRef(decoder_factory_)); | 107 .WillOnce(ReturnRef(decoder_factory_)); |
107 testing::Expectation expect_set = | 108 testing::Expectation expect_set = |
108 EXPECT_CALL(*channel_proxy_, SetRtcEventLog(&event_log_)) | 109 EXPECT_CALL(*channel_proxy_, SetRtcEventLog(&event_log_)) |
109 .Times(1); | 110 .Times(1); |
110 EXPECT_CALL(*channel_proxy_, SetRtcEventLog(testing::IsNull())) | 111 EXPECT_CALL(*channel_proxy_, SetRtcEventLog(testing::IsNull())) |
111 .Times(1) | 112 .Times(1) |
112 .After(expect_set); | 113 .After(expect_set); |
113 EXPECT_CALL(*channel_proxy_, DisassociateSendChannel()).Times(1); | 114 EXPECT_CALL(*channel_proxy_, DisassociateSendChannel()).Times(1); |
| 115 EXPECT_CALL(*channel_proxy_, SetReceiveCodecs(_)) |
| 116 .WillRepeatedly( |
| 117 Invoke([](const std::map<int, SdpAudioFormat>& codecs) { |
| 118 EXPECT_THAT(codecs, testing::IsEmpty()); |
| 119 })); |
114 return channel_proxy_; | 120 return channel_proxy_; |
115 })); | 121 })); |
116 stream_config_.voe_channel_id = kChannelId; | 122 stream_config_.voe_channel_id = kChannelId; |
117 stream_config_.rtp.local_ssrc = kLocalSsrc; | 123 stream_config_.rtp.local_ssrc = kLocalSsrc; |
118 stream_config_.rtp.remote_ssrc = kRemoteSsrc; | 124 stream_config_.rtp.remote_ssrc = kRemoteSsrc; |
119 stream_config_.rtp.nack.rtp_history_ms = 300; | 125 stream_config_.rtp.nack.rtp_history_ms = 300; |
120 stream_config_.rtp.extensions.push_back( | 126 stream_config_.rtp.extensions.push_back( |
121 RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelId)); | 127 RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelId)); |
122 stream_config_.rtp.extensions.push_back(RtpExtension( | 128 stream_config_.rtp.extensions.push_back(RtpExtension( |
123 RtpExtension::kTransportSequenceNumberUri, kTransportSequenceNumberId)); | 129 RtpExtension::kTransportSequenceNumberUri, kTransportSequenceNumberId)); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 352 |
347 EXPECT_CALL(helper.voice_engine(), StartPlayout(_)).WillOnce(Return(0)); | 353 EXPECT_CALL(helper.voice_engine(), StartPlayout(_)).WillOnce(Return(0)); |
348 EXPECT_CALL(helper.voice_engine(), StopPlayout(_)); | 354 EXPECT_CALL(helper.voice_engine(), StopPlayout(_)); |
349 EXPECT_CALL(*helper.audio_mixer(), AddSource(&recv_stream)) | 355 EXPECT_CALL(*helper.audio_mixer(), AddSource(&recv_stream)) |
350 .WillOnce(Return(true)); | 356 .WillOnce(Return(true)); |
351 | 357 |
352 recv_stream.Start(); | 358 recv_stream.Start(); |
353 } | 359 } |
354 } // namespace test | 360 } // namespace test |
355 } // namespace webrtc | 361 } // namespace webrtc |
OLD | NEW |