Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 
      7 #include <mpeg2data.h>
      8 #include <mpeg2bits.h>
      9 
     10 #ifndef __INC_MPEG2STRUCTS__
     11 #define __INC_MPEG2STRUCTS__
     12 
     13 typedef enum _MPEG_CONTEXT_TYPE {
     14   MPEG_CONTEXT_BCS_DEMUX = 0,
     15   MPEG_CONTEXT_WINSOCK
     16 } MPEG_CONTEXT_TYPE;
     17 
     18 typedef enum _MPEG_CURRENT_NEXT_BIT {
     19   MPEG_SECTION_IS_NEXT      = 0,
     20   MPEG_SECTION_IS_CURRENT   = 1
     21 } MPEG_CURRENT_NEXT_BIT;
     22 
     23 typedef enum _MPEG_REQUEST_TYPE {
     24   MPEG_RQST_UNKNOWN               = 0,
     25   MPEG_RQST_GET_SECTION,
     26   MPEG_RQST_GET_SECTION_ASYNC,
     27   MPEG_RQST_GET_TABLE,
     28   MPEG_RQST_GET_TABLE_ASYNC,
     29   MPEG_RQST_GET_SECTIONS_STREAM,
     30   MPEG_RQST_GET_PES_STREAM,
     31   MPEG_RQST_GET_TS_STREAM,
     32   MPEG_RQST_START_MPE_STREAM
     33 } MPEG_REQUEST_TYPE;
     34 
     35 typedef struct _DSMCC_ELEMENT {
     36   PID                   pid;
     37   BYTE                  bComponentTag;
     38   DWORD                 dwCarouselId;
     39   DWORD                 dwTransactionId;
     40   struct _DSMCC_ELEMENT *pNext;
     41 } DSMCC_ELEMENT, *PDSMCC_ELEMENT;
     42 
     43 typedef struct {
     44   WINBOOL  fSpecifyProtocol;
     45   BYTE  Protocol;
     46   WINBOOL  fSpecifyType;
     47   BYTE  Type;
     48   WINBOOL  fSpecifyMessageId;
     49   WORD  MessageId;
     50   WINBOOL  fSpecifyTransactionId;
     51   WINBOOL  fUseTrxIdMessageIdMask;
     52   DWORD TransactionId;
     53   WINBOOL  fSpecifyModuleVersion;
     54   BYTE  ModuleVersion;
     55   WINBOOL  fSpecifyBlockNumber;
     56   WORD  BlockNumber;
     57   WINBOOL  fGetModuleCall;
     58   WORD  NumberOfBlocksInModule;
     59 } DSMCC_FILTER_OPTIONS;
     60 
     61 typedef struct _MPEG_HEADER_BITS_MIDL {
     62   WORD Bits;
     63 } MPEG_HEADER_BITS_MIDL;
     64 
     65 typedef struct _MPEG_HEADER_VERSION_BITS_MIDL {
     66     BYTE Bits;
     67 } MPEG_HEADER_VERSION_BITS_MIDL;
     68 
     69 typedef struct _DSMCC_SECTION {
     70   TID   TableId;
     71   __C89_NAMELESS union {
     72     MPEG_HEADER_BITS_MIDL S;
     73     WORD                  W;
     74   } Header;
     75   WORD  TableIdExtension;
     76   __C89_NAMELESS union {
     77     MPEG_HEADER_VERSION_BITS_MIDL S;
     78     BYTE                          B;
     79   } Version;
     80   BYTE  SectionNumber;
     81   BYTE  LastSectionNumber;
     82   BYTE  ProtocolDiscriminator;
     83   BYTE  DsmccType;
     84   WORD  MessageId;
     85   DWORD TransactionId;
     86   BYTE  Reserved;
     87   BYTE  AdaptationLength;
     88   WORD  MessageLength;
     89   BYTE  RemainingData[1];
     90 } DSMCC_SECTION, *PDSMCC_SECTION;
     91 
     92 typedef struct _DVB_EIT_FILTER_OPTIONS {
     93   WINBOOL fSpecifySegment;
     94   BYTE bSegment;
     95 } DVB_EIT_FILTER_OPTIONS, *PDVB_EIT_FILTER_OPTIONS;
     96 
     97 typedef struct {
     98   TID   TableId;
     99   __C89_NAMELESS union {
    100     MPEG_HEADER_BITS_MIDL S;
    101     WORD                  W;
    102   } Header;
    103   WORD  TableIdExtension;
    104   __C89_NAMELESS union {
    105     MPEG_HEADER_VERSION_BITS_MIDL S;
    106     BYTE                          B;
    107   } Version;
    108   BYTE  SectionNumber;
    109   BYTE  LastSectionNumber;
    110   BYTE  RemainingData[1];
    111 } LONG_SECTION, *PLONG_SECTION;
    112 
    113 typedef struct _MPE_ELEMENT {
    114   PID                 pid;
    115   BYTE                bComponentTag;
    116   struct _MPE_ELEMENT *pNext;
    117 } MPE_ELEMENT, *PMPE_ELEMENT;
    118 
    119 typedef struct _MPEG2_FILTER {
    120   BYTE                 bVersionNumber;
    121   WORD                 wFilterSize;
    122   WINBOOL              fUseRawFilteringBits;
    123   BYTE                 Filter[16];
    124   BYTE                 Mask[16];
    125   WINBOOL              fSpecifyTableIdExtension;
    126   WORD                 TableIdExtension;
    127   WINBOOL              fSpecifyVersion;
    128   BYTE                 Version;
    129   WINBOOL              fSpecifySectionNumber;
    130   BYTE                 SectionNumber;
    131   WINBOOL              fSpecifyCurrentNext;
    132   WINBOOL              fNext;
    133   WINBOOL              fSpecifyDsmccOptions;
    134   DSMCC_FILTER_OPTIONS Dsmcc;
    135   WINBOOL              fSpecifyAtscOptions;
    136   ATSC_FILTER_OPTIONS  Atsc;
    137 } MPEG2_FILTER, *PMPEG2_FILTER;
    138 
    139 typedef struct {
    140   BYTE                   bVersionNumber;
    141   WORD                   wFilterSize;
    142   WINBOOL                fUseRawFilteringBits;
    143   BYTE                   Filter[16];
    144   BYTE                   Mask[16];
    145   WINBOOL                fSpecifyTableIdExtension;
    146   WORD                   TableIdExtension;
    147   WINBOOL                fSpecifyVersion;
    148   BYTE                   Version;
    149   WINBOOL                fSpecifySectionNumber;
    150   BYTE                   SectionNumber;
    151   WINBOOL                fSpecifyCurrentNext;
    152   WINBOOL                fNext;
    153   WINBOOL                fSpecifyDsmccOptions;
    154   DSMCC_FILTER_OPTIONS   Dsmcc;
    155   WINBOOL                fSpecifyAtscOptions;
    156   ATSC_FILTER_OPTIONS    Atsc;
    157   WINBOOL                 fSpecifyDvbEitOptions;
    158   DVB_EIT_FILTER_OPTIONS Dvb_Eit;
    159 } MPEG2_FILTER2, *PMPEG2_FILTER2;
    160 
    161 typedef struct _MPEG_BCS_DEMUX {
    162   DWORD AVMGraphId;
    163 } MPEG_BCS_DEMUX;
    164 
    165 typedef struct _MPEG_WINSOCK {
    166   DWORD AVMGraphId;
    167 } MPEG_WINSOCK;
    168 
    169 typedef struct _MPEG_CONTEXT {
    170   MPEG_CONTEXT_TYPE Type;
    171   __C89_NAMELESS union {
    172     MPEG_BCS_DEMUX Demux;
    173     MPEG_WINSOCK   Winsock;
    174   } U;
    175 } MPEG_CONTEXT, *PMPEG_CONTEXT;
    176 
    177 typedef struct _MPEG_DATE {
    178   BYTE Date;
    179   BYTE Month;
    180   WORD Year;
    181 } MPEG_DATE;
    182 
    183 typedef struct _MPEG_TIME {
    184   BYTE Hours;
    185   BYTE Minutes;
    186   BYTE Seconds;
    187 } MPEG_TIME;
    188 
    189 typedef struct _MPEG_DATE_AND_TIME {
    190   MPEG_DATE D;
    191   MPEG_TIME T;
    192 } MPEG_DATE_AND_TIME;
    193 
    194 typedef MPEG_TIME MPEG_DURATION;
    195 
    196 typedef struct {
    197   TID   TableId;
    198   __C89_NAMELESS union {
    199     MPEG_HEADER_BITS_MIDL S;
    200     WORD                  W;
    201   } Header;
    202   BYTE  SectionData[1];
    203 } SECTION, *PSECTION;
    204 
    205 typedef struct _MPEG_RQST_PACKET {
    206   DWORD    dwLength;
    207   PSECTION pSection;
    208 } MPEG_RQST_PACKET, *PMPEG_RQST_PACKET;
    209 
    210 typedef struct _MPEG_PACKET_LIST {
    211   WORD              wPacketCount;
    212   PMPEG_RQST_PACKET PacketList[1];
    213 } MPEG_PACKET_LIST, *PMPEG_PACKET_LIST;
    214 
    215 typedef struct _MPEG_STREAM_BUFFER {
    216   HRESULT hr;
    217   DWORD   dwDataBufferSize;
    218   DWORD   dwSizeOfDataRead;
    219   BYTE    *pDataBuffer;
    220 } MPEG_STREAM_BUFFER, *PMPEG_STREAM_BUFFER;
    221 
    222 #endif /*__INC_MPEG2STRUCTS__*/
    223