Share via


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
    A union that contains the following members.

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

    • 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:

  • 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;

Requirements

Header Declared in Mpeg2Structs.h.

See Also

BDA Structures

Send comments about this topic to Microsoft

Build date: 12/4/2008