int dvb_vb2_expbuf(struct dvb_vb2_ctx *ctx, struct dmx_exportbuffer *exp) { struct vb2_queue *q = &ctx->vb_q; int ret; ret = vb2_core_expbuf(&ctx->vb_q, &exp->fd, q->type, exp->index, 0, exp->flags); if (ret) { dprintk(1, "[%s] index=%d errno=%d\n", ctx->name, exp->index, ret); return ret; } dprintk(3, "[%s] index=%d fd=%d\n", ctx->name, exp->index, exp->fd); return 0; }
/** * vb2_expbuf() - Export a buffer as a file descriptor * @q: videobuf2 queue * @eb: export buffer structure passed from userspace to vidioc_expbuf * handler in driver * * The return values from this function are intended to be directly returned * from vidioc_expbuf handler in driver. */ int vb2_expbuf(struct vb2_queue *q, struct v4l2_exportbuffer *eb) { return vb2_core_expbuf(q, &eb->fd, eb->type, eb->index, eb->plane, eb->flags); }