[gst-devel] Problems on a gstreamer element with 2 src and 2 sink pads
vikram kf
ved.kpl at gmail.com
Fri Apr 24 09:34:03 CEST 2009
On Fri, Apr 24, 2009 at 12:56 PM, vikram kf <ved.kpl at gmail.com> wrote:
> On Fri, Apr 24, 2009 at 12:33 PM, Metathronius Galabant
> <m.galabant at googlemail.com> wrote:
>> Dear all,
>>
>> I've got a gstreamer element with 2 sink pads (of type GstCollectPads
>> with a callback) and 1 src pad (the output).
>> The callback processes both inputs, and then outputs the processed
>> data via gst_pad_push() to the src pad.
>>
>> Due to performance reasons we need to extend this element to have an
>> additional src pad (another output); all this src pad needs to do is
>> to ADDITIONALLY push out the exact same data one of the sink pads
>> already gets (I can't use a tee-element).
>>
>> Crude ASCII drawing:
>>
>> -o[sink0]\
>> { Processing of sink0,sink1 }-->---[src0]o-
>> -o[sink1]/--------->--------------------->---[src1]o-
>>
>>
>> 1) Is this case possible with the gstreamer framework at all?
> Yes. But then you will have to understand the GstCollectPads
> concept properly.
>
>>
>> 2) How are the events to be handled?
>> In case with 1 src pad and 2 sink pads it's easy - just copy the src
>> pad's event to BOTH sink pads over and it works.
>> How to proceed with 2 src pads? Must each event on a src pad copied to
>> all sink pads, AND to the other src pad?
You need not copy any event from one src pad to another, as any
upstream event will appear on both the src pads, provided any
downstream element is not dropping the event. The Bin takes care of
this and sends the events to all the sinks, AFAIK.
>
>
>>
>> 3) The pipeline (gstreamer bin) goes into "async" mode and never runs
>> - is due to event being mishandled in the 2 sink <-> 2 src case?
The pipeline needs to preroll (non-live) i.e all the sinks
should get the preroll buffer, for the pipeline to successfully
complete the state change to PAUSED(mostly). Ensure if you are doiung
that.
>>
>> Thanks and cheers,
>> M. Galabant
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensign option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> 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