winegstreamer: Don't force got_data_sink() onto a Wine thread.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-01-23 12:43:47 -06:00 committed by Alexandre Julliard
parent 2cdb12b08e
commit 3d7486d66b
3 changed files with 1 additions and 28 deletions

View File

@ -216,19 +216,6 @@ gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event)
return cbdata.u.event_sink_data.ret; return cbdata.u.event_sink_data.ret;
} }
GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf)
{
struct cb_data cbdata = { GOT_DATA_SINK };
cbdata.u.got_data_sink_data.pad = pad;
cbdata.u.got_data_sink_data.parent = parent;
cbdata.u.got_data_sink_data.buf = buf;
call_cb(&cbdata);
return cbdata.u.got_data_sink_data.ret;
}
void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user)
{ {
struct cb_data cbdata = { REMOVED_DECODED_PAD }; struct cb_data cbdata = { REMOVED_DECODED_PAD };

View File

@ -36,7 +36,6 @@ enum CB_TYPE {
REQUEST_BUFFER_SRC, REQUEST_BUFFER_SRC,
EVENT_SRC, EVENT_SRC,
EVENT_SINK, EVENT_SINK,
GOT_DATA_SINK,
REMOVED_DECODED_PAD, REMOVED_DECODED_PAD,
QUERY_SINK, QUERY_SINK,
GSTDEMUX_MAX, GSTDEMUX_MAX,
@ -102,12 +101,6 @@ struct cb_data {
GstEvent *event; GstEvent *event;
gboolean ret; gboolean ret;
} event_sink_data; } event_sink_data;
struct got_data_sink_data {
GstPad *pad;
GstObject *parent;
GstBuffer *buf;
GstFlowReturn ret;
} got_data_sink_data;
struct pad_removed_data { struct pad_removed_data {
GstElement *element; GstElement *element;
GstPad *pad; GstPad *pad;
@ -137,7 +130,6 @@ gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode,
GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN; GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;

View File

@ -2378,7 +2378,7 @@ static struct parser_source *create_pin(struct parser *filter, const WCHAR *name
sprintf(pad_name, "qz_sink_%u", filter->source_count); sprintf(pad_name, "qz_sink_%u", filter->source_count);
pin->my_sink = gst_pad_new(pad_name, GST_PAD_SINK); pin->my_sink = gst_pad_new(pad_name, GST_PAD_SINK);
gst_pad_set_element_private(pin->my_sink, pin); gst_pad_set_element_private(pin->my_sink, pin);
gst_pad_set_chain_function(pin->my_sink, got_data_sink_wrapper); gst_pad_set_chain_function(pin->my_sink, got_data_sink);
gst_pad_set_event_function(pin->my_sink, event_sink_wrapper); gst_pad_set_event_function(pin->my_sink, event_sink_wrapper);
gst_pad_set_query_function(pin->my_sink, query_sink_wrapper); gst_pad_set_query_function(pin->my_sink, query_sink_wrapper);
@ -2465,12 +2465,6 @@ void perform_cb_gstdemux(struct cb_data *cbdata)
cbdata->u.event_sink_data.ret = event_sink(data->pad, data->parent, data->event); cbdata->u.event_sink_data.ret = event_sink(data->pad, data->parent, data->event);
break; break;
} }
case GOT_DATA_SINK:
{
struct got_data_sink_data *data = &cbdata->u.got_data_sink_data;
cbdata->u.got_data_sink_data.ret = got_data_sink(data->pad, data->parent, data->buf);
break;
}
case REMOVED_DECODED_PAD: case REMOVED_DECODED_PAD:
{ {
struct pad_removed_data *data = &cbdata->u.pad_removed_data; struct pad_removed_data *data = &cbdata->u.pad_removed_data;