[gst-devel] do events need a pipeline and iteration to propagate?

Ákos Maróy darkeye at tyrell.hu
Tue Jun 7 02:08:13 CEST 2005


I'm looking at how events are handled, and for lack of documentation, I
did some experimenting. I tried simply to create a 'half-queue', which
basically doesn't end in a sink, and tried to seek on it. as a seek is
an upstream event, I figured this could work.

say, I'd have:

filesrc ! mad


and then send a seek event to the src pad of mad. but, I get:

(process:11935): GStreamer-CRITICAL **: gst_pad_send_event: assertion
`GST_STATE (parent) >= GST_STATE_PAUSED' failed


(well, it doesn't have a parent)


ok, so I added all these into a pipeline, put it into PAUSED mode (as I
don't want to play, I just want to seek), and tried the seek again.
here, no error report, but gst_pad_send_event() returns FALSE (and no
seek takes place).


some more experiments followed, but what seems to be a requirement is
that actually I need a sink connected to my mad element for the seek to
work at all. not only that, but I have to put all these into a pipeline,
put them into PLAYING state, and call gst_bin_iterate() on the pipeline
at least once before sending the seek event.


are my findings above correct? is it really so that for an upstream seek
event to go through, one has to have elements 'behind' the one the event
is sent to? does one need to put these elements into a pipeline, put
them into PLAYING state, and iterate on them first, before being able to
send a seek event? (does this mean I can only start any source from the
beginning first, and have to seek later? - I'm looking for a way to
start a source at a specified point instead of the beginning)


Akos




More information about the gstreamer-devel mailing list