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): are those values legit? How should I interpreting them? (previously I always saw singular values for width & height) If this isn't right: would this be a bug in the GStreamer V4L2 device enumeration, or in the specific V4L2 driver? (This GStreamer 1.8.3. on 32-bit ARM Linux.) Thanks Gottfried _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Tim,
Thanks a lot, that clears it up! Best Gottfried On Sat, Nov 12, 2016 at 6:34 PM, Tim Müller <[hidden email]> wrote: > 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 > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |