vb2_buffer和v4l2_buffer

vb2_buffer和v4l2_buffer是Linux视频设备驱动中的关键数据结构,vb2_buffer用于表示视频缓冲区,并包含与其关联的v4l2_buffer结构,供驱动程序在捕获类型中读取和修改。v4l2_buffer则是用户空间应用程序用于交互的数据结构,包含了缓冲区的信息如类型、长度、偏移量等。vb2_buffer维护了多个内部链表,用于管理不同状态的缓冲区。
摘要由CSDN通过智能技术生成
videobuf2-core.h中的vb2_buffer,记录了v4l2_buffer ,驱动可以对vb2_buffer的v4l2_buffer进行操控,
vb2_buffer是v4l2框架层的代码,而v4l2_buffer也是用户空间的应用程序,可以读取的一个数据结构。
videobuf2-core.h:

165 
166 /**
167  * struct vb2_buffer - represents a video buffer
168  * @v4l2_buf:           struct v4l2_buffer associated with this buffer; can
169  *                      be read by the driver and relevant entries can be
170  *                      changed by the driver in case of CAPTURE types
171  *                      (such as timestamp)
172  * @v4l2_planes:        struct v4l2_planes associated with this buffer; can
173  *                      be read by the driver and relevant entries can be
174  *                      changed by the driver in case of CAPTURE types
175  *                      (such as bytesused); NOTE that even for single-planar
176  *                      types, the v4l2_planes[0] struct should be used
177  *                      instead of v4l2_buf for filling bytesused - drivers
178  *                      should use the vb2_set_plane_payload() function for that
179  * @vb2_queue:          the queue to which this driver belongs
180  * @num_planes:         number of planes in the buffer
181  *                      on an internal driver queue
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值