![]() |
TSDuck v3.43-4480
MPEG Transport Stream Toolkit
|
Representation of a DVB T2-MI (DVB-T2 Modulator Interface) packet. More...
#include <tsT2MIPacket.h>


Public Types | |
| using | SuperClass = DemuxedData |
| Explicit identification of super class. | |
Public Member Functions | |
| T2MIPacket ()=default | |
| Default constructor. | |
| T2MIPacket (const ByteBlock &content, PID source_pid=PID_NULL) | |
| Constructor from full binary content. | |
| T2MIPacket (const ByteBlockPtr &content_ptr, PID source_pid=PID_NULL) | |
| Constructor from full binary content. | |
| T2MIPacket (const T2MIPacket &other, ShareMode mode) | |
| Copy constructor. | |
| T2MIPacket (const void *content, size_t content_size, PID source_pid=PID_NULL) | |
| Constructor from full binary content. | |
| T2MIPacket (T2MIPacket &&other) noexcept | |
| Move constructor. | |
| const UString & | attribute () const |
| Get the generic user-defined "attribute" string of the object. | |
| const uint8_t * | basebandFrame () const |
| Access to the baseband frame inside the packet. | |
| size_t | basebandFrameSize () const |
| Size of the baseband frame in bytes. | |
| virtual void | clear () override |
| Clear data content. | |
| virtual const uint8_t * | content () const |
| Access to the full binary content of the data. | |
| DataBlock & | copy (const DataBlock &other) |
| Duplication. | |
| DemuxedData & | copy (const DemuxedData &other) |
| Duplication. | |
| T2MIPacket & | copy (const T2MIPacket &other) |
| Duplication. | |
| PacketCounter | firstTSPacketIndex () const |
| Index of first TS packet of the data in the demultiplexed stream. | |
| uint8_t | frameIndex () const |
| Get the T2-MI frame index. | |
| bool | interleavingFrameStart () const |
| Get the interleaving frame start flag. | |
| virtual bool | isValid () const override |
| Check if the packet has valid content. | |
| PacketCounter | lastTSPacketIndex () const |
| Index of last TS packet of the data in the demultiplexed stream. | |
| bool | matchContent (const ByteBlock &pattern, const ByteBlock &mask=ByteBlock()) const |
| Check if the start of the data matches a given pattern. | |
| T2MIPacket & | operator= (const T2MIPacket &other) |
| Assignment operator. | |
| T2MIPacket & | operator= (T2MIPacket &&other) noexcept |
| Move assignment operator. | |
| bool | operator== (const DataBlock &other) const |
| Equality operator. | |
| bool | operator== (const DemuxedData &other) const |
| Equality operator. | |
| bool | operator== (const T2MIPacket &other) const |
| Equality operator. | |
| uint8_t | packetCount () const |
| Get the T2-MI packet count (from the packet header). | |
| T2MIPacketType | packetType () const |
| Get the T2-MI packet type. | |
| const uint8_t * | payload () const |
| Access to the payload of the packet. | |
| size_t | payloadSize () const |
| Size of the payload of the packet in bytes. | |
| size_t | payloadSizeInBits () const |
| Size of the payload of the packet in bits. | |
| uint8_t | plp () const |
| Get the PLP (Physical Layer Pipe) identifier. | |
| bool | plpValid () const |
| Check if the packet has a valid PLP (Physical Layer Pipe) identifier. | |
| size_t | rawDataSize () const |
| Size of the complete binary raw data containing the logical structure. | |
| void | reload (const ByteBlock &content) |
| Reload from full binary content. | |
| virtual void | reload (const ByteBlock &content, PID source_pid=PID_NULL) override |
| Reload from full binary content. | |
| void | reload (const ByteBlockPtr &content_ptr) |
| Reload from full binary content. | |
| virtual void | reload (const ByteBlockPtr &content_ptr, PID source_pid=PID_NULL) override |
| Reload from full binary content. | |
| void | reload (const void *content, size_t content_size) |
| Reload from full binary content. | |
| virtual void | reload (const void *content, size_t content_size, PID source_pid=PID_NULL) override |
| Reload from full binary content. | |
| void | setAttribute (const UString &attr) |
| Set a generic user-defined string as "attribute" of the object. | |
| void | setFirstTSPacketIndex (PacketCounter i) |
| Set the first TS packet of the data in the demultiplexed stream. | |
| void | setLastTSPacketIndex (PacketCounter i) |
| Set the last TS packet of the data in the demultiplexed stream. | |
| void | setSourcePID (PID pid) |
| Set the source PID. | |
| virtual size_t | size () const |
| Size of the logical binary content of the data. | |
| PID | sourcePID () const |
| Get the source PID. | |
| uint8_t | superframeIndex () const |
| Get the T2-MI superframe index (from the packet header). | |
Static Public Member Functions | |
| static size_t | GetLengthField (const void *content, size_t content_size) |
| Static method to extract the content of the length field. | |
| static bool | ValidateLengthField (const void *content, size_t content_size, bool allow_extra_data) |
| Static method to validate the content of the length field. | |
Static Public Attributes | |
| static constexpr size_t | AFTER_LEN_BYTE_OFFSET = LEN_SIZE == 0 ? 0 : (LEN_OFFSET + LEN_SIZE + 7) / 8 |
| Offset in bytes of the next byte after the length field. | |
| static constexpr size_t | LEN_BIT_OFFSET = LEN_SIZE == 0 ? 0 : LEN_OFFSET |
| Offset in bits of the length field from the beginning of the structure. | |
| static constexpr size_t | LEN_BIT_SIZE = LEN_SIZE |
| Size in bits of the length field. | |
| static constexpr bool | UNBOUNDED_IS_ALLOWED = UNBOUNDED_ALLOWED |
| If true, the length field allows zero as an "unbounded" value. | |
Protected Member Functions | |
| void | rwAppend (const void *data, size_t dsize) |
| Append raw data to the full binary content of the data for subclasses. | |
| uint8_t * | rwContent () |
| Read/write access to the full binary content of the data for subclasses. | |
| void | rwResize (size_t s) |
| Resize the full binary content of the data for subclasses. | |
Representation of a DVB T2-MI (DVB-T2 Modulator Interface) packet.
|
default |
Default constructor.
The T2MIPacket is initially marked invalid.
| ts::T2MIPacket::T2MIPacket | ( | const T2MIPacket & | other, |
| ShareMode | mode | ||
| ) |
Copy constructor.
| [in] | other | Another instance to copy. |
| [in] | mode | The packet's data are either shared (ShareMode::SHARE) between the two instances or duplicated (ShareMode::COPY). |
|
noexcept |
Move constructor.
| [in,out] | other | Another instance to move. |
Constructor from full binary content.
The content is copied into the packet if valid.
| [in] | content | Address of the binary packet data. |
| [in] | content_size | Size in bytes of the packet. |
| [in] | source_pid | PID from which the packet was read. |
Constructor from full binary content.
The content is copied into the packet if valid.
| [in] | content | Binary packet data. |
| [in] | source_pid | PID from which the packet was read. |
| ts::T2MIPacket::T2MIPacket | ( | const ByteBlockPtr & | content_ptr, |
| PID | source_pid = PID_NULL |
||
| ) |
Constructor from full binary content.
The content is copied into the packet if valid.
| [in] | content_ptr | Safe pointer to the binary packet data. The content is referenced, and thus shared. Do not modify the referenced ByteBlock from outside the T2MIPacket. |
| [in] | source_pid | PID from which the packet was read. |
|
overridevirtual |
Clear data content.
Reimplemented from ts::DemuxedData.
|
overridevirtual |
Reload from full binary content.
| [in] | content | Address of the binary packet data. |
| [in] | content_size | Size in bytes of the packet. |
| [in] | source_pid | PID from which the data were read. |
Reimplemented from ts::DemuxedData.
|
overridevirtual |
Reload from full binary content.
| [in] | content | Binary packet data. |
| [in] | source_pid | PID from which the data were read. |
Reimplemented from ts::DemuxedData.
|
overridevirtual |
Reload from full binary content.
| [in] | content_ptr | Safe pointer to the binary packet data. The content is referenced, and thus shared. Do not modify the referenced ByteBlock from outside the DemuxedData. |
| [in] | source_pid | PID from which the data were read. |
Reimplemented from ts::DemuxedData.
| T2MIPacket & ts::T2MIPacket::operator= | ( | const T2MIPacket & | other | ) |
Assignment operator.
The packets are referenced, and thus shared between the two packet objects.
| [in] | other | Other packet to assign to this object. |
|
noexcept |
Move assignment operator.
| [in,out] | other | Other packet to move into this object. |
| T2MIPacket & ts::T2MIPacket::copy | ( | const T2MIPacket & | other | ) |
Duplication.
Similar to assignment but the packets are duplicated.
| [in] | other | Other packet to duplicate into this object. |
|
overridevirtual |
Check if the packet has valid content.
Reimplemented from ts::DataBlock< LEN_OFFSET, LEN_SIZE, UNBOUNDED_ALLOWED >.
| bool ts::T2MIPacket::operator== | ( | const T2MIPacket & | other | ) | const |
Equality operator.
The source PID's are ignored, only the packet contents are compared. Invalid packets are never identical.
| [in] | other | Other packet to compare. |
|
inline |
Access to the payload of the packet.
|
inline |
Size of the payload of the packet in bits.
A T2-MI packet may stop in the middle of a byte. The payload size in bytes is rounded to the next byte.
| size_t ts::T2MIPacket::payloadSize | ( | ) | const |
Size of the payload of the packet in bytes.
|
inline |
Get the T2-MI packet type.
|
inline |
Get the T2-MI packet count (from the packet header).
|
inline |
Get the T2-MI superframe index (from the packet header).
|
inline |
Get the T2-MI frame index.
This is valid only for some packet types (see ETSI TS 102 773, section 5.2).
|
inline |
Check if the packet has a valid PLP (Physical Layer Pipe) identifier.
|
inline |
Get the PLP (Physical Layer Pipe) identifier.
This is valid only for baseband frames (packet type T2MI_BASEBAND_FRAME).
| bool ts::T2MIPacket::interleavingFrameStart | ( | ) | const |
Get the interleaving frame start flag.
This is valid only for baseband frames (packet type T2MI_BASEBAND_FRAME).
| const uint8_t * ts::T2MIPacket::basebandFrame | ( | ) | const |
Access to the baseband frame inside the packet.
This is valid only for baseband frames (packet type T2MI_BASEBAND_FRAME).
| size_t ts::T2MIPacket::basebandFrameSize | ( | ) | const |
Size of the baseband frame in bytes.
This is valid only for baseband frames (packet type T2MI_BASEBAND_FRAME).
|
inherited |
Reload from full binary content.
| [in] | content | Address of the binary packet data. |
| [in] | content_size | Size in bytes of the packet. |
|
inherited |
Reload from full binary content.
| [in] | content | Binary packet data. The content is copied into a new byte block. |
|
inherited |
|
inherited |
Duplication.
Similar to assignment but the data are duplicated.
| [in] | other | Other data to duplicate into this object. |
|
inherited |
Duplication.
Similar to assignment but the data are duplicated.
| [in] | other | Other data to duplicate into this object. |
|
inherited |
Equality operator.
The source PID's are ignored, only the data contents are compared.
| [in] | other | Other packet to compare. |
|
inherited |
Equality operator.
The source PID's are ignored, only the data contents are compared.
| [in] | other | Other packet to compare. |
|
inlineinherited |
Get the source PID.
|
inlineinherited |
Set the source PID.
| [in] | pid | The source PID. |
|
inlineinherited |
Index of first TS packet of the data in the demultiplexed stream.
Usually valid only if the data were extracted by a demux.
|
inlineinherited |
Index of last TS packet of the data in the demultiplexed stream.
Usually valid only if the data were extracted by a demux.
|
inlineinherited |
Set the first TS packet of the data in the demultiplexed stream.
| [in] | i | The first TS packet of the data in the demultiplexed stream. |
|
inlineinherited |
Set the last TS packet of the data in the demultiplexed stream.
| [in] | i | The last TS packet of the data in the demultiplexed stream. |
|
inlineinherited |
Set a generic user-defined string as "attribute" of the object.
The semantics of this attribute string is not defined. It is used by the application. The attribute string can be found in the <metadata> structure of the XML representation of a table.
| [in] | attr | Generic string to set as attribute. |
|
inlineinherited |
Get the generic user-defined "attribute" string of the object.
|
virtualinherited |
Access to the full binary content of the data.
Do not modify content.
|
virtualinherited |
Size of the logical binary content of the data.
For subclasses of DataBlock, this is the logical size of the data structure inside the DataBlock blob.
Reimplemented in ts::PESPacket.
|
inlineinherited |
Size of the complete binary raw data containing the logical structure.
Non-virtual method, always return the same result.
|
inherited |
Check if the start of the data matches a given pattern.
| [in] | pattern | A byte block to compare with the start of the data. |
| [in] | mask | Optional mask to select meaningful bits in pattern. |
|
staticinherited |
Static method to extract the content of the length field.
| [in] | content | Address of the binary data. Can be the null pointer. |
| [in] | content_size | Size in bytes of the data. |
|
staticinherited |
Static method to validate the content of the length field.
| [in] | content | Address of the binary data. Can be the null pointer. |
| [in] | content_size | Size in bytes of the data. |
| [in] | allow_extra_data | If true, additional data are allowed after the declared length. |
|
inlineprotectedinherited |
Read/write access to the full binary content of the data for subclasses.
|
protectedinherited |
Resize the full binary content of the data for subclasses.
| [in] | s | New size in bytes of the full binary content of the data. |
|
protectedinherited |
Append raw data to the full binary content of the data for subclasses.
| [in] | data | Address of the new area to append. |
| [in] | dsize | Size of the area to append. |
|
staticconstexprinherited |
Size in bits of the length field.
If zero, there is no length field.
|
staticconstexprinherited |
Offset in bytes of the next byte after the length field.
Zero if there is no length field.