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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 header->extension.playout_delay.min_ms = -1; | 242 header->extension.playout_delay.min_ms = -1; |
243 header->extension.playout_delay.max_ms = -1; | 243 header->extension.playout_delay.max_ms = -1; |
244 | 244 |
245 // May not be present in packet. | 245 // May not be present in packet. |
246 header->extension.hasVideoContentType = false; | 246 header->extension.hasVideoContentType = false; |
247 header->extension.videoContentType = VideoContentType::UNSPECIFIED; | 247 header->extension.videoContentType = VideoContentType::UNSPECIFIED; |
248 | 248 |
249 header->extension.has_video_timing = false; | 249 header->extension.has_video_timing = false; |
250 header->extension.video_timing = {0u, 0u, 0u, 0u, 0u, 0u, false}; | 250 header->extension.video_timing = {0u, 0u, 0u, 0u, 0u, 0u, false}; |
251 | 251 |
| 252 // May not be present in packet. |
| 253 header->extension.has_frame_marks = false; |
| 254 |
252 if (X) { | 255 if (X) { |
253 /* RTP header extension, RFC 3550. | 256 /* RTP header extension, RFC 3550. |
254 0 1 2 3 | 257 0 1 2 3 |
255 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 258 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
256 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 259 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
257 | defined by profile | length | | 260 | defined by profile | length | |
258 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 261 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
259 | header extension | | 262 | header extension | |
260 | .... | | 263 | .... | |
261 */ | 264 */ |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } | 479 } |
477 case kRtpExtensionRepairedRtpStreamId: { | 480 case kRtpExtensionRepairedRtpStreamId: { |
478 header->extension.repaired_stream_id.Set( | 481 header->extension.repaired_stream_id.Set( |
479 rtc::MakeArrayView(ptr, len + 1)); | 482 rtc::MakeArrayView(ptr, len + 1)); |
480 break; | 483 break; |
481 } | 484 } |
482 case kRtpExtensionMid: { | 485 case kRtpExtensionMid: { |
483 header->extension.mid.Set(rtc::MakeArrayView(ptr, len + 1)); | 486 header->extension.mid.Set(rtc::MakeArrayView(ptr, len + 1)); |
484 break; | 487 break; |
485 } | 488 } |
| 489 case kRtpExtensionFrameMarking: { |
| 490 if (!FrameMarking::Parse(rtc::MakeArrayView(ptr, len + 1), |
| 491 &header->extension.frame_marks)) { |
| 492 LOG(LS_WARNING) << "Incorrect frame marking extension"; |
| 493 return; |
| 494 } |
| 495 header->extension.has_frame_marks = true; |
| 496 break; |
| 497 } |
486 case kRtpExtensionNone: | 498 case kRtpExtensionNone: |
487 case kRtpExtensionNumberOfExtensions: { | 499 case kRtpExtensionNumberOfExtensions: { |
488 RTC_NOTREACHED() << "Invalid extension type: " << type; | 500 RTC_NOTREACHED() << "Invalid extension type: " << type; |
489 return; | 501 return; |
490 } | 502 } |
491 } | 503 } |
492 } | 504 } |
493 ptr += (len + 1); | 505 ptr += (len + 1); |
494 } | 506 } |
495 } | 507 } |
496 | 508 |
497 } // namespace RtpUtility | 509 } // namespace RtpUtility |
498 } // namespace webrtc | 510 } // namespace webrtc |
OLD | NEW |