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