Next: Concept Index, Previous: Gst, Up: Top
XML save/restore operations of pipelines
GStreamer pipelines can be saved to xml files using gst-xml-write-file
.
They can be loaded back using gst-xml-parse-doc
/
gst-xml-parse-file
/ gst-xml-parse-memory
. Additionally one can
load saved pipelines into the gst-editor to inspect the graph.
<gst-element>
implementations need to override
gst-object-save-thyself
and gst-object-restore-thyself
.
This
<gobject>
class defines no properties, other than those defined by its superclasses.
<gst-object>
) (arg1 <gpointer>
)Signals that a new object has been deserialized.
<gst-element>
) (ret <xml-doc-ptr>
)Converts the given element into an XML presentation.
- element
- The element to write out
- ret
- a pointer to an XML document
<gst-element>
) (out <file*>
) (ret int
)Converts the given element into XML and writes the formatted XML to an open file.
- element
- The element to write out
- out
- an open file, like stdout
- ret
- number of bytes written on success, -1 otherwise.
<gst-xml>
)Create a new GstXML parser object.
- ret
- a pointer to a new GstXML object.
<gst-xml>
) (doc <xml-doc-ptr>
) (root <guchar*>
) (ret bool
)Fills the GstXML object with the elements from the xmlDocPtr.
- xml
- a pointer to a GstXML object
- doc
- a pointer to an xml document to parse
- root
- The name of the root object to build
- ret
- TRUE on success, FALSE otherwise
<gst-xml>
) (fname <guchar*>
) (root <guchar*>
) (ret bool
)Fills the GstXML object with 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.
Pass "-" as fname to read from stdin. You can also pass a URI of any format that libxml supports, including http.
- xml
- a pointer to a GstXML object
- fname
- The filename with the xml description
- root
- The name of the root object to build
- ret
- TRUE on success, FALSE otherwise
<gst-xml>
) (buffer <guchar*>
) (size unsigned-int
) (root mchars
) (ret bool
)Fills the GstXML object with the corresponding elements from an in memory XML buffer.
- xml
- a pointer to a GstXML object
- buffer
- a pointer to the in memory XML buffer
- size
- the size of the buffer
- root
- the name of the root objects to build
- ret
- TRUE on success
<gst-xml>
) (name <guchar*>
) (ret <gst-element>
)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 retrieve
- ret
- a pointer to a new GstElement, caller owns returned reference.
<gst-xml>
) (ret glist-of
)Retrieve a list of toplevel elements.
- xml
- The GstXML to get the elements from
- ret
- a GList of top-level elements. The caller does not own a copy of the list and must not free or modify the list. The caller also does not own a reference to any of the elements in the list and should obtain its own reference using
gst-object-ref
if necessary.