How to get camera supported resolutions using Qt5?
-
It looks like that gstreamer on Linux is not returing any value in: camerabinsession.cpp
@ GstCaps *supportedCaps = 0;
g_object_get(G_OBJECT(m_camerabin),
(mode == QCamera::CaptureStillImage) ?
SUPPORTED_IMAGE_CAPTURE_CAPS_PROPERTY : SUPPORTED_VIDEO_CAPTURE_CAPS_PROPERTY,
&supportedCaps, NULL);
if (!supportedCaps)
return res;@I was trying calling gstreamer out of QT and was getting NULL as well. Is it a bug in GStreamer?
-
It looks like that gstreamer on Linux is not returing any value in: camerabinsession.cpp
@ GstCaps *supportedCaps = 0;
g_object_get(G_OBJECT(m_camerabin),
(mode == QCamera::CaptureStillImage) ?
SUPPORTED_IMAGE_CAPTURE_CAPS_PROPERTY : SUPPORTED_VIDEO_CAPTURE_CAPS_PROPERTY,
&supportedCaps, NULL);
if (!supportedCaps)
return res;@I was trying calling gstreamer out of QT and was getting NULL as well. Is it a bug in GStreamer?
-
Hi,
Either that or the device doesn't return the information. Do you have any other way to retrieve that information on your system ?
-
Hi,
Either that or the device doesn't return the information. Do you have any other way to retrieve that information on your system ?
-
Well, v4l2 is returning:
@$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUV 4:2:2 (YUYV)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
...@The structure GstCaps *supportedCaps from previous code, has 0 length, but it's valid but @gst_caps_is_any(supportedCaps) == true@
-
Well, v4l2 is returning:
@$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUV 4:2:2 (YUYV)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
...@The structure GstCaps *supportedCaps from previous code, has 0 length, but it's valid but @gst_caps_is_any(supportedCaps) == true@
-
I've digged deeper into GStreamer plugin gstcamerabin2.c, here it's querying for pad capabilities @pad = gst_element_get_static_pad (element, padname);
caps = gst_pad_query_caps (pad, NULL);@ and then the query failing "GstPAd.html":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html
...gst_pad_query_caps returns all possible caps a pad can operate with, using the pad's CAPS query function, If the query fails, this function will return filter , if not NULL, otherwise ANY.
And this ANY is what's returned into QT and then returned as empty QList. I thing we should use another gstreamer input element aka v4l2src which is stable. Camerabin2 is marked as unstable and under development.
-
I've digged deeper into GStreamer plugin gstcamerabin2.c, here it's querying for pad capabilities @pad = gst_element_get_static_pad (element, padname);
caps = gst_pad_query_caps (pad, NULL);@ and then the query failing "GstPAd.html":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html
...gst_pad_query_caps returns all possible caps a pad can operate with, using the pad's CAPS query function, If the query fails, this function will return filter , if not NULL, otherwise ANY.
And this ANY is what's returned into QT and then returned as empty QList. I thing we should use another gstreamer input element aka v4l2src which is stable. Camerabin2 is marked as unstable and under development.
-
Thanks for sharing your findings !
Do you have that with gstreamer0.1 ? Did you check gstreamer 1 ?
-
Thanks for sharing your findings !
Do you have that with gstreamer0.1 ? Did you check gstreamer 1 ?