OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 bool add_legacy_stream, | 739 bool add_legacy_stream, |
740 StreamParamsVec* current_streams, | 740 StreamParamsVec* current_streams, |
741 MediaContentDescriptionImpl<C>* offer) { | 741 MediaContentDescriptionImpl<C>* offer) { |
742 offer->AddCodecs(codecs); | 742 offer->AddCodecs(codecs); |
743 offer->SortCodecs(); | 743 offer->SortCodecs(); |
744 | 744 |
745 if (secure_policy == SEC_REQUIRED) { | 745 if (secure_policy == SEC_REQUIRED) { |
746 offer->set_crypto_required(CT_SDES); | 746 offer->set_crypto_required(CT_SDES); |
747 } | 747 } |
748 offer->set_rtcp_mux(options.rtcp_mux_enabled); | 748 offer->set_rtcp_mux(options.rtcp_mux_enabled); |
749 // TODO(deadbeef): Once we're sure this works correctly, enable it in | 749 if (offer->type() == cricket::MEDIA_TYPE_VIDEO) { |
750 // CreateOffer. | 750 offer->set_rtcp_reduced_size(true); |
751 // if (offer->type() == cricket::MEDIA_TYPE_VIDEO) { | 751 } |
752 // offer->set_rtcp_reduced_size(true); | |
753 // } | |
754 offer->set_multistream(options.is_muc); | 752 offer->set_multistream(options.is_muc); |
755 offer->set_rtp_header_extensions(rtp_extensions); | 753 offer->set_rtp_header_extensions(rtp_extensions); |
756 | 754 |
757 if (!AddStreamParams( | 755 if (!AddStreamParams( |
758 offer->type(), options.streams, current_streams, | 756 offer->type(), options.streams, current_streams, |
759 offer, add_legacy_stream)) { | 757 offer, add_legacy_stream)) { |
760 return false; | 758 return false; |
761 } | 759 } |
762 | 760 |
763 #ifdef HAVE_SRTP | 761 #ifdef HAVE_SRTP |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 answer->AddCodecs(negotiated_codecs); | 1020 answer->AddCodecs(negotiated_codecs); |
1023 answer->SortCodecs(); | 1021 answer->SortCodecs(); |
1024 answer->set_protocol(offer->protocol()); | 1022 answer->set_protocol(offer->protocol()); |
1025 RtpHeaderExtensions negotiated_rtp_extensions; | 1023 RtpHeaderExtensions negotiated_rtp_extensions; |
1026 NegotiateRtpHeaderExtensions(local_rtp_extenstions, | 1024 NegotiateRtpHeaderExtensions(local_rtp_extenstions, |
1027 offer->rtp_header_extensions(), | 1025 offer->rtp_header_extensions(), |
1028 &negotiated_rtp_extensions); | 1026 &negotiated_rtp_extensions); |
1029 answer->set_rtp_header_extensions(negotiated_rtp_extensions); | 1027 answer->set_rtp_header_extensions(negotiated_rtp_extensions); |
1030 | 1028 |
1031 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux()); | 1029 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux()); |
1032 // TODO(deadbeef): Once we're sure this works correctly, enable it in | 1030 if (answer->type() == cricket::MEDIA_TYPE_VIDEO) { |
1033 // CreateAnswer. | 1031 answer->set_rtcp_reduced_size(offer->rtcp_reduced_size()); |
1034 // if (answer->type() == cricket::MEDIA_TYPE_VIDEO) { | 1032 } |
1035 // answer->set_rtcp_reduced_size(offer->rtcp_reduced_size()); | |
1036 // } | |
1037 | 1033 |
1038 if (sdes_policy != SEC_DISABLED) { | 1034 if (sdes_policy != SEC_DISABLED) { |
1039 CryptoParams crypto; | 1035 CryptoParams crypto; |
1040 if (SelectCrypto(offer, bundle_enabled, &crypto)) { | 1036 if (SelectCrypto(offer, bundle_enabled, &crypto)) { |
1041 if (current_cryptos) { | 1037 if (current_cryptos) { |
1042 FindMatchingCrypto(*current_cryptos, crypto, &crypto); | 1038 FindMatchingCrypto(*current_cryptos, crypto, &crypto); |
1043 } | 1039 } |
1044 answer->AddCrypto(crypto); | 1040 answer->AddCrypto(crypto); |
1045 } | 1041 } |
1046 } | 1042 } |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 1966 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
1971 } | 1967 } |
1972 | 1968 |
1973 const DataContentDescription* GetFirstDataContentDescription( | 1969 const DataContentDescription* GetFirstDataContentDescription( |
1974 const SessionDescription* sdesc) { | 1970 const SessionDescription* sdesc) { |
1975 return static_cast<const DataContentDescription*>( | 1971 return static_cast<const DataContentDescription*>( |
1976 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 1972 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
1977 } | 1973 } |
1978 | 1974 |
1979 } // namespace cricket | 1975 } // namespace cricket |
OLD | NEW |