![]() |
TSDuck v3.41-4263
MPEG Transport Stream Toolkit
|
A multi-standard storage of Logical Channel Numbers (LCN). More...
#include <tsLogicalChannelNumbers.h>
Public Member Functions | |
LogicalChannelNumbers (DuckContext &duck) | |
Constructor. | |
size_t | addFromDescriptors (const DescriptorList &descs, uint16_t ts_id, uint16_t onet_id=INVALID_NETWORK_ID) |
Collect all LCN which are declared in a list of descriptors. | |
size_t | addFromNIT (const NIT &nit, uint16_t ts_id=INVALID_TS_ID, uint16_t onet_id=INVALID_NETWORK_ID) |
Collect all LCN which are declared in a NIT. | |
void | addLCN (uint16_t lcn, uint16_t srv_id, uint16_t ts_id, uint16_t onet_id, bool visible=true) |
Add the logical channel number of a service. | |
void | addServices (std::set< ServiceIdTriplet > &services) const |
Get the set of all services in this object. | |
void | clear () |
Clear the content of the LCN store. | |
bool | empty () const |
Check if the LCN store is empty. | |
uint16_t | getLCN (const ServiceIdTriplet &srv) const |
Get the logical channel number of a service. | |
uint16_t | getLCN (uint16_t srv_id, uint16_t ts_id, uint16_t onet_id=INVALID_NETWORK_ID) const |
Get the logical channel number of a service. | |
void | getServices (std::set< ServiceIdTriplet > &services) const |
Get the set of all services in this object. | |
bool | getVisible (const ServiceIdTriplet &srv) const |
Get the visible flag of a service. | |
bool | getVisible (uint16_t srv_id, uint16_t ts_id, uint16_t onet_id=INVALID_NETWORK_ID) const |
Get the visible flag of a service. | |
size_t | size () const |
Get the number of services in the LCN store. | |
bool | updateService (Service &srv, bool replace) const |
Update a service description with its LCN. | |
template<class CONTAINER > | |
void | updateServices (CONTAINER &services, Replacement rep) const |
Update a list of service descriptions with LCN's. | |
A multi-standard storage of Logical Channel Numbers (LCN).
Logical Channel Numbers (LCN) are an important data for operators and users. However, there is not standard way to define them in the signalization. Several private descriptors exist. This class is a store of LCN values which can be collected from many type of tables.
ts::LogicalChannelNumbers::LogicalChannelNumbers | ( | DuckContext & | duck | ) |
Constructor.
[in,out] | duck | TSDuck execution context. |
|
inline |
Check if the LCN store is empty.
|
inline |
Get the number of services in the LCN store.
void ts::LogicalChannelNumbers::addLCN | ( | uint16_t | lcn, |
uint16_t | srv_id, | ||
uint16_t | ts_id, | ||
uint16_t | onet_id, | ||
bool | visible = true |
||
) |
Add the logical channel number of a service.
[in] | lcn | The logical channel number to add. |
[in] | srv_id | The service id. |
[in] | ts_id | The transport stream id. |
[in] | onet_id | The original network id. Use INVALID_NETWORK_ID for "unspecified". |
[in] | visible | The service LCN is visible. |
size_t ts::LogicalChannelNumbers::addFromNIT | ( | const NIT & | nit, |
uint16_t | ts_id = INVALID_TS_ID , |
||
uint16_t | onet_id = INVALID_NETWORK_ID |
||
) |
size_t ts::LogicalChannelNumbers::addFromDescriptors | ( | const DescriptorList & | descs, |
uint16_t | ts_id, | ||
uint16_t | onet_id = INVALID_NETWORK_ID |
||
) |
Collect all LCN which are declared in a list of descriptors.
[in] | descs | The list of descriptors to analyze. |
[in] | ts_id | The transport stream id of all services. |
[in] | onet_id | The original network id to use. If set to INVALID_NETWORK_ID (the default), leave it unspecified. |
uint16_t ts::LogicalChannelNumbers::getLCN | ( | uint16_t | srv_id, |
uint16_t | ts_id, | ||
uint16_t | onet_id = INVALID_NETWORK_ID |
||
) | const |
Get the logical channel number of a service.
[in] | srv_id | The service id to search. |
[in] | ts_id | The transport stream id of the service. |
[in] | onet_id | The original network id of the service. If set to INVALID_NETWORK_ID (the default), the first match service is used. |
uint16_t ts::LogicalChannelNumbers::getLCN | ( | const ServiceIdTriplet & | srv | ) | const |
Get the logical channel number of a service.
[in] | srv | The service id triplet to search. |
bool ts::LogicalChannelNumbers::getVisible | ( | uint16_t | srv_id, |
uint16_t | ts_id, | ||
uint16_t | onet_id = INVALID_NETWORK_ID |
||
) | const |
Get the visible flag of a service.
[in] | srv_id | The service id to search. |
[in] | ts_id | The transport stream id of the service. |
[in] | onet_id | The original network id of the service. If set to INVALID_NETWORK_ID (the default), the first match service is used. |
bool ts::LogicalChannelNumbers::getVisible | ( | const ServiceIdTriplet & | srv | ) | const |
Get the visible flag of a service.
[in] | srv | The service id triplet to search. |
|
inline |
Get the set of all services in this object.
[out] | services | Set of services ids. |
void ts::LogicalChannelNumbers::addServices | ( | std::set< ServiceIdTriplet > & | services | ) | const |
Get the set of all services in this object.
[in,out] | services | Set of services. The services are added to the previous content. |
bool ts::LogicalChannelNumbers::updateService | ( | Service & | srv, |
bool | replace | ||
) | const |
Update a service description with its LCN.
[in,out] | srv | The service description to update. The service id and transport stream id must be set. If the original network id is unset, the first LCN matching the service id and transport stream id is used. |
[in] | replace | If srv already has an LCN and replace is false, don't search. |
void ts::LogicalChannelNumbers::updateServices | ( | CONTAINER & | services, |
Replacement | rep | ||
) | const |
Update a list of service descriptions with LCN's.
CONTAINER | A container class of Services with push_back() method. |
[in,out] | services | The container of service description to update. |
[in] | rep | Replacement policy in services for new, updated, or absent services. |