OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 <algorithm> | 11 #include <algorithm> |
12 #include <limits> | 12 #include <limits> |
13 #include <memory> | 13 #include <memory> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
18 #include "webrtc/base/thread_annotations.h" | 18 #include "webrtc/base/thread_annotations.h" |
19 #include "webrtc/call/call.h" | 19 #include "webrtc/call/call.h" |
20 #include "webrtc/config.h" | 20 #include "webrtc/config.h" |
21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
| 22 #include "webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory.h" |
22 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 23 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
23 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" | 24 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" |
24 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 25 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
25 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 26 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
26 #include "webrtc/system_wrappers/include/metrics_default.h" | 27 #include "webrtc/system_wrappers/include/metrics_default.h" |
27 #include "webrtc/test/call_test.h" | 28 #include "webrtc/test/call_test.h" |
28 #include "webrtc/test/direct_transport.h" | 29 #include "webrtc/test/direct_transport.h" |
29 #include "webrtc/test/drifting_clock.h" | 30 #include "webrtc/test/drifting_clock.h" |
30 #include "webrtc/test/encoder_settings.h" | 31 #include "webrtc/test/encoder_settings.h" |
31 #include "webrtc/test/fake_audio_device.h" | 32 #include "webrtc/test/fake_audio_device.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 receive_transport.SetReceiver(sender_call_->Receiver()); | 212 receive_transport.SetReceiver(sender_call_->Receiver()); |
212 | 213 |
213 test::FakeDecoder fake_decoder; | 214 test::FakeDecoder fake_decoder; |
214 | 215 |
215 CreateSendConfig(1, 0, 0, &video_send_transport); | 216 CreateSendConfig(1, 0, 0, &video_send_transport); |
216 CreateMatchingReceiveConfigs(&receive_transport); | 217 CreateMatchingReceiveConfigs(&receive_transport); |
217 | 218 |
218 AudioSendStream::Config audio_send_config(&audio_send_transport); | 219 AudioSendStream::Config audio_send_config(&audio_send_transport); |
219 audio_send_config.voe_channel_id = send_channel_id; | 220 audio_send_config.voe_channel_id = send_channel_id; |
220 audio_send_config.rtp.ssrc = kAudioSendSsrc; | 221 audio_send_config.rtp.ssrc = kAudioSendSsrc; |
221 audio_send_config.send_codec_spec.codec_inst = | 222 audio_send_config.send_codec_spec = |
222 CodecInst{103, "ISAC", 16000, 480, 1, 32000}; | 223 rtc::Optional<AudioSendStream::Config::SendCodecSpec>( |
| 224 {103, {"ISAC", 16000, 1}}); |
| 225 audio_send_config.encoder_factory = CreateBuiltinAudioEncoderFactory(); |
223 AudioSendStream* audio_send_stream = | 226 AudioSendStream* audio_send_stream = |
224 sender_call_->CreateAudioSendStream(audio_send_config); | 227 sender_call_->CreateAudioSendStream(audio_send_config); |
225 | 228 |
226 video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; | 229 video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
227 if (fec == FecMode::kOn) { | 230 if (fec == FecMode::kOn) { |
228 video_send_config_.rtp.ulpfec.red_payload_type = kRedPayloadType; | 231 video_send_config_.rtp.ulpfec.red_payload_type = kRedPayloadType; |
229 video_send_config_.rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; | 232 video_send_config_.rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; |
230 video_receive_configs_[0].rtp.ulpfec.red_payload_type = kRedPayloadType; | 233 video_receive_configs_[0].rtp.ulpfec.red_payload_type = kRedPayloadType; |
231 video_receive_configs_[0].rtp.ulpfec.ulpfec_payload_type = | 234 video_receive_configs_[0].rtp.ulpfec.ulpfec_payload_type = |
232 kUlpfecPayloadType; | 235 kUlpfecPayloadType; |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 uint32_t last_set_bitrate_kbps_; | 741 uint32_t last_set_bitrate_kbps_; |
739 VideoSendStream* send_stream_; | 742 VideoSendStream* send_stream_; |
740 test::FrameGeneratorCapturer* frame_generator_; | 743 test::FrameGeneratorCapturer* frame_generator_; |
741 VideoEncoderConfig encoder_config_; | 744 VideoEncoderConfig encoder_config_; |
742 } test; | 745 } test; |
743 | 746 |
744 RunBaseTest(&test); | 747 RunBaseTest(&test); |
745 } | 748 } |
746 | 749 |
747 } // namespace webrtc | 750 } // namespace webrtc |
OLD | NEW |