| 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 private: | 312 private: |
| 313 static const int kMaxNumberOfChunks = 0x1f; | 313 static const int kMaxNumberOfChunks = 0x1f; |
| 314 | 314 |
| 315 size_t BlockLength() const; | 315 size_t BlockLength() const; |
| 316 | 316 |
| 317 std::vector<Chunk> chunks_; | 317 std::vector<Chunk> chunks_; |
| 318 | 318 |
| 319 RTC_DISALLOW_COPY_AND_ASSIGN(Sdes); | 319 RTC_DISALLOW_COPY_AND_ASSIGN(Sdes); |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 // RFC 4585: Feedback format. | |
| 323 // | |
| 324 // Common packet format: | |
| 325 // | |
| 326 // 0 1 2 3 | |
| 327 // 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 | |
| 328 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| 329 // |V=2|P| FMT | PT | length | | |
| 330 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| 331 // | SSRC of packet sender | | |
| 332 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| 333 // | SSRC of media source | | |
| 334 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| 335 // : Feedback Control Information (FCI) : | |
| 336 // : | |
| 337 | |
| 338 // Picture loss indication (PLI) (RFC 4585). | |
| 339 // | |
| 340 // FCI: no feedback control information. | |
| 341 | |
| 342 class Pli : public RtcpPacket { | |
| 343 public: | |
| 344 Pli() : RtcpPacket() { | |
| 345 memset(&pli_, 0, sizeof(pli_)); | |
| 346 } | |
| 347 | |
| 348 virtual ~Pli() {} | |
| 349 | |
| 350 void From(uint32_t ssrc) { | |
| 351 pli_.SenderSSRC = ssrc; | |
| 352 } | |
| 353 void To(uint32_t ssrc) { | |
| 354 pli_.MediaSSRC = ssrc; | |
| 355 } | |
| 356 | |
| 357 protected: | |
| 358 bool Create(uint8_t* packet, | |
| 359 size_t* index, | |
| 360 size_t max_length, | |
| 361 RtcpPacket::PacketReadyCallback* callback) const override; | |
| 362 | |
| 363 private: | |
| 364 size_t BlockLength() const { | |
| 365 return kCommonFbFmtLength; | |
| 366 } | |
| 367 | |
| 368 RTCPUtility::RTCPPacketPSFBPLI pli_; | |
| 369 | |
| 370 RTC_DISALLOW_COPY_AND_ASSIGN(Pli); | |
| 371 }; | |
| 372 | |
| 373 // Slice loss indication (SLI) (RFC 4585). | 322 // Slice loss indication (SLI) (RFC 4585). |
| 374 // | 323 // |
| 375 // FCI: | 324 // FCI: |
| 376 // 0 1 2 3 | 325 // 0 1 2 3 |
| 377 // 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 // 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 |
| 378 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 327 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 379 // | First | Number | PictureID | | 328 // | First | Number | PictureID | |
| 380 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 329 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 381 | 330 |
| 382 class Sli : public RtcpPacket { | 331 class Sli : public RtcpPacket { |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 | 896 |
| 948 private: | 897 private: |
| 949 const size_t buffer_length_; | 898 const size_t buffer_length_; |
| 950 size_t length_; | 899 size_t length_; |
| 951 rtc::scoped_ptr<uint8_t[]> buffer_; | 900 rtc::scoped_ptr<uint8_t[]> buffer_; |
| 952 }; | 901 }; |
| 953 | 902 |
| 954 } // namespace rtcp | 903 } // namespace rtcp |
| 955 } // namespace webrtc | 904 } // namespace webrtc |
| 956 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ | 905 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ |
| OLD | NEW |