OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 if (len != 0) { | 445 if (len != 0) { |
446 LOG(LS_WARNING) << "Incorrect video content type len: " << len; | 446 LOG(LS_WARNING) << "Incorrect video content type len: " << len; |
447 return; | 447 return; |
448 } | 448 } |
449 // 0 1 | 449 // 0 1 |
450 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | 450 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 |
451 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 451 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
452 // | ID | len=0 | Content type | | 452 // | ID | len=0 | Content type | |
453 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 453 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
454 | 454 |
455 if (ptr[0] < | 455 if (videocontenttypehelpers::IsValidContentType(ptr[0])) { |
456 static_cast<uint8_t>(VideoContentType::TOTAL_CONTENT_TYPES)) { | |
457 header->extension.hasVideoContentType = true; | 456 header->extension.hasVideoContentType = true; |
458 header->extension.videoContentType = | 457 header->extension.videoContentType = |
459 static_cast<VideoContentType>(ptr[0]); | 458 static_cast<VideoContentType>(ptr[0]); |
460 } | 459 } |
461 break; | 460 break; |
462 } | 461 } |
463 case kRtpExtensionVideoTiming: { | 462 case kRtpExtensionVideoTiming: { |
464 if (len != VideoTimingExtension::kValueSizeBytes - 1) { | 463 if (len != VideoTimingExtension::kValueSizeBytes - 1) { |
465 LOG(LS_WARNING) << "Incorrect video timing len: " << len; | 464 LOG(LS_WARNING) << "Incorrect video timing len: " << len; |
466 return; | 465 return; |
(...skipping 22 matching lines...) Expand all Loading... |
489 return; | 488 return; |
490 } | 489 } |
491 } | 490 } |
492 } | 491 } |
493 ptr += (len + 1); | 492 ptr += (len + 1); |
494 } | 493 } |
495 } | 494 } |
496 | 495 |
497 } // namespace RtpUtility | 496 } // namespace RtpUtility |
498 } // namespace webrtc | 497 } // namespace webrtc |
OLD | NEW |