}
/**
- * gst_pad_template_new:
+ * gst_pad_template_newv:
* @name_template: the name template.
* @direction: the #GstPadDirection of the template.
* @presence: the #GstPadPresence of the pad.
* @caps: a #GstCaps set for the template.
- * @...: a NULL-terminated list of #GstCaps.
+ * @var_args: a NULL-terminated list of #GstCaps.
*
* Creates a new pad template with a name according to the given template
* and with the given arguments.
* Returns: a new #GstPadTemplate.
*/
GstPadTemplate*
-gst_pad_template_new (const gchar *name_template,
- GstPadDirection direction, GstPadPresence presence,
- GstCaps *caps, ...)
+gst_pad_template_newv (const gchar *name_template,
+ GstPadDirection direction, GstPadPresence presence,
+ GstCaps *caps, va_list var_args)
{
GstPadTemplate *new;
- va_list var_args;
GstCaps *thecaps = NULL;
g_return_val_if_fail (name_template != NULL, NULL);
GST_PAD_TEMPLATE_DIRECTION (new) = direction;
GST_PAD_TEMPLATE_PRESENCE (new) = presence;
- va_start (var_args, caps);
-
GST_FLAG_SET (GST_OBJECT (new), GST_PAD_TEMPLATE_FIXED);
while (caps) {
if (!GST_CAPS_IS_FIXED (caps)) {
thecaps = gst_caps_append (thecaps, caps);
caps = va_arg (var_args, GstCaps*);
}
- va_end (var_args);
GST_PAD_TEMPLATE_CAPS (new) = thecaps;
gst_caps_ref (thecaps);
}
/**
+ * gst_pad_template_new:
+ * @name_template: the name template.
+ * @direction: the #GstPadDirection of the template.
+ * @presence: the #GstPadPresence of the pad.
+ * @caps: a #GstCaps set for the template.
+ * @...: a NULL-terminated list of #GstCaps.
+ *
+ * Creates a new pad template with a name according to the given template
+ * and with the given arguments.
+ *
+ * Returns: a new #GstPadTemplate.
+ */
+GstPadTemplate*
+gst_pad_template_new (const gchar *name_template,
+ GstPadDirection direction, GstPadPresence presence,
+ GstCaps *caps, ...)
+{
+ GstPadTemplate *new;
+ va_list var_args;
+
+ va_start (var_args, caps);
+
+ new = gst_pad_template_newv (name_template, direction, presence,
+ caps, var_args);
+
+ va_end (var_args);
+
+ return new;
+}
+
+/**
* gst_pad_template_get_caps:
* @templ: a #GstPadTemplate to get capabilities of.
*
GstPadDirection direction, GstPadPresence presence,
GstCaps *caps, ...);
+GstPadTemplate* gst_pad_template_newv (const gchar *name_template,
+ GstPadDirection direction, GstPadPresence presence,
+ GstCaps *caps, va_list var_args);
+
GstCaps* gst_pad_template_get_caps (GstPadTemplate *templ);
GstCaps* gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const gchar *name);