Microsoft DirectX 9.0

SECTION Structure

The SECTION structure represents a short header from an MPEG-2 table section.

Syntax

typedef struct {
    TID TableId;
    union
    {
        MPEG_HEADER_BITS_MIDL S;
        WORD                  W;
    } Header;
    BYTE SectionData[1];
} SECTION, *PSECTION;

Members

TableId

Specifies the table identifier (TID) of the section.

Header.S

Contains header bits, as an MPEG_HEADER_BITS_MIDL structure. Applications should use the Header.W field instead.

Header.W

Contains the header bits as a WORD type. To get the individual bit fields, coerce this member to an MPEG_HEADER_BITS structure.

SectionData

Contains the section data, as a byte array. The length of the array is given by the Header.W.SectionLength field.

Remarks

This structure represents an MPEG-2 short header. The section might contain a long header or DSM-CC header, each of which extends the short header:

The following code shows how to access the bit fields within the Header member:

SECTION *pSection; // Points to the section data.

// Coerce the Header field to an MPEG_HEADER_BITS type.
MPEG_HEADER_BITS *pHeader = (MPEG_HEADER_BITS*)&pSection->Header.W;

// Now use the pHeader pointer to access the bit fields.
WORD SectionLength = pHeader->SectionLength;

See Also