![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsTablesLogger.h>


Public Member Functions | |
| TablesLogger (TablesDisplay &display) | |
| virtual | ~TablesLogger () override |
| void | close () |
| bool | completed () const |
| void | defineArgs (Args &args) |
| void | feedPacket (const TSPacket &pkt) |
| bool | hasErrors () const |
| bool | loadArgs (DuckContext &duck, Args &args) |
| bool | open () |
| void | reportDemuxErrors (Report &report, int level=Severity::Info) |
| void | reportDemuxErrors (std::ostream &strm) |
| void | setSectionHandler (SectionHandlerInterface *h) |
| void | setTableHandler (TableHandlerInterface *h) |
Static Public Member Functions | |
| static bool | AnalyzeUDPMessage (const duck::Protocol &protocol, const uint8_t *data, size_t size, bool no_encapsulation, SectionPtrVector §ions, Time ×tamp) |
Static Public Attributes | |
| static constexpr size_t | DEFAULT_LOG_SIZE = 8 |
Protected Member Functions | |
| virtual void | handleInvalidSection (SectionDemux &, const DemuxedData &, Section::Status) override |
| virtual void | handleSection (SectionDemux &, const Section &) override |
| virtual void | handleTable (SectionDemux &, const BinaryTable &) override |
This class logs sections and tables.
| ts::TablesLogger::TablesLogger | ( | TablesDisplay & | display | ) |
Constructor.
| [in,out] | display | Object to display tables and sections. |
|
overridevirtual |
Destructor.
| void ts::TablesLogger::defineArgs | ( | Args & | args | ) |
Add command line option definitions in an Args.
| [in,out] | args | Command line arguments to update. |
| bool ts::TablesLogger::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. |
|
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 -.
| [in] | h | The new table handler. |
|
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 -.
| [in] | h | The new handler. |
| void ts::TablesLogger::feedPacket | ( | const TSPacket & | pkt | ) |
The following method feeds the logger with a TS packet.
| [in] | pkt | A new transport stream packet. |
| bool ts::TablesLogger::open | ( | ) |
Open files, start operations. The options must have been loaded first.
| void ts::TablesLogger::close | ( | ) |
Close all operations, flush tables if required, close files and sockets. No longer accept packets. Automatically done in destructor.
|
inline |
Check if an error was found.
|
inline |
Check if the operation is complete.
| void ts::TablesLogger::reportDemuxErrors | ( | std::ostream & | strm | ) |
Report the demux errors (if any).
| [in,out] | strm | Output text stream. |
| void ts::TablesLogger::reportDemuxErrors | ( | Report & | report, |
| int | level = Severity::Info ) |
|
static |
Static routine to analyze UDP messages as sent by the table logger (option –ip-udp).
| [in] | protocol | Instance of TLV protocol to analyze UDP message. |
| [in] | data | Address of UDP message. |
| [in] | size | Size in bytes of UDP message. |
| [in] | no_encapsulation | When true, the UDP message contains raw sections. When false, the UDP message contains a TLV structure. |
| [out] | sections | List of sections in the message. |
| [out] | timestamp | Time of the collection of the table. Available only in TLV message. Contains Time::Epoch if not available. |
|
overrideprotectedvirtual |
This hook is invoked when a complete table is available. Tables with long sections are reported only when a new version is available.
| [in,out] | demux | A reference to the section demux. |
| [in] | table | A reference to the demultiplexed table. |
Implements ts::TableHandlerInterface.
|
overrideprotectedvirtual |
This hook is invoked when a complete section is available.
| [in,out] | demux | The demux which sends the section. |
| [in] | section | The new section from the demux. |
Implements ts::SectionHandlerInterface.
|
overrideprotectedvirtual |
This hook is invoked when an invalid section is detected.
| [in,out] | demux | The demux which sends the section. |
| [in] | data | The invalid section from the demux. |
| [in] | status | Reason for the section to be invalid. |
Implements ts::InvalidSectionHandlerInterface.
|
staticconstexpr |
Default table log size. With option --log, specify how many bytes are displayed at the beginning of the table payload (the header is not displayed). The default is 8 bytes.