TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Command line arguments for the class UDPReceiver. More...
#include <tsUDPReceiverArgsList.h>
Public Member Functions | |
void | defineArgs (Args &args, bool with_short_options, bool destination_is_parameter, bool multiple_receivers) |
Add command line option definitions in an Args. | |
bool | loadArgs (DuckContext &duck, Args &args, cn::milliseconds default_receive_timeout=cn::milliseconds(-1)) |
Load arguments from command line. | |
Command line arguments for the class UDPReceiver.
On the command line, depending on the application, zero, one, or more, receivers can be specified.
|
inline |
Add command line option definitions in an Args.
[in,out] | args | Command line arguments to update. |
[in] | with_short_options | When true, define one-letter short options. |
[in] | destination_is_parameter | When true, the destination [address:]port is defined as a mandatory parameter. When false, it is defined as option –ip–udp (optional, can be omitted) |
[in] | multiple_receivers | When true, multiple destination [address:]port are allowed. |
bool ts::UDPReceiverArgsList::loadArgs | ( | DuckContext & | duck, |
Args & | args, | ||
cn::milliseconds | default_receive_timeout = cn::milliseconds(-1) |
||
) |
Load arguments from command line.
Must be called after defineArgs(). Args error indicator is set in case of incorrect arguments.
Upon return, the number of elements in this instance depends on defineArgs() parameters:
destination_is_parameter | multiple_receivers | Number of elements |
---|---|---|
true | true | 1 or more |
true | false | 1 |
false | true | 0 or more |
false | false | 0 or 1 |
[in,out] | duck | TSDuck execution context. |
[in,out] | args | Command line arguments. |
[in] | default_receive_timeout | Default receive timeout in milliseconds. No timeout if zero or negative. |