| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 config->rtp.rtcp_mode = send_params_.rtcp.reduced_size | 1250 config->rtp.rtcp_mode = send_params_.rtcp.reduced_size |
| 1251 ? webrtc::RtcpMode::kReducedSize | 1251 ? webrtc::RtcpMode::kReducedSize |
| 1252 : webrtc::RtcpMode::kCompound; | 1252 : webrtc::RtcpMode::kCompound; |
| 1253 | 1253 |
| 1254 config->rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false; | 1254 config->rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false; |
| 1255 config->rtp.transport_cc = | 1255 config->rtp.transport_cc = |
| 1256 send_codec_ ? HasTransportCc(send_codec_->codec) : false; | 1256 send_codec_ ? HasTransportCc(send_codec_->codec) : false; |
| 1257 | 1257 |
| 1258 sp.GetFidSsrc(ssrc, &config->rtp.rtx_ssrc); | 1258 sp.GetFidSsrc(ssrc, &config->rtp.rtx_ssrc); |
| 1259 | 1259 |
| 1260 config->rtp.extensions = recv_rtp_extensions_; | |
| 1261 | |
| 1262 // TODO(brandtr): Generalize when we add support for multistream protection. | 1260 // TODO(brandtr): Generalize when we add support for multistream protection. |
| 1263 if (sp.GetFecFrSsrc(ssrc, &flexfec_config->remote_ssrc)) { | 1261 if (sp.GetFecFrSsrc(ssrc, &flexfec_config->remote_ssrc)) { |
| 1264 flexfec_config->protected_media_ssrcs = {ssrc}; | 1262 flexfec_config->protected_media_ssrcs = {ssrc}; |
| 1265 flexfec_config->local_ssrc = config->rtp.local_ssrc; | 1263 flexfec_config->local_ssrc = config->rtp.local_ssrc; |
| 1266 flexfec_config->rtcp_mode = config->rtp.rtcp_mode; | 1264 flexfec_config->rtcp_mode = config->rtp.rtcp_mode; |
| 1267 // TODO(brandtr): We should be spec-compliant and set |transport_cc| here | 1265 // TODO(brandtr): We should be spec-compliant and set |transport_cc| here |
| 1268 // based on the rtcp-fb for the FlexFEC codec, not the media codec. | 1266 // based on the rtcp-fb for the FlexFEC codec, not the media codec. |
| 1269 flexfec_config->transport_cc = config->rtp.transport_cc; | 1267 flexfec_config->transport_cc = config->rtp.transport_cc; |
| 1270 flexfec_config->rtp_header_extensions = config->rtp.extensions; | |
| 1271 } | 1268 } |
| 1272 } | 1269 } |
| 1273 | 1270 |
| 1274 bool WebRtcVideoChannel2::RemoveRecvStream(uint32_t ssrc) { | 1271 bool WebRtcVideoChannel2::RemoveRecvStream(uint32_t ssrc) { |
| 1275 LOG(LS_INFO) << "RemoveRecvStream: " << ssrc; | 1272 LOG(LS_INFO) << "RemoveRecvStream: " << ssrc; |
| 1276 if (ssrc == 0) { | 1273 if (ssrc == 0) { |
| 1277 LOG(LS_ERROR) << "RemoveRecvStream with 0 ssrc is not supported."; | 1274 LOG(LS_ERROR) << "RemoveRecvStream with 0 ssrc is not supported."; |
| 1278 return false; | 1275 return false; |
| 1279 } | 1276 } |
| 1280 | 1277 |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2319 } | 2316 } |
| 2320 | 2317 |
| 2321 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetRecvParameters( | 2318 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetRecvParameters( |
| 2322 const ChangedRecvParameters& params) { | 2319 const ChangedRecvParameters& params) { |
| 2323 bool needs_recreation = false; | 2320 bool needs_recreation = false; |
| 2324 std::vector<AllocatedDecoder> old_decoders; | 2321 std::vector<AllocatedDecoder> old_decoders; |
| 2325 if (params.codec_settings) { | 2322 if (params.codec_settings) { |
| 2326 ConfigureCodecs(*params.codec_settings, &old_decoders); | 2323 ConfigureCodecs(*params.codec_settings, &old_decoders); |
| 2327 needs_recreation = true; | 2324 needs_recreation = true; |
| 2328 } | 2325 } |
| 2329 if (params.rtp_header_extensions) { | |
| 2330 config_.rtp.extensions = *params.rtp_header_extensions; | |
| 2331 flexfec_config_.rtp_header_extensions = *params.rtp_header_extensions; | |
| 2332 needs_recreation = true; | |
| 2333 } | |
| 2334 if (needs_recreation) { | 2326 if (needs_recreation) { |
| 2335 LOG(LS_INFO) << "RecreateWebRtcStream (recv) because of SetRecvParameters"; | 2327 LOG(LS_INFO) << "RecreateWebRtcStream (recv) because of SetRecvParameters"; |
| 2336 RecreateWebRtcStream(); | 2328 RecreateWebRtcStream(); |
| 2337 ClearDecoders(&old_decoders); | 2329 ClearDecoders(&old_decoders); |
| 2338 } | 2330 } |
| 2339 } | 2331 } |
| 2340 | 2332 |
| 2341 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() { | 2333 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() { |
| 2342 if (stream_) { | 2334 if (stream_) { |
| 2343 call_->DestroyVideoReceiveStream(stream_); | 2335 call_->DestroyVideoReceiveStream(stream_); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2585 rtx_mapping[video_codecs[i].codec.id] != | 2577 rtx_mapping[video_codecs[i].codec.id] != |
| 2586 ulpfec_config.red_payload_type) { | 2578 ulpfec_config.red_payload_type) { |
| 2587 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2579 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2588 } | 2580 } |
| 2589 } | 2581 } |
| 2590 | 2582 |
| 2591 return video_codecs; | 2583 return video_codecs; |
| 2592 } | 2584 } |
| 2593 | 2585 |
| 2594 } // namespace cricket | 2586 } // namespace cricket |
| OLD | NEW |