Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: webrtc/pc/mediasession.cc

Issue 1713493003: Enabling rtcp-rsize negotiation and fixing some issues with it. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing unit test and adding more TODOs. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 bool add_legacy_stream, 748 bool add_legacy_stream,
749 StreamParamsVec* current_streams, 749 StreamParamsVec* current_streams,
750 MediaContentDescriptionImpl<C>* offer) { 750 MediaContentDescriptionImpl<C>* offer) {
751 offer->AddCodecs(codecs); 751 offer->AddCodecs(codecs);
752 offer->SortCodecs(); 752 offer->SortCodecs();
753 753
754 if (secure_policy == SEC_REQUIRED) { 754 if (secure_policy == SEC_REQUIRED) {
755 offer->set_crypto_required(CT_SDES); 755 offer->set_crypto_required(CT_SDES);
756 } 756 }
757 offer->set_rtcp_mux(options.rtcp_mux_enabled); 757 offer->set_rtcp_mux(options.rtcp_mux_enabled);
758 // TODO(deadbeef): Once we're sure this works correctly, enable it in 758 if (offer->type() == cricket::MEDIA_TYPE_VIDEO) {
759 // CreateOffer. 759 offer->set_rtcp_reduced_size(true);
760 // if (offer->type() == cricket::MEDIA_TYPE_VIDEO) { 760 }
761 // offer->set_rtcp_reduced_size(true);
762 // }
763 offer->set_multistream(options.is_muc); 761 offer->set_multistream(options.is_muc);
764 offer->set_rtp_header_extensions(rtp_extensions); 762 offer->set_rtp_header_extensions(rtp_extensions);
765 763
766 if (!AddStreamParams( 764 if (!AddStreamParams(
767 offer->type(), options.streams, current_streams, 765 offer->type(), options.streams, current_streams,
768 offer, add_legacy_stream)) { 766 offer, add_legacy_stream)) {
769 return false; 767 return false;
770 } 768 }
771 769
772 #ifdef HAVE_SRTP 770 #ifdef HAVE_SRTP
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 answer->AddCodecs(negotiated_codecs); 1044 answer->AddCodecs(negotiated_codecs);
1047 answer->SortCodecs(); 1045 answer->SortCodecs();
1048 answer->set_protocol(offer->protocol()); 1046 answer->set_protocol(offer->protocol());
1049 RtpHeaderExtensions negotiated_rtp_extensions; 1047 RtpHeaderExtensions negotiated_rtp_extensions;
1050 NegotiateRtpHeaderExtensions(local_rtp_extenstions, 1048 NegotiateRtpHeaderExtensions(local_rtp_extenstions,
1051 offer->rtp_header_extensions(), 1049 offer->rtp_header_extensions(),
1052 &negotiated_rtp_extensions); 1050 &negotiated_rtp_extensions);
1053 answer->set_rtp_header_extensions(negotiated_rtp_extensions); 1051 answer->set_rtp_header_extensions(negotiated_rtp_extensions);
1054 1052
1055 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux()); 1053 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux());
1056 // TODO(deadbeef): Once we're sure this works correctly, enable it in 1054 if (answer->type() == cricket::MEDIA_TYPE_VIDEO) {
1057 // CreateAnswer. 1055 answer->set_rtcp_reduced_size(offer->rtcp_reduced_size());
1058 // if (answer->type() == cricket::MEDIA_TYPE_VIDEO) { 1056 }
1059 // answer->set_rtcp_reduced_size(offer->rtcp_reduced_size());
1060 // }
1061 1057
1062 if (sdes_policy != SEC_DISABLED) { 1058 if (sdes_policy != SEC_DISABLED) {
1063 CryptoParams crypto; 1059 CryptoParams crypto;
1064 if (SelectCrypto(offer, bundle_enabled, &crypto)) { 1060 if (SelectCrypto(offer, bundle_enabled, &crypto)) {
1065 if (current_cryptos) { 1061 if (current_cryptos) {
1066 FindMatchingCrypto(*current_cryptos, crypto, &crypto); 1062 FindMatchingCrypto(*current_cryptos, crypto, &crypto);
1067 } 1063 }
1068 answer->AddCrypto(crypto); 1064 answer->AddCrypto(crypto);
1069 } 1065 }
1070 } 1066 }
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 1994 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
1999 } 1995 }
2000 1996
2001 const DataContentDescription* GetFirstDataContentDescription( 1997 const DataContentDescription* GetFirstDataContentDescription(
2002 const SessionDescription* sdesc) { 1998 const SessionDescription* sdesc) {
2003 return static_cast<const DataContentDescription*>( 1999 return static_cast<const DataContentDescription*>(
2004 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2000 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2005 } 2001 }
2006 2002
2007 } // namespace cricket 2003 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698