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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 const size_t kFciLength = 4; | 468 const size_t kFciLength = 4; |
469 return kCommonFbFmtLength + kFciLength; | 469 return kCommonFbFmtLength + kFciLength; |
470 } | 470 } |
471 | 471 |
472 RTCPUtility::RTCPPacketPSFBSLI sli_; | 472 RTCPUtility::RTCPPacketPSFBSLI sli_; |
473 RTCPUtility::RTCPPacketPSFBSLIItem sli_item_; | 473 RTCPUtility::RTCPPacketPSFBSLIItem sli_item_; |
474 | 474 |
475 RTC_DISALLOW_COPY_AND_ASSIGN(Sli); | 475 RTC_DISALLOW_COPY_AND_ASSIGN(Sli); |
476 }; | 476 }; |
477 | 477 |
478 // Generic NACK (RFC 4585). | |
479 // | |
480 // FCI: | |
481 // 0 1 2 3 | |
482 // 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 | |
483 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
484 // | PID | BLP | | |
485 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
486 | |
487 class Nack : public RtcpPacket { | |
488 public: | |
489 Nack() : RtcpPacket() { | |
490 memset(&nack_, 0, sizeof(nack_)); | |
491 } | |
492 | |
493 virtual ~Nack() {} | |
494 | |
495 void From(uint32_t ssrc) { | |
496 nack_.SenderSSRC = ssrc; | |
497 } | |
498 void To(uint32_t ssrc) { | |
499 nack_.MediaSSRC = ssrc; | |
500 } | |
501 void WithList(const uint16_t* nack_list, int length); | |
502 | |
503 protected: | |
504 bool Create(uint8_t* packet, | |
505 size_t* index, | |
506 size_t max_length, | |
507 RtcpPacket::PacketReadyCallback* callback) const override; | |
508 | |
509 size_t BlockLength() const override; | |
510 | |
511 private: | |
512 | |
513 RTCPUtility::RTCPPacketRTPFBNACK nack_; | |
514 std::vector<RTCPUtility::RTCPPacketRTPFBNACKItem> nack_fields_; | |
515 | |
516 RTC_DISALLOW_COPY_AND_ASSIGN(Nack); | |
517 }; | |
518 | |
519 // Reference picture selection indication (RPSI) (RFC 4585). | 478 // Reference picture selection indication (RPSI) (RFC 4585). |
520 // | 479 // |
521 // FCI: | 480 // FCI: |
522 // | 481 // |
523 // 0 1 2 3 | 482 // 0 1 2 3 |
524 // 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 | 483 // 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 |
525 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 484 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
526 // | PB |0| Payload Type| Native RPSI bit string | | 485 // | PB |0| Payload Type| Native RPSI bit string | |
527 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 486 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
528 // | defined per codec ... | Padding (0) | | 487 // | defined per codec ... | Padding (0) | |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 | 956 |
998 private: | 957 private: |
999 const size_t buffer_length_; | 958 const size_t buffer_length_; |
1000 size_t length_; | 959 size_t length_; |
1001 rtc::scoped_ptr<uint8_t[]> buffer_; | 960 rtc::scoped_ptr<uint8_t[]> buffer_; |
1002 }; | 961 }; |
1003 | 962 |
1004 } // namespace rtcp | 963 } // namespace rtcp |
1005 } // namespace webrtc | 964 } // namespace webrtc |
1006 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ | 965 #endif // WEBRTC_MODULES_RTP_RTCP_RTCP_PACKET_H_ |
OLD | NEW |