28 * They can be loaded back using gst_xml_parse_doc() / gst_xml_parse_file() / |
28 * They can be loaded back using gst_xml_parse_doc() / gst_xml_parse_file() / |
29 * gst_xml_parse_memory(). |
29 * gst_xml_parse_memory(). |
30 * Additionally one can load saved pipelines into the gst-editor to inspect the |
30 * Additionally one can load saved pipelines into the gst-editor to inspect the |
31 * graph. |
31 * graph. |
32 * |
32 * |
33 * #GstElement implementations need to override gst_object_save_thyself() and |
33 * #GstElement implementations need to override the save_thyself() and |
34 * gst_object_restore_thyself(). |
34 * restore_thyself() virtual functions of #GstObject. |
35 */ |
35 */ |
36 |
36 |
37 #include "gst_private.h" |
37 #include "gst_private.h" |
38 |
38 |
39 #include "gstxml.h" |
39 #include "gstxml.h" |
55 xmlNodePtr self, gpointer data); |
55 xmlNodePtr self, gpointer data); |
56 |
56 |
57 static GstObjectClass *parent_class = NULL; |
57 static GstObjectClass *parent_class = NULL; |
58 static guint gst_xml_signals[LAST_SIGNAL] = { 0 }; |
58 static guint gst_xml_signals[LAST_SIGNAL] = { 0 }; |
59 |
59 |
60 GType |
60 G_DEFINE_TYPE (GstXML, gst_xml, GST_TYPE_OBJECT); |
61 gst_xml_get_type (void) |
|
62 { |
|
63 static GType xml_type = 0; |
|
64 |
|
65 if (G_UNLIKELY (xml_type == 0)) { |
|
66 static const GTypeInfo xml_info = { |
|
67 sizeof (GstXMLClass), |
|
68 NULL, |
|
69 NULL, |
|
70 (GClassInitFunc) gst_xml_class_init, |
|
71 NULL, |
|
72 NULL, |
|
73 sizeof (GstXML), |
|
74 0, |
|
75 (GInstanceInitFunc) gst_xml_init, |
|
76 NULL |
|
77 }; |
|
78 |
|
79 xml_type = g_type_register_static (GST_TYPE_OBJECT, "GstXML", &xml_info, 0); |
|
80 } |
|
81 return xml_type; |
|
82 } |
|
83 |
61 |
84 static void |
62 static void |
85 gst_xml_class_init (GstXMLClass * klass) |
63 gst_xml_class_init (GstXMLClass * klass) |
86 { |
64 { |
87 GObjectClass *gobject_class; |
65 GObjectClass *gobject_class = (GObjectClass *) klass; |
88 |
|
89 gobject_class = (GObjectClass *) klass; |
|
90 |
66 |
91 parent_class = g_type_class_peek_parent (klass); |
67 parent_class = g_type_class_peek_parent (klass); |
92 |
68 |
93 gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_xml_dispose); |
69 gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_xml_dispose); |
94 |
70 |