From f0ae68d9440e90711c7b547f03d7165357b9c4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 24 Feb 2009 16:33:51 +0100 Subject: Move examples directory to tests/examples as in every other GStreamer module --- examples/gob/gst-identity2.gob | 141 ----------------------------------------- 1 file changed, 141 deletions(-) delete mode 100644 examples/gob/gst-identity2.gob (limited to 'examples/gob/gst-identity2.gob') diff --git a/examples/gob/gst-identity2.gob b/examples/gob/gst-identity2.gob deleted file mode 100644 index 9c34cb55..00000000 --- a/examples/gob/gst-identity2.gob +++ /dev/null @@ -1,141 +0,0 @@ - -%header{ -#include -#include "gst-identity2.h" -#include "gst-identity2-private.h" -%} - -class Gst:Identity2 from Gst:Element { - - /* plugin init */ - private gboolean - plugin_init (GModule *module, GstPlugin *plugin) - { - static GstElementDetails identity2_details = { - "GOB Identity", - "Filter/Effect", - "Does nothing", - "1.0", - "Wim Taymans ", - "(C) 2001", - }; - GstElementFactory *factory; - - factory = gst_elementfactory_new ("identity2", TYPE_SELF, - &identity2_details); - g_return_val_if_fail (factory != NULL, FALSE); - - gst_plugin_add_feature (plugin, &(factory->feature)); - - return TRUE; - } - - /* pads FIXME gob oculd be improved here */ - private GstPad *sinkpad = - { - gst_pad_new ("sink", GST_PAD_SINK); - gst_element_add_pad (GST_ELEMENT (o), o->_priv->sinkpad); - gst_pad_set_chain_function (o->_priv->sinkpad, chain); - gst_pad_set_bufferpool_function (o->_priv->sinkpad, get_bufferpool); - //gst_pad_set_negotiate_function (o->_priv->sinkpad, negotiate_sink); - }; - private GstPad *srcpad = - { - gst_pad_new ("src", GST_PAD_SRC); - gst_element_add_pad (GST_ELEMENT (o), o->_priv->srcpad); - //gst_pad_set_negotiate_function (o->_priv->srcpad, negotiate_src); - }; - - /* arguments */ - /* - private gboolean loop_based = FALSE; argument BOOL loop_based - get { - ARG = self->_priv->loop_based; - } - set { - self->_priv->loop_based = ARG; - if (self->_priv->loop_based) { - gst_element_set_loop_function (GST_ELEMENT (self), loop); - gst_pad_set_chain_function (self->_priv->sinkpad, NULL); - } - else { - gst_pad_set_chain_function (self->_priv->sinkpad, chain); - gst_element_set_loop_function (GST_ELEMENT (self), NULL); - } - };*/ - private guint sleep_time = 0; argument UINT sleep_time link; - private gboolean silent = FALSE; argument BOOL silent link; - - /* signals */ - private signal last NONE(NONE) void handoff(self); - - /* core code here */ - private GstBufferPool* - get_bufferpool (GstPad *pad (check null)) - { - Self *self = SELF (gst_pad_get_parent (pad)); - - return gst_pad_get_bufferpool (self->_priv->srcpad); - } - - /* private GstPadNegotiateReturn - negotiate_src (GstPad *pad, GstCaps **caps, gpointer *data) - { - Self *self = SELF (gst_pad_get_parent (pad)); - - return gst_pad_negotiate_proxy (pad, self->_priv->sinkpad, caps); - } - - private GstPadNegotiateReturn - negotiate_sink (GstPad *pad, GstCaps **caps, gpointer *data) - { - Self *self = SELF (gst_pad_get_parent (pad)); - - return gst_pad_negotiate_proxy (pad, self->_priv->srcpad, caps); - } */ - - private void - chain (GstPad *pad (check null), GstBuffer *buf (check null)) - { - Self *self; - - self = SELF (gst_pad_get_parent (pad)); - - if (!self->_priv->silent) - g_print("identity2: chain ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(pad)); - - handoff (self); - gst_pad_push (self->_priv->srcpad, buf); - - if (self->_priv->sleep_time) - usleep (self->_priv->sleep_time); - } - - /*private void - loop (GstElement *element (check null)) - { - Self *self = SELF (element); - GstBuffer *buf; - - do { - buf = gst_pad_pull (self->_priv->sinkpad); - g_print("identity2: loop ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(self->_priv->sinkpad)); - - handoff (self); - gst_pad_push (self->_priv->srcpad, buf); - - if (self->_priv->sleep_time) - usleep (self->_priv->sleep_time); - - } while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element)); - }*/ -} - -%{ -GstPluginDesc plugin_desc = { - GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "identity2", - gst_identity2_plugin_init -}; -%} -- cgit v1.2.1