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

Side by Side Diff: webrtc/api/webrtcsdp.cc

Issue 1844803002: Modify PeerConnection for end-to-end QuicDataChannel usage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2011 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 static const char kAttributeRtcpFb[] = "rtcp-fb"; 144 static const char kAttributeRtcpFb[] = "rtcp-fb";
145 static const char kAttributeSendRecv[] = "sendrecv"; 145 static const char kAttributeSendRecv[] = "sendrecv";
146 static const char kAttributeInactive[] = "inactive"; 146 static const char kAttributeInactive[] = "inactive";
147 // draft-ietf-mmusic-sctp-sdp-07 147 // draft-ietf-mmusic-sctp-sdp-07
148 // a=sctp-port 148 // a=sctp-port
149 static const char kAttributeSctpPort[] = "sctp-port"; 149 static const char kAttributeSctpPort[] = "sctp-port";
150 150
151 // Experimental flags 151 // Experimental flags
152 static const char kAttributeXGoogleFlag[] = "x-google-flag"; 152 static const char kAttributeXGoogleFlag[] = "x-google-flag";
153 static const char kValueConference[] = "conference"; 153 static const char kValueConference[] = "conference";
154 static const char kAttributeQuic[] = "quic";
Taylor Brandstetter 2016/04/01 23:23:42 Does it make sense for this to be an attribute? I
154 155
155 // Candidate 156 // Candidate
156 static const char kCandidateHost[] = "host"; 157 static const char kCandidateHost[] = "host";
157 static const char kCandidateSrflx[] = "srflx"; 158 static const char kCandidateSrflx[] = "srflx";
158 static const char kCandidatePrflx[] = "prflx"; 159 static const char kCandidatePrflx[] = "prflx";
159 static const char kCandidateRelay[] = "relay"; 160 static const char kCandidateRelay[] = "relay";
160 static const char kTcpCandidateType[] = "tcptype"; 161 static const char kTcpCandidateType[] = "tcptype";
161 162
162 static const char kSdpDelimiterEqual = '='; 163 static const char kSdpDelimiterEqual = '=';
163 static const char kSdpDelimiterSpace = ' '; 164 static const char kSdpDelimiterSpace = ' ';
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 kSessionOriginSessionVersion : jdesc.session_version(); 814 kSessionOriginSessionVersion : jdesc.session_version();
814 os << " " << session_id << " " << session_version << " " 815 os << " " << session_id << " " << session_version << " "
815 << kSessionOriginNettype << " " << kSessionOriginAddrtype << " " 816 << kSessionOriginNettype << " " << kSessionOriginAddrtype << " "
816 << kSessionOriginAddress; 817 << kSessionOriginAddress;
817 AddLine(os.str(), &message); 818 AddLine(os.str(), &message);
818 AddLine(kSessionName, &message); 819 AddLine(kSessionName, &message);
819 820
820 // Time Description. 821 // Time Description.
821 AddLine(kTimeDescription, &message); 822 AddLine(kTimeDescription, &message);
822 823
824 // QUIC Description.
825 if (desc->quic()) {
826 AddLine("a=quic", &message);
Taylor Brandstetter 2016/04/01 23:23:42 Replace this with: InitAttrLine(kAttributeQui
827 }
828
823 // Group 829 // Group
824 if (desc->HasGroup(cricket::GROUP_TYPE_BUNDLE)) { 830 if (desc->HasGroup(cricket::GROUP_TYPE_BUNDLE)) {
825 std::string group_line = kAttrGroup; 831 std::string group_line = kAttrGroup;
826 const cricket::ContentGroup* group = 832 const cricket::ContentGroup* group =
827 desc->GetGroupByName(cricket::GROUP_TYPE_BUNDLE); 833 desc->GetGroupByName(cricket::GROUP_TYPE_BUNDLE);
828 ASSERT(group != NULL); 834 ASSERT(group != NULL);
829 const cricket::ContentNames& content_names = group->content_names(); 835 const cricket::ContentNames& content_names = group->content_names();
830 for (cricket::ContentNames::const_iterator it = content_names.begin(); 836 for (cricket::ContentNames::const_iterator it = content_names.begin();
831 it != content_names.end(); ++it) { 837 it != content_names.end(); ++it) {
832 group_line.append(" "); 838 group_line.append(" ");
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 return false; 2003 return false;
1998 } 2004 }
1999 desc->set_msid_supported( 2005 desc->set_msid_supported(
2000 CaseInsensitiveFind(semantics, kMediaStreamSemantic)); 2006 CaseInsensitiveFind(semantics, kMediaStreamSemantic));
2001 } else if (HasAttribute(line, kAttributeExtmap)) { 2007 } else if (HasAttribute(line, kAttributeExtmap)) {
2002 RtpHeaderExtension extmap; 2008 RtpHeaderExtension extmap;
2003 if (!ParseExtmap(line, &extmap, error)) { 2009 if (!ParseExtmap(line, &extmap, error)) {
2004 return false; 2010 return false;
2005 } 2011 }
2006 session_extmaps->push_back(extmap); 2012 session_extmaps->push_back(extmap);
2013 } else if (HasAttribute(line, kAttributeQuic)) {
2014 desc->set_quic(true);
2007 } 2015 }
2008 } 2016 }
2009 2017
2010 return true; 2018 return true;
2011 } 2019 }
2012 2020
2013 bool ParseGroupAttribute(const std::string& line, 2021 bool ParseGroupAttribute(const std::string& line,
2014 cricket::SessionDescription* desc, 2022 cricket::SessionDescription* desc,
2015 SdpParseError* error) { 2023 SdpParseError* error) {
2016 ASSERT(desc != NULL); 2024 ASSERT(desc != NULL);
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3164 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3157 media_desc, payload_type, feedback_param); 3165 media_desc, payload_type, feedback_param);
3158 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3166 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3159 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3167 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3160 media_desc, payload_type, feedback_param); 3168 media_desc, payload_type, feedback_param);
3161 } 3169 }
3162 return true; 3170 return true;
3163 } 3171 }
3164 3172
3165 } // namespace webrtc 3173 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698