【 vb2_buffer_state】 v4l2 videobuf的几种状态

前端之家收集整理的这篇文章主要介绍了【 vb2_buffer_state】 v4l2 videobuf的几种状态前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

http://lxr.free-electrons.com/source/include/media/videobuf2-core.h#L164


142 /**

143 * enum vb2_buffer_state - current video buffer state
144 * @VB2_BUF_STATE_DEQUEUED: buffer under userspace control
145 * @VB2_BUF_STATE_PREPARED: buffer prepared in videobuf and by the driver
146 * @VB2_BUF_STATE_QUEUED: buffer queued in videobuf,but not in driver
147 * @VB2_BUF_STATE_ACTIVE: buffer queued in driver and possibly used
148 * in a hardware operation
149 * @VB2_BUF_STATE_DONE: buffer returned from driver to videobuf,but
150 * not yet dequeued to userspace
151 * @VB2_BUF_STATE_ERROR: same as above,but the operation on the buffer
152 * has ended with an error,which will be reported
153 * to the userspace when it is dequeued
154 */
155 enum vb2_buffer_state {
156 VB2_BUF_STATE_DEQUEUED,
157 VB2_BUF_STATE_PREPARED,
158 VB2_BUF_STATE_QUEUED,
159 VB2_BUF_STATE_ACTIVE,
160 VB2_BUF_STATE_DONE,
161 VB2_BUF_STATE_ERROR,

162 };


出队 dequeue,缓冲已经进入了用户控件。

准备好了,prepared,驱动管辖着把缓冲放在了videobuf中。

入队了,queued,缓冲进入了videobuf中了,已经不在驱动管辖下。

激活,active,缓冲已经在驱动中了,并可能已经在硬件操作中被使用了。

完成,DONE,缓冲已经从驱动到了videobuf中,但还没有进入dequeue到用户空间中。

错误,error,缓冲已经从驱动到了videobuf中,但还没dequeue进入到用户空间中,但是呢,对于缓冲的操作遇到了错误,当dequeue到用户空间的时候,会汇报错误

原文链接:https://www.f2er.com/vb/258257.html

猜你在找的VB相关文章