Send TS packets over datagrams (UDP, SRT, RIST, etc.)
More...
#include <tsTSDatagramOutput.h>
|
static constexpr size_t | DEFAULT_PACKET_BURST = 7 |
| Default number of TS packets in a UDP datagram.
|
|
static constexpr size_t | MAX_PACKET_BURST = 128 |
| Maximum number of TS packets in a UDP datagram.
|
|
Send TS packets over datagrams (UDP, SRT, RIST, etc.)
◆ TSDatagramOutput()
Constructor.
- Parameters
-
[in] | flags | List of options. |
[in] | output | Output handler for datagrams. If null, raw UDP output is used. |
◆ defineArgs()
void ts::TSDatagramOutput::defineArgs |
( |
Args & |
args | ) |
|
Add command line option definitions in an Args.
- Parameters
-
[in,out] | args | Command line arguments to update. |
◆ loadArgs()
Load arguments from command line.
Args error indicator is set in case of incorrect arguments.
- Parameters
-
[in,out] | duck | TSDuck execution context. |
[in,out] | args | Command line arguments. |
- Returns
- True on success, false on error in argument line.
◆ open()
bool ts::TSDatagramOutput::open |
( |
Report & |
report | ) |
|
Open and initialize the TS packet output.
- Parameters
-
[in,out] | report | Where to report errors. |
- Returns
- True on success, false on error.
◆ close()
bool ts::TSDatagramOutput::close |
( |
const BitRate & |
bitrate, |
|
|
Report & |
report |
|
) |
| |
Close the TS packet output.
Flush pending packets, if any.
- Parameters
-
[in] | bitrate | Current of last bitrate to compute timestamps for buffered packets. Ignored if zero. |
[in,out] | report | Where to report errors. |
- Returns
- True on success, false on error.
◆ send()
Send TS packets.
Some of them can be buffered and sent later.
- Parameters
-
[in] | packets | Address of first packet. |
[in] | metadata | Address of first packet metadata (can be null). |
[in] | packet_count | Number of packets to send. |
[in] | bitrate | Current bitrate to compute timestamps. Ignored if zero. |
[in,out] | report | Where to report errors. |
- Returns
- True on success, false on error.
◆ maxPayloadSize()
size_t ts::TSDatagramOutput::maxPayloadSize |
( |
| ) |
const |
|
inline |
Get the maximum datagram payload size, according to options –packet-burst and –rs204.
- Returns
- The maximum datagram payload size.
◆ DEFAULT_PACKET_BURST
constexpr size_t ts::TSDatagramOutput::DEFAULT_PACKET_BURST = 7 |
|
staticconstexpr |
Default number of TS packets in a UDP datagram.
This value is equivalent to 1316 bytes, the maximum number of TS packets which fit (with headers) in an Ethernet MTU (1500 bytes).
◆ MAX_PACKET_BURST
constexpr size_t ts::TSDatagramOutput::MAX_PACKET_BURST = 128 |
|
staticconstexpr |
Maximum number of TS packets in a UDP datagram.
This value (approximately 24 kB) is not recommended since it will result in IP datagram fragmentation in most cases.
The documentation for this class was generated from the following file: