| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // 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 | 736 // 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 |
| 737 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 737 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 738 // |V=2|P| RC/FMT | PT | length | | 738 // |V=2|P| RC/FMT | PT | length | |
| 739 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 739 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 740 | 740 |
| 741 void RtcpPacket::CreateHeader( | 741 void RtcpPacket::CreateHeader( |
| 742 uint8_t count_or_format, // Depends on packet type. | 742 uint8_t count_or_format, // Depends on packet type. |
| 743 uint8_t packet_type, | 743 uint8_t packet_type, |
| 744 size_t length, | 744 size_t length, |
| 745 uint8_t* buffer, | 745 uint8_t* buffer, |
| 746 size_t* pos) const { | 746 size_t* pos) { |
| 747 assert(length <= 0xffff); | 747 assert(length <= 0xffff); |
| 748 const uint8_t kVersion = 2; | 748 const uint8_t kVersion = 2; |
| 749 AssignUWord8(buffer, pos, (kVersion << 6) + count_or_format); | 749 AssignUWord8(buffer, pos, (kVersion << 6) + count_or_format); |
| 750 AssignUWord8(buffer, pos, packet_type); | 750 AssignUWord8(buffer, pos, packet_type); |
| 751 AssignUWord16(buffer, pos, length); | 751 AssignUWord16(buffer, pos, length); |
| 752 } | 752 } |
| 753 | 753 |
| 754 bool Empty::Create(uint8_t* packet, | 754 bool Empty::Create(uint8_t* packet, |
| 755 size_t* index, | 755 size_t* index, |
| 756 size_t max_length, | 756 size_t max_length, |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 return length_; | 1220 return length_; |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 void RawPacket::SetLength(size_t length) { | 1223 void RawPacket::SetLength(size_t length) { |
| 1224 assert(length <= buffer_length_); | 1224 assert(length <= buffer_length_); |
| 1225 length_ = length; | 1225 length_ = length; |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 } // namespace rtcp | 1228 } // namespace rtcp |
| 1229 } // namespace webrtc | 1229 } // namespace webrtc |
| OLD | NEW |