diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-11-06 10:42:14 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-11-06 10:42:14 +0100 |
commit | 57451f856524bf2b02ffe8e43ba2709a72cdd4f5 (patch) | |
tree | 92d1aa42ad1a05679b9465cc13286e4ada764b9b | |
parent | 305a35223cf338c8c7fb042036f2208fb038d77a (diff) |
v4l2-compliance: improve comment for CROPCAP/G_SELECTION fail
The reason for this failure is a bit subtle (missing support for
V4L2_SEL_TGT_CROP_DEFAULT/BOUNDS), so explain this in more detail.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | utils/v4l2-compliance/v4l2-test-formats.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp index c20d5ad2..61bb317d 100644 --- a/utils/v4l2-compliance/v4l2-test-formats.cpp +++ b/utils/v4l2-compliance/v4l2-test-formats.cpp @@ -1576,9 +1576,17 @@ static int testLegacyCrop(struct node *node) V4L2_SEL_TGT_COMPOSE_DEFAULT; /* * If either CROPCAP or G_CROP works, then G_SELECTION should - * work as well. + * work as well. This was typically the case for drivers that + * only implemented G_CROP and not G_SELECTION. However, + * support for G_CROP was removed from the kernel and all drivers + * now support G_SELECTION, so this should no longer happen. + * * If neither CROPCAP nor G_CROP work, then G_SELECTION shouldn't - * work either. + * work either. If this fails, then this is almost certainly because + * G_SELECTION doesn't support V4L2_SEL_TGT_CROP_DEFAULT and/or + * V4L2_SEL_TGT_CROP_BOUNDS. CROPCAP requires both to be present. + * For output devices this is of course V4L2_SEL_TGT_COMPOSE_DEFAULT + * and/or V4L2_SEL_TGT_COMPOSE_BOUNDS. */ if (!doioctl(node, VIDIOC_CROPCAP, &cap)) { fail_on_test(doioctl(node, VIDIOC_G_SELECTION, &sel)); |