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);
}
/**
- * gst_pad_select:
+ * gst_pad_selectv:
* @padlist: a #GList of pads.
*
* Waits for a buffer on any of the list of pads.
* Use #gst_pad_pull() to get the buffer.
*/
GstPad*
-gst_pad_select (GList *padlist)
+gst_pad_selectv (GList *padlist)
{
GstPad *pad;
}
/**
- * 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.
*
* 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)
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;
}
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 */
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);