d3drm: Avoid LPDIRECT3DRM.
[wine] / include / wmsdkidl.idl
1 /*
2  * Copyright 2012 AndrĂ© Hentschel
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 "wmsbuffer.idl";
21 /* import "drmexternals.idl"; */
22
23 typedef unsigned __int64 QWORD;
24
25 typedef struct _WMMediaType
26 {
27     GUID majortype;
28     GUID subtype;
29     BOOL bFixedSizeSamples;
30     BOOL bTemporalCompression;
31     ULONG lSampleSize;
32     GUID formattype;
33     IUnknown *pUnk;
34     ULONG cbFormat;
35     [size_is(cbFormat)] BYTE *pbFormat;
36 } WM_MEDIA_TYPE;
37
38 typedef enum WMT_ATTR_DATATYPE
39 {
40     WMT_TYPE_DWORD      = 0,
41     WMT_TYPE_STRING     = 1,
42     WMT_TYPE_BINARY     = 2,
43     WMT_TYPE_BOOL       = 3,
44     WMT_TYPE_QWORD      = 4,
45     WMT_TYPE_WORD       = 5,
46     WMT_TYPE_GUID       = 6,
47 } WMT_ATTR_DATATYPE;
48
49 typedef enum WMT_STATUS
50 {
51     WMT_ERROR                       =  0,
52     WMT_OPENED                      =  1,
53     WMT_BUFFERING_START             =  2,
54     WMT_BUFFERING_STOP              =  3,
55     WMT_EOF                         =  4,
56     WMT_END_OF_FILE                 =  4,
57     WMT_END_OF_SEGMENT              =  5,
58     WMT_END_OF_STREAMING            =  6,
59     WMT_LOCATING                    =  7,
60     WMT_CONNECTING                  =  8,
61     WMT_NO_RIGHTS                   =  9,
62     WMT_MISSING_CODEC               = 10,
63     WMT_STARTED                     = 11,
64     WMT_STOPPED                     = 12,
65     WMT_CLOSED                      = 13,
66     WMT_STRIDING                    = 14,
67     WMT_TIMER                       = 15,
68     WMT_INDEX_PROGRESS              = 16,
69     WMT_SAVEAS_START                = 17,
70     WMT_SAVEAS_STOP                 = 18,
71     WMT_NEW_SOURCEFLAGS             = 19,
72     WMT_NEW_METADATA                = 20,
73     WMT_BACKUPRESTORE_BEGIN         = 21,
74     WMT_SOURCE_SWITCH               = 22,
75     WMT_ACQUIRE_LICENSE             = 23,
76     WMT_INDIVIDUALIZE               = 24,
77     WMT_NEEDS_INDIVIDUALIZATION     = 25,
78     WMT_NO_RIGHTS_EX                = 26,
79     WMT_BACKUPRESTORE_END           = 27,
80     WMT_BACKUPRESTORE_CONNECTING    = 28,
81     WMT_BACKUPRESTORE_DISCONNECTING = 29,
82     WMT_ERROR_WITHURL               = 30,
83     WMT_RESTRICTED_LICENSE          = 31,
84     WMT_CLIENT_CONNECT              = 32,
85     WMT_CLIENT_DISCONNECT           = 33,
86     WMT_NATIVE_OUTPUT_PROPS_CHANGED = 34,
87     WMT_RECONNECT_START             = 35,
88     WMT_RECONNECT_END               = 36,
89     WMT_CLIENT_CONNECT_EX           = 37,
90     WMT_CLIENT_DISCONNECT_EX        = 38,
91     WMT_SET_FEC_SPAN                = 39,
92     WMT_PREROLL_READY               = 40,
93     WMT_PREROLL_COMPLETE            = 41,
94     WMT_CLIENT_PROPERTIES           = 42,
95     WMT_LICENSEURL_SIGNATURE_STATE  = 43,
96     WMT_INIT_PLAYLIST_BURN          = 44,
97     WMT_TRANSCRYPTOR_INIT           = 45,
98     WMT_TRANSCRYPTOR_SEEKED         = 46,
99     WMT_TRANSCRYPTOR_READ           = 47,
100     WMT_TRANSCRYPTOR_CLOSED         = 48,
101     WMT_PROXIMITY_RESULT            = 49,
102     WMT_PROXIMITY_COMPLETED         = 50,
103     WMT_CONTENT_ENABLER             = 51
104 } WMT_STATUS;
105
106 typedef enum WMT_STREAM_SELECTION
107 {
108     WMT_OFF               = 0,
109     WMT_CLEANPOINT_ONLY   = 1,
110     WMT_ON                = 2,
111 } WMT_STREAM_SELECTION;
112
113
114 [
115     object,
116     uuid(6d7cdc70-9888-11d3-8edc-00c04f6109cf),
117     pointer_default(unique),
118     local
119 ]
120 interface IWMStatusCallback : IUnknown
121 {
122     HRESULT OnStatus(
123         [in] WMT_STATUS Status,
124         [in] HRESULT hr,
125         [in] WMT_ATTR_DATATYPE dwType,
126         [in] BYTE *pValue,
127         [in] void *pvContext);
128 };
129
130 [
131     object,
132     uuid(96406bd8-2b2b-11d3-b36b-00c04f6108ff),
133     pointer_default(unique),
134     local
135 ]
136 interface IWMReaderCallback : IWMStatusCallback
137 {
138     HRESULT OnSample(
139         [in] DWORD dwOutputNum,
140         [in] QWORD cnsSampleTime,
141         [in] QWORD cnsSampleDuration,
142         [in] DWORD dwFlags,
143         [in] INSSBuffer *pSample,
144         [in] void *pvContext);
145 };
146
147 [
148     object,
149     uuid(96406bce-2b2b-11d3-b36b-00c04f6108ff),
150     pointer_default(unique),
151     local
152 ]
153 interface IWMMediaProps : IUnknown
154 {
155     HRESULT GetType(
156         [out] GUID *pguidType);
157
158     HRESULT GetMediaType(
159         [out] WM_MEDIA_TYPE *pType,
160         [in, out] DWORD *pcbType);
161
162     HRESULT SetMediaType(
163         [in] WM_MEDIA_TYPE *pType);
164 };
165
166 [
167     object,
168     uuid(96406bd7-2b2b-11d3-b36b-00c04f6108ff),
169     pointer_default(unique),
170     local
171 ]
172 interface IWMOutputMediaProps : IWMMediaProps
173 {
174     HRESULT GetStreamGroupName(
175         [out, size_is(*pcchName)] WCHAR *pwszName,
176         [in, out] WORD *pcchName);
177
178     HRESULT GetConnectionName(
179         [out, size_is(*pcchName)] WCHAR *pwszName,
180         [in, out] WORD *pcchName);
181 };
182
183 [
184     object,
185     uuid(96406bd9-2b2b-11d3-b36b-00c04f6108ff),
186     pointer_default(unique),
187     local
188 ]
189 interface IWMMetadataEditor : IUnknown
190 {
191     HRESULT Open(
192         [in] const WCHAR *pwszFilename);
193
194     HRESULT Close();
195
196     HRESULT Flush();
197 };
198
199 [
200     object,
201     uuid(96406bd6-2b2b-11d3-b36b-00c04f6108ff),
202     pointer_default(unique),
203     local
204 ]
205 interface IWMReader : IUnknown
206 {
207     HRESULT Open(
208         [in] const WCHAR *pwszURL,
209         [in] IWMReaderCallback *pCallback,
210         [in] void *pvContext);
211
212     HRESULT Close();
213
214     HRESULT GetOutputCount(
215         [out] DWORD *pcOutputs);
216
217     HRESULT GetOutputProps(
218         [in] DWORD dwOutputNum,
219         [out] IWMOutputMediaProps **ppOutput);
220
221     HRESULT SetOutputProps(
222         [in] DWORD dwOutputNum,
223         [in] IWMOutputMediaProps *pOutput);
224
225     HRESULT GetOutputFormatCount(
226         [in] DWORD dwOutputNumber,
227         [out] DWORD *pcFormats);
228
229     HRESULT GetOutputFormat(
230         [in] DWORD dwOutputNumber,
231         [in] DWORD dwFormatNumber,
232         [out] IWMOutputMediaProps** ppProps);
233
234     HRESULT Start(
235         [in] QWORD cnsStart,
236         [in] QWORD cnsDuration,
237         [in] float fRate,
238         [in] void *pvContext);
239
240     HRESULT Stop();
241
242     HRESULT Pause();
243
244     HRESULT Resume();
245 };
246
247 [
248     object,
249     uuid(9397f121-7705-4dc9-b049-98b698188414),
250     pointer_default( unique ),
251     local
252 ]
253 interface IWMSyncReader : IUnknown
254 {
255     HRESULT Open(
256         [in] const WCHAR *pwszFilename);
257
258     HRESULT Close();
259
260     HRESULT SetRange(
261         [in] QWORD cnsStartTime,
262         [in] LONGLONG cnsDuration);
263
264     HRESULT SetRangeByFrame(
265         [in] WORD wStreamNum,
266         [in] QWORD qwFrameNumber,
267         [in] LONGLONG cFramesToRead);
268
269     HRESULT GetNextSample(
270         [in] WORD wStreamNum,
271         [out] INSSBuffer **ppSample,
272         [out] QWORD *pcnsSampleTime,
273         [out] QWORD *pcnsDuration,
274         [out] DWORD *pdwFlags,
275         [out] DWORD *pdwOutputNum,
276         [out] WORD *pwStreamNum);
277
278     HRESULT SetStreamsSelected(
279         [in] WORD cStreamCount,
280         [in] WORD *pwStreamNumbers,
281         [in] WMT_STREAM_SELECTION *pSelections);
282
283     HRESULT GetStreamSelected(
284         [in] WORD wStreamNum,
285         [out] WMT_STREAM_SELECTION *pSelection);
286
287     HRESULT SetReadStreamSamples(
288         [in] WORD wStreamNum,
289         [in] BOOL fCompressed);
290
291     HRESULT GetReadStreamSamples(
292         [in] WORD wStreamNum,
293         [out] BOOL *pfCompressed);
294
295     HRESULT GetOutputSetting(
296         [in] DWORD dwOutputNum,
297         [in] LPCWSTR pszName,
298         [out] WMT_ATTR_DATATYPE *pType,
299         [out, size_is(*pcbLength)] BYTE *pValue,
300         [in, out] WORD *pcbLength);
301
302     HRESULT SetOutputSetting(
303         [in] DWORD dwOutputNum,
304         [in] LPCWSTR pszName,
305         [in] WMT_ATTR_DATATYPE Type,
306         [in, size_is(cbLength)] const BYTE *pValue,
307         [in] WORD cbLength);
308
309     HRESULT GetOutputCount(
310         [out] DWORD *pcOutputs);
311
312     HRESULT GetOutputProps(
313         [in] DWORD dwOutputNum,
314         [out] IWMOutputMediaProps **ppOutput);
315
316     HRESULT SetOutputProps(
317         [in] DWORD dwOutputNum,
318         [in] IWMOutputMediaProps *pOutput);
319
320     HRESULT GetOutputFormatCount(
321         [in] DWORD dwOutputNum,
322         [out] DWORD *pcFormats);
323
324     HRESULT GetOutputFormat(
325         [in] DWORD dwOutputNum,
326         [in] DWORD dwFormatNum,
327         [out] IWMOutputMediaProps **ppProps);
328
329     HRESULT GetOutputNumberForStream(
330         [in] WORD wStreamNum,
331         [out] DWORD *pdwOutputNum);
332
333     HRESULT GetStreamNumberForOutput(
334         [in] DWORD dwOutputNum,
335         [out] WORD *pwStreamNum);
336
337     HRESULT GetMaxOutputSampleSize(
338         [in] DWORD dwOutput,
339         [out] DWORD *pcbMax);
340
341     HRESULT GetMaxStreamSampleSize(
342         [in] WORD wStream,
343         [out] DWORD *pcbMax);
344
345     HRESULT OpenStream(
346         [in] IStream *pStream);
347 };