#include <element.h>
Public Member Functions | |
GstElement* | gobj () |
Provides access to the underlying C GObject. | |
const GstElement* | gobj () const |
Provides access to the underlying C GObject. | |
GstElement* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
~ElementInterfaced () | |
Protected Member Functions | |
ElementInterfaced (const ElementInterfaced&) | |
ElementInterfaced& | operator= (const ElementInterfaced&) |
ElementInterfaced (GstElement* castitem) | |
Friends | |
class | Gst::Interface |
Gst::ElementInterfaced is a templated class which, in conjunction with Gst::Interface::cast(), is used to cast a Gst::Element obtained by Gst::ElementFactory::create_element() into underlying GStreamer interfaces that the element may implement. A 'filesrc' element, for example, implements the Gst::URIHandler interface (which is not reflected in a Gst::Element obtained from a Gst::ElementFactory). To use the Gst::URIHandler methods with a 'filesrc' element obtained from a Gst::ElementFactory, one would do the following:
... Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("filesrc", "source"); Glib::RefPtr< Gst::ElementInterfaced<Gst::URIHandler> > handler = Gst::Interface::cast<Gst::URIHandler>(element); if (handler) { std::cout << "element '" << element->get_name() << "' implements URIHandler interface." << std::endl; // Use uri handler interface methods: handler->set_uri("file:///tmp/media.file"); std::cout << handler->get_name() << " uri = '" << handler->get_uri() << "'." << std::endl; }
Gst::ElementInterfaced<T_Interface>::~ElementInterfaced | ( | ) |
Gst::ElementInterfaced<T_Interface>::ElementInterfaced | ( | const ElementInterfaced<T_Interface>& | ) | [protected] |
Gst::ElementInterfaced<T_Interface>::ElementInterfaced | ( | GstElement * | castitem | ) | [protected] |
const GstElement* Gst::ElementInterfaced<T_Interface>::gobj | ( | ) | const |
GstElement* Gst::ElementInterfaced<T_Interface>::gobj | ( | ) |
GstElement* Gst::ElementInterfaced<T_Interface>::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::Element.
ElementInterfaced& Gst::ElementInterfaced<T_Interface>::operator= | ( | const ElementInterfaced<T_Interface>& | ) | [protected] |
friend class Gst::Interface [friend] |