TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches

#include <tsEDID.h>

Public Types

enum class  Type : uint8_t {
  REGULAR = 0x00 ,
  PRIVATE = 0x01 ,
  EXTENDED = 0x02 ,
  TABLE_SPEC = 0x03 ,
  INVALID = 0xFF
}

Public Member Functions

 EDID ()=default
constexpr EDID (uint64_t edid)
DID did () const
DID didExtDVB () const
DID didExtension () const
DID didExtMPEG () const
uint64_t encoded () const
bool isExtension () const
bool isExtensionDVB () const
bool isExtensionMPEG () const
bool isPrivateDual () const
bool isPrivateDVB () const
bool isPrivateMPEG () const
bool isRegular () const
bool isTableSpecific () const
bool isValid () const
bool matchRegularStandards (Standards std) const
bool matchTableSpecific (TID tid, Standards std) const
PDS pds () const
REGID privateId () const
REGID regid () const
Standards standards () const
std::set< TID > tableIds () const
UString toString () const
Type type () const
XDID xdid () const

Static Public Member Functions

static EDID Extension (XDID xdid)
static constexpr EDID ExtensionDVB (DID ext)
static constexpr EDID ExtensionMPEG (DID ext)
static constexpr EDID PrivateDual (DID did, PDS pds)
static constexpr EDID PrivateDVB (DID did, PDS pds)
static constexpr EDID PrivateMPEG (DID did, REGID regid)
static constexpr EDID Regular (DID did, Standards std)
static EDID TableSpecific (DID did, Standards std, TID tid1, TID tid2=TID_NULL, TID tid3=TID_NULL, TID tid4=TID_NULL)

Detailed Description

Extended MPEG descriptor id.

For convenience, it is sometimes useful to identify descriptors using an "extended DID" because a descriptor tag is not always enough to uniquely identify a descriptor.

A descriptor usually falls into one of the following categories:

  • Regular descriptor (tag in the range 0x00-0x3F for MPEG, 0x40-7F for DVB, unspecified for other standards). This descriptor is usually associated to a standard (MPEG, DVB, ATSC, ISDB, etc.)
  • Private MPEG descriptor (unofficial name). Must be associated with a 32-bit registration id, or REGID, in a preceding MPEG registration_descriptor. This descriptor can be in the same descriptor list or a higher descriptor list.
  • Private DVB descriptor (tag in the range 0x80-0xFF). Must be associated with a 32-bit private data specifier or PDS, in a preceding private_data_specifier descriptor in the same descriptor list.
  • Dual private descriptor: Can be used either as private MPEG or private DVB descriptor. The same 32-bit value is used as MPEG registration id and DVB private data specifier.
  • MPEG or DVB extension descriptor (tag == 0x3F or 0x7F). Must be associated with a 8-bit tag extension.
  • Table-specific descriptor. Its tag reuses a tag which is otherwise used by some regular descriptor, typically in the MPEG-defined range 0x00-0x3F. Such a descriptor can only be found in one or more specific tables such as AIT, INT or UNT (DVB). In these tables, the descriptor tag is interpreted as this table-specific descriptor. Of course, the regular descriptor which normally uses this tag value cannot be present in these tables. The descriptor tag must be associated with an 8-bit table id (and the associated standard). If the table-specific descriptor is used in several tables, up to 4 different table ids can be set in the EDID. Table-specific descriptors for more than 4 tables are not supported (in practice, the maximum is 2 tables).

The "extended DID" or EDID is a 64-bit value as used in the file tsDID.names. The C++ class EDID encapsulates this value, nothing more.

The EDID 64-bit value is structured as follow: 0xSSSSTTRRRRRRRRDD.

  • 0xSSSS, 16 bits: Mask of associated standards. See enum class Standards.
  • 0xTT, 8 bits: Descriptor type. The possible values are:
    • 0x00: Regular descriptor for the specified standard.
    • 0x01: Private descriptor, needs a registration id or private data specifier.
    • 0x02: Extension descriptor. The descriptor tag must be 0x3F (MPEG) or 0x7F (DVB).
    • 0x03: Table-specific descriptor.
    • 0xFF: Invalid.
  • 0xRRRRRRRR, 32 bits: Registration value. It depends on the descriptor type.
    • 0x00: Unused, registration value = 0xFFFFFFFF.
    • 0x01: Registration value = 32-bit REGID and/or PDS.
    • 0x02: Registration value = 0xFFFFFFVV where 0xVV is the extended descriptor tag.
    • 0x03: Registration value = 0xYYXXWWVV where 0xVV, 0xWW, 0xXX, 0xYY are the parent table ids, in increasing order. The unused table id values are set to 0xFF.
    • other: Unused, registration value = 0xFFFFFFFF.
  • 0xDD, 8 bits: Descriptor id or tag.

Member Enumeration Documentation

◆ Type

enum class ts::EDID::Type : uint8_t
strong

Enumeration of descriptor types.

Enumerator
REGULAR 

Regular descriptor for the specified standard.

PRIVATE 

Private MPEG or DVB descriptor, needs a REGID or PDS.

EXTENDED 

MPEG or DVB extension descriptor. The descriptor tag must be 0x3F or 0x7F.

TABLE_SPEC 

Table-specific descriptor.

INVALID 

Invalid.

Constructor & Destructor Documentation

◆ EDID() [1/2]

ts::EDID::EDID ( )
default

Default constructor. The initial value is invalid.

◆ EDID() [2/2]

ts::EDID::EDID ( uint64_t edid)
inlineexplicitconstexpr

Constructor from a 64-bit EDID value.

Parameters
[in]edid64-bit EDID value.

Member Function Documentation

◆ Regular()

constexpr EDID ts::EDID::Regular ( DID did,
Standards std )
inlinestaticconstexpr

Build the EDID for a regular descriptor.

Parameters
[in]didDescriptor tag.
[in]stdRelevant standards.
Returns
The corresponding EDID.

◆ PrivateMPEG()

constexpr EDID ts::EDID::PrivateMPEG ( DID did,
REGID regid )
inlinestaticconstexpr

Build the EDID for a private MPEG descriptor.

Parameters
[in]didDescriptor tag.
[in]regidAssociated registration id.
Returns
The corresponding EDID.

◆ PrivateDVB()

constexpr EDID ts::EDID::PrivateDVB ( DID did,
PDS pds )
inlinestaticconstexpr

Build the EDID for a private DVB descriptor.

Parameters
[in]didDescriptor tag.
[in]pdsAssociated private data specifier.
Returns
The corresponding EDID.

◆ PrivateDual()

constexpr EDID ts::EDID::PrivateDual ( DID did,
PDS pds )
inlinestaticconstexpr

Build the EDID for a dual private descriptor. This kind of descriptor can be used in a DVB context using a private data specifier descriptor or in a simple MPEG context using a registration descriptor. In both cases, the value of the private data specifier and the registration id are identical.

Parameters
[in]didDescriptor tag.
[in]pdsAssociated registration id and private data specifier.
Returns
The corresponding EDID.

◆ ExtensionMPEG()

constexpr EDID ts::EDID::ExtensionMPEG ( DID ext)
inlinestaticconstexpr

Build the EDID for an MPEG extension descriptor.

Parameters
[in]extAssociated tag extension. The descriptor tag is implicitly DID_MPEG_EXTENSION.
Returns
The corresponding EDID.

◆ ExtensionDVB()

constexpr EDID ts::EDID::ExtensionDVB ( DID ext)
inlinestaticconstexpr

Build the EDID for a DVB extension descriptor.

Parameters
[in]extAssociated tag extension. The descriptor tag is implicitly DID_DVB_EXTENSION.
Returns
The corresponding EDID.

◆ Extension()

EDID ts::EDID::Extension ( XDID xdid)
static

Build the EDID for an MPEG or DVB extension descriptor.

Parameters
[in]xdidExtension descriptor id. If this is not an extension descriptor, create a regular descriptor EDID without standard.
Returns
The corresponding EDID.

◆ TableSpecific()

EDID ts::EDID::TableSpecific ( DID did,
Standards std,
TID tid1,
TID tid2 = TID_NULL,
TID tid3 = TID_NULL,
TID tid4 = TID_NULL )
static

Build the EDID for a table-specific descriptor.

Parameters
[in]didDescriptor tag.
[in]stdRelevant standards for the table.
[in]tid1Associated required table id.
[in]tid2Optional second table id.
[in]tid3Optional third table id.
[in]tid4Optional fourth table id.
Returns
The corresponding EDID.

◆ isValid()

bool ts::EDID::isValid ( ) const
inline

Check if the extended descriptor id is valid.

Returns
True if valid.

◆ type()

Type ts::EDID::type ( ) const
inline

Get the descriptor type.

Returns
The descriptor type.

◆ standards()

Standards ts::EDID::standards ( ) const
inline

Get the associated standards.

Returns
The mask of associated standards.

◆ isRegular()

bool ts::EDID::isRegular ( ) const
inline

Check if the descriptor is a regular one.

Returns
True if the descriptor is a standard one.

◆ did()

DID ts::EDID::did ( ) const
inline

Get the descriptor id (aka tag).

Returns
The descriptor id.

◆ isPrivateMPEG()

bool ts::EDID::isPrivateMPEG ( ) const
inline

Check if the descriptor is a MPEG or dual private descriptor.

Returns
True if the descriptor is a MPEG or dual private descriptor.

◆ isPrivateDVB()

bool ts::EDID::isPrivateDVB ( ) const
inline

Check if the descriptor is a DVB or dual private descriptor.

Returns
True if the descriptor is a DVB or dual private descriptor.

◆ isPrivateDual()

bool ts::EDID::isPrivateDual ( ) const
inline

Check if the descriptor is a dual private descriptor (can be used as MPEG or DVB private descriptor).

Returns
True if the descriptor is a dual private descriptor.

◆ regid()

REGID ts::EDID::regid ( ) const
inline

Get the MPEG registration identifier.

Returns
The MPEG registration identifier or REGID_NULL if this is not a private descriptor.

◆ pds()

PDS ts::EDID::pds ( ) const
inline

Get the DVB private data specifier.

Returns
The DVB private data specifier or PDS_NULL if this is not a private descriptor.

◆ privateId()

REGID ts::EDID::privateId ( ) const
inline

Get the MPEG registration identifier or DVB private data specifier.

Returns
The REGID/PDS or REGID_NULL if this is not a private descriptor.

◆ isExtensionMPEG()

bool ts::EDID::isExtensionMPEG ( ) const
inline

Check if the descriptor is an MPEG extension descriptor.

Returns
True if the descriptor is an MPEG extension descriptor.

◆ isExtensionDVB()

bool ts::EDID::isExtensionDVB ( ) const
inline

Check if the descriptor is a DVB extension descriptor.

Returns
True if the descriptor is a DVB extension descriptor.

◆ isExtension()

bool ts::EDID::isExtension ( ) const
inline

Check if the descriptor is an MPEG or DVB extension descriptor.

Returns
True if the descriptor is an MPEG or DVB extension descriptor.

◆ didExtMPEG()

DID ts::EDID::didExtMPEG ( ) const
inline

Get the MPEG descriptor tag extension.

Returns
The descriptor tag extension or XDID_NULL if this is not an MPEG extension descriptor.

◆ didExtDVB()

DID ts::EDID::didExtDVB ( ) const
inline

Get the DVB descriptor tag extension.

Returns
The descriptor tag extension or XDID_NULL if this is not a DVB extension descriptor.

◆ didExtension()

DID ts::EDID::didExtension ( ) const
inline

Get the MPEG or DVB descriptor tag extension.

Returns
The descriptor tag extension or XDID_NULL if this is not an extension descriptor.

◆ isTableSpecific()

bool ts::EDID::isTableSpecific ( ) const
inline

Check if the descriptor is table-specific.

Returns
True if the descriptor is table-specific.

◆ tableIds()

std::set< TID > ts::EDID::tableIds ( ) const

Get the required table-ids for a table-specific descriptor.

Returns
The set of possible table ids, empty if this is not a table-specific descriptor.

◆ matchTableSpecific()

bool ts::EDID::matchTableSpecific ( TID tid,
Standards std ) const

Check if the descriptor is table-specific and matches a given table id.

Parameters
[in]tidA table id to test.
[in]stdRelevant standards.
Returns
True if the descriptor is table-specific for tid.

◆ matchRegularStandards()

bool ts::EDID::matchRegularStandards ( Standards std) const

Check if the descriptor is a regular one and matches at least one standard.

Parameters
[in]stdRelevant standards to test.
Returns
True if the descriptor is a regular one and matches at least one standard in std. If the regular descriptor has declared no standard, then it matches by default. If the regular descriptor has declared standards but none of them are in std, return true if all its standards are compatible with std. This is the way we discover new standards in the transport stream.

◆ xdid()

XDID ts::EDID::xdid ( ) const

Build an eXtension Descriptor Id from the EDID.

Returns
The corresponding eXtension Descriptor Id.

◆ encoded()

uint64_t ts::EDID::encoded ( ) const
inline

Get the 64-bit encoded EDID value. There is not real usage for this in an application, except looking up names into the DTV names file.

Returns
The 64-bit encoded EDID value.

◆ toString()

UString ts::EDID::toString ( ) const

Convert to a string object. Note: The EDID class does not implement StringifyInterface because we don't want to make it virtual and keep the instance size small, without vtable pointer.

Returns
This object, converted as a string.

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