diff --git a/gst/gst.c b/gst/gst.c index 5cc7abeaa6..f160772b13 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -566,6 +566,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data, _priv_gst_mini_object_initialize (); _priv_gst_quarks_initialize (); + _priv_gst_allocator_initialize (); _priv_gst_memory_initialize (); _priv_gst_format_initialize (); _priv_gst_query_initialize (); @@ -573,6 +574,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data, _priv_gst_caps_initialize (); _priv_gst_caps_features_initialize (); _priv_gst_meta_initialize (); + _priv_gst_message_initialize (); g_type_class_ref (gst_object_get_type ()); g_type_class_ref (gst_pad_get_type ()); @@ -670,11 +672,12 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data, _priv_gst_event_initialize (); _priv_gst_buffer_initialize (); - _priv_gst_message_initialize (); _priv_gst_buffer_list_initialize (); _priv_gst_sample_initialize (); - _priv_gst_value_initialize (); _priv_gst_context_initialize (); + _priv_gst_date_time_initialize (); + _priv_gst_toc_initialize (); + _priv_gst_value_initialize (); g_type_class_ref (gst_param_spec_fraction_get_type ()); _priv_gst_tag_initialize (); diff --git a/gst/gst_private.h b/gst/gst_private.h index d610560b4e..7d0fe15abe 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -104,6 +104,8 @@ G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void); /* init functions called from gst_init(). */ G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void); G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void); +G_GNUC_INTERNAL void _priv_gst_memory_initialize (void); +G_GNUC_INTERNAL void _priv_gst_allocator_initialize (void); G_GNUC_INTERNAL void _priv_gst_buffer_initialize (void); G_GNUC_INTERNAL void _priv_gst_buffer_list_initialize (void); G_GNUC_INTERNAL void _priv_gst_structure_initialize (void); @@ -121,6 +123,8 @@ G_GNUC_INTERNAL void _priv_gst_tag_initialize (void); G_GNUC_INTERNAL void _priv_gst_value_initialize (void); G_GNUC_INTERNAL void _priv_gst_debug_init (void); G_GNUC_INTERNAL void _priv_gst_context_initialize (void); +G_GNUC_INTERNAL void _priv_gst_toc_initialize (void); +G_GNUC_INTERNAL void _priv_gst_date_time_initialize (void); /* Private registry functions */ G_GNUC_INTERNAL diff --git a/gst/gstallocator.c b/gst/gstallocator.c index 6363ba5477..cbcb1e4871 100644 --- a/gst/gstallocator.c +++ b/gst/gstallocator.c @@ -569,7 +569,7 @@ gst_allocator_sysmem_init (GstAllocatorSysmem * allocator) } void -_priv_gst_memory_initialize (void) +_priv_gst_allocator_initialize (void) { g_rw_lock_init (&lock); allocators = g_hash_table_new (g_str_hash, g_str_equal); diff --git a/gst/gstcapsfeatures.h b/gst/gstcapsfeatures.h index 62d9e3c439..441e1a11ad 100644 --- a/gst/gstcapsfeatures.h +++ b/gst/gstcapsfeatures.h @@ -28,7 +28,9 @@ G_BEGIN_DECLS typedef struct _GstCapsFeatures GstCapsFeatures; -#define GST_TYPE_CAPS_FEATURES (gst_caps_features_get_type ()) +GST_EXPORT GType _gst_caps_features_type; + +#define GST_TYPE_CAPS_FEATURES (_gst_caps_features_type) #define GST_IS_CAPS_FEATURES(object) (gst_is_caps_features(object)) #define GST_CAPS_FEATURES_CAST(object) ((GstCapsFeatures *)(object)) #define GST_CAPS_FEATURES(object) (GST_CAPS_FEATURES_CAST(object)) diff --git a/gst/gstcontext.c b/gst/gstcontext.c index 1cc3f3f964..b535574ec7 100644 --- a/gst/gstcontext.c +++ b/gst/gstcontext.c @@ -68,7 +68,7 @@ struct _GstContext #define GST_CONTEXT_STRUCTURE(c) (((GstContext *)(c))->structure) -static GType _gst_context_type = 0; +GType _gst_context_type = 0; GST_DEFINE_MINI_OBJECT_TYPE (GstContext, gst_context); void diff --git a/gst/gstcontext.h b/gst/gstcontext.h index a0aa8705ea..0883f0da8b 100644 --- a/gst/gstcontext.h +++ b/gst/gstcontext.h @@ -31,7 +31,9 @@ typedef struct _GstContext GstContext; #include #include -#define GST_TYPE_CONTEXT (gst_context_get_type()) +GST_EXPORT GType _gst_context_type; + +#define GST_TYPE_CONTEXT (_gst_context_type) #define GST_IS_CONTEXT(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_CONTEXT)) #define GST_CONTEXT_CAST(obj) ((GstContext*)(obj)) #define GST_CONTEXT(obj) (GST_CONTEXT_CAST(obj)) diff --git a/gst/gstdatetime.c b/gst/gstdatetime.c index 94ae2621d6..d21cca467e 100644 --- a/gst/gstdatetime.c +++ b/gst/gstdatetime.c @@ -63,6 +63,7 @@ struct _GstDateTime GstDateTimeFields fields; }; +GType _gst_date_time_type = 0; GST_DEFINE_MINI_OBJECT_TYPE (GstDateTime, gst_date_time); static void gst_date_time_free (GstDateTime * datetime); @@ -909,3 +910,9 @@ gst_date_time_unref (GstDateTime * datetime) { gst_mini_object_unref (GST_MINI_OBJECT_CAST (datetime)); } + +void +_priv_gst_date_time_initialize (void) +{ + _gst_date_time_type = gst_date_time_get_type (); +} diff --git a/gst/gstdatetime.h b/gst/gstdatetime.h index 879ab4a2a0..251dce1107 100644 --- a/gst/gstdatetime.h +++ b/gst/gstdatetime.h @@ -36,6 +36,8 @@ G_BEGIN_DECLS */ typedef struct _GstDateTime GstDateTime; +GST_EXPORT GType _gst_date_time_type; + /** * GST_TYPE_DATE_TIME: * @@ -44,7 +46,7 @@ typedef struct _GstDateTime GstDateTime; * Returns: the #GType of GstDateTime */ -#define GST_TYPE_DATE_TIME gst_date_time_get_type() +#define GST_TYPE_DATE_TIME (_gst_date_time_type) GType gst_date_time_get_type (void); diff --git a/gst/gstmemory.c b/gst/gstmemory.c index d5811f6817..c29fccddb7 100644 --- a/gst/gstmemory.c +++ b/gst/gstmemory.c @@ -69,6 +69,7 @@ #include "gst_private.h" #include "gstmemory.h" +GType _gst_memory_type = 0; GST_DEFINE_MINI_OBJECT_TYPE (GstMemory, gst_memory); static GstMemory * @@ -425,3 +426,9 @@ gst_memory_is_span (GstMemory * mem1, GstMemory * mem2, gsize * offset) return TRUE; } + +void +_priv_gst_memory_initialize (void) +{ + _gst_memory_type = gst_memory_get_type (); +} diff --git a/gst/gstmemory.h b/gst/gstmemory.h index b5180ca3b1..4819e2a16b 100644 --- a/gst/gstmemory.h +++ b/gst/gstmemory.h @@ -29,7 +29,8 @@ G_BEGIN_DECLS -#define GST_TYPE_MEMORY (gst_memory_get_type()) +GST_EXPORT GType _gst_memory_type; +#define GST_TYPE_MEMORY (_gst_memory_type) GType gst_memory_get_type(void); typedef struct _GstMemory GstMemory; diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 9a790d381b..a0254cc587 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -108,7 +108,7 @@ static GstMessageQuarks message_quarks[] = { {0, NULL, 0} }; -static GType _gst_message_type = 0; +GType _gst_message_type = 0; GST_DEFINE_MINI_OBJECT_TYPE (GstMessage, gst_message); void diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 72b4260064..7433edc6a6 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -165,7 +165,9 @@ typedef enum #include #include -#define GST_TYPE_MESSAGE (gst_message_get_type()) +GST_EXPORT GType _gst_message_type; + +#define GST_TYPE_MESSAGE (_gst_message_type) #define GST_IS_MESSAGE(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_MESSAGE)) #define GST_MESSAGE_CAST(obj) ((GstMessage*)(obj)) #define GST_MESSAGE(obj) (GST_MESSAGE_CAST(obj)) diff --git a/gst/gstquery.c b/gst/gstquery.c index 076b8dca9c..78a04fa7ad 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -65,7 +65,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_query_debug); #define GST_CAT_DEFAULT gst_query_debug -static GType _gst_query_type = 0; +GType _gst_query_type = 0; typedef struct { diff --git a/gst/gstquery.h b/gst/gstquery.h index cee72b2545..3750a19a14 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -132,7 +132,9 @@ typedef enum { } GstQueryType; #undef FLAG -#define GST_TYPE_QUERY (gst_query_get_type()) +GST_EXPORT GType _gst_query_type; + +#define GST_TYPE_QUERY (_gst_query_type) #define GST_IS_QUERY(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_QUERY)) #define GST_QUERY_CAST(obj) ((GstQuery*)(obj)) #define GST_QUERY(obj) (GST_QUERY_CAST(obj)) diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 0eac36d802..1d1ee58912 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -84,6 +84,7 @@ static GMutex __tag_mutex; /* tags hash table: maps tag name string => GstTagInfo */ static GHashTable *__tags; +GType _gst_tag_list_type = 0; GST_DEFINE_MINI_OBJECT_TYPE (GstTagList, gst_tag_list); static void __gst_tag_list_free (GstTagList * list); @@ -98,6 +99,8 @@ _priv_gst_tag_initialize (void) { g_mutex_init (&__tag_mutex); + _gst_tag_list_type = gst_tag_list_get_type (); + __tags = g_hash_table_new (g_str_hash, g_str_equal); gst_tag_register_static (GST_TAG_TITLE, GST_TAG_FLAG_META, G_TYPE_STRING, diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 80edea144d..42f944bb12 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -154,8 +154,10 @@ struct _GstTagList { GstMiniObject mini_object; }; +GST_EXPORT GType _gst_tag_list_type; + #define GST_TAG_LIST(x) ((GstTagList *) (x)) -#define GST_TYPE_TAG_LIST (gst_tag_list_get_type ()) +#define GST_TYPE_TAG_LIST (_gst_tag_list_type) #define GST_IS_TAG_LIST(obj) (GST_IS_MINI_OBJECT_TYPE((obj), GST_TYPE_TAG_LIST)) /** diff --git a/gst/gsttoc.c b/gst/gsttoc.c index 546a774d1d..bee13cb2ac 100644 --- a/gst/gsttoc.c +++ b/gst/gsttoc.c @@ -116,6 +116,9 @@ static void gst_toc_free (GstToc * toc); static GstTocEntry *gst_toc_entry_copy (const GstTocEntry * toc); static void gst_toc_entry_free (GstTocEntry * toc); +GType _gst_toc_type = 0; +GType _gst_toc_entry_type = 0; + GST_DEFINE_MINI_OBJECT_TYPE (GstToc, gst_toc); GST_DEFINE_MINI_OBJECT_TYPE (GstTocEntry, gst_toc_entry); @@ -820,3 +823,10 @@ gst_toc_dump (GstToc * toc) gst_toc_dump_entries (toc->entries, 2); #endif } + +void +_priv_gst_toc_initialize (void) +{ + _gst_toc_type = gst_toc_get_type (); + _gst_toc_entry_type = gst_toc_entry_get_type (); +} diff --git a/gst/gsttoc.h b/gst/gsttoc.h index a9815d8e4a..39469c1885 100644 --- a/gst/gsttoc.h +++ b/gst/gsttoc.h @@ -30,8 +30,11 @@ G_BEGIN_DECLS -#define GST_TYPE_TOC (gst_toc_get_type ()) -#define GST_TYPE_TOC_ENTRY (gst_toc_entry_get_type ()) +GST_EXPORT GType _gst_toc_type; +GST_EXPORT GType _gst_toc_entry_type; + +#define GST_TYPE_TOC (_gst_toc_type) +#define GST_TYPE_TOC_ENTRY (_gst_toc_entry_type) typedef struct _GstTocEntry GstTocEntry; typedef struct _GstToc GstToc;