mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
v4l2: fix multiplanar capture
After switching to using V4L2_CAP_DEVICE_CAPS we lost support for multiplanar device types. After some research, it looks like vcap.capabilities treated the multiplanar flag of output and capture devices equally, but not the new device_caps. https://bugzilla.gnome.org/show_bug.cgi?id=768195
This commit is contained in:
parent
6fe88d8a76
commit
eaa01071e0
1 changed files with 4 additions and 4 deletions
|
@ -489,16 +489,17 @@ gst_v4l2_adjust_buf_type (GstV4l2Object * v4l2object)
|
|||
* in a contiguous manner. In this case the first v4l2 plane
|
||||
* contains all the gst planes.
|
||||
*/
|
||||
#define CHECK_CAPS (V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_VIDEO_M2M_MPLANE)
|
||||
switch (v4l2object->type) {
|
||||
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
|
||||
if (v4l2object->device_caps & CHECK_CAPS) {
|
||||
if (v4l2object->device_caps &
|
||||
(V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_VIDEO_M2M_MPLANE)) {
|
||||
GST_DEBUG ("adjust type to multi-planar output");
|
||||
v4l2object->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
|
||||
}
|
||||
break;
|
||||
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
|
||||
if (v4l2object->device_caps & CHECK_CAPS) {
|
||||
if (v4l2object->device_caps &
|
||||
(V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_VIDEO_M2M_MPLANE)) {
|
||||
GST_DEBUG ("adjust type to multi-planar capture");
|
||||
v4l2object->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||
}
|
||||
|
@ -506,7 +507,6 @@ gst_v4l2_adjust_buf_type (GstV4l2Object * v4l2object)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
#undef CHECK_CAPS
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
|
|
Loading…
Reference in a new issue