summaryrefslogtreecommitdiff
path: root/v4l2-mfc-example
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2015-01-16 12:49:42 +0100
committerKamil Debski <k.debski@samsung.com>2015-01-29 13:39:54 +0100
commit8d6c397303fef371b5347da98455b29f524d1841 (patch)
treed0232a588276b4cbf5549b3ab8adf5c6e5327ad6 /v4l2-mfc-example
parentfca91f223e4792cac40ba10dee96f01d9fe4071b (diff)
v4l2-mfc-example: fix capabilities flags
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'v4l2-mfc-example')
-rw-r--r--v4l2-mfc-example/fimc.c5
-rw-r--r--v4l2-mfc-example/mfc.c5
2 files changed, 6 insertions, 4 deletions
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);