TSDuck v3.38-3696
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::TSFileOutputArgs Class Reference

Transport stream file output with command-line arguments. More...

#include <tsTSFileOutputArgs.h>

Public Member Functions

 TSFileOutputArgs (bool allow_stdout)
 Default constructor.
 
bool close (Report &report)
 Close the output file.
 
void defineArgs (Args &args)
 Add command line option definitions in an Args.
 
bool loadArgs (DuckContext &duck, Args &args)
 Load arguments from command line.
 
bool open (Report &report, AbortInterface *abort=nullptr)
 Open the output file.
 
bool write (const TSPacket *buffer, const TSPacketMetadata *pkt_data, size_t packet_count, Report &report, AbortInterface *abort=nullptr)
 Write packets.
 

Static Public Attributes

static constexpr cn::milliseconds DEFAULT_RETRY_INTERVAL = cn::milliseconds(2000)
 Default retry interval in milliseconds.
 

Detailed Description

Transport stream file output with command-line arguments.

Constructor & Destructor Documentation

◆ TSFileOutputArgs()

ts::TSFileOutputArgs::TSFileOutputArgs ( bool  allow_stdout)

Default constructor.

Parameters
[in]allow_stdoutIf true, the file name is optional and standard output is used by default.

Member Function Documentation

◆ defineArgs()

void ts::TSFileOutputArgs::defineArgs ( Args args)

Add command line option definitions in an Args.

Parameters
[in,out]argsCommand line arguments to update.

◆ loadArgs()

bool ts::TSFileOutputArgs::loadArgs ( DuckContext duck,
Args args 
)

Load arguments from command line.

Args error indicator is set in case of incorrect arguments.

Parameters
[in,out]duckTSDuck execution context.
[in,out]argsCommand line arguments.
Returns
True on success, false on error in argument line.

◆ open()

bool ts::TSFileOutputArgs::open ( Report report,
AbortInterface abort = nullptr 
)

Open the output file.

All parameters where loaded from the command line by loadArgs().

Parameters
[in,out]reportWhere to report errors.
[in]abortAn optional abort interface to detect abort requests.
Returns
True on success, false on error.

◆ close()

bool ts::TSFileOutputArgs::close ( Report report)

Close the output file.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ write()

bool ts::TSFileOutputArgs::write ( const TSPacket buffer,
const TSPacketMetadata pkt_data,
size_t  packet_count,
Report report,
AbortInterface abort = nullptr 
)

Write packets.

Parameters
[in]bufferAddress of packets to write.
[in]pkt_dataArray of metadata for packets. A packet and its metadata have the same index in their respective arrays.
[in]packet_countNumber of packets to send from buffer.
[in,out]reportWhere to report errors.
[in]abortAn optional abort interface to detect abort requests.
Returns
True on success, false on error.

The documentation for this class was generated from the following file: