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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1989 sdes_policy, | 1989 sdes_policy, |
1990 GetCryptos(GetFirstDataContentDescription(current_description)), | 1990 GetCryptos(GetFirstDataContentDescription(current_description)), |
1991 RtpHeaderExtensions(), | 1991 RtpHeaderExtensions(), |
1992 current_streams, | 1992 current_streams, |
1993 add_legacy_, | 1993 add_legacy_, |
1994 bundle_enabled, | 1994 bundle_enabled, |
1995 data_answer.get())) { | 1995 data_answer.get())) { |
1996 return false; // Fails the session setup. | 1996 return false; // Fails the session setup. |
1997 } | 1997 } |
1998 | 1998 |
1999 // Respond with sctmap if the offer uses sctmap. | |
Taylor Brandstetter
2017/02/17 02:10:56
Missing a 'p'
Zach Stein
2017/02/17 21:29:17
Done.
| |
2000 const DataContentDescription* offer_data_description = | |
2001 static_cast<const DataContentDescription*>(data_content->description); | |
2002 bool offer_uses_sctpmap = offer_data_description->use_sctpmap(); | |
2003 data_answer->set_use_sctpmap(offer_uses_sctpmap); | |
2004 | |
1999 bool rejected = !options.has_data() || data_content->rejected || | 2005 bool rejected = !options.has_data() || data_content->rejected || |
2000 !IsMediaProtocolSupported(MEDIA_TYPE_DATA, | 2006 !IsMediaProtocolSupported(MEDIA_TYPE_DATA, |
2001 data_answer->protocol(), | 2007 data_answer->protocol(), |
2002 data_transport->secure()); | 2008 data_transport->secure()); |
2003 if (!rejected) { | 2009 if (!rejected) { |
2004 data_answer->set_bandwidth(options.data_bandwidth); | 2010 data_answer->set_bandwidth(options.data_bandwidth); |
2005 if (!AddTransportAnswer(data_content->name, *(data_transport.get()), | 2011 if (!AddTransportAnswer(data_content->name, *(data_transport.get()), |
2006 answer)) { | 2012 answer)) { |
2007 return false; | 2013 return false; |
2008 } | 2014 } |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2169 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2175 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
2170 } | 2176 } |
2171 | 2177 |
2172 DataContentDescription* GetFirstDataContentDescription( | 2178 DataContentDescription* GetFirstDataContentDescription( |
2173 SessionDescription* sdesc) { | 2179 SessionDescription* sdesc) { |
2174 return static_cast<DataContentDescription*>( | 2180 return static_cast<DataContentDescription*>( |
2175 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2181 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
2176 } | 2182 } |
2177 | 2183 |
2178 } // namespace cricket | 2184 } // namespace cricket |
OLD | NEW |