[gst-devel] Help about dynamic change of a pipeline in a bin

Luca Ognibene luca.ognibene at gmail.com
Wed May 6 22:18:45 CEST 2009


On Wed, May 06, 2009 at 10:25:02PM +0300, Stefan Kost wrote:
> Luca Ognibene schrieb:
> > On Tue, May 05, 2009 at 04:40:11PM +0300, Stefan Kost wrote:
> >>>> I do exactly that in c:
> >>>> http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/lib/core/machine.c?view=markup
> >>>> Search for bt_machine_request_new_pad()
> >>>>
> >>>>     
> >>> Hi Stefan!
> >>> I've tried to look at your source code but it seems that on
> >>> bt_machine_request_new_pad you're just requesting a pad from a tee element.
> >>> My problem is that i would like to also start and attach a bin while the
> >>> pipeline is playing. If you know any program that does something like this
> >>> (c or python it's not a problem)..
> >>>   
> >> You could use an iterator.
> > 
> > What that would give me? It isn't so obvious looking at the docs.. Have you
> > tried my very simple test case? do you need more info/logs or so?
> 
> Sorry, I haven't. With the iterator you could safely iterate the children in the
> bin to look for the element, where you want to crete the requestpad.
> 

Ok, understood. Maybe i was not so clear while explaining what i want to
do.. 
 - i have a pipeline like src ! mybin ! sink
 - mybin is a GstBin with a single sink pad and N request pads
 - mybin is implemented with a ( identity ! tee name=t   t.src0 ! identity
 ... t.src1 ! identity.. ). So, when i
 request a new src pad on mybin i want it to request a new pad on tee, start
a (identity ! identity ! identity) bin(let's call it identitybin), attach it to the tee pad and ghost
the final sink pad.

Should i use the iterator inside mybin to look for the tee element? 
Should i block tee src pad after requesting it?
When should mybin change identitybin state? Before linking to tee pad? Or after?
Should i wait that application has linked mybin ghosted pad?
Should i send some events to inform the pipeline that the structure inside
mybin has changed?
Should the application block mybin src pad after requesting it?
When should the app change state to sink elements? After or before the link with
mybin?

I've read part-block.txt but i'mt still having problems doing this inside a
bin element.

Thank you for trying to help me!

ciao
Luca




More information about the gstreamer-devel mailing list