| 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 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 test::LayerFilteringTransport transport( | 1191 test::LayerFilteringTransport transport( |
| 1192 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, | 1192 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, |
| 1193 params.common.selected_tl, params_.ss.selected_sl); | 1193 params.common.selected_tl, params_.ss.selected_sl); |
| 1194 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at | 1194 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at |
| 1195 // least share as much code as possible. That way this test would also match | 1195 // least share as much code as possible. That way this test would also match |
| 1196 // the full stack tests better. | 1196 // the full stack tests better. |
| 1197 transport.SetReceiver(call->Receiver()); | 1197 transport.SetReceiver(call->Receiver()); |
| 1198 | 1198 |
| 1199 SetupCommon(&transport, &transport); | 1199 SetupCommon(&transport, &transport); |
| 1200 | 1200 |
| 1201 video_send_config_.local_renderer = local_preview.get(); | 1201 video_send_config_.pre_encode_callback = local_preview.get(); |
| 1202 video_receive_configs_[stream_id].renderer = loopback_video.get(); | 1202 video_receive_configs_[stream_id].renderer = loopback_video.get(); |
| 1203 if (params_.audio && params_.audio_video_sync) | 1203 if (params_.audio && params_.audio_video_sync) |
| 1204 video_receive_configs_[stream_id].sync_group = kSyncGroup; | 1204 video_receive_configs_[stream_id].sync_group = kSyncGroup; |
| 1205 | 1205 |
| 1206 video_send_config_.suspend_below_min_bitrate = | 1206 video_send_config_.suspend_below_min_bitrate = |
| 1207 params_.common.suspend_below_min_bitrate; | 1207 params_.common.suspend_below_min_bitrate; |
| 1208 | 1208 |
| 1209 if (params.common.fec) { | 1209 if (params.common.fec) { |
| 1210 video_send_config_.rtp.fec.red_payload_type = kRedPayloadType; | 1210 video_send_config_.rtp.fec.red_payload_type = kRedPayloadType; |
| 1211 video_send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; | 1211 video_send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; |
| 1212 video_receive_configs_[stream_id].rtp.fec.red_payload_type = | 1212 video_receive_configs_[stream_id].rtp.fec.red_payload_type = |
| 1213 kRedPayloadType; | 1213 kRedPayloadType; |
| 1214 video_receive_configs_[stream_id].rtp.fec.ulpfec_payload_type = | 1214 video_receive_configs_[stream_id].rtp.fec.ulpfec_payload_type = |
| 1215 kUlpfecPayloadType; | 1215 kUlpfecPayloadType; |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 if (params_.screenshare.enabled) | 1218 if (params_.screenshare.enabled) |
| 1219 SetupScreenshare(); | 1219 SetupScreenshare(); |
| 1220 | 1220 |
| 1221 video_send_stream_ = | 1221 video_send_stream_ = call->CreateVideoSendStream( |
| 1222 call->CreateVideoSendStream(video_send_config_, video_encoder_config_); | 1222 video_send_config_.Copy(), video_encoder_config_.Copy()); |
| 1223 VideoReceiveStream* video_receive_stream = | 1223 VideoReceiveStream* video_receive_stream = |
| 1224 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); | 1224 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); |
| 1225 CreateCapturer(video_send_stream_->Input()); | 1225 CreateCapturer(video_send_stream_->Input()); |
| 1226 | 1226 |
| 1227 AudioReceiveStream* audio_receive_stream = nullptr; | 1227 AudioReceiveStream* audio_receive_stream = nullptr; |
| 1228 if (params_.audio) { | 1228 if (params_.audio) { |
| 1229 audio_send_config_ = AudioSendStream::Config(&transport); | 1229 audio_send_config_ = AudioSendStream::Config(&transport); |
| 1230 audio_send_config_.voe_channel_id = voe.send_channel_id; | 1230 audio_send_config_.voe_channel_id = voe.send_channel_id; |
| 1231 audio_send_config_.rtp.ssrc = kAudioSendSsrc; | 1231 audio_send_config_.rtp.ssrc = kAudioSendSsrc; |
| 1232 | 1232 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 call->DestroyAudioSendStream(audio_send_stream_); | 1301 call->DestroyAudioSendStream(audio_send_stream_); |
| 1302 call->DestroyAudioReceiveStream(audio_receive_stream); | 1302 call->DestroyAudioReceiveStream(audio_receive_stream); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 transport.StopSending(); | 1305 transport.StopSending(); |
| 1306 if (params_.audio) | 1306 if (params_.audio) |
| 1307 DestroyVoiceEngine(&voe); | 1307 DestroyVoiceEngine(&voe); |
| 1308 } | 1308 } |
| 1309 | 1309 |
| 1310 } // namespace webrtc | 1310 } // namespace webrtc |
| OLD | NEW |