summaryrefslogtreecommitdiffstats
path: root/sdk/dx8sdk/Include/DShowIDL/Mpeg2Data.idl
blob: 6762c49ce41610574c624f2d57af99f3b764ca41 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Module Name:
//
//      Mpeg2Data.idl
//
// Abstract:
//
//      Main Mpeg2Data Library Definition, and interface definitions for
//      the MPEG-2 Section and Table acquisition functionality
//
/////////////////////////////////////////////////////////////////////////////

    // Import Files
import "oaidl.idl";
import "ocidl.idl";
import "bdaiface.idl";

    // Specify single byte packing alignment
#pragma pack(push)
#pragma pack(1)

    // Forward interface declarations
interface ISectionList;
interface IMpeg2Stream;

    // Declare well known PID/TID values for MPEG-2 tables
cpp_quote("#define MPEG_PAT_PID                0x0000")
cpp_quote("#define MPEG_PAT_TID                0x00")

cpp_quote("#define MPEG_CAT_PID                0x0001")
cpp_quote("#define MPEG_CAT_TID                0x01")

cpp_quote("#define MPEG_PMT_TID                0x02")

cpp_quote("#define MPEG_TSDT_PID               0x0002")
cpp_quote("#define MPEG_TSDT_TID               0x03")

    // Declare well known PID/TID values for ATSC tables
cpp_quote("#define ATSC_MGT_PID                0x1FFB")
cpp_quote("#define ATSC_MGT_TID                0xC7")

cpp_quote("#define ATSC_VCT_PID                0x1FFB")
cpp_quote("#define ATSC_VCT_TERR_TID           0xC8")
cpp_quote("#define ATSC_VCT_CABL_TID           0xC9")

cpp_quote("#define ATSC_RRT_PID                0x1FFB")
cpp_quote("#define ATSC_RRT_TID                0xCA")

cpp_quote("#define ATSC_EIT_TID                0xCB")

cpp_quote("#define ATSC_ETT_TID                0xCC")

cpp_quote("#define ATSC_STT_PID                0x1FFB")
cpp_quote("#define ATSC_STT_TID                0xCD")

cpp_quote("#define ATSC_PIT_TID                0xD0")

    // Declare well known PID/TID values for DVB tables
cpp_quote("#define DVB_NIT_PID                 0x0010")
cpp_quote("#define DVB_NIT_ACTUAL_TID          0x40")
cpp_quote("#define DVB_NIT_OTHER_TID           0x41")

cpp_quote("#define DVB_SDT_PID                 0x0011")
cpp_quote("#define DVB_SDT_ACTUAL_TID          0x42")
cpp_quote("#define DVB_SDT_OTHER_TID           0x46")

cpp_quote("#define DVB_BAT_PID                 0x0011")
cpp_quote("#define DVB_BAT_TID                 0x4A")

cpp_quote("#define DVB_EIT_PID                 0x0012")
cpp_quote("#define DVB_EIT_ACTUAL_TID          0x4E")
cpp_quote("#define DVB_EIT_OTHER_TID           0x4F")

cpp_quote("#define DVB_RST_PID                 0x0013")
cpp_quote("#define DVB_RST_TID                 0x71")

cpp_quote("#define DVB_TDT_PID                 0x0014")
cpp_quote("#define DVB_TDT_TID                 0x70")

cpp_quote("#define DVB_ST_PID_16               0x0010")
cpp_quote("#define DVB_ST_PID_17               0x0011")
cpp_quote("#define DVB_ST_PID_18               0x0012")
cpp_quote("#define DVB_ST_PID_19               0x0013")
cpp_quote("#define DVB_ST_PID_20               0x0014")
cpp_quote("#define DVB_ST_TID                  0x72")

cpp_quote("#define DVB_TOT_PID                 0x0014")
cpp_quote("#define DVB_TOT_TID                 0x73")

cpp_quote("#define DVB_DIT_PID                 0x001E")
cpp_quote("#define DVB_DIT_TID                 0x7E")

cpp_quote("#define DVB_SIT_PID                 0x001F")
cpp_quote("#define DVB_SIT_TID                 0x7F")

    // Declare well known PID/TID values for ISDB tables
cpp_quote("#define ISDB_DCT_PID                0x0017")
cpp_quote("#define ISDB_DCT_TID                0xC0")

cpp_quote("#define ISDB_LIT_PID                0x0020")
cpp_quote("#define ISDB_LIT_TID                0xD0")

cpp_quote("#define ISDB_ERT_PID                0x0021")
cpp_quote("#define ISDB_ERT_TID                0xD1")

cpp_quote("#define ISDB_ITT_TID                0xD2")

cpp_quote("#define ISDB_DLT_TID                0xC1")

cpp_quote("#define ISDB_PCAT_PID               0x0022")
cpp_quote("#define ISDB_PCAT_TID               0xC2")

cpp_quote("#define ISDB_SDTT_PID               0x0023")
cpp_quote("#define ISDB_SDTT_TID               0xC3")



////////////////////////////////////
//
// Mpeg2DataLib Library
//
////////////////////////////////////

cpp_quote("class DECLSPEC_UUID(\"DBAF6C1B-B6A4-4898-AE65-204F0D9509A1\") Mpeg2DataLib;")

[
    uuid(DBAF6C1B-B6A4-4898-AE65-204F0D9509A1),
    version(1.0)
]
library Mpeg2DataLib
{
    importlib("stdole32.tlb");
    importlib("stdole2.tlb");

    // Include related interface definition files so that everything ends up
    // in the same library. Note that the order in which these files are
    // included is important, so do not rearrange them arbitrarily
#include "Mpeg2Structs.idl"
#ifdef MPEG2_FUTURE_CODE // Not available in DX9
#include "Mpeg2PsiParser.idl"
#include "AtscPsipParser.idl"
#include "DvbSiParser.idl"
#endif



    ////////////////////////////////////
    //
    // IMpeg2Data Interface
    //
    ////////////////////////////////////

    [
        object,
        uuid(9B396D40-F380-4e3c-A514-1A82BF6EBFE6),    
        pointer_default(unique)
    ]
    interface IMpeg2Data : IUnknown
    {
        HRESULT GetSection([in]  PID                      pid,
                           [in]  TID                      tid,
                           [in]  PMPEG2_FILTER            pFilter,            // OPTIONAL
                           [in]  DWORD                    dwTimeout,
                           [out] ISectionList **          ppSectionList);

        HRESULT GetTable([in]  PID                        pid,
                         [in]  TID                        tid,
                         [in]  PMPEG2_FILTER              pFilter,            // OPTIONAL
                         [in]  DWORD                      dwTimeout,
                         [out] ISectionList **            ppSectionList);

        HRESULT GetStreamOfSections([in]  PID             pid,
                                    [in]  TID             tid,
                                    [in]  PMPEG2_FILTER   pFilter,            // OPTIONAL
                                    [in]  HANDLE          hDataReadyEvent,
                                    [out] IMpeg2Stream ** ppMpegStream);
    };



    ////////////////////////////////////
    //
    // ISectionList Interface
    //
    ////////////////////////////////////

    [
        object,
        uuid(AFEC1EB5-2A64-46c6-BF4B-AE3CCB6AFDB0),
        pointer_default(unique)
    ]
    interface ISectionList : IUnknown
    {
        HRESULT Initialize([in]  MPEG_REQUEST_TYPE requestType,
                           [in]  IMpeg2Data *      pMpeg2Data,
                           [in]  PMPEG_CONTEXT     pContext,
                           [in]  PID               pid,
                           [in]  TID               tid,
                           [in]  PMPEG2_FILTER     pFilter,                   // OPTIONAL
                           [in]  DWORD             timeout,
                           [in]  HANDLE            hDoneEvent);               // OPTIONAL

        HRESULT InitializeWithRawSections([in]  PMPEG_PACKET_LIST pmplSections);

        HRESULT CancelPendingRequest(void);

        HRESULT GetNumberOfSections([out] WORD * pCount);

        HRESULT GetSectionData([in]  WORD          sectionNumber,
                               [out] DWORD *       pdwRawPacketLength,
                               [out] PSECTION *    ppSection);

        HRESULT GetProgramIdentifier(PID * pPid);

        HRESULT GetTableIdentifier(TID * pTableId);
    };



    ////////////////////////////////////
    //
    // IMpeg2Stream Interface
    //
    ////////////////////////////////////

    [
        object,
        uuid(400CC286-32A0-4ce4-9041-39571125A635),
        pointer_default(unique)
    ]
    interface IMpeg2Stream : IUnknown
    {
        HRESULT Initialize([in]  MPEG_REQUEST_TYPE         requestType,
                           [in]  IMpeg2Data *              pMpeg2Data,
                           [in]  PMPEG_CONTEXT             pContext,
                           [in]  PID                       pid,
                           [in]  TID                       tid,
                           [in]  PMPEG2_FILTER             pFilter,           // OPTIONAL
                           [in]  HANDLE                    hDataReadyEvent);

        HRESULT SupplyDataBuffer([in]  PMPEG_STREAM_BUFFER pStreamBuffer);
    };



    ////////////////////////////////////
    //
    // SectionList CoClass
    //
    ////////////////////////////////////

    [
        uuid(73DA5D04-4347-45d3-A9DC-FAE9DDBE558D)
    ]
    coclass SectionList
    {
        [default] interface ISectionList;
    };

    

    ////////////////////////////////////
    //
    // Mpeg2Stream CoClass
    //
    ////////////////////////////////////

    [
        uuid(F91D96C7-8509-4d0b-AB26-A0DD10904BB7)
    ]
    coclass Mpeg2Stream
    {
        [default] interface IMpeg2Stream;
    };

    

    ////////////////////////////////////
    //
    // Mpeg2Data CoClass
    //
    ////////////////////////////////////

    [
        uuid(C666E115-BB62-4027-A113-82D643FE2D99)
    ]
    coclass Mpeg2Data
    {
        [default] interface IMpeg2Data;
#ifdef MPEG2_FUTURE_CODE // Not available in DX9
        interface IAtscPsipParser;
        interface IDvbSiParser;
#endif
    };
};



    // Return to default packing
#pragma pack(pop)