mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
v4l2: fix build break using V4L2_CAP_VIDEO_M2M_MPLANE
This may not be defined. Since the previous version used only the other define (V4L2_CAP_VIDEO_OUTPUT_MPLANE), fall back on this only when not available.
This commit is contained in:
parent
8eb4b032be
commit
b80e3a4690
1 changed files with 8 additions and 4 deletions
|
@ -481,17 +481,21 @@ gst_v4l2_adjust_buf_type (GstV4l2Object * v4l2object)
|
|||
* in a contiguous manner. In this case the first v4l2 plane
|
||||
* contains all the gst planes.
|
||||
*/
|
||||
#ifdef V4L2_CAP_VIDEO_M2M_MPLANE
|
||||
#define CHECK_CAPS (V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_VIDEO_M2M_MPLANE)
|
||||
#else
|
||||
#define CHECK_CAPS (V4L2_CAP_VIDEO_OUTPUT_MPLANE)
|
||||
#endif
|
||||
|
||||
switch (v4l2object->type) {
|
||||
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
|
||||
if (v4l2object->vcap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE
|
||||
|| v4l2object->vcap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) {
|
||||
if (v4l2object->vcap.capabilities & CHECK_CAPS) {
|
||||
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->vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE
|
||||
|| v4l2object->vcap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) {
|
||||
if (v4l2object->vcap.capabilities & CHECK_CAPS) {
|
||||
/* FIXME: for now it's an untested case so just put a warning */
|
||||
GST_WARNING ("untested V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE");
|
||||
|
||||
|
|
Loading…
Reference in a new issue