GstXml

Name

GstXml -- Convert Elements into an XML presentation.

Synopsis


#include <gst/gst.h>


struct      GstXML;
GstXML*     gst_xml_new                     (const guchar *fname,
                                             const guchar *root);
xmlDocPtr   gst_xml_write                   (GstElement *element);
GstElement* gst_xml_get_element             (GstXML *xml,
                                             const guchar *name);
GList*      gst_xml_get_topelements         (GstXML *xml);

Description

All GstElements can be serialized to an XML presentation and subsequently loaded back.

Details

struct GstXML

struct GstXML {
  GtkObject object;

  GHashTable *elements;
  GList      *topelements;
};


gst_xml_new ()

GstXML*     gst_xml_new                     (const guchar *fname,
                                             const guchar *root);

Creates a new GstXML object (and the corresponding elements) from the XML file fname. Optionally it will only build the element from the element node root (if it is not NULL). This feature is useful if you only want to build a specific element from an XML file but not the pipeline it is embedded in. Note also that the XML parse tree is cached to speed up creating another GstXML object for the same file

fname : The filename with the xml description
root : The name of the root object to build
Returns : a pointer to a new GstElement


gst_xml_write ()

xmlDocPtr   gst_xml_write                   (GstElement *element);

Converts the given element into an XML presentation.

element : The element to write out
Returns : a pointer to an XML document


gst_xml_get_element ()

GstElement* gst_xml_get_element             (GstXML *xml,
                                             const guchar *name);

This function is used to get a pointer to the GstElement corresponding to name in the pipeline description. You would use this if you have to do anything to the element after loading.

xml : The GstXML to get the element from
name : The name of element to retreive
Returns : a pointer to a new GstElement


gst_xml_get_topelements ()

GList*      gst_xml_get_topelements         (GstXML *xml);

Retrive a list of toplevel elements.

xml : The GstXML to get the elements from
Returns : a GList of elements