#define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
/**
+ * GST_PAD_TEMPLATE_GTYPE:
+ * @templ: the template to query
+ *
+ * Get the #GType of the padtemplate
+ *
+ * Since: 1.14
+ */
+#define GST_PAD_TEMPLATE_GTYPE(templ) (((GstPadTemplate *)(templ))->ABI.abi.gtype)
+
+/**
* GstPadTemplateFlags:
* @GST_PAD_TEMPLATE_FLAG_LAST: first flag that can be used by subclasses.
*
GstCaps *caps;
/*< private >*/
- gpointer _gst_reserved[GST_PADDING];
+ union {
+ gpointer _gst_reserved[GST_PADDING];
+ struct {
+ GType gtype;
+ } abi;
+ } ABI;
};
struct _GstPadTemplateClass {
* @pres: the GstPadPresence of the pad
* @caps: the GstStaticCaps of the pad
*
- * Convenience macro to fill the values of a GstStaticPadTemplate
+ * Convenience macro to fill the values of a #GstStaticPadTemplate
* structure.
+ * Example:
+ * |[<!-- language="C" -->
+ * static GstStaticPadTemplate my_src_template = \
+ * GST_STATIC_PAD_TEMPLATE("src", GST_PAD_SRC, GST_PAD_ALWAYS,
+ * GST_STATIC_CAPS_ANY);
+ * ]|
*/
#define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps) \
{ \
}
/* templates and factories */
+
+GST_API
GType gst_pad_template_get_type (void);
+
+GST_API
GType gst_static_pad_template_get_type (void);
+GST_API
GstPadTemplate* gst_pad_template_new (const gchar *name_template,
GstPadDirection direction, GstPadPresence presence,
GstCaps *caps) G_GNUC_MALLOC;
-
+GST_API
+GstPadTemplate* gst_pad_template_new_with_gtype (const gchar *name_template,
+ GstPadDirection direction, GstPadPresence presence,
+ GstCaps *caps, GType pad_type) G_GNUC_MALLOC;
+GST_API
GstPadTemplate * gst_static_pad_template_get (GstStaticPadTemplate *pad_template);
+
+GST_API
+GstPadTemplate * gst_pad_template_new_from_static_pad_template_with_gtype (
+ GstStaticPadTemplate * pad_template,
+ GType pad_type);
+
+GST_API
GstCaps* gst_static_pad_template_get_caps (GstStaticPadTemplate *templ);
+
+GST_API
GstCaps* gst_pad_template_get_caps (GstPadTemplate *templ);
+GST_API
void gst_pad_template_pad_created (GstPadTemplate * templ, GstPad * pad);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC