gstreamermm
0.10.10.2
|
A templated class used for casting Gst::Element to interfaces that its underlying gobject implements. More...
Public Member Functions | |
virtual | ~ElementInterfaced () |
GstElement* | gobj () |
Gets the underlying gobject. | |
const GstElement* | gobj () const |
Gets the underlying gobject. | |
GstElement* | gobj_copy () |
Gets a copy of the underlying gobject. The copy should be freed. |
A templated class used for casting Gst::Element to interfaces that its underlying gobject implements.
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; }
virtual Gst::ElementInterfaced< T_Interface >::~ElementInterfaced | ( | ) | [virtual] |
GstElement* Gst::ElementInterfaced< T_Interface >::gobj | ( | ) | [inline] |
Gets the underlying gobject.
Reimplemented from Gst::Element.
const GstElement* Gst::ElementInterfaced< T_Interface >::gobj | ( | ) | const [inline] |
Gets the underlying gobject.
Reimplemented from Gst::Element.
GstElement* Gst::ElementInterfaced< T_Interface >::gobj_copy | ( | ) | [inline] |
Gets a copy of the underlying gobject. The copy should be freed.
Reimplemented from Gst::Element.