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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 test::LayerFilteringTransport transport( | 1128 test::LayerFilteringTransport transport( |
1129 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, | 1129 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, |
1130 params.common.selected_tl, params_.ss.selected_sl); | 1130 params.common.selected_tl, params_.ss.selected_sl); |
1131 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at | 1131 // TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at |
1132 // least share as much code as possible. That way this test would also match | 1132 // least share as much code as possible. That way this test would also match |
1133 // the full stack tests better. | 1133 // the full stack tests better. |
1134 transport.SetReceiver(call->Receiver()); | 1134 transport.SetReceiver(call->Receiver()); |
1135 | 1135 |
1136 SetupCommon(&transport, &transport); | 1136 SetupCommon(&transport, &transport); |
1137 | 1137 |
1138 video_send_config_.pre_encode_callback = local_preview.get(); | 1138 video_send_config_.local_renderer = local_preview.get(); |
1139 video_receive_configs_[stream_id].renderer = loopback_video.get(); | 1139 video_receive_configs_[stream_id].renderer = loopback_video.get(); |
1140 | 1140 |
1141 video_send_config_.suspend_below_min_bitrate = | 1141 video_send_config_.suspend_below_min_bitrate = |
1142 params_.common.suspend_below_min_bitrate; | 1142 params_.common.suspend_below_min_bitrate; |
1143 | 1143 |
1144 if (params.common.fec) { | 1144 if (params.common.fec) { |
1145 video_send_config_.rtp.fec.red_payload_type = kRedPayloadType; | 1145 video_send_config_.rtp.fec.red_payload_type = kRedPayloadType; |
1146 video_send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; | 1146 video_send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType; |
1147 video_receive_configs_[stream_id].rtp.fec.red_payload_type = | 1147 video_receive_configs_[stream_id].rtp.fec.red_payload_type = |
1148 kRedPayloadType; | 1148 kRedPayloadType; |
1149 video_receive_configs_[stream_id].rtp.fec.ulpfec_payload_type = | 1149 video_receive_configs_[stream_id].rtp.fec.ulpfec_payload_type = |
1150 kUlpfecPayloadType; | 1150 kUlpfecPayloadType; |
1151 } | 1151 } |
1152 | 1152 |
1153 if (params_.screenshare.enabled) | 1153 if (params_.screenshare.enabled) |
1154 SetupScreenshare(); | 1154 SetupScreenshare(); |
1155 | 1155 |
1156 video_send_stream_ = call->CreateVideoSendStream( | 1156 video_send_stream_ = |
1157 video_send_config_.Copy(), video_encoder_config_.Copy()); | 1157 call->CreateVideoSendStream(video_send_config_, video_encoder_config_); |
1158 VideoReceiveStream* receive_stream = | 1158 VideoReceiveStream* receive_stream = |
1159 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); | 1159 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); |
1160 CreateCapturer(video_send_stream_->Input()); | 1160 CreateCapturer(video_send_stream_->Input()); |
1161 | 1161 |
1162 receive_stream->Start(); | 1162 receive_stream->Start(); |
1163 video_send_stream_->Start(); | 1163 video_send_stream_->Start(); |
1164 capturer_->Start(); | 1164 capturer_->Start(); |
1165 | 1165 |
1166 test::PressEnterToContinue(); | 1166 test::PressEnterToContinue(); |
1167 | 1167 |
1168 capturer_->Stop(); | 1168 capturer_->Stop(); |
1169 video_send_stream_->Stop(); | 1169 video_send_stream_->Stop(); |
1170 receive_stream->Stop(); | 1170 receive_stream->Stop(); |
1171 | 1171 |
1172 call->DestroyVideoReceiveStream(receive_stream); | 1172 call->DestroyVideoReceiveStream(receive_stream); |
1173 call->DestroyVideoSendStream(video_send_stream_); | 1173 call->DestroyVideoSendStream(video_send_stream_); |
1174 | 1174 |
1175 transport.StopSending(); | 1175 transport.StopSending(); |
1176 } | 1176 } |
1177 | 1177 |
1178 } // namespace webrtc | 1178 } // namespace webrtc |
OLD | NEW |