Zebediah Figura : winegstreamer: Don't force query_sink() onto a Wine thread.
Alexandre Julliard
julliard at winehq.org
Wed Feb 10 15:34:01 CST 2021
Module: wine
Branch: master
Commit: d355fa798857d34e8a69fc2e51c4eee3175bbe7a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d355fa798857d34e8a69fc2e51c4eee3175bbe7a
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Feb 9 17:13:59 2021 -0600
winegstreamer: Don't force query_sink() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winegstreamer/gst_cbs.c | 13 -------------
dlls/winegstreamer/gst_cbs.h | 8 --------
dlls/winegstreamer/gstdemux.c | 9 +--------
3 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c
index 90c34b1cb39..312c12fd194 100644
--- a/dlls/winegstreamer/gst_cbs.c
+++ b/dlls/winegstreamer/gst_cbs.c
@@ -147,19 +147,6 @@ void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user)
call_cb(&cbdata);
}
-gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query)
-{
- struct cb_data cbdata = { QUERY_SINK };
-
- cbdata.u.query_sink_data.pad = pad;
- cbdata.u.query_sink_data.parent = parent;
- cbdata.u.query_sink_data.query = query;
-
- call_cb(&cbdata);
-
- return cbdata.u.query_sink_data.ret;
-}
-
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len,
GstBuffer **buf)
{
diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h
index cbd9a630885..f6f1ffb526b 100644
--- a/dlls/winegstreamer/gst_cbs.h
+++ b/dlls/winegstreamer/gst_cbs.h
@@ -31,7 +31,6 @@ typedef enum {
enum CB_TYPE {
EXISTING_NEW_PAD,
- QUERY_SINK,
GSTDEMUX_MAX,
BYTESTREAM_WRAPPER_PULL,
BYTESTREAM_QUERY,
@@ -94,12 +93,6 @@ struct cb_data {
GstPad *pad;
gpointer user;
} pad_removed_data;
- struct query_sink_data {
- GstPad *pad;
- GstObject *parent;
- GstQuery *query;
- gboolean ret;
- } query_sink_data;
} u;
int finished;
@@ -115,7 +108,6 @@ void perform_cb_media_source(struct cb_data *data) DECLSPEC_HIDDEN;
void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
-gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
gboolean bytestream_query_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
gboolean bytestream_pad_mode_activate_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean activate) DECLSPEC_HIDDEN;
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 8fc1e8608a1..e1309e97c4c 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -2858,7 +2858,7 @@ static struct parser_source *create_pin(struct parser *filter, const WCHAR *name
gst_pad_set_element_private(stream->my_sink, pin);
gst_pad_set_chain_function(stream->my_sink, got_data_sink);
gst_pad_set_event_function(stream->my_sink, event_sink);
- gst_pad_set_query_function(stream->my_sink, query_sink_wrapper);
+ gst_pad_set_query_function(stream->my_sink, query_sink);
filter->sources[filter->source_count++] = pin;
parser->streams[parser->stream_count++] = stream;
@@ -2927,13 +2927,6 @@ void perform_cb_gstdemux(struct cb_data *cbdata)
existing_new_pad(data->element, data->pad, data->user);
break;
}
- case QUERY_SINK:
- {
- struct query_sink_data *data = &cbdata->u.query_sink_data;
- cbdata->u.query_sink_data.ret = query_sink(data->pad, data->parent,
- data->query);
- break;
- }
default:
{
assert(0);
More information about the wine-cvs
mailing list