Representation of a binary MPEG PSI/SI descriptor. More...
Public Member Functions | |
| QtsDescriptor () | |
| Default constructor. More... | |
| QtsDescriptor (const QtsDescriptor &other) | |
| Copy constructor. More... | |
| QtsDescriptor (const void *addr, int size) | |
| Constructor from full binary content. More... | |
| QtsDescriptor (const QtlByteBlock &content) | |
| Constructor from full binary content. More... | |
| const quint8 * | content () const |
| Get the address of the full binary content of the descriptor. More... | |
| void | invalidate () |
| Invalidate the descriptor content. More... | |
| bool | isValid () const |
| Check if a descriptor has valid content. More... | |
| bool | operator!= (const QtsDescriptor &other) const |
| Difference operator. More... | |
| const QtsDescriptor & | operator= (const QtsDescriptor &other) |
| Assignment operator. More... | |
| bool | operator== (const QtsDescriptor &other) const |
| Comparison operator. More... | |
| const quint8 * | payload () const |
| Get the address of the descriptor payload. More... | |
| quint8 * | payload () |
| Get the address of the descriptor payload for payload update. More... | |
| int | payloadSize () const |
| Get the size of the descriptor payload. More... | |
| void | replacePayload (const void *addr, int size) |
| Replace the payload of the descriptor. More... | |
| void | replacePayload (const QtlByteBlock &payload) |
| Replace the payload of the descriptor. More... | |
| void | resizePayload (int size) |
| Resize (truncate or extend) the payload of the descriptor. More... | |
| int | size () const |
| Get the size of the full binary content of the descriptor. More... | |
| QtsDescTag | tag () const |
| Get the descriptor tag. More... | |
Private Attributes | |
| QtlByteBlock | _data |
| Full binary content of the descriptor. More... | |
Representation of a binary MPEG PSI/SI descriptor.
Data from descriptors are not deeply copied thanks to the implicit sharing mechanism of the Qt containers. Whenever a descriptor is modified, then a copy-on-write occurs.
|
inline |
Default constructor.
|
inline |
Copy constructor.
| [in] | other | Other instance to copy. |
| QtsDescriptor::QtsDescriptor | ( | const void * | addr, |
| int | size | ||
| ) |
Constructor from full binary content.
The content is copied into the descriptor if valid.
| [in] | addr | Content address. |
| [in] | size | Content size. |
| QtsDescriptor::QtsDescriptor | ( | const QtlByteBlock & | content | ) |
Constructor from full binary content.
The content is copied into the descriptor if valid.
| [in] | content | Binary content. |
| const QtsDescriptor & QtsDescriptor::operator= | ( | const QtsDescriptor & | other | ) |
Assignment operator.
| [in] | other | Other instance to copy. |
| bool QtsDescriptor::isValid | ( | ) | const |
Check if a descriptor has valid content.
|
inline |
Invalidate the descriptor content.
|
inline |
Get the descriptor tag.
|
inline |
Get the address of the full binary content of the descriptor.
|
inline |
Get the size of the full binary content of the descriptor.
|
inline |
Get the address of the descriptor payload.
|
inline |
Get the address of the descriptor payload for payload update.
|
inline |
Get the size of the descriptor payload.
| void QtsDescriptor::replacePayload | ( | const void * | addr, |
| int | size | ||
| ) |
Replace the payload of the descriptor.
The tag is unchanged, the size is adjusted.
| [in] | addr | New payload content address. |
| [in] | size | New payload content size. |
|
inline |
Replace the payload of the descriptor.
The tag is unchanged, the size is adjusted.
| [in] | payload | New payload content. |
| void QtsDescriptor::resizePayload | ( | int | size | ) |
Resize (truncate or extend) the payload of the descriptor.
The tag is unchanged, the size is adjusted. If the payload is extended, new bytes are zeroes.
| [in] | size | New payload size. |
|
inline |
Comparison operator.
| [in] | other | Other instance to compare. |
|
inline |
Difference operator.
| [in] | other | Other instance to compare. |
|
private |
Full binary content of the descriptor.