Packet.
More...
#include <packet.h>
Packet.
Definition at line 37 of file packet.h.
◆ Flag
Packet flags.
Enumerator |
---|
FlagUDP | Packet contains UDP header.
|
FlagRTP | Packet contains RTP header.
|
FlagFEC | Packet contains FEC header.
|
FlagRTCP | Packet contains RTCP compound packet.
|
FlagAudio | Packet contains audio samples.
|
FlagRepair | Packet contains repair FEC symbols.
|
FlagControl | Packet contains control message.
|
FlagPrepared | Packet was prepared for composing.
|
FlagComposed | Packet was composed.
|
FlagRestored | Packet was restored using FEC decoder.
|
Definition at line 45 of file packet.h.
◆ Packet()
roc::packet::Packet::Packet |
( |
core::IPool & |
packet_pool | ) |
|
|
explicit |
◆ add_flags()
void roc::packet::Packet::add_flags |
( |
unsigned |
flags | ) |
|
◆ approx_size()
static size_t roc::packet::Packet::approx_size |
( |
size_t |
n_samples | ) |
|
|
static |
Estimate number of bytes per packet for given number of samples. This is only an approximation, don't rely on it.
◆ buffer()
const core::Slice<uint8_t>& roc::packet::Packet::buffer |
( |
| ) |
const |
◆ capture_timestamp()
Get capture timestamp (CTS) of the packet.
◆ compare()
int roc::packet::Packet::compare |
( |
const Packet & |
other | ) |
const |
Determine packet ordering.
- Returns
- -1 if this packet precedes
other
packet
- 0 if this packet has the same position as
other
packet
- +1 if this packet succeeds
other
packet
◆ container_of()
static Packet* roc::packet::Packet::container_of |
( |
UDP * |
udp | ) |
|
|
inlinestatic |
Get pointer to packet from a pointer to its UDP part.
Definition at line 152 of file packet.h.
◆ duration()
Get duration of the packet.
◆ fec() [1/2]
FEC* roc::packet::Packet::fec |
( |
| ) |
|
◆ fec() [2/2]
const FEC* roc::packet::Packet::fec |
( |
| ) |
const |
◆ flags()
unsigned roc::packet::Packet::flags |
( |
| ) |
const |
◆ has_flags()
bool roc::packet::Packet::has_flags |
( |
unsigned |
flags | ) |
const |
◆ has_source_id()
bool roc::packet::Packet::has_source_id |
( |
| ) |
const |
Check if packet has stream identifier.
◆ payload()
const core::Slice<uint8_t>& roc::packet::Packet::payload |
( |
| ) |
const |
Get protocol-dependent packet payload.
◆ print()
void roc::packet::Packet::print |
( |
int |
flags | ) |
const |
|
inline |
Print packet to stderr.
Definition at line 147 of file packet.h.
◆ receive_timestamp()
Get receive timestamp (RTS) of the packet.
◆ rtcp() [1/2]
RTCP* roc::packet::Packet::rtcp |
( |
| ) |
|
◆ rtcp() [2/2]
const RTCP* roc::packet::Packet::rtcp |
( |
| ) |
const |
◆ rtp() [1/2]
RTP* roc::packet::Packet::rtp |
( |
| ) |
|
◆ rtp() [2/2]
const RTP* roc::packet::Packet::rtp |
( |
| ) |
const |
◆ set_buffer()
void roc::packet::Packet::set_buffer |
( |
const core::Slice< uint8_t > & |
data | ) |
|
◆ source_id()
Get packet stream identifier.
◆ stream_timestamp()
Get stream timestamp (STS) of the packet.
◆ udp() [1/2]
UDP* roc::packet::Packet::udp |
( |
| ) |
|
◆ udp() [2/2]
const UDP* roc::packet::Packet::udp |
( |
| ) |
const |
The documentation for this class was generated from the following file: