12#ifndef ROC_PACKET_PACKET_H_
13#define ROC_PACKET_PACKET_H_
Base class for list element.
Base class for reference countable objects.
Shared ownership intrusive pointer.
@ FlagRestored
Packet was restored using FEC decoder.
@ FlagRepair
Packet contains repair FEC symbols.
@ FlagRTP
Packet contains RTP header.
@ FlagAudio
Packet contains audio samples.
@ FlagComposed
Packet is already composed.
@ FlagUDP
Packet contains UDP header.
@ FlagFEC
Packet contains FEC header.
void print(int flags) const
Print packet to stderr.
timestamp_t end() const
Get the timestamp of the last sample in packet plus one.
const UDP * udp() const
UDP packet.
const RTP * rtp() const
RTP packet.
const FEC * fec() const
FEC packet.
int compare(const Packet &other) const
Determine packet order.
unsigned flags() const
Get flags.
const core::Slice< uint8_t > & data() const
Get packet data.
void set_data(const core::Slice< uint8_t > &data)
Set packet data.
Packet(PacketPool &)
Constructor.
static Packet * container_of(UDP *udp)
Get pointer to packet from a pointer to its UDP part.
timestamp_t begin() const
Get the timestamp of the first sample in packet.
source_t source() const
Return packet stream identifier.
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 source_t
Packet source ID identifying packet stream.
core::SharedPtr< Packet > PacketPtr
Packet smart pointer.
uint32_t timestamp_t
Audio packet timestamp.
void print(const Packet &packet, int flags)
Print packet to stderr.
Base class for reference countable objects.
Shared ownership intrusive pointer.