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

Describe a DVB or ATSC service. More...

#include <tsService.h>

Inheritance diagram for ts::Service:
Collaboration diagram for ts::Service:

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

 Service ()=default
 Default constructor.
 
 Service (const UString &desc)
 Constructor using a string description.
 
 Service (uint16_t id)
 Constructor using a service id.
 
virtual void clear ()
 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) .
 
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 .
 
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 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.
 
virtual void set (const UString &desc)
 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 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

Describe a DVB or ATSC service.

An instance of this class contains all possible properties of a DVB service. But all properties are optional. They may be set and cleared. Check the availability of a property before getting it.

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

◆ Service() [1/2]

ts::Service::Service ( uint16_t  id)
inline

Constructor using a service id.

Parameters
[in]idService id.

◆ Service() [2/2]

ts::Service::Service ( const UString desc)
inline

Constructor 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.

Member Function Documentation

◆ set()

virtual void ts::Service::set ( const UString desc)
virtual

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 in ts::ServiceDiscovery.

◆ clear()

virtual void ts::Service::clear ( )
virtual

Clear all fields.

Reimplemented in ts::ServiceDiscovery.

◆ clearModified()

void ts::Service::clearModified ( )
inline

Clear the "modified" indicator.

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

◆ isModified()

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

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
overridevirtual

Convert to a string object.

Returns
This object, converted as a string.

Implements ts::StringifyInterface.

◆ hasId() [1/2]

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

Check if the Service Id is present.


Returns
True if the Service Id is present.

◆ clearId()

void ts::Service::clearId ( )
inline

Clear the Service Id .


◆ getId()

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

Get the Service Id .


Returns
The Service Id or 0 if unset.

◆ setId()

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

Set the Service Id .


Parameters
[in]valueThe Service Id .

◆ hasId() [2/2]

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

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.

◆ hasTSId() [1/2]

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

Check if the Transport Stream Id is present.


Returns
True if the Transport Stream Id is present.

◆ clearTSId()

void ts::Service::clearTSId ( )
inline

Clear the Transport Stream Id .


◆ getTSId()

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

Get the Transport Stream Id .


Returns
The Transport Stream Id or 0 if unset.

◆ setTSId()

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

Set the Transport Stream Id .


Parameters
[in]valueThe Transport Stream Id .

◆ hasTSId() [2/2]

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

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.

◆ hasONId() [1/2]

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

Check if the Original Network Id is present.


Returns
True if the Original Network Id is present.

◆ clearONId()

void ts::Service::clearONId ( )
inline

Clear the Original Network Id .


◆ getONId()

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

Get the Original Network Id .


Returns
The Original Network Id or 0 if unset.

◆ setONId()

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

Set the Original Network Id .


Parameters
[in]valueThe Original Network Id .

◆ hasONId() [2/2]

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

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.

◆ hasLCN() [1/2]

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

Check if the Logical Channel Number is present.


Returns
True if the Logical Channel Number is present.

◆ clearLCN()

void ts::Service::clearLCN ( )
inline

Clear the Logical Channel Number .


◆ getLCN()

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

Get the Logical Channel Number .


Returns
The Logical Channel Number or 0 if unset.

◆ setLCN()

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

Set the Logical Channel Number .


Parameters
[in]valueThe Logical Channel Number .

◆ hasLCN() [2/2]

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

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.

◆ hasPMTPID() [1/2]

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

Check if the PMT PID is present.


Returns
True if the PMT PID is present.

◆ clearPMTPID()

void ts::Service::clearPMTPID ( )
inline

Clear the PMT PID .


◆ getPMTPID()

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

Get the PMT PID .


Returns
The PMT PID or PID_NULL if unset.

◆ setPMTPID()

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

Set the PMT PID .


Parameters
[in]valueThe PMT PID .

◆ hasPMTPID() [2/2]

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

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.

◆ hasTypeDVB() [1/2]

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

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.

◆ clearTypeDVB()

void ts::Service::clearTypeDVB ( )
inline

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


◆ getTypeDVB()

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

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)
inline

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


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

◆ hasTypeDVB() [2/2]

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

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.

◆ hasTypeATSC() [1/2]

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

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.

◆ clearTypeATSC()

void ts::Service::clearTypeATSC ( )
inline

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


◆ getTypeATSC()

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

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)
inline

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


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

◆ hasTypeATSC() [2/2]

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

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.

◆ hasRunningStatus() [1/2]

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

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.

◆ clearRunningStatus()

void ts::Service::clearRunningStatus ( )
inline

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


◆ getRunningStatus()

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

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)
inline

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


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

◆ hasRunningStatus() [2/2]

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

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.

◆ hasEITsPresent() [1/2]

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

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.

◆ clearEITsPresent()

void ts::Service::clearEITsPresent ( )
inline

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


◆ getEITsPresent()

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

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)
inline

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


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

◆ hasEITsPresent() [2/2]

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

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.

◆ hasEITpfPresent() [1/2]

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

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.

◆ clearEITpfPresent()

void ts::Service::clearEITpfPresent ( )
inline

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


◆ getEITpfPresent()

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

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)
inline

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


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

◆ hasEITpfPresent() [2/2]

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

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.

◆ hasCAControlled() [1/2]

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

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.

◆ clearCAControlled()

void ts::Service::clearCAControlled ( )
inline

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


◆ getCAControlled()

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

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)
inline

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


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

◆ hasCAControlled() [2/2]

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

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.

◆ hasMajorIdATSC() [1/2]

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

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.

◆ clearMajorIdATSC()

void ts::Service::clearMajorIdATSC ( )
inline

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


◆ getMajorIdATSC()

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

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)
inline

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


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

◆ hasMajorIdATSC() [2/2]

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

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.

◆ hasMinorIdATSC() [1/2]

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

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.

◆ clearMinorIdATSC()

void ts::Service::clearMinorIdATSC ( )
inline

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


◆ getMinorIdATSC()

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

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)
inline

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


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

◆ hasMinorIdATSC() [2/2]

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

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.

◆ hasHidden() [1/2]

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

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


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

◆ clearHidden()

void ts::Service::clearHidden ( )
inline

Clear the Service is hidden to end-user .


◆ getHidden()

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

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)
inline

Set the Service is hidden to end-user .


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

◆ hasHidden() [2/2]

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

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.

◆ hasName() [1/2]

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

Check if the Service Name is present.


Returns
True if the Service Name is present.

◆ clearName()

void ts::Service::clearName ( )
inline

Clear the Service Name .


◆ getName()

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

Get the Service Name .


Returns
The Service Name or UString() if unset.

◆ setName()

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

Set the Service Name .


Parameters
[in]valueThe Service Name .

◆ hasName() [2/2]

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

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.

◆ hasProvider() [1/2]

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

Check if the Provider Name is present.


Returns
True if the Provider Name is present.

◆ clearProvider()

void ts::Service::clearProvider ( )
inline

Clear the Provider Name .


◆ getProvider()

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

Get the Provider Name .


Returns
The Provider Name or UString() if unset.

◆ setProvider()

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

Set the Provider Name .


Parameters
[in]valueThe Provider Name .

◆ hasProvider() [2/2]

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

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.

◆ getFields()

uint32_t ts::Service::getFields ( ) const

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

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 
)
static

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 
)
static

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 
)
static

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 
)
static

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 
)
inlinestatic

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: