Pausing bins within a pipeline

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pausing bins within a pipeline

Oliver Yu
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.  If I try to do the same on the filesrc within the Bin, there is still no response.  
- Is is possible to pause individual Bins within a pipeline?  If so, how?
- 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.

I am using GStreamer 0.10 through gstPython.

Oli


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pausing bins within a pipeline

Tim-Philipp Müller-2
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





------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pausing bins within a pipeline

machinegodzilla
Hi,


What will happen if they do 'dry up'? Will they recover if data arrives afterwards?


Thanks

Tim-Philipp Müller wrote
On Thu, 2009-07-30 at 22:18 -0700, Oliver Yu wrote:

> - 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).

 Cheers
  -Tim