From edad96b36f85dad7f681a7938b50b4619d11ed50 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 4 May 2012 11:24:41 +0300 Subject: 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 Signed-off-by: Laurent Pinchart --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4f3271c..53964e4 100644 --- a/src/main.c +++ b/src/main.c @@ -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); -- cgit v1.2.3