X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstpadtemplate.c;h=d7fe0a53d91ee42769a396a0bf55967885080755;hb=e234a10c635cb290fbab1284b3a86202e9fc124c;hp=e6c8c0b3f2db155d0f05e65a0bf68f69b762e3f0;hpb=30a7fd7b4d187dc4209941c52b4430d842f88876;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstpadtemplate.c b/gst/gstpadtemplate.c index e6c8c0b..d7fe0a5 100644 --- a/gst/gstpadtemplate.c +++ b/gst/gstpadtemplate.c @@ -123,7 +123,6 @@ enum LAST_SIGNAL }; -static GstObject *parent_class = NULL; static guint gst_pad_template_signals[LAST_SIGNAL] = { 0 }; static void gst_pad_template_dispose (GObject * object); @@ -132,6 +131,7 @@ static void gst_pad_template_set_property (GObject * object, guint prop_id, static void gst_pad_template_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +#define gst_pad_template_parent_class parent_class G_DEFINE_TYPE (GstPadTemplate, gst_pad_template, GST_TYPE_OBJECT); static void @@ -143,8 +143,6 @@ gst_pad_template_class_init (GstPadTemplateClass * klass) gobject_class = (GObjectClass *) klass; gstobject_class = (GstObjectClass *) klass; - parent_class = g_type_class_peek_parent (klass); - /** * GstPadTemplate::pad-created: * @pad_template: the object which received the signal. @@ -274,17 +272,7 @@ name_is_valid (const gchar * name, GstPadPresence presence) return TRUE; } -GType -gst_static_pad_template_get_type (void) -{ - static GType staticpadtemplate_type = 0; - - if (G_UNLIKELY (staticpadtemplate_type == 0)) { - staticpadtemplate_type = - g_pointer_type_register_static ("GstStaticPadTemplate"); - } - return staticpadtemplate_type; -} +G_DEFINE_POINTER_TYPE (GstStaticPadTemplate, gst_static_pad_template); /** * gst_static_pad_template_get: @@ -322,12 +310,12 @@ gst_static_pad_template_get (GstStaticPadTemplate * pad_template) * @name_template: the name template. * @direction: the #GstPadDirection of the template. * @presence: the #GstPadPresence of the pad. - * @caps: a #GstCaps set for the template. + * @caps: (transfer none): a #GstCaps set for the template. * * Creates a new pad template with a name according to the given template * and with the given arguments. * - * Returns: (transfer full): a new #GstPadTemplate. + * Returns: (transfer floating): a new #GstPadTemplate. */ GstPadTemplate * gst_pad_template_new (const gchar * name_template, @@ -415,10 +403,12 @@ gst_pad_template_set_property (GObject * object, guint prop_id, GST_PAD_TEMPLATE_NAME_TEMPLATE (object) = g_value_dup_string (value); break; case PROP_DIRECTION: - GST_PAD_TEMPLATE_DIRECTION (object) = g_value_get_enum (value); + GST_PAD_TEMPLATE_DIRECTION (object) = + (GstPadDirection) g_value_get_enum (value); break; case PROP_PRESENCE: - GST_PAD_TEMPLATE_PRESENCE (object) = g_value_get_enum (value); + GST_PAD_TEMPLATE_PRESENCE (object) = + (GstPadPresence) g_value_get_enum (value); break; case PROP_CAPS: GST_PAD_TEMPLATE_CAPS (object) = g_value_dup_boxed (value);