winegstreamer: Don't force query_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-02-09 17:13:59 -06:00 committed by Alexandre Julliard
parent 29cea50d27
commit d355fa7988
3 changed files with 1 additions and 29 deletions

View File

@ -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)
{

View File

@ -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;

View File

@ -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);