TSDuck v3.40-3968
MPEG Transport Stream Toolkit
|
A repository for known PSI/SI tables and descriptors. More...
#include <tsPSIRepository.h>
Classes | |
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... | |
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. | |
DisplayCADescriptorFunction | getCADescriptorDisplay (uint16_t cas) const |
Get the display function of the CA_descriptor for a given CA_system_id. | |
DisplayDescriptorFunction | getDescriptorDisplay (const EDID &edid, TID tid=TID_NULL) const |
Get the display function for a given extended descriptor id. | |
DescriptorFactory | getDescriptorFactory (const EDID &edid, TID tid=TID_NULL) const |
Get the descriptor factory for a given descriptor tag. | |
DescriptorFactory | getDescriptorFactory (const UString &nodeName) const |
Get the descriptor factory for a given XML node name. | |
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. | |
DisplaySectionFunction | getSectionDisplay (TID id, Standards standards, PID pid=PID_NULL, uint16_t cas=CASID_NULL) const |
Get the display function for a given table id. | |
LogSectionFunction | getSectionLog (TID id, Standards standards, PID pid=PID_NULL, uint16_t cas=CASID_NULL) const |
Get the log function for a given table id. | |
TableFactory | getTableFactory (const UString &nodeName) const |
Get the table factory for a given XML node name. | |
TableFactory | getTableFactory (TID id, Standards standards, PID pid=PID_NULL, uint16_t cas=CASID_NULL) const |
Get the table factory for a given table id. | |
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 &nodeName, 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. | |
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.
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.
TableFactory ts::PSIRepository::getTableFactory | ( | TID | id, |
Standards | standards, | ||
PID | pid = PID_NULL , |
||
uint16_t | cas = CASID_NULL |
||
) | const |
Get the table factory for a given table id.
[in] | id | Table id. |
[in] | standards | List of current active standards in the application. If there are several factories for this table id, return only a factory for which the standard is active. For instance, if the same table id is used by ATSC and ISDB but the application runs in an ISDB context, return the factory for the ISDB version of this table id. |
[in] | pid | PID on which the section is found. |
[in] | cas | Current CAS id. |
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. |
DescriptorFactory ts::PSIRepository::getDescriptorFactory | ( | const EDID & | edid, |
TID | tid = TID_NULL |
||
) | const |
Get the descriptor factory for a given descriptor tag.
[in] | edid | Extended descriptor id. |
[in] | tid | Optional table id of the table containing the descriptor. If edid is a standard descriptor and tid is specified, try first a table-specific descriptor for this table. Fallback to the standard descriptor. |
TableFactory ts::PSIRepository::getTableFactory | ( | const UString & | nodeName | ) | const |
Get the table factory for a given XML node name.
[in] | nodeName | Name of XML node. |
DescriptorFactory ts::PSIRepository::getDescriptorFactory | ( | const UString & | nodeName | ) | const |
Get the descriptor factory for a given XML node name.
[in] | nodeName | Name of XML node. |
Check if a descriptor is allowed in a table.
[in] | nodeName | 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.
[in] | duck | TSDuck execution context to interpret table names. |
[in] | nodeName | Name of the XML node for the descriptor. |
DisplaySectionFunction ts::PSIRepository::getSectionDisplay | ( | TID | id, |
Standards | standards, | ||
PID | pid = PID_NULL , |
||
uint16_t | cas = CASID_NULL |
||
) | const |
Get the display function for a given table id.
[in] | id | Table id. |
[in] | standards | List of current active standards in the application. If there are several display functions for this table id, return only a function for which the standard is active. For instance, if the same table id is used by ATSC and ISDB but the application runs in an ISDB context, return the display function for the ISDB version of this table id. |
[in] | pid | PID on which the section is found. |
[in] | cas | Current CAS id. |
LogSectionFunction ts::PSIRepository::getSectionLog | ( | TID | id, |
Standards | standards, | ||
PID | pid = PID_NULL , |
||
uint16_t | cas = CASID_NULL |
||
) | const |
Get the log function for a given table id.
[in] | id | Table id. |
[in] | standards | List of current active standards in the application. If there are several log functions for this table id, return only a function for which the standard is active. For instance, if the same table id is used by ATSC and ISDB but the application runs in an ISDB context, return the log function for the ISDB version of this table id. |
[in] | pid | PID on which the section is found. |
[in] | cas | Current CAS id. |
DisplayDescriptorFunction ts::PSIRepository::getDescriptorDisplay | ( | const EDID & | edid, |
TID | tid = TID_NULL |
||
) | const |
Get the display function for a given extended descriptor id.
[in] | edid | Extended descriptor id. |
[in] | tid | Optional table id of the table containing the descriptor. If edid is a standard descriptor and tid is specified, try first a table-specific descriptor for this table. Fallback to the standard descriptor. |
DisplayCADescriptorFunction ts::PSIRepository::getCADescriptorDisplay | ( | uint16_t | 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. |