Commit 70b2a546 authored by Viswanath Boma's avatar Viswanath Boma Committed by Mauro Carvalho Chehab

media: venus : Addition of EOS Event support for Encoder

V4l2 encoder compliance expecting End of stream Event registration
support for Encoder.
Signed-off-by: default avatarViswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: default avatarVikash Garodia <vgarodia@qti.qualcomm.com>
Signed-off-by: default avatarDikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent c260bf4b
......@@ -507,6 +507,19 @@ static int venc_enum_frameintervals(struct file *file, void *fh,
return 0;
}
static int venc_subscribe_event(struct v4l2_fh *fh,
const struct v4l2_event_subscription *sub)
{
switch (sub->type) {
case V4L2_EVENT_EOS:
return v4l2_event_subscribe(fh, sub, 2, NULL);
case V4L2_EVENT_CTRL:
return v4l2_ctrl_subscribe_event(fh, sub);
default:
return -EINVAL;
}
}
static const struct v4l2_ioctl_ops venc_ioctl_ops = {
.vidioc_querycap = venc_querycap,
.vidioc_enum_fmt_vid_cap = venc_enum_fmt,
......@@ -532,7 +545,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
.vidioc_g_parm = venc_g_parm,
.vidioc_enum_framesizes = venc_enum_framesizes,
.vidioc_enum_frameintervals = venc_enum_frameintervals,
.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
.vidioc_subscribe_event = venc_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment