[media] st-delta: EOS (End Of Stream) support
authorHugues Fruchet <hugues.fruchet@st.com>
Thu, 2 Feb 2017 14:59:51 +0000 (12:59 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 8 Feb 2017 12:04:28 +0000 (10:04 -0200)
commit017c324242c2e9724938ef193ac6cb4ec5131778
tree9e873112819a1ac2dcde29a7625b678c6cdacab1
parent91c83f395fbe7c89eca46ad2d5bde49f4f8de2c4
[media] st-delta: EOS (End Of Stream) support

EOS (End Of Stream) support allows user to get
all the potential decoded frames remaining in decoder
pipeline after having reached the end of video bitstream.
To do so, user calls VIDIOC_DECODER_CMD(V4L2_DEC_CMD_STOP)
which will drain the decoder and get the drained frames
that are then returned to user.
User is informed of EOS completion in two ways:
 - dequeue of an empty frame flagged to V4L2_BUF_FLAG_LAST
 - reception of a V4L2_EVENT_EOS event.
If, unfortunately, no buffer is available on CAPTURE queue
to return the empty frame, EOS is delayed till user queue
one CAPTURE buffer.

Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/sti/delta/delta-v4l2.c
drivers/media/platform/sti/delta/delta.h