gstreamer_core/gst/gstxml.c
branchRCL_3
changeset 8 7e817e7e631c
parent 7 567bb019e3e3
equal deleted inserted replaced
7:567bb019e3e3 8:7e817e7e631c
    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 the save_thyself() and
    33  * #GstElement implementations need to override gst_object_save_thyself() and
    34  * restore_thyself() virtual functions of #GstObject.
    34  * gst_object_restore_thyself().
    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 G_DEFINE_TYPE (GstXML, gst_xml, GST_TYPE_OBJECT);
    60 GType
       
    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 }
    61 
    83 
    62 static void
    84 static void
    63 gst_xml_class_init (GstXMLClass * klass)
    85 gst_xml_class_init (GstXMLClass * klass)
    64 {
    86 {
    65   GObjectClass *gobject_class = (GObjectClass *) klass;
    87   GObjectClass *gobject_class;
       
    88 
       
    89   gobject_class = (GObjectClass *) klass;
    66 
    90 
    67   parent_class = g_type_class_peek_parent (klass);
    91   parent_class = g_type_class_peek_parent (klass);
    68 
    92 
    69   gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_xml_dispose);
    93   gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_xml_dispose);
    70 
    94