winegstreamer: Don't force existing_new_pad() 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:
parent
070612814b
commit
2d8add43a7
|
@ -47,9 +47,6 @@ static void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user)
|
||||||
{
|
{
|
||||||
struct cb_data *cbdata = user;
|
struct cb_data *cbdata = user;
|
||||||
|
|
||||||
if (cbdata->type < GSTDEMUX_MAX)
|
|
||||||
perform_cb_gstdemux(cbdata);
|
|
||||||
else if (cbdata->type < MEDIA_SOURCE_MAX)
|
|
||||||
perform_cb_media_source(cbdata);
|
perform_cb_media_source(cbdata);
|
||||||
|
|
||||||
pthread_mutex_lock(&cbdata->lock);
|
pthread_mutex_lock(&cbdata->lock);
|
||||||
|
@ -136,17 +133,6 @@ static void call_cb(struct cb_data *cbdata)
|
||||||
pthread_mutex_destroy(&cbdata->lock);
|
pthread_mutex_destroy(&cbdata->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user)
|
|
||||||
{
|
|
||||||
struct cb_data cbdata = { EXISTING_NEW_PAD };
|
|
||||||
|
|
||||||
cbdata.u.pad_added_data.element = bin;
|
|
||||||
cbdata.u.pad_added_data.pad = pad;
|
|
||||||
cbdata.u.pad_added_data.user = user;
|
|
||||||
|
|
||||||
call_cb(&cbdata);
|
|
||||||
}
|
|
||||||
|
|
||||||
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len,
|
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len,
|
||||||
GstBuffer **buf)
|
GstBuffer **buf)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,8 +30,6 @@ typedef enum {
|
||||||
} GstAutoplugSelectResult;
|
} GstAutoplugSelectResult;
|
||||||
|
|
||||||
enum CB_TYPE {
|
enum CB_TYPE {
|
||||||
EXISTING_NEW_PAD,
|
|
||||||
GSTDEMUX_MAX,
|
|
||||||
BYTESTREAM_WRAPPER_PULL,
|
BYTESTREAM_WRAPPER_PULL,
|
||||||
BYTESTREAM_QUERY,
|
BYTESTREAM_QUERY,
|
||||||
BYTESTREAM_PAD_MODE_ACTIVATE,
|
BYTESTREAM_PAD_MODE_ACTIVATE,
|
||||||
|
@ -102,10 +100,8 @@ struct cb_data {
|
||||||
};
|
};
|
||||||
|
|
||||||
void mark_wine_thread(void) DECLSPEC_HIDDEN;
|
void mark_wine_thread(void) DECLSPEC_HIDDEN;
|
||||||
void perform_cb_gstdemux(struct cb_data *data) DECLSPEC_HIDDEN;
|
|
||||||
void perform_cb_media_source(struct cb_data *data) DECLSPEC_HIDDEN;
|
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;
|
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;
|
void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
|
||||||
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
|
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -2198,7 +2198,7 @@ static BOOL decodebin_parser_init_gst(struct parser *filter)
|
||||||
|
|
||||||
gst_bin_add(GST_BIN(parser->container), element);
|
gst_bin_add(GST_BIN(parser->container), element);
|
||||||
|
|
||||||
g_signal_connect(element, "pad-added", G_CALLBACK(existing_new_pad_wrapper), parser);
|
g_signal_connect(element, "pad-added", G_CALLBACK(existing_new_pad), parser);
|
||||||
g_signal_connect(element, "pad-removed", G_CALLBACK(removed_decoded_pad), parser);
|
g_signal_connect(element, "pad-removed", G_CALLBACK(removed_decoded_pad), parser);
|
||||||
g_signal_connect(element, "autoplug-select", G_CALLBACK(autoplug_blacklist), parser);
|
g_signal_connect(element, "autoplug-select", G_CALLBACK(autoplug_blacklist), parser);
|
||||||
g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads), parser);
|
g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads), parser);
|
||||||
|
@ -2917,23 +2917,6 @@ static HRESULT GST_RemoveOutputPins(struct parser *This)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void perform_cb_gstdemux(struct cb_data *cbdata)
|
|
||||||
{
|
|
||||||
switch(cbdata->type)
|
|
||||||
{
|
|
||||||
case EXISTING_NEW_PAD:
|
|
||||||
{
|
|
||||||
struct pad_added_data *data = &cbdata->u.pad_added_data;
|
|
||||||
existing_new_pad(data->element, data->pad, data->user);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
assert(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TYPE *b)
|
static BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TYPE *b)
|
||||||
{
|
{
|
||||||
return IsEqualGUID(&a->majortype, &b->majortype)
|
return IsEqualGUID(&a->majortype, &b->majortype)
|
||||||
|
@ -3103,7 +3086,7 @@ static BOOL avi_splitter_init_gst(struct parser *filter)
|
||||||
|
|
||||||
gst_bin_add(GST_BIN(parser->container), element);
|
gst_bin_add(GST_BIN(parser->container), element);
|
||||||
|
|
||||||
g_signal_connect(element, "pad-added", G_CALLBACK(existing_new_pad_wrapper), parser);
|
g_signal_connect(element, "pad-added", G_CALLBACK(existing_new_pad), parser);
|
||||||
g_signal_connect(element, "pad-removed", G_CALLBACK(removed_decoded_pad), parser);
|
g_signal_connect(element, "pad-removed", G_CALLBACK(removed_decoded_pad), parser);
|
||||||
g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads), parser);
|
g_signal_connect(element, "no-more-pads", G_CALLBACK(no_more_pads), parser);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue