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
vb2_buffer和v4l2_buffer
最新推荐文章于 2024-07-31 08:54:13 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)