![]() |
TSDuck v3.46-4965
MPEG Transport Stream Toolkit
|
#include <tsTSFileOutputArgs.h>
Public Member Functions | |
| TSFileOutputArgs (Report *report, bool allow_stdout) | |
| TSFileOutputArgs (ReporterBase *delegate, bool allow_stdout) | |
| bool | close (bool silent=false) |
| void | defineArgs (Args &args) |
| bool | loadArgs (DuckContext &duck, Args &args) |
| bool | open (AbortInterface *abort=nullptr) |
| bool | write (const TSPacket *buffer, const TSPacketMetadata *pkt_data, size_t packet_count, AbortInterface *abort=nullptr) |
Static Public Attributes | |
| static constexpr cn::milliseconds | DEFAULT_RETRY_INTERVAL = cn::milliseconds(2000) |
Transport stream file output with command-line arguments.
| ts::TSFileOutputArgs::TSFileOutputArgs | ( | Report * | report, |
| bool | allow_stdout ) |
Constructor.
| [in] | report | Where to report errors. The report object must remain valid as long as this object exists or setReport() is used with another Report object. If report is null, log messages are discarded. |
| [in] | allow_stdout | If true, the file name is optional and standard output is used by default. |
| ts::TSFileOutputArgs::TSFileOutputArgs | ( | ReporterBase * | delegate, |
| bool | allow_stdout ) |
Constructor.
| [in] | delegate | Use the report of another ReporterBase. If delegate is null, log messages are discarded. |
| [in] | allow_stdout | If true, the file name is optional and standard output is used by default. |
| void ts::TSFileOutputArgs::defineArgs | ( | Args & | args | ) |
Add command line option definitions in an Args.
| [in,out] | args | Command line arguments to update. |
| bool ts::TSFileOutputArgs::loadArgs | ( | DuckContext & | duck, |
| Args & | args ) |
Load arguments from command line. Args error indicator is set in case of incorrect arguments.
| [in,out] | duck | TSDuck execution context. |
| [in,out] | args | Command line arguments. |
| bool ts::TSFileOutputArgs::open | ( | AbortInterface * | abort = nullptr | ) |
Open the output file. All parameters where loaded from the command line by loadArgs().
| [in] | abort | An optional abort interface to detect abort requests. |
| bool ts::TSFileOutputArgs::close | ( | bool | silent = false | ) |
Close the output file.
| [in] | silent | If true, do not report errors. This is typically useful when the object is in some error condition and closing it is necessary although it may generate additional meaningless errors. |
| bool ts::TSFileOutputArgs::write | ( | const TSPacket * | buffer, |
| const TSPacketMetadata * | pkt_data, | ||
| size_t | packet_count, | ||
| AbortInterface * | abort = nullptr ) |
Write packets.
| [in] | buffer | Address of packets to write. |
| [in] | pkt_data | Array of metadata for packets. A packet and its metadata have the same index in their respective arrays. |
| [in] | packet_count | Number of packets to send from buffer. |
| [in] | abort | An optional abort interface to detect abort requests. |
|
staticconstexpr |
Default retry interval in milliseconds.