TSDuck v3.40-4034
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::TSFileInputArgs Class Reference

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

#include <tsTSFileInputArgs.h>

Public Member Functions

 TSFileInputArgs ()=default
 Default constructor.
 
void abort ()
 Abort the input operation currently in progress.
 
bool close (Report &report)
 Close the input file or files.
 
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)
 Open the input file or files.
 
size_t read (TSPacket *buffer, TSPacketMetadata *pkt_data, size_t max_packets, Report &report)
 Read packets.
 

Detailed Description

Transport stream file input with command-line arguments.

Member Function Documentation

◆ defineArgs()

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

Add command line option definitions in an Args.

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

◆ loadArgs()

bool ts::TSFileInputArgs::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::TSFileInputArgs::open ( Report report)

Open the input file or files.

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

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

◆ close()

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

Close the input file or files.

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

◆ read()

size_t ts::TSFileInputArgs::read ( TSPacket buffer,
TSPacketMetadata pkt_data,
size_t  max_packets,
Report report 
)

Read packets.

Parameters
[out]bufferAddress of the buffer for incoming packets.
[in,out]pkt_dataArray of metadata for incoming packets.
[in]max_packetsSize of buffer in number of packets.
[in,out]reportWhere to report errors.
Returns
The number of actually received packets (in the range 1 to max_packets). Returning zero means error or end of input.

◆ abort()

void ts::TSFileInputArgs::abort ( )

Abort the input operation currently in progress.

This method is typically invoked from another thread. The only acceptable operation after an abort() is a close().


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