diff --git a/ChangeLog b/ChangeLog index 4dd0682b4d..eda7cdb115 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-12-20 Edward Hervey + + * gst/gstcaps.c: (gst_static_caps_get_type): + * gst/gstcaps.h: + Added gpointer GType for GstStaticCaps so we can wrap them in bindings. + * gst/gstpadtemplate.c: (gst_static_pad_template_get_type): + * gst/gstpadtemplate.h: + Added gpointer GType for GstStaticPadTemplate so we can wrap them in + bindings. + 2005-12-18 Wim Taymans * libs/gst/base/gstadapter.c: diff --git a/gst/gstcaps.c b/gst/gstcaps.c index c58b6592f2..368036745e 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -389,6 +389,18 @@ gst_caps_unref (GstCaps * caps) } } +GType +gst_static_caps_get_type (void) +{ + static GType staticcaps_type = 0; + + if (!staticcaps_type) { + staticcaps_type = g_pointer_type_register_static ("GstStaticCaps"); + } + return staticcaps_type; +} + + /** * gst_static_caps_get: * @static_caps: the #GstStaticCaps to convert diff --git a/gst/gstcaps.h b/gst/gstcaps.h index 755a9aaca3..15976d8d33 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -30,6 +30,8 @@ G_BEGIN_DECLS #define GST_CAPS(object) ((GstCaps*)object) #define GST_IS_CAPS(object) ((object) && (GST_CAPS(object)->type == GST_TYPE_CAPS)) +#define GST_TYPE_STATIC_CAPS (gst_static_caps_get_type()) + /** * GstCapsFlags: * @GST_CAPS_FLAGS_ANY: Caps has no specific content, but can contain @@ -186,6 +188,7 @@ GstCaps * gst_caps_copy (const GstCaps * caps); GstCaps * gst_caps_make_writable (GstCaps *caps); void gst_caps_unref (GstCaps* caps); +GType gst_static_caps_get_type (void); GstCaps * gst_static_caps_get (GstStaticCaps *static_caps); /* manipulation */ diff --git a/gst/gstpadtemplate.c b/gst/gstpadtemplate.c index 9670a1c649..dc87156a5e 100644 --- a/gst/gstpadtemplate.c +++ b/gst/gstpadtemplate.c @@ -213,6 +213,18 @@ name_is_valid (const gchar * name, GstPadPresence presence) return TRUE; } +GType +gst_static_pad_template_get_type (void) +{ + static GType staticpadtemplate_type = 0; + + if (!staticpadtemplate_type) { + staticpadtemplate_type = + g_pointer_type_register_static ("GstStaticPadTemplate"); + } + return staticpadtemplate_type; +} + /** * gst_static_pad_template_get: * @pad_template: the static pad template diff --git a/gst/gstpadtemplate.h b/gst/gstpadtemplate.h index 2868dd9188..1422a59403 100644 --- a/gst/gstpadtemplate.h +++ b/gst/gstpadtemplate.h @@ -40,6 +40,8 @@ G_BEGIN_DECLS typedef struct _GstPadTemplateClass GstPadTemplateClass; typedef struct _GstStaticPadTemplate GstStaticPadTemplate; +#define GST_TYPE_STATIC_PAD_TEMPLATE (gst_static_pad_template_get_type ()) + #define GST_TYPE_PAD_TEMPLATE (gst_pad_template_get_type ()) #define GST_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD_TEMPLATE,GstPadTemplate)) #define GST_PAD_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD_TEMPLATE,GstPadTemplateClass)) @@ -165,6 +167,7 @@ struct _GstStaticPadTemplate { /* templates and factories */ GType gst_pad_template_get_type (void); +GType gst_static_pad_template_get_type (void); GstPadTemplate* gst_pad_template_new (const gchar *name_template, GstPadDirection direction, GstPadPresence presence,