OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 return false; | 675 return false; |
676 } | 676 } |
677 | 677 |
678 // Parse mandatory first byte of payload descriptor. | 678 // Parse mandatory first byte of payload descriptor. |
679 bool extension = (*payload_data & 0x80) ? true : false; // X bit | 679 bool extension = (*payload_data & 0x80) ? true : false; // X bit |
680 bool beginning_of_partition = (*payload_data & 0x10) ? true : false; // S bit | 680 bool beginning_of_partition = (*payload_data & 0x10) ? true : false; // S bit |
681 int partition_id = (*payload_data & 0x0F); // PartID field | 681 int partition_id = (*payload_data & 0x0F); // PartID field |
682 | 682 |
683 parsed_payload->type.Video.width = 0; | 683 parsed_payload->type.Video.width = 0; |
684 parsed_payload->type.Video.height = 0; | 684 parsed_payload->type.Video.height = 0; |
685 parsed_payload->type.Video.is_first_packet_in_frame = | 685 parsed_payload->type.Video.isFirstPacket = |
686 beginning_of_partition && (partition_id == 0); | 686 beginning_of_partition && (partition_id == 0); |
687 parsed_payload->type.Video.simulcastIdx = 0; | 687 parsed_payload->type.Video.simulcastIdx = 0; |
688 parsed_payload->type.Video.codec = kRtpVideoVp8; | 688 parsed_payload->type.Video.codec = kRtpVideoVp8; |
689 parsed_payload->type.Video.codecHeader.VP8.nonReference = | 689 parsed_payload->type.Video.codecHeader.VP8.nonReference = |
690 (*payload_data & 0x20) ? true : false; // N bit | 690 (*payload_data & 0x20) ? true : false; // N bit |
691 parsed_payload->type.Video.codecHeader.VP8.partitionId = partition_id; | 691 parsed_payload->type.Video.codecHeader.VP8.partitionId = partition_id; |
692 parsed_payload->type.Video.codecHeader.VP8.beginningOfPartition = | 692 parsed_payload->type.Video.codecHeader.VP8.beginningOfPartition = |
693 beginning_of_partition; | 693 beginning_of_partition; |
694 parsed_payload->type.Video.codecHeader.VP8.pictureId = kNoPictureId; | 694 parsed_payload->type.Video.codecHeader.VP8.pictureId = kNoPictureId; |
695 parsed_payload->type.Video.codecHeader.VP8.tl0PicIdx = kNoTl0PicIdx; | 695 parsed_payload->type.Video.codecHeader.VP8.tl0PicIdx = kNoTl0PicIdx; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 if (ParseVP8FrameSize(parsed_payload, payload_data, payload_data_length) != | 736 if (ParseVP8FrameSize(parsed_payload, payload_data, payload_data_length) != |
737 0) { | 737 0) { |
738 return false; | 738 return false; |
739 } | 739 } |
740 | 740 |
741 parsed_payload->payload = payload_data; | 741 parsed_payload->payload = payload_data; |
742 parsed_payload->payload_length = payload_data_length; | 742 parsed_payload->payload_length = payload_data_length; |
743 return true; | 743 return true; |
744 } | 744 } |
745 } // namespace webrtc | 745 } // namespace webrtc |
OLD | NEW |