Gst::XML Class Reference

#include <xml.h>

Inheritance diagram for Gst::XML:

Gst::Object

List of all members.

Public Member Functions

virtual ~XML ()
GstXML* gobj ()
 Provides access to the underlying C GObject.
const GstXML* gobj () const
 Provides access to the underlying C GObject.
GstXML* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool parse_doc (xmlDocPtr doc, const std::string& root)
 Fills the GstXML object with the elements from the xmlDocPtr.
bool parse_file (const std::string& filename, const std::string& root)
 Fills the GstXML object with the corresponding elements from the XML file fname.
bool parse_memory (const std::string& buffer, const std::string& root)
 Fills the Gst::XML object with the corresponding elements from an in memory XML buffer.
Glib::RefPtr<Elementget_element (const std::string& name)
 This function is used to get a pointer to the GstElement corresponding to name in the pipeline description.
Glib::RefPtr<const Elementget_element (const std::string& name) const
 This function is used to get a pointer to the GstElement corresponding to name in the pipeline description.
Glib::ListHandle< Glib::RefPtr
<Element >> 
get_topelements ()
 Retrieve a list of toplevel elements.
Glib::ListHandle< Glib::RefPtr
<const Element >> 
get_topelements () const
 Retrieve a list of toplevel elements.
Glib::SignalProxy2< void,
const Glib::RefPtr
<Gst::Object >&, xmlNode*> 
signal_object_loaded ()

Static Public Member Functions

static Glib::RefPtr<XMLcreate ()

Protected Member Functions

 XML ()
virtual void on_object_loaded (const Glib::RefPtr<Gst::Object>& object, xmlNode* xml_node)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gst::XMLwrap (GstXML* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

virtual Gst::XML::~XML (  )  [virtual]

Gst::XML::XML (  )  [protected]


Member Function Documentation

GstXML* Gst::XML::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gst::Object.

const GstXML* Gst::XML::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gst::Object.

GstXML* Gst::XML::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gst::Object.

static Glib::RefPtr<XML> Gst::XML::create (  )  [static]

bool Gst::XML::parse_doc ( xmlDocPtr  doc,
const std::string &  root 
)

Fills the GstXML object with the elements from the xmlDocPtr.

Parameters:
doc A pointer to an xml document to parse.
root The name of the root object to build.
Returns:
true on success, false otherwise.

bool Gst::XML::parse_file ( const std::string &  filename,
const std::string &  root 
)

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 0). 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.

Parameters:
fname The filename with the xml description.
root The name of the root object to build.
Returns:
true on success, false otherwise.

bool Gst::XML::parse_memory ( const std::string &  buffer,
const std::string &  root 
)

Fills the Gst::XML object with the corresponding elements from an in memory XML buffer.

Parameters:
buffer The in memory XML buffer.
root The name of the root objects to build.
Returns:
true on success.

Glib::RefPtr<Element> Gst::XML::get_element ( const std::string &  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.

Parameters:
name The name of element to retrieve.
Returns:
A pointer to a new GstElement, caller owns returned reference.

Glib::RefPtr<const Element> Gst::XML::get_element ( const std::string &  name  )  const

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.

Parameters:
name The name of element to retrieve.
Returns:
A pointer to a new GstElement, caller owns returned reference.

Glib::ListHandle<Glib::RefPtr<Element>> Gst::XML::get_topelements (  ) 

Retrieve a list of toplevel elements.

Returns:
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.

Glib::ListHandle<Glib::RefPtr<const Element>> Gst::XML::get_topelements (  )  const

Retrieve a list of toplevel elements.

Returns:
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.

Glib::SignalProxy2<void,const Glib::RefPtr<Gst::Object>&,xmlNode*> Gst::XML::signal_object_loaded (  ) 

Prototype:
void on_my_object_loaded(const Glib::RefPtr<Gst::Object>& object, xmlNode* xml_node)

virtual void Gst::XML::on_object_loaded ( const Glib::RefPtr<Gst::Object>&  object,
xmlNode *  xml_node 
) [protected, virtual]


Friends And Related Function Documentation

Glib::RefPtr<Gst::XML> wrap ( GstXML *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:

Generated on Sat Jul 26 11:56:15 2008 for gstreamermm by  doxygen 1.5.5