| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 ReportBlock(); | 24 ReportBlock(); |
| 25 ~ReportBlock() {} | 25 ~ReportBlock() {} |
| 26 | 26 |
| 27 bool Parse(const uint8_t* buffer, size_t length); | 27 bool Parse(const uint8_t* buffer, size_t length); |
| 28 | 28 |
| 29 // Fills buffer with the ReportBlock. | 29 // Fills buffer with the ReportBlock. |
| 30 // Consumes ReportBlock::kLength bytes. | 30 // Consumes ReportBlock::kLength bytes. |
| 31 void Create(uint8_t* buffer) const; | 31 void Create(uint8_t* buffer) const; |
| 32 | 32 |
| 33 void To(uint32_t ssrc) { source_ssrc_ = ssrc; } | 33 void SetMediaSsrc(uint32_t ssrc) { source_ssrc_ = ssrc; } |
| 34 void WithFractionLost(uint8_t fraction_lost) { | 34 void SetFractionLost(uint8_t fraction_lost) { |
| 35 fraction_lost_ = fraction_lost; | 35 fraction_lost_ = fraction_lost; |
| 36 } | 36 } |
| 37 bool WithCumulativeLost(uint32_t cumulative_lost); | 37 bool SetCumulativeLost(uint32_t cumulative_lost); |
| 38 void WithExtHighestSeqNum(uint32_t ext_highest_seq_num) { | 38 void SetExtHighestSeqNum(uint32_t ext_highest_seq_num) { |
| 39 extended_high_seq_num_ = ext_highest_seq_num; | 39 extended_high_seq_num_ = ext_highest_seq_num; |
| 40 } | 40 } |
| 41 void WithJitter(uint32_t jitter) { jitter_ = jitter; } | 41 void SetJitter(uint32_t jitter) { jitter_ = jitter; } |
| 42 void WithLastSr(uint32_t last_sr) { last_sr_ = last_sr; } | 42 void SetLastSr(uint32_t last_sr) { last_sr_ = last_sr; } |
| 43 void WithDelayLastSr(uint32_t delay_last_sr) { | 43 void SetDelayLastSr(uint32_t delay_last_sr) { |
| 44 delay_since_last_sr_ = delay_last_sr; | 44 delay_since_last_sr_ = delay_last_sr; |
| 45 } | 45 } |
| 46 | 46 |
| 47 uint32_t source_ssrc() const { return source_ssrc_; } | 47 uint32_t source_ssrc() const { return source_ssrc_; } |
| 48 uint8_t fraction_lost() const { return fraction_lost_; } | 48 uint8_t fraction_lost() const { return fraction_lost_; } |
| 49 uint32_t cumulative_lost() const { return cumulative_lost_; } | 49 uint32_t cumulative_lost() const { return cumulative_lost_; } |
| 50 uint32_t extended_high_seq_num() const { return extended_high_seq_num_; } | 50 uint32_t extended_high_seq_num() const { return extended_high_seq_num_; } |
| 51 uint32_t jitter() const { return jitter_; } | 51 uint32_t jitter() const { return jitter_; } |
| 52 uint32_t last_sr() const { return last_sr_; } | 52 uint32_t last_sr() const { return last_sr_; } |
| 53 uint32_t delay_since_last_sr() const { return delay_since_last_sr_; } | 53 uint32_t delay_since_last_sr() const { return delay_since_last_sr_; } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 uint32_t source_ssrc_; | 56 uint32_t source_ssrc_; |
| 57 uint8_t fraction_lost_; | 57 uint8_t fraction_lost_; |
| 58 uint32_t cumulative_lost_; | 58 uint32_t cumulative_lost_; |
| 59 uint32_t extended_high_seq_num_; | 59 uint32_t extended_high_seq_num_; |
| 60 uint32_t jitter_; | 60 uint32_t jitter_; |
| 61 uint32_t last_sr_; | 61 uint32_t last_sr_; |
| 62 uint32_t delay_since_last_sr_; | 62 uint32_t delay_since_last_sr_; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace rtcp | 65 } // namespace rtcp |
| 66 } // namespace webrtc | 66 } // namespace webrtc |
| 67 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REPORT_BLOCK_H_ | 67 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_REPORT_BLOCK_H_ |
| OLD | NEW |