OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 const Codec* FindCodecById(const std::vector<Codec>& codecs, int payload_type) { | 205 const Codec* FindCodecById(const std::vector<Codec>& codecs, int payload_type) { |
206 for (const auto& codec : codecs) { | 206 for (const auto& codec : codecs) { |
207 if (codec.id == payload_type) | 207 if (codec.id == payload_type) |
208 return &codec; | 208 return &codec; |
209 } | 209 } |
210 return nullptr; | 210 return nullptr; |
211 } | 211 } |
212 | 212 |
213 bool CodecNamesEq(const std::string& name1, const std::string& name2); | 213 bool CodecNamesEq(const std::string& name1, const std::string& name2); |
214 bool CodecNamesEq(const char* name1, const char* name2); | 214 bool CodecNamesEq(const char* name1, const char* name2); |
215 webrtc::VideoCodecType CodecTypeFromName(const std::string& name); | |
216 bool HasNack(const Codec& codec); | 215 bool HasNack(const Codec& codec); |
217 bool HasRemb(const Codec& codec); | 216 bool HasRemb(const Codec& codec); |
218 bool HasTransportCc(const Codec& codec); | 217 bool HasTransportCc(const Codec& codec); |
219 // Returns the first codec in |supported_codecs| that matches |codec|, or | 218 // Returns the first codec in |supported_codecs| that matches |codec|, or |
220 // nullptr if no codec matches. | 219 // nullptr if no codec matches. |
221 const VideoCodec* FindMatchingCodec( | 220 const VideoCodec* FindMatchingCodec( |
222 const std::vector<VideoCodec>& supported_codecs, | 221 const std::vector<VideoCodec>& supported_codecs, |
223 const VideoCodec& codec); | 222 const VideoCodec& codec); |
224 | 223 |
225 } // namespace cricket | 224 } // namespace cricket |
226 | 225 |
227 #endif // WEBRTC_MEDIA_BASE_CODEC_H_ | 226 #endif // WEBRTC_MEDIA_BASE_CODEC_H_ |
OLD | NEW |