2016-01-13 02:03:04 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_COMPOUND_PACKET_H_
|
|
|
|
|
#define MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_COMPOUND_PACKET_H_
|
2016-01-13 02:03:04 -08:00
|
|
|
|
2016-03-14 08:19:28 -07:00
|
|
|
#include <vector>
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/rtp_rtcp/source/rtcp_packet.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "rtc_base/constructor_magic.h"
|
2016-01-13 02:03:04 -08:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
namespace rtcp {
|
|
|
|
|
|
|
|
|
|
class CompoundPacket : public RtcpPacket {
|
|
|
|
|
public:
|
2017-06-16 07:07:47 -07:00
|
|
|
CompoundPacket();
|
|
|
|
|
~CompoundPacket() override;
|
2016-01-13 02:03:04 -08:00
|
|
|
|
2016-03-14 08:19:28 -07:00
|
|
|
void Append(RtcpPacket* packet);
|
2016-01-13 02:03:04 -08:00
|
|
|
|
2016-03-14 08:19:28 -07:00
|
|
|
// Size of this packet in bytes (i.e. total size of nested packets).
|
|
|
|
|
size_t BlockLength() const override;
|
|
|
|
|
// Returns true if all calls to Create succeeded.
|
2016-01-13 02:03:04 -08:00
|
|
|
bool Create(uint8_t* packet,
|
|
|
|
|
size_t* index,
|
|
|
|
|
size_t max_length,
|
2017-12-07 10:15:53 +01:00
|
|
|
PacketReadyCallback callback) const override;
|
2016-01-13 02:03:04 -08:00
|
|
|
|
2016-03-14 08:19:28 -07:00
|
|
|
protected:
|
|
|
|
|
std::vector<RtcpPacket*> appended_packets_;
|
2016-01-13 02:03:04 -08:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
RTC_DISALLOW_COPY_AND_ASSIGN(CompoundPacket);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace rtcp
|
|
|
|
|
} // namespace webrtc
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_COMPOUND_PACKET_H_
|