Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SECTION Structure

Microsoft DirectShow 9.0

SECTION Structure

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


typedef struct {
    TID TableId;
        WORD                  W;
    } Header;
    BYTE SectionData[1];



Specifies the table identifier (TID) of the section.


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


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


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


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:

  • If the Header.W.SectionSyntaxIndicator bit is set, the section uses the long syntax. In that case, you can cast a SECTION pointer to a LONG_SECTION pointer.
  • If the TID indicates a DSM-CC user-to-network message (0x3B) or a download data message (0x3C), the section uses the DSM-CC header syntax. In that case, you can cast a SECTION pointer to a DSMCC_SECTION pointer.

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;


Header: Include Mpeg2Structs.h.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.