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

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

Issue 2690943011: Use the same draft version in SDP data channel answers as used in the offer. (Closed)
Patch Set: Fix variable names in media session tests and add some comments. Created 3 years, 10 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/pc/mediasession.h ('k') | webrtc/pc/mediasession_unittest.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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 sctpmap if the offer uses sctpmap.
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
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
OLDNEW
« no previous file with comments | « webrtc/pc/mediasession.h ('k') | webrtc/pc/mediasession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698