mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
change gst_pad_select() to gst_pad_selectv(), and add/fix gst_pad_select() and gst_pad_select_valist()
Original commit message from CVS: change gst_pad_select() to gst_pad_selectv(), and add/fix gst_pad_select() and gst_pad_select_valist()
This commit is contained in:
parent
b061d65ecc
commit
71454fa19c
4 changed files with 36 additions and 12 deletions
|
@ -334,7 +334,7 @@ gst_aggregator_loop (GstElement *element)
|
|||
|
||||
debug = "loop_select";
|
||||
|
||||
pad = gst_pad_select (aggregator->sinkpads);
|
||||
pad = gst_pad_selectv (aggregator->sinkpads);
|
||||
buf = GST_BUFFER (gst_pad_pull (pad));
|
||||
|
||||
gst_aggregator_push (aggregator, pad, buf, debug);
|
||||
|
|
39
gst/gstpad.c
39
gst/gstpad.c
|
@ -2422,7 +2422,7 @@ restart:
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_pad_select:
|
||||
* gst_pad_selectv:
|
||||
* @padlist: a #GList of pads.
|
||||
*
|
||||
* Waits for a buffer on any of the list of pads.
|
||||
|
@ -2431,7 +2431,7 @@ restart:
|
|||
* Use #gst_pad_pull() to get the buffer.
|
||||
*/
|
||||
GstPad*
|
||||
gst_pad_select (GList *padlist)
|
||||
gst_pad_selectv (GList *padlist)
|
||||
{
|
||||
GstPad *pad;
|
||||
|
||||
|
@ -2441,7 +2441,7 @@ gst_pad_select (GList *padlist)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_pad_selectv:
|
||||
* gst_pad_select:
|
||||
* @pad: a first #GstPad to perform the select on.
|
||||
* @...: A NULL-terminated list of more pads to select on.
|
||||
*
|
||||
|
@ -2451,10 +2451,9 @@ gst_pad_select (GList *padlist)
|
|||
* Use #gst_pad_pull() to get the buffer.
|
||||
*/
|
||||
GstPad*
|
||||
gst_pad_selectv (GstPad *pad, ...)
|
||||
gst_pad_select (GstPad *pad, ...)
|
||||
{
|
||||
GstPad *result;
|
||||
GList *padlist = NULL;
|
||||
va_list var_args;
|
||||
|
||||
if (pad == NULL)
|
||||
|
@ -2462,15 +2461,39 @@ gst_pad_selectv (GstPad *pad, ...)
|
|||
|
||||
va_start (var_args, pad);
|
||||
|
||||
result = gst_pad_select_valist (pad, var_args);
|
||||
|
||||
va_end (var_args);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_pad_select_valist:
|
||||
* @pad: a first #GstPad to perform the select on.
|
||||
* @varargs: A va_list of more pads to select on.
|
||||
*
|
||||
* Waits for a buffer on the given set of pads.
|
||||
*
|
||||
* Returns: the #GstPad that has a buffer available.
|
||||
* Use #gst_pad_pull() to get the buffer.
|
||||
*/
|
||||
GstPad*
|
||||
gst_pad_select_valist (GstPad *pad, va_list var_args)
|
||||
{
|
||||
GstPad *result;
|
||||
GList *padlist = NULL;
|
||||
|
||||
if (pad == NULL)
|
||||
return NULL;
|
||||
|
||||
while (pad) {
|
||||
padlist = g_list_prepend (padlist, pad);
|
||||
pad = va_arg (var_args, GstPad *);
|
||||
}
|
||||
result = gst_pad_select (padlist);
|
||||
result = gst_pad_selectv (padlist);
|
||||
g_list_free (padlist);
|
||||
|
||||
va_end (var_args);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -476,8 +476,9 @@ void gst_pad_push (GstPad *pad, GstData *data);
|
|||
GstData* gst_pad_pull (GstPad *pad);
|
||||
gboolean gst_pad_send_event (GstPad *pad, GstEvent *event);
|
||||
gboolean gst_pad_event_default (GstPad *pad, GstEvent *event);
|
||||
GstPad* gst_pad_select (GList *padlist);
|
||||
GstPad* gst_pad_selectv (GstPad *pad, ...);
|
||||
GstPad* gst_pad_selectv (GList *padlist);
|
||||
GstPad* gst_pad_select (GstPad *pad, ...);
|
||||
GstPad* gst_pad_select_valist (GstPad *pad, va_list varargs);
|
||||
|
||||
|
||||
/* convert/query/format functions */
|
||||
|
|
|
@ -334,7 +334,7 @@ gst_aggregator_loop (GstElement *element)
|
|||
|
||||
debug = "loop_select";
|
||||
|
||||
pad = gst_pad_select (aggregator->sinkpads);
|
||||
pad = gst_pad_selectv (aggregator->sinkpads);
|
||||
buf = GST_BUFFER (gst_pad_pull (pad));
|
||||
|
||||
gst_aggregator_push (aggregator, pad, buf, debug);
|
||||
|
|
Loading…
Reference in a new issue