A multi-standard storage of Logical Channel Numbers (LCN).
More...
#include <tsLogicalChannelNumbers.h>
|
| LogicalChannelNumbers (DuckContext &duck) |
| Constructor.
|
|
size_t | addFromDescriptors (const DescriptorList &descs, uint16_t ts_id, uint16_t onet_id=0xFFFF) |
| Collect all LCN which are declared in a list of descriptors.
|
|
size_t | addFromNIT (const NIT &nit, uint16_t ts_id=0xFFFF, uint16_t onet_id=0xFFFF) |
| 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 | 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=0xFFFF) const |
| Get the logical channel number of a service.
|
|
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=0xFFFF) 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.
◆ LogicalChannelNumbers()
ts::LogicalChannelNumbers::LogicalChannelNumbers |
( |
DuckContext & |
duck | ) |
|
Constructor.
- Parameters
-
[in,out] | duck | TSDuck execution context. |
◆ empty()
bool ts::LogicalChannelNumbers::empty |
( |
| ) |
const |
|
inline |
Check if the LCN store is empty.
- Returns
- True if the LCN store is empty.
◆ size()
size_t ts::LogicalChannelNumbers::size |
( |
| ) |
const |
|
inline |
Get the number of services in the LCN store.
- Returns
- The number of services in the LCN store.
◆ addLCN()
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.
- Parameters
-
[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 0xFFFF for "unspecified". |
[in] | visible | The service LCN is visible. |
◆ addFromNIT()
size_t ts::LogicalChannelNumbers::addFromNIT |
( |
const NIT & |
nit, |
|
|
uint16_t |
ts_id = 0xFFFF , |
|
|
uint16_t |
onet_id = 0xFFFF |
|
) |
| |
Collect all LCN which are declared in a NIT.
- Parameters
-
[in] | nit | The NIT to analyze. |
[in] | ts_id | If not 0xFFFF, get services from that TS id only. |
[in] | onet_id | If not 0xFFFF, get services from that original network id only. |
- Returns
- The number of collected LCN.
◆ addFromDescriptors()
size_t ts::LogicalChannelNumbers::addFromDescriptors |
( |
const DescriptorList & |
descs, |
|
|
uint16_t |
ts_id, |
|
|
uint16_t |
onet_id = 0xFFFF |
|
) |
| |
Collect all LCN which are declared in a list of descriptors.
- Parameters
-
[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 0xFFFF (the default), leave it unspecified. |
- Returns
- The number of collected LCN.
◆ getLCN() [1/2]
uint16_t ts::LogicalChannelNumbers::getLCN |
( |
uint16_t |
srv_id, |
|
|
uint16_t |
ts_id, |
|
|
uint16_t |
onet_id = 0xFFFF |
|
) |
| const |
Get the logical channel number of a service.
- Parameters
-
[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 0xFFFF (the default), the first match service is used. |
- Returns
- The LCN of the service or 0xFFFF if not found.
◆ getLCN() [2/2]
uint16_t ts::LogicalChannelNumbers::getLCN |
( |
const ServiceIdTriplet & |
srv | ) |
const |
Get the logical channel number of a service.
- Parameters
-
[in] | srv | The service id triplet to search. |
- Returns
- The LCN of the service or 0xFFFF if not found.
◆ getVisible() [1/2]
bool ts::LogicalChannelNumbers::getVisible |
( |
uint16_t |
srv_id, |
|
|
uint16_t |
ts_id, |
|
|
uint16_t |
onet_id = 0xFFFF |
|
) |
| const |
Get the visible flag of a service.
- Parameters
-
[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 0xFFFF (the default), the first match service is used. |
- Returns
- The visible flag of the service or true if not found.
◆ getVisible() [2/2]
bool ts::LogicalChannelNumbers::getVisible |
( |
const ServiceIdTriplet & |
srv | ) |
const |
Get the visible flag of a service.
- Parameters
-
[in] | srv | The service id triplet to search. |
- Returns
- The visible flag of the service or true if not found.
◆ updateService()
bool ts::LogicalChannelNumbers::updateService |
( |
Service & |
srv, |
|
|
bool |
replace |
|
) |
| const |
Update a service description with its LCN.
- Parameters
-
[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. |
- Returns
- True if the LCN was updated, false otherwise.
◆ updateServices()
template<class CONTAINER >
void ts::LogicalChannelNumbers::updateServices |
( |
CONTAINER & |
services, |
|
|
Replacement |
rep |
|
) |
| const |
Update a list of service descriptions with LCN's.
- Template Parameters
-
CONTAINER | A container class of Services with push_back() method. |
- Parameters
-
[in,out] | services | The container of service description to update. |
[in] | rep | Replacement policy in services for new, updated, or absent services. |
The documentation for this class was generated from the following file: