wined3d: Use opaque data type for stream output registers.
[wine.git] / dlls / wmvcore / wmvcore_main.c
blob741dd70c4188068dbefe407eede7f8ec69a28a53
1 /*
2 * Copyright 2012 Austin English
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.
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.
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
19 #include "wmvcore.h"
21 #include "initguid.h"
22 #include "wmsdkidl.h"
23 #include "wine/debug.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
27 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
29 TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
31 switch (fdwReason)
33 case DLL_WINE_PREATTACH:
34 return FALSE; /* prefer native version */
35 case DLL_PROCESS_ATTACH:
36 DisableThreadLibraryCalls(hinstDLL);
37 break;
40 return TRUE;
43 HRESULT WINAPI DllRegisterServer(void)
45 FIXME("(): stub\n");
47 return S_OK;
50 HRESULT WINAPI WMCreateEditor(IWMMetadataEditor **editor)
52 FIXME("(%p): stub\n", editor);
54 *editor = NULL;
56 return E_NOTIMPL;
59 typedef struct {
60 IWMReader IWMReader_iface;
61 IWMReaderAdvanced6 IWMReaderAdvanced6_iface;
62 LONG ref;
63 } WMReader;
65 static inline WMReader *impl_from_IWMReader(IWMReader *iface)
67 return CONTAINING_RECORD(iface, WMReader, IWMReader_iface);
70 static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, void **ppv)
72 WMReader *This = impl_from_IWMReader(iface);
74 if(IsEqualGUID(riid, &IID_IUnknown)) {
75 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
76 *ppv = &This->IWMReader_iface;
77 }else if(IsEqualGUID(riid, &IID_IWMReader)) {
78 TRACE("(%p)->(IID_IWMReader %p)\n", This, ppv);
79 *ppv = &This->IWMReader_iface;
80 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced)) {
81 TRACE("(%p)->(IID_IWMReaderAdvanced %p)\n", This, ppv);
82 *ppv = &This->IWMReaderAdvanced6_iface;
83 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced2)) {
84 TRACE("(%p)->(IID_IWMReaderAdvanced2 %p)\n", This, ppv);
85 *ppv = &This->IWMReaderAdvanced6_iface;
86 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced3)) {
87 TRACE("(%p)->(IID_IWMReaderAdvanced3 %p)\n", This, ppv);
88 *ppv = &This->IWMReaderAdvanced6_iface;
89 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced4)) {
90 TRACE("(%p)->(IID_IWMReaderAdvanced4 %p)\n", This, ppv);
91 *ppv = &This->IWMReaderAdvanced6_iface;
92 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced5)) {
93 TRACE("(%p)->(IID_IWMReaderAdvanced5 %p)\n", This, ppv);
94 *ppv = &This->IWMReaderAdvanced6_iface;
95 }else if(IsEqualGUID(riid, &IID_IWMReaderAdvanced6)) {
96 TRACE("(%p)->(IID_IWMReaderAdvanced6 %p)\n", This, ppv);
97 *ppv = &This->IWMReaderAdvanced6_iface;
98 }else {
99 *ppv = NULL;
100 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
101 return E_NOINTERFACE;
104 IUnknown_AddRef((IUnknown*)*ppv);
105 return S_OK;
108 static ULONG WINAPI WMReader_AddRef(IWMReader *iface)
110 WMReader *This = impl_from_IWMReader(iface);
111 LONG ref = InterlockedIncrement(&This->ref);
113 TRACE("(%p) ref=%d\n", This, ref);
115 return ref;
118 static ULONG WINAPI WMReader_Release(IWMReader *iface)
120 WMReader *This = impl_from_IWMReader(iface);
121 LONG ref = InterlockedDecrement(&This->ref);
123 TRACE("(%p) ref=%d\n", This, ref);
125 if(!ref)
126 heap_free(This);
128 return ref;
131 static HRESULT WINAPI WMReader_Open(IWMReader *iface, const WCHAR *url, IWMReaderCallback *callback, void *context)
133 WMReader *This = impl_from_IWMReader(iface);
134 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(url), callback, context);
135 return E_NOTIMPL;
138 static HRESULT WINAPI WMReader_Close(IWMReader *iface)
140 WMReader *This = impl_from_IWMReader(iface);
141 FIXME("(%p)\n", This);
142 return E_NOTIMPL;
145 static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *outputs)
147 WMReader *This = impl_from_IWMReader(iface);
148 FIXME("(%p)->(%p)\n", This, outputs);
149 return E_NOTIMPL;
152 static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps **output)
154 WMReader *This = impl_from_IWMReader(iface);
155 FIXME("(%p)->(%u %p)\n", This, output_num, output);
156 return E_NOTIMPL;
159 static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output)
161 WMReader *This = impl_from_IWMReader(iface);
162 FIXME("(%p)->(%u %p)\n", This, output_num, output);
163 return E_NOTIMPL;
166 static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output_num, DWORD *formats)
168 WMReader *This = impl_from_IWMReader(iface);
169 FIXME("(%p)->(%u %p)\n", This, output_num, formats);
170 return E_NOTIMPL;
173 static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props)
175 WMReader *This = impl_from_IWMReader(iface);
176 FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props);
177 return E_NOTIMPL;
180 static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context)
182 WMReader *This = impl_from_IWMReader(iface);
183 FIXME("(%p)->(%s %s %f %p)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate, context);
184 return E_NOTIMPL;
187 static HRESULT WINAPI WMReader_Stop(IWMReader *iface)
189 WMReader *This = impl_from_IWMReader(iface);
190 FIXME("(%p)\n", This);
191 return E_NOTIMPL;
194 static HRESULT WINAPI WMReader_Pause(IWMReader *iface)
196 WMReader *This = impl_from_IWMReader(iface);
197 FIXME("(%p)\n", This);
198 return E_NOTIMPL;
201 static HRESULT WINAPI WMReader_Resume(IWMReader *iface)
203 WMReader *This = impl_from_IWMReader(iface);
204 FIXME("(%p)\n", This);
205 return E_NOTIMPL;
208 static const IWMReaderVtbl WMReaderVtbl = {
209 WMReader_QueryInterface,
210 WMReader_AddRef,
211 WMReader_Release,
212 WMReader_Open,
213 WMReader_Close,
214 WMReader_GetOutputCount,
215 WMReader_GetOutputProps,
216 WMReader_SetOutputProps,
217 WMReader_GetOutputFormatCount,
218 WMReader_GetOutputFormat,
219 WMReader_Start,
220 WMReader_Stop,
221 WMReader_Pause,
222 WMReader_Resume
225 static inline WMReader *impl_from_IWMReaderAdvanced6(IWMReaderAdvanced6 *iface)
227 return CONTAINING_RECORD(iface, WMReader, IWMReaderAdvanced6_iface);
230 static HRESULT WINAPI WMReaderAdvanced_QueryInterface(IWMReaderAdvanced6 *iface, REFIID riid, void **ppv)
232 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
233 return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
236 static ULONG WINAPI WMReaderAdvanced_AddRef(IWMReaderAdvanced6 *iface)
238 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
239 return IWMReader_AddRef(&This->IWMReader_iface);
242 static ULONG WINAPI WMReaderAdvanced_Release(IWMReaderAdvanced6 *iface)
244 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
245 return IWMReader_Release(&This->IWMReader_iface);
248 static HRESULT WINAPI WMReaderAdvanced_SetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL user_clock)
250 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
251 FIXME("(%p)->(%x)\n", This, user_clock);
252 return E_NOTIMPL;
255 static HRESULT WINAPI WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL *user_clock)
257 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
258 FIXME("(%p)->(%p)\n", This, user_clock);
259 return E_NOTIMPL;
262 static HRESULT WINAPI WMReaderAdvanced_DeliverTime(IWMReaderAdvanced6 *iface, QWORD time)
264 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
265 FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(time));
266 return E_NOTIMPL;
269 static HRESULT WINAPI WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL selection)
271 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
272 FIXME("(%p)->(%x)\n", This, selection);
273 return E_NOTIMPL;
276 static HRESULT WINAPI WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL *selection)
278 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
279 FIXME("(%p)->(%p)\n", This, selection);
280 return E_NOTIMPL;
283 static HRESULT WINAPI WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6 *iface, WORD stream_count,
284 WORD *stream_numbers, WMT_STREAM_SELECTION *selections)
286 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
287 FIXME("(%p)->(%d %p %p)\n", This, stream_count, stream_numbers, selections);
288 return E_NOTIMPL;
291 static HRESULT WINAPI WMReaderAdvanced_GetStreamSelected(IWMReaderAdvanced6 *iface, WORD stream_num,
292 WMT_STREAM_SELECTION *selection)
294 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
295 FIXME("(%p)->(%d %p)\n", This, stream_num, selection);
296 return E_NOTIMPL;
299 static HRESULT WINAPI WMReaderAdvanced_SetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL get_callbacks)
301 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
302 FIXME("(%p)->(%x)\n", This, get_callbacks);
303 return E_NOTIMPL;
306 static HRESULT WINAPI WMReaderAdvanced_GetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL *get_callbacks)
308 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
309 FIXME("(%p)->(%p)\n", This, get_callbacks);
310 return E_NOTIMPL;
313 static HRESULT WINAPI WMReaderAdvanced_SetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num,
314 BOOL receive_stream_samples)
316 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
317 FIXME("(%p)->(%d %x)\n", This, stream_num, receive_stream_samples);
318 return E_NOTIMPL;
321 static HRESULT WINAPI WMReaderAdvanced_GetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num,
322 BOOL *receive_stream_samples)
324 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
325 FIXME("(%p)->(%d %p)\n", This, stream_num, receive_stream_samples);
326 return E_NOTIMPL;
329 static HRESULT WINAPI WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL allocate)
331 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
332 FIXME("(%p)->(%d %x)\n", This, output_num, allocate);
333 return E_NOTIMPL;
336 static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL *allocate)
338 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
339 FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
340 return E_NOTIMPL;
343 static HRESULT WINAPI WMReaderAdvanced_SetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL allocate)
345 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
346 FIXME("(%p)->(%d %x)\n", This, output_num, allocate);
347 return E_NOTIMPL;
350 static HRESULT WINAPI WMReaderAdvanced_GetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL *allocate)
352 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
353 FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
354 return E_NOTIMPL;
357 static HRESULT WINAPI WMReaderAdvanced_GetStatistics(IWMReaderAdvanced6 *iface, WM_READER_STATISTICS *statistics)
359 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
360 FIXME("(%p)->(%p)\n", This, statistics);
361 return E_NOTIMPL;
364 static HRESULT WINAPI WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6 *iface, WM_READER_CLIENTINFO *client_info)
366 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
367 FIXME("(%p)->(%p)\n", This, client_info);
368 return E_NOTIMPL;
371 static HRESULT WINAPI WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6 *iface, DWORD output, DWORD *max)
373 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
374 FIXME("(%p)->(%d %p)\n", This, output, max);
375 return E_NOTIMPL;
378 static HRESULT WINAPI WMReaderAdvanced_GetMaxStreamSampleSize(IWMReaderAdvanced6 *iface, WORD stream, DWORD *max)
380 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
381 FIXME("(%p)->(%d %p)\n", This, stream, max);
382 return E_NOTIMPL;
385 static HRESULT WINAPI WMReaderAdvanced_NotifyLateDelivery(IWMReaderAdvanced6 *iface, QWORD lateness)
387 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
388 FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(lateness));
389 return E_NOTIMPL;
392 static HRESULT WINAPI WMReaderAdvanced2_SetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE mode)
394 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
395 FIXME("(%p)->(%d)\n", This, mode);
396 return E_NOTIMPL;
399 static HRESULT WINAPI WMReaderAdvanced2_GetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE *mode)
401 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
402 FIXME("(%p)->(%p)\n", This, mode);
403 return E_NOTIMPL;
406 static HRESULT WINAPI WMReaderAdvanced2_GetBufferProgress(IWMReaderAdvanced6 *iface, DWORD *percent, QWORD *buffering)
408 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
409 FIXME("(%p)->(%p %p)\n", This, percent, buffering);
410 return E_NOTIMPL;
413 static HRESULT WINAPI WMReaderAdvanced2_GetDownloadProgress(IWMReaderAdvanced6 *iface, DWORD *percent,
414 QWORD *bytes_downloaded, QWORD *download)
416 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
417 FIXME("(%p)->(%p %p %p)\n", This, percent, bytes_downloaded, download);
418 return E_NOTIMPL;
421 static HRESULT WINAPI WMReaderAdvanced2_GetSaveAsProgress(IWMReaderAdvanced6 *iface, DWORD *percent)
423 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
424 FIXME("(%p)->(%p)\n", This, percent);
425 return E_NOTIMPL;
428 static HRESULT WINAPI WMReaderAdvanced2_SaveFileAs(IWMReaderAdvanced6 *iface, const WCHAR *filename)
430 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
431 FIXME("(%p)->(%s)\n", This, debugstr_w(filename));
432 return E_NOTIMPL;
435 static HRESULT WINAPI WMReaderAdvanced2_GetProtocolName(IWMReaderAdvanced6 *iface, WCHAR *protocol, DWORD *protocol_len)
437 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
438 FIXME("(%p)->(%p %p)\n", This, protocol, protocol_len);
439 return E_NOTIMPL;
442 static HRESULT WINAPI WMReaderAdvanced2_StartAtMarker(IWMReaderAdvanced6 *iface, WORD marker_index,
443 QWORD duration, float rate, void *context)
445 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
446 FIXME("(%p)->(%d %s %f %p)\n", This, marker_index, wine_dbgstr_longlong(duration), rate, context);
447 return E_NOTIMPL;
450 static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num,
451 const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
453 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
454 FIXME("(%p)->(%d %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
455 return E_NOTIMPL;
458 static HRESULT WINAPI WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num,
459 const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
461 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
462 FIXME("(%p)->(%d %s %d %p %d)\n", This, output_num, debugstr_w(name), type, value, length);
463 return E_NOTIMPL;
466 static HRESULT WINAPI WMReaderAdvanced2_Preroll(IWMReaderAdvanced6 *iface, QWORD start, QWORD duration, float rate)
468 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
469 FIXME("(%p)->(%s %s %f)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate);
470 return E_NOTIMPL;
473 static HRESULT WINAPI WMReaderAdvanced2_SetLogClientID(IWMReaderAdvanced6 *iface, BOOL log_client_id)
475 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
476 FIXME("(%p)->(%x)\n", This, log_client_id);
477 return E_NOTIMPL;
480 static HRESULT WINAPI WMReaderAdvanced2_GetLogClientID(IWMReaderAdvanced6 *iface, BOOL *log_client_id)
482 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
483 FIXME("(%p)->(%p)\n", This, log_client_id);
484 return E_NOTIMPL;
487 static HRESULT WINAPI WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6 *iface)
489 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
490 FIXME("(%p)\n", This);
491 return E_NOTIMPL;
494 static HRESULT WINAPI WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6 *iface, IStream *stream,
495 IWMReaderCallback *callback, void *context)
497 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
498 FIXME("(%p)->(%p %p %p)\n", This, stream, callback, context);
499 return E_NOTIMPL;
502 static HRESULT WINAPI WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6 *iface)
504 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
505 FIXME("(%p)\n", This);
506 return E_NOTIMPL;
509 static HRESULT WINAPI WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6 *iface, WORD stream_num,
510 void *offset_start, void *duration, WMT_OFFSET_FORMAT format, float rate, void *context)
512 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
513 FIXME("(%p)->(%d %p %p %d %f %p)\n", This, stream_num, offset_start, duration, format, rate, context);
514 return E_NOTIMPL;
517 static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *iface, DWORD output_num, WORD *language_count)
519 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
520 FIXME("(%p)->(%d %p)\n", This, output_num, language_count);
521 return E_NOTIMPL;
524 static HRESULT WINAPI WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6 *iface, DWORD output_num,
525 WORD language, WCHAR *language_string, WORD *language_string_len)
527 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
528 FIXME("(%p)->(%d %x %p %p)\n", This, output_num, language, language_string, language_string_len);
529 return E_NOTIMPL;
532 static HRESULT WINAPI WMReaderAdvanced4_GetMaxSpeedFactor(IWMReaderAdvanced6 *iface, double *factor)
534 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
535 FIXME("(%p)->(%p)\n", This, factor);
536 return E_NOTIMPL;
539 static HRESULT WINAPI WMReaderAdvanced4_IsUsingFastCache(IWMReaderAdvanced6 *iface, BOOL *using_fast_cache)
541 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
542 FIXME("(%p)->(%p)\n", This, using_fast_cache);
543 return E_NOTIMPL;
546 static HRESULT WINAPI WMReaderAdvanced4_AddLogParam(IWMReaderAdvanced6 *iface, const WCHAR *namespace,
547 const WCHAR *name, const WCHAR *value)
549 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
550 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(namespace), debugstr_w(name), debugstr_w(value));
551 return E_NOTIMPL;
554 static HRESULT WINAPI WMReaderAdvanced4_SendLogParams(IWMReaderAdvanced6 *iface)
556 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
557 FIXME("(%p)\n", This);
558 return E_NOTIMPL;
561 static HRESULT WINAPI WMReaderAdvanced4_CanSaveFileAs(IWMReaderAdvanced6 *iface, BOOL *can_save)
563 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
564 FIXME("(%p)->(%p)\n", This, can_save);
565 return E_NOTIMPL;
568 static HRESULT WINAPI WMReaderAdvanced4_CancelSaveFileAs(IWMReaderAdvanced6 *iface)
570 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
571 FIXME("(%p)\n", This);
572 return E_NOTIMPL;
575 static HRESULT WINAPI WMReaderAdvanced4_GetURL(IWMReaderAdvanced6 *iface, WCHAR *url, DWORD *url_len)
577 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
578 FIXME("(%p)->(%p %p)\n", This, url, url_len);
579 return E_NOTIMPL;
582 static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, DWORD output_num, IWMPlayerHook *hook)
584 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
585 FIXME("(%p)->(%d %p)\n", This, output_num, hook);
586 return E_NOTIMPL;
589 static HRESULT WINAPI WMReaderAdvanced6_SetProtextStreamSamples(IWMReaderAdvanced6 *iface, BYTE *cert,
590 DWORD cert_size, DWORD cert_type, DWORD flags, BYTE *initialization_vector, DWORD *initialization_vector_size)
592 WMReader *This = impl_from_IWMReaderAdvanced6(iface);
593 FIXME("(%p)->(%p %d %d %x %p %p)\n", This, cert, cert_size, cert_type, flags, initialization_vector,
594 initialization_vector_size);
595 return E_NOTIMPL;
598 static const IWMReaderAdvanced6Vtbl WMReaderAdvanced6Vtbl = {
599 WMReaderAdvanced_QueryInterface,
600 WMReaderAdvanced_AddRef,
601 WMReaderAdvanced_Release,
602 WMReaderAdvanced_SetUserProvidedClock,
603 WMReaderAdvanced_GetUserProvidedClock,
604 WMReaderAdvanced_DeliverTime,
605 WMReaderAdvanced_SetManualStreamSelection,
606 WMReaderAdvanced_GetManualStreamSelection,
607 WMReaderAdvanced_SetStreamsSelected,
608 WMReaderAdvanced_GetStreamSelected,
609 WMReaderAdvanced_SetReceiveSelectionCallbacks,
610 WMReaderAdvanced_GetReceiveSelectionCallbacks,
611 WMReaderAdvanced_SetReceiveStreamSamples,
612 WMReaderAdvanced_GetReceiveStreamSamples,
613 WMReaderAdvanced_SetAllocateForOutput,
614 WMReaderAdvanced_GetAllocateForOutput,
615 WMReaderAdvanced_SetAllocateForStream,
616 WMReaderAdvanced_GetAllocateForStream,
617 WMReaderAdvanced_GetStatistics,
618 WMReaderAdvanced_SetClientInfo,
619 WMReaderAdvanced_GetMaxOutputSampleSize,
620 WMReaderAdvanced_GetMaxStreamSampleSize,
621 WMReaderAdvanced_NotifyLateDelivery,
622 WMReaderAdvanced2_SetPlayMode,
623 WMReaderAdvanced2_GetPlayMode,
624 WMReaderAdvanced2_GetBufferProgress,
625 WMReaderAdvanced2_GetDownloadProgress,
626 WMReaderAdvanced2_GetSaveAsProgress,
627 WMReaderAdvanced2_SaveFileAs,
628 WMReaderAdvanced2_GetProtocolName,
629 WMReaderAdvanced2_StartAtMarker,
630 WMReaderAdvanced2_GetOutputSetting,
631 WMReaderAdvanced2_SetOutputSetting,
632 WMReaderAdvanced2_Preroll,
633 WMReaderAdvanced2_SetLogClientID,
634 WMReaderAdvanced2_GetLogClientID,
635 WMReaderAdvanced2_StopBuffering,
636 WMReaderAdvanced2_OpenStream,
637 WMReaderAdvanced3_StopNetStreaming,
638 WMReaderAdvanced3_StartAtPosition,
639 WMReaderAdvanced4_GetLanguageCount,
640 WMReaderAdvanced4_GetLanguage,
641 WMReaderAdvanced4_GetMaxSpeedFactor,
642 WMReaderAdvanced4_IsUsingFastCache,
643 WMReaderAdvanced4_AddLogParam,
644 WMReaderAdvanced4_SendLogParams,
645 WMReaderAdvanced4_CanSaveFileAs,
646 WMReaderAdvanced4_CancelSaveFileAs,
647 WMReaderAdvanced4_GetURL,
648 WMReaderAdvanced5_SetPlayerHook,
649 WMReaderAdvanced6_SetProtextStreamSamples
652 HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
654 WMReader *reader;
656 TRACE("(%p, %x, %p)\n", reserved, rights, ret_reader);
658 reader = heap_alloc(sizeof(*reader));
659 if(!reader)
660 return E_OUTOFMEMORY;
662 reader->IWMReader_iface.lpVtbl = &WMReaderVtbl;
663 reader->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
664 reader->ref = 1;
666 *ret_reader = &reader->IWMReader_iface;
667 return S_OK;
670 HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader)
672 FIXME("(%p, %x, %p): stub\n", pcert, rights, syncreader);
674 *syncreader = NULL;
676 return E_NOTIMPL;
679 typedef struct {
680 IWMProfileManager IWMProfileManager_iface;
681 LONG ref;
682 } WMProfileManager;
684 static inline WMProfileManager *impl_from_IWMProfileManager(IWMProfileManager *iface)
686 return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager_iface);
689 static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager *iface, REFIID riid, void **ppv)
691 WMProfileManager *This = impl_from_IWMProfileManager(iface);
693 if(IsEqualGUID(&IID_IUnknown, riid)) {
694 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
695 *ppv = &This->IWMProfileManager_iface;
696 }else if(IsEqualGUID(&IID_IWMProfileManager, riid)) {
697 TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv);
698 *ppv = &This->IWMProfileManager_iface;
699 }else {
700 *ppv = NULL;
701 return E_NOINTERFACE;
704 IUnknown_AddRef((IUnknown*)*ppv);
705 return S_OK;
708 static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager *iface)
710 WMProfileManager *This = impl_from_IWMProfileManager(iface);
711 LONG ref = InterlockedIncrement(&This->ref);
713 TRACE("(%p) ref=%d\n", This, ref);
715 return ref;
718 static ULONG WINAPI WMProfileManager_Release(IWMProfileManager *iface)
720 WMProfileManager *This = impl_from_IWMProfileManager(iface);
721 LONG ref = InterlockedDecrement(&This->ref);
723 TRACE("(%p) ref=%d\n", This, ref);
725 if(!ref)
726 heap_free(This);
728 return ref;
731 static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager *iface, WMT_VERSION version, IWMProfile **ret)
733 WMProfileManager *This = impl_from_IWMProfileManager(iface);
734 FIXME("(%p)->(%x %p)\n", This, version, ret);
735 return E_NOTIMPL;
738 static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager *iface, REFGUID guid, IWMProfile **ret)
740 WMProfileManager *This = impl_from_IWMProfileManager(iface);
741 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret);
742 return E_NOTIMPL;
745 static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager *iface, const WCHAR *profile, IWMProfile **ret)
747 WMProfileManager *This = impl_from_IWMProfileManager(iface);
748 FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret);
749 return E_NOTIMPL;
752 static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
754 WMProfileManager *This = impl_from_IWMProfileManager(iface);
755 FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len);
756 return E_NOTIMPL;
759 static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager *iface, DWORD *ret)
761 WMProfileManager *This = impl_from_IWMProfileManager(iface);
762 FIXME("(%p)->(%p)\n", This, ret);
763 return E_NOTIMPL;
766 static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager *iface, DWORD index, IWMProfile **ret)
768 WMProfileManager *This = impl_from_IWMProfileManager(iface);
769 FIXME("(%p)->(%d %p)\n", This, index, ret);
770 return E_NOTIMPL;
773 static const IWMProfileManagerVtbl WMProfileManagerVtbl = {
774 WMProfileManager_QueryInterface,
775 WMProfileManager_AddRef,
776 WMProfileManager_Release,
777 WMProfileManager_CreateEmptyProfile,
778 WMProfileManager_LoadProfileByID,
779 WMProfileManager_LoadProfileByData,
780 WMProfileManager_SaveProfile,
781 WMProfileManager_GetSystemProfileCount,
782 WMProfileManager_LoadSystemProfile
785 HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret)
787 WMProfileManager *profile_mgr;
789 TRACE("(%p)\n", ret);
791 profile_mgr = heap_alloc(sizeof(*profile_mgr));
792 if(!profile_mgr)
793 return E_OUTOFMEMORY;
795 profile_mgr->IWMProfileManager_iface.lpVtbl = &WMProfileManagerVtbl;
796 profile_mgr->ref = 1;
798 *ret = &profile_mgr->IWMProfileManager_iface;
799 return S_OK;