参照元

説明

引数

返り値

参考

実装

static int uvc_queue_setup(struct vb2_queue *vq, const void *parg,
                           unsigned int *nbuffers, unsigned int *nplanes,
                           unsigned int sizes[], void *alloc_ctxs[])
{
        const struct v4l2_format *fmt = parg;
        struct uvc_video_queue *queue = vb2_get_drv_priv(vq);
        struct uvc_streaming *stream = uvc_queue_to_stream(queue);
        /* Make sure the image size is large enough. */
        if (fmt && fmt->fmt.pix.sizeimage < stream->ctrl.dwMaxVideoFrameSize)
                return -EINVAL;

        *nplanes = 1;

        sizes[0] = fmt ? fmt->fmt.pix.sizeimage
                 : stream->ctrl.dwMaxVideoFrameSize;

        return 0;
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-02-09 (火) 10:54:36