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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 const size_t kRrHeaderLength = 8; | 312 const size_t kRrHeaderLength = 8; |
313 return kRrHeaderLength + report_blocks_.size() * kReportBlockLength; | 313 return kRrHeaderLength + report_blocks_.size() * kReportBlockLength; |
314 } | 314 } |
315 | 315 |
316 RTCPUtility::RTCPPacketRR rr_; | 316 RTCPUtility::RTCPPacketRR rr_; |
317 std::vector<RTCPUtility::RTCPPacketReportBlockItem> report_blocks_; | 317 std::vector<RTCPUtility::RTCPPacketReportBlockItem> report_blocks_; |
318 | 318 |
319 RTC_DISALLOW_COPY_AND_ASSIGN(ReceiverReport); | 319 RTC_DISALLOW_COPY_AND_ASSIGN(ReceiverReport); |
320 }; | 320 }; |
321 | 321 |
322 // Transmission Time Offsets in RTP Streams (RFC 5450). | |
323 // | |
324 // 0 1 2 3 | |
325 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |
326 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
327 // hdr |V=2|P| RC | PT=IJ=195 | length | | |
328 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
329 // | inter-arrival jitter | | |
330 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
331 // . . | |
332 // . . | |
333 // . . | |
334 // | inter-arrival jitter | | |
335 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
336 // | |
337 // If present, this RTCP packet must be placed after a receiver report | |
338 // (inside a compound RTCP packet), and MUST have the same value for RC | |
339 // (reception report count) as the receiver report. | |
340 | |
341 class Ij : public RtcpPacket { | |
342 public: | |
343 Ij() : RtcpPacket() {} | |
344 | |
345 virtual ~Ij() {} | |
346 | |
347 bool WithJitterItem(uint32_t jitter); | |
348 | |
349 protected: | |
350 bool Create(uint8_t* packet, | |
351 size_t* index, | |
352 size_t max_length, | |
353 RtcpPacket::PacketReadyCallback* callback) const override; | |
354 | |
355 private: | |
356 static const int kMaxNumberOfIjItems = 0x1f; | |
357 | |
358 size_t BlockLength() const { | |
359 return kHeaderLength + 4 * ij_items_.size(); | |
360 } | |
361 | |
362 std::vector<uint32_t> ij_items_; | |
363 | |
364 RTC_DISALLOW_COPY_AND_ASSIGN(Ij); | |
365 }; | |
366 | |
367 // Source Description (SDES) (RFC 3550). | 322 // Source Description (SDES) (RFC 3550). |
368 // | 323 // |
369 // 0 1 2 3 | 324 // 0 1 2 3 |
370 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 325 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
371 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 326 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
372 // header |V=2|P| SC | PT=SDES=202 | length | | 327 // header |V=2|P| SC | PT=SDES=202 | length | |
373 // +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | 328 // +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
374 // chunk | SSRC/CSRC_1 | | 329 // chunk | SSRC/CSRC_1 | |
375 // 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 330 // 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
376 // | SDES items | | 331 // | SDES items | |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1112 |
1158 private: | 1113 private: |
1159 const size_t buffer_length_; | 1114 const size_t buffer_length_; |
1160 size_t length_; | 1115 size_t length_; |
1161 rtc::scoped_ptr<uint8_t[]> buffer_; | 1116 rtc::scoped_ptr<uint8_t[]> buffer_; |
1162 }; | 1117 }; |
1163 | 1118 |
1164 } // namespace rtcp | 1119 } // namespace rtcp |
1165 } // namespace webrtc | 1120 } // namespace webrtc |
1166 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ | 1121 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ |
OLD | NEW |