视频设备驱动程序介绍
桥接驱动程序
桥接驱动程序控制负责 DMA 传输的平台、USB、PCI 等硬件,它处理设备的数据流式传输。桥接驱动程序直接处理的主要数据结构之一是 struct video_device 。该结构嵌入了执行视频流式传输所需的所有元素,它与用户空间的首次交互之一是在 /dev/ 目录中创建设备文件。
struct video_device 结构在 include/media/v4l2-dev.h 中定义,因此驱动程序代码必须包含 #include <media/v4l2-dev.h> 。以下是该结构在定义它的头文件中的样子:
struct video_device
{
#if defined(CONFIG_MEDIA_CONTROLLER)
struct media_entity entity;
struct media_intf_devnode *intf_devnode;
struct media_pipeline pipe;
#endif
const struct v4l2_file_operations *fops;
u32 device_caps;
struct device dev; struct cdev *cdev;
struct v4l2_device *v4l2_dev;
struct device *dev_parent;
struct v4l2_ctrl_
超级会员免费看
订阅专栏 解锁全文
5214

被折叠的 条评论
为什么被折叠?



