xref: /aosp_15_r20/external/webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 #ifndef MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_
11 #define MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_
12 
13 #include "modules/rtp_rtcp/source/rtcp_packet/psfb.h"
14 
15 namespace webrtc {
16 namespace rtcp {
17 class CommonHeader;
18 // Picture loss indication (PLI) (RFC 4585).
19 class Pli : public Psfb {
20  public:
21   static constexpr uint8_t kFeedbackMessageType = 1;
22 
23   Pli();
24   Pli(const Pli& pli);
25   ~Pli() override;
26 
27   bool Parse(const CommonHeader& packet);
28 
29   size_t BlockLength() const override;
30 
31   bool Create(uint8_t* packet,
32               size_t* index,
33               size_t max_length,
34               PacketReadyCallback callback) const override;
35 };
36 
37 }  // namespace rtcp
38 }  // namespace webrtc
39 #endif  // MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_
40