TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::ServiceDiscovery Class Reference

Discover and describe a DVB service. More...

#include <tsServiceDiscovery.h>

Inheritance diagram for ts::ServiceDiscovery:
Collaboration diagram for ts::ServiceDiscovery:

Public Types

enum  ServiceField : uint32_t {
  ID = 0x0001 ,
  TSID = 0x0002 ,
  ONID = 0x0004 ,
  PMT_PID = 0x0008 ,
  LCN = 0x0010 ,
  TYPE_DVB = 0x0020 ,
  NAME = 0x0040 ,
  PROVIDER = 0x0080 ,
  EITS = 0x0100 ,
  EITPF = 0x0200 ,
  CA = 0x0400 ,
  RUNNING = 0x0800 ,
  TYPE_ATSC = 0x1000 ,
  MAJORID_ATSC = 0x2000 ,
  MINORID_ATSC = 0x4000 ,
  HIDDEN = 0x8000
}
 List of possible fields a Service may have set. More...
 

Public Member Functions

 ServiceDiscovery (DuckContext &duck, const UString &desc, SignalizationHandlerInterface *pmtHandler=nullptr)
 Constructor using a string description.
 
 ServiceDiscovery (DuckContext &duck, SignalizationHandlerInterface *pmtHandler=nullptr)
 Default constructor.
 
virtual void clear () override
 Clear all fields.
 
void clearCAControlled ()
 Clear the CA-controlled (as declared in the SDT) .
 
void clearEITpfPresent ()
 Clear the EIT present/following present (as declared in the SDT) .
 
void clearEITsPresent ()
 Clear the EIT schedule present (as declared in the SDT) .
 
void clearHidden ()
 Clear the Service is hidden to end-user .
 
void clearId ()
 Clear the Service Id .
 
void clearLCN ()
 Clear the Logical Channel Number .
 
void clearMajorIdATSC ()
 Clear the ATSC major id (as declared in TVCT or CVCT) .
 
void clearMinorIdATSC ()
 Clear the ATSC major id (as declared in TVCT or CVCT) .
 
void clearModified ()
 Clear the "modified" indicator.
 
void clearName ()
 Clear the Service Name .
 
void clearONId ()
 Clear the Original Network Id .
 
void clearPMTPID ()
 Clear the PMT PID .
 
void clearProvider ()
 Clear the Provider Name .
 
void clearRunningStatus ()
 Clear the Running status (as declared in the SDT) .
 
void clearTSId ()
 Clear the Transport Stream Id .
 
void clearTypeATSC ()
 Clear the ATSC service type (as declared in TVCT or CVCT) .
 
void clearTypeDVB ()
 Clear the DVB service type (as declared in service_descriptor) .
 
void feedPacket (const TSPacket &pkt)
 The following method feeds the service discovery with a TS packet.
 
bool getCAControlled () const
 Get the CA-controlled (as declared in the SDT) .
 
bool getEITpfPresent () const
 Get the EIT present/following present (as declared in the SDT) .
 
bool getEITsPresent () const
 Get the EIT schedule present (as declared in the SDT) .
 
uint32_t getFields () const
 Get the list of fields which are set in a Service.
 
bool getHidden () const
 Get the Service is hidden to end-user .
 
uint16_t getId () const
 Get the Service Id .
 
uint16_t getLCN () const
 Get the Logical Channel Number .
 
uint16_t getMajorIdATSC () const
 Get the ATSC major id (as declared in TVCT or CVCT) .
 
uint16_t getMinorIdATSC () const
 Get the ATSC major id (as declared in TVCT or CVCT) .
 
UString getName () const
 Get the Service Name .
 
uint16_t getONId () const
 Get the Original Network Id .
 
const PMTgetPMT () const
 Get a constant reference to the last received PMT for the service.
 
PID getPMTPID () const
 Get the PMT PID .
 
UString getProvider () const
 Get the Provider Name .
 
uint8_t getRunningStatus () const
 Get the Running status (as declared in the SDT) .
 
uint16_t getTSId () const
 Get the Transport Stream Id .
 
uint8_t getTypeATSC () const
 Get the ATSC service type (as declared in TVCT or CVCT) .
 
uint8_t getTypeDVB () const
 Get the DVB service type (as declared in service_descriptor) .
 
bool hasCAControlled () const
 Check if the CA-controlled (as declared in the SDT) is present.
 
bool hasCAControlled (bool value) const
 Check if the CA-controlled (as declared in the SDT) has a given value.
 
bool hasEITpfPresent () const
 Check if the EIT present/following present (as declared in the SDT) is present.
 
bool hasEITpfPresent (bool value) const
 Check if the EIT present/following present (as declared in the SDT) has a given value.
 
bool hasEITsPresent () const
 Check if the EIT schedule present (as declared in the SDT) is present.
 
bool hasEITsPresent (bool value) const
 Check if the EIT schedule present (as declared in the SDT) has a given value.
 
bool hasHidden () const
 Check if the Service is hidden to end-user is present.
 
bool hasHidden (bool value) const
 Check if the Service is hidden to end-user has a given value.
 
bool hasId () const
 Check if the Service Id is present.
 
bool hasId (uint16_t value) const
 Check if the Service Id has a given value.
 
bool hasLCN () const
 Check if the Logical Channel Number is present.
 
bool hasLCN (uint16_t value) const
 Check if the Logical Channel Number has a given value.
 
bool hasMajorIdATSC () const
 Check if the ATSC major id (as declared in TVCT or CVCT) is present.
 
bool hasMajorIdATSC (uint16_t value) const
 Check if the ATSC major id (as declared in TVCT or CVCT) has a given value.
 
bool hasMinorIdATSC () const
 Check if the ATSC major id (as declared in TVCT or CVCT) is present.
 
bool hasMinorIdATSC (uint16_t value) const
 Check if the ATSC major id (as declared in TVCT or CVCT) has a given value.
 
bool hasName () const
 Check if the Service Name is present.
 
bool hasName (const UString &value) const
 Check if the Service Name has a given value.
 
bool hasONId () const
 Check if the Original Network Id is present.
 
bool hasONId (uint16_t value) const
 Check if the Original Network Id has a given value.
 
bool hasPMT () const
 Check if the PMT of the service is known.
 
bool hasPMTPID () const
 Check if the PMT PID is present.
 
bool hasPMTPID (PID value) const
 Check if the PMT PID has a given value.
 
bool hasProvider () const
 Check if the Provider Name is present.
 
bool hasProvider (const UString &value) const
 Check if the Provider Name has a given value.
 
bool hasRunningStatus () const
 Check if the Running status (as declared in the SDT) is present.
 
bool hasRunningStatus (uint8_t value) const
 Check if the Running status (as declared in the SDT) has a given value.
 
bool hasTSId () const
 Check if the Transport Stream Id is present.
 
bool hasTSId (uint16_t value) const
 Check if the Transport Stream Id has a given value.
 
bool hasTypeATSC () const
 Check if the ATSC service type (as declared in TVCT or CVCT) is present.
 
bool hasTypeATSC (uint8_t value) const
 Check if the ATSC service type (as declared in TVCT or CVCT) has a given value.
 
bool hasTypeDVB () const
 Check if the DVB service type (as declared in service_descriptor) is present.
 
bool hasTypeDVB (uint8_t value) const
 Check if the DVB service type (as declared in service_descriptor) has a given value.
 
bool isModified () const
 Check if any field was modified since the last call to clearModified().
 
bool match (const UString &ident, bool exact_match=false) const
 Check if a service matches a string identification.
 
bool nonExistentService () const
 Check if the service is non-existent.
 
virtual void set (const UString &desc) override
 Reset using a string description.
 
void setCAControlled (bool value)
 Set the CA-controlled (as declared in the SDT) .
 
void setEITpfPresent (bool value)
 Set the EIT present/following present (as declared in the SDT) .
 
void setEITsPresent (bool value)
 Set the EIT schedule present (as declared in the SDT) .
 
void setHidden (bool value)
 Set the Service is hidden to end-user .
 
void setId (uint16_t value)
 Set the Service Id .
 
void setLCN (uint16_t value)
 Set the Logical Channel Number .
 
void setMajorIdATSC (uint16_t value)
 Set the ATSC major id (as declared in TVCT or CVCT) .
 
void setMinorIdATSC (uint16_t value)
 Set the ATSC major id (as declared in TVCT or CVCT) .
 
void setName (const UString &value)
 Set the Service Name .
 
void setONId (uint16_t value)
 Set the Original Network Id .
 
void setPMTHandler (SignalizationHandlerInterface *h)
 Replace the PMT handler.
 
void setPMTPID (PID value)
 Set the PMT PID .
 
void setProvider (const UString &value)
 Set the Provider Name .
 
void setRunningStatus (uint8_t value)
 Set the Running status (as declared in the SDT) .
 
void setTSId (uint16_t value)
 Set the Transport Stream Id .
 
void setTypeATSC (uint8_t value)
 Set the ATSC service type (as declared in TVCT or CVCT) .
 
void setTypeDVB (uint8_t value)
 Set the DVB service type (as declared in service_descriptor) .
 
virtual UString toString () const override
 Convert to a string object.
 

Static Public Member Functions

template<class CONTAINER >
static std::ostream & Display (std::ostream &strm, const UString &margin, const CONTAINER &container, bool header=true)
 Display a container of services, one line per service.
 
template<class ITERATOR >
static std::ostream & Display (std::ostream &strm, const UString &margin, const ITERATOR &begin, const ITERATOR &end, bool header=true)
 Display a container of services, one line per service.
 
static bool Sort1 (const Service &s1, const Service &s2)
 Sorting criterion method, used by std::sort().
 
static bool Sort2 (const Service &s1, const Service &s2)
 Sorting criterion method, used by std::sort().
 
static bool Sort3 (const Service &s1, const Service &s2)
 Sorting criterion method, used by std::sort().
 

Detailed Description

Discover and describe a DVB service.

This subclass of Service automatically detects the properties of the service based on TS packets from the transport stream.

Member Enumeration Documentation

◆ ServiceField

List of possible fields a Service may have set.

Can be used as bitfield.

Enumerator
ID 

Service id.

TSID 

Transport stream id.

ONID 

Original network id.

PMT_PID 

PMT PID.

LCN 

Logical channel number.

TYPE_DVB 

DVB service type (as defined in service_descriptor).

NAME 

Service name.

PROVIDER 

Provider name.

EITS 

EIT schedule present (as declared in the SDT).

EITPF 

EIT present/following present (as declared in the SDT).

CA 

CA-controlled (as declared in the SDT).

RUNNING 

Running status (as declared in the SDT).

TYPE_ATSC 

ATSC service type (as defined in TVCT or CVCT).

MAJORID_ATSC 

ATSC major id (as declared in TVCT or CVCT).

MINORID_ATSC 

ATSC minor id (as declared in TVCT or CVCT).

HIDDEN 

Service is hidden to end-user.

Constructor & Destructor Documentation

◆ ServiceDiscovery() [1/2]

ts::ServiceDiscovery::ServiceDiscovery ( DuckContext duck,
SignalizationHandlerInterface pmtHandler = nullptr 
)
explicit

Default constructor.

Parameters
[in,out]duckTSDuck execution context. The reference is kept inside the demux.
[in]pmtHandlerHandler to call for each new PMT.

◆ ServiceDiscovery() [2/2]

ts::ServiceDiscovery::ServiceDiscovery ( DuckContext duck,
const UString desc,
SignalizationHandlerInterface pmtHandler = nullptr 
)
explicit

Constructor using a string description.

Parameters
[in,out]duckTSDuck execution context. The reference is kept inside the demux.
[in]descService description string. If the string evaluates to an integer (decimal or hexa), this is a service id, otherwise this is a service name. If the string is empty or "-", use the first service from the PAT.
[in]pmtHandlerHandler to call for each new PMT.

Member Function Documentation

◆ set()

virtual void ts::ServiceDiscovery::set ( const UString desc)
overridevirtual

Reset using a string description.

Parameters
[in]descService description string. If the string evaluates to an integer (decimal or hexa), this is a service id, otherwise this is a service name.

Reimplemented from ts::Service.

◆ clear()

virtual void ts::ServiceDiscovery::clear ( )
overridevirtual

Clear all fields.

Reimplemented from ts::Service.

◆ feedPacket()

void ts::ServiceDiscovery::feedPacket ( const TSPacket pkt)
inline

The following method feeds the service discovery with a TS packet.

The application should pass all packets of the TS.

Parameters
[in]pktA TS packet.

◆ setPMTHandler()

void ts::ServiceDiscovery::setPMTHandler ( SignalizationHandlerInterface h)
inline

Replace the PMT handler.

Parameters
[in]hThe new handler.

◆ hasPMT()

bool ts::ServiceDiscovery::hasPMT ( ) const
inline

Check if the PMT of the service is known.

Returns
True if the PMT is present.

◆ getPMT()

const PMT & ts::ServiceDiscovery::getPMT ( ) const
inline

Get a constant reference to the last received PMT for the service.

Returns
A constant reference to the last received PMT for the service.

◆ nonExistentService()

bool ts::ServiceDiscovery::nonExistentService ( ) const
inline

Check if the service is non-existent.

Returns
True if the service is not yet found or found. Return false when we know that the service does not exist.

◆ clearModified()

void ts::Service::clearModified ( )
inlineinherited

Clear the "modified" indicator.

This indicator is set whenever a field is updated with a different value.

◆ isModified()

bool ts::Service::isModified ( ) const
inlineinherited

Check if any field was modified since the last call to clearModified().

Returns
True if a field was modified since the last call to clearModified().

◆ toString()

virtual UString ts::Service::toString ( ) const
overridevirtualinherited

Convert to a string object.

Returns
This object, converted as a string.

Implements ts::StringifyInterface.

◆ hasId() [1/2]

bool ts::Service::hasId ( ) const
inlineinherited

Check if the Service Id is present.


Returns
True if the Service Id is present.

◆ hasId() [2/2]

bool ts::Service::hasId ( uint16_t  value) const
inlineinherited

Check if the Service Id has a given value.


Parameters
[in]valueThe Service Id to check.
Returns
True if the Service Id is equal to value.

◆ clearId()

void ts::Service::clearId ( )
inlineinherited

Clear the Service Id .


◆ getId()

uint16_t ts::Service::getId ( ) const
inlineinherited

Get the Service Id .


Returns
The Service Id or 0 if unset.

◆ setId()

void ts::Service::setId ( uint16_t  value)
inlineinherited

Set the Service Id .


Parameters
[in]valueThe Service Id .

◆ hasTSId() [1/2]

bool ts::Service::hasTSId ( ) const
inlineinherited

Check if the Transport Stream Id is present.


Returns
True if the Transport Stream Id is present.

◆ hasTSId() [2/2]

bool ts::Service::hasTSId ( uint16_t  value) const
inlineinherited

Check if the Transport Stream Id has a given value.


Parameters
[in]valueThe Transport Stream Id to check.
Returns
True if the Transport Stream Id is equal to value.

◆ clearTSId()

void ts::Service::clearTSId ( )
inlineinherited

Clear the Transport Stream Id .


◆ getTSId()

uint16_t ts::Service::getTSId ( ) const
inlineinherited

Get the Transport Stream Id .


Returns
The Transport Stream Id or 0 if unset.

◆ setTSId()

void ts::Service::setTSId ( uint16_t  value)
inlineinherited

Set the Transport Stream Id .


Parameters
[in]valueThe Transport Stream Id .

◆ hasONId() [1/2]

bool ts::Service::hasONId ( ) const
inlineinherited

Check if the Original Network Id is present.


Returns
True if the Original Network Id is present.

◆ hasONId() [2/2]

bool ts::Service::hasONId ( uint16_t  value) const
inlineinherited

Check if the Original Network Id has a given value.


Parameters
[in]valueThe Original Network Id to check.
Returns
True if the Original Network Id is equal to value.

◆ clearONId()

void ts::Service::clearONId ( )
inlineinherited

Clear the Original Network Id .


◆ getONId()

uint16_t ts::Service::getONId ( ) const
inlineinherited

Get the Original Network Id .


Returns
The Original Network Id or 0 if unset.

◆ setONId()

void ts::Service::setONId ( uint16_t  value)
inlineinherited

Set the Original Network Id .


Parameters
[in]valueThe Original Network Id .

◆ hasLCN() [1/2]

bool ts::Service::hasLCN ( ) const
inlineinherited

Check if the Logical Channel Number is present.


Returns
True if the Logical Channel Number is present.

◆ hasLCN() [2/2]

bool ts::Service::hasLCN ( uint16_t  value) const
inlineinherited

Check if the Logical Channel Number has a given value.


Parameters
[in]valueThe Logical Channel Number to check.
Returns
True if the Logical Channel Number is equal to value.

◆ clearLCN()

void ts::Service::clearLCN ( )
inlineinherited

Clear the Logical Channel Number .


◆ getLCN()

uint16_t ts::Service::getLCN ( ) const
inlineinherited

Get the Logical Channel Number .


Returns
The Logical Channel Number or 0 if unset.

◆ setLCN()

void ts::Service::setLCN ( uint16_t  value)
inlineinherited

Set the Logical Channel Number .


Parameters
[in]valueThe Logical Channel Number .

◆ hasPMTPID() [1/2]

bool ts::Service::hasPMTPID ( ) const
inlineinherited

Check if the PMT PID is present.


Returns
True if the PMT PID is present.

◆ hasPMTPID() [2/2]

bool ts::Service::hasPMTPID ( PID  value) const
inlineinherited

Check if the PMT PID has a given value.


Parameters
[in]valueThe PMT PID to check.
Returns
True if the PMT PID is equal to value.

◆ clearPMTPID()

void ts::Service::clearPMTPID ( )
inlineinherited

Clear the PMT PID .


◆ getPMTPID()

PID ts::Service::getPMTPID ( ) const
inlineinherited

Get the PMT PID .


Returns
The PMT PID or PID_NULL if unset.

◆ setPMTPID()

void ts::Service::setPMTPID ( PID  value)
inlineinherited

Set the PMT PID .


Parameters
[in]valueThe PMT PID .

◆ hasTypeDVB() [1/2]

bool ts::Service::hasTypeDVB ( ) const
inlineinherited

Check if the DVB service type (as declared in service_descriptor) is present.


Returns
True if the DVB service type (as declared in service_descriptor) is present.

◆ hasTypeDVB() [2/2]

bool ts::Service::hasTypeDVB ( uint8_t  value) const
inlineinherited

Check if the DVB service type (as declared in service_descriptor) has a given value.


Parameters
[in]valueThe DVB service type (as declared in service_descriptor) to check.
Returns
True if the DVB service type (as declared in service_descriptor) is equal to value.

◆ clearTypeDVB()

void ts::Service::clearTypeDVB ( )
inlineinherited

Clear the DVB service type (as declared in service_descriptor) .


◆ getTypeDVB()

uint8_t ts::Service::getTypeDVB ( ) const
inlineinherited

Get the DVB service type (as declared in service_descriptor) .


Returns
The DVB service type (as declared in service_descriptor) or 0 if unset.

◆ setTypeDVB()

void ts::Service::setTypeDVB ( uint8_t  value)
inlineinherited

Set the DVB service type (as declared in service_descriptor) .


Parameters
[in]valueThe DVB service type (as declared in service_descriptor) .

◆ hasTypeATSC() [1/2]

bool ts::Service::hasTypeATSC ( ) const
inlineinherited

Check if the ATSC service type (as declared in TVCT or CVCT) is present.


Returns
True if the ATSC service type (as declared in TVCT or CVCT) is present.

◆ hasTypeATSC() [2/2]

bool ts::Service::hasTypeATSC ( uint8_t  value) const
inlineinherited

Check if the ATSC service type (as declared in TVCT or CVCT) has a given value.


Parameters
[in]valueThe ATSC service type (as declared in TVCT or CVCT) to check.
Returns
True if the ATSC service type (as declared in TVCT or CVCT) is equal to value.

◆ clearTypeATSC()

void ts::Service::clearTypeATSC ( )
inlineinherited

Clear the ATSC service type (as declared in TVCT or CVCT) .


◆ getTypeATSC()

uint8_t ts::Service::getTypeATSC ( ) const
inlineinherited

Get the ATSC service type (as declared in TVCT or CVCT) .


Returns
The ATSC service type (as declared in TVCT or CVCT) or 0 if unset.

◆ setTypeATSC()

void ts::Service::setTypeATSC ( uint8_t  value)
inlineinherited

Set the ATSC service type (as declared in TVCT or CVCT) .


Parameters
[in]valueThe ATSC service type (as declared in TVCT or CVCT) .

◆ hasRunningStatus() [1/2]

bool ts::Service::hasRunningStatus ( ) const
inlineinherited

Check if the Running status (as declared in the SDT) is present.


Returns
True if the Running status (as declared in the SDT) is present.

◆ hasRunningStatus() [2/2]

bool ts::Service::hasRunningStatus ( uint8_t  value) const
inlineinherited

Check if the Running status (as declared in the SDT) has a given value.


Parameters
[in]valueThe Running status (as declared in the SDT) to check.
Returns
True if the Running status (as declared in the SDT) is equal to value.

◆ clearRunningStatus()

void ts::Service::clearRunningStatus ( )
inlineinherited

Clear the Running status (as declared in the SDT) .


◆ getRunningStatus()

uint8_t ts::Service::getRunningStatus ( ) const
inlineinherited

Get the Running status (as declared in the SDT) .


Returns
The Running status (as declared in the SDT) or 0 if unset.

◆ setRunningStatus()

void ts::Service::setRunningStatus ( uint8_t  value)
inlineinherited

Set the Running status (as declared in the SDT) .


Parameters
[in]valueThe Running status (as declared in the SDT) .

◆ hasEITsPresent() [1/2]

bool ts::Service::hasEITsPresent ( ) const
inlineinherited

Check if the EIT schedule present (as declared in the SDT) is present.


Returns
True if the EIT schedule present (as declared in the SDT) is present.

◆ hasEITsPresent() [2/2]

bool ts::Service::hasEITsPresent ( bool  value) const
inlineinherited

Check if the EIT schedule present (as declared in the SDT) has a given value.


Parameters
[in]valueThe EIT schedule present (as declared in the SDT) to check.
Returns
True if the EIT schedule present (as declared in the SDT) is equal to value.

◆ clearEITsPresent()

void ts::Service::clearEITsPresent ( )
inlineinherited

Clear the EIT schedule present (as declared in the SDT) .


◆ getEITsPresent()

bool ts::Service::getEITsPresent ( ) const
inlineinherited

Get the EIT schedule present (as declared in the SDT) .


Returns
The EIT schedule present (as declared in the SDT) or false if unset.

◆ setEITsPresent()

void ts::Service::setEITsPresent ( bool  value)
inlineinherited

Set the EIT schedule present (as declared in the SDT) .


Parameters
[in]valueThe EIT schedule present (as declared in the SDT) .

◆ hasEITpfPresent() [1/2]

bool ts::Service::hasEITpfPresent ( ) const
inlineinherited

Check if the EIT present/following present (as declared in the SDT) is present.


Returns
True if the EIT present/following present (as declared in the SDT) is present.

◆ hasEITpfPresent() [2/2]

bool ts::Service::hasEITpfPresent ( bool  value) const
inlineinherited

Check if the EIT present/following present (as declared in the SDT) has a given value.


Parameters
[in]valueThe EIT present/following present (as declared in the SDT) to check.
Returns
True if the EIT present/following present (as declared in the SDT) is equal to value.

◆ clearEITpfPresent()

void ts::Service::clearEITpfPresent ( )
inlineinherited

Clear the EIT present/following present (as declared in the SDT) .


◆ getEITpfPresent()

bool ts::Service::getEITpfPresent ( ) const
inlineinherited

Get the EIT present/following present (as declared in the SDT) .


Returns
The EIT present/following present (as declared in the SDT) or false if unset.

◆ setEITpfPresent()

void ts::Service::setEITpfPresent ( bool  value)
inlineinherited

Set the EIT present/following present (as declared in the SDT) .


Parameters
[in]valueThe EIT present/following present (as declared in the SDT) .

◆ hasCAControlled() [1/2]

bool ts::Service::hasCAControlled ( ) const
inlineinherited

Check if the CA-controlled (as declared in the SDT) is present.


Returns
True if the CA-controlled (as declared in the SDT) is present.

◆ hasCAControlled() [2/2]

bool ts::Service::hasCAControlled ( bool  value) const
inlineinherited

Check if the CA-controlled (as declared in the SDT) has a given value.


Parameters
[in]valueThe CA-controlled (as declared in the SDT) to check.
Returns
True if the CA-controlled (as declared in the SDT) is equal to value.

◆ clearCAControlled()

void ts::Service::clearCAControlled ( )
inlineinherited

Clear the CA-controlled (as declared in the SDT) .


◆ getCAControlled()

bool ts::Service::getCAControlled ( ) const
inlineinherited

Get the CA-controlled (as declared in the SDT) .


Returns
The CA-controlled (as declared in the SDT) or false if unset.

◆ setCAControlled()

void ts::Service::setCAControlled ( bool  value)
inlineinherited

Set the CA-controlled (as declared in the SDT) .


Parameters
[in]valueThe CA-controlled (as declared in the SDT) .

◆ hasMajorIdATSC() [1/2]

bool ts::Service::hasMajorIdATSC ( ) const
inlineinherited

Check if the ATSC major id (as declared in TVCT or CVCT) is present.


Returns
True if the ATSC major id (as declared in TVCT or CVCT) is present.

◆ hasMajorIdATSC() [2/2]

bool ts::Service::hasMajorIdATSC ( uint16_t  value) const
inlineinherited

Check if the ATSC major id (as declared in TVCT or CVCT) has a given value.


Parameters
[in]valueThe ATSC major id (as declared in TVCT or CVCT) to check.
Returns
True if the ATSC major id (as declared in TVCT or CVCT) is equal to value.

◆ clearMajorIdATSC()

void ts::Service::clearMajorIdATSC ( )
inlineinherited

Clear the ATSC major id (as declared in TVCT or CVCT) .


◆ getMajorIdATSC()

uint16_t ts::Service::getMajorIdATSC ( ) const
inlineinherited

Get the ATSC major id (as declared in TVCT or CVCT) .


Returns
The ATSC major id (as declared in TVCT or CVCT) or 0 if unset.

◆ setMajorIdATSC()

void ts::Service::setMajorIdATSC ( uint16_t  value)
inlineinherited

Set the ATSC major id (as declared in TVCT or CVCT) .


Parameters
[in]valueThe ATSC major id (as declared in TVCT or CVCT) .

◆ hasMinorIdATSC() [1/2]

bool ts::Service::hasMinorIdATSC ( ) const
inlineinherited

Check if the ATSC major id (as declared in TVCT or CVCT) is present.


Returns
True if the ATSC major id (as declared in TVCT or CVCT) is present.

◆ hasMinorIdATSC() [2/2]

bool ts::Service::hasMinorIdATSC ( uint16_t  value) const
inlineinherited

Check if the ATSC major id (as declared in TVCT or CVCT) has a given value.


Parameters
[in]valueThe ATSC major id (as declared in TVCT or CVCT) to check.
Returns
True if the ATSC major id (as declared in TVCT or CVCT) is equal to value.

◆ clearMinorIdATSC()

void ts::Service::clearMinorIdATSC ( )
inlineinherited

Clear the ATSC major id (as declared in TVCT or CVCT) .


◆ getMinorIdATSC()

uint16_t ts::Service::getMinorIdATSC ( ) const
inlineinherited

Get the ATSC major id (as declared in TVCT or CVCT) .


Returns
The ATSC major id (as declared in TVCT or CVCT) or 0 if unset.

◆ setMinorIdATSC()

void ts::Service::setMinorIdATSC ( uint16_t  value)
inlineinherited

Set the ATSC major id (as declared in TVCT or CVCT) .


Parameters
[in]valueThe ATSC major id (as declared in TVCT or CVCT) .

◆ hasHidden() [1/2]

bool ts::Service::hasHidden ( ) const
inlineinherited

Check if the Service is hidden to end-user is present.


Returns
True if the Service is hidden to end-user is present.

◆ hasHidden() [2/2]

bool ts::Service::hasHidden ( bool  value) const
inlineinherited

Check if the Service is hidden to end-user has a given value.


Parameters
[in]valueThe Service is hidden to end-user to check.
Returns
True if the Service is hidden to end-user is equal to value.

◆ clearHidden()

void ts::Service::clearHidden ( )
inlineinherited

Clear the Service is hidden to end-user .


◆ getHidden()

bool ts::Service::getHidden ( ) const
inlineinherited

Get the Service is hidden to end-user .


Returns
The Service is hidden to end-user or false if unset.

◆ setHidden()

void ts::Service::setHidden ( bool  value)
inlineinherited

Set the Service is hidden to end-user .


Parameters
[in]valueThe Service is hidden to end-user .

◆ hasName() [1/2]

bool ts::Service::hasName ( ) const
inlineinherited

Check if the Service Name is present.


Returns
True if the Service Name is present.

◆ hasName() [2/2]

bool ts::Service::hasName ( const UString value) const
inlineinherited

Check if the Service Name has a given value.


Parameters
[in]valueThe Service Name to check.
Returns
True if the Service Name is similar to value,
case insensitive and ignoring blanks.

◆ clearName()

void ts::Service::clearName ( )
inlineinherited

Clear the Service Name .


◆ getName()

UString ts::Service::getName ( ) const
inlineinherited

Get the Service Name .


Returns
The Service Name or UString() if unset.

◆ setName()

void ts::Service::setName ( const UString value)
inlineinherited

Set the Service Name .


Parameters
[in]valueThe Service Name .

◆ hasProvider() [1/2]

bool ts::Service::hasProvider ( ) const
inlineinherited

Check if the Provider Name is present.


Returns
True if the Provider Name is present.

◆ hasProvider() [2/2]

bool ts::Service::hasProvider ( const UString value) const
inlineinherited

Check if the Provider Name has a given value.


Parameters
[in]valueThe Provider Name to check.
Returns
True if the Provider Name is similar to value,
case insensitive and ignoring blanks.

◆ clearProvider()

void ts::Service::clearProvider ( )
inlineinherited

Clear the Provider Name .


◆ getProvider()

UString ts::Service::getProvider ( ) const
inlineinherited

Get the Provider Name .


Returns
The Provider Name or UString() if unset.

◆ setProvider()

void ts::Service::setProvider ( const UString value)
inlineinherited

Set the Provider Name .


Parameters
[in]valueThe Provider Name .

◆ getFields()

uint32_t ts::Service::getFields ( ) const
inherited

Get the list of fields which are set in a Service.

Returns
The list of fields which are set in a Service as an or'ed mask of ServiceField values.

◆ match()

bool ts::Service::match ( const UString ident,
bool  exact_match = false 
) const
inherited

Check if a service matches a string identification.

Parameters
[in]identService identification, either an integer (service id) or service name.
[in]exact_matchIf true, the service name must be exactly identical to ident. If it is false, the search is case-insensitive and blanks are ignored.
Returns
True if the service matches ident.

◆ Sort1()

static bool ts::Service::Sort1 ( const Service s1,
const Service s2 
)
staticinherited

Sorting criterion method, used by std::sort().

Sort order: LCN, ONId, TSId, Id, name, provider, type, PMT PID.

If both objects have a given field set, sort according to this field. If only one object has this field set, it comes first. If none of the two objects have this field set, use to next criterion.

Parameters
[in]s1First service.
[in]s2First service.
Returns
True is s1 is logically less than s2, false otherwise.

◆ Sort2()

static bool ts::Service::Sort2 ( const Service s1,
const Service s2 
)
staticinherited

Sorting criterion method, used by std::sort().

Sort order: name, provider, LCN, ONId, TSId, Id, type, PMT PID.

If both objects have a given field set, sort according to this field. If only one object has this field set, it comes first. If none of the two objects have this field set, use to next criterion.

Parameters
[in]s1First service.
[in]s2First service.
Returns
True is s1 is logically less than s2, false otherwise.

◆ Sort3()

static bool ts::Service::Sort3 ( const Service s1,
const Service s2 
)
staticinherited

Sorting criterion method, used by std::sort().

Sort order: ONId, TSId, Id, type, name, provider, LCN, PMT PID.

If both objects have a given field set, sort according to this field. If only one object has this field set, it comes first. If none of the two objects have this field set, use to next criterion.

Parameters
[in]s1First service.
[in]s2First service.
Returns
True is s1 is logically less than s2, false otherwise.

◆ Display() [1/2]

template<class ITERATOR >
std::ostream & ts::Service::Display ( std::ostream &  strm,
const UString margin,
const ITERATOR begin,
const ITERATOR end,
bool  header = true 
)
staticinherited

Display a container of services, one line per service.

Template Parameters
ITERATORAn iterator class in the container.
Parameters
[in,out]strmOutput text stream.
[in]marginThe string to print as left margin.
[in]beginIterator to the first object to display.
[in]endIterator after the last object to display.
[in]headerIf true, display a header line first.
Returns
A reference to strm.

◆ Display() [2/2]

template<class CONTAINER >
static std::ostream & ts::Service::Display ( std::ostream &  strm,
const UString margin,
const CONTAINER container,
bool  header = true 
)
inlinestaticinherited

Display a container of services, one line per service.

Template Parameters
CONTAINERA container class.
Parameters
[in,out]strmOutput text stream.
[in]marginThe string to print as left margin.
[in]containerContainer of services to display.
[in]headerIf true, display a header line first.
Returns
A reference to strm.

The documentation for this class was generated from the following file: