GObject
|_____ GstObject
|____GstPad
|____GstElement
|____GstBin
|___GstPipeline
|_____GstSignalObject
G_DEFINE_ABSTRACT_TYPE (GstObject, gst_object, G_TYPE_OBJECT);
G_DEFINE_TYPE (GstSignalObject, gst_signal_object, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_CODE (GstPad, gst_pad, GST_TYPE_OBJECT, _do_init);
G_DEFINE_TYPE (GstPadTemplate, gst_pad_template, GST_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_CODE (GstElementFactory, gst_element_factory, GST_TYPE_PLUGIN_FEATURE, _do_init);
GstElement是显式定义:
GType gst_element_get_type (void) { static volatile gsize gst_element_type = 0; if (g_once_init_enter (&gst_element_type)) { GType _type; static const GTypeInfo element_info = { sizeof (GstElementClass), gst_element_base_class_init, gst_element_base_class_finalize, (GClassInitFunc) gst_element_class_init, NULL, NULL, sizeof (GstElement), 0, (GInstanceInitFunc) gst_element_init, NULL }; _type = g_type_register_static (GST_TYPE_OBJECT, "GstElement", &element_info, G_TYPE_FLAG_ABSTRACT); _gst_elementclass_factory = g_quark_from_static_string ("GST_ELEMENTCLASS_FACTORY"); g_once_init_leave (&gst_element_type, _type); } return gst_element_type; }
GST_BOILERPLATE_FULL (GstBin, gst_bin, GstElement, GST_TYPE_ELEMENT, _do_init);
GST_BOILERPLATE_FULL (GstPipeline, gst_pipeline, GstBin, GST_TYPE_BIN, _do_init);
GstObject
|____GstClock
G_DEFINE_TYPE (GstClock, gst_clock, GST_TYPE_OBJECT);
GstObject
|____GstTask
G_DEFINE_TYPE_WITH_CODE (GstTask, gst_task, GST_TYPE_OBJECT, _do_init);
GstObject
|____GstTaskPool
G_DEFINE_TYPE_WITH_CODE (GstTaskPool, gst_task_pool, GST_TYPE_OBJECT, _do_init);
GBoxed
|____GstCaps
显式定义:
GType gst_caps_get_type (void) { static GType gst_caps_type = 0; if (G_UNLIKELY (gst_caps_type == 0)) { gst_caps_type = g_boxed_type_register_static ("GstCaps", (GBoxedCopyFunc) gst_caps_copy_conditional, (GBoxedFreeFunc) gst_caps_unref); g_value_register_transform_func (gst_caps_type, G_TYPE_STRING, gst_caps_transform_to_string); } return gst_caps_type; }
GstMiniObject
|_____GstEvent
G_DEFINE_TYPE_WITH_CODE (GstEvent, gst_event, GST_TYPE_MINI_OBJECT, _do_init);
GstMiniObject
|_____GstBuffer
G_DEFINE_TYPE_WITH_CODE (GstBuffer, gst_buffer, GST_TYPE_MINI_OBJECT, _do_init);
GstMiniObject
|_____GstBufferList
G_DEFINE_TYPE (GstBufferList, gst_buffer_list, GST_TYPE_MINI_OBJECT);
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; }
GstObject
|____GstPluginFeature
|_______GstTypeFindFactory
G_DEFINE_TYPE_WITH_CODE (GstTypeFindFactory, gst_type_find_factory, GST_TYPE_PLUGIN_FEATURE, _do_init);