aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-12-06 09:56:33 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2014-12-06 09:56:33 +0100
commit962ea01d1c3a72c6774dc1f8ff9e03d516f6160f (patch)
treece539116b5454dd34efa9c4a6c7260b487e05768
parentcda56b961b7e3fbfb90f190e36c1b23d524aa013 (diff)
v4l2-ctl: add V4L2_SEL_TGT_NATIVE_SIZE support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-io.cpp10
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-selection.cpp4
2 files changed, 9 insertions, 5 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp
index e5a045b9..12bc8e15 100644
--- a/utils/v4l2-ctl/v4l2-ctl-io.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp
@@ -71,8 +71,9 @@ static std::string status2s(__u32 status)
static const flag_def input_cap_def[] = {
- {V4L2_IN_CAP_DV_TIMINGS, "DV timings" },
- {V4L2_IN_CAP_STD, "SDTV standards" },
+ { V4L2_IN_CAP_DV_TIMINGS, "DV timings" },
+ { V4L2_IN_CAP_STD, "SDTV standards" },
+ { V4L2_IN_CAP_NATIVE_SIZE, "Native Size" },
{ 0, NULL }
};
@@ -82,8 +83,9 @@ static std::string input_cap2s(__u32 capabilities)
}
static const flag_def output_cap_def[] = {
- {V4L2_OUT_CAP_DV_TIMINGS, "DV timings" },
- {V4L2_OUT_CAP_STD, "SDTV standards" },
+ { V4L2_OUT_CAP_DV_TIMINGS, "DV timings" },
+ { V4L2_OUT_CAP_STD, "SDTV standards" },
+ { V4L2_OUT_CAP_NATIVE_SIZE, "Native Size" },
{ 0, NULL }
};
diff --git a/utils/v4l2-ctl/v4l2-ctl-selection.cpp b/utils/v4l2-ctl/v4l2-ctl-selection.cpp
index 20934708..40473b07 100644
--- a/utils/v4l2-ctl/v4l2-ctl-selection.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-selection.cpp
@@ -74,7 +74,7 @@ void selection_usage(void)
" --set-selection=target=<target>,flags=<flags>,top=<x>,left=<y>,width=<w>,height=<h>\n"
" set the video capture selection rectangle [VIDIOC_S_SELECTION]\n"
" target=crop|crop_bounds|crop_default|compose|compose_bounds|\n"
- " compose_default|compose_padded\n"
+ " compose_default|compose_padded|native_size\n"
" flags=le|ge\n"
" --get-selection-output=target=<target>\n"
" query the video output selection rectangle [VIDIOC_G_SELECTION]\n"
@@ -172,6 +172,7 @@ static int parse_selection_target(const char *s, unsigned int &target)
else if (!strcmp(s, "compose_default")) target = V4L2_SEL_TGT_COMPOSE_DEFAULT;
else if (!strcmp(s, "compose_bounds")) target = V4L2_SEL_TGT_COMPOSE_BOUNDS;
else if (!strcmp(s, "compose_padded")) target = V4L2_SEL_TGT_COMPOSE_PADDED;
+ else if (!strcmp(s, "native_size")) target = V4L2_SEL_TGT_NATIVE_SIZE;
else return -EINVAL;
return 0;
@@ -262,6 +263,7 @@ static const flag_def selection_targets_def[] = {
{ V4L2_SEL_TGT_COMPOSE_DEFAULT, "compose_default" },
{ V4L2_SEL_TGT_COMPOSE_BOUNDS, "compose_bounds" },
{ V4L2_SEL_TGT_COMPOSE_PADDED, "compose_padded" },
+ { V4L2_SEL_TGT_NATIVE_SIZE, "native_size" },
{ 0, NULL }
};

Privacy Policy