* 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");