[gstreamermm: 95/167] removed deprecated class ElementInterfaced
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm: 95/167] removed deprecated class ElementInterfaced
- Date: Tue, 3 Sep 2013 19:27:03 +0000 (UTC)
commit 5581d69c0ae50466d2bd81c0faa03576d35d4c53
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date: Wed Jul 31 09:29:26 2013 +0200
removed deprecated class ElementInterfaced
gstreamer/src/element.ccg | 10 -----
gstreamer/src/element.hg | 98 ---------------------------------------------
2 files changed, 0 insertions(+), 108 deletions(-)
---
diff --git a/gstreamer/src/element.ccg b/gstreamer/src/element.ccg
index 1661109..dc25aa2 100644
--- a/gstreamer/src/element.ccg
+++ b/gstreamer/src/element.ccg
@@ -34,16 +34,6 @@ _PINCLUDE(gstreamermm/private/object_p.h)
namespace Gst
{
-extern "C"
-{
-
-void ElementInterfaced_WeakNotify_gstreamermm_callback(void* data, GObject*)
-{
- delete static_cast<Gst::Element*>(data);
-}
-
-} // extern "C"
-
namespace Enums
{
diff --git a/gstreamer/src/element.hg b/gstreamer/src/element.hg
index 1579d39..8db2f53 100644
--- a/gstreamer/src/element.hg
+++ b/gstreamer/src/element.hg
@@ -140,10 +140,6 @@ class Element : public Gst::Object
{
_CLASS_GOBJECT(Element, GstElement, GST_ELEMENT, Gst::Object, GstObject)
-protected:
- //Needed for ElementInterfaced derived class
- _CTOR_DEFAULT
-
public:
/** Links this source element to the @dest element.
* The link must be from source to destination - the other direction will not
@@ -402,98 +398,4 @@ protected:
#m4end
};
-/** 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:
- * @code
- * ...
- * 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;
- * }
- * @endcode
- * @ingroup GstInterfaces
- */
-template <class T_Interface>
-class ElementInterfaced
-: public Element,
- public T_Interface
-{
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-
-private:
- // noncopyable
- ElementInterfaced(const ElementInterfaced&);
- ElementInterfaced& operator=(const ElementInterfaced&);
-
-protected:
- explicit ElementInterfaced(GstElement* castitem);
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
-
-public:
- virtual ~ElementInterfaced();
-
- // The gobj() methods make calls involving access to the underlying gobject
- // unambiguous (specifically, gobj() is ambiguous when called from an
- // ElementInterfaced<..> class).
-
- /// Gets the underlying gobject.
- GstElement* gobj() { return Element::gobj(); };
-
- /// Gets the underlying gobject.
- const GstElement* gobj() const { return Element::gobj(); };
-
- /// Gets a copy of the underlying gobject. The copy should be freed.
- GstElement* gobj_copy() { return Element::gobj_copy(); };
-};
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-extern "C"
-void ElementInterfaced_WeakNotify_gstreamermm_callback(void* data, GObject* where_the_object_was);
-
-template <class T_Interface>
-ElementInterfaced<T_Interface>::ElementInterfaced(GstElement* castitem)
-{
- gobject_ = (GObject*)castitem;
- if(gobject_) {
- gst_object_ref(gobj());
- g_object_weak_ref(gobject_,
- &ElementInterfaced_WeakNotify_gstreamermm_callback, this);
- }
-}
-
-template <class T_Interface>
-ElementInterfaced<T_Interface>::~ElementInterfaced()
-{
- // Set the gobject_ to null so that when this is deleted, the gobject doesn't
- // go with it and other elements "wrapping" the gobject are not affected
- gobject_ = 0;
-}
-
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
-
} // namespace Gst
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]