TSDuck v3.40-4025
MPEG Transport Stream Toolkit
|
Representation of a simple_application_location_descriptor (AIT specific). More...
#include <tsSimpleApplicationLocationDescriptor.h>
Public Member Functions | |
SimpleApplicationLocationDescriptor () | |
Default constructor. | |
SimpleApplicationLocationDescriptor (DuckContext &duck, const Descriptor &bin) | |
Constructor from a binary descriptor. | |
virtual void | clear () |
This method clears the content of the table or descriptor. | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value, int >::type = 0> | |
UString | dataName (const UChar *section, INT value, NamesFlags flags=NamesFlags::NAME, INT alternate=0, size_t bits=0) |
Get a name from a specified section in the DVB names file for that signalization structure. | |
virtual Standards | definingStandards () const override |
Get the list of standards which define this object. | |
bool | deserialize (DuckContext &duck, const Descriptor &bin) |
This method deserializes a binary descriptor. | |
bool | deserialize (DuckContext &duck, const DescriptorList &dlist, size_t index) |
Deserialize a descriptor from a descriptor list. | |
virtual DescriptorDuplication | duplicationMode () const |
What to do when a descriptor of the same type is added twice in a descriptor list. | |
EDID | edid () const |
Get the extended descriptor id. | |
DID | extendedTag () const |
For MPEG-defined and DVB-defined extension descriptors, get the extended descriptor tag (first byte in payload). | |
virtual void | fromXML (DuckContext &duck, const xml::Element *element) |
This method converts an XML structure to a table or descriptor in this object. | |
void | invalidate () |
Invalidate this object. | |
bool | isValid () const |
Check if this object is valid. | |
virtual bool | merge (const AbstractDescriptor &desc) |
Merge the content of a descriptor into this object. | |
bool | serialize (DuckContext &duck, Descriptor &bin) const |
This method serializes a descriptor. | |
DID | tag () const |
Get the descriptor tag. | |
virtual xml::Element * | toXML (DuckContext &duck, xml::Element *parent) const |
This method converts this object to XML. | |
UString | xmlName () const |
Get the XMl node name representing this table or descriptor. | |
Static Public Member Functions | |
template<typename INT , typename std::enable_if< std::is_integral< INT >::value, int >::type = 0> | |
static UString | DataName (const UChar *xml_name, const UChar *section, INT value, NamesFlags flags=NamesFlags::NAME, INT alternate=0, size_t bits=0) |
Get a name from a specified section in the DVB names file. | |
static void | DisplayDescriptor (ts::TablesDisplay &display, const ts::Descriptor &desc, ts::PSIBuffer &payload, const ts::UString &margin, const ts::DescriptorContext &context) |
Static method to display a descriptor. | |
Public Attributes | |
UString | initial_path {} |
Initial URL path. | |
Static Public Attributes | |
static const UChar *const | XML_GENERIC_DESCRIPTOR |
XML tag name for generic descriptors. | |
static const UChar *const | XML_GENERIC_LONG_TABLE |
XML tag name for generic tables with long sections. | |
static const UChar *const | XML_GENERIC_SHORT_TABLE |
XML tag name for generic short sections. | |
Protected Member Functions | |
virtual bool | analyzeXML (DuckContext &, const xml::Element *) override |
Helper method to convert this object from XML. | |
virtual void | buildXML (DuckContext &, xml::Element *) const override |
Helper method to convert this object to XML. | |
virtual void | clearContent () override |
Helper method to clear the content of the table or descriptor. | |
virtual void | deserializePayload (PSIBuffer &) override |
Deserialize the payload of the descriptor. | |
virtual void | serializePayload (PSIBuffer &) const override |
Serialize the payload of the descriptor. | |
Representation of a simple_application_location_descriptor (AIT specific).
This descriptor cannot be present in other tables than an AIT because its tag reuses an MPEG-defined one.
ts::SimpleApplicationLocationDescriptor::SimpleApplicationLocationDescriptor | ( | DuckContext & | duck, |
const Descriptor & | bin | ||
) |
Constructor from a binary descriptor.
[in,out] | duck | TSDuck execution context. |
[in] | bin | A binary descriptor to deserialize. |
|
static |
Static method to display a descriptor.
[in,out] | display | Display engine. |
[in] | desc | The descriptor to display. |
[in,out] | payload | A PSIBuffer over the payload. |
[in] | margin | Left margin content. |
[in] | context | Context of the descriptor. |
|
overrideprotectedvirtual |
Helper method to clear the content of the table or descriptor.
It is called by clear(). In clearContent(), the subclass shall simply revert the value of all fields to their original values in the default constructor.
Implements ts::AbstractSignalization.
|
overrideprotectedvirtual |
Serialize the payload of the descriptor.
When serialize() is called, the output binary descriptor is cleared and serializePayload() is called. A subclass shall implement serializePayload().
Important: With extension descriptors (MPEG or DVB), serializePayload() does not need to add the extended descriptor tag, it has already been added in the buffer by AbstractDescriptor::serialize().
[in,out] | buf | Serialization buffer. The subclass shall write the descriptor payload into buf. If any kind of error is reported in the buffer, the serialization is considered as invalid and the binary descriptor is invalid. Such errors include write error, such as attempting to write more data than allowed in a binary descriptor or any user-generated error using ts::Buffer::setUserError(). For "extended descriptors", the buffer starts after the "extension tag" which was already written by the caller. |
Implements ts::AbstractDescriptor.
|
overrideprotectedvirtual |
Deserialize the payload of the descriptor.
When deserialize() is called, this object is cleared and validated. Then, deserializePayload() is invoked. A subclass shall implement deserializePayload().
Important: With extension descriptors (MPEG or DVB), deserializePayload() must not read the extended descriptor tag, it has already been extracted from the buffer and verified by AbstractDescriptor::deserialize().
[in,out] | buf | Deserialization buffer. The subclass shall read the descriptor payload from buf. The end of read is the end of the binary payload. If any kind of error is reported in the buffer or if the payload is not completely read, the deserialization is considered as invalid. For "extended descriptors", the buffer starts after the "extension tag". |
Implements ts::AbstractDescriptor.
|
overrideprotectedvirtual |
Helper method to convert this object to XML.
It is called by toXML() only when the object is valid. The root element is already built with the appropriate XML node name. In buildXML(), the subclass shall simply populate the XML node.
[in,out] | root | The root node for the new XML tree. |
[in,out] | duck | TSDuck execution context. |
Implements ts::AbstractSignalization.
|
overrideprotectedvirtual |
Helper method to convert this object from XML.
It is called by fromXML() after checking the validity of the XML node name. In analyzeXML(), the subclass shall populate the C++ object from the content of the XML node. If analyzeXML() returns false, this table or descriptor object is then invalidated and cleared.
[in,out] | duck | TSDuck execution context. |
[in] | element | XML element to convert. |
Implements ts::AbstractSignalization.
|
inlineinherited |
Get the descriptor tag.
|
inlineinherited |
Get the extended descriptor id.
|
virtualinherited |
What to do when a descriptor of the same type is added twice in a descriptor list.
The default action is DescriptorDuplication::ADD, meaning that descriptors are added to the list. Descriptor subclasses should override this method to define a new action.
Reimplemented in ts::ExtendedChannelNameDescriptor, ts::AbstractDeliverySystemDescriptor, ts::AbstractLogicalChannelDescriptor, ts::AbstractMultilingualDescriptor, ts::BouquetNameDescriptor, ts::CAIdentifierDescriptor, ts::DVBAC3Descriptor, ts::DVBEnhancedAC3Descriptor, ts::LocalTimeOffsetDescriptor, ts::NetworkNameDescriptor, ts::ServiceDescriptor, ts::ServiceIdentifierDescriptor, ts::ServiceListDescriptor, ts::EutelsatChannelNumberDescriptor, ts::BroadcasterNameDescriptor, ts::CADescriptor, and ts::NorDigLogicalChannelDescriptorV1.
|
virtualinherited |
Merge the content of a descriptor into this object.
This method implements the duplication mode DescriptorDuplication::MERGE and is specific to each descriptor subclass. By default, the merge fails.
[in] | desc | The other descriptor to merge into this object. Usually, desc has the same subclass as this object, although this is not required. This is up to the implementation of the subclass to decide what to do. |
Reimplemented in ts::AbstractLogicalChannelDescriptor, ts::AbstractMultilingualDescriptor, ts::DVBAC3Descriptor, ts::DVBEnhancedAC3Descriptor, ts::LocalTimeOffsetDescriptor, ts::ServiceListDescriptor, ts::EutelsatChannelNumberDescriptor, and ts::NorDigLogicalChannelDescriptorV1.
|
inlineinherited |
For MPEG-defined and DVB-defined extension descriptors, get the extended descriptor tag (first byte in payload).
|
inherited |
This method serializes a descriptor.
[in,out] | duck | TSDuck execution context. |
[out] | bin | A binary descriptor object. Its content is replaced with a binary representation of this descriptor. |
|
inherited |
This method deserializes a binary descriptor.
[in,out] | duck | TSDuck execution context. |
[in] | bin | A binary descriptor to interpret according to the descriptor subclass. In case of success, this object is replaced with the interpreted content of bin. In case of error, this object is invalidated. |
|
inherited |
Deserialize a descriptor from a descriptor list.
In case of success, this object is replaced with the interpreted content of the binary descriptor. In case of error, this object is invalidated.
[in,out] | duck | TSDuck execution context. |
[in] | dlist | A list of binary descriptors. |
[in] | index | Index of the descriptor to deserialize in dlist. |
|
overridevirtualinherited |
Get the list of standards which define this object.
Reimplemented from ts::AbstractSignalization.
|
inlineinherited |
Check if this object is valid.
|
inlineinherited |
Invalidate this object.
This object must be rebuilt.
|
virtualinherited |
This method clears the content of the table or descriptor.
Upon return, the object is valid and in the same empty state as after a default constructor.
Reimplemented in ts::AbstractTable, and ts::AbstractLongTable.
|
inherited |
Get the XMl node name representing this table or descriptor.
|
virtualinherited |
This method converts this object to XML.
When this object is valid, this method creates a root node with the default XML name and then invokes buildXML() in the subclass to populate the XML node.
Important: Implementers of signalization classes shall not override this class. Implement the protected method buildXML() instead.
[in,out] | duck | TSDuck execution context. |
[in,out] | parent | The parent node for the new XML tree. |
Reimplemented in ts::AbstractTable.
|
virtualinherited |
This method converts an XML structure to a table or descriptor in this object.
In case of success, this object is replaced with the interpreted content of the XML structure. In case of error, this object is invalidated.
This method checks the name of the XML node and then invokes analyzeXML() in the subclass. Depending on the returned values of analyzeXML(), this object is either validated or invalidated.
Important: Implementers of signalization classes shall not override this class. Implement the protected method analyzeXML() instead.
[in,out] | duck | TSDuck execution context. |
[in] | element | XML element to convert. |
Reimplemented in ts::AbstractTable.
|
inlinestaticinherited |
Get a name from a specified section in the DVB names file.
INT | An integer type. |
[in] | xml_name | Table or descriptor name, as used in XML structures. |
[in] | section | Name of section to search. Not case-sensitive. The actual section in the names file is prefixed by the XML name, followed by a dot. |
[in] | value | Value to get the name for. |
[in] | flags | Presentation flags. |
[in] | alternate | Display this integer value if flags ALTERNATE is set. |
[in] | bits | Optional size in bits of the displayed data. Used in replacement of the "Bits=XX" directive in the .names file. |
|
inlineinherited |
Get a name from a specified section in the DVB names file for that signalization structure.
INT | An integer type. |
[in] | section | Name of section to search. Not case-sensitive. The actual section in the names file is prefixed by the XML name of the structure, followed by a dot. |
[in] | value | Value to get the name for. |
[in] | flags | Presentation flags. |
[in] | alternate | Display this integer value if flags ALTERNATE is set. |
[in] | bits | Optional size in bits of the displayed data. Used in replacement of the "Bits=XX" directive in the .names file. |