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 15 matching lines...) Expand all Loading... |
26 // | SSRC_1 (SSRC of first receiver) | sub- | 26 // | SSRC_1 (SSRC of first receiver) | sub- |
27 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block | 27 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block |
28 // | last RR (LRR) | 1 | 28 // | last RR (LRR) | 1 |
29 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 29 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
30 // | delay since last RR (DLRR) | | 30 // | delay since last RR (DLRR) | |
31 // +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | 31 // +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
32 // | SSRC_2 (SSRC of second receiver) | sub- | 32 // | SSRC_2 (SSRC of second receiver) | sub- |
33 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block | 33 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ block |
34 // : ... : 2 | 34 // : ... : 2 |
35 | 35 |
| 36 Dlrr::Dlrr() = default; |
| 37 |
| 38 Dlrr::Dlrr(const Dlrr& other) = default; |
| 39 |
| 40 Dlrr::~Dlrr() = default; |
| 41 |
36 bool Dlrr::Parse(const uint8_t* buffer, uint16_t block_length_32bits) { | 42 bool Dlrr::Parse(const uint8_t* buffer, uint16_t block_length_32bits) { |
37 RTC_DCHECK(buffer[0] == kBlockType); | 43 RTC_DCHECK(buffer[0] == kBlockType); |
38 // kReserved = buffer[1]; | 44 // kReserved = buffer[1]; |
39 RTC_DCHECK_EQ(block_length_32bits, | 45 RTC_DCHECK_EQ(block_length_32bits, |
40 ByteReader<uint16_t>::ReadBigEndian(&buffer[2])); | 46 ByteReader<uint16_t>::ReadBigEndian(&buffer[2])); |
41 if (block_length_32bits % 3 != 0) { | 47 if (block_length_32bits % 3 != 0) { |
42 LOG(LS_WARNING) << "Invalid size for dlrr block."; | 48 LOG(LS_WARNING) << "Invalid size for dlrr block."; |
43 return false; | 49 return false; |
44 } | 50 } |
45 | 51 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 ByteWriter<uint32_t>::WriteBigEndian(&write_at[4], sub_block.last_rr); | 83 ByteWriter<uint32_t>::WriteBigEndian(&write_at[4], sub_block.last_rr); |
78 ByteWriter<uint32_t>::WriteBigEndian(&write_at[8], | 84 ByteWriter<uint32_t>::WriteBigEndian(&write_at[8], |
79 sub_block.delay_since_last_rr); | 85 sub_block.delay_since_last_rr); |
80 write_at += kSubBlockLength; | 86 write_at += kSubBlockLength; |
81 } | 87 } |
82 RTC_DCHECK_EQ(buffer + BlockLength(), write_at); | 88 RTC_DCHECK_EQ(buffer + BlockLength(), write_at); |
83 } | 89 } |
84 | 90 |
85 } // namespace rtcp | 91 } // namespace rtcp |
86 } // namespace webrtc | 92 } // namespace webrtc |
OLD | NEW |