return caps;
}
-GType
-gst_static_caps_get_type (void)
-{
- static GType staticcaps_type = 0;
-
- if (G_UNLIKELY (staticcaps_type == 0)) {
- staticcaps_type = g_pointer_type_register_static ("GstStaticCaps");
- }
- return staticcaps_type;
-}
+G_DEFINE_POINTER_TYPE (GstStaticCaps, gst_static_caps);
/**
* gst_static_caps_get:
return copy;
}
-GType
-gst_iterator_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- type = g_boxed_type_register_static ("GstIterator",
- (GBoxedCopyFunc) gst_iterator_copy, (GBoxedFreeFunc) gst_iterator_free);
- return type;
-}
+G_DEFINE_BOXED_TYPE (GstIterator, gst_iterator,
+ (GBoxedCopyFunc) gst_iterator_copy, (GBoxedFreeFunc) gst_iterator_free);
static void
gst_iterator_init (GstIterator * it,
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:
return ret;
}
-GType
-gst_parse_context_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- type = g_boxed_type_register_static ("GstParseContext",
- (GBoxedCopyFunc) gst_parse_context_copy,
- (GBoxedFreeFunc) gst_parse_context_free);
- }
-
- return type;
-}
+G_DEFINE_BOXED_TYPE (GstParseContext, gst_parse_context,
+ (GBoxedCopyFunc) gst_parse_context_copy,
+ (GBoxedFreeFunc) gst_parse_context_free);
/**
* gst_parse_error_quark:
memcpy (dest, src, sizeof (GstSegment));
}
-GType
-gst_segment_get_type (void)
-{
- static GType gst_segment_type = 0;
-
- if (G_UNLIKELY (gst_segment_type == 0)) {
- gst_segment_type = g_boxed_type_register_static ("GstSegment",
- (GBoxedCopyFunc) gst_segment_copy, (GBoxedFreeFunc) gst_segment_free);
- }
-
- return gst_segment_type;
-}
+G_DEFINE_BOXED_TYPE (GstSegment, gst_segment,
+ (GBoxedCopyFunc) gst_segment_copy, (GBoxedFreeFunc) gst_segment_free);
/**
* gst_segment_new:
/* tags hash table: maps tag name string => GstTagInfo */
static GHashTable *__tags;
-GType
-gst_tag_list_get_type (void)
-{
- static GType _gst_tag_list_type = 0;
-
- if (G_UNLIKELY (_gst_tag_list_type == 0)) {
- _gst_tag_list_type = g_boxed_type_register_static ("GstTagList",
- (GBoxedCopyFunc) gst_tag_list_copy, (GBoxedFreeFunc) gst_tag_list_free);
-
-#if 0
- g_value_register_transform_func (_gst_tag_list_type, G_TYPE_STRING,
- _gst_structure_transform_to_string);
-#endif
- }
+G_DEFINE_BOXED_TYPE (GstTagList, gst_tag_list,
+ (GBoxedCopyFunc) gst_tag_list_copy, (GBoxedFreeFunc) gst_tag_list_free);
- return _gst_tag_list_type;
-}
+/* FIXME: had code:
+ * g_value_register_transform_func (_gst_tag_list_type, G_TYPE_STRING,
+ * _gst_structure_transform_to_string);
+ */
void
_priv_gst_tag_initialize (void)
GST_DEBUG_CATEGORY_EXTERN (type_find_debug);
#define GST_CAT_DEFAULT type_find_debug
-GType
-gst_type_find_get_type (void)
-{
- static GType typefind_type = 0;
-
- if (G_UNLIKELY (typefind_type == 0)) {
- typefind_type = g_pointer_type_register_static ("GstTypeFind");
- }
- return typefind_type;
-}
+G_DEFINE_POINTER_TYPE (GstTypeFind, gst_type_find);
/**
* gst_type_find_register:
FUNC_VALUE_GET_TYPE (fraction, "GstFraction");
-GType
-gst_date_time_get_type (void)
-{
- static GType gst_date_time_type = 0;
-
- if (G_UNLIKELY (gst_date_time_type == 0)) {
- gst_date_time_type = g_boxed_type_register_static ("GstDateTime",
- (GBoxedCopyFunc) gst_date_time_ref,
- (GBoxedFreeFunc) gst_date_time_unref);
- }
-
- return gst_date_time_type;
-}
+G_DEFINE_BOXED_TYPE (GstDateTime, gst_date_time,
+ (GBoxedCopyFunc) gst_date_time_ref, (GBoxedFreeFunc) gst_date_time_unref);
static const GTypeValueTable _gst_bitmask_value_table = {
gst_value_init_bitmask,
}
}
-GType
-gst_base_parse_frame_get_type (void)
-{
- static volatile gsize frame_type = 0;
-
- if (g_once_init_enter (&frame_type)) {
- GType _type;
-
- _type = g_boxed_type_register_static ("GstBaseParseFrame",
- (GBoxedCopyFunc) gst_base_parse_frame_copy,
- (GBoxedFreeFunc) gst_base_parse_frame_free);
- g_once_init_leave (&frame_type, _type);
- }
- return (GType) frame_type;
-}
+G_DEFINE_BOXED_TYPE (GstBaseParseFrame, gst_base_parse_frame,
+ (GBoxedCopyFunc) gst_base_parse_frame_copy,
+ (GBoxedFreeFunc) gst_base_parse_frame_free);
/**
* gst_base_parse_frame_init:
return index_resolver_type;
}
-GType
-gst_index_entry_get_type (void)
-{
- static GType index_entry_type = 0;
-
- if (!index_entry_type) {
- index_entry_type = g_boxed_type_register_static ("GstIndexEntry",
- (GBoxedCopyFunc) gst_index_entry_copy,
- (GBoxedFreeFunc) gst_index_entry_free);
- }
- return index_entry_type;
-}
+G_DEFINE_BOXED_TYPE (GstIndexEntry, gst_index_entry,
+ (GBoxedCopyFunc) gst_index_entry_copy,
+ (GBoxedFreeFunc) gst_index_entry_free);
#if 0
#define _do_init \