Support selections API for crop
[media-ctl.git] / src / main.c
index 4f3271c..53964e4 100644 (file)
@@ -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);