| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 PacketReadyCallback* callback) const; | 92 PacketReadyCallback* callback) const; |
| 93 | 93 |
| 94 protected: | 94 protected: |
| 95 RtcpPacket() {} | 95 RtcpPacket() {} |
| 96 | 96 |
| 97 virtual bool Create(uint8_t* packet, | 97 virtual bool Create(uint8_t* packet, |
| 98 size_t* index, | 98 size_t* index, |
| 99 size_t max_length, | 99 size_t max_length, |
| 100 PacketReadyCallback* callback) const = 0; | 100 PacketReadyCallback* callback) const = 0; |
| 101 | 101 |
| 102 void CreateHeader(uint8_t count_or_format, | 102 static void CreateHeader(uint8_t count_or_format, |
| 103 uint8_t packet_type, | 103 uint8_t packet_type, |
| 104 size_t length, | 104 size_t block_length, // Size in 32bit words - 1. |
| 105 uint8_t* buffer, | 105 uint8_t* buffer, |
| 106 size_t* pos) const; | 106 size_t* pos); |
| 107 | 107 |
| 108 bool OnBufferFull(uint8_t* packet, | 108 bool OnBufferFull(uint8_t* packet, |
| 109 size_t* index, | 109 size_t* index, |
| 110 RtcpPacket::PacketReadyCallback* callback) const; | 110 RtcpPacket::PacketReadyCallback* callback) const; |
| 111 | 111 |
| 112 virtual size_t BlockLength() const = 0; | 112 virtual size_t BlockLength() const = 0; |
| 113 size_t HeaderLength() const; | 113 size_t HeaderLength() const; |
| 114 | 114 |
| 115 static const size_t kHeaderLength = 4; | 115 static const size_t kHeaderLength = 4; |
| 116 | 116 |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 | 1155 |
| 1156 private: | 1156 private: |
| 1157 const size_t buffer_length_; | 1157 const size_t buffer_length_; |
| 1158 size_t length_; | 1158 size_t length_; |
| 1159 rtc::scoped_ptr<uint8_t[]> buffer_; | 1159 rtc::scoped_ptr<uint8_t[]> buffer_; |
| 1160 }; | 1160 }; |
| 1161 | 1161 |
| 1162 } // namespace rtcp | 1162 } // namespace rtcp |
| 1163 } // namespace webrtc | 1163 } // namespace webrtc |
| 1164 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ | 1164 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ |
| OLD | NEW |