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

Stefan Kost ensonic at hora-obscura.de
Fri May 22 16:49:59 CEST 2009


Luca Ognibene schrieb:
> 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.
>
>   
ohh, thats many questions.
> Should i use the iterator inside mybin to look for the tee element? 
>   
I would subclass the bin and just remember the tee in your instance
data. no need to look it up then.
> Should i block tee src pad after requesting it?
>   
if the pipeline is playing, yes. A gst_pad_push on the new pad would
throw a GST_FLOW_NOT_LINKED otherwise. I don't like this too much. Would
be cool if I could tell gstreamer, that unlinked pads are just fine.
> When should mybin change identitybin state? Before linking to tee pad? Or after?
>   
this is what I do in buzztard:
* add new components
* link (block new src-pads that would become active)
* change state
* unblock pads

> 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?
>   
Dunno. I am not doing it.
> Should the application block mybin src pad after requesting it?
>   
If tee.srcX is blocked you don't need to.
> 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.
>   
Look at the dynamic examples for plugins-base. If those don't cover your
case, please consider making more variants. Its good to have those examples.
> Thank you for trying to help me!
>   

Sorry for late reply, someone hijacked your thread again.

Stefan
> ciao
> Luca
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>   





More information about the gstreamer-devel mailing list