OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 16 matching lines...) Expand all Loading... |
27 class ExtendedReports : public RtcpPacket { | 27 class ExtendedReports : public RtcpPacket { |
28 public: | 28 public: |
29 static constexpr uint8_t kPacketType = 207; | 29 static constexpr uint8_t kPacketType = 207; |
30 | 30 |
31 ExtendedReports(); | 31 ExtendedReports(); |
32 ~ExtendedReports() override; | 32 ~ExtendedReports() override; |
33 | 33 |
34 // Parse assumes header is already parsed and validated. | 34 // Parse assumes header is already parsed and validated. |
35 bool Parse(const CommonHeader& packet); | 35 bool Parse(const CommonHeader& packet); |
36 | 36 |
37 void SetSenderSsrc(uint32_t ssrc) { sender_ssrc_ = ssrc; } | 37 void From(uint32_t ssrc) { sender_ssrc_ = ssrc; } |
38 | 38 |
39 // Max 50 items of each of {Rrtr, Dlrr, VoipMetric} allowed per Xr. | 39 // Max 50 items of each of {Rrtr, Dlrr, VoipMetric} allowed per Xr. |
40 bool AddRrtr(const Rrtr& rrtr); | 40 bool WithRrtr(const Rrtr& rrtr); |
41 bool AddDlrr(const Dlrr& dlrr); | 41 bool WithDlrr(const Dlrr& dlrr); |
42 bool AddVoipMetric(const VoipMetric& voip_metric); | 42 bool WithVoipMetric(const VoipMetric& voip_metric); |
43 | 43 |
44 uint32_t sender_ssrc() const { return sender_ssrc_; } | 44 uint32_t sender_ssrc() const { return sender_ssrc_; } |
45 const std::vector<Rrtr>& rrtrs() const { return rrtr_blocks_; } | 45 const std::vector<Rrtr>& rrtrs() const { return rrtr_blocks_; } |
46 const std::vector<Dlrr>& dlrrs() const { return dlrr_blocks_; } | 46 const std::vector<Dlrr>& dlrrs() const { return dlrr_blocks_; } |
47 const std::vector<VoipMetric>& voip_metrics() const { | 47 const std::vector<VoipMetric>& voip_metrics() const { |
48 return voip_metric_blocks_; | 48 return voip_metric_blocks_; |
49 } | 49 } |
50 | 50 |
51 protected: | 51 protected: |
52 bool Create(uint8_t* packet, | 52 bool Create(uint8_t* packet, |
(...skipping 25 matching lines...) Expand all Loading... |
78 uint32_t sender_ssrc_; | 78 uint32_t sender_ssrc_; |
79 std::vector<Rrtr> rrtr_blocks_; | 79 std::vector<Rrtr> rrtr_blocks_; |
80 std::vector<Dlrr> dlrr_blocks_; | 80 std::vector<Dlrr> dlrr_blocks_; |
81 std::vector<VoipMetric> voip_metric_blocks_; | 81 std::vector<VoipMetric> voip_metric_blocks_; |
82 | 82 |
83 RTC_DISALLOW_COPY_AND_ASSIGN(ExtendedReports); | 83 RTC_DISALLOW_COPY_AND_ASSIGN(ExtendedReports); |
84 }; | 84 }; |
85 } // namespace rtcp | 85 } // namespace rtcp |
86 } // namespace webrtc | 86 } // namespace webrtc |
87 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_REPORTS_H_ | 87 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_EXTENDED_REPORTS_H_ |
OLD | NEW |