Commit 168ec2c8 authored by Derek Lesho's avatar Derek Lesho Committed by Alexandre Julliard

winegstreamer: Make callback parameter names more generic.

parent 7770e26f
...@@ -89,9 +89,9 @@ void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) ...@@ -89,9 +89,9 @@ void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user)
{ {
struct cb_data cbdata = { EXISTING_NEW_PAD }; struct cb_data cbdata = { EXISTING_NEW_PAD };
cbdata.u.existing_new_pad_data.bin = bin; cbdata.u.pad_added_data.element = bin;
cbdata.u.existing_new_pad_data.pad = pad; cbdata.u.pad_added_data.pad = pad;
cbdata.u.existing_new_pad_data.user = user; cbdata.u.pad_added_data.user = user;
call_cb(&cbdata); call_cb(&cbdata);
} }
...@@ -123,11 +123,11 @@ gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, ...@@ -123,11 +123,11 @@ gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode,
return cbdata.u.activate_mode_data.ret; return cbdata.u.activate_mode_data.ret;
} }
void no_more_pads_wrapper(GstElement *decodebin, gpointer user) void no_more_pads_wrapper(GstElement *element, gpointer user)
{ {
struct cb_data cbdata = { NO_MORE_PADS }; struct cb_data cbdata = { NO_MORE_PADS };
cbdata.u.no_more_pads_data.decodebin = decodebin; cbdata.u.no_more_pads_data.element = element;
cbdata.u.no_more_pads_data.user = user; cbdata.u.no_more_pads_data.user = user;
call_cb(&cbdata); call_cb(&cbdata);
...@@ -138,15 +138,15 @@ GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ...@@ -138,15 +138,15 @@ GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64
{ {
struct cb_data cbdata = { REQUEST_BUFFER_SRC }; struct cb_data cbdata = { REQUEST_BUFFER_SRC };
cbdata.u.request_buffer_src_data.pad = pad; cbdata.u.getrange_data.pad = pad;
cbdata.u.request_buffer_src_data.parent = parent; cbdata.u.getrange_data.parent = parent;
cbdata.u.request_buffer_src_data.ofs = ofs; cbdata.u.getrange_data.ofs = ofs;
cbdata.u.request_buffer_src_data.len = len; cbdata.u.getrange_data.len = len;
cbdata.u.request_buffer_src_data.buf = buf; cbdata.u.getrange_data.buf = buf;
call_cb(&cbdata); call_cb(&cbdata);
return cbdata.u.request_buffer_src_data.ret; return cbdata.u.getrange_data.ret;
} }
gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event)
...@@ -192,9 +192,9 @@ void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) ...@@ -192,9 +192,9 @@ 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 };
cbdata.u.removed_decoded_pad_data.bin = bin; cbdata.u.pad_removed_data.element = bin;
cbdata.u.removed_decoded_pad_data.pad = pad; cbdata.u.pad_removed_data.pad = pad;
cbdata.u.removed_decoded_pad_data.user = user; cbdata.u.pad_removed_data.user = user;
call_cb(&cbdata); call_cb(&cbdata);
} }
......
...@@ -54,11 +54,11 @@ struct cb_data { ...@@ -54,11 +54,11 @@ struct cb_data {
gpointer user; gpointer user;
GstBusSyncReply ret; GstBusSyncReply ret;
} watch_bus_data; } watch_bus_data;
struct existing_new_pad_data { struct pad_added_data {
GstElement *bin; GstElement *element;
GstPad *pad; GstPad *pad;
gpointer user; gpointer user;
} existing_new_pad_data; } pad_added_data;
struct query_function_data { struct query_function_data {
GstPad *pad; GstPad *pad;
GstObject *parent; GstObject *parent;
...@@ -73,17 +73,17 @@ struct cb_data { ...@@ -73,17 +73,17 @@ struct cb_data {
gboolean ret; gboolean ret;
} activate_mode_data; } activate_mode_data;
struct no_more_pads_data { struct no_more_pads_data {
GstElement *decodebin; GstElement *element;
gpointer user; gpointer user;
} no_more_pads_data; } no_more_pads_data;
struct request_buffer_src_data { struct getrange_data {
GstPad *pad; GstPad *pad;
GstObject *parent; GstObject *parent;
guint64 ofs; guint64 ofs;
guint len; guint len;
GstBuffer **buf; GstBuffer **buf;
GstFlowReturn ret; GstFlowReturn ret;
} request_buffer_src_data; } getrange_data;
struct event_src_data { struct event_src_data {
GstPad *pad; GstPad *pad;
GstObject *parent; GstObject *parent;
...@@ -102,11 +102,11 @@ struct cb_data { ...@@ -102,11 +102,11 @@ struct cb_data {
GstBuffer *buf; GstBuffer *buf;
GstFlowReturn ret; GstFlowReturn ret;
} got_data_sink_data; } got_data_sink_data;
struct removed_decoded_pad_data { struct pad_removed_data {
GstElement *bin; GstElement *element;
GstPad *pad; GstPad *pad;
gpointer user; gpointer user;
} removed_decoded_pad_data; } pad_removed_data;
struct autoplug_blacklist_data { struct autoplug_blacklist_data {
GstElement *bin; GstElement *bin;
GstPad *pad; GstPad *pad;
......
...@@ -2201,8 +2201,8 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) ...@@ -2201,8 +2201,8 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user)
} }
case EXISTING_NEW_PAD: case EXISTING_NEW_PAD:
{ {
struct existing_new_pad_data *data = &cbdata->u.existing_new_pad_data; struct pad_added_data *data = &cbdata->u.pad_added_data;
existing_new_pad(data->bin, data->pad, data->user); existing_new_pad(data->element, data->pad, data->user);
break; break;
} }
case QUERY_FUNCTION: case QUERY_FUNCTION:
...@@ -2220,13 +2220,13 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) ...@@ -2220,13 +2220,13 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user)
case NO_MORE_PADS: case NO_MORE_PADS:
{ {
struct no_more_pads_data *data = &cbdata->u.no_more_pads_data; struct no_more_pads_data *data = &cbdata->u.no_more_pads_data;
no_more_pads(data->decodebin, data->user); no_more_pads(data->element, data->user);
break; break;
} }
case REQUEST_BUFFER_SRC: case REQUEST_BUFFER_SRC:
{ {
struct request_buffer_src_data *data = &cbdata->u.request_buffer_src_data; struct getrange_data *data = &cbdata->u.getrange_data;
cbdata->u.request_buffer_src_data.ret = request_buffer_src(data->pad, data->parent, cbdata->u.getrange_data.ret = request_buffer_src(data->pad, data->parent,
data->ofs, data->len, data->buf); data->ofs, data->len, data->buf);
break; break;
} }
...@@ -2250,8 +2250,8 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) ...@@ -2250,8 +2250,8 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user)
} }
case REMOVED_DECODED_PAD: case REMOVED_DECODED_PAD:
{ {
struct removed_decoded_pad_data *data = &cbdata->u.removed_decoded_pad_data; struct pad_removed_data *data = &cbdata->u.pad_removed_data;
removed_decoded_pad(data->bin, data->pad, data->user); removed_decoded_pad(data->element, data->pad, data->user);
break; break;
} }
case AUTOPLUG_BLACKLIST: case AUTOPLUG_BLACKLIST:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment