[gst-devel] Data can flow through an element that is in a PAUSED state. Is this normal?

machinegodzilla machinegodzilla at gmail.com
Wed Jul 15 17:10:56 CEST 2009


Hello,

Here is my pipeline:

[ [ filesrc - custom_filter ] - decodebin - autovideosink ]

filesrc and my custom_filter are enclosed in a bin. The main loop starts and
the data keeps flowing. Then I pause the pipeline and lock my bin just
before its state gets changed to PAUSED. Although the bin is locked in the
PLAYING state the stream stops. Why? I expected the filesrc to continue to
pump the data down the pipeline, through my filter and then maybe derail
while meeting a wall in the shape of elements with the states set to PAUSED
(i.e. decodebin and autovideosink with PAUSED state "inherited" from the
pipeline), but it seems that the lock is simply ignored.

Now it's the time for the question from the subject. When I resume the
stream the GST_STATE( bin ) macro that is placed in the _chain function of
my filter reports that the state of my bin and filter is *PAUSED*, so it
apparently got changed despite the lock. But the status of the state doesn't
matter as the stream happily continues to flow...

Here is part of my "log" in the pause/play moment:
...
chain: state of bin: PLAYING
chain: state of bin: PLAYING
play 2 pause: state of bin: PLAYING  // pausing the pipeline, PLAYING but
flow stops
bin unlocked
play 2 pause: state of bin: PLAYING
bin locked
play 2 pause: state of bin: PLAYING
chain: state of bin: PAUSED        // resuming the pipeline, PAUSED (?) but
data flowing
chain: state of bin: PAUSED
...

It's quite likely that I'm missing something as I'm completely new to
GStreamer and I'd greatly appreciate if someone could explain me in short
what is going on here. My aim is to apply PAUSED state to the last two
elements, without affecting the first two. Is it at all possible?

Thanks!
-- 
View this message in context: http://www.nabble.com/Data-can-flow-through-an-element-that-is-in-a-PAUSED-state.-Is-this-normal--tp24499935p24499935.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.





More information about the gstreamer-devel mailing list