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

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

Issue 1688383002: Implementing unified plan encoding of msid. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merging with master. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 } 144 }
145 145
146 const IceCandidateCollection* JsepSessionDescription::candidates( 146 const IceCandidateCollection* JsepSessionDescription::candidates(
147 size_t mediasection_index) const { 147 size_t mediasection_index) const {
148 if (mediasection_index >= candidate_collection_.size()) 148 if (mediasection_index >= candidate_collection_.size())
149 return NULL; 149 return NULL;
150 return &candidate_collection_[mediasection_index]; 150 return &candidate_collection_[mediasection_index];
151 } 151 }
152 152
153 bool JsepSessionDescription::ToString(std::string* out) const { 153 bool JsepSessionDescription::ToString(std::string* out) const {
154 if (!description_ || !out) 154 if (!description_ || !out) {
155 return false; 155 return false;
156 *out = SdpSerialize(*this); 156 }
157 *out = SdpSerialize(*this, false);
157 return !out->empty(); 158 return !out->empty();
158 } 159 }
159 160
160 bool JsepSessionDescription::GetMediasectionIndex( 161 bool JsepSessionDescription::GetMediasectionIndex(
161 const IceCandidateInterface* candidate, 162 const IceCandidateInterface* candidate,
162 size_t* index) { 163 size_t* index) {
163 if (!candidate || !index) { 164 if (!candidate || !index) {
164 return false; 165 return false;
165 } 166 }
166 *index = static_cast<size_t>(candidate->sdp_mline_index()); 167 *index = static_cast<size_t>(candidate->sdp_mline_index());
(...skipping 10 matching lines...) Expand all
177 if (!found) { 178 if (!found) {
178 // If the sdp_mid is presented but we can't find a match, we consider 179 // If the sdp_mid is presented but we can't find a match, we consider
179 // this as an error. 180 // this as an error.
180 return false; 181 return false;
181 } 182 }
182 } 183 }
183 return true; 184 return true;
184 } 185 }
185 186
186 } // namespace webrtc 187 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/jsepicecandidate.h ('k') | webrtc/api/webrtcsdp.h » ('j') | webrtc/api/webrtcsdp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698