690885e8612d18d9e8dc8a3c393945f8fab89a08
[reactos.git] / dll / win32 / wmvcore / wmvcore_main.c
1 /*
2 * Copyright 2012 Austin English
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 #include "wmvcore.h"
20
21 #include "initguid.h"
22 #include "wmsdk.h"
23 #include "wine/debug.h"
24 #include "wine/heap.h"
25
26 WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
27
28 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
29 {
30 TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
31
32 switch (fdwReason)
33 {
34 case DLL_WINE_PREATTACH:
35 return FALSE; /* prefer native version */
36 case DLL_PROCESS_ATTACH:
37 DisableThreadLibraryCalls(hinstDLL);
38 break;
39 }
40
41 return TRUE;
42 }
43
44 HRESULT WINAPI DllRegisterServer(void)
45 {
46 FIXME("(): stub\n");
47
48 return S_OK;
49 }
50
51 HRESULT WINAPI WMCheckURLScheme(const WCHAR *scheme)
52 {
53 FIXME("(%s): stub\n", wine_dbgstr_w(scheme));
54
55 return NS_E_INVALID_NAME;
56 }
57
58 HRESULT WINAPI WMCreateEditor(IWMMetadataEditor **editor)
59 {
60 FIXME("(%p): stub\n", editor);
61
62 *editor = NULL;
63
64 return E_NOTIMPL;
65 }
66
67 typedef struct {
68 IWMReader IWMReader_iface;
69 IWMReaderAdvanced6 IWMReaderAdvanced6_iface;
70 IWMReaderAccelerator IWMReaderAccelerator_iface;
71 IWMReaderNetworkConfig2 IWMReaderNetworkConfig2_iface;
72 IWMReaderStreamClock IWMReaderStreamClock_iface;
73 IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface;
74 IWMReaderTimecode IWMReaderTimecode_iface;
75 IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
76 IWMHeaderInfo3 IWMHeaderInfo3_iface;
77 IWMLanguageList IWMLanguageList_iface;
78 IReferenceClock IReferenceClock_iface;
79 IWMProfile3 IWMProfile3_iface;
80 IWMPacketSize2 IWMPacketSize2_iface;
81 LONG ref;
82 } WMReader;
83
84 static inline WMReader *impl_from_IWMReader(IWMReader *iface)
85 {
86 return CONTAINING_RECORD(iface, WMReader, IWMReader_iface);
87 }
88
89 static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, void **ppv)
90 {
91 WMReader *This = impl_from_IWMReader(iface);
92
93 if(IsEqualGUID(riid, &IID_IUnknown)) {
94 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
95 *ppv = &This->IWMReader_iface;
96 }else if(IsEqualGUID(riid, &IID_IWMReader)) {
97 TRACE("(%p)->(IID_IWMReader %p)\n", This, ppv);
98 *ppv = &This->IWMReader_iface;
99 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced)) {
100 TRACE("(%p)->(IID_IWMReaderAdvanced %p)\n", This, ppv);
101 *ppv = &This->IWMReaderAdvanced6_iface;
102 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced2)) {
103 TRACE("(%p)->(IID_IWMReaderAdvanced2 %p)\n", This, ppv);
104 *ppv = &This->IWMReaderAdvanced6_iface;
105 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced3)) {
106 TRACE("(%p)->(IID_IWMReaderAdvanced3 %p)\n", This, ppv);
107 *ppv = &This->IWMReaderAdvanced6_iface;
108 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced4)) {
109 TRACE("(%p)->(IID_IWMReaderAdvanced4 %p)\n", This, ppv);
110 *ppv = &This->IWMReaderAdvanced6_iface;
111 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced5)) {
112 TRACE("(%p)->(IID_IWMReaderAdvanced5 %p)\n", This, ppv);
113 *ppv = &This->IWMReaderAdvanced6_iface;
114 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced6)) {
115 TRACE("(%p)->(IID_IWMReaderAdvanced6 %p)\n", This, ppv);
116 *ppv = &This->IWMReaderAdvanced6_iface;
117 }else if(IsEqualGUID(riid, &IID_IWMReaderAccelerator)) {
118 TRACE("(%p)->(IID_IWMReaderAccelerator %p)\n", This, ppv);
119 *ppv = &This->IWMReaderAccelerator_iface;
120 }else if(IsEqualGUID(riid, &IID_IWMReaderNetworkConfig)) {
121 TRACE("(%p)->(IWMReaderNetworkConfig %p)\n", This, ppv);
122 *ppv = &This->IWMReaderNetworkConfig2_iface;
123 }else if(IsEqualGUID(riid, &IID_IWMReaderNetworkConfig2)) {
124 TRACE("(%p)->(IWMReaderNetworkConfig2 %p)\n", This, ppv);
125 *ppv = &This->IWMReaderNetworkConfig2_iface;
126 }else if(IsEqualGUID(riid, &IID_IWMReaderStreamClock)) {
127 TRACE("(%p)->(IWMReaderStreamClock %p)\n", This, ppv);
128 *ppv = &This->IWMReaderStreamClock_iface;
129 }else if(IsEqualGUID(riid, &IID_IWMReaderTypeNegotiation)) {
130 TRACE("(%p)->(IWMReaderTypeNegotiation %p)\n", This, ppv);
131 *ppv = &This->IWMReaderTypeNegotiation_iface;
132 }else if(IsEqualGUID(riid, &IID_IWMReaderTimecode)) {
133 TRACE("(%p)->(IWMReaderTimecode %p)\n", This, ppv);
134 *ppv = &This->IWMReaderTimecode_iface;
135 }else if(IsEqualGUID(riid, &IID_IWMReaderPlaylistBurn)) {
136 TRACE("(%p)->(IWMReaderPlaylistBurn %p)\n", This, ppv);
137 *ppv = &This->IWMReaderPlaylistBurn_iface;
138 }else if(IsEqualGUID(riid, &IID_IWMHeaderInfo)) {
139 TRACE("(%p)->(IWMHeaderInfo %p)\n", This, ppv);
140 *ppv = &This->IWMHeaderInfo3_iface;
141 }else if(IsEqualGUID(riid, &IID_IWMHeaderInfo2)) {
142 TRACE("(%p)->(IWMHeaderInfo2 %p)\n", This, ppv);
143 *ppv = &This->IWMHeaderInfo3_iface;
144 }else if(IsEqualGUID(riid, &IID_IWMHeaderInfo3)) {
145 TRACE("(%p)->(IWMHeaderInfo3 %p)\n", This, ppv);
146 *ppv = &This->IWMHeaderInfo3_iface;
147 }else if(IsEqualGUID(riid, &IID_IWMLanguageList)) {
148 TRACE("(%p)->(IWMLanguageList %p)\n", This, ppv);
149 *ppv = &This->IWMLanguageList_iface;
150 }else if(IsEqualGUID(riid, &IID_IReferenceClock)) {
151 TRACE("(%p)->(IWMLanguageList %p)\n", This, ppv);
152 *ppv = &This->IReferenceClock_iface;
153 }else if(IsEqualGUID(riid, &IID_IWMProfile)) {
154 TRACE("(%p)->(IWMProfile %p)\n", This, ppv);
155 *ppv = &This->IWMProfile3_iface;
156 }else if(IsEqualGUID(riid, &IID_IWMProfile2)) {
157 TRACE("(%p)->(IWMProfile2 %p)\n", This, ppv);
158 *ppv = &This->IWMProfile3_iface;
159 }else if(IsEqualGUID(riid, &IID_IWMProfile3)) {
160 TRACE("(%p)->(IWMProfile3 %p)\n", This, ppv);
161 *ppv = &This->IWMProfile3_iface;
162 }else if(IsEqualGUID(riid, &IID_IWMPacketSize)) {
163 TRACE("(%p)->(IWMPacketSize %p)\n", This, ppv);
164 *ppv = &This->IWMPacketSize2_iface;
165 }else if(IsEqualGUID(riid, &IID_IWMPacketSize2)) {
166 TRACE("(%p)->(IWMPacketSize2 %p)\n", This, ppv);
167 *ppv = &This->IWMPacketSize2_iface;
168 }else {
169 *ppv = NULL;
170 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
171 return E_NOINTERFACE;
172 }
173
174 IUnknown_AddRef((IUnknown*)*ppv);
175 return S_OK;
176 }
177
178 static ULONG WINAPI WMReader_AddRef(IWMReader *iface)
179 {
180 WMReader *This = impl_from_IWMReader(iface);
181 LONG ref = InterlockedIncrement(&This->ref);
182
183 TRACE("(%p) ref=%d\n", This, ref);
184
185 return ref;
186 }
187
188 static ULONG WINAPI WMReader_Release(IWMReader *iface)
189 {
190 WMReader *This = impl_from_IWMReader(iface);
191 LONG ref = InterlockedDecrement(&This->ref);
192
193 TRACE("(%p) ref=%d\n", This, ref);
194
195 if(!ref)
196 heap_free(This);
197
198 return ref;
199 }
200
201 static HRESULT WINAPI WMReader_Open(IWMReader *iface, const WCHAR *url, IWMReaderCallback *callback, void *context)
202 {
203 WMReader *This = impl_from_IWMReader(iface);
204 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(url), callback, context);
205 return E_NOTIMPL;
206 }
207
208 static HRESULT WINAPI WMReader_Close(IWMReader *iface)
209 {
210 WMReader *This = impl_from_IWMReader(iface);
211 FIXME("(%p)\n", This);
212 return E_NOTIMPL;
213 }
214
215 static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *outputs)
216 {
217 WMReader *This = impl_from_IWMReader(iface);
218 FIXME("(%p)->(%p)\n", This, outputs);
219 return E_NOTIMPL;
220 }
221
222 static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps **output)
223 {
224 WMReader *This = impl_from_IWMReader(iface);
225 FIXME("(%p)->(%u %p)\n", This, output_num, output);
226 return E_NOTIMPL;
227 }
228
229 static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output)
230 {
231 WMReader *This = impl_from_IWMReader(iface);
232 FIXME("(%p)->(%u %p)\n", This, output_num, output);
233 return E_NOTIMPL;
234 }
235
236 static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output_num, DWORD *formats)
237 {
238 WMReader *This = impl_from_IWMReader(iface);
239 FIXME("(%p)->(%u %p)\n", This, output_num, formats);
240 return E_NOTIMPL;
241 }
242
243 static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props)
244 {
245 WMReader *This = impl_from_IWMReader(iface);
246 FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props);
247 return E_NOTIMPL;
248 }
249
250 static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context)
251 {
252 WMReader *This = impl_from_IWMReader(iface);
253 FIXME("(%p)->(%s %s %f %p)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate, context);
254 return E_NOTIMPL;
255 }
256
257 static HRESULT WINAPI WMReader_Stop(IWMReader *iface)
258 {
259 WMReader *This = impl_from_IWMReader(iface);
260 FIXME("(%p)\n", This);
261 return E_NOTIMPL;
262 }
263
264 static HRESULT WINAPI WMReader_Pause(IWMReader *iface)
265 {
266 WMReader *This = impl_from_IWMReader(iface);
267 FIXME("(%p)\n", This);
268 return E_NOTIMPL;
269 }
270
271 static HRESULT WINAPI WMReader_Resume(IWMReader *iface)
272 {
273 WMReader *This = impl_from_IWMReader(iface);
274 FIXME("(%p)\n", This);
275 return E_NOTIMPL;
276 }
277
278 static const IWMReaderVtbl WMReaderVtbl = {
279 WMReader_QueryInterface,
280 WMReader_AddRef,
281 WMReader_Release,
282 WMReader_Open,
283 WMReader_Close,
284 WMReader_GetOutputCount,
285 WMReader_GetOutputProps,
286 WMReader_SetOutputProps,
287 WMReader_GetOutputFormatCount,
288 WMReader_GetOutputFormat,
289 WMReader_Start,
290 WMReader_Stop,
291 WMReader_Pause,
292 WMReader_Resume
293 };
294
295 static inline WMReader *impl_from_IWMReaderAdvanced6(IWMReaderAdvanced6 *iface)
296 {
297 return CONTAINING_RECORD(iface, WMReader, IWMReaderAdvanced6_iface);
298 }
299
300 static HRESULT WINAPI WMReaderAdvanced_QueryInterface(IWMReaderAdvanced6 *iface, REFIID riid, void **ppv)
301 {
302 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
303 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
304 }
305
306 static ULONG WINAPI WMReaderAdvanced_AddRef(IWMReaderAdvanced6 *iface)
307 {
308 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
309 return IWMReader_AddRef(&This->IWMReader_iface);
310 }
311
312 static ULONG WINAPI WMReaderAdvanced_Release(IWMReaderAdvanced6 *iface)
313 {
314 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
315 return IWMReader_Release(&This->IWMReader_iface);
316 }
317
318 static HRESULT WINAPI WMReaderAdvanced_SetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL user_clock)
319 {
320 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
321 FIXME("(%p)->(%x)\n", This, user_clock);
322 return E_NOTIMPL;
323 }
324
325 static HRESULT WINAPI WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL *user_clock)
326 {
327 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
328 FIXME("(%p)->(%p)\n", This, user_clock);
329 return E_NOTIMPL;
330 }
331
332 static HRESULT WINAPI WMReaderAdvanced_DeliverTime(IWMReaderAdvanced6 *iface, QWORD time)
333 {
334 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
335 FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(time));
336 return E_NOTIMPL;
337 }
338
339 static HRESULT WINAPI WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL selection)
340 {
341 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
342 FIXME("(%p)->(%x)\n", This, selection);
343 return E_NOTIMPL;
344 }
345
346 static HRESULT WINAPI WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL *selection)
347 {
348 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
349 FIXME("(%p)->(%p)\n", This, selection);
350 return E_NOTIMPL;
351 }
352
353 static HRESULT WINAPI WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6 *iface, WORD stream_count,
354 WORD *stream_numbers, WMT_STREAM_SELECTION *selections)
355 {
356 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
357 FIXME("(%p)->(%d %p %p)\n", This, stream_count, stream_numbers, selections);
358 return E_NOTIMPL;
359 }
360
361 static HRESULT WINAPI WMReaderAdvanced_GetStreamSelected(IWMReaderAdvanced6 *iface, WORD stream_num,
362 WMT_STREAM_SELECTION *selection)
363 {
364 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
365 FIXME("(%p)->(%d %p)\n", This, stream_num, selection);
366 return E_NOTIMPL;
367 }
368
369 static HRESULT WINAPI WMReaderAdvanced_SetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL get_callbacks)
370 {
371 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
372 FIXME("(%p)->(%x)\n", This, get_callbacks);
373 return E_NOTIMPL;
374 }
375
376 static HRESULT WINAPI WMReaderAdvanced_GetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL *get_callbacks)
377 {
378 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
379 FIXME("(%p)->(%p)\n", This, get_callbacks);
380 return E_NOTIMPL;
381 }
382
383 static HRESULT WINAPI WMReaderAdvanced_SetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num,
384 BOOL receive_stream_samples)
385 {
386 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
387 FIXME("(%p)->(%d %x)\n", This, stream_num, receive_stream_samples);
388 return E_NOTIMPL;
389 }
390
391 static HRESULT WINAPI WMReaderAdvanced_GetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num,
392 BOOL *receive_stream_samples)
393 {
394 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
395 FIXME("(%p)->(%d %p)\n", This, stream_num, receive_stream_samples);
396 return E_NOTIMPL;
397 }
398
399 static HRESULT WINAPI WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL allocate)
400 {
401 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
402 FIXME("(%p)->(%d %x)\n", This, output_num, allocate);
403 return E_NOTIMPL;
404 }
405
406 static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL *allocate)
407 {
408 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
409 FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
410 return E_NOTIMPL;
411 }
412
413 static HRESULT WINAPI WMReaderAdvanced_SetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL allocate)
414 {
415 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
416 FIXME("(%p)->(%d %x)\n", This, output_num, allocate);
417 return E_NOTIMPL;
418 }
419
420 static HRESULT WINAPI WMReaderAdvanced_GetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL *allocate)
421 {
422 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
423 FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
424 return E_NOTIMPL;
425 }
426
427 static HRESULT WINAPI WMReaderAdvanced_GetStatistics(IWMReaderAdvanced6 *iface, WM_READER_STATISTICS *statistics)
428 {
429 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
430 FIXME("(%p)->(%p)\n", This, statistics);
431 return E_NOTIMPL;
432 }
433
434 static HRESULT WINAPI WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6 *iface, WM_READER_CLIENTINFO *client_info)
435 {
436 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
437 FIXME("(%p)->(%p)\n", This, client_info);
438 return E_NOTIMPL;
439 }
440
441 static HRESULT WINAPI WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6 *iface, DWORD output, DWORD *max)
442 {
443 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
444 FIXME("(%p)->(%d %p)\n", This, output, max);
445 return E_NOTIMPL;
446 }
447
448 static HRESULT WINAPI WMReaderAdvanced_GetMaxStreamSampleSize(IWMReaderAdvanced6 *iface, WORD stream, DWORD *max)
449 {
450 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
451 FIXME("(%p)->(%d %p)\n", This, stream, max);
452 return E_NOTIMPL;
453 }
454
455 static HRESULT WINAPI WMReaderAdvanced_NotifyLateDelivery(IWMReaderAdvanced6 *iface, QWORD lateness)
456 {
457 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
458 FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(lateness));
459 return E_NOTIMPL;
460 }
461
462 static HRESULT WINAPI WMReaderAdvanced2_SetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE mode)
463 {
464 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
465 FIXME("(%p)->(%d)\n", This, mode);
466 return E_NOTIMPL;
467 }
468
469 static HRESULT WINAPI WMReaderAdvanced2_GetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE *mode)
470 {
471 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
472 FIXME("(%p)->(%p)\n", This, mode);
473 return E_NOTIMPL;
474 }
475
476 static HRESULT WINAPI WMReaderAdvanced2_GetBufferProgress(IWMReaderAdvanced6 *iface, DWORD *percent, QWORD *buffering)
477 {
478 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
479 FIXME("(%p)->(%p %p)\n", This, percent, buffering);
480 return E_NOTIMPL;
481 }
482
483 static HRESULT WINAPI WMReaderAdvanced2_GetDownloadProgress(IWMReaderAdvanced6 *iface, DWORD *percent,
484 QWORD *bytes_downloaded, QWORD *download)
485 {
486 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
487 FIXME("(%p)->(%p %p %p)\n", This, percent, bytes_downloaded, download);
488 return E_NOTIMPL;
489 }
490
491 static HRESULT WINAPI WMReaderAdvanced2_GetSaveAsProgress(IWMReaderAdvanced6 *iface, DWORD *percent)
492 {
493 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
494 FIXME("(%p)->(%p)\n", This, percent);
495 return E_NOTIMPL;
496 }
497
498 static HRESULT WINAPI WMReaderAdvanced2_SaveFileAs(IWMReaderAdvanced6 *iface, const WCHAR *filename)
499 {
500 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
501 FIXME("(%p)->(%s)\n", This, debugstr_w(filename));
502 return E_NOTIMPL;
503 }
504
505 static HRESULT WINAPI WMReaderAdvanced2_GetProtocolName(IWMReaderAdvanced6 *iface, WCHAR *protocol, DWORD *protocol_len)
506 {
507 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
508 FIXME("(%p)->(%p %p)\n", This, protocol, protocol_len);
509 return E_NOTIMPL;
510 }
511
512 static HRESULT WINAPI WMReaderAdvanced2_StartAtMarker(IWMReaderAdvanced6 *iface, WORD marker_index,
513 QWORD duration, float rate, void *context)
514 {
515 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
516 FIXME("(%p)->(%d %s %f %p)\n", This, marker_index, wine_dbgstr_longlong(duration), rate, context);
517 return E_NOTIMPL;
518 }
519
520 static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num,
521 const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
522 {
523 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
524 FIXME("(%p)->(%d %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
525 return E_NOTIMPL;
526 }
527
528 static HRESULT WINAPI WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num,
529 const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
530 {
531 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
532 FIXME("(%p)->(%d %s %d %p %d)\n", This, output_num, debugstr_w(name), type, value, length);
533 return E_NOTIMPL;
534 }
535
536 static HRESULT WINAPI WMReaderAdvanced2_Preroll(IWMReaderAdvanced6 *iface, QWORD start, QWORD duration, float rate)
537 {
538 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
539 FIXME("(%p)->(%s %s %f)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate);
540 return E_NOTIMPL;
541 }
542
543 static HRESULT WINAPI WMReaderAdvanced2_SetLogClientID(IWMReaderAdvanced6 *iface, BOOL log_client_id)
544 {
545 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
546 FIXME("(%p)->(%x)\n", This, log_client_id);
547 return E_NOTIMPL;
548 }
549
550 static HRESULT WINAPI WMReaderAdvanced2_GetLogClientID(IWMReaderAdvanced6 *iface, BOOL *log_client_id)
551 {
552 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
553 FIXME("(%p)->(%p)\n", This, log_client_id);
554 return E_NOTIMPL;
555 }
556
557 static HRESULT WINAPI WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6 *iface)
558 {
559 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
560 FIXME("(%p)\n", This);
561 return E_NOTIMPL;
562 }
563
564 static HRESULT WINAPI WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6 *iface, IStream *stream,
565 IWMReaderCallback *callback, void *context)
566 {
567 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
568 FIXME("(%p)->(%p %p %p)\n", This, stream, callback, context);
569 return E_NOTIMPL;
570 }
571
572 static HRESULT WINAPI WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6 *iface)
573 {
574 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
575 FIXME("(%p)\n", This);
576 return E_NOTIMPL;
577 }
578
579 static HRESULT WINAPI WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6 *iface, WORD stream_num,
580 void *offset_start, void *duration, WMT_OFFSET_FORMAT format, float rate, void *context)
581 {
582 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
583 FIXME("(%p)->(%d %p %p %d %f %p)\n", This, stream_num, offset_start, duration, format, rate, context);
584 return E_NOTIMPL;
585 }
586
587 static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *iface, DWORD output_num, WORD *language_count)
588 {
589 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
590 FIXME("(%p)->(%d %p)\n", This, output_num, language_count);
591 return E_NOTIMPL;
592 }
593
594 static HRESULT WINAPI WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6 *iface, DWORD output_num,
595 WORD language, WCHAR *language_string, WORD *language_string_len)
596 {
597 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
598 FIXME("(%p)->(%d %x %p %p)\n", This, output_num, language, language_string, language_string_len);
599 return E_NOTIMPL;
600 }
601
602 static HRESULT WINAPI WMReaderAdvanced4_GetMaxSpeedFactor(IWMReaderAdvanced6 *iface, double *factor)
603 {
604 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
605 FIXME("(%p)->(%p)\n", This, factor);
606 return E_NOTIMPL;
607 }
608
609 static HRESULT WINAPI WMReaderAdvanced4_IsUsingFastCache(IWMReaderAdvanced6 *iface, BOOL *using_fast_cache)
610 {
611 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
612 FIXME("(%p)->(%p)\n", This, using_fast_cache);
613 return E_NOTIMPL;
614 }
615
616 static HRESULT WINAPI WMReaderAdvanced4_AddLogParam(IWMReaderAdvanced6 *iface, const WCHAR *namespace,
617 const WCHAR *name, const WCHAR *value)
618 {
619 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
620 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(namespace), debugstr_w(name), debugstr_w(value));
621 return E_NOTIMPL;
622 }
623
624 static HRESULT WINAPI WMReaderAdvanced4_SendLogParams(IWMReaderAdvanced6 *iface)
625 {
626 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
627 FIXME("(%p)\n", This);
628 return E_NOTIMPL;
629 }
630
631 static HRESULT WINAPI WMReaderAdvanced4_CanSaveFileAs(IWMReaderAdvanced6 *iface, BOOL *can_save)
632 {
633 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
634 FIXME("(%p)->(%p)\n", This, can_save);
635 return E_NOTIMPL;
636 }
637
638 static HRESULT WINAPI WMReaderAdvanced4_CancelSaveFileAs(IWMReaderAdvanced6 *iface)
639 {
640 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
641 FIXME("(%p)\n", This);
642 return E_NOTIMPL;
643 }
644
645 static HRESULT WINAPI WMReaderAdvanced4_GetURL(IWMReaderAdvanced6 *iface, WCHAR *url, DWORD *url_len)
646 {
647 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
648 FIXME("(%p)->(%p %p)\n", This, url, url_len);
649 return E_NOTIMPL;
650 }
651
652 static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, DWORD output_num, IWMPlayerHook *hook)
653 {
654 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
655 FIXME("(%p)->(%d %p)\n", This, output_num, hook);
656 return E_NOTIMPL;
657 }
658
659 static HRESULT WINAPI WMReaderAdvanced6_SetProtextStreamSamples(IWMReaderAdvanced6 *iface, BYTE *cert,
660 DWORD cert_size, DWORD cert_type, DWORD flags, BYTE *initialization_vector, DWORD *initialization_vector_size)
661 {
662 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
663 FIXME("(%p)->(%p %d %d %x %p %p)\n", This, cert, cert_size, cert_type, flags, initialization_vector,
664 initialization_vector_size);
665 return E_NOTIMPL;
666 }
667
668 static const IWMReaderAdvanced6Vtbl WMReaderAdvanced6Vtbl = {
669 WMReaderAdvanced_QueryInterface,
670 WMReaderAdvanced_AddRef,
671 WMReaderAdvanced_Release,
672 WMReaderAdvanced_SetUserProvidedClock,
673 WMReaderAdvanced_GetUserProvidedClock,
674 WMReaderAdvanced_DeliverTime,
675 WMReaderAdvanced_SetManualStreamSelection,
676 WMReaderAdvanced_GetManualStreamSelection,
677 WMReaderAdvanced_SetStreamsSelected,
678 WMReaderAdvanced_GetStreamSelected,
679 WMReaderAdvanced_SetReceiveSelectionCallbacks,
680 WMReaderAdvanced_GetReceiveSelectionCallbacks,
681 WMReaderAdvanced_SetReceiveStreamSamples,
682 WMReaderAdvanced_GetReceiveStreamSamples,
683 WMReaderAdvanced_SetAllocateForOutput,
684 WMReaderAdvanced_GetAllocateForOutput,
685 WMReaderAdvanced_SetAllocateForStream,
686 WMReaderAdvanced_GetAllocateForStream,
687 WMReaderAdvanced_GetStatistics,
688 WMReaderAdvanced_SetClientInfo,
689 WMReaderAdvanced_GetMaxOutputSampleSize,
690 WMReaderAdvanced_GetMaxStreamSampleSize,
691 WMReaderAdvanced_NotifyLateDelivery,
692 WMReaderAdvanced2_SetPlayMode,
693 WMReaderAdvanced2_GetPlayMode,
694 WMReaderAdvanced2_GetBufferProgress,
695 WMReaderAdvanced2_GetDownloadProgress,
696 WMReaderAdvanced2_GetSaveAsProgress,
697 WMReaderAdvanced2_SaveFileAs,
698 WMReaderAdvanced2_GetProtocolName,
699 WMReaderAdvanced2_StartAtMarker,
700 WMReaderAdvanced2_GetOutputSetting,
701 WMReaderAdvanced2_SetOutputSetting,
702 WMReaderAdvanced2_Preroll,
703 WMReaderAdvanced2_SetLogClientID,
704 WMReaderAdvanced2_GetLogClientID,
705 WMReaderAdvanced2_StopBuffering,
706 WMReaderAdvanced2_OpenStream,
707 WMReaderAdvanced3_StopNetStreaming,
708 WMReaderAdvanced3_StartAtPosition,
709 WMReaderAdvanced4_GetLanguageCount,
710 WMReaderAdvanced4_GetLanguage,
711 WMReaderAdvanced4_GetMaxSpeedFactor,
712 WMReaderAdvanced4_IsUsingFastCache,
713 WMReaderAdvanced4_AddLogParam,
714 WMReaderAdvanced4_SendLogParams,
715 WMReaderAdvanced4_CanSaveFileAs,
716 WMReaderAdvanced4_CancelSaveFileAs,
717 WMReaderAdvanced4_GetURL,
718 WMReaderAdvanced5_SetPlayerHook,
719 WMReaderAdvanced6_SetProtextStreamSamples
720 };
721
722 static inline WMReader *impl_from_IWMReaderAccelerator(IWMReaderAccelerator *iface)
723 {
724 return CONTAINING_RECORD(iface, WMReader, IWMReaderAccelerator_iface);
725 }
726
727 static HRESULT WINAPI reader_accl_QueryInterface(IWMReaderAccelerator *iface, REFIID riid, void **object)
728 {
729 WMReader *This = impl_from_IWMReaderAccelerator(iface);
730 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, object);
731 }
732
733 static ULONG WINAPI reader_accl_AddRef(IWMReaderAccelerator *iface)
734 {
735 WMReader *This = impl_from_IWMReaderAccelerator(iface);
736 return IWMReader_AddRef(&This->IWMReader_iface);
737 }
738
739 static ULONG WINAPI reader_accl_Release(IWMReaderAccelerator *iface)
740 {
741 WMReader *This = impl_from_IWMReaderAccelerator(iface);
742 return IWMReader_Release(&This->IWMReader_iface);
743 }
744
745 static HRESULT WINAPI reader_accl_GetCodecInterface(IWMReaderAccelerator *iface, DWORD output, REFIID riid, void **codec)
746 {
747 WMReader *This = impl_from_IWMReaderAccelerator(iface);
748
749 FIXME("%p, %d, %s, %p\n", This, output, debugstr_guid(riid), codec);
750
751 return E_NOTIMPL;
752 }
753
754 static HRESULT WINAPI reader_accl_Notify(IWMReaderAccelerator *iface, DWORD output, WM_MEDIA_TYPE *subtype)
755 {
756 WMReader *This = impl_from_IWMReaderAccelerator(iface);
757
758 FIXME("%p, %d, %p\n", This, output, subtype);
759
760 return E_NOTIMPL;
761 }
762
763 static const IWMReaderAcceleratorVtbl WMReaderAcceleratorVtbl = {
764 reader_accl_QueryInterface,
765 reader_accl_AddRef,
766 reader_accl_Release,
767 reader_accl_GetCodecInterface,
768 reader_accl_Notify
769 };
770
771 static inline WMReader *impl_from_IWMReaderNetworkConfig2(IWMReaderNetworkConfig2 *iface)
772 {
773 return CONTAINING_RECORD(iface, WMReader, IWMReaderNetworkConfig2_iface);
774 }
775
776 static HRESULT WINAPI networkconfig_QueryInterface(IWMReaderNetworkConfig2 *iface, REFIID riid, void **ppv)
777 {
778 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
779 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
780 }
781
782 static ULONG WINAPI networkconfig_AddRef(IWMReaderNetworkConfig2 *iface)
783 {
784 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
785 return IWMReader_AddRef(&This->IWMReader_iface);
786 }
787
788 static ULONG WINAPI networkconfig_Release(IWMReaderNetworkConfig2 *iface)
789 {
790 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
791 return IWMReader_Release(&This->IWMReader_iface);
792 }
793
794 static HRESULT WINAPI networkconfig_GetBufferingTime(IWMReaderNetworkConfig2 *iface, QWORD *buffering_time)
795 {
796 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
797 FIXME("%p, %p\n", This, buffering_time);
798 return E_NOTIMPL;
799 }
800
801 static HRESULT WINAPI networkconfig_SetBufferingTime(IWMReaderNetworkConfig2 *iface, QWORD buffering_time)
802 {
803 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
804 FIXME("%p, %s\n", This, wine_dbgstr_longlong(buffering_time));
805 return E_NOTIMPL;
806 }
807
808 static HRESULT WINAPI networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array,
809 DWORD *ranges)
810 {
811 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
812 FIXME("%p, %p, %p\n", This, array, ranges);
813 return E_NOTIMPL;
814 }
815
816 static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array,
817 DWORD ranges)
818 {
819 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
820 FIXME("%p, %p, %u\n", This, array, ranges);
821 return E_NOTIMPL;
822 }
823
824 static HRESULT WINAPI networkconfig_GetProxySettings(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
825 WMT_PROXY_SETTINGS *proxy)
826 {
827 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
828 FIXME("%p, %s, %p\n", This, debugstr_w(protocol), proxy);
829 return E_NOTIMPL;
830 }
831
832 static HRESULT WINAPI networkconfig_SetProxySettings(IWMReaderNetworkConfig2 *iface, LPCWSTR protocol,
833 WMT_PROXY_SETTINGS proxy)
834 {
835 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
836 FIXME("%p, %s, %d\n", This, debugstr_w(protocol), proxy);
837 return E_NOTIMPL;
838 }
839
840 static HRESULT WINAPI networkconfig_GetProxyHostName(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
841 WCHAR *hostname, DWORD *size)
842 {
843 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
844 FIXME("%p, %s, %p, %p\n", This, debugstr_w(protocol), hostname, size);
845 return E_NOTIMPL;
846 }
847
848 static HRESULT WINAPI networkconfig_SetProxyHostName(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
849 const WCHAR *hostname)
850 {
851 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
852 FIXME("%p, %s, %s\n", This, debugstr_w(protocol), debugstr_w(hostname));
853 return E_NOTIMPL;
854 }
855
856 static HRESULT WINAPI networkconfig_GetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
857 DWORD *port)
858 {
859 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
860 FIXME("%p, %s, %p\n", This, debugstr_w(protocol), port);
861 return E_NOTIMPL;
862 }
863
864 static HRESULT WINAPI networkconfig_SetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
865 DWORD port)
866 {
867 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
868 FIXME("%p, %s, %u\n", This, debugstr_w(protocol), port);
869 return E_NOTIMPL;
870 }
871
872 static HRESULT WINAPI networkconfig_GetProxyExceptionList(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
873 WCHAR *exceptions, DWORD *count)
874 {
875 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
876 FIXME("%p, %s, %p, %p\n", This, debugstr_w(protocol), exceptions, count);
877 return E_NOTIMPL;
878 }
879
880 static HRESULT WINAPI networkconfig_SetProxyExceptionList(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
881 const WCHAR *exceptions)
882 {
883 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
884 FIXME("%p, %s, %s\n", This, debugstr_w(protocol), debugstr_w(exceptions));
885 return E_NOTIMPL;
886 }
887
888 static HRESULT WINAPI networkconfig_GetProxyBypassForLocal(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
889 BOOL *bypass)
890 {
891 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
892 FIXME("%p, %s, %p\n", This, debugstr_w(protocol), bypass);
893 return E_NOTIMPL;
894 }
895
896 static HRESULT WINAPI networkconfig_SetProxyBypassForLocal(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
897 BOOL bypass)
898 {
899 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
900 FIXME("%p, %s, %d\n", This, debugstr_w(protocol), bypass);
901 return E_NOTIMPL;
902 }
903
904 static HRESULT WINAPI networkconfig_GetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2 *iface,
905 BOOL *detection)
906 {
907 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
908 FIXME("%p, %p\n", This, detection);
909 return E_NOTIMPL;
910 }
911
912 static HRESULT WINAPI networkconfig_SetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2 *iface,
913 BOOL detection)
914 {
915 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
916 FIXME("%p, %d\n", This, detection);
917 return E_NOTIMPL;
918 }
919
920 static HRESULT WINAPI networkconfig_GetEnableMulticast(IWMReaderNetworkConfig2 *iface, BOOL *multicast)
921 {
922 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
923 FIXME("%p, %p\n", This, multicast);
924 return E_NOTIMPL;
925 }
926
927 static HRESULT WINAPI networkconfig_SetEnableMulticast(IWMReaderNetworkConfig2 *iface, BOOL multicast)
928 {
929 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
930 FIXME("%p, %d\n", This, multicast);
931 return E_NOTIMPL;
932 }
933
934 static HRESULT WINAPI networkconfig_GetEnableHTTP(IWMReaderNetworkConfig2 *iface, BOOL *enable)
935 {
936 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
937 FIXME("%p, %p\n", This, enable);
938 return E_NOTIMPL;
939 }
940
941 static HRESULT WINAPI networkconfig_SetEnableHTTP(IWMReaderNetworkConfig2 *iface, BOOL enable)
942 {
943 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
944 FIXME("%p, %d\n", This, enable);
945 return E_NOTIMPL;
946 }
947
948 static HRESULT WINAPI networkconfig_GetEnableUDP(IWMReaderNetworkConfig2 *iface, BOOL *enable)
949 {
950 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
951 FIXME("%p, %p\n", This, enable);
952 return E_NOTIMPL;
953 }
954
955 static HRESULT WINAPI networkconfig_SetEnableUDP(IWMReaderNetworkConfig2 *iface, BOOL enable)
956 {
957 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
958 FIXME("%p, %d\n", This, enable);
959 return E_NOTIMPL;
960 }
961
962 static HRESULT WINAPI networkconfig_GetEnableTCP(IWMReaderNetworkConfig2 *iface, BOOL *enable)
963 {
964 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
965 FIXME("%p, %p\n", This, enable);
966 return E_NOTIMPL;
967 }
968
969 static HRESULT WINAPI networkconfig_SetEnableTCP(IWMReaderNetworkConfig2 *iface, BOOL enable)
970 {
971 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
972 FIXME("%p, %d\n", This, enable);
973 return E_NOTIMPL;
974 }
975
976 static HRESULT WINAPI networkconfig_ResetProtocolRollover(IWMReaderNetworkConfig2 *iface)
977 {
978 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
979 FIXME("%p\n", This);
980 return E_NOTIMPL;
981 }
982
983 static HRESULT WINAPI networkconfig_GetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD *bandwidth)
984 {
985 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
986 FIXME("%p, %p\n", This, bandwidth);
987 return E_NOTIMPL;
988 }
989
990 static HRESULT WINAPI networkconfig_SetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD bandwidth)
991 {
992 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
993 FIXME("%p, %u\n", This, bandwidth);
994 return E_NOTIMPL;
995 }
996
997 static HRESULT WINAPI networkconfig_GetNumProtocolsSupported(IWMReaderNetworkConfig2 *iface, DWORD *protocols)
998 {
999 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1000 FIXME("%p, %p\n", This, protocols);
1001 return E_NOTIMPL;
1002 }
1003
1004 static HRESULT WINAPI networkconfig_GetSupportedProtocolName(IWMReaderNetworkConfig2 *iface, DWORD protocol_num,
1005 WCHAR *protocol, DWORD *size)
1006 {
1007 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1008 FIXME("%p, %u, %p %p\n", This, protocol_num, protocol, size);
1009 return E_NOTIMPL;
1010 }
1011
1012 static HRESULT WINAPI networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2 *iface, const WCHAR *url)
1013 {
1014 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1015 FIXME("%p, %s\n", This, debugstr_w(url));
1016 return E_NOTIMPL;
1017 }
1018
1019 static HRESULT WINAPI networkconfig_GetLoggingUrl(IWMReaderNetworkConfig2 *iface, DWORD index, WCHAR *url,
1020 DWORD *size)
1021 {
1022 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1023 FIXME("%p, %u, %p, %p\n", This, index, url, size);
1024 return E_NOTIMPL;
1025 }
1026
1027 static HRESULT WINAPI networkconfig_GetLoggingUrlCount(IWMReaderNetworkConfig2 *iface, DWORD *count)
1028 {
1029 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1030 FIXME("%p, %p\n", This, count);
1031 return E_NOTIMPL;
1032 }
1033
1034 static HRESULT WINAPI networkconfig_ResetLoggingUrlList(IWMReaderNetworkConfig2 *iface)
1035 {
1036 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1037 FIXME("%p\n", This);
1038 return E_NOTIMPL;
1039 }
1040
1041 static HRESULT WINAPI networkconfig_GetEnableContentCaching(IWMReaderNetworkConfig2 *iface, BOOL *enable)
1042 {
1043 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1044 FIXME("%p, %p\n", This, enable);
1045 return E_NOTIMPL;
1046 }
1047
1048 static HRESULT WINAPI networkconfig_SetEnableContentCaching(IWMReaderNetworkConfig2 *iface, BOOL enable)
1049 {
1050 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1051 FIXME("%p, %d\n", This, enable);
1052 return E_NOTIMPL;
1053 }
1054
1055 static HRESULT WINAPI networkconfig_GetEnableFastCache(IWMReaderNetworkConfig2 *iface, BOOL *enable)
1056 {
1057 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1058 FIXME("%p, %p\n", This, enable);
1059 return E_NOTIMPL;
1060 }
1061
1062 static HRESULT WINAPI networkconfig_SetEnableFastCache(IWMReaderNetworkConfig2 *iface, BOOL enable)
1063 {
1064 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1065 FIXME("%p, %d\n", This, enable);
1066 return E_NOTIMPL;
1067 }
1068
1069 static HRESULT WINAPI networkconfig_GetAcceleratedStreamingDuration(IWMReaderNetworkConfig2 *iface,
1070 QWORD *duration)
1071 {
1072 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1073 FIXME("%p, %p\n", This, duration);
1074 return E_NOTIMPL;
1075 }
1076
1077 static HRESULT WINAPI networkconfig_SetAcceleratedStreamingDuration(IWMReaderNetworkConfig2 *iface,
1078 QWORD duration)
1079 {
1080 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1081 FIXME("%p, %s\n", This, wine_dbgstr_longlong(duration));
1082 return E_NOTIMPL;
1083 }
1084
1085 static HRESULT WINAPI networkconfig_GetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD *limit)
1086 {
1087 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1088 FIXME("%p, %p\n", This, limit);
1089 return E_NOTIMPL;
1090 }
1091
1092 static HRESULT WINAPI networkconfig_SetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD limit)
1093 {
1094 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1095 FIXME("%p, %u\n", This, limit);
1096 return E_NOTIMPL;
1097 }
1098
1099 static HRESULT WINAPI networkconfig_GetEnableResends(IWMReaderNetworkConfig2 *iface, BOOL *enable)
1100 {
1101 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1102 FIXME("%p, %p\n", This, enable);
1103 return E_NOTIMPL;
1104 }
1105
1106 static HRESULT WINAPI networkconfig_SetEnableResends(IWMReaderNetworkConfig2 *iface, BOOL enable)
1107 {
1108 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1109 FIXME("%p, %u\n", This, enable);
1110 return E_NOTIMPL;
1111 }
1112
1113 static HRESULT WINAPI networkconfig_GetEnableThinning(IWMReaderNetworkConfig2 *iface, BOOL *enable)
1114 {
1115 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1116 FIXME("%p, %p\n", This, enable);
1117 return E_NOTIMPL;
1118 }
1119
1120 static HRESULT WINAPI networkconfig_SetEnableThinning(IWMReaderNetworkConfig2 *iface, BOOL enable)
1121 {
1122 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1123 FIXME("%p, %u\n", This, enable);
1124 return E_NOTIMPL;
1125 }
1126
1127 static HRESULT WINAPI networkconfig_GetMaxNetPacketSize(IWMReaderNetworkConfig2 *iface, DWORD *packet_size)
1128 {
1129 WMReader *This = impl_from_IWMReaderNetworkConfig2(iface);
1130 FIXME("%p, %p\n", This, packet_size);
1131 return E_NOTIMPL;
1132 }
1133
1134 static const IWMReaderNetworkConfig2Vtbl WMReaderNetworkConfig2Vtbl =
1135 {
1136 networkconfig_QueryInterface,
1137 networkconfig_AddRef,
1138 networkconfig_Release,
1139 networkconfig_GetBufferingTime,
1140 networkconfig_SetBufferingTime,
1141 networkconfig_GetUDPPortRanges,
1142 networkconfig_SetUDPPortRanges,
1143 networkconfig_GetProxySettings,
1144 networkconfig_SetProxySettings,
1145 networkconfig_GetProxyHostName,
1146 networkconfig_SetProxyHostName,
1147 networkconfig_GetProxyPort,
1148 networkconfig_SetProxyPort,
1149 networkconfig_GetProxyExceptionList,
1150 networkconfig_SetProxyExceptionList,
1151 networkconfig_GetProxyBypassForLocal,
1152 networkconfig_SetProxyBypassForLocal,
1153 networkconfig_GetForceRerunAutoProxyDetection,
1154 networkconfig_SetForceRerunAutoProxyDetection,
1155 networkconfig_GetEnableMulticast,
1156 networkconfig_SetEnableMulticast,
1157 networkconfig_GetEnableHTTP,
1158 networkconfig_SetEnableHTTP,
1159 networkconfig_GetEnableUDP,
1160 networkconfig_SetEnableUDP,
1161 networkconfig_GetEnableTCP,
1162 networkconfig_SetEnableTCP,
1163 networkconfig_ResetProtocolRollover,
1164 networkconfig_GetConnectionBandwidth,
1165 networkconfig_SetConnectionBandwidth,
1166 networkconfig_GetNumProtocolsSupported,
1167 networkconfig_GetSupportedProtocolName,
1168 networkconfig_AddLoggingUrl,
1169 networkconfig_GetLoggingUrl,
1170 networkconfig_GetLoggingUrlCount,
1171 networkconfig_ResetLoggingUrlList,
1172 networkconfig_GetEnableContentCaching,
1173 networkconfig_SetEnableContentCaching,
1174 networkconfig_GetEnableFastCache,
1175 networkconfig_SetEnableFastCache,
1176 networkconfig_GetAcceleratedStreamingDuration,
1177 networkconfig_SetAcceleratedStreamingDuration,
1178 networkconfig_GetAutoReconnectLimit,
1179 networkconfig_SetAutoReconnectLimit,
1180 networkconfig_GetEnableResends,
1181 networkconfig_SetEnableResends,
1182 networkconfig_GetEnableThinning,
1183 networkconfig_SetEnableThinning,
1184 networkconfig_GetMaxNetPacketSize
1185 };
1186
1187 static inline WMReader *impl_from_IWMReaderStreamClock(IWMReaderStreamClock *iface)
1188 {
1189 return CONTAINING_RECORD(iface, WMReader, IWMReaderStreamClock_iface);
1190 }
1191
1192 static HRESULT WINAPI readclock_QueryInterface(IWMReaderStreamClock *iface, REFIID riid, void **ppv)
1193 {
1194 WMReader *This = impl_from_IWMReaderStreamClock(iface);
1195 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1196 }
1197
1198 static ULONG WINAPI readclock_AddRef(IWMReaderStreamClock *iface)
1199 {
1200 WMReader *This = impl_from_IWMReaderStreamClock(iface);
1201 return IWMReader_AddRef(&This->IWMReader_iface);
1202 }
1203
1204 static ULONG WINAPI readclock_Release(IWMReaderStreamClock *iface)
1205 {
1206 WMReader *This = impl_from_IWMReaderStreamClock(iface);
1207 return IWMReader_Release(&This->IWMReader_iface);
1208 }
1209
1210 static HRESULT WINAPI readclock_GetTime(IWMReaderStreamClock *iface, QWORD *now)
1211 {
1212 WMReader *This = impl_from_IWMReaderStreamClock(iface);
1213 FIXME("%p, %p\n", This, now);
1214 return E_NOTIMPL;
1215 }
1216
1217 static HRESULT WINAPI readclock_SetTimer(IWMReaderStreamClock *iface, QWORD when, void *param, DWORD *id)
1218 {
1219 WMReader *This = impl_from_IWMReaderStreamClock(iface);
1220 FIXME("%p, %s, %p, %p\n", This, wine_dbgstr_longlong(when), param, id);
1221 return E_NOTIMPL;
1222 }
1223
1224 static HRESULT WINAPI readclock_KillTimer(IWMReaderStreamClock *iface, DWORD id)
1225 {
1226 WMReader *This = impl_from_IWMReaderStreamClock(iface);
1227 FIXME("%p, %d\n", This, id);
1228 return E_NOTIMPL;
1229 }
1230
1231 static const IWMReaderStreamClockVtbl WMReaderStreamClockVtbl =
1232 {
1233 readclock_QueryInterface,
1234 readclock_AddRef,
1235 readclock_Release,
1236 readclock_GetTime,
1237 readclock_SetTimer,
1238 readclock_KillTimer
1239 };
1240
1241 static inline WMReader *impl_from_IWMReaderTypeNegotiation(IWMReaderTypeNegotiation *iface)
1242 {
1243 return CONTAINING_RECORD(iface, WMReader, IWMReaderTypeNegotiation_iface);
1244 }
1245
1246 static HRESULT WINAPI negotiation_QueryInterface(IWMReaderTypeNegotiation *iface, REFIID riid, void **ppv)
1247 {
1248 WMReader *This = impl_from_IWMReaderTypeNegotiation(iface);
1249 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1250 }
1251
1252 static ULONG WINAPI negotiation_AddRef(IWMReaderTypeNegotiation *iface)
1253 {
1254 WMReader *This = impl_from_IWMReaderTypeNegotiation(iface);
1255 return IWMReader_AddRef(&This->IWMReader_iface);
1256 }
1257
1258 static ULONG WINAPI negotiation_Release(IWMReaderTypeNegotiation *iface)
1259 {
1260 WMReader *This = impl_from_IWMReaderTypeNegotiation(iface);
1261 return IWMReader_Release(&This->IWMReader_iface);
1262 }
1263
1264 static HRESULT WINAPI negotiation_TryOutputProps(IWMReaderTypeNegotiation *iface, DWORD output, IWMOutputMediaProps *props)
1265 {
1266 WMReader *This = impl_from_IWMReaderTypeNegotiation(iface);
1267 FIXME("%p, %d, %p\n", This, output, props);
1268 return E_NOTIMPL;
1269 }
1270
1271 static const IWMReaderTypeNegotiationVtbl WMReaderTypeNegotiationVtbl =
1272 {
1273 negotiation_QueryInterface,
1274 negotiation_AddRef,
1275 negotiation_Release,
1276 negotiation_TryOutputProps
1277 };
1278
1279 static inline WMReader *impl_from_IWMReaderTimecode(IWMReaderTimecode *iface)
1280 {
1281 return CONTAINING_RECORD(iface, WMReader, IWMReaderTimecode_iface);
1282 }
1283
1284 static HRESULT WINAPI timecode_QueryInterface(IWMReaderTimecode *iface, REFIID riid, void **ppv)
1285 {
1286 WMReader *This = impl_from_IWMReaderTimecode(iface);
1287 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1288 }
1289
1290 static ULONG WINAPI timecode_AddRef(IWMReaderTimecode *iface)
1291 {
1292 WMReader *This = impl_from_IWMReaderTimecode(iface);
1293 return IWMReader_AddRef(&This->IWMReader_iface);
1294 }
1295
1296 static ULONG WINAPI timecode_Release(IWMReaderTimecode *iface)
1297 {
1298 WMReader *This = impl_from_IWMReaderTimecode(iface);
1299 return IWMReader_Release(&This->IWMReader_iface);
1300 }
1301
1302 static HRESULT WINAPI timecode_GetTimecodeRangeCount(IWMReaderTimecode *iface, WORD num, WORD *count)
1303 {
1304 WMReader *This = impl_from_IWMReaderTimecode(iface);
1305 FIXME("%p, %d, %p\n", This, num, count);
1306 return E_NOTIMPL;
1307 }
1308
1309 static HRESULT WINAPI timecode_GetTimecodeRangeBounds(IWMReaderTimecode *iface, WORD stream, WORD range,
1310 DWORD *start_timecode, DWORD *end_timecode)
1311 {
1312 WMReader *This = impl_from_IWMReaderTimecode(iface);
1313 FIXME("%p, %d, %d, %p, %p\n", This, stream, range, start_timecode, end_timecode);
1314 return E_NOTIMPL;
1315 }
1316
1317 static const IWMReaderTimecodeVtbl WMReaderTimecodeVtbl =
1318 {
1319 timecode_QueryInterface,
1320 timecode_AddRef,
1321 timecode_Release,
1322 timecode_GetTimecodeRangeCount,
1323 timecode_GetTimecodeRangeBounds
1324 };
1325
1326
1327 static inline WMReader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface)
1328 {
1329 return CONTAINING_RECORD(iface, WMReader, IWMReaderPlaylistBurn_iface);
1330 }
1331
1332 static HRESULT WINAPI playlist_QueryInterface(IWMReaderPlaylistBurn *iface, REFIID riid, void **ppv)
1333 {
1334 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1335 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1336 }
1337
1338 static ULONG WINAPI playlist_AddRef(IWMReaderPlaylistBurn *iface)
1339 {
1340 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1341 return IWMReader_AddRef(&This->IWMReader_iface);
1342 }
1343
1344 static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
1345 {
1346 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1347 return IWMReader_Release(&This->IWMReader_iface);
1348 }
1349
1350 static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count,
1351 LPCWSTR_WMSDK_TYPE_SAFE *filenames, IWMStatusCallback *callback, void *context)
1352 {
1353 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1354 FIXME("%p, %d, %p, %p, %p\n", This, count, filenames, callback, context);
1355 return E_NOTIMPL;
1356 }
1357
1358 static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *stat)
1359 {
1360 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1361 FIXME("%p, %d, %p\n", This, count, stat);
1362 return E_NOTIMPL;
1363 }
1364
1365 static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
1366 {
1367 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1368 FIXME("%p\n", This);
1369 return E_NOTIMPL;
1370 }
1371
1372 static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT result)
1373 {
1374 WMReader *This = impl_from_IWMReaderPlaylistBurn(iface);
1375 FIXME("%p, 0x%08x\n", This, result);
1376 return E_NOTIMPL;
1377 }
1378
1379 static const IWMReaderPlaylistBurnVtbl WMReaderPlaylistBurnVtbl =
1380 {
1381 playlist_QueryInterface,
1382 playlist_AddRef,
1383 playlist_Release,
1384 playlist_InitPlaylistBurn,
1385 playlist_GetInitResults,
1386 playlist_Cancel,
1387 playlist_EndPlaylistBurn
1388 };
1389
1390 static inline WMReader *impl_from_IWMHeaderInfo3(IWMHeaderInfo3 *iface)
1391 {
1392 return CONTAINING_RECORD(iface, WMReader, IWMHeaderInfo3_iface);
1393 }
1394
1395 static HRESULT WINAPI headerinfo_QueryInterface(IWMHeaderInfo3 *iface, REFIID riid, void **ppv)
1396 {
1397 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1398 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1399 }
1400
1401 static ULONG WINAPI headerinfo_AddRef(IWMHeaderInfo3 *iface)
1402 {
1403 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1404 return IWMReader_AddRef(&This->IWMReader_iface);
1405 }
1406
1407 static ULONG WINAPI headerinfo_Release(IWMHeaderInfo3 *iface)
1408 {
1409 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1410 return IWMReader_Release(&This->IWMReader_iface);
1411 }
1412
1413 static HRESULT WINAPI headerinfo_GetAttributeCount(IWMHeaderInfo3 *iface, WORD stream_num, WORD *attributes)
1414 {
1415 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1416 FIXME("%p, %d, %p\n", This, stream_num, attributes);
1417 return E_NOTIMPL;
1418 }
1419
1420 static HRESULT WINAPI headerinfo_GetAttributeByIndex(IWMHeaderInfo3 *iface, WORD index, WORD *stream_num,
1421 WCHAR *name, WORD *name_len, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
1422 {
1423 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1424 FIXME("%p, %d, %p, %p, %p, %p, %p, %p\n", This, index, stream_num, name, name_len, type,
1425 value, length);
1426 return E_NOTIMPL;
1427 }
1428
1429 static HRESULT WINAPI headerinfo_GetAttributeByName(IWMHeaderInfo3 *iface, WORD *stream_num, LPCWSTR name,
1430 WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
1431 {
1432 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1433 FIXME("%p, %p, %s, %p, %p, %p\n", This, stream_num, debugstr_w(name), type, value, length);
1434 return E_NOTIMPL;
1435 }
1436
1437 static HRESULT WINAPI headerinfo_SetAttribute(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name,
1438 WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
1439 {
1440 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1441 FIXME("%p, %d, %s, %d, %p, %d\n", This, stream_num, debugstr_w(name), type, value, length);
1442 return E_NOTIMPL;
1443 }
1444
1445 static HRESULT WINAPI headerinfo_GetMarkerCount(IWMHeaderInfo3 *iface, WORD *markers)
1446 {
1447 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1448 FIXME("%p, %p\n", This, markers);
1449 return E_NOTIMPL;
1450 }
1451
1452 static HRESULT WINAPI headerinfo_GetMarker(IWMHeaderInfo3 *iface, WORD index, WCHAR *marker_name,
1453 WORD *marker_len, QWORD *marker_time)
1454 {
1455 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1456 FIXME("%p, %d, %p, %p, %p\n", This, index, marker_name, marker_len, marker_time);
1457 return E_NOTIMPL;
1458 }
1459
1460 static HRESULT WINAPI headerinfo_AddMarker(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE marker_name,
1461 QWORD marker_time)
1462 {
1463 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1464 FIXME("%p, %p, %s\n", This, marker_name, wine_dbgstr_longlong(marker_time));
1465 return E_NOTIMPL;
1466 }
1467
1468 static HRESULT WINAPI headerinfo_RemoveMarker(IWMHeaderInfo3 *iface, WORD index)
1469 {
1470 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1471 FIXME("%p, %d\n", This, index);
1472 return E_NOTIMPL;
1473 }
1474
1475 static HRESULT WINAPI headerinfo_GetScriptCount(IWMHeaderInfo3 *iface, WORD *scripts)
1476 {
1477 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1478 FIXME("%p, %p\n", This, scripts);
1479 return E_NOTIMPL;
1480 }
1481
1482 static HRESULT WINAPI headerinfo_GetScript(IWMHeaderInfo3 *iface, WORD index, WCHAR *type,
1483 WORD *type_len, WCHAR *command, WORD *command_len, QWORD *script_time)
1484 {
1485 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1486 FIXME("%p, %d, %p, %p, %p, %p, %p\n", This, index, type, type_len, command, command_len, script_time);
1487 return E_NOTIMPL;
1488 }
1489
1490 static HRESULT WINAPI headerinfo_AddScript(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE type,
1491 LPCWSTR_WMSDK_TYPE_SAFE command, QWORD script_time)
1492 {
1493 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1494 FIXME("%p, %s, %s, %s\n", This, debugstr_w(type), debugstr_w(command), wine_dbgstr_longlong(script_time));
1495 return E_NOTIMPL;
1496 }
1497
1498 static HRESULT WINAPI headerinfo_RemoveScript(IWMHeaderInfo3 *iface, WORD index)
1499 {
1500 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1501 FIXME("%p, %d\n", This, index);
1502 return E_NOTIMPL;
1503 }
1504
1505 static HRESULT WINAPI headerinfo_GetCodecInfoCount(IWMHeaderInfo3 *iface, DWORD *codec_infos)
1506 {
1507 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1508 FIXME("%p, %p\n", This, codec_infos);
1509 return E_NOTIMPL;
1510 }
1511
1512 static HRESULT WINAPI headerinfo_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index, WORD *name_len,
1513 WCHAR *name, WORD *description_len, WCHAR *description, WMT_CODEC_INFO_TYPE *codec_type,
1514 WORD *codec_info_cnt, BYTE *codec_info)
1515 {
1516 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1517 FIXME("%p, %d, %p, %p, %p, %p, %p, %p, %p\n", This, index, name_len, name, description_len,
1518 description, codec_type, codec_info_cnt, codec_info);
1519 return E_NOTIMPL;
1520 }
1521
1522 static HRESULT WINAPI headerinfo_GetAttributeCountEx(IWMHeaderInfo3 *iface, WORD stream_num, WORD *attributes)
1523 {
1524 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1525 FIXME("%p, %d, %p\n", This, stream_num, attributes);
1526 return E_NOTIMPL;
1527 }
1528
1529 static HRESULT WINAPI headerinfo_GetAttributeIndices(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name,
1530 WORD *lang_index, WORD *indices, WORD *count)
1531 {
1532 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1533 FIXME("%p, %d, %s, %p, %p, %p\n", This, stream_num, debugstr_w(name), lang_index, indices, count);
1534 return E_NOTIMPL;
1535 }
1536
1537 static HRESULT WINAPI headerinfo_GetAttributeByIndexEx(IWMHeaderInfo3 *iface, WORD stream_num,
1538 WORD index, LPWSTR name, WORD *name_len, WMT_ATTR_DATATYPE *type, WORD *lang_index,
1539 BYTE *value, DWORD *data_len)
1540 {
1541 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1542 FIXME("%p, %d, %d, %s, %p, %p, %p, %p, %p\n", This, stream_num, index, debugstr_w(name), name_len,
1543 type, lang_index, value, data_len);
1544 return E_NOTIMPL;
1545 }
1546
1547 static HRESULT WINAPI headerinfo_ModifyAttribute(IWMHeaderInfo3 *iface, WORD stream_num,
1548 WORD index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD length)
1549 {
1550 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1551 FIXME("%p, %d, %d, %d, %d, %p, %d\n", This, stream_num, index, type, lang_index, value, length);
1552 return E_NOTIMPL;
1553 }
1554
1555 static HRESULT WINAPI headerinfo_AddAttribute(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name,
1556 WORD *index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD length)
1557 {
1558 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1559 FIXME("%p, %d, %s, %p, %d, %d, %p, %d\n", This, stream_num, debugstr_w(name), index,
1560 type, lang_index, value, length);
1561 return E_NOTIMPL;
1562 }
1563
1564 static HRESULT WINAPI headerinfo_DeleteAttribute(IWMHeaderInfo3 *iface, WORD stream_num, WORD index)
1565 {
1566 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1567 FIXME("%p, %d, %d\n", This, stream_num, index);
1568 return E_NOTIMPL;
1569 }
1570
1571 static HRESULT WINAPI headerinfo_AddCodecInfo(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE name,
1572 LPCWSTR_WMSDK_TYPE_SAFE description, WMT_CODEC_INFO_TYPE codec_type, WORD codec_info_cnt,
1573 BYTE *codec_info)
1574 {
1575 WMReader *This = impl_from_IWMHeaderInfo3(iface);
1576 FIXME("%p, %p, %p, %d, %d, %p\n", This, name, description, codec_type, codec_info_cnt,
1577 codec_info);
1578 return E_NOTIMPL;
1579 }
1580
1581 static const IWMHeaderInfo3Vtbl WMHeaderInfo3Vtbl =
1582 {
1583 headerinfo_QueryInterface,
1584 headerinfo_AddRef,
1585 headerinfo_Release,
1586 headerinfo_GetAttributeCount,
1587 headerinfo_GetAttributeByIndex,
1588 headerinfo_GetAttributeByName,
1589 headerinfo_SetAttribute,
1590 headerinfo_GetMarkerCount,
1591 headerinfo_GetMarker,
1592 headerinfo_AddMarker,
1593 headerinfo_RemoveMarker,
1594 headerinfo_GetScriptCount,
1595 headerinfo_GetScript,
1596 headerinfo_AddScript,
1597 headerinfo_RemoveScript,
1598 headerinfo_GetCodecInfoCount,
1599 headerinfo_GetCodecInfo,
1600 headerinfo_GetAttributeCountEx,
1601 headerinfo_GetAttributeIndices,
1602 headerinfo_GetAttributeByIndexEx,
1603 headerinfo_ModifyAttribute,
1604 headerinfo_AddAttribute,
1605 headerinfo_DeleteAttribute,
1606 headerinfo_AddCodecInfo
1607 };
1608
1609
1610 static inline WMReader *impl_from_IWMLanguageList(IWMLanguageList *iface)
1611 {
1612 return CONTAINING_RECORD(iface, WMReader, IWMLanguageList_iface);
1613 }
1614
1615 static HRESULT WINAPI langlist_QueryInterface(IWMLanguageList *iface, REFIID riid, void **ppv)
1616 {
1617 WMReader *This = impl_from_IWMLanguageList(iface);
1618 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1619 }
1620
1621 static ULONG WINAPI langlist_AddRef(IWMLanguageList *iface)
1622 {
1623 WMReader *This = impl_from_IWMLanguageList(iface);
1624 return IWMReader_AddRef(&This->IWMReader_iface);
1625 }
1626
1627 static ULONG WINAPI langlist_Release(IWMLanguageList *iface)
1628 {
1629 WMReader *This = impl_from_IWMLanguageList(iface);
1630 return IWMReader_Release(&This->IWMReader_iface);
1631 }
1632
1633 static HRESULT WINAPI langlist_GetLanguageCount(IWMLanguageList *iface, WORD *count)
1634 {
1635 WMReader *This = impl_from_IWMLanguageList(iface);
1636 FIXME("%p, %p\n", This, count);
1637 return E_NOTIMPL;
1638 }
1639
1640 static HRESULT WINAPI langlist_GetLanguageDetails(IWMLanguageList *iface, WORD index,
1641 WCHAR *language, WORD *length)
1642 {
1643 WMReader *This = impl_from_IWMLanguageList(iface);
1644 FIXME("%p, %d, %p, %p\n", This, index, language, length);
1645 return E_NOTIMPL;
1646 }
1647
1648 static HRESULT WINAPI langlist_AddLanguageByRFC1766String(IWMLanguageList *iface, LPCWSTR_WMSDK_TYPE_SAFE language,
1649 WORD *index)
1650 {
1651 WMReader *This = impl_from_IWMLanguageList(iface);
1652 FIXME("%p, %p, %p\n", This, language, index);
1653 return E_NOTIMPL;
1654 }
1655
1656 static const IWMLanguageListVtbl WMLanguageListVtbl =
1657 {
1658 langlist_QueryInterface,
1659 langlist_AddRef,
1660 langlist_Release,
1661 langlist_GetLanguageCount,
1662 langlist_GetLanguageDetails,
1663 langlist_AddLanguageByRFC1766String
1664 };
1665
1666 static inline WMReader *impl_from_IReferenceClock(IReferenceClock *iface)
1667 {
1668 return CONTAINING_RECORD(iface, WMReader, IReferenceClock_iface);
1669 }
1670
1671 static HRESULT WINAPI refclock_QueryInterface(IReferenceClock *iface, REFIID riid, void **ppv)
1672 {
1673 WMReader *This = impl_from_IReferenceClock(iface);
1674 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1675 }
1676
1677 static ULONG WINAPI refclock_AddRef(IReferenceClock *iface)
1678 {
1679 WMReader *This = impl_from_IReferenceClock(iface);
1680 return IWMReader_AddRef(&This->IWMReader_iface);
1681 }
1682
1683 static ULONG WINAPI refclock_Release(IReferenceClock *iface)
1684 {
1685 WMReader *This = impl_from_IReferenceClock(iface);
1686 return IWMReader_Release(&This->IWMReader_iface);
1687 }
1688
1689 static HRESULT WINAPI refclock_GetTime(IReferenceClock *iface, REFERENCE_TIME *time)
1690 {
1691 WMReader *This = impl_from_IReferenceClock(iface);
1692 FIXME("%p, %p\n", This, time);
1693 return E_NOTIMPL;
1694 }
1695
1696 static HRESULT WINAPI refclock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME basetime,
1697 REFERENCE_TIME streamtime, HEVENT event, DWORD_PTR *cookie)
1698 {
1699 WMReader *This = impl_from_IReferenceClock(iface);
1700 FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(basetime),
1701 wine_dbgstr_longlong(streamtime), event, cookie);
1702 return E_NOTIMPL;
1703 }
1704
1705 static HRESULT WINAPI refclock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME starttime,
1706 REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie)
1707 {
1708 WMReader *This = impl_from_IReferenceClock(iface);
1709 FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(starttime),
1710 wine_dbgstr_longlong(period), semaphore, cookie);
1711 return E_NOTIMPL;
1712 }
1713
1714 static HRESULT WINAPI refclock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie)
1715 {
1716 WMReader *This = impl_from_IReferenceClock(iface);
1717 FIXME("%p, %lu\n", This, cookie);
1718 return E_NOTIMPL;
1719 }
1720
1721 static const IReferenceClockVtbl ReferenceClockVtbl =
1722 {
1723 refclock_QueryInterface,
1724 refclock_AddRef,
1725 refclock_Release,
1726 refclock_GetTime,
1727 refclock_AdviseTime,
1728 refclock_AdvisePeriodic,
1729 refclock_Unadvise
1730 };
1731
1732 static inline WMReader *impl_from_IWMProfile3(IWMProfile3 *iface)
1733 {
1734 return CONTAINING_RECORD(iface, WMReader, IWMProfile3_iface);
1735 }
1736
1737 static HRESULT WINAPI profile3_QueryInterface(IWMProfile3 *iface, REFIID riid, void **ppv)
1738 {
1739 WMReader *This = impl_from_IWMProfile3(iface);
1740 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
1741 }
1742
1743 static ULONG WINAPI profile3_AddRef(IWMProfile3 *iface)
1744 {
1745 WMReader *This = impl_from_IWMProfile3(iface);
1746 return IWMReader_AddRef(&This->IWMReader_iface);
1747 }
1748
1749 static ULONG WINAPI profile3_Release(IWMProfile3 *iface)
1750 {
1751 WMReader *This = impl_from_IWMProfile3(iface);
1752 return IWMReader_Release(&This->IWMReader_iface);
1753 }
1754
1755 static HRESULT WINAPI profile3_GetVersion(IWMProfile3 *iface, WMT_VERSION *version)
1756 {
1757 WMReader *This = impl_from_IWMProfile3(iface);
1758 FIXME("%p, %p\n", This, version);
1759 return E_NOTIMPL;
1760 }
1761
1762 static HRESULT WINAPI profile3_GetName(IWMProfile3 *iface, WCHAR *name, DWORD *length)
1763 {
1764 WMReader *This = impl_from_IWMProfile3(iface);
1765 FIXME("%p, %p, %p\n", This, name, length);
1766 return E_NOTIMPL;
1767 }
1768
1769 static HRESULT WINAPI profile3_SetName(IWMProfile3 *iface, const WCHAR *name)
1770 {
1771 WMReader *This = impl_from_IWMProfile3(iface);
1772 FIXME("%p, %s\n", This, debugstr_w(name));
1773 return E_NOTIMPL;
1774 }
1775
1776 static HRESULT WINAPI profile3_GetDescription(IWMProfile3 *iface, WCHAR *description, DWORD *length)
1777 {
1778 WMReader *This = impl_from_IWMProfile3(iface);
1779 FIXME("%p, %p, %p\n", This, description, length);
1780 return E_NOTIMPL;
1781 }
1782
1783 static HRESULT WINAPI profile3_SetDescription(IWMProfile3 *iface, const WCHAR *description)
1784 {
1785 WMReader *This = impl_from_IWMProfile3(iface);
1786 FIXME("%p, %s\n", This, debugstr_w(description));
1787 return E_NOTIMPL;
1788 }
1789
1790 static HRESULT WINAPI profile3_GetStreamCount(IWMProfile3 *iface, DWORD *count)
1791 {
1792 WMReader *This = impl_from_IWMProfile3(iface);
1793 FIXME("%p, %p\n", This, count);
1794 return E_NOTIMPL;
1795 }
1796
1797 static HRESULT WINAPI profile3_GetStream(IWMProfile3 *iface, DWORD index, IWMStreamConfig **config)
1798 {
1799 WMReader *This = impl_from_IWMProfile3(iface);
1800 FIXME("%p, %d, %p\n", This, index, config);
1801 return E_NOTIMPL;
1802 }
1803
1804 static HRESULT WINAPI profile3_GetStreamByNumber(IWMProfile3 *iface, WORD stream, IWMStreamConfig **config)
1805 {
1806 WMReader *This = impl_from_IWMProfile3(iface);
1807 FIXME("%p, %d, %p\n", This, stream, config);
1808 return E_NOTIMPL;
1809 }
1810
1811 static HRESULT WINAPI profile3_RemoveStream(IWMProfile3 *iface, IWMStreamConfig *config)
1812 {
1813 WMReader *This = impl_from_IWMProfile3(iface);
1814 FIXME("%p, %p\n", This, config);
1815 return E_NOTIMPL;
1816 }
1817
1818 static HRESULT WINAPI profile3_RemoveStreamByNumber(IWMProfile3 *iface, WORD stream)
1819 {
1820 WMReader *This = impl_from_IWMProfile3(iface);
1821 FIXME("%p, %d\n", This, stream);
1822 return E_NOTIMPL;
1823 }
1824
1825 static HRESULT WINAPI profile3_AddStream(IWMProfile3 *iface, IWMStreamConfig *config)
1826 {
1827 WMReader *This = impl_from_IWMProfile3(iface);
1828 FIXME("%p, %p\n", This, config);
1829 return E_NOTIMPL;
1830 }
1831
1832 static HRESULT WINAPI profile3_ReconfigStream(IWMProfile3 *iface, IWMStreamConfig *config)
1833 {
1834 WMReader *This = impl_from_IWMProfile3(iface);
1835 FIXME("%p, %p\n", This, config);
1836 return E_NOTIMPL;
1837 }
1838
1839 static HRESULT WINAPI profile3_CreateNewStream(IWMProfile3 *iface, REFGUID type, IWMStreamConfig **config)
1840 {
1841 WMReader *This = impl_from_IWMProfile3(iface);
1842 FIXME("%p, %s, %p\n", This, debugstr_guid(type), config);
1843 return E_NOTIMPL;
1844 }
1845
1846 static HRESULT WINAPI profile3_GetMutualExclusionCount(IWMProfile3 *iface, DWORD *count)
1847 {
1848 WMReader *This = impl_from_IWMProfile3(iface);
1849 FIXME("%p, %p\n", This, count);
1850 return E_NOTIMPL;
1851 }
1852
1853 static HRESULT WINAPI profile3_GetMutualExclusion(IWMProfile3 *iface, DWORD index, IWMMutualExclusion **mutual)
1854 {
1855 WMReader *This = impl_from_IWMProfile3(iface);
1856 FIXME("%p, %d, %p\n", This, index, mutual);
1857 return E_NOTIMPL;
1858 }
1859
1860 static HRESULT WINAPI profile3_RemoveMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *mutual)
1861 {
1862 WMReader *This = impl_from_IWMProfile3(iface);
1863 FIXME("%p, %p\n", This, mutual);
1864 return E_NOTIMPL;
1865 }
1866
1867 static HRESULT WINAPI profile3_AddMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *mutual)
1868 {
1869 WMReader *This = impl_from_IWMProfile3(iface);
1870 FIXME("%p, %p\n", This, mutual);
1871 return E_NOTIMPL;
1872 }
1873
1874 static HRESULT WINAPI profile3_CreateNewMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion **mutual)
1875 {
1876 WMReader *This = impl_from_IWMProfile3(iface);
1877 FIXME("%p, %p\n", This, mutual);
1878 return E_NOTIMPL;
1879 }
1880
1881 static HRESULT WINAPI profile3_GetProfileID(IWMProfile3 *iface, GUID *guid)
1882 {
1883 WMReader *This = impl_from_IWMProfile3(iface);
1884 FIXME("%p, %p\n", This, guid);
1885 return E_NOTIMPL;
1886 }
1887
1888 static HRESULT WINAPI profile3_GetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT *storage)
1889 {
1890 WMReader *This = impl_from_IWMProfile3(iface);
1891 FIXME("%p, %p\n", This, storage);
1892 return E_NOTIMPL;
1893 }
1894
1895 static HRESULT WINAPI profile3_SetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT storage)
1896 {
1897 WMReader *This = impl_from_IWMProfile3(iface);
1898 FIXME("%p, %d\n", This, storage);
1899 return E_NOTIMPL;
1900 }
1901
1902 static HRESULT WINAPI profile3_GetBandwidthSharingCount(IWMProfile3 *iface, DWORD *count)
1903 {
1904 WMReader *This = impl_from_IWMProfile3(iface);
1905 FIXME("%p, %p\n", This, count);
1906 return E_NOTIMPL;
1907 }
1908
1909 static HRESULT WINAPI profile3_GetBandwidthSharing(IWMProfile3 *iface, DWORD index, IWMBandwidthSharing **bandwidth)
1910 {
1911 WMReader *This = impl_from_IWMProfile3(iface);
1912 FIXME("%p, %d, %p\n", This, index, bandwidth);
1913 return E_NOTIMPL;
1914 }
1915
1916 static HRESULT WINAPI profile3_RemoveBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing *bandwidth)
1917 {
1918 WMReader *This = impl_from_IWMProfile3(iface);
1919 FIXME("%p, %p\n", This, bandwidth);
1920 return E_NOTIMPL;
1921 }
1922
1923 static HRESULT WINAPI profile3_AddBandwidthSharing(IWMProfile3 *iface, IWMBandwidthSharing *bandwidth)
1924 {
1925 WMReader *This = impl_from_IWMProfile3(iface);
1926 FIXME("%p, %p\n", This, bandwidth);
1927 return E_NOTIMPL;
1928 }
1929
1930 static HRESULT WINAPI profile3_CreateNewBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing **bandwidth)
1931 {
1932 WMReader *This = impl_from_IWMProfile3(iface);
1933 FIXME("%p, %p\n", This, bandwidth);
1934 return E_NOTIMPL;
1935 }
1936
1937 static HRESULT WINAPI profile3_GetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream)
1938 {
1939 WMReader *This = impl_from_IWMProfile3(iface);
1940 FIXME("%p, %p\n", This, stream);
1941 return E_NOTIMPL;
1942 }
1943
1944 static HRESULT WINAPI profile3_SetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization *stream)
1945 {
1946 WMReader *This = impl_from_IWMProfile3(iface);
1947 FIXME("%p, %p\n", This, stream);
1948 return E_NOTIMPL;
1949 }
1950
1951 static HRESULT WINAPI profile3_RemoveStreamPrioritization(IWMProfile3 *iface)
1952 {
1953 WMReader *This = impl_from_IWMProfile3(iface);
1954 FIXME("%p\n", This);
1955 return E_NOTIMPL;
1956 }
1957
1958 static HRESULT WINAPI profile3_CreateNewStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream)
1959 {
1960 WMReader *This = impl_from_IWMProfile3(iface);
1961 FIXME("%p, %p\n", This, stream);
1962 return E_NOTIMPL;
1963 }
1964
1965 static HRESULT WINAPI profile3_GetExpectedPacketCount(IWMProfile3 *iface, QWORD duration, QWORD *packets)
1966 {
1967 WMReader *This = impl_from_IWMProfile3(iface);
1968 FIXME("%p, %s, %p\n", This, wine_dbgstr_longlong(duration), packets);
1969 return E_NOTIMPL;
1970 }
1971
1972 static const IWMProfile3Vtbl WMProfile3Vtbl =
1973 {
1974 profile3_QueryInterface,
1975 profile3_AddRef,
1976 profile3_Release,
1977 profile3_GetVersion,
1978 profile3_GetName,
1979 profile3_SetName,
1980 profile3_GetDescription,
1981 profile3_SetDescription,
1982 profile3_GetStreamCount,
1983 profile3_GetStream,
1984 profile3_GetStreamByNumber,
1985 profile3_RemoveStream,
1986 profile3_RemoveStreamByNumber,
1987 profile3_AddStream,
1988 profile3_ReconfigStream,
1989 profile3_CreateNewStream,
1990 profile3_GetMutualExclusionCount,
1991 profile3_GetMutualExclusion,
1992 profile3_RemoveMutualExclusion,
1993 profile3_AddMutualExclusion,
1994 profile3_CreateNewMutualExclusion,
1995 profile3_GetProfileID,
1996 profile3_GetStorageFormat,
1997 profile3_SetStorageFormat,
1998 profile3_GetBandwidthSharingCount,
1999 profile3_GetBandwidthSharing,
2000 profile3_RemoveBandwidthSharing,
2001 profile3_AddBandwidthSharing,
2002 profile3_CreateNewBandwidthSharing,
2003 profile3_GetStreamPrioritization,
2004 profile3_SetStreamPrioritization,
2005 profile3_RemoveStreamPrioritization,
2006 profile3_CreateNewStreamPrioritization,
2007 profile3_GetExpectedPacketCount
2008 };
2009
2010 static inline WMReader *impl_from_IWMPacketSize2(IWMPacketSize2 *iface)
2011 {
2012 return CONTAINING_RECORD(iface, WMReader, IWMPacketSize2_iface);
2013 }
2014
2015 static HRESULT WINAPI packetsize_QueryInterface(IWMPacketSize2 *iface, REFIID riid, void **ppv)
2016 {
2017 WMReader *This = impl_from_IWMPacketSize2(iface);
2018 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
2019 }
2020
2021 static ULONG WINAPI packetsize_AddRef(IWMPacketSize2 *iface)
2022 {
2023 WMReader *This = impl_from_IWMPacketSize2(iface);
2024 return IWMReader_AddRef(&This->IWMReader_iface);
2025 }
2026
2027 static ULONG WINAPI packetsize_Release(IWMPacketSize2 *iface)
2028 {
2029 WMReader *This = impl_from_IWMPacketSize2(iface);
2030 return IWMReader_Release(&This->IWMReader_iface);
2031 }
2032
2033 static HRESULT WINAPI packetsize_GetMaxPacketSize(IWMPacketSize2 *iface, DWORD *size)
2034 {
2035 WMReader *This = impl_from_IWMPacketSize2(iface);
2036 FIXME("%p, %p\n", This, size);
2037 return E_NOTIMPL;
2038 }
2039
2040 static HRESULT WINAPI packetsize_SetMaxPacketSize(IWMPacketSize2 *iface, DWORD size)
2041 {
2042 WMReader *This = impl_from_IWMPacketSize2(iface);
2043 FIXME("%p, %d\n", This, size);
2044 return E_NOTIMPL;
2045 }
2046
2047 static HRESULT WINAPI packetsize_GetMinPacketSize(IWMPacketSize2 *iface, DWORD *size)
2048 {
2049 WMReader *This = impl_from_IWMPacketSize2(iface);
2050 FIXME("%p, %p\n", This, size);
2051 return E_NOTIMPL;
2052 }
2053
2054 static HRESULT WINAPI packetsize_SetMinPacketSize(IWMPacketSize2 *iface, DWORD size)
2055 {
2056 WMReader *This = impl_from_IWMPacketSize2(iface);
2057 FIXME("%p, %d\n", This, size);
2058 return E_NOTIMPL;
2059 }
2060
2061 static const IWMPacketSize2Vtbl WMPacketSize2Vtbl =
2062 {
2063 packetsize_QueryInterface,
2064 packetsize_AddRef,
2065 packetsize_Release,
2066 packetsize_GetMaxPacketSize,
2067 packetsize_SetMaxPacketSize,
2068 packetsize_GetMinPacketSize,
2069 packetsize_SetMinPacketSize
2070 };
2071
2072 HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
2073 {
2074 WMReader *reader;
2075
2076 TRACE("(%p, %x, %p)\n", reserved, rights, ret_reader);
2077
2078 reader = heap_alloc(sizeof(*reader));
2079 if(!reader)
2080 return E_OUTOFMEMORY;
2081
2082 reader->IWMReader_iface.lpVtbl = &WMReaderVtbl;
2083 reader->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
2084 reader->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
2085 reader->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
2086 reader->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
2087 reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
2088 reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
2089 reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
2090 reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
2091 reader->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl;
2092 reader->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl;
2093 reader->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
2094 reader->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl;
2095 reader->ref = 1;
2096
2097 *ret_reader = &reader->IWMReader_iface;
2098 return S_OK;
2099 }
2100
2101 HRESULT WINAPI WMCreateReaderPriv(IWMReader **ret_reader)
2102 {
2103 return WMCreateReader(NULL, 0, ret_reader);
2104 }
2105
2106 HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader)
2107 {
2108 FIXME("(%p, %x, %p): stub\n", pcert, rights, syncreader);
2109
2110 *syncreader = NULL;
2111
2112 return E_NOTIMPL;
2113 }
2114
2115 typedef struct {
2116 IWMProfileManager IWMProfileManager_iface;
2117 LONG ref;
2118 } WMProfileManager;
2119
2120 static inline WMProfileManager *impl_from_IWMProfileManager(IWMProfileManager *iface)
2121 {
2122 return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager_iface);
2123 }
2124
2125 static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager *iface, REFIID riid, void **ppv)
2126 {
2127 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2128
2129 if(IsEqualGUID(&IID_IUnknown, riid)) {
2130 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
2131 *ppv = &This->IWMProfileManager_iface;
2132 }else if(IsEqualGUID(&IID_IWMProfileManager, riid)) {
2133 TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv);
2134 *ppv = &This->IWMProfileManager_iface;
2135 }else {
2136 FIXME("Unsupported iface %s\n", debugstr_guid(riid));
2137 *ppv = NULL;
2138 return E_NOINTERFACE;
2139 }
2140
2141 IUnknown_AddRef((IUnknown*)*ppv);
2142 return S_OK;
2143 }
2144
2145 static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager *iface)
2146 {
2147 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2148 LONG ref = InterlockedIncrement(&This->ref);
2149
2150 TRACE("(%p) ref=%d\n", This, ref);
2151
2152 return ref;
2153 }
2154
2155 static ULONG WINAPI WMProfileManager_Release(IWMProfileManager *iface)
2156 {
2157 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2158 LONG ref = InterlockedDecrement(&This->ref);
2159
2160 TRACE("(%p) ref=%d\n", This, ref);
2161
2162 if(!ref)
2163 heap_free(This);
2164
2165 return ref;
2166 }
2167
2168 static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager *iface, WMT_VERSION version, IWMProfile **ret)
2169 {
2170 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2171 FIXME("(%p)->(%x %p)\n", This, version, ret);
2172 return E_NOTIMPL;
2173 }
2174
2175 static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager *iface, REFGUID guid, IWMProfile **ret)
2176 {
2177 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2178 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret);
2179 return E_NOTIMPL;
2180 }
2181
2182 static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager *iface, const WCHAR *profile, IWMProfile **ret)
2183 {
2184 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2185 FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret);
2186 return E_NOTIMPL;
2187 }
2188
2189 static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
2190 {
2191 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2192 FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len);
2193 return E_NOTIMPL;
2194 }
2195
2196 static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager *iface, DWORD *ret)
2197 {
2198 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2199 FIXME("(%p)->(%p)\n", This, ret);
2200 return E_NOTIMPL;
2201 }
2202
2203 static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager *iface, DWORD index, IWMProfile **ret)
2204 {
2205 WMProfileManager *This = impl_from_IWMProfileManager(iface);
2206 FIXME("(%p)->(%d %p)\n", This, index, ret);
2207 return E_NOTIMPL;
2208 }
2209
2210 static const IWMProfileManagerVtbl WMProfileManagerVtbl = {
2211 WMProfileManager_QueryInterface,
2212 WMProfileManager_AddRef,
2213 WMProfileManager_Release,
2214 WMProfileManager_CreateEmptyProfile,
2215 WMProfileManager_LoadProfileByID,
2216 WMProfileManager_LoadProfileByData,
2217 WMProfileManager_SaveProfile,
2218 WMProfileManager_GetSystemProfileCount,
2219 WMProfileManager_LoadSystemProfile
2220 };
2221
2222 HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret)
2223 {
2224 WMProfileManager *profile_mgr;
2225
2226 TRACE("(%p)\n", ret);
2227
2228 profile_mgr = heap_alloc(sizeof(*profile_mgr));
2229 if(!profile_mgr)
2230 return E_OUTOFMEMORY;
2231
2232 profile_mgr->IWMProfileManager_iface.lpVtbl = &WMProfileManagerVtbl;
2233 profile_mgr->ref = 1;
2234
2235 *ret = &profile_mgr->IWMProfileManager_iface;
2236 return S_OK;
2237 }