From: Vincent Penquerc'h Date: Mon, 13 Jan 2014 09:14:00 +0000 (+0000) Subject: v4l2: fix build break using V4L2_CAP_VIDEO_M2M_MPLANE X-Git-Tag: 1.19.3~509^2~4922 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b80e3a4690e88868439fe4d2a412369a2da20215;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index 01c0e49..7b2a4e4 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -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");