summaryrefslogtreecommitdiff
path: root/v4l2-mfc-example
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2015-02-06 11:43:26 +0100
committerKamil Debski <k.debski@samsung.com>2015-02-06 11:43:26 +0100
commitf851b16080daf0632e670312313d694bc9fed3ff (patch)
tree10f2794df2a1119a448e0499705b208d533438ef /v4l2-mfc-example
parent7f801c195be83ef3ea47f528357991c7e1c278ec (diff)
v4l2-mfc-example: Add option to ignore FIMC format change
Add option to ignore FIMC format change. This may be useful if using the application with an older kernel. Signed-off-by: Kamil Debski <k.debski@samsung.com>
Diffstat (limited to 'v4l2-mfc-example')
-rw-r--r--v4l2-mfc-example/args.c6
-rw-r--r--v4l2-mfc-example/common.h1
-rw-r--r--v4l2-mfc-example/fimc.c7
3 files changed, 11 insertions, 3 deletions
diff --git a/v4l2-mfc-example/args.c b/v4l2-mfc-example/args.c
index 39abf96..3756001 100644
--- a/v4l2-mfc-example/args.c
+++ b/v4l2-mfc-example/args.c
@@ -44,6 +44,7 @@ void print_usage(char *name)
printf("\t-D <module>:<crtc>:<conn> - DRM module (e.g. exynos:4:17)\n");
printf("\t-B - use DMABUF instead of userptr for sharing buffers\n");
printf("\t-V - synchronise to vsync\n");
+ printf("\t-X - ignore format change by FIMC\n");
printf("\t\n");
printf("\tIf DRM or Frame buffer is used then FIMC should be suppplied.\n");
printf("\tOnly one of the following Frame Buffer, DRM can be used at a time.\n");
@@ -80,7 +81,7 @@ int parse_args(struct instance *i, int argc, char **argv)
init_to_defaults(i);
- while ((c = getopt(argc, argv, "c:d:f:i:m:VD:B")) != -1) {
+ while ((c = getopt(argc, argv, "c:d:f:i:m:VXD:B")) != -1) {
switch (c) {
case 'c':
i->parser.codec = get_codec(optarg);
@@ -102,6 +103,9 @@ int parse_args(struct instance *i, int argc, char **argv)
case 'V':
i->fimc.double_buf = 1;
break;
+ case 'X':
+ i->fimc.ignore_format_change = 1;
+ break;
case 'B':
i->fimc.dmabuf = 1;
break;
diff --git a/v4l2-mfc-example/common.h b/v4l2-mfc-example/common.h
index ea5a9d7..d338d5e 100644
--- a/v4l2-mfc-example/common.h
+++ b/v4l2-mfc-example/common.h
@@ -167,6 +167,7 @@ struct instance {
char *p[MAX_BUFS];
int dbuf[MAX_BUFS];
int dmabuf;
+ char ignore_format_change;
} fimc;
/* MFC related parameters */
diff --git a/v4l2-mfc-example/fimc.c b/v4l2-mfc-example/fimc.c
index 78a1475..a168100 100644
--- a/v4l2-mfc-example/fimc.c
+++ b/v4l2-mfc-example/fimc.c
@@ -113,10 +113,13 @@ int fimc_sfmt(struct instance *i, int width, int height,
"Please read patch: \"s5p-fimc: Changed RGB32 to BGR32\"\n"
"\thttp://www.spinics.net/lists/linux-media/msg74953.html\n"
"\thttps://patchwork.linuxtv.org/patch/23236/");
- return -1;
+ if (i->fimc.ignore_format_change) {
+ err("!!! IGNORING FORMAT CHANGE !!!");
+ } else {
+ return -1;
+ }
}
-
dbg("Successful SFMT on %s of FIMC (%dx%d)",
dbg_type[type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE],
width, height);