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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 receive_transport.SetReceiver(sender_call_->Receiver()); | 210 receive_transport.SetReceiver(sender_call_->Receiver()); |
210 | 211 |
211 test::FakeDecoder fake_decoder; | 212 test::FakeDecoder fake_decoder; |
212 | 213 |
213 CreateSendConfig(1, 0, 0, &video_send_transport); | 214 CreateSendConfig(1, 0, 0, &video_send_transport); |
214 CreateMatchingReceiveConfigs(&receive_transport); | 215 CreateMatchingReceiveConfigs(&receive_transport); |
215 | 216 |
216 AudioSendStream::Config audio_send_config(&audio_send_transport); | 217 AudioSendStream::Config audio_send_config(&audio_send_transport); |
217 audio_send_config.voe_channel_id = send_channel_id; | 218 audio_send_config.voe_channel_id = send_channel_id; |
218 audio_send_config.rtp.ssrc = kAudioSendSsrc; | 219 audio_send_config.rtp.ssrc = kAudioSendSsrc; |
219 audio_send_config.send_codec_spec.codec_inst = | 220 audio_send_config.send_codec_spec.payload_type = 103; |
220 CodecInst{103, "ISAC", 16000, 480, 1, 32000}; | 221 audio_send_config.send_codec_spec.format.format = {"ISAC", 16000, 1}; |
| 222 audio_send_config.encoder_factory = CreateBuiltinAudioEncoderFactory(); |
221 AudioSendStream* audio_send_stream = | 223 AudioSendStream* audio_send_stream = |
222 sender_call_->CreateAudioSendStream(audio_send_config); | 224 sender_call_->CreateAudioSendStream(audio_send_config); |
223 | 225 |
224 video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; | 226 video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
225 if (fec == FecMode::kOn) { | 227 if (fec == FecMode::kOn) { |
226 video_send_config_.rtp.ulpfec.red_payload_type = kRedPayloadType; | 228 video_send_config_.rtp.ulpfec.red_payload_type = kRedPayloadType; |
227 video_send_config_.rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; | 229 video_send_config_.rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; |
228 video_receive_configs_[0].rtp.ulpfec.red_payload_type = kRedPayloadType; | 230 video_receive_configs_[0].rtp.ulpfec.red_payload_type = kRedPayloadType; |
229 video_receive_configs_[0].rtp.ulpfec.ulpfec_payload_type = | 231 video_receive_configs_[0].rtp.ulpfec.ulpfec_payload_type = |
230 kUlpfecPayloadType; | 232 kUlpfecPayloadType; |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 uint32_t last_set_bitrate_kbps_; | 737 uint32_t last_set_bitrate_kbps_; |
736 VideoSendStream* send_stream_; | 738 VideoSendStream* send_stream_; |
737 test::FrameGeneratorCapturer* frame_generator_; | 739 test::FrameGeneratorCapturer* frame_generator_; |
738 VideoEncoderConfig encoder_config_; | 740 VideoEncoderConfig encoder_config_; |
739 } test; | 741 } test; |
740 | 742 |
741 RunBaseTest(&test); | 743 RunBaseTest(&test); |
742 } | 744 } |
743 | 745 |
744 } // namespace webrtc | 746 } // namespace webrtc |
OLD | NEW |