OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Second parameter is value read from block header, | 43 // Second parameter is value read from block header, |
44 // i.e. size of block in 32bits excluding block header itself. | 44 // i.e. size of block in 32bits excluding block header itself. |
45 bool Parse(const uint8_t* buffer, uint16_t block_length_32bits); | 45 bool Parse(const uint8_t* buffer, uint16_t block_length_32bits); |
46 | 46 |
47 size_t BlockLength() const; | 47 size_t BlockLength() const; |
48 // Fills buffer with the Dlrr. | 48 // Fills buffer with the Dlrr. |
49 // Consumes BlockLength() bytes. | 49 // Consumes BlockLength() bytes. |
50 void Create(uint8_t* buffer) const; | 50 void Create(uint8_t* buffer) const; |
51 | 51 |
52 // Max 100 DLRR Items can be added per DLRR report block. | 52 // Max 100 DLRR Items can be added per DLRR report block. |
53 bool AddDlrrItem(const ReceiveTimeInfo& time_info); | 53 bool WithDlrrItem(const ReceiveTimeInfo& time_info); |
54 bool AddDlrrItem(uint32_t ssrc, uint32_t last_rr, uint32_t delay_last_rr); | 54 bool WithDlrrItem(uint32_t ssrc, uint32_t last_rr, uint32_t delay_last_rr); |
55 | 55 |
56 const std::vector<ReceiveTimeInfo>& sub_blocks() const { return sub_blocks_; } | 56 const std::vector<ReceiveTimeInfo>& sub_blocks() const { return sub_blocks_; } |
57 | 57 |
58 private: | 58 private: |
59 static const size_t kBlockHeaderLength = 4; | 59 static const size_t kBlockHeaderLength = 4; |
60 static const size_t kSubBlockLength = 12; | 60 static const size_t kSubBlockLength = 12; |
61 | 61 |
62 std::vector<ReceiveTimeInfo> sub_blocks_; | 62 std::vector<ReceiveTimeInfo> sub_blocks_; |
63 }; | 63 }; |
64 } // namespace rtcp | 64 } // namespace rtcp |
65 } // namespace webrtc | 65 } // namespace webrtc |
66 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_DLRR_H_ | 66 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_DLRR_H_ |
OLD | NEW |