linux-4.19.125\drivers\media\usb\uvc\uvc_v4l2.c
1. uvc_ops
const struct v4l2_file_operations uvc_fops = {
.owner = THIS_MODULE,
.open = uvc_v4l2_open,
.release = uvc_v4l2_release,
.unlocked_ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl32 = uvc_v4l2_compat_ioctl32,
#endif
.read = uvc_v4l2_read,
.mmap = uvc_v4l2_mmap,
.poll = uvc_v4l2_poll,
#ifndef CONFIG_MMU
.get_unmapped_area = uvc_v4l2_get_unmapped_area,
#endif
};
2. ioctl
以VIDIOC_QBUF为例:
ioctl --> video_ioctl2 --> video_usercopy --> __video_do_ioctl --> v4l2_ioctls --VIDIOC_QBUF--> v4l_qbuf --> ops->vidioc_qbuf --> uvc_v4l2_qbuf
3. open
open --> uvc_v4l2_open --> uvc_function_connect --> usb_function_activate --> usb_
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)