| OLD | NEW |
| 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 bool add_legacy_stream, | 720 bool add_legacy_stream, |
| 721 StreamParamsVec* current_streams, | 721 StreamParamsVec* current_streams, |
| 722 MediaContentDescriptionImpl<C>* offer) { | 722 MediaContentDescriptionImpl<C>* offer) { |
| 723 offer->AddCodecs(codecs); | 723 offer->AddCodecs(codecs); |
| 724 offer->SortCodecs(); | 724 offer->SortCodecs(); |
| 725 | 725 |
| 726 if (secure_policy == SEC_REQUIRED) { | 726 if (secure_policy == SEC_REQUIRED) { |
| 727 offer->set_crypto_required(CT_SDES); | 727 offer->set_crypto_required(CT_SDES); |
| 728 } | 728 } |
| 729 offer->set_rtcp_mux(options.rtcp_mux_enabled); | 729 offer->set_rtcp_mux(options.rtcp_mux_enabled); |
| 730 // TODO(pthatcher): Once we support this, enable it in CreateOffer. |
| 731 // offer->set_rtcp_reduced_size(true); |
| 730 offer->set_multistream(options.is_muc); | 732 offer->set_multistream(options.is_muc); |
| 731 offer->set_rtp_header_extensions(rtp_extensions); | 733 offer->set_rtp_header_extensions(rtp_extensions); |
| 732 | 734 |
| 733 if (!AddStreamParams( | 735 if (!AddStreamParams( |
| 734 offer->type(), options.streams, current_streams, | 736 offer->type(), options.streams, current_streams, |
| 735 offer, add_legacy_stream)) { | 737 offer, add_legacy_stream)) { |
| 736 return false; | 738 return false; |
| 737 } | 739 } |
| 738 | 740 |
| 739 #ifdef HAVE_SRTP | 741 #ifdef HAVE_SRTP |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 answer->AddCodecs(negotiated_codecs); | 1000 answer->AddCodecs(negotiated_codecs); |
| 999 answer->SortCodecs(); | 1001 answer->SortCodecs(); |
| 1000 answer->set_protocol(offer->protocol()); | 1002 answer->set_protocol(offer->protocol()); |
| 1001 RtpHeaderExtensions negotiated_rtp_extensions; | 1003 RtpHeaderExtensions negotiated_rtp_extensions; |
| 1002 NegotiateRtpHeaderExtensions(local_rtp_extenstions, | 1004 NegotiateRtpHeaderExtensions(local_rtp_extenstions, |
| 1003 offer->rtp_header_extensions(), | 1005 offer->rtp_header_extensions(), |
| 1004 &negotiated_rtp_extensions); | 1006 &negotiated_rtp_extensions); |
| 1005 answer->set_rtp_header_extensions(negotiated_rtp_extensions); | 1007 answer->set_rtp_header_extensions(negotiated_rtp_extensions); |
| 1006 | 1008 |
| 1007 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux()); | 1009 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux()); |
| 1010 // TODO(pthatcher): Once we support this, enable it in CreateOffer. |
| 1011 // answer->set_rtcp_reduced_size(offer->rtcp_reduced_size()); |
| 1008 | 1012 |
| 1009 if (sdes_policy != SEC_DISABLED) { | 1013 if (sdes_policy != SEC_DISABLED) { |
| 1010 CryptoParams crypto; | 1014 CryptoParams crypto; |
| 1011 if (SelectCrypto(offer, bundle_enabled, &crypto)) { | 1015 if (SelectCrypto(offer, bundle_enabled, &crypto)) { |
| 1012 if (current_cryptos) { | 1016 if (current_cryptos) { |
| 1013 FindMatchingCrypto(*current_cryptos, crypto, &crypto); | 1017 FindMatchingCrypto(*current_cryptos, crypto, &crypto); |
| 1014 } | 1018 } |
| 1015 answer->AddCrypto(crypto); | 1019 answer->AddCrypto(crypto); |
| 1016 } | 1020 } |
| 1017 } | 1021 } |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1969 } else if (channel_name == GICE_CHANNEL_NAME_DATA_RTP || | 1973 } else if (channel_name == GICE_CHANNEL_NAME_DATA_RTP || |
| 1970 channel_name == GICE_CHANNEL_NAME_DATA_RTCP) { | 1974 channel_name == GICE_CHANNEL_NAME_DATA_RTCP) { |
| 1971 *media_type = MEDIA_TYPE_DATA; | 1975 *media_type = MEDIA_TYPE_DATA; |
| 1972 return true; | 1976 return true; |
| 1973 } | 1977 } |
| 1974 | 1978 |
| 1975 return false; | 1979 return false; |
| 1976 } | 1980 } |
| 1977 | 1981 |
| 1978 } // namespace cricket | 1982 } // namespace cricket |
| OLD | NEW |