TSDuck v3.40-4034
MPEG Transport Stream Toolkit
|
A repository for known PSI/SI tables and descriptors. More...
#include <tsPSIRepository.h>
Classes | |
class | DescriptorClass |
Description of a descriptor class. More... | |
class | RegisterDescriptor |
A class to register fully implemented descriptors. More... | |
class | RegisterTable |
A class to register fully implemented tables. More... | |
class | RegisterXML |
A class to register additional XML model files to merge with the main model for tables and descriptors. More... | |
class | SignalizationClass |
Base description of a signalization class, common to tables and descriptors. More... | |
class | TableClass |
Description of a table class. More... | |
Public Types | |
using | DescriptorFactory = AbstractDescriptorPtr(*)() |
Profile of a function which creates a descriptor. | |
using | TableFactory = AbstractTablePtr(*)() |
Profile of a function which creates a table. | |
Public Member Functions | |
UString | descriptorTables (const DuckContext &duck, const UString &nodeName) const |
Get the list of tables where a descriptor is allowed, as a descriptive string. | |
void | dumpInternalState (std::ostream &out) const |
Dump the internal state of the PSI repository (for debug only). | |
DisplayCADescriptorFunction | getCADescriptorDisplay (CASID cas) const |
Get the display function of the CA_descriptor for a given CA_system_id. | |
const DescriptorClass & | getDescriptor (const UString &xml_name) const |
Get the description of a descriptor class for a given XML node name. | |
const DescriptorClass & | getDescriptor (EDID edid) const |
Get the description of a descriptor class for a given EDID. | |
const DescriptorClass & | getDescriptor (std::type_index index, TID tid=TID_NULL, Standards standards=Standards::NONE) const |
Get the description of a descriptor class for a given descriptor closs RTTI index. | |
const DescriptorClass & | getDescriptor (XDID xdid, DescriptorContext &context) const |
Get the description of a descriptor class for a given descriptor tag and its context. | |
void | getRegisteredDescriptorIds (std::vector< EDID > &ids) const |
Get the list of all registered descriptor tags. | |
void | getRegisteredDescriptorNames (UStringList &names) const |
Get the list of all registered XML names for descriptors. | |
void | getRegisteredTableIds (std::vector< TID > &ids) const |
Get the list of all registered table ids. | |
void | getRegisteredTableNames (UStringList &names) const |
Get the list of all registered XML names for tables. | |
void | getRegisteredTablesModels (UStringList &names) const |
Get the list of all registered additional XML model file names for tables and descriptors. | |
const TableClass & | getTable (const UString &xml_name) const |
Get the description of a table class for a given XML node name. | |
const TableClass & | getTable (TID tid, const SectionContext &context=SectionContext()) const |
Get the description of a table class for a given table id and context. | |
Standards | getTableStandards (TID id, PID pid=PID_NULL) const |
Get the list of standards which are defined for a given table id. | |
bool | isDescriptorAllowed (const UString &xml_name, TID tid) const |
Check if a descriptor is allowed in a table. | |
Static Public Member Functions | |
static PSIRepository & | Instance () |
Get the instance of the singleton of this class. | |
static std::type_index | NullIndex () |
Get a value of a "null" type index. | |
A repository for known PSI/SI tables and descriptors.
This class is a singleton. Use static Instance() method to access the single instance.
Multi-threading considerations: The singleton is built and modified using static registration instances during the initialization of the application (ie. in one single thread). Then, the singleton is only read during the execution of the application. So, no explicit synchronization is required.
Mixed ISDB-DVB compatibility. ISDB is based on a subset of DVB and adds other tables and descriptors. The DVB subset is compatible with ISDB. When another DID or TID is defined with two distinct semantics, one for DVB and one for ISDB, if ISDB is part of the current standards we use the ISDB semantics, otherwise we use the DVB semantics.
using ts::PSIRepository::TableFactory = AbstractTablePtr (*)() |
Profile of a function which creates a table.
using ts::PSIRepository::DescriptorFactory = AbstractDescriptorPtr (*)() |
Profile of a function which creates a descriptor.
|
inlinestatic |
Get the instance of the singleton of this class.
|
inlinestatic |
Get a value of a "null" type index.
The same value is always returned and can be used as a placeholder for an unused value.
const TableClass & ts::PSIRepository::getTable | ( | TID | tid, |
const SectionContext & | context = SectionContext() |
||
) | const |
Get the description of a table class for a given table id and context.
[in] | tid | Table id. |
[in] | context | Optional object to lookup the context of the table. This may help disambiguate tables with distinct standards but identical table_id. |
const TableClass & ts::PSIRepository::getTable | ( | const UString & | xml_name | ) | const |
Get the description of a table class for a given XML node name.
[in] | xml_name | Name of XML node. |
Get the list of standards which are defined for a given table id.
[in] | id | Table id. |
[in] | pid | PID on which the section is found. |
const DescriptorClass & ts::PSIRepository::getDescriptor | ( | EDID | edid | ) | const |
Get the description of a descriptor class for a given EDID.
[in] | edid | Extended descriptor id. |
const DescriptorClass & ts::PSIRepository::getDescriptor | ( | XDID | xdid, |
DescriptorContext & | context | ||
) | const |
Get the description of a descriptor class for a given descriptor tag and its context.
[in] | xdid | Extension descriptor id. This value is extracted from the descriptor itself. |
[in,out] | context | Object to lookup the context of the descriptor. |
const DescriptorClass & ts::PSIRepository::getDescriptor | ( | std::type_index | index, |
TID | tid = TID_NULL , |
||
Standards | standards = Standards::NONE |
||
) | const |
Get the description of a descriptor class for a given descriptor closs RTTI index.
Useful for a descriptor class to get its own description.
[in] | index | RTTI index for the descriptor class. |
[in] | tid | Optional TID. If the descriptor class is table-specific for several tables, return the EDID for that table. If tid is TID_NULL and there are several specific tables for that descriptor, the first one is returned. |
[in] | standards | Optional list of standards for the table. |
const DescriptorClass & ts::PSIRepository::getDescriptor | ( | const UString & | xml_name | ) | const |
Get the description of a descriptor class for a given XML node name.
[in] | xml_name | Name of XML node. |
Check if a descriptor is allowed in a table.
[in] | xml_name | Name of the XML node for the descriptor. |
[in] | tid | Table id of the table to check. |
UString ts::PSIRepository::descriptorTables | ( | const DuckContext & | duck, |
const UString & | nodeName | ||
) | const |
Get the list of tables where a descriptor is allowed, as a descriptive string.
[in] | duck | TSDuck execution context to interpret table names. |
[in] | nodeName | Name of the XML node for the descriptor. |
DisplayCADescriptorFunction ts::PSIRepository::getCADescriptorDisplay | ( | CASID | cas | ) | const |
Get the display function of the CA_descriptor for a given CA_system_id.
[in] | cas | CA_system_id. |
void ts::PSIRepository::getRegisteredTableIds | ( | std::vector< TID > & | ids | ) | const |
Get the list of all registered table ids.
[out] | ids | List of all registered table ids. |
void ts::PSIRepository::getRegisteredDescriptorIds | ( | std::vector< EDID > & | ids | ) | const |
Get the list of all registered descriptor tags.
[out] | ids | List of all registered descriptor tags. |
void ts::PSIRepository::getRegisteredTableNames | ( | UStringList & | names | ) | const |
Get the list of all registered XML names for tables.
[out] | names | List of all registered XML names for tables. |
void ts::PSIRepository::getRegisteredDescriptorNames | ( | UStringList & | names | ) | const |
Get the list of all registered XML names for descriptors.
[out] | names | List of all registered XML names for descriptors. |
void ts::PSIRepository::getRegisteredTablesModels | ( | UStringList & | names | ) | const |
Get the list of all registered additional XML model file names for tables and descriptors.
[out] | names | List of all registered additional XML model file names. |
void ts::PSIRepository::dumpInternalState | ( | std::ostream & | out | ) | const |
Dump the internal state of the PSI repository (for debug only).
[in,out] | out | Output stream. |