Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/gst_private.h | 22 ++++++------- dlls/winegstreamer/main.c | 50 +++++++++++++++++++++--------- dlls/winegstreamer/media_source.c | 4 +-- dlls/winegstreamer/quartz_parser.c | 10 +++--- dlls/winegstreamer/unixlib.h | 34 ++++++++++++++++---- dlls/winegstreamer/wg_parser.c | 38 +++++++++++++++++------ dlls/winegstreamer/wm_reader.c | 6 ++-- 7 files changed, 112 insertions(+), 52 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h index 9e1d67417d4..340712eefe1 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -64,20 +64,20 @@ static inline const char *debugstr_time(REFERENCE_TIME time)
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
-struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) DECLSPEC_HIDDEN; -void wg_parser_destroy(struct wg_parser *parser) DECLSPEC_HIDDEN; +wg_parser_t wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) DECLSPEC_HIDDEN; +void wg_parser_destroy(wg_parser_t parser) DECLSPEC_HIDDEN;
-HRESULT wg_parser_connect(struct wg_parser *parser, uint64_t file_size) DECLSPEC_HIDDEN; -void wg_parser_disconnect(struct wg_parser *parser) DECLSPEC_HIDDEN; +HRESULT wg_parser_connect(wg_parser_t parser, uint64_t file_size) DECLSPEC_HIDDEN; +void wg_parser_disconnect(wg_parser_t parser) DECLSPEC_HIDDEN;
-void wg_parser_begin_flush(struct wg_parser *parser) DECLSPEC_HIDDEN; -void wg_parser_end_flush(struct wg_parser *parser) DECLSPEC_HIDDEN; +void wg_parser_begin_flush(wg_parser_t parser) DECLSPEC_HIDDEN; +void wg_parser_end_flush(wg_parser_t parser) DECLSPEC_HIDDEN;
-bool wg_parser_get_next_read_offset(struct wg_parser *parser, uint64_t *offset, uint32_t *size) DECLSPEC_HIDDEN; -void wg_parser_push_data(struct wg_parser *parser, const void *data, uint32_t size) DECLSPEC_HIDDEN; +bool wg_parser_get_next_read_offset(wg_parser_t parser, uint64_t *offset, uint32_t *size) DECLSPEC_HIDDEN; +void wg_parser_push_data(wg_parser_t parser, const void *data, uint32_t size) DECLSPEC_HIDDEN;
-uint32_t wg_parser_get_stream_count(struct wg_parser *parser) DECLSPEC_HIDDEN; -struct wg_parser_stream *wg_parser_get_stream(struct wg_parser *parser, uint32_t index) DECLSPEC_HIDDEN; +uint32_t wg_parser_get_stream_count(wg_parser_t parser) DECLSPEC_HIDDEN; +struct wg_parser_stream *wg_parser_get_stream(wg_parser_t parser, uint32_t index) DECLSPEC_HIDDEN;
void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) DECLSPEC_HIDDEN; void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_format *format) DECLSPEC_HIDDEN; @@ -152,7 +152,7 @@ struct wm_reader HANDLE file; HANDLE read_thread; bool read_thread_shutdown; - struct wg_parser *wg_parser; + wg_parser_t wg_parser;
struct wm_stream *streams; WORD stream_count; diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index ac9a3201792..23c11d883c9 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -60,7 +60,7 @@ bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size) return TRUE; }
-struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) +wg_parser_t wg_parser_create(enum wg_parser_type type, bool unlimited_buffering) { struct wg_parser_create_params params = { @@ -69,16 +69,21 @@ struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buff };
if (__wine_unix_call(unix_handle, unix_wg_parser_create, ¶ms)) - return NULL; + return 0; return params.parser; }
-void wg_parser_destroy(struct wg_parser *parser) +void wg_parser_destroy(wg_parser_t parser) { - __wine_unix_call(unix_handle, unix_wg_parser_destroy, parser); + struct wg_parser_destroy_params params = + { + .parser = parser, + }; + + __wine_unix_call(unix_handle, unix_wg_parser_destroy, ¶ms); }
-HRESULT wg_parser_connect(struct wg_parser *parser, uint64_t file_size) +HRESULT wg_parser_connect(wg_parser_t parser, uint64_t file_size) { struct wg_parser_connect_params params = { @@ -89,22 +94,37 @@ HRESULT wg_parser_connect(struct wg_parser *parser, uint64_t file_size) return __wine_unix_call(unix_handle, unix_wg_parser_connect, ¶ms); }
-void wg_parser_disconnect(struct wg_parser *parser) +void wg_parser_disconnect(wg_parser_t parser) { - __wine_unix_call(unix_handle, unix_wg_parser_disconnect, parser); + struct wg_parser_disconnect_params params = + { + .parser = parser, + }; + + __wine_unix_call(unix_handle, unix_wg_parser_disconnect, ¶ms); }
-void wg_parser_begin_flush(struct wg_parser *parser) +void wg_parser_begin_flush(wg_parser_t parser) { - __wine_unix_call(unix_handle, unix_wg_parser_begin_flush, parser); + struct wg_parser_begin_flush_params params = + { + .parser = parser, + }; + + __wine_unix_call(unix_handle, unix_wg_parser_begin_flush, ¶ms); }
-void wg_parser_end_flush(struct wg_parser *parser) +void wg_parser_end_flush(wg_parser_t parser) { - __wine_unix_call(unix_handle, unix_wg_parser_end_flush, parser); + struct wg_parser_end_flush_params params = + { + .parser = parser, + }; + + __wine_unix_call(unix_handle, unix_wg_parser_end_flush, ¶ms); }
-bool wg_parser_get_next_read_offset(struct wg_parser *parser, uint64_t *offset, uint32_t *size) +bool wg_parser_get_next_read_offset(wg_parser_t parser, uint64_t *offset, uint32_t *size) { struct wg_parser_get_next_read_offset_params params = { @@ -118,7 +138,7 @@ bool wg_parser_get_next_read_offset(struct wg_parser *parser, uint64_t *offset, return true; }
-void wg_parser_push_data(struct wg_parser *parser, const void *data, uint32_t size) +void wg_parser_push_data(wg_parser_t parser, const void *data, uint32_t size) { struct wg_parser_push_data_params params = { @@ -130,7 +150,7 @@ void wg_parser_push_data(struct wg_parser *parser, const void *data, uint32_t si __wine_unix_call(unix_handle, unix_wg_parser_push_data, ¶ms); }
-uint32_t wg_parser_get_stream_count(struct wg_parser *parser) +uint32_t wg_parser_get_stream_count(wg_parser_t parser) { struct wg_parser_get_stream_count_params params = { @@ -141,7 +161,7 @@ uint32_t wg_parser_get_stream_count(struct wg_parser *parser) return params.count; }
-struct wg_parser_stream *wg_parser_get_stream(struct wg_parser *parser, uint32_t index) +struct wg_parser_stream *wg_parser_get_stream(wg_parser_t parser, uint32_t index) { struct wg_parser_get_stream_params params = { diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index 6ecd345cb73..c31c573b381 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -92,7 +92,7 @@ struct media_source IMFMediaEventQueue *event_queue; IMFByteStream *byte_stream;
- struct wg_parser *wg_parser; + wg_parser_t wg_parser;
struct media_stream **streams; ULONG stream_count; @@ -1393,8 +1393,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ unsigned int stream_count = UINT_MAX; struct media_source *object; UINT64 total_pres_time = 0; - struct wg_parser *parser; DWORD bytestream_caps; + wg_parser_t parser; uint64_t file_size; unsigned int i; HRESULT hr; diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index cf284cda668..29adece3a38 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -50,7 +50,7 @@ struct parser unsigned int source_count; BOOL enum_sink_first;
- struct wg_parser *wg_parser; + wg_parser_t wg_parser;
/* FIXME: It would be nice to avoid duplicating these with strmbase. * However, synchronization is tricky; we need access to be protected by a @@ -1086,7 +1086,7 @@ static const struct strmbase_sink_ops sink_ops =
static BOOL decodebin_parser_filter_init_gst(struct parser *filter) { - struct wg_parser *parser = filter->wg_parser; + wg_parser_t parser = filter->wg_parser; unsigned int i, stream_count; WCHAR source_name[20];
@@ -1659,7 +1659,7 @@ static const struct strmbase_sink_ops wave_parser_sink_ops =
static BOOL wave_parser_filter_init_gst(struct parser *filter) { - struct wg_parser *parser = filter->wg_parser; + wg_parser_t parser = filter->wg_parser;
if (!create_pin(filter, wg_parser_get_stream(parser, 0), L"output")) return FALSE; @@ -1738,7 +1738,7 @@ static const struct strmbase_sink_ops avi_splitter_sink_ops =
static BOOL avi_splitter_filter_init_gst(struct parser *filter) { - struct wg_parser *parser = filter->wg_parser; + wg_parser_t parser = filter->wg_parser; uint32_t i, stream_count; WCHAR source_name[20];
@@ -1829,7 +1829,7 @@ static const struct strmbase_sink_ops mpeg_splitter_sink_ops =
static BOOL mpeg_splitter_filter_init_gst(struct parser *filter) { - struct wg_parser *parser = filter->wg_parser; + wg_parser_t parser = filter->wg_parser;
if (!create_pin(filter, wg_parser_get_stream(parser, 0), L"Audio")) return FALSE; diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 90101893541..b6fcfc26d6a 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -30,6 +30,8 @@
#include "wine/unixlib.h"
+typedef UINT64 wg_parser_t; + struct wg_format { enum wg_major_type @@ -130,40 +132,60 @@ enum wg_parser_type
struct wg_parser_create_params { - struct wg_parser *parser; + wg_parser_t parser; enum wg_parser_type type; bool unlimited_buffering; };
+struct wg_parser_destroy_params +{ + wg_parser_t parser; +}; + struct wg_parser_connect_params { - struct wg_parser *parser; + wg_parser_t parser; UINT64 file_size; };
+struct wg_parser_disconnect_params +{ + wg_parser_t parser; +}; + +struct wg_parser_begin_flush_params +{ + wg_parser_t parser; +}; + +struct wg_parser_end_flush_params +{ + wg_parser_t parser; +}; + struct wg_parser_get_next_read_offset_params { - struct wg_parser *parser; + wg_parser_t parser; UINT32 size; UINT64 offset; };
struct wg_parser_push_data_params { - struct wg_parser *parser; + wg_parser_t parser; const void *data; UINT32 size; };
struct wg_parser_get_stream_count_params { - struct wg_parser *parser; + wg_parser_t parser; UINT32 count; };
struct wg_parser_get_stream_params { - struct wg_parser *parser; + wg_parser_t parser; UINT32 index; struct wg_parser_stream *stream; }; diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index c3c9051a174..9c0bfd0a8d2 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -54,6 +54,8 @@ typedef enum GST_DEBUG_CATEGORY_STATIC(wine); #define GST_CAT_DEFAULT wine
+struct wg_parser; + typedef BOOL (*init_gst_cb)(struct wg_parser *parser);
struct wg_parser @@ -111,6 +113,16 @@ struct wg_parser_stream uint64_t duration; };
+static struct wg_parser *get_wg_parser(wg_parser_t handle) +{ + return (struct wg_parser *)(uintptr_t)handle; +} + +static wg_parser_t wg_parser_get_handle(struct wg_parser *parser) +{ + return (uintptr_t)parser; +} + static enum wg_audio_format wg_audio_format_from_gst(GstAudioFormat format) { switch (format) @@ -507,22 +519,25 @@ static bool wg_format_compare(const struct wg_format *a, const struct wg_format static NTSTATUS wg_parser_get_stream_count(void *args) { struct wg_parser_get_stream_count_params *params = args; + struct wg_parser *parser = get_wg_parser(params->parser);
- params->count = params->parser->stream_count; + params->count = parser->stream_count; return S_OK; }
static NTSTATUS wg_parser_get_stream(void *args) { struct wg_parser_get_stream_params *params = args; + struct wg_parser *parser = get_wg_parser(params->parser);
- params->stream = params->parser->streams[params->index]; + params->stream = parser->streams[params->index]; return S_OK; }
static NTSTATUS wg_parser_begin_flush(void *args) { - struct wg_parser *parser = args; + const struct wg_parser_begin_flush_params *params = args; + struct wg_parser *parser = get_wg_parser(params->parser); unsigned int i;
pthread_mutex_lock(&parser->mutex); @@ -540,7 +555,8 @@ static NTSTATUS wg_parser_begin_flush(void *args)
static NTSTATUS wg_parser_end_flush(void *args) { - struct wg_parser *parser = args; + const struct wg_parser_end_flush_params *params = args; + struct wg_parser *parser = get_wg_parser(params->parser);
pthread_mutex_lock(&parser->mutex); parser->flushing = false; @@ -552,7 +568,7 @@ static NTSTATUS wg_parser_end_flush(void *args) static NTSTATUS wg_parser_get_next_read_offset(void *args) { struct wg_parser_get_next_read_offset_params *params = args; - struct wg_parser *parser = params->parser; + struct wg_parser *parser = get_wg_parser(params->parser);
pthread_mutex_lock(&parser->mutex);
@@ -575,7 +591,7 @@ static NTSTATUS wg_parser_get_next_read_offset(void *args) static NTSTATUS wg_parser_push_data(void *args) { const struct wg_parser_push_data_params *params = args; - struct wg_parser *parser = params->parser; + struct wg_parser *parser = get_wg_parser(params->parser); const void *data = params->data; uint32_t size = params->size;
@@ -1598,7 +1614,7 @@ static NTSTATUS wg_parser_connect(void *args) GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE("quartz_src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); const struct wg_parser_connect_params *params = args; - struct wg_parser *parser = params->parser; + struct wg_parser *parser = get_wg_parser(params->parser); unsigned int i; int ret;
@@ -1754,7 +1770,8 @@ out:
static NTSTATUS wg_parser_disconnect(void *args) { - struct wg_parser *parser = args; + const struct wg_parser_disconnect_params *params = args; + struct wg_parser *parser = get_wg_parser(params->parser); unsigned int i;
/* Unblock all of our streams. */ @@ -1978,13 +1995,14 @@ static NTSTATUS wg_parser_create(void *args) parser->unlimited_buffering = params->unlimited_buffering;
GST_DEBUG("Created winegstreamer parser %p.\n", parser); - params->parser = parser; + params->parser = wg_parser_get_handle(parser); return S_OK; }
static NTSTATUS wg_parser_destroy(void *args) { - struct wg_parser *parser = args; + const struct wg_parser_destroy_params *params = args; + struct wg_parser *parser = get_wg_parser(params->parser);
if (parser->bus) { diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c index 3a1f1684fdc..d5649f4ba9a 100644 --- a/dlls/winegstreamer/wm_reader.c +++ b/dlls/winegstreamer/wm_reader.c @@ -1451,7 +1451,7 @@ static const IWMReaderTimecodeVtbl timecode_vtbl =
static HRESULT init_stream(struct wm_reader *reader, QWORD file_size) { - struct wg_parser *wg_parser; + wg_parser_t wg_parser; HRESULT hr; WORD i;
@@ -1529,7 +1529,7 @@ out_shutdown_thread:
out_destroy_parser: wg_parser_destroy(reader->wg_parser); - reader->wg_parser = NULL; + reader->wg_parser = 0;
return hr; } @@ -1611,7 +1611,7 @@ HRESULT wm_reader_close(struct wm_reader *reader) reader->callback_advanced = NULL;
wg_parser_destroy(reader->wg_parser); - reader->wg_parser = NULL; + reader->wg_parser = 0;
if (reader->source_stream) IStream_Release(reader->source_stream);
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/gst_private.h | 22 +++++++++---------- dlls/winegstreamer/main.c | 34 +++++++++++++++++++---------- dlls/winegstreamer/media_source.c | 6 ++--- dlls/winegstreamer/quartz_parser.c | 6 ++--- dlls/winegstreamer/unixlib.h | 28 ++++++++++++++++-------- dlls/winegstreamer/wg_parser.c | 35 +++++++++++++++++++++--------- dlls/winegstreamer/wm_reader.c | 2 +- 7 files changed, 84 insertions(+), 49 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h index 340712eefe1..6e3128f9a0b 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -77,23 +77,23 @@ bool wg_parser_get_next_read_offset(wg_parser_t parser, uint64_t *offset, uint32 void wg_parser_push_data(wg_parser_t parser, const void *data, uint32_t size) DECLSPEC_HIDDEN;
uint32_t wg_parser_get_stream_count(wg_parser_t parser) DECLSPEC_HIDDEN; -struct wg_parser_stream *wg_parser_get_stream(wg_parser_t parser, uint32_t index) DECLSPEC_HIDDEN; +wg_parser_stream_t wg_parser_get_stream(wg_parser_t parser, uint32_t index) DECLSPEC_HIDDEN;
-void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) DECLSPEC_HIDDEN; -void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_format *format) DECLSPEC_HIDDEN; -void wg_parser_stream_disable(struct wg_parser_stream *stream) DECLSPEC_HIDDEN; +void wg_parser_stream_get_preferred_format(wg_parser_stream_t stream, struct wg_format *format) DECLSPEC_HIDDEN; +void wg_parser_stream_enable(wg_parser_stream_t stream, const struct wg_format *format) DECLSPEC_HIDDEN; +void wg_parser_stream_disable(wg_parser_stream_t stream) DECLSPEC_HIDDEN;
-bool wg_parser_stream_get_event(struct wg_parser_stream *stream, struct wg_parser_event *event) DECLSPEC_HIDDEN; -bool wg_parser_stream_copy_buffer(struct wg_parser_stream *stream, +bool wg_parser_stream_get_event(wg_parser_stream_t stream, struct wg_parser_event *event) DECLSPEC_HIDDEN; +bool wg_parser_stream_copy_buffer(wg_parser_stream_t stream, void *data, uint32_t offset, uint32_t size) DECLSPEC_HIDDEN; -void wg_parser_stream_release_buffer(struct wg_parser_stream *stream) DECLSPEC_HIDDEN; -void wg_parser_stream_notify_qos(struct wg_parser_stream *stream, +void wg_parser_stream_release_buffer(wg_parser_stream_t stream) DECLSPEC_HIDDEN; +void wg_parser_stream_notify_qos(wg_parser_stream_t stream, bool underflow, double proportion, int64_t diff, uint64_t timestamp) DECLSPEC_HIDDEN;
/* Returns the duration in 100-nanosecond units. */ -uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream) DECLSPEC_HIDDEN; +uint64_t wg_parser_stream_get_duration(wg_parser_stream_t stream) DECLSPEC_HIDDEN; /* start_pos and stop_pos are in 100-nanosecond units. */ -void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, +void wg_parser_stream_seek(wg_parser_stream_t stream, double rate, uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) DECLSPEC_HIDDEN;
unsigned int wg_format_get_max_size(const struct wg_format *format); @@ -121,7 +121,7 @@ HRESULT audio_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; struct wm_stream { struct wm_reader *reader; - struct wg_parser_stream *wg_stream; + wg_parser_stream_t wg_stream; struct wg_format format; WMT_STREAM_SELECTION selection; WORD index; diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 23c11d883c9..fd73f79d365 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -161,7 +161,7 @@ uint32_t wg_parser_get_stream_count(wg_parser_t parser) return params.count; }
-struct wg_parser_stream *wg_parser_get_stream(wg_parser_t parser, uint32_t index) +wg_parser_stream_t wg_parser_get_stream(wg_parser_t parser, uint32_t index) { struct wg_parser_get_stream_params params = { @@ -173,7 +173,7 @@ struct wg_parser_stream *wg_parser_get_stream(wg_parser_t parser, uint32_t index return params.stream; }
-void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format) +void wg_parser_stream_get_preferred_format(wg_parser_stream_t stream, struct wg_format *format) { struct wg_parser_stream_get_preferred_format_params params = { @@ -184,7 +184,7 @@ void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, stru __wine_unix_call(unix_handle, unix_wg_parser_stream_get_preferred_format, ¶ms); }
-void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_format *format) +void wg_parser_stream_enable(wg_parser_stream_t stream, const struct wg_format *format) { struct wg_parser_stream_enable_params params = { @@ -195,12 +195,17 @@ void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_fo __wine_unix_call(unix_handle, unix_wg_parser_stream_enable, ¶ms); }
-void wg_parser_stream_disable(struct wg_parser_stream *stream) +void wg_parser_stream_disable(wg_parser_stream_t stream) { - __wine_unix_call(unix_handle, unix_wg_parser_stream_disable, stream); + struct wg_parser_stream_disable_params params = + { + .stream = stream, + }; + + __wine_unix_call(unix_handle, unix_wg_parser_stream_disable, ¶ms); }
-bool wg_parser_stream_get_event(struct wg_parser_stream *stream, struct wg_parser_event *event) +bool wg_parser_stream_get_event(wg_parser_stream_t stream, struct wg_parser_event *event) { struct wg_parser_stream_get_event_params params = { @@ -211,7 +216,7 @@ bool wg_parser_stream_get_event(struct wg_parser_stream *stream, struct wg_parse return !__wine_unix_call(unix_handle, unix_wg_parser_stream_get_event, ¶ms); }
-bool wg_parser_stream_copy_buffer(struct wg_parser_stream *stream, +bool wg_parser_stream_copy_buffer(wg_parser_stream_t stream, void *data, uint32_t offset, uint32_t size) { struct wg_parser_stream_copy_buffer_params params = @@ -225,12 +230,17 @@ bool wg_parser_stream_copy_buffer(struct wg_parser_stream *stream, return !__wine_unix_call(unix_handle, unix_wg_parser_stream_copy_buffer, ¶ms); }
-void wg_parser_stream_release_buffer(struct wg_parser_stream *stream) +void wg_parser_stream_release_buffer(wg_parser_stream_t stream) { - __wine_unix_call(unix_handle, unix_wg_parser_stream_release_buffer, stream); + struct wg_parser_stream_release_buffer_params params = + { + .stream = stream, + }; + + __wine_unix_call(unix_handle, unix_wg_parser_stream_release_buffer, ¶ms); }
-void wg_parser_stream_notify_qos(struct wg_parser_stream *stream, +void wg_parser_stream_notify_qos(wg_parser_stream_t stream, bool underflow, double proportion, int64_t diff, uint64_t timestamp) { struct wg_parser_stream_notify_qos_params params = @@ -245,7 +255,7 @@ void wg_parser_stream_notify_qos(struct wg_parser_stream *stream, __wine_unix_call(unix_handle, unix_wg_parser_stream_notify_qos, ¶ms); }
-uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream) +uint64_t wg_parser_stream_get_duration(wg_parser_stream_t stream) { struct wg_parser_stream_get_duration_params params = { @@ -256,7 +266,7 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream) return params.duration; }
-void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate, +void wg_parser_stream_seek(wg_parser_stream_t stream, double rate, uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) { struct wg_parser_stream_seek_params params = diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index c31c573b381..e3092690f1c 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -35,7 +35,7 @@ struct media_stream IMFMediaEventQueue *event_queue; IMFStreamDescriptor *descriptor;
- struct wg_parser_stream *wg_stream; + wg_parser_stream_t wg_stream;
IUnknown **token_queue; LONG token_queue_count; @@ -838,12 +838,12 @@ static const IMFMediaStreamVtbl media_stream_vtbl = };
static HRESULT new_media_stream(struct media_source *source, - struct wg_parser_stream *wg_stream, DWORD stream_id, struct media_stream **out_stream) + wg_parser_stream_t wg_stream, DWORD stream_id, struct media_stream **out_stream) { struct media_stream *object = calloc(1, sizeof(*object)); HRESULT hr;
- TRACE("source %p, wg_stream %p, stream_id %u.\n", source, wg_stream, stream_id); + TRACE("source %p, wg_stream %#I64x, stream_id %u.\n", source, wg_stream, stream_id);
object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl; object->ref = 1; diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 29adece3a38..78969860f2b 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -69,7 +69,7 @@ struct parser_source struct strmbase_source pin; IQualityControl IQualityControl_iface;
- struct wg_parser_stream *wg_stream; + wg_parser_stream_t wg_stream;
SourceSeeking seek;
@@ -86,7 +86,7 @@ static const IMediaSeekingVtbl GST_Seeking_Vtbl; static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl;
static struct parser_source *create_pin(struct parser *filter, - struct wg_parser_stream *stream, const WCHAR *name); + wg_parser_stream_t stream, const WCHAR *name); static HRESULT GST_RemoveOutputPins(struct parser *This); static HRESULT WINAPI GST_ChangeCurrent(IMediaSeeking *iface); static HRESULT WINAPI GST_ChangeStop(IMediaSeeking *iface); @@ -1574,7 +1574,7 @@ static const struct strmbase_source_ops source_ops = };
static struct parser_source *create_pin(struct parser *filter, - struct wg_parser_stream *stream, const WCHAR *name) + wg_parser_stream_t stream, const WCHAR *name) { struct parser_source *pin, **new_array;
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index b6fcfc26d6a..aa2e3c820a5 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -30,7 +30,7 @@
#include "wine/unixlib.h"
-typedef UINT64 wg_parser_t; +typedef UINT64 wg_parser_t, wg_parser_stream_t;
struct wg_format { @@ -187,38 +187,48 @@ struct wg_parser_get_stream_params { wg_parser_t parser; UINT32 index; - struct wg_parser_stream *stream; + wg_parser_stream_t stream; };
struct wg_parser_stream_get_preferred_format_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; struct wg_format *format; };
struct wg_parser_stream_enable_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; const struct wg_format *format; };
+struct wg_parser_stream_disable_params +{ + wg_parser_stream_t stream; +}; + struct wg_parser_stream_get_event_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; struct wg_parser_event *event; };
struct wg_parser_stream_copy_buffer_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; void *data; UINT32 offset; UINT32 size; };
+struct wg_parser_stream_release_buffer_params +{ + wg_parser_stream_t stream; +}; + struct wg_parser_stream_notify_qos_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; bool underflow; DOUBLE proportion; INT64 diff; @@ -227,13 +237,13 @@ struct wg_parser_stream_notify_qos_params
struct wg_parser_stream_get_duration_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; UINT64 duration; };
struct wg_parser_stream_seek_params { - struct wg_parser_stream *stream; + wg_parser_stream_t stream; DOUBLE rate; UINT64 start_pos, stop_pos; DWORD start_flags, stop_flags; diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 9c0bfd0a8d2..7c9ba652125 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -123,6 +123,16 @@ static wg_parser_t wg_parser_get_handle(struct wg_parser *parser) return (uintptr_t)parser; }
+static struct wg_parser_stream *get_wg_parser_stream(wg_parser_stream_t handle) +{ + return (struct wg_parser_stream *)(uintptr_t)handle; +} + +static wg_parser_stream_t wg_parser_stream_get_handle(struct wg_parser_stream *stream) +{ + return (uintptr_t)stream; +} + static enum wg_audio_format wg_audio_format_from_gst(GstAudioFormat format) { switch (format) @@ -530,7 +540,7 @@ static NTSTATUS wg_parser_get_stream(void *args) struct wg_parser_get_stream_params *params = args; struct wg_parser *parser = get_wg_parser(params->parser);
- params->stream = parser->streams[params->index]; + params->stream = wg_parser_stream_get_handle(parser->streams[params->index]); return S_OK; }
@@ -611,15 +621,16 @@ static NTSTATUS wg_parser_push_data(void *args) static NTSTATUS wg_parser_stream_get_preferred_format(void *args) { const struct wg_parser_stream_get_preferred_format_params *params = args; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream);
- *params->format = params->stream->preferred_format; + *params->format = stream->preferred_format; return S_OK; }
static NTSTATUS wg_parser_stream_enable(void *args) { const struct wg_parser_stream_enable_params *params = args; - struct wg_parser_stream *stream = params->stream; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); const struct wg_format *format = params->format;
stream->current_format = *format; @@ -657,7 +668,8 @@ static NTSTATUS wg_parser_stream_enable(void *args)
static NTSTATUS wg_parser_stream_disable(void *args) { - struct wg_parser_stream *stream = args; + const struct wg_parser_stream_disable_params *params = args; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream);
stream->enabled = false; return S_OK; @@ -666,7 +678,7 @@ static NTSTATUS wg_parser_stream_disable(void *args) static NTSTATUS wg_parser_stream_get_event(void *args) { const struct wg_parser_stream_get_event_params *params = args; - struct wg_parser_stream *stream = params->stream; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); struct wg_parser *parser = stream->parser;
pthread_mutex_lock(&parser->mutex); @@ -696,7 +708,7 @@ static NTSTATUS wg_parser_stream_get_event(void *args) static NTSTATUS wg_parser_stream_copy_buffer(void *args) { const struct wg_parser_stream_copy_buffer_params *params = args; - struct wg_parser_stream *stream = params->stream; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); struct wg_parser *parser = stream->parser; uint32_t offset = params->offset; uint32_t size = params->size; @@ -720,7 +732,8 @@ static NTSTATUS wg_parser_stream_copy_buffer(void *args)
static NTSTATUS wg_parser_stream_release_buffer(void *args) { - struct wg_parser_stream *stream = args; + struct wg_parser_stream_release_buffer_params *params = args; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); struct wg_parser *parser = stream->parser;
pthread_mutex_lock(&parser->mutex); @@ -741,8 +754,9 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args) static NTSTATUS wg_parser_stream_get_duration(void *args) { struct wg_parser_stream_get_duration_params *params = args; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream);
- params->duration = params->stream->duration; + params->duration = stream->duration; return S_OK; }
@@ -750,6 +764,7 @@ static NTSTATUS wg_parser_stream_seek(void *args) { GstSeekType start_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET; const struct wg_parser_stream_seek_params *params = args; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); DWORD start_flags = params->start_flags; DWORD stop_flags = params->stop_flags; GstSeekFlags flags = 0; @@ -766,7 +781,7 @@ static NTSTATUS wg_parser_stream_seek(void *args) if ((stop_flags & AM_SEEKING_PositioningBitsMask) == AM_SEEKING_NoPositioning) stop_type = GST_SEEK_TYPE_NONE;
- if (!gst_pad_push_event(params->stream->my_sink, gst_event_new_seek(params->rate, GST_FORMAT_TIME, + if (!gst_pad_push_event(stream->my_sink, gst_event_new_seek(params->rate, GST_FORMAT_TIME, flags, start_type, params->start_pos * 100, stop_type, params->stop_pos * 100))) GST_ERROR("Failed to seek.\n");
@@ -776,7 +791,7 @@ static NTSTATUS wg_parser_stream_seek(void *args) static NTSTATUS wg_parser_stream_notify_qos(void *args) { const struct wg_parser_stream_notify_qos_params *params = args; - struct wg_parser_stream *stream = params->stream; + struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); GstClockTime stream_time; GstEvent *event;
diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c index d5649f4ba9a..134b519867c 100644 --- a/dlls/winegstreamer/wm_reader.c +++ b/dlls/winegstreamer/wm_reader.c @@ -1815,7 +1815,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream, INSSBuffer **ret_sample, QWORD *pts, QWORD *duration, DWORD *flags) { IWMReaderCallbackAdvanced *callback_advanced = stream->reader->callback_advanced; - struct wg_parser_stream *wg_stream = stream->wg_stream; + wg_parser_stream_t wg_stream = stream->wg_stream; struct wg_parser_event event;
if (stream->selection == WMT_OFF)
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 4 +++- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index fd73f79d365..37752a3078b 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -29,6 +29,8 @@
static unixlib_handle_t unix_handle;
+#define u64_from_user_ptr(ptr) ((ULONGLONG)(uintptr_t)(ptr)) + WINE_DEFAULT_DEBUG_CHANNEL(quartz);
DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -143,7 +145,7 @@ void wg_parser_push_data(wg_parser_t parser, const void *data, uint32_t size) struct wg_parser_push_data_params params = { .parser = parser, - .data = data, + .data_ptr = u64_from_user_ptr(data), .size = size, };
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index aa2e3c820a5..6280b3427d2 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -173,7 +173,7 @@ struct wg_parser_get_next_read_offset_params struct wg_parser_push_data_params { wg_parser_t parser; - const void *data; + ULONGLONG data_ptr; UINT32 size; };
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 7c9ba652125..1a4185a63b4 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -39,6 +39,8 @@
#include "unixlib.h"
+#define u64_to_user_ptr(u) ((void *)(uintptr_t)(u)) + typedef enum { GST_AUTOPLUG_SELECT_TRY, @@ -602,7 +604,7 @@ static NTSTATUS wg_parser_push_data(void *args) { const struct wg_parser_push_data_params *params = args; struct wg_parser *parser = get_wg_parser(params->parser); - const void *data = params->data; + const void *data = u64_to_user_ptr(params->data_ptr); uint32_t size = params->size;
pthread_mutex_lock(&parser->mutex);
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 2 +- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 37752a3078b..10f71e6c303 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -224,7 +224,7 @@ bool wg_parser_stream_copy_buffer(wg_parser_stream_t stream, struct wg_parser_stream_copy_buffer_params params = { .stream = stream, - .data = data, + .data_ptr = u64_from_user_ptr(data), .offset = offset, .size = size, }; diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 6280b3427d2..01004aaffc7 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -216,7 +216,7 @@ struct wg_parser_stream_get_event_params struct wg_parser_stream_copy_buffer_params { wg_parser_stream_t stream; - void *data; + ULONGLONG data_ptr; UINT32 offset; UINT32 size; }; diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 1a4185a63b4..e661ea9bee9 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -711,6 +711,7 @@ static NTSTATUS wg_parser_stream_copy_buffer(void *args) { const struct wg_parser_stream_copy_buffer_params *params = args; struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); + void *data = u64_to_user_ptr(params->data_ptr); struct wg_parser *parser = stream->parser; uint32_t offset = params->offset; uint32_t size = params->size; @@ -726,7 +727,7 @@ static NTSTATUS wg_parser_stream_copy_buffer(void *args) assert(stream->event.type == WG_PARSER_EVENT_BUFFER); assert(offset < stream->map_info.size); assert(offset + size <= stream->map_info.size); - memcpy(params->data, stream->map_info.data + offset, size); + memcpy(data, stream->map_info.data + offset, size);
pthread_mutex_unlock(&parser->mutex); return S_OK;
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 6 ++++-- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 10f71e6c303..ae186e967c4 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -212,10 +212,12 @@ bool wg_parser_stream_get_event(wg_parser_stream_t stream, struct wg_parser_even struct wg_parser_stream_get_event_params params = { .stream = stream, - .event = event, };
- return !__wine_unix_call(unix_handle, unix_wg_parser_stream_get_event, ¶ms); + if (__wine_unix_call(unix_handle, unix_wg_parser_stream_get_event, ¶ms) != S_OK) + return false; + *event = params.event; + return true; }
bool wg_parser_stream_copy_buffer(wg_parser_stream_t stream, diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 01004aaffc7..4547ece2337 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -210,7 +210,7 @@ struct wg_parser_stream_disable_params struct wg_parser_stream_get_event_params { wg_parser_stream_t stream; - struct wg_parser_event *event; + struct wg_parser_event event; };
struct wg_parser_stream_copy_buffer_params diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index e661ea9bee9..1d287c76da2 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -679,7 +679,7 @@ static NTSTATUS wg_parser_stream_disable(void *args)
static NTSTATUS wg_parser_stream_get_event(void *args) { - const struct wg_parser_stream_get_event_params *params = args; + struct wg_parser_stream_get_event_params *params = args; struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); struct wg_parser *parser = stream->parser;
@@ -695,7 +695,7 @@ static NTSTATUS wg_parser_stream_get_event(void *args) return VFW_E_WRONG_STATE; }
- *params->event = stream->event; + params->event = stream->event;
if (stream->event.type != WG_PARSER_EVENT_BUFFER) {
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 2 +- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index ae186e967c4..b989b980ebb 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -191,7 +191,7 @@ void wg_parser_stream_enable(wg_parser_stream_t stream, const struct wg_format * struct wg_parser_stream_enable_params params = { .stream = stream, - .format = format, + .format = *format, };
__wine_unix_call(unix_handle, unix_wg_parser_stream_enable, ¶ms); diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 4547ece2337..fc3bd857b18 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -199,7 +199,7 @@ struct wg_parser_stream_get_preferred_format_params struct wg_parser_stream_enable_params { wg_parser_stream_t stream; - const struct wg_format *format; + struct wg_format format; };
struct wg_parser_stream_disable_params diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 1d287c76da2..7e93b6e1275 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -633,7 +633,7 @@ static NTSTATUS wg_parser_stream_enable(void *args) { const struct wg_parser_stream_enable_params *params = args; struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); - const struct wg_format *format = params->format; + const struct wg_format *format = ¶ms->format;
stream->current_format = *format; stream->enabled = true;
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 2 +- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index b989b980ebb..b5c1f8c121a 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -180,10 +180,10 @@ void wg_parser_stream_get_preferred_format(wg_parser_stream_t stream, struct wg_ struct wg_parser_stream_get_preferred_format_params params = { .stream = stream, - .format = format, };
__wine_unix_call(unix_handle, unix_wg_parser_stream_get_preferred_format, ¶ms); + *format = params.format; }
void wg_parser_stream_enable(wg_parser_stream_t stream, const struct wg_format *format) diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index fc3bd857b18..453cb3a1e20 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -193,7 +193,7 @@ struct wg_parser_get_stream_params struct wg_parser_stream_get_preferred_format_params { wg_parser_stream_t stream; - struct wg_format *format; + struct wg_format format; };
struct wg_parser_stream_enable_params diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 7e93b6e1275..df6586a493c 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -622,10 +622,10 @@ static NTSTATUS wg_parser_push_data(void *args)
static NTSTATUS wg_parser_stream_get_preferred_format(void *args) { - const struct wg_parser_stream_get_preferred_format_params *params = args; + struct wg_parser_stream_get_preferred_format_params *params = args; struct wg_parser_stream *stream = get_wg_parser_stream(params->stream);
- *params->format = stream->preferred_format; + params->format = stream->preferred_format; return S_OK; }
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/wg_parser.c | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index df6586a493c..cc68bed9d6d 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -2067,3 +2067,38 @@ const unixlib_entry_t __wine_unix_call_funcs[] = X(wg_parser_stream_get_duration), X(wg_parser_stream_seek), }; + +#ifdef _WIN64 + +const unixlib_entry_t __wine_unix_call_wow64_funcs[] = +{ +#define X(name) [unix_ ## name] = name + X(wg_parser_create), + X(wg_parser_destroy), + + X(wg_parser_connect), + X(wg_parser_disconnect), + + X(wg_parser_begin_flush), + X(wg_parser_end_flush), + + X(wg_parser_get_next_read_offset), + X(wg_parser_push_data), + + X(wg_parser_get_stream_count), + X(wg_parser_get_stream), + + X(wg_parser_stream_get_preferred_format), + X(wg_parser_stream_enable), + X(wg_parser_stream_disable), + + X(wg_parser_stream_get_event), + X(wg_parser_stream_copy_buffer), + X(wg_parser_stream_release_buffer), + X(wg_parser_stream_notify_qos), + + X(wg_parser_stream_get_duration), + X(wg_parser_stream_seek), +}; + +#endif