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

This class logs sections and tables. More...

#include <tsPSILogger.h>

Inheritance diagram for ts::PSILogger:
Collaboration diagram for ts::PSILogger:

Public Member Functions

 PSILogger (TablesDisplay &display)
 Constructor.
 
virtual ~PSILogger () override
 Destructor.
 
void close ()
 Close all operations.
 
bool completed () const
 Return true when the analysis is complete.
 
void defineArgs (Args &args)
 Add command line option definitions in an Args.
 
void feedPacket (const TSPacket &pkt)
 The following method feeds the logger with a TS packet.
 
bool hasErrors () const
 Check if an error was found.
 
bool loadArgs (DuckContext &duck, Args &args)
 Load arguments from command line.
 
bool open ()
 Open files, start operations.
 
void reportDemuxErrors ()
 Report the demux errors (if any).
 
void setSectionHandler (SectionHandlerInterface *h)
 Set a section handler which is called for each section in addition to logging.
 
void setTableHandler (TableHandlerInterface *h)
 Set a table handler which is called for each complete table in addition to logging.
 

Detailed Description

This class logs sections and tables.

Constructor & Destructor Documentation

◆ PSILogger()

ts::PSILogger::PSILogger ( TablesDisplay display)
explicit

Constructor.

Parameters
[in,out]displayObject to display tables and sections.

Member Function Documentation

◆ defineArgs()

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

Add command line option definitions in an Args.

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

◆ loadArgs()

bool ts::PSILogger::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.

◆ setTableHandler()

void ts::PSILogger::setTableHandler ( TableHandlerInterface h)
inline

Set a table handler which is called for each complete table in addition to logging.

When the table handler or the section handler is not null, there is no default logging. To have the tables or sections displayed, you must explicitly specify --text-output -.

Parameters
[in]hThe new table handler.

◆ setSectionHandler()

void ts::PSILogger::setSectionHandler ( SectionHandlerInterface h)
inline

Set a section handler which is called for each section in addition to logging.

When the table handler or the section handler is not null, there is no default logging. To have the tables or sections displayed, you must explicitly specify --text-output -.

Parameters
[in]hThe new handler.

◆ open()

bool ts::PSILogger::open ( )

Open files, start operations.

The options must have been loaded first.

Returns
True on success, false on error.

◆ feedPacket()

void ts::PSILogger::feedPacket ( const TSPacket pkt)

The following method feeds the logger with a TS packet.

Parameters
[in]pktA new transport stream packet.

◆ hasErrors()

bool ts::PSILogger::hasErrors ( ) const
inline

Check if an error was found.

Returns
True when an error was found.

◆ completed()

bool ts::PSILogger::completed ( ) const

Return true when the analysis is complete.

Returns
True when the analysis is complete.

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