Debian Codegraph @

mingw-w64-headers/include/mpeg2data.idl

raw
1 /*
2 * Copyright (C) 2025 Biswapriyo Nath
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 import "oaidl.idl";
20 import "ocidl.idl";
21 import "bdaiface.idl";
22 import "mpeg2structs.idl";
23
24 interface ISectionList;
25 interface IMpeg2Stream;
26
27 cpp_quote("#define MPEG_PAT_PID 0x0000")
28 cpp_quote("#define MPEG_PAT_TID 0x00")
29 cpp_quote("#define MPEG_CAT_PID 0x0001")
30 cpp_quote("#define MPEG_CAT_TID 0x01")
31 cpp_quote("#define MPEG_PMT_TID 0x02")
32 cpp_quote("#define MPEG_TSDT_PID 0x0002")
33 cpp_quote("#define MPEG_TSDT_TID 0x03")
34 cpp_quote("#define ATSC_MGT_PID 0x1ffb")
35 cpp_quote("#define ATSC_MGT_TID 0xc7")
36 cpp_quote("#define ATSC_VCT_PID 0x1ffb")
37 cpp_quote("#define ATSC_VCT_TERR_TID 0xc8")
38 cpp_quote("#define ATSC_VCT_CABL_TID 0xc9")
39 cpp_quote("#define ATSC_EIT_TID 0xcb")
40 cpp_quote("#define ATSC_ETT_TID 0xcc")
41 cpp_quote("#define ATSC_RRT_TID 0xca")
42 cpp_quote("#define ATSC_RRT_PID 0x1ffb")
43 cpp_quote("#define ATSC_STT_PID 0x1ffb")
44 cpp_quote("#define ATSC_STT_TID 0xcd")
45 cpp_quote("#define ATSC_PIT_TID 0xd0")
46 cpp_quote("#define DVB_NIT_PID 0x0010")
47 cpp_quote("#define DVB_NIT_ACTUAL_TID 0x40")
48 cpp_quote("#define DVB_NIT_OTHER_TID 0x41")
49 cpp_quote("#define DVB_SDT_PID 0x0011")
50 cpp_quote("#define DVB_SDT_ACTUAL_TID 0x42")
51 cpp_quote("#define DVB_SDT_OTHER_TID 0x46")
52 cpp_quote("#define DVB_BAT_PID 0x0011")
53 cpp_quote("#define DVB_BAT_TID 0x4a")
54 cpp_quote("#define DVB_EIT_PID 0x0012")
55 cpp_quote("#define DVB_EIT_ACTUAL_TID 0x4e")
56 cpp_quote("#define DVB_EIT_OTHER_TID 0x4f")
57 cpp_quote("#define DVB_RST_PID 0x0013")
58 cpp_quote("#define DVB_RST_TID 0x71")
59 cpp_quote("#define DVB_TDT_PID 0x0014")
60 cpp_quote("#define DVB_TDT_TID 0x70")
61 cpp_quote("#define DVB_ST_PID_16 0x0010")
62 cpp_quote("#define DVB_ST_PID_17 0x0011")
63 cpp_quote("#define DVB_ST_PID_18 0x0012")
64 cpp_quote("#define DVB_ST_PID_19 0x0013")
65 cpp_quote("#define DVB_ST_PID_20 0x0014")
66 cpp_quote("#define DVB_ST_TID 0x72")
67 cpp_quote("#define ISDB_ST_TID 0x72")
68 cpp_quote("#define DVB_TOT_PID 0x0014")
69 cpp_quote("#define DVB_TOT_TID 0x73")
70 cpp_quote("#define DVB_DIT_PID 0x001e")
71 cpp_quote("#define DVB_DIT_TID 0x7e")
72 cpp_quote("#define DVB_SIT_PID 0x001f")
73 cpp_quote("#define DVB_SIT_TID 0x7f")
74 cpp_quote("#define ISDB_EMM_TID 0x85")
75 cpp_quote("#define ISDB_BIT_PID 0x0024")
76 cpp_quote("#define ISDB_BIT_TID 0xc4")
77 cpp_quote("#define ISDB_NBIT_PID 0x0025")
78 cpp_quote("#define ISDB_NBIT_MSG_TID 0xc5")
79 cpp_quote("#define ISDB_NBIT_REF_TID 0xc6")
80 cpp_quote("#define ISDB_LDT_PID 0x0025")
81 cpp_quote("#define ISDB_LDT_TID 0xc7")
82 cpp_quote("#define ISDB_SDTT_PID 0x0023")
83 cpp_quote("#define ISDB_SDTT_ALT_PID 0x0028")
84 cpp_quote("#define ISDB_SDTT_TID 0xc3")
85 cpp_quote("#define ISDB_CDT_PID 0x0029")
86 cpp_quote("#define ISDB_CDT_TID 0xc8")
87 cpp_quote("#define SCTE_EAS_TID 0xd8")
88 cpp_quote("#define SCTE_EAS_IB_PID 0x1ffb")
89 cpp_quote("#define SCTE_EAS_OOB_PID 0x1ffc")
90
91 [
92 object,
93 uuid(bdcdd913-9ecd-4fb2-81ae-adf747ea75a5),
94 pointer_default(unique)
95 ]
96 interface IMpeg2TableFilter : IUnknown
97 {
98 HRESULT AddPID(PID p);
99 HRESULT AddTable(PID p, TID t);
100 HRESULT AddExtension(PID p, TID t, TEID e);
101 HRESULT RemovePID(PID p);
102 HRESULT RemoveTable(PID p, TID t);
103 HRESULT RemoveExtension(PID p, TID t, TEID e);
104 }
105
106 [
107 uuid(752845f1-758f-4c83-a043-4270c593308e)
108 ]
109 coclass Mpeg2TableFilter
110 {
111 [default] interface IMpeg2TableFilter;
112 }
113
114 typedef struct Mpeg2TableSampleHdr
115 {
116 BYTE SectionCount;
117 BYTE Reserved[3];
118 long SectionOffsets[];
119 } Mpeg2TableSampleHdr;
120
121 [
122 uuid(dbaf6c1b-b6a4-4898-ae65-204f0d9509a1),
123 version(1.0)
124 ]
125 library Mpeg2DataLib
126 {
127 importlib("stdole32.tlb");
128 importlib("stdole2.tlb");
129
130 [
131 object,
132 uuid(9b396d40-f380-4e3c-a514-1a82bf6ebfe6),
133 pointer_default(unique)
134 ]
135 interface IMpeg2Data : IUnknown
136 {
137 HRESULT GetSection(
138 [in] PID pid,
139 [in] TID tid,
140 [in] PMPEG2_FILTER filter,
141 [in] DWORD timeout,
142 [out] ISectionList **section_list);
143
144 HRESULT GetTable(
145 [in] PID pid,
146 [in] TID tid,
147 [in] PMPEG2_FILTER filter,
148 [in] DWORD timeout,
149 [out] ISectionList **section_list);
150
151 HRESULT GetStreamOfSections(
152 [in] PID pid,
153 [in] TID tid,
154 [in] PMPEG2_FILTER filter,
155 [in] HANDLE data_ready_event,
156 [out] IMpeg2Stream **mpeg_stream);
157 }
158
159 [
160 object,
161 uuid(afec1eb5-2a64-46c6-bf4b-ae3ccb6afdb0),
162 pointer_default(unique)
163 ]
164 interface ISectionList : IUnknown
165 {
166 HRESULT Initialize(
167 [in] MPEG_REQUEST_TYPE request_type,
168 [in] IMpeg2Data *mpeg2_data,
169 [in] PMPEG_CONTEXT context,
170 [in] PID pid,
171 [in] TID tid,
172 [in] PMPEG2_FILTER filter,
173 [in] DWORD timeout,
174 [in] HANDLE done_event);
175
176 HRESULT InitializeWithRawSections(
177 [in] PMPEG_PACKET_LIST mpl_sections);
178
179 HRESULT CancelPendingRequest(void);
180
181 HRESULT GetNumberOfSections(
182 [out] WORD *count);
183
184 HRESULT GetSectionData(
185 [in] WORD section_number,
186 [out] DWORD *raw_packet_length,
187 [out] PSECTION *section);
188
189 HRESULT GetProgramIdentifier(PID *pid);
190
191 HRESULT GetTableIdentifier(TID *tid);
192 }
193
194 [
195 object,
196 uuid(400cc286-32a0-4ce4-9041-39571125a635),
197 pointer_default(unique)
198 ]
199 interface IMpeg2Stream : IUnknown
200 {
201 HRESULT Initialize(
202 [in] MPEG_REQUEST_TYPE request_type,
203 [in] IMpeg2Data *mpeg2_data,
204 [in] PMPEG_CONTEXT context,
205 [in] PID pid,
206 [in] TID tid,
207 [in] PMPEG2_FILTER filter,
208 [in] HANDLE data_ready_event);
209
210 HRESULT SupplyDataBuffer(
211 [in] PMPEG_STREAM_BUFFER stream_buffer);
212 }
213
214 [
215 uuid(73da5d04-4347-45d3-a9dc-fae9ddbe558d)
216 ]
217 coclass SectionList
218 {
219 [default] interface ISectionList;
220 }
221
222 [
223 uuid(f91d96c7-8509-4d0b-ab26-a0dd10904bb7)
224 ]
225 coclass Mpeg2Stream
226 {
227 [default] interface IMpeg2Stream;
228 }
229
230 [
231 uuid(c666e115-bb62-4027-a113-82d643fe2d99)
232 ]
233 coclass Mpeg2Data
234 {
235 [default] interface IMpeg2Data;
236 }
237
238 } /* Mpeg2DataLib */