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