[gstreamer-bugs] [Bug 346666] A test filter element in gst-python

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Jul 5 09:34:42 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=346666
 GStreamer | gst-python | Ver: 0.10.4


Corey O. changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spam at coreyo.net




------- Comment #1 from Corey O.  2006-07-05 16:34 UTC -------
Had a few typos.  Fixed them, and attempted to stream a v4l src through it.  I
get the following error after the 2nd data event.

(helloworld.py:1176): GStreamer-CRITICAL **: gst_pad_push: assertion
`GST_PAD_DIRECTION (pad) == GST_PAD_SRC' failed

here's the revised code

-------------------------------------------------------------------------------
import pygst
#pygst.require('0.10')
import gst
import gobject

class TestFilter(gst.Element):

  _srcpadtemplate = gst.PadTemplate ("srcpadtemplate",
                                     gst.PAD_SRC,
                                     gst.PAD_ALWAYS,
                                     gst.caps_new_any())

  _sinkpadtemplate = gst.PadTemplate ("sinkpadtemplate",
                                      gst.PAD_SINK,
                                      gst.PAD_ALWAYS,
                                      gst.caps_new_any())



  def __init__(self, name):
    gst.Element.__init__(self)
    self.set_name(name)
    self.srcpad = gst.Pad(self._srcpadtemplate, "src")
    self.sinkpad = gst.Pad(self._sinkpadtemplate, "sink")
    self.add_pad(self.srcpad)
    self.add_pad(self.sinkpad)

    self.sinkpad.set_chain_function(self.chainfunc)
    self.sinkpad.set_event_function(self.eventfunc)

  def chainfunc(self, pad, buffer):
    return self.sinkpad.push(buffer)

  def eventfunc(self, pad, event):
    return self.sinkpad.push(buffer)

gobject.type_register(TestFilter)

-------------------------------------------------------------------------------


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list