QtlMovie 1.12 (A specialized FFmpeg front-end)
QtsAbstractTable Class Referenceabstract

Abstract base class for MPEG PSI/SI tables. More...

Inheritance diagram for QtsAbstractTable:
QtsAbstractLongTable QtsProgramAssociationTable QtsProgramMapTable

Public Member Functions

virtual ~QtsAbstractTable ()
 Virtual destructor. More...
 
virtual bool deserialize (const QtsTable &table)=0
 This abstract method deserializes a binary table. More...
 
void invalidate ()
 Invalidate the table. More...
 
bool isValid () const
 Check if the table is valid. More...
 
virtual bool serialize (QtsTable &table) const =0
 This abstract method serializes a table. More...
 
QtsTableId tableId () const
 Get the table id. More...
 

Protected Member Functions

 QtsAbstractTable (QtsTableId tid)
 Protected constructor for subclasses. More...
 
bool deserializeInit (const QtsTable &table)
 Deserialization helper: Start the deserialization. More...
 
bool serializeInit (QtsTable &table) const
 Serialization helper: Start a new binary table. More...
 

Protected Attributes

bool _isValid
 Validity flag. More...
 
QtsTableId _tableId
 Table id, can be modified by subclasses. More...
 

Private Member Functions

 QtsAbstractTable () Q_DECL_EQ_DELETE
 

Detailed Description

Abstract base class for MPEG PSI/SI tables.

Constructor & Destructor Documentation

◆ ~QtsAbstractTable()

virtual QtsAbstractTable::~QtsAbstractTable ( )
inlinevirtual

Virtual destructor.

◆ QtsAbstractTable() [1/2]

QtsAbstractTable::QtsAbstractTable ( QtsTableId  tid)
inlineprotected

Protected constructor for subclasses.

Parameters
[in]tidTable id.

◆ QtsAbstractTable() [2/2]

QtsAbstractTable::QtsAbstractTable ( )
private

Member Function Documentation

◆ isValid()

bool QtsAbstractTable::isValid ( ) const
inline

Check if the table is valid.

Returns
True if the table is valid.

◆ invalidate()

void QtsAbstractTable::invalidate ( )
inline

Invalidate the table.

The table must be rebuilt.

◆ tableId()

QtsTableId QtsAbstractTable::tableId ( ) const
inline

Get the table id.

Returns
The table id.

◆ serialize()

virtual bool QtsAbstractTable::serialize ( QtsTable table) const
pure virtual

This abstract method serializes a table.

Parameters
[out]tableReplaced with a binary representation (a list of sections) of this object.
Returns
True on success, false on error (invalid table, data too large, etc.)

Implemented in QtsProgramMapTable, and QtsProgramAssociationTable.

◆ deserialize()

virtual bool QtsAbstractTable::deserialize ( const QtsTable table)
pure virtual

This abstract method deserializes a binary table.

Parameters
[out]tableBinary table to deserialize. If the binary table is not a valid representation of the QtsAbstractTable subclass, this object is invalid.
Returns
True on success, false on error (invalid data, etc.)

Implemented in QtsProgramMapTable, and QtsProgramAssociationTable.

◆ serializeInit()

bool QtsAbstractTable::serializeInit ( QtsTable table) const
protected

Serialization helper: Start a new binary table.

Parameters
[out]tableThe binary table into which this object will be serialized. We invalidate it initially.
Returns
True on success, false on error (invalid table, etc.)

◆ deserializeInit()

bool QtsAbstractTable::deserializeInit ( const QtsTable table)
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.

Parameters
[in]tableBinary table to deserialize.
Returns
True if the input is valid and deserialization may continue. False if the binary table is invalid or has the wrong tid.

Member Data Documentation

◆ _tableId

QtsTableId QtsAbstractTable::_tableId
protected

Table id, can be modified by subclasses.

◆ _isValid

bool QtsAbstractTable::_isValid
protected

Validity flag.

It is the responsibility of the subclasses to set the valid flag.


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