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

Side by Side Diff: talk/session/media/mediasession.cc

Issue 1418123003: Adding reduced size RTCP configuration down to the video stream level. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing TODO comments. Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 bool add_legacy_stream, 719 bool add_legacy_stream,
720 StreamParamsVec* current_streams, 720 StreamParamsVec* current_streams,
721 MediaContentDescriptionImpl<C>* offer) { 721 MediaContentDescriptionImpl<C>* offer) {
722 offer->AddCodecs(codecs); 722 offer->AddCodecs(codecs);
723 offer->SortCodecs(); 723 offer->SortCodecs();
724 724
725 if (secure_policy == SEC_REQUIRED) { 725 if (secure_policy == SEC_REQUIRED) {
726 offer->set_crypto_required(CT_SDES); 726 offer->set_crypto_required(CT_SDES);
727 } 727 }
728 offer->set_rtcp_mux(options.rtcp_mux_enabled); 728 offer->set_rtcp_mux(options.rtcp_mux_enabled);
729 // TODO(pbos): Once we're sure this works correctly, enable it in CreateOffer.
pbos-webrtc 2015/12/03 00:15:49 Uh, I'd rather not own this.
730 // if (offer->type() == cricket::MEDIA_TYPE_VIDEO) {
731 // offer->set_rtcp_reduced_size(true);
732 // }
729 offer->set_multistream(options.is_muc); 733 offer->set_multistream(options.is_muc);
730 offer->set_rtp_header_extensions(rtp_extensions); 734 offer->set_rtp_header_extensions(rtp_extensions);
731 735
732 if (!AddStreamParams( 736 if (!AddStreamParams(
733 offer->type(), options.streams, current_streams, 737 offer->type(), options.streams, current_streams,
734 offer, add_legacy_stream)) { 738 offer, add_legacy_stream)) {
735 return false; 739 return false;
736 } 740 }
737 741
738 #ifdef HAVE_SRTP 742 #ifdef HAVE_SRTP
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 answer->AddCodecs(negotiated_codecs); 1001 answer->AddCodecs(negotiated_codecs);
998 answer->SortCodecs(); 1002 answer->SortCodecs();
999 answer->set_protocol(offer->protocol()); 1003 answer->set_protocol(offer->protocol());
1000 RtpHeaderExtensions negotiated_rtp_extensions; 1004 RtpHeaderExtensions negotiated_rtp_extensions;
1001 NegotiateRtpHeaderExtensions(local_rtp_extenstions, 1005 NegotiateRtpHeaderExtensions(local_rtp_extenstions,
1002 offer->rtp_header_extensions(), 1006 offer->rtp_header_extensions(),
1003 &negotiated_rtp_extensions); 1007 &negotiated_rtp_extensions);
1004 answer->set_rtp_header_extensions(negotiated_rtp_extensions); 1008 answer->set_rtp_header_extensions(negotiated_rtp_extensions);
1005 1009
1006 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux()); 1010 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux());
1011 // TODO(pbos): Once we're sure this works correctly, enable it in
pbos-webrtc 2015/12/03 00:15:49 Same here.
1012 // CreateAnswer.
1013 // if (answer->type() == cricket::MEDIA_TYPE_VIDEO) {
1014 // answer->set_rtcp_reduced_size(offer->rtcp_reduced_size());
1015 // }
1007 1016
1008 if (sdes_policy != SEC_DISABLED) { 1017 if (sdes_policy != SEC_DISABLED) {
1009 CryptoParams crypto; 1018 CryptoParams crypto;
1010 if (SelectCrypto(offer, bundle_enabled, &crypto)) { 1019 if (SelectCrypto(offer, bundle_enabled, &crypto)) {
1011 if (current_cryptos) { 1020 if (current_cryptos) {
1012 FindMatchingCrypto(*current_cryptos, crypto, &crypto); 1021 FindMatchingCrypto(*current_cryptos, crypto, &crypto);
1013 } 1022 }
1014 answer->AddCrypto(crypto); 1023 answer->AddCrypto(crypto);
1015 } 1024 }
1016 } 1025 }
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 1933 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
1925 } 1934 }
1926 1935
1927 const DataContentDescription* GetFirstDataContentDescription( 1936 const DataContentDescription* GetFirstDataContentDescription(
1928 const SessionDescription* sdesc) { 1937 const SessionDescription* sdesc) {
1929 return static_cast<const DataContentDescription*>( 1938 return static_cast<const DataContentDescription*>(
1930 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 1939 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
1931 } 1940 }
1932 1941
1933 } // namespace cricket 1942 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698