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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 header->extension.videoRotation = kVideoRotation_0; | 246 header->extension.videoRotation = kVideoRotation_0; |
247 | 247 |
248 // May not be present in packet. | 248 // May not be present in packet. |
249 header->extension.playout_delay.min_ms = -1; | 249 header->extension.playout_delay.min_ms = -1; |
250 header->extension.playout_delay.max_ms = -1; | 250 header->extension.playout_delay.max_ms = -1; |
251 | 251 |
252 // May not be present in packet. | 252 // May not be present in packet. |
253 header->extension.hasVideoContentType = false; | 253 header->extension.hasVideoContentType = false; |
254 header->extension.videoContentType = VideoContentType::UNSPECIFIED; | 254 header->extension.videoContentType = VideoContentType::UNSPECIFIED; |
255 | 255 |
| 256 // May not be present in packet. |
| 257 header->extension.hasFrameMarks = false; |
| 258 |
256 if (X) { | 259 if (X) { |
257 /* RTP header extension, RFC 3550. | 260 /* RTP header extension, RFC 3550. |
258 0 1 2 3 | 261 0 1 2 3 |
259 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 | 262 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 |
260 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 263 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
261 | defined by profile | length | | 264 | defined by profile | length | |
262 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 265 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
263 | header extension | | 266 | header extension | |
264 | .... | | 267 | .... | |
265 */ | 268 */ |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 } | 469 } |
467 case kRtpExtensionRtpStreamId: { | 470 case kRtpExtensionRtpStreamId: { |
468 header->extension.stream_id.Set(rtc::MakeArrayView(ptr, len + 1)); | 471 header->extension.stream_id.Set(rtc::MakeArrayView(ptr, len + 1)); |
469 break; | 472 break; |
470 } | 473 } |
471 case kRtpExtensionRepairedRtpStreamId: { | 474 case kRtpExtensionRepairedRtpStreamId: { |
472 header->extension.repaired_stream_id.Set( | 475 header->extension.repaired_stream_id.Set( |
473 rtc::MakeArrayView(ptr, len + 1)); | 476 rtc::MakeArrayView(ptr, len + 1)); |
474 break; | 477 break; |
475 } | 478 } |
| 479 case kRtpExtensionFrameMarking: { |
| 480 if (!FrameMarking::Parse(rtc::MakeArrayView(ptr, len + 1), |
| 481 &header->extension.frame_marks)) { |
| 482 LOG(LS_WARNING) << "Incorrect frame marking extension"; |
| 483 return; |
| 484 } |
| 485 header->extension.hasFrameMarks = true; |
| 486 break; |
| 487 } |
476 case kRtpExtensionNone: | 488 case kRtpExtensionNone: |
477 case kRtpExtensionNumberOfExtensions: { | 489 case kRtpExtensionNumberOfExtensions: { |
478 RTC_NOTREACHED() << "Invalid extension type: " << type; | 490 RTC_NOTREACHED() << "Invalid extension type: " << type; |
479 return; | 491 return; |
480 } | 492 } |
481 } | 493 } |
482 } | 494 } |
483 ptr += (len + 1); | 495 ptr += (len + 1); |
484 } | 496 } |
485 } | 497 } |
486 | 498 |
487 } // namespace RtpUtility | 499 } // namespace RtpUtility |
488 } // namespace webrtc | 500 } // namespace webrtc |
OLD | NEW |