[gst-devel] decodebin problem (gst 0.8.9; gentoo linux)
Ronald S. Bultje
rbultje at ronald.bitfreak.net
Mon Jul 11 05:04:12 CEST 2005
Hi,
On Sun, 2005-07-10 at 23:34, Stefan Bambach wrote:
> I took the decodebin example code, but want to have another queueing.
>
> I thought of 3 bins.
> - bin pipeline
> - thread decoding (decodebin)
> - thread sink
Mistake 1. This won't work. You cannot have a queue between decodebin
and filesrc. It just doesn't work. In all examples, you will always find
decodebin and filesrc in the same thread, I recommend you continue doing
that.
> My app configuration:
> - main app
> - starts pipeline, and other gst stuff
> - my own pthread iterates over elements (gst_bin_iterate())
> -> not blocking main app
This is *way* worse. You hereby remove all threadsafety, for as far as
it exists, by manually threading one pipeline. Do not ever do that. :).
You can make the main pipeline a thread to get the same effect, and that
may actually work. However, your own pthread iterating a pipeline will
not work, it will cause random thread failures.
> Can I break the gst_bin_iterate() method ? (states?)
No. 2 seconds is too much, but implies a pipeline that can be optimized
(scheduling-wise). Are all your bins/threads separate entities? Or does
one bin own the others? What's the exact setup of your pipeline?
> What state should be set and when ?
READY when nothing goes on, PAUSED for pause and PLAYING to play.
> To which element should I send seek, getposition, pause "events" ?
To the (audio)sinks. This is explained in more detail in the application
development manual on our website. Pause events are not events, so you
just set a state on the all-containing pipeline.
Ronald
--
Ronald S. Bultje <rbultje at ronald.bitfreak.net>
More information about the gstreamer-devel
mailing list