From 8d6c397303fef371b5347da98455b29f524d1841 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 16 Jan 2015 12:49:42 +0100 Subject: v4l2-mfc-example: fix capabilities flags Signed-off-by: Marek Szyprowski --- v4l2-mfc-example/fimc.c | 5 +++-- v4l2-mfc-example/mfc.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'v4l2-mfc-example') diff --git a/v4l2-mfc-example/fimc.c b/v4l2-mfc-example/fimc.c index c193fdb..78a1475 100644 --- a/v4l2-mfc-example/fimc.c +++ b/v4l2-mfc-example/fimc.c @@ -55,8 +55,9 @@ int fimc_open(struct instance *i, char *name) dbg("FIMC Info (%s): driver=\"%s\" bus_info=\"%s\" card=\"%s\" fd=0x%x", name, cap.driver, cap.bus_info, cap.card, i->fimc.fd); - if ( !(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE) || - !(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE) || + if ( !(((cap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE) && + (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) || + (cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE)) || !(cap.capabilities & V4L2_CAP_STREAMING)) { err("Insufficient capabilities of FIMC device (is %s correct?)", name); diff --git a/v4l2-mfc-example/mfc.c b/v4l2-mfc-example/mfc.c index 1f279a1..480e542 100644 --- a/v4l2-mfc-example/mfc.c +++ b/v4l2-mfc-example/mfc.c @@ -56,8 +56,9 @@ int mfc_open(struct instance *i, char *name) dbg("MFC Info (%s): driver=\"%s\" bus_info=\"%s\" card=\"%s\" fd=0x%x", name, cap.driver, cap.bus_info, cap.card, i->mfc.fd); - if ( !(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE) || - !(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE) || + if ( !(((cap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE) && + (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) || + (cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE)) || !(cap.capabilities & V4L2_CAP_STREAMING)) { err("Insufficient capabilities of MFC device (is %s correct?)", name); -- cgit v1.2.3