From 22acd34c4256d321a8a90d228e01331ea3e0e846 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 29 Aug 2011 13:50:02 -0300 Subject: [PATCH] Add gst_structure_get_type https://bugzilla.gnome.org/show_bug.cgi?id=657640 --- gst/gststructure.c | 8 +++++--- gst/gststructure.h | 2 ++ win32/common/libgstreamer.def | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gst/gststructure.c b/gst/gststructure.c index ca16622df0..f561a50ae5 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -113,12 +113,14 @@ static gboolean gst_structure_parse_simple_string (gchar * s, gchar ** end); GType _gst_structure_type = 0; + +G_DEFINE_BOXED_TYPE (GstStructure, gst_structure, + gst_structure_copy_conditional, gst_structure_free); + void _priv_gst_structure_initialize (void) { - _gst_structure_type = g_boxed_type_register_static ("GstStructure", - (GBoxedCopyFunc) gst_structure_copy_conditional, - (GBoxedFreeFunc) gst_structure_free); + _gst_structure_type = gst_structure_get_type (); g_value_register_transform_func (_gst_structure_type, G_TYPE_STRING, gst_structure_transform_to_string); diff --git a/gst/gststructure.h b/gst/gststructure.h index 61e4253816..49ce202858 100644 --- a/gst/gststructure.h +++ b/gst/gststructure.h @@ -83,6 +83,8 @@ struct _GstStructure { GQuark name; }; +GType gst_structure_get_type (void); + GstStructure * gst_structure_empty_new (const gchar * name); GstStructure * gst_structure_id_empty_new (GQuark quark); GstStructure * gst_structure_new (const gchar * name, diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 346c081a30..72173931d5 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -990,6 +990,7 @@ EXPORTS gst_structure_get_name gst_structure_get_name_id gst_structure_get_string + gst_structure_get_type gst_structure_get_uint gst_structure_get_valist gst_structure_get_value