-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support v4l2 event apis #345
support v4l2 event apis #345
Conversation
When v4l2_fh_init() is called, kernel V4L2 subsystem would assume file->private_data is a pointer to a v4l2_fh instance. Follow this and update corresponding references with a `fh_to_opener` macro. Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
which problems does this PR solve? |
Hi, this will be a new feature to support V4L2 Event API as akvcam, another v4l2 loopback implementation, does, and at the same time be an attempt to refactor v4l2loopback with in-kernel sub frameworks like v4l2-fh. |
so what is the use-case?
i welcome this, however:
|
Rebase on latest develop branch. Tested build old kernels as well. So far 3.16 is the oldest kernel known working, and it fails on 3.13 due to incompatibility introduced by IDR. So there is a project called libcamera, which is to wrap V4L2 and other ways of camera access in a user space library and provide unified API interface. Under libcamera, there is no more directly access to underlying video devices, so a compatible layer based on And since V4L2 Events API is based on v4l2_fh sub framework, and it's automatically achieved by implementations using v4l2_fh, the major task here is to add and use v4l2_fh in the opener structure. That's the full story. :) |
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 umlaeute#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 umlaeute#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>
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 umlaeute#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 umlaeute#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>
This is an attempt to enable V4L2 Events API in v4l2loopback. Now we have: