2019-03-02 11:29:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Austin English
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2021-10-07 15:47:09 +00:00
|
|
|
#include "gst_private.h"
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2022-08-03 08:18:06 +00:00
|
|
|
#include "wine/list.h"
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
|
|
|
|
|
2022-08-26 17:07:22 +00:00
|
|
|
union async_op_data
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2022-09-09 05:55:36 +00:00
|
|
|
QWORD start;
|
|
|
|
QWORD duration;
|
2022-08-26 17:07:22 +00:00
|
|
|
void *context;
|
|
|
|
} start;
|
|
|
|
};
|
|
|
|
|
2022-08-03 08:18:06 +00:00
|
|
|
struct async_op
|
|
|
|
{
|
|
|
|
enum async_op_type
|
|
|
|
{
|
|
|
|
ASYNC_OP_START,
|
|
|
|
ASYNC_OP_STOP,
|
|
|
|
ASYNC_OP_CLOSE,
|
|
|
|
} type;
|
2022-08-26 17:07:22 +00:00
|
|
|
union async_op_data u;
|
2022-08-03 08:18:06 +00:00
|
|
|
struct list entry;
|
|
|
|
};
|
|
|
|
|
2022-09-09 06:20:42 +00:00
|
|
|
struct sample
|
|
|
|
{
|
|
|
|
INSSBuffer *buffer;
|
|
|
|
QWORD pts, duration;
|
|
|
|
DWORD flags;
|
|
|
|
WORD stream;
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader
|
|
|
|
{
|
2019-03-02 11:29:54 +00:00
|
|
|
IWMReader IWMReader_iface;
|
|
|
|
IWMReaderAdvanced6 IWMReaderAdvanced6_iface;
|
|
|
|
IWMReaderAccelerator IWMReaderAccelerator_iface;
|
|
|
|
IWMReaderNetworkConfig2 IWMReaderNetworkConfig2_iface;
|
|
|
|
IWMReaderStreamClock IWMReaderStreamClock_iface;
|
|
|
|
IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface;
|
|
|
|
IReferenceClock IReferenceClock_iface;
|
2022-09-16 05:57:08 +00:00
|
|
|
IUnknown *reader_inner;
|
2022-09-16 05:56:20 +00:00
|
|
|
LONG refcount;
|
2021-11-03 04:51:46 +00:00
|
|
|
|
2022-08-22 11:42:16 +00:00
|
|
|
IWMSyncReader2 *reader;
|
2022-09-16 05:57:08 +00:00
|
|
|
struct wm_reader *wm_reader;
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
CRITICAL_SECTION cs;
|
|
|
|
|
2022-08-22 11:59:06 +00:00
|
|
|
IWMReaderCallbackAdvanced *callback_advanced;
|
2021-11-03 04:51:46 +00:00
|
|
|
IWMReaderCallback *callback;
|
|
|
|
void *context;
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2022-09-08 23:04:59 +00:00
|
|
|
REFERENCE_TIME clock_start;
|
2021-11-04 20:46:27 +00:00
|
|
|
LARGE_INTEGER clock_frequency;
|
2022-08-20 15:20:14 +00:00
|
|
|
|
|
|
|
HANDLE callback_thread;
|
|
|
|
CRITICAL_SECTION callback_cs;
|
|
|
|
CONDITION_VARIABLE callback_cv;
|
2021-11-04 20:46:27 +00:00
|
|
|
|
|
|
|
bool running;
|
2022-08-03 08:18:06 +00:00
|
|
|
struct list async_ops;
|
2021-11-04 20:46:28 +00:00
|
|
|
|
|
|
|
bool user_clock;
|
|
|
|
QWORD user_time;
|
2021-10-07 15:47:10 +00:00
|
|
|
};
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2021-11-04 20:46:27 +00:00
|
|
|
static REFERENCE_TIME get_current_time(const struct async_reader *reader)
|
|
|
|
{
|
|
|
|
LARGE_INTEGER time;
|
|
|
|
|
|
|
|
QueryPerformanceCounter(&time);
|
|
|
|
return (time.QuadPart * 1000) / reader->clock_frequency.QuadPart * 10000;
|
|
|
|
}
|
|
|
|
|
2022-09-08 22:37:55 +00:00
|
|
|
static DWORD async_reader_get_wait_timeout(struct async_reader *reader, QWORD pts)
|
|
|
|
{
|
|
|
|
REFERENCE_TIME current_time = reader->user_time;
|
|
|
|
DWORD timeout = INFINITE;
|
|
|
|
|
|
|
|
if (!reader->user_clock)
|
|
|
|
{
|
|
|
|
current_time = get_current_time(reader) - reader->clock_start;
|
|
|
|
timeout = (pts - current_time) / 10000;
|
|
|
|
}
|
|
|
|
|
|
|
|
return pts > current_time ? timeout : 0;
|
|
|
|
}
|
|
|
|
|
2022-09-09 06:19:10 +00:00
|
|
|
static bool async_reader_wait_pts(struct async_reader *reader, QWORD pts)
|
|
|
|
{
|
|
|
|
IWMReaderCallbackAdvanced *callback_advanced = reader->callback_advanced;
|
|
|
|
DWORD timeout;
|
|
|
|
|
|
|
|
TRACE("reader %p, pts %I64d.\n", reader, pts);
|
|
|
|
|
|
|
|
if (reader->user_clock && pts > reader->user_time && callback_advanced)
|
|
|
|
{
|
|
|
|
QWORD user_time = reader->user_time;
|
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
|
|
|
IWMReaderCallbackAdvanced_OnTime(callback_advanced, user_time, reader->context);
|
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
|
|
|
}
|
|
|
|
|
|
|
|
while (reader->running && list_empty(&reader->async_ops))
|
|
|
|
{
|
|
|
|
if (!(timeout = async_reader_get_wait_timeout(reader, pts)))
|
|
|
|
return true;
|
|
|
|
SleepConditionVariableCS(&reader->callback_cv, &reader->callback_cs, timeout);
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-09 06:20:42 +00:00
|
|
|
static void async_reader_deliver_sample(struct async_reader *reader, struct sample *sample)
|
|
|
|
{
|
|
|
|
IWMReaderCallbackAdvanced *callback_advanced = reader->callback_advanced;
|
|
|
|
IWMReaderCallback *callback = reader->callback;
|
|
|
|
BOOL read_compressed;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("reader %p, stream %u, pts %s, duration %s, flags %#lx, buffer %p.\n",
|
|
|
|
reader, sample->stream, debugstr_time(sample->pts), debugstr_time(sample->duration),
|
|
|
|
sample->flags, sample->buffer);
|
|
|
|
|
2022-08-22 16:47:47 +00:00
|
|
|
if (FAILED(hr = IWMSyncReader2_GetReadStreamSamples(reader->reader, sample->stream,
|
|
|
|
&read_compressed)))
|
|
|
|
read_compressed = FALSE;
|
2022-09-09 06:20:42 +00:00
|
|
|
|
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
|
|
|
if (read_compressed)
|
|
|
|
hr = IWMReaderCallbackAdvanced_OnStreamSample(callback_advanced, sample->stream,
|
|
|
|
sample->pts, sample->duration, sample->flags, sample->buffer, reader->context);
|
|
|
|
else
|
|
|
|
hr = IWMReaderCallback_OnSample(callback, sample->stream - 1, sample->pts, sample->duration,
|
|
|
|
sample->flags, sample->buffer, reader->context);
|
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
|
|
|
|
|
|
|
TRACE("Callback returned %#lx.\n", hr);
|
|
|
|
|
|
|
|
INSSBuffer_Release(sample->buffer);
|
|
|
|
}
|
|
|
|
|
2022-08-22 11:59:06 +00:00
|
|
|
static void callback_thread_run(struct async_reader *reader)
|
2021-11-04 20:46:27 +00:00
|
|
|
{
|
2022-08-22 11:59:06 +00:00
|
|
|
IWMReaderCallbackAdvanced *callback_advanced = reader->callback_advanced;
|
2021-11-04 20:46:27 +00:00
|
|
|
IWMReaderCallback *callback = reader->callback;
|
|
|
|
static const DWORD zero;
|
2022-06-10 15:31:15 +00:00
|
|
|
HRESULT hr = S_OK;
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2022-08-03 08:18:06 +00:00
|
|
|
while (reader->running && list_empty(&reader->async_ops))
|
2021-11-04 20:46:27 +00:00
|
|
|
{
|
2022-09-09 06:20:42 +00:00
|
|
|
struct sample sample;
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-09-16 05:57:08 +00:00
|
|
|
hr = wm_reader_get_stream_sample(reader->wm_reader, callback_advanced, 0, &sample.buffer,
|
2022-09-09 06:20:42 +00:00
|
|
|
&sample.pts, &sample.duration, &sample.flags, &sample.stream);
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-06-10 15:31:15 +00:00
|
|
|
if (hr != S_OK)
|
|
|
|
break;
|
|
|
|
|
2022-09-09 06:20:42 +00:00
|
|
|
if (async_reader_wait_pts(reader, sample.pts))
|
|
|
|
async_reader_deliver_sample(reader, &sample);
|
|
|
|
else
|
|
|
|
INSSBuffer_Release(sample.buffer);
|
2022-06-10 15:31:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (hr == NS_E_NO_MORE_SAMPLES)
|
|
|
|
{
|
2022-08-03 08:18:06 +00:00
|
|
|
BOOL user_clock = reader->user_clock;
|
|
|
|
QWORD user_time = reader->user_time;
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
2022-06-10 15:31:15 +00:00
|
|
|
IWMReaderCallback_OnStatus(callback, WMT_END_OF_STREAMING, S_OK,
|
|
|
|
WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
|
|
|
|
IWMReaderCallback_OnStatus(callback, WMT_EOF, S_OK,
|
|
|
|
WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
|
|
|
|
|
2022-08-03 08:18:06 +00:00
|
|
|
if (user_clock && callback_advanced)
|
2022-03-10 00:56:15 +00:00
|
|
|
{
|
2022-06-10 15:31:15 +00:00
|
|
|
/* We can only get here if user_time is greater than the PTS
|
|
|
|
* of all samples, in which case we cannot have sent this
|
|
|
|
* notification already. */
|
2022-07-06 16:35:58 +00:00
|
|
|
IWMReaderCallbackAdvanced_OnTime(callback_advanced,
|
2022-08-03 08:18:06 +00:00
|
|
|
user_time, reader->context);
|
2022-03-10 00:56:15 +00:00
|
|
|
}
|
2022-06-10 15:31:15 +00:00
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
2022-06-10 15:31:15 +00:00
|
|
|
TRACE("Reached end of stream; exiting.\n");
|
|
|
|
}
|
|
|
|
else if (hr != S_OK)
|
|
|
|
{
|
|
|
|
ERR("Failed to get sample, hr %#lx.\n", hr);
|
2021-11-04 20:46:27 +00:00
|
|
|
}
|
2022-08-03 08:18:06 +00:00
|
|
|
}
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
static DWORD WINAPI async_reader_callback_thread(void *arg)
|
2022-08-03 08:18:06 +00:00
|
|
|
{
|
|
|
|
struct async_reader *reader = arg;
|
|
|
|
static const DWORD zero;
|
|
|
|
struct list *entry;
|
|
|
|
HRESULT hr = S_OK;
|
|
|
|
|
|
|
|
IWMReaderCallback_OnStatus(reader->callback, WMT_OPENED, S_OK,
|
|
|
|
WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
|
|
|
while (reader->running)
|
|
|
|
{
|
|
|
|
if ((entry = list_head(&reader->async_ops)))
|
|
|
|
{
|
|
|
|
struct async_op *op = LIST_ENTRY(entry, struct async_op, entry);
|
|
|
|
list_remove(&op->entry);
|
|
|
|
|
|
|
|
hr = list_empty(&reader->async_ops) ? S_OK : E_ABORT;
|
|
|
|
switch (op->type)
|
|
|
|
{
|
|
|
|
case ASYNC_OP_START:
|
|
|
|
{
|
2022-09-08 23:02:45 +00:00
|
|
|
reader->context = op->u.start.context;
|
2022-09-09 05:55:36 +00:00
|
|
|
if (SUCCEEDED(hr))
|
2022-09-08 23:09:36 +00:00
|
|
|
hr = IWMSyncReader2_SetRange(reader->reader, op->u.start.start, op->u.start.duration);
|
|
|
|
if (SUCCEEDED(hr))
|
2022-09-08 23:04:59 +00:00
|
|
|
reader->clock_start = get_current_time(reader);
|
2022-09-09 05:55:36 +00:00
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
IWMReaderCallback_OnStatus(reader->callback, WMT_STARTED, hr,
|
|
|
|
WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
|
|
|
if (SUCCEEDED(hr))
|
2022-08-22 11:59:06 +00:00
|
|
|
callback_thread_run(reader);
|
2022-08-03 08:18:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case ASYNC_OP_STOP:
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
IWMReaderCallback_OnStatus(reader->callback, WMT_STOPPED, hr,
|
|
|
|
WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ASYNC_OP_CLOSE:
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
IWMReaderCallback_OnStatus(reader->callback, WMT_CLOSED, hr,
|
|
|
|
WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
reader->running = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(op);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (reader->running && list_empty(&reader->async_ops))
|
2022-08-20 15:20:14 +00:00
|
|
|
SleepConditionVariableCS(&reader->callback_cv, &reader->callback_cs, INFINITE);
|
2022-08-03 08:18:06 +00:00
|
|
|
}
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
2021-11-04 20:46:27 +00:00
|
|
|
TRACE("Reader is stopping; exiting.\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-08-22 17:19:38 +00:00
|
|
|
static void async_reader_close(struct async_reader *reader)
|
2022-08-03 08:18:06 +00:00
|
|
|
{
|
2022-08-20 20:15:33 +00:00
|
|
|
struct async_op *op, *next;
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
if (reader->callback_thread)
|
2022-08-03 08:18:06 +00:00
|
|
|
{
|
2022-08-20 15:20:14 +00:00
|
|
|
WaitForSingleObject(reader->callback_thread, INFINITE);
|
|
|
|
CloseHandle(reader->callback_thread);
|
|
|
|
reader->callback_thread = NULL;
|
2021-11-04 20:46:27 +00:00
|
|
|
}
|
2022-08-20 20:15:33 +00:00
|
|
|
|
|
|
|
LIST_FOR_EACH_ENTRY_SAFE(op, next, &reader->async_ops, struct async_op, entry)
|
|
|
|
{
|
|
|
|
list_remove(&op->entry);
|
|
|
|
free(op);
|
|
|
|
}
|
2022-08-22 17:21:01 +00:00
|
|
|
|
2022-08-22 11:59:06 +00:00
|
|
|
if (reader->callback_advanced)
|
|
|
|
IWMReaderCallbackAdvanced_Release(reader->callback_advanced);
|
|
|
|
reader->callback_advanced = NULL;
|
|
|
|
|
2022-08-22 17:21:01 +00:00
|
|
|
if (reader->callback)
|
|
|
|
IWMReaderCallback_Release(reader->callback);
|
|
|
|
reader->callback = NULL;
|
|
|
|
reader->context = NULL;
|
2021-11-04 20:46:27 +00:00
|
|
|
}
|
|
|
|
|
2022-08-22 17:19:38 +00:00
|
|
|
static HRESULT async_reader_open(struct async_reader *reader, IWMReaderCallback *callback, void *context)
|
|
|
|
{
|
2022-08-22 17:21:01 +00:00
|
|
|
HRESULT hr = E_OUTOFMEMORY;
|
|
|
|
|
2022-08-22 17:19:38 +00:00
|
|
|
IWMReaderCallback_AddRef((reader->callback = callback));
|
|
|
|
reader->context = context;
|
|
|
|
|
2022-08-22 11:59:06 +00:00
|
|
|
if (FAILED(hr = IWMReaderCallback_QueryInterface(callback, &IID_IWMReaderCallbackAdvanced,
|
|
|
|
(void **)&reader->callback_advanced)))
|
|
|
|
{
|
|
|
|
WARN("Failed to retrieve IWMReaderCallbackAdvanced interface, hr %#lx\n", hr);
|
|
|
|
reader->callback_advanced = NULL;
|
|
|
|
}
|
|
|
|
|
2022-08-22 17:19:38 +00:00
|
|
|
reader->running = true;
|
|
|
|
if (!(reader->callback_thread = CreateThread(NULL, 0, async_reader_callback_thread, reader, 0, NULL)))
|
2022-08-22 17:21:01 +00:00
|
|
|
goto error;
|
2022-08-22 17:19:38 +00:00
|
|
|
|
|
|
|
return S_OK;
|
2022-08-22 17:21:01 +00:00
|
|
|
|
|
|
|
error:
|
|
|
|
async_reader_close(reader);
|
|
|
|
return hr;
|
2022-08-22 17:19:38 +00:00
|
|
|
}
|
|
|
|
|
2022-08-26 17:07:22 +00:00
|
|
|
static HRESULT async_reader_queue_op(struct async_reader *reader, enum async_op_type type, union async_op_data *data)
|
2022-08-03 08:18:06 +00:00
|
|
|
{
|
|
|
|
struct async_op *op;
|
|
|
|
|
|
|
|
if (!(op = calloc(1, sizeof(*op))))
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
op->type = type;
|
2022-08-26 17:07:22 +00:00
|
|
|
if (data)
|
|
|
|
op->u = *data;
|
2022-08-03 08:18:06 +00:00
|
|
|
|
2022-08-26 08:53:02 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
list_add_tail(&reader->async_ops, &op->entry);
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
|
|
|
WakeConditionVariable(&reader->callback_cv);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IWMReader(IWMReader *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-10-20 16:09:45 +00:00
|
|
|
static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-20 16:09:45 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
TRACE("reader %p, iid %s, out %p.\n", reader, debugstr_guid(iid), out);
|
|
|
|
|
|
|
|
if (IsEqualIID(iid, &IID_IUnknown)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReader))
|
|
|
|
*out = &reader->IWMReader_iface;
|
|
|
|
else if (IsEqualIID(iid, &IID_IWMReaderAccelerator))
|
|
|
|
*out = &reader->IWMReaderAccelerator_iface;
|
|
|
|
else if (IsEqualIID(iid, &IID_IWMReaderAdvanced)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderAdvanced2)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderAdvanced3)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderAdvanced4)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderAdvanced5)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderAdvanced6))
|
|
|
|
*out = &reader->IWMReaderAdvanced6_iface;
|
|
|
|
else if (IsEqualIID(iid, &IID_IWMReaderNetworkConfig)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderNetworkConfig2))
|
|
|
|
*out = &reader->IWMReaderNetworkConfig2_iface;
|
|
|
|
else if (IsEqualIID(iid, &IID_IWMReaderStreamClock))
|
|
|
|
*out = &reader->IWMReaderStreamClock_iface;
|
|
|
|
else if (IsEqualIID(iid, &IID_IWMReaderTypeNegotiation))
|
|
|
|
*out = &reader->IWMReaderTypeNegotiation_iface;
|
|
|
|
else if (IsEqualIID(iid, &IID_IWMHeaderInfo)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMHeaderInfo2)
|
2022-09-16 05:57:08 +00:00
|
|
|
|| IsEqualIID(iid, &IID_IWMHeaderInfo3)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMLanguageList)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMPacketSize)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMPacketSize2)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMProfile)
|
2022-09-16 05:56:20 +00:00
|
|
|
|| IsEqualIID(iid, &IID_IWMProfile2)
|
2022-09-16 05:57:08 +00:00
|
|
|
|| IsEqualIID(iid, &IID_IWMProfile3)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderPlaylistBurn)
|
|
|
|
|| IsEqualIID(iid, &IID_IWMReaderTimecode))
|
|
|
|
return IUnknown_QueryInterface(reader->reader_inner, iid, out);
|
2022-09-16 05:56:20 +00:00
|
|
|
else if (IsEqualIID(iid, &IID_IReferenceClock))
|
|
|
|
*out = &reader->IReferenceClock_iface;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown *)*out);
|
|
|
|
return S_OK;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI WMReader_AddRef(IWMReader *iface)
|
|
|
|
{
|
2021-10-20 16:09:45 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
2022-09-16 05:56:20 +00:00
|
|
|
ULONG refcount = InterlockedIncrement(&reader->refcount);
|
|
|
|
TRACE("%p increasing refcount to %lu.\n", reader, refcount);
|
|
|
|
return refcount;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI WMReader_Release(IWMReader *iface)
|
|
|
|
{
|
2021-10-20 16:09:45 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
2022-09-16 05:56:20 +00:00
|
|
|
ULONG refcount = InterlockedDecrement(&reader->refcount);
|
|
|
|
|
|
|
|
TRACE("%p decreasing refcount to %lu.\n", reader, refcount);
|
|
|
|
|
|
|
|
if (!refcount)
|
|
|
|
{
|
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
|
|
|
reader->running = false;
|
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
|
|
|
WakeConditionVariable(&reader->callback_cv);
|
|
|
|
|
|
|
|
async_reader_close(reader);
|
|
|
|
|
|
|
|
reader->callback_cs.DebugInfo->Spare[0] = 0;
|
|
|
|
DeleteCriticalSection(&reader->callback_cs);
|
|
|
|
reader->cs.DebugInfo->Spare[0] = 0;
|
|
|
|
DeleteCriticalSection(&reader->cs);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2022-09-16 05:58:11 +00:00
|
|
|
IWMSyncReader2_Close(reader->reader);
|
2022-09-16 05:56:20 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
IUnknown_Release(reader->reader_inner);
|
2022-09-16 05:56:20 +00:00
|
|
|
free(reader);
|
|
|
|
}
|
|
|
|
|
|
|
|
return refcount;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-08 21:24:32 +00:00
|
|
|
static HRESULT WINAPI WMReader_Open(IWMReader *iface, const WCHAR *url,
|
|
|
|
IWMReaderCallback *callback, void *context)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-08 21:24:32 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("reader %p, url %s, callback %p, context %p.\n",
|
|
|
|
reader, debugstr_w(url), callback, context);
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
EnterCriticalSection(&reader->cs);
|
2022-06-10 15:27:02 +00:00
|
|
|
|
2022-09-16 05:59:22 +00:00
|
|
|
if (SUCCEEDED(hr = IWMSyncReader2_Open(reader->reader, url))
|
2022-08-22 17:19:38 +00:00
|
|
|
&& FAILED(hr = async_reader_open(reader, callback, context)))
|
2022-09-16 05:58:11 +00:00
|
|
|
IWMSyncReader2_Close(reader->reader);
|
2021-11-08 21:24:32 +00:00
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
LeaveCriticalSection(&reader->cs);
|
2021-11-08 21:24:32 +00:00
|
|
|
return hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReader_Close(IWMReader *iface)
|
|
|
|
{
|
2021-11-03 04:51:46 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("reader %p.\n", reader);
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
EnterCriticalSection(&reader->cs);
|
2021-11-03 04:51:46 +00:00
|
|
|
|
2022-08-26 08:21:23 +00:00
|
|
|
if (SUCCEEDED(hr = async_reader_queue_op(reader, ASYNC_OP_CLOSE, NULL)))
|
|
|
|
{
|
|
|
|
async_reader_close(reader);
|
2022-09-16 05:58:11 +00:00
|
|
|
hr = IWMSyncReader2_Close(reader->reader);
|
2022-08-26 08:21:23 +00:00
|
|
|
}
|
2021-11-03 04:51:46 +00:00
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
LeaveCriticalSection(&reader->cs);
|
2021-11-03 04:51:46 +00:00
|
|
|
|
|
|
|
return hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-03 04:51:47 +00:00
|
|
|
static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *count)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-03 04:51:47 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
2019-10-19 09:50:01 +00:00
|
|
|
|
2021-11-03 04:51:47 +00:00
|
|
|
TRACE("reader %p, count %p.\n", reader, count);
|
2019-10-19 09:50:01 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
EnterCriticalSection(&reader->wm_reader->cs);
|
|
|
|
*count = reader->wm_reader->stream_count;
|
|
|
|
LeaveCriticalSection(&reader->wm_reader->cs);
|
2019-10-19 09:50:01 +00:00
|
|
|
return S_OK;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-03 04:51:48 +00:00
|
|
|
static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IWMOutputMediaProps **props)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-03 04:51:48 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
|
2021-11-03 04:51:48 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_get_output_props(reader->wm_reader, output, props);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-04 20:46:26 +00:00
|
|
|
static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output, IWMOutputMediaProps *props)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-04 20:46:26 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
|
2021-11-04 20:46:26 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_set_output_props(reader->wm_reader, output, props);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-04 20:46:25 +00:00
|
|
|
static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output, DWORD *count)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-04 20:46:25 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
TRACE("reader %p, output %lu, count %p.\n", reader, output, count);
|
2021-11-04 20:46:25 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_get_output_format_count(reader->wm_reader, output, count);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-04 20:46:24 +00:00
|
|
|
static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
|
|
|
|
DWORD index, IWMOutputMediaProps **props)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-04 20:46:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
TRACE("reader %p, output %lu, index %lu, props %p.\n", reader, output, index, props);
|
2021-11-04 20:46:24 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_get_output_format(reader->wm_reader, output, index, props);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-04 20:46:27 +00:00
|
|
|
static HRESULT WINAPI WMReader_Start(IWMReader *iface,
|
|
|
|
QWORD start, QWORD duration, float rate, void *context)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-09 05:55:36 +00:00
|
|
|
union async_op_data data = {.start = {.start = start, .duration = duration, .context = context}};
|
2021-11-04 20:46:27 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
2022-08-03 08:18:06 +00:00
|
|
|
HRESULT hr;
|
2021-11-04 20:46:27 +00:00
|
|
|
|
|
|
|
TRACE("reader %p, start %s, duration %s, rate %.8e, context %p.\n",
|
|
|
|
reader, debugstr_time(start), debugstr_time(duration), rate, context);
|
|
|
|
|
|
|
|
if (rate != 1.0f)
|
|
|
|
FIXME("Ignoring rate %.8e.\n", rate);
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
EnterCriticalSection(&reader->cs);
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
if (!reader->callback_thread)
|
2022-08-03 08:18:06 +00:00
|
|
|
hr = NS_E_INVALID_REQUEST;
|
|
|
|
else
|
2022-08-26 17:07:22 +00:00
|
|
|
hr = async_reader_queue_op(reader, ASYNC_OP_START, &data);
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
LeaveCriticalSection(&reader->cs);
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2022-08-03 08:18:06 +00:00
|
|
|
return hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReader_Stop(IWMReader *iface)
|
|
|
|
{
|
2021-11-04 20:46:27 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReader(iface);
|
2022-08-03 08:18:06 +00:00
|
|
|
HRESULT hr;
|
2021-11-04 20:46:27 +00:00
|
|
|
|
|
|
|
TRACE("reader %p.\n", reader);
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
EnterCriticalSection(&reader->cs);
|
2021-12-15 17:50:19 +00:00
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
if (!reader->callback_thread)
|
2022-08-03 08:18:06 +00:00
|
|
|
hr = E_UNEXPECTED;
|
|
|
|
else
|
|
|
|
hr = async_reader_queue_op(reader, ASYNC_OP_STOP, NULL);
|
2021-12-15 17:50:19 +00:00
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
LeaveCriticalSection(&reader->cs);
|
2022-08-03 08:18:06 +00:00
|
|
|
|
|
|
|
return hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReader_Pause(IWMReader *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReader(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReader_Resume(IWMReader *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReader(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IWMReaderVtbl WMReaderVtbl = {
|
|
|
|
WMReader_QueryInterface,
|
|
|
|
WMReader_AddRef,
|
|
|
|
WMReader_Release,
|
|
|
|
WMReader_Open,
|
|
|
|
WMReader_Close,
|
|
|
|
WMReader_GetOutputCount,
|
|
|
|
WMReader_GetOutputProps,
|
|
|
|
WMReader_SetOutputProps,
|
|
|
|
WMReader_GetOutputFormatCount,
|
|
|
|
WMReader_GetOutputFormat,
|
|
|
|
WMReader_Start,
|
|
|
|
WMReader_Stop,
|
|
|
|
WMReader_Pause,
|
|
|
|
WMReader_Resume
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IWMReaderAdvanced6(IWMReaderAdvanced6 *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderAdvanced6_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_QueryInterface(IWMReaderAdvanced6 *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_QueryInterface(&reader->IWMReader_iface, iid, out);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI WMReaderAdvanced_AddRef(IWMReaderAdvanced6 *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_AddRef(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI WMReaderAdvanced_Release(IWMReaderAdvanced6 *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_Release(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL user_clock)
|
|
|
|
{
|
2021-11-04 20:46:28 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, user_clock %d.\n", reader, user_clock);
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2021-11-04 20:46:28 +00:00
|
|
|
reader->user_clock = !!user_clock;
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2022-08-22 12:00:09 +00:00
|
|
|
WakeConditionVariable(&reader->callback_cv);
|
2021-11-04 20:46:28 +00:00
|
|
|
return S_OK;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL *user_clock)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, user_clock);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_DeliverTime(IWMReaderAdvanced6 *iface, QWORD time)
|
|
|
|
{
|
2021-11-04 20:46:28 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, time %s.\n", reader, debugstr_time(time));
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
EnterCriticalSection(&reader->callback_cs);
|
2021-11-04 20:46:28 +00:00
|
|
|
|
|
|
|
if (!reader->user_clock)
|
|
|
|
{
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
2021-11-04 20:46:28 +00:00
|
|
|
WARN("Not using a user-provided clock; returning E_UNEXPECTED.\n");
|
|
|
|
return E_UNEXPECTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
reader->user_time = time;
|
|
|
|
|
2022-08-20 15:20:14 +00:00
|
|
|
LeaveCriticalSection(&reader->callback_cs);
|
|
|
|
WakeConditionVariable(&reader->callback_cv);
|
2021-11-04 20:46:28 +00:00
|
|
|
return S_OK;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL selection)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%x)\n", This, selection);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL *selection)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, selection);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2021-11-10 16:41:10 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6 *iface,
|
|
|
|
WORD count, WORD *stream_numbers, WMT_STREAM_SELECTION *selections)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-10 16:41:10 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, count %u, stream_numbers %p, selections %p.\n",
|
|
|
|
reader, count, stream_numbers, selections);
|
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_set_streams_selected(reader->wm_reader, count, stream_numbers, selections);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-10 16:41:12 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetStreamSelected(IWMReaderAdvanced6 *iface,
|
|
|
|
WORD stream_number, WMT_STREAM_SELECTION *selection)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-10 16:41:12 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, stream_number %u, selection %p.\n", reader, stream_number, selection);
|
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_get_stream_selection(reader->wm_reader, stream_number, selection);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL get_callbacks)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%x)\n", This, get_callbacks);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL *get_callbacks)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, get_callbacks);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2021-11-11 01:05:48 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetReceiveStreamSamples(IWMReaderAdvanced6 *iface,
|
|
|
|
WORD stream_number, BOOL compressed)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-11 01:05:48 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, stream_number %u, compressed %d.\n", reader, stream_number, compressed);
|
|
|
|
|
2022-08-22 11:43:09 +00:00
|
|
|
return IWMSyncReader2_SetReadStreamSamples(reader->reader, stream_number, compressed);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetReceiveStreamSamples(IWMReaderAdvanced6 *iface, WORD stream_num,
|
|
|
|
BOOL *receive_stream_samples)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%d %p)\n", This, stream_num, receive_stream_samples);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2021-11-11 01:05:46 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6 *iface,
|
|
|
|
DWORD output, BOOL allocate)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-11 01:05:46 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
TRACE("reader %p, output %lu, allocate %d.\n", reader, output, allocate);
|
2021-11-11 01:05:46 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_set_allocate_for_output(reader->wm_reader, output, allocate);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL *allocate)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, output %lu, allocate %p, stub!\n", reader, output_num, allocate);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2021-11-11 01:05:49 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetAllocateForStream(IWMReaderAdvanced6 *iface,
|
|
|
|
WORD stream_number, BOOL allocate)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-11 01:05:49 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, stream_number %u, allocate %d.\n", reader, stream_number, allocate);
|
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_set_allocate_for_stream(reader->wm_reader, stream_number, allocate);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetAllocateForStream(IWMReaderAdvanced6 *iface, WORD output_num, BOOL *allocate)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetStatistics(IWMReaderAdvanced6 *iface, WM_READER_STATISTICS *statistics)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, statistics);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6 *iface, WM_READER_CLIENTINFO *client_info)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, client_info);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6 *iface, DWORD output, DWORD *max)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2022-02-04 00:45:24 +00:00
|
|
|
FIXME("(%p)->(%lu %p)\n", This, output, max);
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2021-11-12 05:43:21 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced_GetMaxStreamSampleSize(IWMReaderAdvanced6 *iface,
|
|
|
|
WORD stream_number, DWORD *size)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-12 05:43:21 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
TRACE("reader %p, stream_number %u, size %p.\n", reader, stream_number, size);
|
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
return wm_reader_get_max_stream_size(reader->wm_reader, stream_number, size);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced_NotifyLateDelivery(IWMReaderAdvanced6 *iface, QWORD lateness)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(lateness));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_SetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE mode)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%d)\n", This, mode);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetPlayMode(IWMReaderAdvanced6 *iface, WMT_PLAY_MODE *mode)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, mode);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetBufferProgress(IWMReaderAdvanced6 *iface, DWORD *percent, QWORD *buffering)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p %p)\n", This, percent, buffering);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetDownloadProgress(IWMReaderAdvanced6 *iface, DWORD *percent,
|
|
|
|
QWORD *bytes_downloaded, QWORD *download)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p %p %p)\n", This, percent, bytes_downloaded, download);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetSaveAsProgress(IWMReaderAdvanced6 *iface, DWORD *percent)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, percent);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_SaveFileAs(IWMReaderAdvanced6 *iface, const WCHAR *filename)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(filename));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetProtocolName(IWMReaderAdvanced6 *iface, WCHAR *protocol, DWORD *protocol_len)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p %p)\n", This, protocol, protocol_len);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_StartAtMarker(IWMReaderAdvanced6 *iface, WORD marker_index,
|
|
|
|
QWORD duration, float rate, void *context)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%d %s %f %p)\n", This, marker_index, wine_dbgstr_longlong(duration), rate, context);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num,
|
|
|
|
const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2022-02-04 00:45:24 +00:00
|
|
|
FIXME("(%p)->(%lu %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6 *iface, DWORD output_num,
|
|
|
|
const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2022-02-04 00:45:24 +00:00
|
|
|
FIXME("(%p)->(%lu %s %#x %p %u)\n", This, output_num, debugstr_w(name), type, value, length);
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_Preroll(IWMReaderAdvanced6 *iface, QWORD start, QWORD duration, float rate)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%s %s %f)\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration), rate);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_SetLogClientID(IWMReaderAdvanced6 *iface, BOOL log_client_id)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%x)\n", This, log_client_id);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_GetLogClientID(IWMReaderAdvanced6 *iface, BOOL *log_client_id)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, log_client_id);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_StopBuffering(IWMReaderAdvanced6 *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2021-11-03 04:51:46 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced2_OpenStream(IWMReaderAdvanced6 *iface,
|
|
|
|
IStream *stream, IWMReaderCallback *callback, void *context)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-11-03 04:51:46 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("reader %p, stream %p, callback %p, context %p.\n", reader, stream, callback, context);
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
EnterCriticalSection(&reader->cs);
|
2022-06-10 15:27:02 +00:00
|
|
|
|
2022-09-16 05:59:41 +00:00
|
|
|
if (SUCCEEDED(hr = IWMSyncReader2_OpenStream(reader->reader, stream))
|
2022-08-22 17:19:38 +00:00
|
|
|
&& FAILED(hr = async_reader_open(reader, callback, context)))
|
2022-09-16 05:58:11 +00:00
|
|
|
IWMSyncReader2_Close(reader->reader);
|
2021-11-03 04:51:46 +00:00
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
LeaveCriticalSection(&reader->cs);
|
2021-11-03 04:51:46 +00:00
|
|
|
return hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced3_StopNetStreaming(IWMReaderAdvanced6 *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6 *iface, WORD stream_num,
|
|
|
|
void *offset_start, void *duration, WMT_OFFSET_FORMAT format, float rate, void *context)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%d %p %p %d %f %p)\n", This, stream_num, offset_start, duration, format, rate, context);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *iface, DWORD output_num, WORD *language_count)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2022-02-04 00:45:24 +00:00
|
|
|
FIXME("(%p)->(%lu %p)\n", This, output_num, language_count);
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6 *iface, DWORD output_num,
|
|
|
|
WORD language, WCHAR *language_string, WORD *language_string_len)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, output %lu, language %#x, language_string %p, language_string_len %p, stub!\n",
|
|
|
|
reader, output_num, language, language_string, language_string_len);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_GetMaxSpeedFactor(IWMReaderAdvanced6 *iface, double *factor)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, factor);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_IsUsingFastCache(IWMReaderAdvanced6 *iface, BOOL *using_fast_cache)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, using_fast_cache);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_AddLogParam(IWMReaderAdvanced6 *iface, const WCHAR *namespace,
|
|
|
|
const WCHAR *name, const WCHAR *value)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(namespace), debugstr_w(name), debugstr_w(value));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_SendLogParams(IWMReaderAdvanced6 *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_CanSaveFileAs(IWMReaderAdvanced6 *iface, BOOL *can_save)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, can_save);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_CancelSaveFileAs(IWMReaderAdvanced6 *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced4_GetURL(IWMReaderAdvanced6 *iface, WCHAR *url, DWORD *url_len)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("(%p)->(%p %p)\n", This, url, url_len);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, DWORD output_num, IWMPlayerHook *hook)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, output %lu, hook %p, stub!\n", reader, output_num, hook);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2019-12-09 08:44:56 +00:00
|
|
|
static HRESULT WINAPI WMReaderAdvanced6_SetProtectStreamSamples(IWMReaderAdvanced6 *iface, BYTE *cert,
|
2019-03-02 11:29:54 +00:00
|
|
|
DWORD cert_size, DWORD cert_type, DWORD flags, BYTE *initialization_vector, DWORD *initialization_vector_size)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, cert %p, cert_size %lu, cert_type %#lx, flags %#lx, vector %p, vector_size %p, stub!\n",
|
|
|
|
reader, cert, cert_size, cert_type, flags, initialization_vector, initialization_vector_size);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IWMReaderAdvanced6Vtbl WMReaderAdvanced6Vtbl = {
|
|
|
|
WMReaderAdvanced_QueryInterface,
|
|
|
|
WMReaderAdvanced_AddRef,
|
|
|
|
WMReaderAdvanced_Release,
|
|
|
|
WMReaderAdvanced_SetUserProvidedClock,
|
|
|
|
WMReaderAdvanced_GetUserProvidedClock,
|
|
|
|
WMReaderAdvanced_DeliverTime,
|
|
|
|
WMReaderAdvanced_SetManualStreamSelection,
|
|
|
|
WMReaderAdvanced_GetManualStreamSelection,
|
|
|
|
WMReaderAdvanced_SetStreamsSelected,
|
|
|
|
WMReaderAdvanced_GetStreamSelected,
|
|
|
|
WMReaderAdvanced_SetReceiveSelectionCallbacks,
|
|
|
|
WMReaderAdvanced_GetReceiveSelectionCallbacks,
|
|
|
|
WMReaderAdvanced_SetReceiveStreamSamples,
|
|
|
|
WMReaderAdvanced_GetReceiveStreamSamples,
|
|
|
|
WMReaderAdvanced_SetAllocateForOutput,
|
|
|
|
WMReaderAdvanced_GetAllocateForOutput,
|
|
|
|
WMReaderAdvanced_SetAllocateForStream,
|
|
|
|
WMReaderAdvanced_GetAllocateForStream,
|
|
|
|
WMReaderAdvanced_GetStatistics,
|
|
|
|
WMReaderAdvanced_SetClientInfo,
|
|
|
|
WMReaderAdvanced_GetMaxOutputSampleSize,
|
|
|
|
WMReaderAdvanced_GetMaxStreamSampleSize,
|
|
|
|
WMReaderAdvanced_NotifyLateDelivery,
|
|
|
|
WMReaderAdvanced2_SetPlayMode,
|
|
|
|
WMReaderAdvanced2_GetPlayMode,
|
|
|
|
WMReaderAdvanced2_GetBufferProgress,
|
|
|
|
WMReaderAdvanced2_GetDownloadProgress,
|
|
|
|
WMReaderAdvanced2_GetSaveAsProgress,
|
|
|
|
WMReaderAdvanced2_SaveFileAs,
|
|
|
|
WMReaderAdvanced2_GetProtocolName,
|
|
|
|
WMReaderAdvanced2_StartAtMarker,
|
|
|
|
WMReaderAdvanced2_GetOutputSetting,
|
|
|
|
WMReaderAdvanced2_SetOutputSetting,
|
|
|
|
WMReaderAdvanced2_Preroll,
|
|
|
|
WMReaderAdvanced2_SetLogClientID,
|
|
|
|
WMReaderAdvanced2_GetLogClientID,
|
|
|
|
WMReaderAdvanced2_StopBuffering,
|
|
|
|
WMReaderAdvanced2_OpenStream,
|
|
|
|
WMReaderAdvanced3_StopNetStreaming,
|
|
|
|
WMReaderAdvanced3_StartAtPosition,
|
|
|
|
WMReaderAdvanced4_GetLanguageCount,
|
|
|
|
WMReaderAdvanced4_GetLanguage,
|
|
|
|
WMReaderAdvanced4_GetMaxSpeedFactor,
|
|
|
|
WMReaderAdvanced4_IsUsingFastCache,
|
|
|
|
WMReaderAdvanced4_AddLogParam,
|
|
|
|
WMReaderAdvanced4_SendLogParams,
|
|
|
|
WMReaderAdvanced4_CanSaveFileAs,
|
|
|
|
WMReaderAdvanced4_CancelSaveFileAs,
|
|
|
|
WMReaderAdvanced4_GetURL,
|
|
|
|
WMReaderAdvanced5_SetPlayerHook,
|
2019-12-09 08:44:56 +00:00
|
|
|
WMReaderAdvanced6_SetProtectStreamSamples
|
2019-03-02 11:29:54 +00:00
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IWMReaderAccelerator(IWMReaderAccelerator *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderAccelerator_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
static HRESULT WINAPI reader_accl_QueryInterface(IWMReaderAccelerator *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_QueryInterface(&reader->IWMReader_iface, iid, out);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI reader_accl_AddRef(IWMReaderAccelerator *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_AddRef(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI reader_accl_Release(IWMReaderAccelerator *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_Release(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI reader_accl_GetCodecInterface(IWMReaderAccelerator *iface, DWORD output, REFIID riid, void **codec)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
FIXME("reader %p, output %lu, iid %s, codec %p, stub!\n", reader, output, debugstr_guid(riid), codec);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI reader_accl_Notify(IWMReaderAccelerator *iface, DWORD output, WM_MEDIA_TYPE *subtype)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
FIXME("reader %p, output %lu, subtype %p, stub!\n", reader, output, subtype);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IWMReaderAcceleratorVtbl WMReaderAcceleratorVtbl = {
|
|
|
|
reader_accl_QueryInterface,
|
|
|
|
reader_accl_AddRef,
|
|
|
|
reader_accl_Release,
|
|
|
|
reader_accl_GetCodecInterface,
|
|
|
|
reader_accl_Notify
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IWMReaderNetworkConfig2(IWMReaderNetworkConfig2 *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderNetworkConfig2_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
static HRESULT WINAPI networkconfig_QueryInterface(IWMReaderNetworkConfig2 *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_QueryInterface(&reader->IWMReader_iface, iid, out);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI networkconfig_AddRef(IWMReaderNetworkConfig2 *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_AddRef(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI networkconfig_Release(IWMReaderNetworkConfig2 *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_Release(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetBufferingTime(IWMReaderNetworkConfig2 *iface, QWORD *buffering_time)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, buffering_time);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetBufferingTime(IWMReaderNetworkConfig2 *iface, QWORD buffering_time)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s\n", This, wine_dbgstr_longlong(buffering_time));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array,
|
|
|
|
DWORD *ranges)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p, %p\n", This, array, ranges);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2022-02-04 00:45:24 +00:00
|
|
|
static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface,
|
|
|
|
WM_PORT_NUMBER_RANGE *ranges, DWORD count)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, ranges %p, count %lu.\n", reader, ranges, count);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetProxySettings(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
WMT_PROXY_SETTINGS *proxy)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %p\n", This, debugstr_w(protocol), proxy);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetProxySettings(IWMReaderNetworkConfig2 *iface, LPCWSTR protocol,
|
|
|
|
WMT_PROXY_SETTINGS proxy)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %d\n", This, debugstr_w(protocol), proxy);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetProxyHostName(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
WCHAR *hostname, DWORD *size)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %p, %p\n", This, debugstr_w(protocol), hostname, size);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetProxyHostName(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
const WCHAR *hostname)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %s\n", This, debugstr_w(protocol), debugstr_w(hostname));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
DWORD *port)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %p\n", This, debugstr_w(protocol), port);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
DWORD port)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, protocol %s, port %lu, stub!\n", reader, debugstr_w(protocol), port);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetProxyExceptionList(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
WCHAR *exceptions, DWORD *count)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %p, %p\n", This, debugstr_w(protocol), exceptions, count);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetProxyExceptionList(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
const WCHAR *exceptions)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %s\n", This, debugstr_w(protocol), debugstr_w(exceptions));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetProxyBypassForLocal(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
BOOL *bypass)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %p\n", This, debugstr_w(protocol), bypass);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetProxyBypassForLocal(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
|
|
|
|
BOOL bypass)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %d\n", This, debugstr_w(protocol), bypass);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2 *iface,
|
|
|
|
BOOL *detection)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, detection);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetForceRerunAutoProxyDetection(IWMReaderNetworkConfig2 *iface,
|
|
|
|
BOOL detection)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, detection);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableMulticast(IWMReaderNetworkConfig2 *iface, BOOL *multicast)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, multicast);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableMulticast(IWMReaderNetworkConfig2 *iface, BOOL multicast)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, multicast);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableHTTP(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableHTTP(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableUDP(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableUDP(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableTCP(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableTCP(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_ResetProtocolRollover(IWMReaderNetworkConfig2 *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD *bandwidth)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, bandwidth);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD bandwidth)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, bandwidth %lu, stub!\n", reader, bandwidth);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetNumProtocolsSupported(IWMReaderNetworkConfig2 *iface, DWORD *protocols)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, protocols);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetSupportedProtocolName(IWMReaderNetworkConfig2 *iface, DWORD protocol_num,
|
|
|
|
WCHAR *protocol, DWORD *size)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, index %lu, protocol %p, size %p, stub!\n", reader, protocol_num, protocol, size);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2 *iface, const WCHAR *url)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s\n", This, debugstr_w(url));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetLoggingUrl(IWMReaderNetworkConfig2 *iface, DWORD index, WCHAR *url,
|
|
|
|
DWORD *size)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, index %lu, url %p, size %p, stub!\n", reader, index, url, size);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetLoggingUrlCount(IWMReaderNetworkConfig2 *iface, DWORD *count)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, count);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_ResetLoggingUrlList(IWMReaderNetworkConfig2 *iface)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableContentCaching(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableContentCaching(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableFastCache(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableFastCache(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %d\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetAcceleratedStreamingDuration(IWMReaderNetworkConfig2 *iface,
|
|
|
|
QWORD *duration)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, duration);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetAcceleratedStreamingDuration(IWMReaderNetworkConfig2 *iface,
|
|
|
|
QWORD duration)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s\n", This, wine_dbgstr_longlong(duration));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD *limit)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, limit);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD limit)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, limit %lu, stub!\n", reader, limit);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableResends(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableResends(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %u\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetEnableThinning(IWMReaderNetworkConfig2 *iface, BOOL *enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_SetEnableThinning(IWMReaderNetworkConfig2 *iface, BOOL enable)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %u\n", This, enable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI networkconfig_GetMaxNetPacketSize(IWMReaderNetworkConfig2 *iface, DWORD *packet_size)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, packet_size);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IWMReaderNetworkConfig2Vtbl WMReaderNetworkConfig2Vtbl =
|
|
|
|
{
|
|
|
|
networkconfig_QueryInterface,
|
|
|
|
networkconfig_AddRef,
|
|
|
|
networkconfig_Release,
|
|
|
|
networkconfig_GetBufferingTime,
|
|
|
|
networkconfig_SetBufferingTime,
|
|
|
|
networkconfig_GetUDPPortRanges,
|
|
|
|
networkconfig_SetUDPPortRanges,
|
|
|
|
networkconfig_GetProxySettings,
|
|
|
|
networkconfig_SetProxySettings,
|
|
|
|
networkconfig_GetProxyHostName,
|
|
|
|
networkconfig_SetProxyHostName,
|
|
|
|
networkconfig_GetProxyPort,
|
|
|
|
networkconfig_SetProxyPort,
|
|
|
|
networkconfig_GetProxyExceptionList,
|
|
|
|
networkconfig_SetProxyExceptionList,
|
|
|
|
networkconfig_GetProxyBypassForLocal,
|
|
|
|
networkconfig_SetProxyBypassForLocal,
|
|
|
|
networkconfig_GetForceRerunAutoProxyDetection,
|
|
|
|
networkconfig_SetForceRerunAutoProxyDetection,
|
|
|
|
networkconfig_GetEnableMulticast,
|
|
|
|
networkconfig_SetEnableMulticast,
|
|
|
|
networkconfig_GetEnableHTTP,
|
|
|
|
networkconfig_SetEnableHTTP,
|
|
|
|
networkconfig_GetEnableUDP,
|
|
|
|
networkconfig_SetEnableUDP,
|
|
|
|
networkconfig_GetEnableTCP,
|
|
|
|
networkconfig_SetEnableTCP,
|
|
|
|
networkconfig_ResetProtocolRollover,
|
|
|
|
networkconfig_GetConnectionBandwidth,
|
|
|
|
networkconfig_SetConnectionBandwidth,
|
|
|
|
networkconfig_GetNumProtocolsSupported,
|
|
|
|
networkconfig_GetSupportedProtocolName,
|
|
|
|
networkconfig_AddLoggingUrl,
|
|
|
|
networkconfig_GetLoggingUrl,
|
|
|
|
networkconfig_GetLoggingUrlCount,
|
|
|
|
networkconfig_ResetLoggingUrlList,
|
|
|
|
networkconfig_GetEnableContentCaching,
|
|
|
|
networkconfig_SetEnableContentCaching,
|
|
|
|
networkconfig_GetEnableFastCache,
|
|
|
|
networkconfig_SetEnableFastCache,
|
|
|
|
networkconfig_GetAcceleratedStreamingDuration,
|
|
|
|
networkconfig_SetAcceleratedStreamingDuration,
|
|
|
|
networkconfig_GetAutoReconnectLimit,
|
|
|
|
networkconfig_SetAutoReconnectLimit,
|
|
|
|
networkconfig_GetEnableResends,
|
|
|
|
networkconfig_SetEnableResends,
|
|
|
|
networkconfig_GetEnableThinning,
|
|
|
|
networkconfig_SetEnableThinning,
|
|
|
|
networkconfig_GetMaxNetPacketSize
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IWMReaderStreamClock(IWMReaderStreamClock *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderStreamClock_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
static HRESULT WINAPI readclock_QueryInterface(IWMReaderStreamClock *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderStreamClock(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_QueryInterface(&reader->IWMReader_iface, iid, out);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI readclock_AddRef(IWMReaderStreamClock *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderStreamClock(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_AddRef(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI readclock_Release(IWMReaderStreamClock *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderStreamClock(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_Release(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI readclock_GetTime(IWMReaderStreamClock *iface, QWORD *now)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderStreamClock(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, now);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI readclock_SetTimer(IWMReaderStreamClock *iface, QWORD when, void *param, DWORD *id)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IWMReaderStreamClock(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %s, %p, %p\n", This, wine_dbgstr_longlong(when), param, id);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI readclock_KillTimer(IWMReaderStreamClock *iface, DWORD id)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderStreamClock(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, id %lu, stub!\n", reader, id);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IWMReaderStreamClockVtbl WMReaderStreamClockVtbl =
|
|
|
|
{
|
|
|
|
readclock_QueryInterface,
|
|
|
|
readclock_AddRef,
|
|
|
|
readclock_Release,
|
|
|
|
readclock_GetTime,
|
|
|
|
readclock_SetTimer,
|
|
|
|
readclock_KillTimer
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IWMReaderTypeNegotiation(IWMReaderTypeNegotiation *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderTypeNegotiation_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
static HRESULT WINAPI negotiation_QueryInterface(IWMReaderTypeNegotiation *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderTypeNegotiation(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_QueryInterface(&reader->IWMReader_iface, iid, out);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI negotiation_AddRef(IWMReaderTypeNegotiation *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderTypeNegotiation(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_AddRef(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI negotiation_Release(IWMReaderTypeNegotiation *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderTypeNegotiation(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_Release(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI negotiation_TryOutputProps(IWMReaderTypeNegotiation *iface, DWORD output, IWMOutputMediaProps *props)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IWMReaderTypeNegotiation(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, output %lu, props %p, stub!\n", reader, output, props);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IWMReaderTypeNegotiationVtbl WMReaderTypeNegotiationVtbl =
|
|
|
|
{
|
|
|
|
negotiation_QueryInterface,
|
|
|
|
negotiation_AddRef,
|
|
|
|
negotiation_Release,
|
|
|
|
negotiation_TryOutputProps
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:10 +00:00
|
|
|
static struct async_reader *impl_from_IReferenceClock(IReferenceClock *iface)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
return CONTAINING_RECORD(iface, struct async_reader, IReferenceClock_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-16 05:56:20 +00:00
|
|
|
static HRESULT WINAPI refclock_QueryInterface(IReferenceClock *iface, REFIID iid, void **out)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IReferenceClock(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_QueryInterface(&reader->IWMReader_iface, iid, out);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI refclock_AddRef(IReferenceClock *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IReferenceClock(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_AddRef(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI refclock_Release(IReferenceClock *iface)
|
|
|
|
{
|
2022-09-16 05:56:20 +00:00
|
|
|
struct async_reader *reader = impl_from_IReferenceClock(iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
return IWMReader_Release(&reader->IWMReader_iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI refclock_GetTime(IReferenceClock *iface, REFERENCE_TIME *time)
|
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *This = impl_from_IReferenceClock(iface);
|
2019-03-02 11:29:54 +00:00
|
|
|
FIXME("%p, %p\n", This, time);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI refclock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME basetime,
|
|
|
|
REFERENCE_TIME streamtime, HEVENT event, DWORD_PTR *cookie)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IReferenceClock(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, basetime %s, streamtime %s, event %#Ix, cookie %p, stub!\n",
|
|
|
|
reader, debugstr_time(basetime), debugstr_time(streamtime), event, cookie);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI refclock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME starttime,
|
|
|
|
REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IReferenceClock(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, starttime %s, period %s, semaphore %#Ix, cookie %p, stub!\n",
|
|
|
|
reader, debugstr_time(starttime), debugstr_time(period), semaphore, cookie);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI refclock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie)
|
|
|
|
{
|
2022-02-04 00:45:24 +00:00
|
|
|
struct async_reader *reader = impl_from_IReferenceClock(iface);
|
|
|
|
|
|
|
|
FIXME("reader %p, cookie %Iu, stub!\n", reader, cookie);
|
|
|
|
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IReferenceClockVtbl ReferenceClockVtbl =
|
|
|
|
{
|
|
|
|
refclock_QueryInterface,
|
|
|
|
refclock_AddRef,
|
|
|
|
refclock_Release,
|
|
|
|
refclock_GetTime,
|
|
|
|
refclock_AdviseTime,
|
|
|
|
refclock_AdvisePeriodic,
|
|
|
|
refclock_Unadvise
|
|
|
|
};
|
|
|
|
|
2021-10-07 15:47:09 +00:00
|
|
|
HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader)
|
2019-03-02 11:29:54 +00:00
|
|
|
{
|
2021-10-07 15:47:10 +00:00
|
|
|
struct async_reader *object;
|
2022-09-16 05:57:08 +00:00
|
|
|
HRESULT hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2021-10-07 15:47:09 +00:00
|
|
|
TRACE("reader %p.\n", reader);
|
2019-03-02 11:29:54 +00:00
|
|
|
|
2021-10-07 15:47:09 +00:00
|
|
|
if (!(object = calloc(1, sizeof(*object))))
|
2019-03-02 11:29:54 +00:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2021-10-07 15:47:09 +00:00
|
|
|
object->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl;
|
|
|
|
object->IWMReader_iface.lpVtbl = &WMReaderVtbl;
|
|
|
|
object->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
|
|
|
|
object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
|
|
|
|
object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
|
|
|
|
object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
|
|
|
|
object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
|
2022-09-16 05:56:20 +00:00
|
|
|
object->refcount = 1;
|
2021-10-07 15:47:09 +00:00
|
|
|
|
2022-09-16 05:57:08 +00:00
|
|
|
if (FAILED(hr = winegstreamer_create_wm_sync_reader((IUnknown *)&object->IWMReader_iface,
|
|
|
|
(void **)&object->reader_inner)))
|
|
|
|
goto failed;
|
2022-08-22 11:42:16 +00:00
|
|
|
|
|
|
|
if (FAILED(hr = IUnknown_QueryInterface(object->reader_inner, &IID_IWMSyncReader2,
|
|
|
|
(void **)&object->reader)))
|
|
|
|
goto failed;
|
|
|
|
IWMReader_Release(&object->IWMReader_iface);
|
2022-09-16 05:57:08 +00:00
|
|
|
object->wm_reader = wm_reader_from_sync_reader_inner(object->reader_inner);
|
|
|
|
|
2022-08-22 12:21:07 +00:00
|
|
|
InitializeCriticalSection(&object->cs);
|
|
|
|
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": async_reader.cs");
|
2022-08-20 15:20:14 +00:00
|
|
|
InitializeCriticalSection(&object->callback_cs);
|
|
|
|
object->callback_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": async_reader.callback_cs");
|
2021-11-04 20:46:27 +00:00
|
|
|
|
|
|
|
QueryPerformanceFrequency(&object->clock_frequency);
|
2022-08-03 08:18:06 +00:00
|
|
|
list_init(&object->async_ops);
|
2021-11-04 20:46:27 +00:00
|
|
|
|
2021-10-07 15:47:09 +00:00
|
|
|
TRACE("Created async reader %p.\n", object);
|
|
|
|
*reader = (IWMReader *)&object->IWMReader_iface;
|
2019-03-02 11:29:54 +00:00
|
|
|
return S_OK;
|
2022-09-16 05:57:08 +00:00
|
|
|
|
|
|
|
failed:
|
|
|
|
if (object->reader_inner)
|
|
|
|
IUnknown_Release(object->reader_inner);
|
|
|
|
free(object);
|
|
|
|
return hr;
|
2019-03-02 11:29:54 +00:00
|
|
|
}
|