Zebediah Figura : winegstreamer: Don't force existing_new_pad() onto a Wine thread.
Alexandre Julliard
julliard at winehq.org
Thu Feb 11 15:37:14 CST 2021
Module: wine
Branch: master
Commit: 2d8add43a725f6898d6c163ba5e652dc8053c650
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d8add43a725f6898d6c163ba5e652dc8053c650
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Feb 10 16:18:28 2021 -0600
winegstreamer: Don't force existing_new_pad() 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 | 16 +---------------
dlls/winegstreamer/gst_cbs.h | 4 ----
dlls/winegstreamer/gstdemux.c | 21 ++-------------------
3 files changed, 3 insertions(+), 38 deletions(-)
diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c
index 312c12fd194..d037c195971 100644
--- a/dlls/winegstreamer/gst_cbs.c
+++ b/dlls/winegstreamer/gst_cbs.c
@@ -47,10 +47,7 @@ static void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *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);
cbdata->finished = 1;
@@ -136,17 +133,6 @@ static void call_cb(struct cb_data *cbdata)
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,
GstBuffer **buf)
{
diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h
index f6f1ffb526b..fd90373d900 100644
--- a/dlls/winegstreamer/gst_cbs.h
+++ b/dlls/winegstreamer/gst_cbs.h
@@ -30,8 +30,6 @@ typedef enum {
} GstAutoplugSelectResult;
enum CB_TYPE {
- EXISTING_NEW_PAD,
- GSTDEMUX_MAX,
BYTESTREAM_WRAPPER_PULL,
BYTESTREAM_QUERY,
BYTESTREAM_PAD_MODE_ACTIVATE,
@@ -102,10 +100,8 @@ struct cb_data {
};
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 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;
GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index bc1bc71a907..1e14f073480 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -2198,7 +2198,7 @@ static BOOL decodebin_parser_init_gst(struct parser *filter)
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, "autoplug-select", G_CALLBACK(autoplug_blacklist), 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;
}
-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)
{
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);
- 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, "no-more-pads", G_CALLBACK(no_more_pads), parser);
More information about the wine-cvs
mailing list