[gst-devel] allowed caps and v4l2src

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Apr 27 00:46:20 CEST 2009


On Sun, 2009-04-26 at 22:55 +0200, marc doz wrote:

> 2) with a v4l2src element, I can do that :
> v4l2src ! video/x-raw-rgb ! ffmpegcolorspace ! ximagesink
> 3) but i can't do that :
> v4l2src ! video/x-raw-rgb ! ffmpegcolorspace ! ximagesink

Hrm? Those two pipelines look identical to me.


> 4) So I have built a tiny program that i use to print allowed caps of
> the pad between v4l2src and ffmpegcolorspace
> ./main v4l2src src ffmpegcolorspace sink
>   (...)
> my pad can use x-raw-rgb (and I would like use video/x-raw-rgb, bpp: 8) but i can't use rgb format ... with gst-launch

The 'allowed' caps / template caps are the caps that the element(s)
might support in theory. The caps actually supported in practice are
likely to be a small subset of these. Something like:

GST_DEBUG=v4l2src:5 gst-launch-0.10 v4l2src num-buffers=1 ! fakesink
2>&1 | grep probed

should show you what is actually support by your camera/drivers. You can
query this programmatically by doing a gst_pad_get_caps() on the
sources's src pad once the device is open (which is in PLAYING state I
think - but it might be earlier, I can never remember).

Cheers
 -Tim






More information about the gstreamer-devel mailing list