blob: fc3c20a8a8504e075e3d25bacda76347206bec9b [file] [log] [blame]
danilchapf8385ad2015-11-27 05:36:09 -08001/*
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.
danilchapf8385ad2015-11-27 05:36:09 -08009 */
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020010#ifndef MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_
11#define MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_
danilchapf8385ad2015-11-27 05:36:09 -080012
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020013#include "modules/rtp_rtcp/source/rtcp_packet/psfb.h"
danilchapf8385ad2015-11-27 05:36:09 -080014
15namespace webrtc {
16namespace rtcp {
danilchapf752f852016-03-23 08:25:25 -070017class CommonHeader;
danilchapf8385ad2015-11-27 05:36:09 -080018// Picture loss indication (PLI) (RFC 4585).
19class Pli : public Psfb {
20 public:
danilchap2f255d82016-10-17 02:07:54 -070021 static constexpr uint8_t kFeedbackMessageType = 1;
danilchapf8385ad2015-11-27 05:36:09 -080022
23 Pli() {}
danilchapf752f852016-03-23 08:25:25 -070024 ~Pli() override {}
danilchapf8385ad2015-11-27 05:36:09 -080025
danilchapf752f852016-03-23 08:25:25 -070026 bool Parse(const CommonHeader& packet);
danilchapf8385ad2015-11-27 05:36:09 -080027
eladalon8fa21c42017-06-16 07:07:47 -070028 size_t BlockLength() const override;
29
danilchapf8385ad2015-11-27 05:36:09 -080030 bool Create(uint8_t* packet,
31 size_t* index,
32 size_t max_length,
Danil Chapovalov5c3cc412017-12-07 10:15:53 +010033 PacketReadyCallback callback) const override;
danilchapf8385ad2015-11-27 05:36:09 -080034};
35
36} // namespace rtcp
37} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020038#endif // MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_PLI_H_