コード例 #1
0
ファイル: jpeg_enc.c プロジェクト: Frontier314/frontkernel35
static int jpeg_enc_m2m_qbuf(struct file *file, void *priv,
			  struct v4l2_buffer *buf)
{
	struct jpeg_ctx *ctx = priv;

	return v4l2_m2m_qbuf(file, ctx->m2m_ctx, buf);
}
コード例 #2
0
ファイル: v4l2-mem2mem.c プロジェクト: mhei/linux
int v4l2_m2m_ioctl_qbuf(struct file *file, void *priv,
                        struct v4l2_buffer *buf)
{
    struct v4l2_fh *fh = file->private_data;

    return v4l2_m2m_qbuf(file, fh->m2m_ctx, buf);
}
コード例 #3
0
static int fimc_m2m_qbuf(struct file *file, void *fh,
			 struct v4l2_buffer *buf)
{
	struct fimc_ctx *ctx = fh_to_ctx(fh);

	return v4l2_m2m_qbuf(file, ctx->m2m_ctx, buf);
}
コード例 #4
0
ファイル: hva-v4l2.c プロジェクト: acton393/linux
static int hva_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{
	struct hva_ctx *ctx = fh_to_ctx(file->private_data);
	struct device *dev = ctx_to_dev(ctx);

	if (buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
		/*
		 * depending on the targeted compressed video format, the
		 * capture buffer might contain headers (e.g. H.264 SPS/PPS)
		 * filled in by the driver client; the size of these data is
		 * copied from the bytesused field of the V4L2 buffer in the
		 * payload field of the hva stream buffer
		 */
		struct vb2_queue *vq;
		struct hva_stream *stream;

		vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, buf->type);

		if (buf->index >= vq->num_buffers) {
			dev_dbg(dev, "%s buffer index %d out of range (%d)\n",
				ctx->name, buf->index, vq->num_buffers);
			return -EINVAL;
		}

		stream = (struct hva_stream *)vq->bufs[buf->index];
		stream->bytesused = buf->bytesused;
	}

	return v4l2_m2m_qbuf(file, ctx->fh.m2m_ctx, buf);
}
コード例 #5
0
ファイル: mtk_vcodec_enc.c プロジェクト: avagin/linux
static int vidioc_venc_qbuf(struct file *file, void *priv,
			    struct v4l2_buffer *buf)
{
	struct mtk_vcodec_ctx *ctx = fh_to_ctx(priv);

	if (ctx->state == MTK_STATE_ABORT) {
		mtk_v4l2_err("[%d] Call on QBUF after unrecoverable error",
				ctx->id);
		return -EIO;
	}

	return v4l2_m2m_qbuf(file, ctx->m2m_ctx, buf);
}
コード例 #6
0
/*
 * msm_jpegdma_qbuf - V4l2 ioctl queue buffer handler.
 * @file: Pointer to file struct.
 * @fh: V4l2 File handle.
 * @buf: Pointer to v4l2_buffer struct.
 */
static int msm_jpegdma_qbuf(struct file *file, void *fh,
	struct v4l2_buffer *buf)
{
	struct jpegdma_ctx *ctx = msm_jpegdma_ctx_from_fh(fh);
	int ret;

	mutex_lock(&ctx->lock);

	ret = v4l2_m2m_qbuf(file, ctx->m2m_ctx, buf);
	if (ret < 0)
		dev_err(ctx->jdma_device->dev, "QBuf fail\n");

	mutex_unlock(&ctx->lock);

	return ret;
}
コード例 #7
0
static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{
    struct g2d_ctx *ctx = priv;
    return v4l2_m2m_qbuf(file, ctx->m2m_ctx, buf);
}