![]() |
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... | |
| 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... | |
| struct | LinkMetrics |
| Link metrics. More... | |
| class | Packet |
| Packet. More... | |
| class | packet_flags_to_str |
| Format packet flags to string. More... | |
| class | PacketFactory |
| Packet factory. 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. | |
| typedef core::SharedPtr< Packet > | PacketPtr |
| Packet smart pointer. | |
| typedef uint32_t | stream_source_t |
| Packet stream identifier. | |
| typedef uint32_t | stream_timestamp_t |
| Packet stream timestamp. | |
| typedef int32_t | stream_timestamp_diff_t |
| Packet stream timestamp delta. | |
| typedef uint16_t | seqnum_t |
| Packet sequence number. | |
| typedef int16_t | seqnum_diff_t |
| Packet sequence number delta. | |
| typedef uint32_t | ext_seqnum_t |
| Extended sequence number. | |
| typedef int32_t | ext_seqnum_diff_t |
| Extended sequence number delta. | |
| typedef uint16_t | blknum_t |
| FEC packet block number. | |
| typedef int16_t | blknum_diff_t |
| FEC packet block number delta. | |
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. | |
| ntp_timestamp_t | unix_2_ntp (core::nanoseconds_t unix_time) |
| Convert Unix absolute time to NTP absolute time. | |
| core::nanoseconds_t | ntp_2_unix (ntp_timestamp_t ntp_time) |
| Convert NTP absolute time to Unix absolute time. | |
| ntp_timestamp_t | nanoseconds_2_ntp (core::nanoseconds_t ns_delta) |
| Convert nanoseconds delta to NTP delta. | |
| core::nanoseconds_t | ntp_2_nanoseconds (ntp_timestamp_t ntp_delta) |
| Converts NTP delta to nanoseconds delta. | |
| void | print_packet (const Packet &packet, int flags) |
| Print packet to stderr. | |
| stream_timestamp_diff_t | stream_timestamp_diff (const stream_timestamp_t a, const stream_timestamp_t b) |
| Compute difference between two timestamps. | |
| 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. | |
| 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. | |
| stream_timestamp_t | ns_2_stream_timestamp (core::nanoseconds_t ns, size_t sample_rate) |
| Convert nanoseconds to stream timestamp. | |
| core::nanoseconds_t | stream_timestamp_2_ns (stream_timestamp_t ts, size_t sample_rate) |
| Convert stream timestamp.to nanoseconds. | |
| stream_timestamp_diff_t | ns_2_stream_timestamp_delta (core::nanoseconds_t ns, size_t sample_rate) |
| Convert nanoseconds to stream timestamp delta. | |
| core::nanoseconds_t | stream_timestamp_delta_2_ns (stream_timestamp_diff_t ts, size_t sample_rate) |
| Convert stream timestamp.delta to nanoseconds. | |
| seqnum_diff_t | seqnum_diff (const seqnum_t a, const seqnum_t b) |
| Compute difference between two seqnums. | |
| bool | seqnum_lt (const seqnum_t a, const seqnum_t b) |
Check if a is before b, taking possible wrap into account. | |
| 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. | |
| ext_seqnum_diff_t | ext_seqnum_diff (const ext_seqnum_t a, const ext_seqnum_t b) |
| Compute difference between two extended seqnums. | |
| 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. | |
| 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. | |
| blknum_diff_t | blknum_diff (const blknum_t a, const blknum_t b) |
| Compute difference between two FEC packet block numbers. | |
| bool | blknum_lt (const blknum_t a, const blknum_t b) |
Check if a is before b, taking possible wrap into account. | |
| 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. | |
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).