| 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 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 if (flexfec_enabled) { | 1582 if (flexfec_enabled) { |
| 1583 LOG(LS_INFO) << "Multiple FlexFEC streams proposed by remote, but " | 1583 LOG(LS_INFO) << "Multiple FlexFEC streams proposed by remote, but " |
| 1584 "our implementation only supports a single FlexFEC " | 1584 "our implementation only supports a single FlexFEC " |
| 1585 "stream. Will not enable FlexFEC for proposed " | 1585 "stream. Will not enable FlexFEC for proposed " |
| 1586 "stream with SSRC: " | 1586 "stream with SSRC: " |
| 1587 << flexfec_ssrc << "."; | 1587 << flexfec_ssrc << "."; |
| 1588 continue; | 1588 continue; |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 flexfec_enabled = true; | 1591 flexfec_enabled = true; |
| 1592 parameters_.config.rtp.flexfec.flexfec_ssrc = flexfec_ssrc; | 1592 parameters_.config.rtp.flexfec.ssrc = flexfec_ssrc; |
| 1593 parameters_.config.rtp.flexfec.protected_media_ssrcs = {primary_ssrc}; | 1593 parameters_.config.rtp.flexfec.protected_media_ssrcs = {primary_ssrc}; |
| 1594 } | 1594 } |
| 1595 } | 1595 } |
| 1596 } | 1596 } |
| 1597 | 1597 |
| 1598 parameters_.config.rtp.c_name = sp.cname; | 1598 parameters_.config.rtp.c_name = sp.cname; |
| 1599 if (rtp_extensions) { | 1599 if (rtp_extensions) { |
| 1600 parameters_.config.rtp.extensions = *rtp_extensions; | 1600 parameters_.config.rtp.extensions = *rtp_extensions; |
| 1601 } | 1601 } |
| 1602 parameters_.config.rtp.rtcp_mode = send_params.rtcp.reduced_size | 1602 parameters_.config.rtp.rtcp_mode = send_params.rtcp.reduced_size |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 if (new_encoder.external) { | 1713 if (new_encoder.external) { |
| 1714 webrtc::VideoCodecType type = | 1714 webrtc::VideoCodecType type = |
| 1715 webrtc::PayloadNameToCodecType(codec_settings.codec.name) | 1715 webrtc::PayloadNameToCodecType(codec_settings.codec.name) |
| 1716 .value_or(webrtc::kVideoCodecUnknown); | 1716 .value_or(webrtc::kVideoCodecUnknown); |
| 1717 parameters_.config.encoder_settings.internal_source = | 1717 parameters_.config.encoder_settings.internal_source = |
| 1718 external_encoder_factory_->EncoderTypeHasInternalSource(type); | 1718 external_encoder_factory_->EncoderTypeHasInternalSource(type); |
| 1719 } else { | 1719 } else { |
| 1720 parameters_.config.encoder_settings.internal_source = false; | 1720 parameters_.config.encoder_settings.internal_source = false; |
| 1721 } | 1721 } |
| 1722 parameters_.config.rtp.ulpfec = codec_settings.ulpfec; | 1722 parameters_.config.rtp.ulpfec = codec_settings.ulpfec; |
| 1723 parameters_.config.rtp.flexfec.flexfec_payload_type = | 1723 parameters_.config.rtp.flexfec.payload_type = |
| 1724 codec_settings.flexfec_payload_type; | 1724 codec_settings.flexfec_payload_type; |
| 1725 | 1725 |
| 1726 // Set RTX payload type if RTX is enabled. | 1726 // Set RTX payload type if RTX is enabled. |
| 1727 if (!parameters_.config.rtp.rtx.ssrcs.empty()) { | 1727 if (!parameters_.config.rtp.rtx.ssrcs.empty()) { |
| 1728 if (codec_settings.rtx_payload_type == -1) { | 1728 if (codec_settings.rtx_payload_type == -1) { |
| 1729 LOG(LS_WARNING) << "RTX SSRCs configured but there's no configured RTX " | 1729 LOG(LS_WARNING) << "RTX SSRCs configured but there's no configured RTX " |
| 1730 "payload type. Ignoring."; | 1730 "payload type. Ignoring."; |
| 1731 parameters_.config.rtp.rtx.ssrcs.clear(); | 1731 parameters_.config.rtp.rtx.ssrcs.clear(); |
| 1732 } else { | 1732 } else { |
| 1733 parameters_.config.rtp.rtx.payload_type = codec_settings.rtx_payload_type; | 1733 parameters_.config.rtp.rtx.payload_type = codec_settings.rtx_payload_type; |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 rtx_mapping[video_codecs[i].codec.id] != | 2508 rtx_mapping[video_codecs[i].codec.id] != |
| 2509 ulpfec_config.red_payload_type) { | 2509 ulpfec_config.red_payload_type) { |
| 2510 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2510 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2511 } | 2511 } |
| 2512 } | 2512 } |
| 2513 | 2513 |
| 2514 return video_codecs; | 2514 return video_codecs; |
| 2515 } | 2515 } |
| 2516 | 2516 |
| 2517 } // namespace cricket | 2517 } // namespace cricket |
| OLD | NEW |