Skip to content

Commit

Permalink
compliance: stop declaring V4L2_CAP_VIDEO_M2M capability
Browse files Browse the repository at this point in the history
v4l2-compliance complains about "Video Capture cap set, but no Video
Capture formats defined" because V4L2_CAP_VIDEO_M2M is set and yet
vidioc_enum_fmt_cap implementation would simply return -EINVAL before
being ready for capturing.

V4L2 memory-to-memory operatons have never been actually supported. It
was introduced in an attempt to fix #67,
VIDIOC_G/S_PRIORITY test failures reported by v4l2-compliance, but
VIDIOC_G/S_PRIORITY is an exclusive feature when V4L2 file handle
framework is used, and this was certainly not the case until
#345 that brought in v4l2_fh for V4L2 Event API
support.

This change removes all declarations of M2M support.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
  • Loading branch information
vicamo committed Mar 13, 2021
1 parent 4ef6efe commit 9a77eb6
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions v4l2loopback.c
Expand Up @@ -760,10 +760,6 @@ static int vidioc_querycap(struct file *file, void *priv,
cap->version = V4L2LOOPBACK_VERSION_CODE;
#endif

#ifdef V4L2_CAP_VIDEO_M2M
capabilities |= V4L2_CAP_VIDEO_M2M;
#endif /* V4L2_CAP_VIDEO_M2M */

if (dev->announce_all_caps) {
capabilities |= V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT;
} else {
Expand Down Expand Up @@ -2251,9 +2247,6 @@ static void init_vdev(struct video_device *vdev, int nr)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
#ifdef V4L2_CAP_VIDEO_M2M
vdev->device_caps |= V4L2_CAP_VIDEO_M2M;
#endif
#endif /* >=linux-4.7.0 */

if (debug > 1)
Expand Down

0 comments on commit 9a77eb6

Please sign in to comment.