| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 void WithRtpTimestamp(uint32_t rtp_timestamp) { | 228 void WithRtpTimestamp(uint32_t rtp_timestamp) { |
| 229 sr_.RTPTimestamp = rtp_timestamp; | 229 sr_.RTPTimestamp = rtp_timestamp; |
| 230 } | 230 } |
| 231 void WithPacketCount(uint32_t packet_count) { | 231 void WithPacketCount(uint32_t packet_count) { |
| 232 sr_.SenderPacketCount = packet_count; | 232 sr_.SenderPacketCount = packet_count; |
| 233 } | 233 } |
| 234 void WithOctetCount(uint32_t octet_count) { | 234 void WithOctetCount(uint32_t octet_count) { |
| 235 sr_.SenderOctetCount = octet_count; | 235 sr_.SenderOctetCount = octet_count; |
| 236 } | 236 } |
| 237 bool WithReportBlock(ReportBlock* block); | 237 bool WithReportBlock(const ReportBlock& block); |
| 238 | 238 |
| 239 protected: | 239 protected: |
| 240 bool Create(uint8_t* packet, | 240 bool Create(uint8_t* packet, |
| 241 size_t* index, | 241 size_t* index, |
| 242 size_t max_length, | 242 size_t max_length, |
| 243 RtcpPacket::PacketReadyCallback* callback) const override; | 243 RtcpPacket::PacketReadyCallback* callback) const override; |
| 244 | 244 |
| 245 private: | 245 private: |
| 246 static const int kMaxNumberOfReportBlocks = 0x1f; | 246 static const int kMaxNumberOfReportBlocks = 0x1f; |
| 247 | 247 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 275 public: | 275 public: |
| 276 ReceiverReport() : RtcpPacket() { | 276 ReceiverReport() : RtcpPacket() { |
| 277 memset(&rr_, 0, sizeof(rr_)); | 277 memset(&rr_, 0, sizeof(rr_)); |
| 278 } | 278 } |
| 279 | 279 |
| 280 virtual ~ReceiverReport() {} | 280 virtual ~ReceiverReport() {} |
| 281 | 281 |
| 282 void From(uint32_t ssrc) { | 282 void From(uint32_t ssrc) { |
| 283 rr_.SenderSSRC = ssrc; | 283 rr_.SenderSSRC = ssrc; |
| 284 } | 284 } |
| 285 bool WithReportBlock(ReportBlock* block); | 285 bool WithReportBlock(const ReportBlock& block); |
| 286 | 286 |
| 287 protected: | 287 protected: |
| 288 bool Create(uint8_t* packet, | 288 bool Create(uint8_t* packet, |
| 289 size_t* index, | 289 size_t* index, |
| 290 size_t max_length, | 290 size_t max_length, |
| 291 RtcpPacket::PacketReadyCallback* callback) const override; | 291 RtcpPacket::PacketReadyCallback* callback) const override; |
| 292 | 292 |
| 293 private: | 293 private: |
| 294 static const int kMaxNumberOfReportBlocks = 0x1F; | 294 static const int kMaxNumberOfReportBlocks = 0x1F; |
| 295 | 295 |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 | 1140 |
| 1141 private: | 1141 private: |
| 1142 const size_t buffer_length_; | 1142 const size_t buffer_length_; |
| 1143 size_t length_; | 1143 size_t length_; |
| 1144 rtc::scoped_ptr<uint8_t[]> buffer_; | 1144 rtc::scoped_ptr<uint8_t[]> buffer_; |
| 1145 }; | 1145 }; |
| 1146 | 1146 |
| 1147 } // namespace rtcp | 1147 } // namespace rtcp |
| 1148 } // namespace webrtc | 1148 } // namespace webrtc |
| 1149 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ | 1149 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ |
| OLD | NEW |