Get outgoing caps in bin

Edgar Thier edgar.thier at theimagingsource.com
Thu May 19 04:28:16 UTC 2016


The bin is intended as a wrapper around a camera and a few other plugins (exposure calculation, 
whitebalance, etc.).

I want to use the caps the set width, height and framerate in the camera.
I also want to convert to the given format.
The cameras I work with are able to produce bayer8, gray8, gray16 and sometimes yuv.

So if rgb is wanted I automatically select bayer (assuming it is available) and add bayer2rgb as my 
endpoint for the internal pipeline.
If yuv is wanted I convert from bayer to rgb and then to yuv with videoconvert and so on.

I've modified the example pipelines to also show the bin-internal ones.

gst-launch-1.0 mybin (src ! video/x-bayer,width=1280,height=720,framerate=30/1 ! exposure ! 
whitebalance ! bayer2rgb) ! video/x-raw,format=RGBx,width=1280,height=720,framerate=30/1 ! 
videoconvert ! xvimagesink sync=false

gst-launch-1.0 mybin (src ! video/x-raw,format=GRAY8,width=1280,height=720,framerate=30/1 ! exposure 
) ! video/x-raw,format=GRAY8,width=1280,height=720,framerate=30/1 ! videoconvert! xvimagesink sync=false

gst-launch-1.0 mybin (src ! video/x-bayer,width=1280,height=720,framerate=30/1 ! exposure ! 
whitebalance)! video/x-bayer,format=bggr,width=1280,height=720,framerate=30/1 !
videoconvert ! xvimagesink sync=false

For personal understanding, such a reconfiguration would always require a full stop of the pipeline, 
am I correct?

I hope that clears out all ambiguity.


On 05/18/2016 02:28 PM, Sebastian Dröge wrote:
> On Mi, 2016-05-18 at 12:54 +0200, Edgar Thier wrote:
>> Hi,
>>
>> How can I get the caps for my src pad in a bin so that I am able to
>> modify my internal pipeline
>> accordingly?
>>
>> Sample pipelines would look like this:
>>
>> gst-launch-1.0 mybin ! video/x-
>> raw,format=RGBx,width=1280,height=720,framerate=30/1 ! videoconvert
>> !
>> xvimagesink sync=false
>>
>> gst-launch-1.0 mybin ! video/x-
>> raw,format=GRAY8,width=1280,height=720,framerate=30/1 ! videoconvert
>> ! xvimagesink sync=false
>>
>> gst-launch-1.0 mybin ! video/x-
>> bayer,format=bggr,width=1280,height=720,framerate=30/1 !
>> videoconvert
>> ! xvimagesink sync=false
>>
>> Is this possible?
>> My first thought was to negotiate the caps like a pushsrc but that
>> does not seem possible with bins.
>
> Can you explain in more detail what's inside your bin and what kind of
> reconfigurations it should do? Should it also reconfigure on the fly,
> or only once at the very beginning?
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


More information about the gstreamer-devel mailing list