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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 for (StreamParamsVec::const_iterator it = streams.begin(); | 295 for (StreamParamsVec::const_iterator it = streams.begin(); |
296 it != streams.end(); ++it) { | 296 it != streams.end(); ++it) { |
297 stream_params->push_back(*it); | 297 stream_params->push_back(*it); |
298 } | 298 } |
299 } | 299 } |
300 } | 300 } |
301 | 301 |
302 // Filters the data codecs for the data channel type. | 302 // Filters the data codecs for the data channel type. |
303 void FilterDataCodecs(std::vector<DataCodec>* codecs, bool sctp) { | 303 void FilterDataCodecs(std::vector<DataCodec>* codecs, bool sctp) { |
304 // Filter RTP codec for SCTP and vice versa. | 304 // Filter RTP codec for SCTP and vice versa. |
305 int codec_id = sctp ? kGoogleRtpDataCodecId : kGoogleSctpDataCodecId; | 305 const char* codec_name = |
| 306 sctp ? kGoogleRtpDataCodecName : kGoogleSctpDataCodecName; |
306 for (std::vector<DataCodec>::iterator iter = codecs->begin(); | 307 for (std::vector<DataCodec>::iterator iter = codecs->begin(); |
307 iter != codecs->end();) { | 308 iter != codecs->end();) { |
308 if (iter->id == codec_id) { | 309 if (CodecNamesEq(iter->name, codec_name)) { |
309 iter = codecs->erase(iter); | 310 iter = codecs->erase(iter); |
310 } else { | 311 } else { |
311 ++iter; | 312 ++iter; |
312 } | 313 } |
313 } | 314 } |
314 } | 315 } |
315 | 316 |
316 template <typename IdStruct> | 317 template <typename IdStruct> |
317 class UsedIds { | 318 class UsedIds { |
318 public: | 319 public: |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2161 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
2161 } | 2162 } |
2162 | 2163 |
2163 DataContentDescription* GetFirstDataContentDescription( | 2164 DataContentDescription* GetFirstDataContentDescription( |
2164 SessionDescription* sdesc) { | 2165 SessionDescription* sdesc) { |
2165 return static_cast<DataContentDescription*>( | 2166 return static_cast<DataContentDescription*>( |
2166 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2167 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
2167 } | 2168 } |
2168 | 2169 |
2169 } // namespace cricket | 2170 } // namespace cricket |
OLD | NEW |