Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Network packets and packet processing. More...
Classes | |
class | ConcurrentQueue |
Concurrent blocking packet queue. More... | |
class | DelayedReader |
Delayed reader. More... | |
struct | FEC |
FECFRAME packet. More... | |
class | IComposer |
Packet composer interface. More... | |
struct | LinkMetrics |
Link metrics. More... | |
class | ILinkMeter |
Link meter interface. More... | |
class | Interleaver |
Interleaves packets to transmit them in pseudo random order. More... | |
class | IParser |
Packet parser interface. More... | |
class | IReader |
Packet reader interface. More... | |
class | ISequencer |
Packet sequencer. Fills protocol-specific packet headers to form a continous sequence. For example, RTP sequencer fills packet seqnums and timestamps. More... | |
class | IWriter |
Packet writer interface. More... | |
class | Packet |
Packet. More... | |
class | PacketFactory |
Packet factory. More... | |
class | packet_flags_to_str |
Format packet flags to string. More... | |
class | Queue |
Packet queue. More... | |
class | Router |
Route packets to packet writers. More... | |
struct | RTCP |
RTCP compound packet. More... | |
struct | RTP |
RTP packet. More... | |
class | Shipper |
Prepare a packet for being sent. More... | |
class | SortedQueue |
Sorted packet queue. More... | |
struct | UDP |
UDP packet. More... | |
Typedefs | |
typedef uint64_t | ntp_timestamp_t |
NTP timestamp. More... | |
typedef core::SharedPtr< Packet > | PacketPtr |
Packet smart pointer. More... | |
typedef uint32_t | stream_source_t |
Packet stream identifier. More... | |
typedef uint32_t | stream_timestamp_t |
Packet stream timestamp. More... | |
typedef int32_t | stream_timestamp_diff_t |
Packet stream timestamp delta. More... | |
typedef uint16_t | seqnum_t |
Packet sequence number. More... | |
typedef int16_t | seqnum_diff_t |
Packet sequence number delta. More... | |
typedef uint32_t | ext_seqnum_t |
Extended sequence number. More... | |
typedef int32_t | ext_seqnum_diff_t |
Extended sequence number delta. More... | |
typedef uint16_t | blknum_t |
FEC packet block number. More... | |
typedef int16_t | blknum_diff_t |
FEC packet block number delta. More... | |
Enumerations | |
enum | FecScheme { FEC_None , FEC_ReedSolomon_M8 , FEC_LDPC_Staircase } |
FECFRAME scheme. More... | |
enum | { PrintHeaders = 0 , PrintPayload = (1 << 0) } |
Print flags. More... | |
Functions | |
const char * | fec_scheme_to_str (FecScheme) |
FEC scheme to string. More... | |
ntp_timestamp_t | unix_2_ntp (core::nanoseconds_t unix_time) |
Convert Unix absolute time to NTP absolute time. More... | |
core::nanoseconds_t | ntp_2_unix (ntp_timestamp_t ntp_time) |
Convert NTP absolute time to Unix absolute time. More... | |
ntp_timestamp_t | nanoseconds_2_ntp (core::nanoseconds_t ns_delta) |
Convert nanoseconds delta to NTP delta. More... | |
core::nanoseconds_t | ntp_2_nanoseconds (ntp_timestamp_t ntp_delta) |
Converts NTP delta to nanoseconds delta. More... | |
void | print_packet (const Packet &packet, int flags) |
Print packet to stderr. More... | |
stream_timestamp_diff_t | stream_timestamp_diff (const stream_timestamp_t a, const stream_timestamp_t b) |
Compute difference between two timestamps. More... | |
bool | stream_timestamp_lt (const stream_timestamp_t a, const stream_timestamp_t b) |
Check if a is before b , taking possible wrap into account. More... | |
bool | stream_timestamp_le (const stream_timestamp_t a, const stream_timestamp_t b) |
Check if a is before or equal to b , taking possible wrap into account. More... | |
stream_timestamp_t | ns_2_stream_timestamp (core::nanoseconds_t ns, size_t sample_rate) |
Convert nanoseconds to stream timestamp. More... | |
core::nanoseconds_t | stream_timestamp_2_ns (stream_timestamp_t ts, size_t sample_rate) |
Convert stream timestamp.to nanoseconds. More... | |
stream_timestamp_diff_t | ns_2_stream_timestamp_delta (core::nanoseconds_t ns, size_t sample_rate) |
Convert nanoseconds to stream timestamp delta. More... | |
core::nanoseconds_t | stream_timestamp_delta_2_ns (stream_timestamp_diff_t ts, size_t sample_rate) |
Convert stream timestamp.delta to nanoseconds. More... | |
seqnum_diff_t | seqnum_diff (const seqnum_t a, const seqnum_t b) |
Compute difference between two seqnums. More... | |
bool | seqnum_lt (const seqnum_t a, const seqnum_t b) |
Check if a is before b , taking possible wrap into account. More... | |
bool | seqnum_le (const seqnum_t a, const seqnum_t b) |
Check if a is before or equal to b , taking possible wrap into account. More... | |
ext_seqnum_diff_t | ext_seqnum_diff (const ext_seqnum_t a, const ext_seqnum_t b) |
Compute difference between two extended seqnums. More... | |
bool | ext_seqnum_lt (const ext_seqnum_t a, const ext_seqnum_t b) |
Check if a is before b , taking possible wrap into account. More... | |
bool | ext_seqnum_le (const ext_seqnum_t a, const ext_seqnum_t b) |
Check if a is before or equal to b , taking possible wrap into account. More... | |
blknum_diff_t | blknum_diff (const blknum_t a, const blknum_t b) |
Compute difference between two FEC packet block numbers. More... | |
bool | blknum_lt (const blknum_t a, const blknum_t b) |
Check if a is before b , taking possible wrap into account. More... | |
bool | blknum_le (const blknum_t a, const blknum_t b) |
Check if a is before or equal to b , taking possible wrap into account. More... | |
Network packets and packet processing.
typedef int16_t roc::packet::blknum_diff_t |
typedef uint16_t roc::packet::blknum_t |
typedef int32_t roc::packet::ext_seqnum_diff_t |
typedef uint32_t roc::packet::ext_seqnum_t |
typedef uint64_t roc::packet::ntp_timestamp_t |
NTP timestamp.
Format:
Epoch:
See RFC 5905 and RFC 2030.
See also:
typedef core::SharedPtr<Packet> roc::packet::PacketPtr |
typedef int16_t roc::packet::seqnum_diff_t |
typedef uint16_t roc::packet::seqnum_t |
typedef uint32_t roc::packet::stream_source_t |
typedef int32_t roc::packet::stream_timestamp_diff_t |
typedef uint32_t roc::packet::stream_timestamp_t |
Packet stream timestamp.
anonymous enum |
Print flags.
Enumerator | |
---|---|
PrintHeaders | Print packet header. |
PrintPayload | Print packet payload. |
Definition at line 21 of file print_packet.h.
|
inline |
|
inline |
|
inline |
|
inline |
ntp_timestamp_t roc::packet::nanoseconds_2_ntp | ( | core::nanoseconds_t | ns_delta | ) |
Convert nanoseconds delta to NTP delta.
ns_delta
defines nanoseconds delta (should be positive) stream_timestamp_t roc::packet::ns_2_stream_timestamp | ( | core::nanoseconds_t | ns, |
size_t | sample_rate | ||
) |
Convert nanoseconds to stream timestamp.
stream_timestamp_diff_t roc::packet::ns_2_stream_timestamp_delta | ( | core::nanoseconds_t | ns, |
size_t | sample_rate | ||
) |
Convert nanoseconds to stream timestamp delta.
core::nanoseconds_t roc::packet::ntp_2_nanoseconds | ( | ntp_timestamp_t | ntp_delta | ) |
Converts NTP delta to nanoseconds delta.
core::nanoseconds_t roc::packet::ntp_2_unix | ( | ntp_timestamp_t | ntp_time | ) |
Convert NTP absolute time to Unix absolute time.
void roc::packet::print_packet | ( | const Packet & | packet, |
int | flags | ||
) |
Print packet to stderr.
|
inline |
core::nanoseconds_t roc::packet::stream_timestamp_2_ns | ( | stream_timestamp_t | ts, |
size_t | sample_rate | ||
) |
Convert stream timestamp.to nanoseconds.
core::nanoseconds_t roc::packet::stream_timestamp_delta_2_ns | ( | stream_timestamp_diff_t | ts, |
size_t | sample_rate | ||
) |
Convert stream timestamp.delta to nanoseconds.
|
inline |
|
inline |
|
inline |
ntp_timestamp_t roc::packet::unix_2_ntp | ( | core::nanoseconds_t | unix_time | ) |
Convert Unix absolute time to NTP absolute time.
unix_time
defines nanoseconds since Unix epoch (should belong to years 1968-2104).