参照元

説明

引数

返り値

参考

実装

static void uvc_buffer_queue(struct vb2_buffer *vb)
{
        struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
        struct uvc_video_queue *queue = vb2_get_drv_priv(vb->vb2_queue);
        struct uvc_buffer *buf = container_of(vbuf, struct uvc_buffer, buf);
        unsigned long flags;
        spin_lock_irqsave(&queue->irqlock, flags);
        if (likely(!(queue->flags & UVC_QUEUE_DISCONNECTED))) {
                list_add_tail(&buf->queue, &queue->irqqueue);
        } else {
                /* If the device is disconnected return the buffer to userspace
                 * directly. The next QBUF call will fail with -ENODEV.
                 */
                buf->state = UVC_BUF_STATE_ERROR;
                vb2_buffer_done(vb, VB2_BUF_STATE_ERROR);
        }
        spin_unlock_irqrestore(&queue->irqlock, flags);
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS