12 #ifndef ROC_PACKET_PACKET_H_
13 #define ROC_PACKET_PACKET_H_
Base class for list element.
Base class for object with reference counter.
const FEC * fec() const
FEC packet.
void print(int flags) const
Print packet to stderr.
stream_source_t source() const
Return packet stream identifier.
const UDP * udp() const
UDP packet.
const core::Slice< uint8_t > & data() const
Get packet data.
static Packet * container_of(UDP *udp)
Get pointer to packet from a pointer to its UDP part.
int compare(const Packet &other) const
Determine packet order.
unsigned flags() const
Get flags.
Packet(core::IPool &packet_pool)
Constructor.
const RTP * rtp() const
RTP packet.
RTCP * rtcp()
RTCP packet.
const RTCP * rtcp() const
RTCP packet.
stream_timestamp_t end() const
Get the timestamp of the last sample in packet plus one.
@ FlagRestored
Packet was restored using FEC decoder.
@ FlagPrepared
Packet was prepared for composing.
@ FlagRTCP
Packet contains RTCP compound packet.
@ FlagRepair
Packet contains repair FEC symbols.
@ FlagControl
Packet contains control message.
@ FlagRTP
Packet contains RTP header.
@ FlagAudio
Packet contains audio samples.
@ FlagComposed
Packet was composed.
@ FlagUDP
Packet contains UDP header.
@ FlagFEC
Packet contains FEC header.
void set_data(const core::Slice< uint8_t > &data)
Set packet data.
stream_timestamp_t begin() const
Get the timestamp of the first sample in packet.
bool has_flags(unsigned flags) const
Check specific flag.
void add_flags(unsigned flags)
Add flags.
#define ROC_CONTAINER_OF(ptr, type, member)
Cast a member of a structure out to the containing structure.
uint32_t stream_source_t
Packet stream identifier.
core::SharedPtr< Packet > PacketPtr
Packet smart pointer.
uint32_t stream_timestamp_t
Packet stream timestamp.
void print_packet(const Packet &packet, int flags)
Print packet to stderr.
Base class for object with reference counter.
Shared ownership intrusive pointer.