diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2012-05-04 11:24:41 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-05-05 13:38:50 +0200 |
commit | edad96b36f85dad7f681a7938b50b4619d11ed50 (patch) | |
tree | 49c04f475e0682f6507522cb202d2d71b9d2fc25 /src/main.c | |
parent | 46bec667b675573cf1ce698c68112e3dbd31930e (diff) |
Support selections API for crop
Support the new selections API for crop. Fall back to use the old crop API
in case the selection API isn't available.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -62,7 +62,9 @@ static void v4l2_subdev_print_format(struct media_entity *entity, printf("[%s %ux%u", v4l2_subdev_pixelcode_to_string(format.code), format.width, format.height); - ret = v4l2_subdev_get_crop(entity, &rect, pad, which); + ret = v4l2_subdev_get_selection(entity, &rect, pad, + V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL, + which); if (ret == 0) printf(" (%u,%u)/%ux%u", rect.left, rect.top, rect.width, rect.height); |