[gst-devel] event() function sometimes is not called in subclasses of GstBaseSrc

Speedy Gonzales selazer at gmail.com
Sat Jul 3 11:50:12 CEST 2010


I'm trying to develop a plugin which is supposed to read from a file.
I run into a problem and I don't think I can solve this myself

I need to handle GST_EVENT_SEEK event, sent for example after
seek_simple(). In order to do that, I override GstBaseSrc's event()
function. When seek_simple() is called on a pipeline everything works
well: event() function is called and GST_EVENT_SEEK event is passed
(example in Python):

self.somepipeline.seek_simple(gst.FORMAT_BUFFERS, gst.SEEK_FLAG_FLUSH, position)
-> GstSomeElement event() called

However, when calling seek_simple() directly on GstSomeElement
element, instead of it's event() function, send_event() of parent
class is called:

self.someelement.seek_simple(gst.FORMAT_BUFFERS, gst.SEEK_FLAG_FLUSH, position)
-> GstBaseSrc send_event() called

To handle all events one should override also send_event(). Maybe
there is something I misunderstood.


More information about the gstreamer-devel mailing list