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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 238 } |
239 | 239 |
240 VideoCodec::CodecType VideoCodec::GetCodecType() const { | 240 VideoCodec::CodecType VideoCodec::GetCodecType() const { |
241 const char* payload_name = name.c_str(); | 241 const char* payload_name = name.c_str(); |
242 if (_stricmp(payload_name, kRedCodecName) == 0) { | 242 if (_stricmp(payload_name, kRedCodecName) == 0) { |
243 return CODEC_RED; | 243 return CODEC_RED; |
244 } | 244 } |
245 if (_stricmp(payload_name, kUlpfecCodecName) == 0) { | 245 if (_stricmp(payload_name, kUlpfecCodecName) == 0) { |
246 return CODEC_ULPFEC; | 246 return CODEC_ULPFEC; |
247 } | 247 } |
| 248 if (_stricmp(payload_name, kFlexfecCodecName) == 0) { |
| 249 return CODEC_FLEXFEC; |
| 250 } |
248 if (_stricmp(payload_name, kRtxCodecName) == 0) { | 251 if (_stricmp(payload_name, kRtxCodecName) == 0) { |
249 return CODEC_RTX; | 252 return CODEC_RTX; |
250 } | 253 } |
251 | 254 |
252 return CODEC_VIDEO; | 255 return CODEC_VIDEO; |
253 } | 256 } |
254 | 257 |
255 bool VideoCodec::ValidateCodecFormat() const { | 258 bool VideoCodec::ValidateCodecFormat() const { |
256 if (id < 0 || id > 127) { | 259 if (id < 0 || id > 127) { |
257 LOG(LS_ERROR) << "Codec with invalid payload type: " << ToString(); | 260 LOG(LS_ERROR) << "Codec with invalid payload type: " << ToString(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 330 |
328 bool IsCodecSupported(const std::vector<VideoCodec>& supported_codecs, | 331 bool IsCodecSupported(const std::vector<VideoCodec>& supported_codecs, |
329 const VideoCodec& codec) { | 332 const VideoCodec& codec) { |
330 return std::any_of(supported_codecs.begin(), supported_codecs.end(), | 333 return std::any_of(supported_codecs.begin(), supported_codecs.end(), |
331 [&codec](const VideoCodec& supported_codec) -> bool { | 334 [&codec](const VideoCodec& supported_codec) -> bool { |
332 return CodecNamesEq(codec.name, supported_codec.name); | 335 return CodecNamesEq(codec.name, supported_codec.name); |
333 }); | 336 }); |
334 } | 337 } |
335 | 338 |
336 } // namespace cricket | 339 } // namespace cricket |
OLD | NEW |