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 发布
vb2_buffer和v4l2_buffer是Linux视频设备驱动中的关键数据结构,vb2_buffer用于表示视频缓冲区,并包含与其关联的v4l2_buffer结构,供驱动程序在捕获类型中读取和修改。v4l2_buffer则是用户空间应用程序用于交互的数据结构,包含了缓冲区的信息如类型、长度、偏移量等。vb2_buffer维护了多个内部链表,用于管理不同状态的缓冲区。
摘要由CSDN通过智能技术生成