TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Describe a DVB or ATSC service. More...
#include <tsService.h>
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(). | |
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.
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 | |
EITPF | |
CA | CA-controlled (as declared in the SDT). |
RUNNING | Running status (as declared in the SDT). |
TYPE_ATSC | |
MAJORID_ATSC | |
MINORID_ATSC | |
HIDDEN | Service is hidden to end-user. |
|
inline |
Constructor using a service id.
[in] | id | Service id. |
Constructor using a string description.
[in] | desc | Service description string. If the string evaluates to an integer (decimal or hexa), this is a service id, otherwise this is a service name. |
|
virtual |
Reset using a string description.
[in] | desc | Service 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 all fields.
Reimplemented in ts::ServiceDiscovery.
|
inline |
Clear the "modified" indicator.
This indicator is set whenever a field is updated with a different value.
|
inline |
Check if any field was modified since the last call to clearModified().
Convert to a string object.
Implements ts::StringifyInterface.
|
inline |
|
inline |
|
inline |
Check if the Transport Stream Id is present.
|
inline |
Clear the Transport Stream Id .
|
inline |
Get the Transport Stream Id .
Set the Transport Stream Id .
[in] | value | The Transport Stream Id . |
Check if the Transport Stream Id has a given value.
[in] | value | The Transport Stream Id to check. |
|
inline |
Check if the Original Network Id is present.
|
inline |
Clear the Original Network Id .
|
inline |
Get the Original Network Id .
Set the Original Network Id .
[in] | value | The Original Network Id . |
Check if the Original Network Id has a given value.
[in] | value | The Original Network Id to check. |
|
inline |
Check if the Logical Channel Number is present.
|
inline |
Clear the Logical Channel Number .
|
inline |
Get the Logical Channel Number .
Set the Logical Channel Number .
[in] | value | The Logical Channel Number . |
Check if the Logical Channel Number has a given value.
[in] | value | The Logical Channel Number to check. |
|
inline |
|
inline |
|
inline |
Check if the DVB service type (as declared in service_descriptor) is present.
|
inline |
Clear the DVB service type (as declared in service_descriptor) .
|
inline |
Get the DVB service type (as declared in service_descriptor) .
Set the DVB service type (as declared in service_descriptor) .
[in] | value | The DVB service type (as declared in service_descriptor) . |
Check if the DVB service type (as declared in service_descriptor) has a given value.
[in] | value | The DVB service type (as declared in service_descriptor) to check. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check if the Provider Name is present.
|
inline |
Clear the Provider Name .
|
inline |
Get the Provider Name .
Set the Provider Name .
[in] | value | The Provider Name . |
Check if the Provider Name has a given value.
[in] | value | The Provider Name to check. |
uint32_t ts::Service::getFields | ( | ) | const |
Check if a service matches a string identification.
[in] | ident | Service identification, either an integer (service id) or service name. |
[in] | exact_match | If true, the service name must be exactly identical to ident. If it is false, the search is case-insensitive and blanks are ignored. |
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.
[in] | s1 | First service. |
[in] | s2 | First service. |
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.
[in] | s1 | First service. |
[in] | s2 | First service. |
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.
[in] | s1 | First service. |
[in] | s2 | First service. |
|
static |
Display a container of services, one line per service.
ITERATOR | An iterator class in the container. |
[in,out] | strm | Output text stream. |
[in] | margin | The string to print as left margin. |
[in] | begin | Iterator to the first object to display. |
[in] | end | Iterator after the last object to display. |
[in] | header | If true, display a header line first. |
|
inlinestatic |
Display a container of services, one line per service.
CONTAINER | A container class. |
[in,out] | strm | Output text stream. |
[in] | margin | The string to print as left margin. |
[in] | container | Container of services to display. |
[in] | header | If true, display a header line first. |