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
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
);
33 case DLL_WINE_PREATTACH
:
34 return FALSE
; /* prefer native version */
35 case DLL_PROCESS_ATTACH
:
36 DisableThreadLibraryCalls(hinstDLL
);
43 HRESULT WINAPI
DllRegisterServer(void)
50 HRESULT WINAPI
WMCreateEditor(IWMMetadataEditor
**editor
)
52 FIXME("(%p): stub\n", editor
);
60 IWMReader IWMReader_iface
;
61 IWMReaderAdvanced6 IWMReaderAdvanced6_iface
;
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
;
100 FIXME("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppv
);
101 return E_NOINTERFACE
;
104 IUnknown_AddRef((IUnknown
*)*ppv
);
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
);
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
);
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
);
138 static HRESULT WINAPI
WMReader_Close(IWMReader
*iface
)
140 WMReader
*This
= impl_from_IWMReader(iface
);
141 FIXME("(%p)\n", This
);
145 static HRESULT WINAPI
WMReader_GetOutputCount(IWMReader
*iface
, DWORD
*outputs
)
147 WMReader
*This
= impl_from_IWMReader(iface
);
148 FIXME("(%p)->(%p)\n", This
, outputs
);
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
);
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
);
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
);
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
);
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
);
187 static HRESULT WINAPI
WMReader_Stop(IWMReader
*iface
)
189 WMReader
*This
= impl_from_IWMReader(iface
);
190 FIXME("(%p)\n", This
);
194 static HRESULT WINAPI
WMReader_Pause(IWMReader
*iface
)
196 WMReader
*This
= impl_from_IWMReader(iface
);
197 FIXME("(%p)\n", This
);
201 static HRESULT WINAPI
WMReader_Resume(IWMReader
*iface
)
203 WMReader
*This
= impl_from_IWMReader(iface
);
204 FIXME("(%p)\n", This
);
208 static const IWMReaderVtbl WMReaderVtbl
= {
209 WMReader_QueryInterface
,
214 WMReader_GetOutputCount
,
215 WMReader_GetOutputProps
,
216 WMReader_SetOutputProps
,
217 WMReader_GetOutputFormatCount
,
218 WMReader_GetOutputFormat
,
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
);
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
);
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
));
269 static HRESULT WINAPI
WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6
*iface
, BOOL selection
)
271 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
272 FIXME("(%p)->(%x)\n", This
, selection
);
276 static HRESULT WINAPI
WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvanced6
*iface
, BOOL
*selection
)
278 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
279 FIXME("(%p)->(%p)\n", This
, selection
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
));
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
);
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
);
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
);
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
);
421 static HRESULT WINAPI
WMReaderAdvanced2_GetSaveAsProgress(IWMReaderAdvanced6
*iface
, DWORD
*percent
)
423 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
424 FIXME("(%p)->(%p)\n", This
, percent
);
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
));
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
);
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
);
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
);
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
);
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
);
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
);
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
);
487 static HRESULT WINAPI
WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6
*iface
)
489 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
490 FIXME("(%p)\n", This
);
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
);
502 static HRESULT WINAPI
WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6
*iface
)
504 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
505 FIXME("(%p)\n", This
);
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
);
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
);
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
);
532 static HRESULT WINAPI
WMReaderAdvanced4_GetMaxSpeedFactor(IWMReaderAdvanced6
*iface
, double *factor
)
534 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
535 FIXME("(%p)->(%p)\n", This
, factor
);
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
);
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
));
554 static HRESULT WINAPI
WMReaderAdvanced4_SendLogParams(IWMReaderAdvanced6
*iface
)
556 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
557 FIXME("(%p)\n", This
);
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
);
568 static HRESULT WINAPI
WMReaderAdvanced4_CancelSaveFileAs(IWMReaderAdvanced6
*iface
)
570 WMReader
*This
= impl_from_IWMReaderAdvanced6(iface
);
571 FIXME("(%p)\n", This
);
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
);
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
);
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
);
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
)
656 TRACE("(%p, %x, %p)\n", reserved
, rights
, ret_reader
);
658 reader
= heap_alloc(sizeof(*reader
));
660 return E_OUTOFMEMORY
;
662 reader
->IWMReader_iface
.lpVtbl
= &WMReaderVtbl
;
663 reader
->IWMReaderAdvanced6_iface
.lpVtbl
= &WMReaderAdvanced6Vtbl
;
666 *ret_reader
= &reader
->IWMReader_iface
;
670 HRESULT WINAPI
WMCreateSyncReader(IUnknown
*pcert
, DWORD rights
, IWMSyncReader
**syncreader
)
672 FIXME("(%p, %x, %p): stub\n", pcert
, rights
, syncreader
);
680 IWMProfileManager IWMProfileManager_iface
;
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
;
701 return E_NOINTERFACE
;
704 IUnknown_AddRef((IUnknown
*)*ppv
);
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
);
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
);
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
);
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
);
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
);
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
);
759 static HRESULT WINAPI
WMProfileManager_GetSystemProfileCount(IWMProfileManager
*iface
, DWORD
*ret
)
761 WMProfileManager
*This
= impl_from_IWMProfileManager(iface
);
762 FIXME("(%p)->(%p)\n", This
, ret
);
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
);
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
));
793 return E_OUTOFMEMORY
;
795 profile_mgr
->IWMProfileManager_iface
.lpVtbl
= &WMProfileManagerVtbl
;
796 profile_mgr
->ref
= 1;
798 *ret
= &profile_mgr
->IWMProfileManager_iface
;