Legality of certain gst_device_get_caps results

Tim Müller tim at centricular.com
Sat Nov 12 17:34:49 UTC 2016


On Sat, 2016-11-12 at 18:14 +0100, Gottfried Haider wrote:

Hi Gottfried,

> I am getting the caps of attached capture devices in C
> [gst_device_get_caps], turn them into a string [gst_caps_to_string],
> and pass them on to Java, where I am again parsing the string.
> 
> When I am looking at the Raspberry Pi Camera, which is attached via a
> V4L2 driver, I am seeing properties such as these ones, which my
> naive code stumbles upon:
> 
> width=(int)[ 32, 3280, 2 ]
> height=(int)[ 32, 2464, 2 ]
> framerate=(fraction)[ 1/1, 90/1 ]
> 
> Besides the framerate (whose values also look a bit odd to me):

What's odd about the framerate? It's a range and means 1 fps is the
smallest value and 90 fps is the largest value that can be requested.

> are those values legit? How should I interpreting them? (previously I
> always saw singular values for width & height)

They are. Usually you only see e.g.  width=(int)[ 32, 3280] which is a
range with all values from 32 to 3280 inclusive allowed.

In this case width=(int)[ 32, 3280, 2] is a range with all *even*
values from 32 to 3280 inclusive allowed, 2 is the "step" of the range
here which is omitted if it's 1.

Cheers
 -Tim

PS: there's also https://github.com/thaytan/gst-rpicamsrc fwiw, which
uses the mmal API directly.

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list