Abstract base class for MPEG PSI/SI descriptors. More...
Public Member Functions | |
virtual | ~QtsAbstractDescriptor () |
Virtual destructor. More... | |
virtual bool | deserialize (const QtsDescriptor &descriptor)=0 |
This abstract method deserializes a binary descriptor. More... | |
void | invalidate () |
Invalidate the descriptor. More... | |
bool | isValid () const |
Check if the descriptor is valid. More... | |
virtual bool | serialize (QtsDescriptor &descriptor) const =0 |
This abstract method serializes a descriptor. More... | |
QtsDescTag | tag () const |
Get the descriptor tag. More... | |
Protected Member Functions | |
QtsAbstractDescriptor (QtsDescTag tag) | |
Protected constructor for subclasses. More... | |
bool | deserializeInit (const QtsDescriptor &descriptor, const quint8 *&payload, int &payloadSize) |
Deserialization helper: Start the deserialization. More... | |
bool | serializeEnd (QtsDescriptor &descriptor, QtlByteBlock &data) const |
Serialization helper: Terminate a binary descriptor. More... | |
bool | serializeInit (QtsDescriptor &descriptor, QtlByteBlock &data) const |
Serialization helper: Start a new binary descriptor. More... | |
Protected Attributes | |
QtsDescTag | _descTag |
Descriptor tag, can be modified by subclasses. More... | |
bool | _isValid |
Validity flag. More... | |
Private Member Functions | |
QtsAbstractDescriptor () Q_DECL_EQ_DELETE | |
Abstract base class for MPEG PSI/SI descriptors.
|
inlinevirtual |
Virtual destructor.
|
inlineprotected |
Protected constructor for subclasses.
[in] | tag | Descriptor tag. |
|
private |
|
inline |
Check if the descriptor is valid.
|
inline |
Invalidate the descriptor.
The descriptor must be rebuilt.
|
inline |
Get the descriptor tag.
|
pure virtual |
This abstract method serializes a descriptor.
[out] | descriptor | Replaced with a binary representation of this object. |
Implemented in QtsPrivateDataSpecifierDescriptor, and QtsTeletextDescriptor.
|
pure virtual |
This abstract method deserializes a binary descriptor.
[in] | descriptor | Binary descriptor to deserialize. If the binary descriptor is not a valid representation of the QtsAbstractDescriptor subclass, this object is invalid. |
Implemented in QtsPrivateDataSpecifierDescriptor, and QtsTeletextDescriptor.
|
protected |
Serialization helper: Start a new binary descriptor.
[out] | descriptor | The binary descriptor into which this object will be serialized. We invalidate it initially. |
[out] | data | A byte block which receives the descriptor header. The descriptor_length field is set to zero. |
|
protected |
Serialization helper: Terminate a binary descriptor.
[out] | descriptor | The serialized descriptor. Set only if the binary descriptor is valid. |
[in,out] | data | A byte block which received the descriptor data. The descriptor_length field is updated. |
|
protected |
Deserialization helper: Start the deserialization.
This object is marked as invalid. The deserialize() method shall set it to true later if the serialization succeeds.
[in] | descriptor | Binary descriptor to deserialize. |
[out] | payload | Receive the address of the descriptor payload. |
[out] | payloadSize | Receive the descriptor payload size. |
|
protected |
Descriptor tag, can be modified by subclasses.
|
protected |
Validity flag.
It is the responsibility of the subclasses to set the valid flag.