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 "gst_private.h"
21 WINE_DEFAULT_DEBUG_CHANNEL(wmvcore
);
25 struct wm_reader reader
;
27 IWMReader IWMReader_iface
;
28 IWMReaderAdvanced6 IWMReaderAdvanced6_iface
;
29 IWMReaderAccelerator IWMReaderAccelerator_iface
;
30 IWMReaderNetworkConfig2 IWMReaderNetworkConfig2_iface
;
31 IWMReaderStreamClock IWMReaderStreamClock_iface
;
32 IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface
;
33 IReferenceClock IReferenceClock_iface
;
35 IWMReaderCallback
*callback
;
39 static void open_stream(struct async_reader
*reader
, IWMReaderCallback
*callback
, void *context
)
41 static const DWORD zero
;
43 IWMReaderCallback_AddRef(reader
->callback
= callback
);
44 reader
->context
= context
;
45 IWMReaderCallback_OnStatus(callback
, WMT_OPENED
, S_OK
, WMT_TYPE_DWORD
, (BYTE
*)&zero
, context
);
48 static struct async_reader
*impl_from_IWMReader(IWMReader
*iface
)
50 return CONTAINING_RECORD(iface
, struct async_reader
, IWMReader_iface
);
53 static HRESULT WINAPI
WMReader_QueryInterface(IWMReader
*iface
, REFIID iid
, void **out
)
55 struct async_reader
*reader
= impl_from_IWMReader(iface
);
57 return IWMProfile3_QueryInterface(&reader
->reader
.IWMProfile3_iface
, iid
, out
);
60 static ULONG WINAPI
WMReader_AddRef(IWMReader
*iface
)
62 struct async_reader
*reader
= impl_from_IWMReader(iface
);
64 return IWMProfile3_AddRef(&reader
->reader
.IWMProfile3_iface
);
67 static ULONG WINAPI
WMReader_Release(IWMReader
*iface
)
69 struct async_reader
*reader
= impl_from_IWMReader(iface
);
71 return IWMProfile3_Release(&reader
->reader
.IWMProfile3_iface
);
74 static HRESULT WINAPI
WMReader_Open(IWMReader
*iface
, const WCHAR
*url
, IWMReaderCallback
*callback
, void *context
)
76 struct async_reader
*This
= impl_from_IWMReader(iface
);
77 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(url
), callback
, context
);
81 static HRESULT WINAPI
WMReader_Close(IWMReader
*iface
)
83 struct async_reader
*reader
= impl_from_IWMReader(iface
);
84 static const DWORD zero
;
87 TRACE("reader %p.\n", reader
);
89 EnterCriticalSection(&reader
->reader
.cs
);
91 hr
= wm_reader_close(&reader
->reader
);
94 IWMReaderCallback_OnStatus(reader
->callback
, WMT_CLOSED
, S_OK
,
95 WMT_TYPE_DWORD
, (BYTE
*)&zero
, reader
->context
);
96 IWMReaderCallback_Release(reader
->callback
);
98 reader
->callback
= NULL
;
100 LeaveCriticalSection(&reader
->reader
.cs
);
105 static HRESULT WINAPI
WMReader_GetOutputCount(IWMReader
*iface
, DWORD
*count
)
107 struct async_reader
*reader
= impl_from_IWMReader(iface
);
109 TRACE("reader %p, count %p.\n", reader
, count
);
111 EnterCriticalSection(&reader
->reader
.cs
);
112 *count
= reader
->reader
.stream_count
;
113 LeaveCriticalSection(&reader
->reader
.cs
);
117 static HRESULT WINAPI
WMReader_GetOutputProps(IWMReader
*iface
, DWORD output
, IWMOutputMediaProps
**props
)
119 struct async_reader
*reader
= impl_from_IWMReader(iface
);
121 TRACE("reader %p, output %u, props %p.\n", reader
, output
, props
);
123 return wm_reader_get_output_props(&reader
->reader
, output
, props
);
126 static HRESULT WINAPI
WMReader_SetOutputProps(IWMReader
*iface
, DWORD output
, IWMOutputMediaProps
*props
)
128 struct async_reader
*reader
= impl_from_IWMReader(iface
);
130 TRACE("reader %p, output %u, props %p.\n", reader
, output
, props
);
132 return wm_reader_set_output_props(&reader
->reader
, output
, props
);
135 static HRESULT WINAPI
WMReader_GetOutputFormatCount(IWMReader
*iface
, DWORD output
, DWORD
*count
)
137 struct async_reader
*reader
= impl_from_IWMReader(iface
);
139 TRACE("reader %p, output %u, count %p.\n", reader
, output
, count
);
141 return wm_reader_get_output_format_count(&reader
->reader
, output
, count
);
144 static HRESULT WINAPI
WMReader_GetOutputFormat(IWMReader
*iface
, DWORD output
,
145 DWORD index
, IWMOutputMediaProps
**props
)
147 struct async_reader
*reader
= impl_from_IWMReader(iface
);
149 TRACE("reader %p, output %u, index %u, props %p.\n", reader
, output
, index
, props
);
151 return wm_reader_get_output_format(&reader
->reader
, output
, index
, props
);
154 static HRESULT WINAPI
WMReader_Start(IWMReader
*iface
, QWORD start
, QWORD duration
, float rate
, void *context
)
156 struct async_reader
*This
= impl_from_IWMReader(iface
);
157 FIXME("(%p)->(%s %s %f %p)\n", This
, wine_dbgstr_longlong(start
), wine_dbgstr_longlong(duration
), rate
, context
);
161 static HRESULT WINAPI
WMReader_Stop(IWMReader
*iface
)
163 struct async_reader
*This
= impl_from_IWMReader(iface
);
164 FIXME("(%p)\n", This
);
168 static HRESULT WINAPI
WMReader_Pause(IWMReader
*iface
)
170 struct async_reader
*This
= impl_from_IWMReader(iface
);
171 FIXME("(%p)\n", This
);
175 static HRESULT WINAPI
WMReader_Resume(IWMReader
*iface
)
177 struct async_reader
*This
= impl_from_IWMReader(iface
);
178 FIXME("(%p)\n", This
);
182 static const IWMReaderVtbl WMReaderVtbl
= {
183 WMReader_QueryInterface
,
188 WMReader_GetOutputCount
,
189 WMReader_GetOutputProps
,
190 WMReader_SetOutputProps
,
191 WMReader_GetOutputFormatCount
,
192 WMReader_GetOutputFormat
,
199 static struct async_reader
*impl_from_IWMReaderAdvanced6(IWMReaderAdvanced6
*iface
)
201 return CONTAINING_RECORD(iface
, struct async_reader
, IWMReaderAdvanced6_iface
);
204 static HRESULT WINAPI
WMReaderAdvanced_QueryInterface(IWMReaderAdvanced6
*iface
, REFIID riid
, void **ppv
)
206 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
207 return IWMReader_QueryInterface(&This
->IWMReader_iface
, riid
, ppv
);
210 static ULONG WINAPI
WMReaderAdvanced_AddRef(IWMReaderAdvanced6
*iface
)
212 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
213 return IWMReader_AddRef(&This
->IWMReader_iface
);
216 static ULONG WINAPI
WMReaderAdvanced_Release(IWMReaderAdvanced6
*iface
)
218 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
219 return IWMReader_Release(&This
->IWMReader_iface
);
222 static HRESULT WINAPI
WMReaderAdvanced_SetUserProvidedClock(IWMReaderAdvanced6
*iface
, BOOL user_clock
)
224 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
225 FIXME("(%p)->(%x)\n", This
, user_clock
);
229 static HRESULT WINAPI
WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6
*iface
, BOOL
*user_clock
)
231 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
232 FIXME("(%p)->(%p)\n", This
, user_clock
);
236 static HRESULT WINAPI
WMReaderAdvanced_DeliverTime(IWMReaderAdvanced6
*iface
, QWORD time
)
238 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
239 FIXME("(%p)->(%s)\n", This
, wine_dbgstr_longlong(time
));
243 static HRESULT WINAPI
WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6
*iface
, BOOL selection
)
245 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
246 FIXME("(%p)->(%x)\n", This
, selection
);
250 static HRESULT WINAPI
WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvanced6
*iface
, BOOL
*selection
)
252 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
253 FIXME("(%p)->(%p)\n", This
, selection
);
257 static HRESULT WINAPI
WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6
*iface
, WORD stream_count
,
258 WORD
*stream_numbers
, WMT_STREAM_SELECTION
*selections
)
260 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
261 FIXME("(%p)->(%d %p %p)\n", This
, stream_count
, stream_numbers
, selections
);
265 static HRESULT WINAPI
WMReaderAdvanced_GetStreamSelected(IWMReaderAdvanced6
*iface
, WORD stream_num
,
266 WMT_STREAM_SELECTION
*selection
)
268 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
269 FIXME("(%p)->(%d %p)\n", This
, stream_num
, selection
);
273 static HRESULT WINAPI
WMReaderAdvanced_SetReceiveSelectionCallbacks(IWMReaderAdvanced6
*iface
, BOOL get_callbacks
)
275 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
276 FIXME("(%p)->(%x)\n", This
, get_callbacks
);
280 static HRESULT WINAPI
WMReaderAdvanced_GetReceiveSelectionCallbacks(IWMReaderAdvanced6
*iface
, BOOL
*get_callbacks
)
282 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
283 FIXME("(%p)->(%p)\n", This
, get_callbacks
);
287 static HRESULT WINAPI
WMReaderAdvanced_SetReceiveStreamSamples(IWMReaderAdvanced6
*iface
, WORD stream_num
,
288 BOOL receive_stream_samples
)
290 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
291 FIXME("(%p)->(%d %x)\n", This
, stream_num
, receive_stream_samples
);
295 static HRESULT WINAPI
WMReaderAdvanced_GetReceiveStreamSamples(IWMReaderAdvanced6
*iface
, WORD stream_num
,
296 BOOL
*receive_stream_samples
)
298 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
299 FIXME("(%p)->(%d %p)\n", This
, stream_num
, receive_stream_samples
);
303 static HRESULT WINAPI
WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6
*iface
, DWORD output_num
, BOOL allocate
)
305 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
306 FIXME("(%p)->(%d %x)\n", This
, output_num
, allocate
);
310 static HRESULT WINAPI
WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6
*iface
, DWORD output_num
, BOOL
*allocate
)
312 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
313 FIXME("(%p)->(%d %p)\n", This
, output_num
, allocate
);
317 static HRESULT WINAPI
WMReaderAdvanced_SetAllocateForStream(IWMReaderAdvanced6
*iface
, WORD output_num
, BOOL allocate
)
319 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
320 FIXME("(%p)->(%d %x)\n", This
, output_num
, allocate
);
324 static HRESULT WINAPI
WMReaderAdvanced_GetAllocateForStream(IWMReaderAdvanced6
*iface
, WORD output_num
, BOOL
*allocate
)
326 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
327 FIXME("(%p)->(%d %p)\n", This
, output_num
, allocate
);
331 static HRESULT WINAPI
WMReaderAdvanced_GetStatistics(IWMReaderAdvanced6
*iface
, WM_READER_STATISTICS
*statistics
)
333 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
334 FIXME("(%p)->(%p)\n", This
, statistics
);
338 static HRESULT WINAPI
WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6
*iface
, WM_READER_CLIENTINFO
*client_info
)
340 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
341 FIXME("(%p)->(%p)\n", This
, client_info
);
345 static HRESULT WINAPI
WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6
*iface
, DWORD output
, DWORD
*max
)
347 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
348 FIXME("(%p)->(%d %p)\n", This
, output
, max
);
352 static HRESULT WINAPI
WMReaderAdvanced_GetMaxStreamSampleSize(IWMReaderAdvanced6
*iface
, WORD stream
, DWORD
*max
)
354 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
355 FIXME("(%p)->(%d %p)\n", This
, stream
, max
);
359 static HRESULT WINAPI
WMReaderAdvanced_NotifyLateDelivery(IWMReaderAdvanced6
*iface
, QWORD lateness
)
361 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
362 FIXME("(%p)->(%s)\n", This
, wine_dbgstr_longlong(lateness
));
366 static HRESULT WINAPI
WMReaderAdvanced2_SetPlayMode(IWMReaderAdvanced6
*iface
, WMT_PLAY_MODE mode
)
368 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
369 FIXME("(%p)->(%d)\n", This
, mode
);
373 static HRESULT WINAPI
WMReaderAdvanced2_GetPlayMode(IWMReaderAdvanced6
*iface
, WMT_PLAY_MODE
*mode
)
375 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
376 FIXME("(%p)->(%p)\n", This
, mode
);
380 static HRESULT WINAPI
WMReaderAdvanced2_GetBufferProgress(IWMReaderAdvanced6
*iface
, DWORD
*percent
, QWORD
*buffering
)
382 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
383 FIXME("(%p)->(%p %p)\n", This
, percent
, buffering
);
387 static HRESULT WINAPI
WMReaderAdvanced2_GetDownloadProgress(IWMReaderAdvanced6
*iface
, DWORD
*percent
,
388 QWORD
*bytes_downloaded
, QWORD
*download
)
390 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
391 FIXME("(%p)->(%p %p %p)\n", This
, percent
, bytes_downloaded
, download
);
395 static HRESULT WINAPI
WMReaderAdvanced2_GetSaveAsProgress(IWMReaderAdvanced6
*iface
, DWORD
*percent
)
397 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
398 FIXME("(%p)->(%p)\n", This
, percent
);
402 static HRESULT WINAPI
WMReaderAdvanced2_SaveFileAs(IWMReaderAdvanced6
*iface
, const WCHAR
*filename
)
404 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
405 FIXME("(%p)->(%s)\n", This
, debugstr_w(filename
));
409 static HRESULT WINAPI
WMReaderAdvanced2_GetProtocolName(IWMReaderAdvanced6
*iface
, WCHAR
*protocol
, DWORD
*protocol_len
)
411 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
412 FIXME("(%p)->(%p %p)\n", This
, protocol
, protocol_len
);
416 static HRESULT WINAPI
WMReaderAdvanced2_StartAtMarker(IWMReaderAdvanced6
*iface
, WORD marker_index
,
417 QWORD duration
, float rate
, void *context
)
419 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
420 FIXME("(%p)->(%d %s %f %p)\n", This
, marker_index
, wine_dbgstr_longlong(duration
), rate
, context
);
424 static HRESULT WINAPI
WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6
*iface
, DWORD output_num
,
425 const WCHAR
*name
, WMT_ATTR_DATATYPE
*type
, BYTE
*value
, WORD
*length
)
427 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
428 FIXME("(%p)->(%d %s %p %p %p)\n", This
, output_num
, debugstr_w(name
), type
, value
, length
);
432 static HRESULT WINAPI
WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6
*iface
, DWORD output_num
,
433 const WCHAR
*name
, WMT_ATTR_DATATYPE type
, const BYTE
*value
, WORD length
)
435 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
436 FIXME("(%p)->(%d %s %d %p %d)\n", This
, output_num
, debugstr_w(name
), type
, value
, length
);
440 static HRESULT WINAPI
WMReaderAdvanced2_Preroll(IWMReaderAdvanced6
*iface
, QWORD start
, QWORD duration
, float rate
)
442 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
443 FIXME("(%p)->(%s %s %f)\n", This
, wine_dbgstr_longlong(start
), wine_dbgstr_longlong(duration
), rate
);
447 static HRESULT WINAPI
WMReaderAdvanced2_SetLogClientID(IWMReaderAdvanced6
*iface
, BOOL log_client_id
)
449 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
450 FIXME("(%p)->(%x)\n", This
, log_client_id
);
454 static HRESULT WINAPI
WMReaderAdvanced2_GetLogClientID(IWMReaderAdvanced6
*iface
, BOOL
*log_client_id
)
456 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
457 FIXME("(%p)->(%p)\n", This
, log_client_id
);
461 static HRESULT WINAPI
WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6
*iface
)
463 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
464 FIXME("(%p)\n", This
);
468 static HRESULT WINAPI
WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6
*iface
,
469 IStream
*stream
, IWMReaderCallback
*callback
, void *context
)
471 struct async_reader
*reader
= impl_from_IWMReaderAdvanced6(iface
);
474 TRACE("reader %p, stream %p, callback %p, context %p.\n", reader
, stream
, callback
, context
);
476 EnterCriticalSection(&reader
->reader
.cs
);
478 if (SUCCEEDED(hr
= wm_reader_open_stream(&reader
->reader
, stream
)))
479 open_stream(reader
, callback
, context
);
481 LeaveCriticalSection(&reader
->reader
.cs
);
485 static HRESULT WINAPI
WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6
*iface
)
487 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
488 FIXME("(%p)\n", This
);
492 static HRESULT WINAPI
WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6
*iface
, WORD stream_num
,
493 void *offset_start
, void *duration
, WMT_OFFSET_FORMAT format
, float rate
, void *context
)
495 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
496 FIXME("(%p)->(%d %p %p %d %f %p)\n", This
, stream_num
, offset_start
, duration
, format
, rate
, context
);
500 static HRESULT WINAPI
WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6
*iface
, DWORD output_num
, WORD
*language_count
)
502 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
503 FIXME("(%p)->(%d %p)\n", This
, output_num
, language_count
);
507 static HRESULT WINAPI
WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6
*iface
, DWORD output_num
,
508 WORD language
, WCHAR
*language_string
, WORD
*language_string_len
)
510 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
511 FIXME("(%p)->(%d %x %p %p)\n", This
, output_num
, language
, language_string
, language_string_len
);
515 static HRESULT WINAPI
WMReaderAdvanced4_GetMaxSpeedFactor(IWMReaderAdvanced6
*iface
, double *factor
)
517 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
518 FIXME("(%p)->(%p)\n", This
, factor
);
522 static HRESULT WINAPI
WMReaderAdvanced4_IsUsingFastCache(IWMReaderAdvanced6
*iface
, BOOL
*using_fast_cache
)
524 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
525 FIXME("(%p)->(%p)\n", This
, using_fast_cache
);
529 static HRESULT WINAPI
WMReaderAdvanced4_AddLogParam(IWMReaderAdvanced6
*iface
, const WCHAR
*namespace,
530 const WCHAR
*name
, const WCHAR
*value
)
532 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
533 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(namespace), debugstr_w(name
), debugstr_w(value
));
537 static HRESULT WINAPI
WMReaderAdvanced4_SendLogParams(IWMReaderAdvanced6
*iface
)
539 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
540 FIXME("(%p)\n", This
);
544 static HRESULT WINAPI
WMReaderAdvanced4_CanSaveFileAs(IWMReaderAdvanced6
*iface
, BOOL
*can_save
)
546 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
547 FIXME("(%p)->(%p)\n", This
, can_save
);
551 static HRESULT WINAPI
WMReaderAdvanced4_CancelSaveFileAs(IWMReaderAdvanced6
*iface
)
553 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
554 FIXME("(%p)\n", This
);
558 static HRESULT WINAPI
WMReaderAdvanced4_GetURL(IWMReaderAdvanced6
*iface
, WCHAR
*url
, DWORD
*url_len
)
560 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
561 FIXME("(%p)->(%p %p)\n", This
, url
, url_len
);
565 static HRESULT WINAPI
WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6
*iface
, DWORD output_num
, IWMPlayerHook
*hook
)
567 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
568 FIXME("(%p)->(%d %p)\n", This
, output_num
, hook
);
572 static HRESULT WINAPI
WMReaderAdvanced6_SetProtectStreamSamples(IWMReaderAdvanced6
*iface
, BYTE
*cert
,
573 DWORD cert_size
, DWORD cert_type
, DWORD flags
, BYTE
*initialization_vector
, DWORD
*initialization_vector_size
)
575 struct async_reader
*This
= impl_from_IWMReaderAdvanced6(iface
);
576 FIXME("(%p)->(%p %d %d %x %p %p)\n", This
, cert
, cert_size
, cert_type
, flags
, initialization_vector
,
577 initialization_vector_size
);
581 static const IWMReaderAdvanced6Vtbl WMReaderAdvanced6Vtbl
= {
582 WMReaderAdvanced_QueryInterface
,
583 WMReaderAdvanced_AddRef
,
584 WMReaderAdvanced_Release
,
585 WMReaderAdvanced_SetUserProvidedClock
,
586 WMReaderAdvanced_GetUserProvidedClock
,
587 WMReaderAdvanced_DeliverTime
,
588 WMReaderAdvanced_SetManualStreamSelection
,
589 WMReaderAdvanced_GetManualStreamSelection
,
590 WMReaderAdvanced_SetStreamsSelected
,
591 WMReaderAdvanced_GetStreamSelected
,
592 WMReaderAdvanced_SetReceiveSelectionCallbacks
,
593 WMReaderAdvanced_GetReceiveSelectionCallbacks
,
594 WMReaderAdvanced_SetReceiveStreamSamples
,
595 WMReaderAdvanced_GetReceiveStreamSamples
,
596 WMReaderAdvanced_SetAllocateForOutput
,
597 WMReaderAdvanced_GetAllocateForOutput
,
598 WMReaderAdvanced_SetAllocateForStream
,
599 WMReaderAdvanced_GetAllocateForStream
,
600 WMReaderAdvanced_GetStatistics
,
601 WMReaderAdvanced_SetClientInfo
,
602 WMReaderAdvanced_GetMaxOutputSampleSize
,
603 WMReaderAdvanced_GetMaxStreamSampleSize
,
604 WMReaderAdvanced_NotifyLateDelivery
,
605 WMReaderAdvanced2_SetPlayMode
,
606 WMReaderAdvanced2_GetPlayMode
,
607 WMReaderAdvanced2_GetBufferProgress
,
608 WMReaderAdvanced2_GetDownloadProgress
,
609 WMReaderAdvanced2_GetSaveAsProgress
,
610 WMReaderAdvanced2_SaveFileAs
,
611 WMReaderAdvanced2_GetProtocolName
,
612 WMReaderAdvanced2_StartAtMarker
,
613 WMReaderAdvanced2_GetOutputSetting
,
614 WMReaderAdvanced2_SetOutputSetting
,
615 WMReaderAdvanced2_Preroll
,
616 WMReaderAdvanced2_SetLogClientID
,
617 WMReaderAdvanced2_GetLogClientID
,
618 WMReaderAdvanced2_StopBuffering
,
619 WMReaderAdvanced2_OpenStream
,
620 WMReaderAdvanced3_StopNetStreaming
,
621 WMReaderAdvanced3_StartAtPosition
,
622 WMReaderAdvanced4_GetLanguageCount
,
623 WMReaderAdvanced4_GetLanguage
,
624 WMReaderAdvanced4_GetMaxSpeedFactor
,
625 WMReaderAdvanced4_IsUsingFastCache
,
626 WMReaderAdvanced4_AddLogParam
,
627 WMReaderAdvanced4_SendLogParams
,
628 WMReaderAdvanced4_CanSaveFileAs
,
629 WMReaderAdvanced4_CancelSaveFileAs
,
630 WMReaderAdvanced4_GetURL
,
631 WMReaderAdvanced5_SetPlayerHook
,
632 WMReaderAdvanced6_SetProtectStreamSamples
635 static struct async_reader
*impl_from_IWMReaderAccelerator(IWMReaderAccelerator
*iface
)
637 return CONTAINING_RECORD(iface
, struct async_reader
, IWMReaderAccelerator_iface
);
640 static HRESULT WINAPI
reader_accl_QueryInterface(IWMReaderAccelerator
*iface
, REFIID riid
, void **object
)
642 struct async_reader
*This
= impl_from_IWMReaderAccelerator(iface
);
643 return IWMReader_QueryInterface(&This
->IWMReader_iface
, riid
, object
);
646 static ULONG WINAPI
reader_accl_AddRef(IWMReaderAccelerator
*iface
)
648 struct async_reader
*This
= impl_from_IWMReaderAccelerator(iface
);
649 return IWMReader_AddRef(&This
->IWMReader_iface
);
652 static ULONG WINAPI
reader_accl_Release(IWMReaderAccelerator
*iface
)
654 struct async_reader
*This
= impl_from_IWMReaderAccelerator(iface
);
655 return IWMReader_Release(&This
->IWMReader_iface
);
658 static HRESULT WINAPI
reader_accl_GetCodecInterface(IWMReaderAccelerator
*iface
, DWORD output
, REFIID riid
, void **codec
)
660 struct async_reader
*This
= impl_from_IWMReaderAccelerator(iface
);
662 FIXME("%p, %d, %s, %p\n", This
, output
, debugstr_guid(riid
), codec
);
667 static HRESULT WINAPI
reader_accl_Notify(IWMReaderAccelerator
*iface
, DWORD output
, WM_MEDIA_TYPE
*subtype
)
669 struct async_reader
*This
= impl_from_IWMReaderAccelerator(iface
);
671 FIXME("%p, %d, %p\n", This
, output
, subtype
);
676 static const IWMReaderAcceleratorVtbl WMReaderAcceleratorVtbl
= {
677 reader_accl_QueryInterface
,
680 reader_accl_GetCodecInterface
,
684 static struct async_reader
*impl_from_IWMReaderNetworkConfig2(IWMReaderNetworkConfig2
*iface
)
686 return CONTAINING_RECORD(iface
, struct async_reader
, IWMReaderNetworkConfig2_iface
);
689 static HRESULT WINAPI
networkconfig_QueryInterface(IWMReaderNetworkConfig2
*iface
, REFIID riid
, void **ppv
)
691 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
692 return IWMReader_QueryInterface(&This
->IWMReader_iface
, riid
, ppv
);
695 static ULONG WINAPI
networkconfig_AddRef(IWMReaderNetworkConfig2
*iface
)
697 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
698 return IWMReader_AddRef(&This
->IWMReader_iface
);
701 static ULONG WINAPI
networkconfig_Release(IWMReaderNetworkConfig2
*iface
)
703 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
704 return IWMReader_Release(&This
->IWMReader_iface
);
707 static HRESULT WINAPI
networkconfig_GetBufferingTime(IWMReaderNetworkConfig2
*iface
, QWORD
*buffering_time
)
709 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
710 FIXME("%p, %p\n", This
, buffering_time
);
714 static HRESULT WINAPI
networkconfig_SetBufferingTime(IWMReaderNetworkConfig2
*iface
, QWORD buffering_time
)
716 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
717 FIXME("%p, %s\n", This
, wine_dbgstr_longlong(buffering_time
));
721 static HRESULT WINAPI
networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2
*iface
, WM_PORT_NUMBER_RANGE
*array
,
724 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
725 FIXME("%p, %p, %p\n", This
, array
, ranges
);
729 static HRESULT WINAPI
networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2
*iface
, WM_PORT_NUMBER_RANGE
*array
,
732 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
733 FIXME("%p, %p, %u\n", This
, array
, ranges
);
737 static HRESULT WINAPI
networkconfig_GetProxySettings(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
738 WMT_PROXY_SETTINGS
*proxy
)
740 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
741 FIXME("%p, %s, %p\n", This
, debugstr_w(protocol
), proxy
);
745 static HRESULT WINAPI
networkconfig_SetProxySettings(IWMReaderNetworkConfig2
*iface
, LPCWSTR protocol
,
746 WMT_PROXY_SETTINGS proxy
)
748 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
749 FIXME("%p, %s, %d\n", This
, debugstr_w(protocol
), proxy
);
753 static HRESULT WINAPI
networkconfig_GetProxyHostName(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
754 WCHAR
*hostname
, DWORD
*size
)
756 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
757 FIXME("%p, %s, %p, %p\n", This
, debugstr_w(protocol
), hostname
, size
);
761 static HRESULT WINAPI
networkconfig_SetProxyHostName(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
762 const WCHAR
*hostname
)
764 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
765 FIXME("%p, %s, %s\n", This
, debugstr_w(protocol
), debugstr_w(hostname
));
769 static HRESULT WINAPI
networkconfig_GetProxyPort(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
772 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
773 FIXME("%p, %s, %p\n", This
, debugstr_w(protocol
), port
);
777 static HRESULT WINAPI
networkconfig_SetProxyPort(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
780 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
781 FIXME("%p, %s, %u\n", This
, debugstr_w(protocol
), port
);
785 static HRESULT WINAPI
networkconfig_GetProxyExceptionList(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
786 WCHAR
*exceptions
, DWORD
*count
)
788 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
789 FIXME("%p, %s, %p, %p\n", This
, debugstr_w(protocol
), exceptions
, count
);
793 static HRESULT WINAPI
networkconfig_SetProxyExceptionList(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
794 const WCHAR
*exceptions
)
796 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
797 FIXME("%p, %s, %s\n", This
, debugstr_w(protocol
), debugstr_w(exceptions
));
801 static HRESULT WINAPI
networkconfig_GetProxyBypassForLocal(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
804 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
805 FIXME("%p, %s, %p\n", This
, debugstr_w(protocol
), bypass
);
809 static HRESULT WINAPI
networkconfig_SetProxyBypassForLocal(IWMReaderNetworkConfig2
*iface
, const WCHAR
*protocol
,
812 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
813 FIXME("%p, %s, %d\n", This
, debugstr_w(protocol
), bypass
);
817 static HRESULT WINAPI
networkconfig_GetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2
*iface
,
820 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
821 FIXME("%p, %p\n", This
, detection
);
825 static HRESULT WINAPI
networkconfig_SetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2
*iface
,
828 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
829 FIXME("%p, %d\n", This
, detection
);
833 static HRESULT WINAPI
networkconfig_GetEnableMulticast(IWMReaderNetworkConfig2
*iface
, BOOL
*multicast
)
835 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
836 FIXME("%p, %p\n", This
, multicast
);
840 static HRESULT WINAPI
networkconfig_SetEnableMulticast(IWMReaderNetworkConfig2
*iface
, BOOL multicast
)
842 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
843 FIXME("%p, %d\n", This
, multicast
);
847 static HRESULT WINAPI
networkconfig_GetEnableHTTP(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
849 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
850 FIXME("%p, %p\n", This
, enable
);
854 static HRESULT WINAPI
networkconfig_SetEnableHTTP(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
856 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
857 FIXME("%p, %d\n", This
, enable
);
861 static HRESULT WINAPI
networkconfig_GetEnableUDP(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
863 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
864 FIXME("%p, %p\n", This
, enable
);
868 static HRESULT WINAPI
networkconfig_SetEnableUDP(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
870 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
871 FIXME("%p, %d\n", This
, enable
);
875 static HRESULT WINAPI
networkconfig_GetEnableTCP(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
877 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
878 FIXME("%p, %p\n", This
, enable
);
882 static HRESULT WINAPI
networkconfig_SetEnableTCP(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
884 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
885 FIXME("%p, %d\n", This
, enable
);
889 static HRESULT WINAPI
networkconfig_ResetProtocolRollover(IWMReaderNetworkConfig2
*iface
)
891 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
896 static HRESULT WINAPI
networkconfig_GetConnectionBandwidth(IWMReaderNetworkConfig2
*iface
, DWORD
*bandwidth
)
898 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
899 FIXME("%p, %p\n", This
, bandwidth
);
903 static HRESULT WINAPI
networkconfig_SetConnectionBandwidth(IWMReaderNetworkConfig2
*iface
, DWORD bandwidth
)
905 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
906 FIXME("%p, %u\n", This
, bandwidth
);
910 static HRESULT WINAPI
networkconfig_GetNumProtocolsSupported(IWMReaderNetworkConfig2
*iface
, DWORD
*protocols
)
912 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
913 FIXME("%p, %p\n", This
, protocols
);
917 static HRESULT WINAPI
networkconfig_GetSupportedProtocolName(IWMReaderNetworkConfig2
*iface
, DWORD protocol_num
,
918 WCHAR
*protocol
, DWORD
*size
)
920 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
921 FIXME("%p, %u, %p %p\n", This
, protocol_num
, protocol
, size
);
925 static HRESULT WINAPI
networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2
*iface
, const WCHAR
*url
)
927 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
928 FIXME("%p, %s\n", This
, debugstr_w(url
));
932 static HRESULT WINAPI
networkconfig_GetLoggingUrl(IWMReaderNetworkConfig2
*iface
, DWORD index
, WCHAR
*url
,
935 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
936 FIXME("%p, %u, %p, %p\n", This
, index
, url
, size
);
940 static HRESULT WINAPI
networkconfig_GetLoggingUrlCount(IWMReaderNetworkConfig2
*iface
, DWORD
*count
)
942 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
943 FIXME("%p, %p\n", This
, count
);
947 static HRESULT WINAPI
networkconfig_ResetLoggingUrlList(IWMReaderNetworkConfig2
*iface
)
949 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
954 static HRESULT WINAPI
networkconfig_GetEnableContentCaching(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
956 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
957 FIXME("%p, %p\n", This
, enable
);
961 static HRESULT WINAPI
networkconfig_SetEnableContentCaching(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
963 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
964 FIXME("%p, %d\n", This
, enable
);
968 static HRESULT WINAPI
networkconfig_GetEnableFastCache(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
970 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
971 FIXME("%p, %p\n", This
, enable
);
975 static HRESULT WINAPI
networkconfig_SetEnableFastCache(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
977 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
978 FIXME("%p, %d\n", This
, enable
);
982 static HRESULT WINAPI
networkconfig_GetAcceleratedStreamingDuration(IWMReaderNetworkConfig2
*iface
,
985 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
986 FIXME("%p, %p\n", This
, duration
);
990 static HRESULT WINAPI
networkconfig_SetAcceleratedStreamingDuration(IWMReaderNetworkConfig2
*iface
,
993 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
994 FIXME("%p, %s\n", This
, wine_dbgstr_longlong(duration
));
998 static HRESULT WINAPI
networkconfig_GetAutoReconnectLimit(IWMReaderNetworkConfig2
*iface
, DWORD
*limit
)
1000 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1001 FIXME("%p, %p\n", This
, limit
);
1005 static HRESULT WINAPI
networkconfig_SetAutoReconnectLimit(IWMReaderNetworkConfig2
*iface
, DWORD limit
)
1007 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1008 FIXME("%p, %u\n", This
, limit
);
1012 static HRESULT WINAPI
networkconfig_GetEnableResends(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
1014 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1015 FIXME("%p, %p\n", This
, enable
);
1019 static HRESULT WINAPI
networkconfig_SetEnableResends(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
1021 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1022 FIXME("%p, %u\n", This
, enable
);
1026 static HRESULT WINAPI
networkconfig_GetEnableThinning(IWMReaderNetworkConfig2
*iface
, BOOL
*enable
)
1028 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1029 FIXME("%p, %p\n", This
, enable
);
1033 static HRESULT WINAPI
networkconfig_SetEnableThinning(IWMReaderNetworkConfig2
*iface
, BOOL enable
)
1035 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1036 FIXME("%p, %u\n", This
, enable
);
1040 static HRESULT WINAPI
networkconfig_GetMaxNetPacketSize(IWMReaderNetworkConfig2
*iface
, DWORD
*packet_size
)
1042 struct async_reader
*This
= impl_from_IWMReaderNetworkConfig2(iface
);
1043 FIXME("%p, %p\n", This
, packet_size
);
1047 static const IWMReaderNetworkConfig2Vtbl WMReaderNetworkConfig2Vtbl
=
1049 networkconfig_QueryInterface
,
1050 networkconfig_AddRef
,
1051 networkconfig_Release
,
1052 networkconfig_GetBufferingTime
,
1053 networkconfig_SetBufferingTime
,
1054 networkconfig_GetUDPPortRanges
,
1055 networkconfig_SetUDPPortRanges
,
1056 networkconfig_GetProxySettings
,
1057 networkconfig_SetProxySettings
,
1058 networkconfig_GetProxyHostName
,
1059 networkconfig_SetProxyHostName
,
1060 networkconfig_GetProxyPort
,
1061 networkconfig_SetProxyPort
,
1062 networkconfig_GetProxyExceptionList
,
1063 networkconfig_SetProxyExceptionList
,
1064 networkconfig_GetProxyBypassForLocal
,
1065 networkconfig_SetProxyBypassForLocal
,
1066 networkconfig_GetForceRerunAutoProxyDetection
,
1067 networkconfig_SetForceRerunAutoProxyDetection
,
1068 networkconfig_GetEnableMulticast
,
1069 networkconfig_SetEnableMulticast
,
1070 networkconfig_GetEnableHTTP
,
1071 networkconfig_SetEnableHTTP
,
1072 networkconfig_GetEnableUDP
,
1073 networkconfig_SetEnableUDP
,
1074 networkconfig_GetEnableTCP
,
1075 networkconfig_SetEnableTCP
,
1076 networkconfig_ResetProtocolRollover
,
1077 networkconfig_GetConnectionBandwidth
,
1078 networkconfig_SetConnectionBandwidth
,
1079 networkconfig_GetNumProtocolsSupported
,
1080 networkconfig_GetSupportedProtocolName
,
1081 networkconfig_AddLoggingUrl
,
1082 networkconfig_GetLoggingUrl
,
1083 networkconfig_GetLoggingUrlCount
,
1084 networkconfig_ResetLoggingUrlList
,
1085 networkconfig_GetEnableContentCaching
,
1086 networkconfig_SetEnableContentCaching
,
1087 networkconfig_GetEnableFastCache
,
1088 networkconfig_SetEnableFastCache
,
1089 networkconfig_GetAcceleratedStreamingDuration
,
1090 networkconfig_SetAcceleratedStreamingDuration
,
1091 networkconfig_GetAutoReconnectLimit
,
1092 networkconfig_SetAutoReconnectLimit
,
1093 networkconfig_GetEnableResends
,
1094 networkconfig_SetEnableResends
,
1095 networkconfig_GetEnableThinning
,
1096 networkconfig_SetEnableThinning
,
1097 networkconfig_GetMaxNetPacketSize
1100 static struct async_reader
*impl_from_IWMReaderStreamClock(IWMReaderStreamClock
*iface
)
1102 return CONTAINING_RECORD(iface
, struct async_reader
, IWMReaderStreamClock_iface
);
1105 static HRESULT WINAPI
readclock_QueryInterface(IWMReaderStreamClock
*iface
, REFIID riid
, void **ppv
)
1107 struct async_reader
*This
= impl_from_IWMReaderStreamClock(iface
);
1108 return IWMReader_QueryInterface(&This
->IWMReader_iface
, riid
, ppv
);
1111 static ULONG WINAPI
readclock_AddRef(IWMReaderStreamClock
*iface
)
1113 struct async_reader
*This
= impl_from_IWMReaderStreamClock(iface
);
1114 return IWMReader_AddRef(&This
->IWMReader_iface
);
1117 static ULONG WINAPI
readclock_Release(IWMReaderStreamClock
*iface
)
1119 struct async_reader
*This
= impl_from_IWMReaderStreamClock(iface
);
1120 return IWMReader_Release(&This
->IWMReader_iface
);
1123 static HRESULT WINAPI
readclock_GetTime(IWMReaderStreamClock
*iface
, QWORD
*now
)
1125 struct async_reader
*This
= impl_from_IWMReaderStreamClock(iface
);
1126 FIXME("%p, %p\n", This
, now
);
1130 static HRESULT WINAPI
readclock_SetTimer(IWMReaderStreamClock
*iface
, QWORD when
, void *param
, DWORD
*id
)
1132 struct async_reader
*This
= impl_from_IWMReaderStreamClock(iface
);
1133 FIXME("%p, %s, %p, %p\n", This
, wine_dbgstr_longlong(when
), param
, id
);
1137 static HRESULT WINAPI
readclock_KillTimer(IWMReaderStreamClock
*iface
, DWORD id
)
1139 struct async_reader
*This
= impl_from_IWMReaderStreamClock(iface
);
1140 FIXME("%p, %d\n", This
, id
);
1144 static const IWMReaderStreamClockVtbl WMReaderStreamClockVtbl
=
1146 readclock_QueryInterface
,
1154 static struct async_reader
*impl_from_IWMReaderTypeNegotiation(IWMReaderTypeNegotiation
*iface
)
1156 return CONTAINING_RECORD(iface
, struct async_reader
, IWMReaderTypeNegotiation_iface
);
1159 static HRESULT WINAPI
negotiation_QueryInterface(IWMReaderTypeNegotiation
*iface
, REFIID riid
, void **ppv
)
1161 struct async_reader
*This
= impl_from_IWMReaderTypeNegotiation(iface
);
1162 return IWMReader_QueryInterface(&This
->IWMReader_iface
, riid
, ppv
);
1165 static ULONG WINAPI
negotiation_AddRef(IWMReaderTypeNegotiation
*iface
)
1167 struct async_reader
*This
= impl_from_IWMReaderTypeNegotiation(iface
);
1168 return IWMReader_AddRef(&This
->IWMReader_iface
);
1171 static ULONG WINAPI
negotiation_Release(IWMReaderTypeNegotiation
*iface
)
1173 struct async_reader
*This
= impl_from_IWMReaderTypeNegotiation(iface
);
1174 return IWMReader_Release(&This
->IWMReader_iface
);
1177 static HRESULT WINAPI
negotiation_TryOutputProps(IWMReaderTypeNegotiation
*iface
, DWORD output
, IWMOutputMediaProps
*props
)
1179 struct async_reader
*This
= impl_from_IWMReaderTypeNegotiation(iface
);
1180 FIXME("%p, %d, %p\n", This
, output
, props
);
1184 static const IWMReaderTypeNegotiationVtbl WMReaderTypeNegotiationVtbl
=
1186 negotiation_QueryInterface
,
1188 negotiation_Release
,
1189 negotiation_TryOutputProps
1192 static struct async_reader
*impl_from_IReferenceClock(IReferenceClock
*iface
)
1194 return CONTAINING_RECORD(iface
, struct async_reader
, IReferenceClock_iface
);
1197 static HRESULT WINAPI
refclock_QueryInterface(IReferenceClock
*iface
, REFIID riid
, void **ppv
)
1199 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1200 return IWMReader_QueryInterface(&This
->IWMReader_iface
, riid
, ppv
);
1203 static ULONG WINAPI
refclock_AddRef(IReferenceClock
*iface
)
1205 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1206 return IWMReader_AddRef(&This
->IWMReader_iface
);
1209 static ULONG WINAPI
refclock_Release(IReferenceClock
*iface
)
1211 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1212 return IWMReader_Release(&This
->IWMReader_iface
);
1215 static HRESULT WINAPI
refclock_GetTime(IReferenceClock
*iface
, REFERENCE_TIME
*time
)
1217 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1218 FIXME("%p, %p\n", This
, time
);
1222 static HRESULT WINAPI
refclock_AdviseTime(IReferenceClock
*iface
, REFERENCE_TIME basetime
,
1223 REFERENCE_TIME streamtime
, HEVENT event
, DWORD_PTR
*cookie
)
1225 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1226 FIXME("%p, %s, %s, %lu, %p\n", This
, wine_dbgstr_longlong(basetime
),
1227 wine_dbgstr_longlong(streamtime
), event
, cookie
);
1231 static HRESULT WINAPI
refclock_AdvisePeriodic(IReferenceClock
*iface
, REFERENCE_TIME starttime
,
1232 REFERENCE_TIME period
, HSEMAPHORE semaphore
, DWORD_PTR
*cookie
)
1234 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1235 FIXME("%p, %s, %s, %lu, %p\n", This
, wine_dbgstr_longlong(starttime
),
1236 wine_dbgstr_longlong(period
), semaphore
, cookie
);
1240 static HRESULT WINAPI
refclock_Unadvise(IReferenceClock
*iface
, DWORD_PTR cookie
)
1242 struct async_reader
*This
= impl_from_IReferenceClock(iface
);
1243 FIXME("%p, %lu\n", This
, cookie
);
1247 static const IReferenceClockVtbl ReferenceClockVtbl
=
1249 refclock_QueryInterface
,
1253 refclock_AdviseTime
,
1254 refclock_AdvisePeriodic
,
1258 static struct async_reader
*impl_from_wm_reader(struct wm_reader
*iface
)
1260 return CONTAINING_RECORD(iface
, struct async_reader
, reader
);
1263 static void *async_reader_query_interface(struct wm_reader
*iface
, REFIID iid
)
1265 struct async_reader
*reader
= impl_from_wm_reader(iface
);
1267 TRACE("reader %p, iid %s.\n", reader
, debugstr_guid(iid
));
1269 if (IsEqualIID(iid
, &IID_IReferenceClock
))
1270 return &reader
->IReferenceClock_iface
;
1272 if (IsEqualIID(iid
, &IID_IWMReader
))
1273 return &reader
->IWMReader_iface
;
1275 if (IsEqualIID(iid
, &IID_IWMReaderAccelerator
))
1276 return &reader
->IWMReaderAccelerator_iface
;
1278 if (IsEqualIID(iid
, &IID_IWMReaderAdvanced
)
1279 || IsEqualIID(iid
, &IID_IWMReaderAdvanced2
)
1280 || IsEqualIID(iid
, &IID_IWMReaderAdvanced3
)
1281 || IsEqualIID(iid
, &IID_IWMReaderAdvanced4
)
1282 || IsEqualIID(iid
, &IID_IWMReaderAdvanced5
)
1283 || IsEqualIID(iid
, &IID_IWMReaderAdvanced6
))
1284 return &reader
->IWMReaderAdvanced6_iface
;
1286 if (IsEqualIID(iid
, &IID_IWMReaderNetworkConfig
)
1287 || IsEqualIID(iid
, &IID_IWMReaderNetworkConfig2
))
1288 return &reader
->IWMReaderNetworkConfig2_iface
;
1290 if (IsEqualIID(iid
, &IID_IWMReaderStreamClock
))
1291 return &reader
->IWMReaderStreamClock_iface
;
1293 if (IsEqualIID(iid
, &IID_IWMReaderTypeNegotiation
))
1294 return &reader
->IWMReaderTypeNegotiation_iface
;
1299 static void async_reader_destroy(struct wm_reader
*iface
)
1301 struct async_reader
*reader
= impl_from_wm_reader(iface
);
1303 TRACE("reader %p.\n", reader
);
1305 wm_reader_close(&reader
->reader
);
1307 if (reader
->callback
)
1308 IWMReaderCallback_Release(reader
->callback
);
1310 wm_reader_cleanup(&reader
->reader
);
1314 static const struct wm_reader_ops async_reader_ops
=
1316 .query_interface
= async_reader_query_interface
,
1317 .destroy
= async_reader_destroy
,
1320 HRESULT WINAPI
winegstreamer_create_wm_async_reader(IWMReader
**reader
)
1322 struct async_reader
*object
;
1324 TRACE("reader %p.\n", reader
);
1326 if (!(object
= calloc(1, sizeof(*object
))))
1327 return E_OUTOFMEMORY
;
1329 wm_reader_init(&object
->reader
, &async_reader_ops
);
1331 object
->IReferenceClock_iface
.lpVtbl
= &ReferenceClockVtbl
;
1332 object
->IWMReader_iface
.lpVtbl
= &WMReaderVtbl
;
1333 object
->IWMReaderAdvanced6_iface
.lpVtbl
= &WMReaderAdvanced6Vtbl
;
1334 object
->IWMReaderAccelerator_iface
.lpVtbl
= &WMReaderAcceleratorVtbl
;
1335 object
->IWMReaderNetworkConfig2_iface
.lpVtbl
= &WMReaderNetworkConfig2Vtbl
;
1336 object
->IWMReaderStreamClock_iface
.lpVtbl
= &WMReaderStreamClockVtbl
;
1337 object
->IWMReaderTypeNegotiation_iface
.lpVtbl
= &WMReaderTypeNegotiationVtbl
;
1339 TRACE("Created async reader %p.\n", object
);
1340 *reader
= (IWMReader
*)&object
->IWMReader_iface
;