[gst-devel] Pausing bins within a pipeline

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Jul 31 11:10:59 CEST 2009


On Thu, 2009-07-30 at 22:18 -0700, Oliver Yu wrote:

Hi,

> I'm trying to control multiple videos behind a videomixer and having
>  some trouble.  Each video is contained within a Bin with a GhostPad
>  and the Bin is connected to the videomixer.  I kick off the containing
>  Pipeline with set_state(gst.STATE_PLAYING).  When I try to set_state
>  on individual Bins to gst.STATE_PAUSED, nothing happens and everything
>  keeps on playing.

Elements in the middle of a pipeline usually behave the same in PAUSED
or PLAYING state. Sinks will block when set to PAUSED state though,
which will at some point block upstream data flow as well (e.g. when
queues fill up).

> If I try to do the same on the filesrc within the
>  Bin, there is still no response.

The same applies to non-live sources.

> - Is is possible to pause individual Bins within a pipeline?  If so,
>  how?

You can block pads to block data flow at certain points in a pipeline.
You'll need to make sure that won't lead to other parts of the pipeline
'drying up' (e.g. muxers, videomixer, adder, those kind of elements).

> - Is it possible to start certain bins in a paused state when starting
>  the pipeline? - Also, is there a way to enforce the order of sinks in
>  the videomixer?  I want to be able to control the stacking order of
>  the videos.

Videomixer (sink) pads have "xpos", "ypos", "alpha" and "zorder"
properties which you can set. I think "zorder" takes care of stacking
order.

 Cheers
  -Tim








More information about the gstreamer-devel mailing list