All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot@chromium.org>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Tomasz Figa <tfiga@chromium.org>
Subject: Re: [PATCHv2 10/12] videodev2.h: add V4L2_DEC_CMD_FLUSH
Date: Thu, 15 Aug 2019 17:12:20 +0900	[thread overview]
Message-ID: <CAPBb6MVTGJJH_rFjvQy37NDLzT1b_=dBRF6UkFb2hWMwD6EC=A@mail.gmail.com> (raw)
In-Reply-To: <20190812110513.23774-11-hverkuil-cisco@xs4all.nl>

On Mon, Aug 12, 2019 at 8:07 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Add this new V4L2_DEC_CMD_FLUSH decoder command and document it.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
>  Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 ++++++++++-
>  Documentation/media/videodev2.h.rst.exceptions      |  1 +
>  include/uapi/linux/videodev2.h                      |  1 +
>  3 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst
> index 57f0066f4cff..0bffef6058f7 100644
> --- a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst
> @@ -208,7 +208,16 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod
>         been started yet, the driver will return an ``EPERM`` error code. When
>         the decoder is already running, this command does nothing. No
>         flags are defined for this command.
> -
> +    * - ``V4L2_DEC_CMD_FLUSH``
> +      - 4
> +      - Flush any held capture buffers. Only valid for stateless decoders,
> +        and only if ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` was set.
> +       This command is typically used when the application reached the
> +       end of the stream and the last output buffer had the
> +       ``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF`` flag set. This would prevent
> +       dequeueing the last capture buffer containing the last decoded frame.
> +       So this command can be used to explicitly flush that last decoded
> +       frame.

I'm a bit confused here, isn't this command referred to as
V4L2_DEC_CMD_STOP in the previous patch?


>
>  Return Value
>  ============
> diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions
> index adeb6b7a15cb..a79028e4d929 100644
> --- a/Documentation/media/videodev2.h.rst.exceptions
> +++ b/Documentation/media/videodev2.h.rst.exceptions
> @@ -434,6 +434,7 @@ replace define V4L2_DEC_CMD_START decoder-cmds
>  replace define V4L2_DEC_CMD_STOP decoder-cmds
>  replace define V4L2_DEC_CMD_PAUSE decoder-cmds
>  replace define V4L2_DEC_CMD_RESUME decoder-cmds
> +replace define V4L2_DEC_CMD_FLUSH decoder-cmds
>
>  replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds
>  replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 4fa9f543742d..91a79e16089c 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -1978,6 +1978,7 @@ struct v4l2_encoder_cmd {
>  #define V4L2_DEC_CMD_STOP        (1)
>  #define V4L2_DEC_CMD_PAUSE       (2)
>  #define V4L2_DEC_CMD_RESUME      (3)
> +#define V4L2_DEC_CMD_FLUSH       (4)
>
>  /* Flags for V4L2_DEC_CMD_START */
>  #define V4L2_DEC_CMD_START_MUTE_AUDIO  (1 << 0)
> --
> 2.20.1
>

  reply	other threads:[~2019-08-15  8:12 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 11:05 [PATCHv2 00/12] Stateful/stateless codec core support Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM Hans Verkuil
2019-08-14 12:52   ` Paul Kocialkowski
2019-08-15  8:11   ` Alexandre Courbot
2019-08-15  8:13     ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-08-14 12:53   ` Paul Kocialkowski
2019-08-15  8:11     ` Alexandre Courbot
2019-08-15 10:09       ` Tomasz Figa
2019-08-15 14:22     ` Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 03/12] media: venus: vdec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-08-12 13:49   ` Stanimir Varbanov
2019-08-14 12:54   ` Paul Kocialkowski
2019-08-12 11:05 ` [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats Hans Verkuil
2019-08-14 12:55   ` Paul Kocialkowski
2019-08-15 10:14   ` Tomasz Figa
2019-08-16 11:37     ` Marek Szyprowski
2019-08-16 11:47       ` Tomasz Figa
2019-08-12 11:05 ` [PATCHv2 05/12] media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-08-14 12:59   ` Paul Kocialkowski
2019-08-15  8:12   ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 06/12] media: vicodec: set flags for vdec/stateful OUTPUT coded formats Hans Verkuil
2019-08-14 13:04   ` Paul Kocialkowski
2019-08-12 11:05 ` [PATCHv2 07/12] media: docs-rst: Document memory-to-memory video decoder interface Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 08/12] pixfmt-compressed.rst: improve H264/HEVC/MPEG1+2/VP8+9 documentation Hans Verkuil
2019-08-14 13:09   ` Paul Kocialkowski
2019-08-14 13:15     ` Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF Hans Verkuil
2019-08-15  8:12   ` Alexandre Courbot
2019-08-15 11:53     ` Hans Verkuil
2019-08-15 12:27       ` Tomasz Figa
2019-08-15 12:31         ` Hans Verkuil
2019-08-15 14:27       ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 10/12] videodev2.h: add V4L2_DEC_CMD_FLUSH Hans Verkuil
2019-08-15  8:12   ` Alexandre Courbot [this message]
2019-08-15 11:53     ` Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 11/12] media: docs-rst: Document m2m stateless video decoder interface Hans Verkuil
2019-08-15  9:58   ` Alexandre Courbot
2019-08-16  5:49   ` Alexandre Courbot
2019-08-16  6:59     ` Hans Verkuil
2019-08-16  7:17       ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 12/12] media: docs-rst: Document memory-to-memory video encoder interface Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPBb6MVTGJJH_rFjvQy37NDLzT1b_=dBRF6UkFb2hWMwD6EC=A@mail.gmail.com' \
    --to=acourbot@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.