History

media: videodev2.h: add V4L2_DEC_CMD_FLUSH

Add this new V4L2_DEC_CMD_FLUSH decoder command and document it.

Hans Verkuil committed 7 years ago

Commit bac06ec1 parent f8cca8c3 files · +11 −1Browse files

Unified · Split

3 files
  1. Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst +9 −1
  2. Documentation/media/videodev2.h.rst.exceptions +1 −0
  3. include/uapi/linux/videodev2.h +1 −0
Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst+9−1
@@ -208,7 +208,15 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod · 207 unmodified lines
208 been started yet, the driver will return an ``EPERM`` error code. When208 been started yet, the driver will return an ``EPERM`` error code. When
209 the decoder is already running, this command does nothing. No209 the decoder is already running, this command does nothing. No
210 flags are defined for this command.210 flags are defined for this command.
211 211 * - ``V4L2_DEC_CMD_FLUSH``
212 - 4
213 - Flush any held capture buffers. Only valid for stateless decoders.
214 This command is typically used when the application reached the
215 end of the stream and the last output buffer had the
216 ``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF`` flag set. This would prevent
217 dequeueing the capture buffer containing the last decoded frame.
218 So this command can be used to explicitly flush that final decoded
219 frame. This command does nothing if there are no held capture buffers.
212 220
213Return Value221Return Value
214============222============
Documentation/media/videodev2.h.rst.exceptions+1−0
@@ -435,6 +435,7 @@ replace define V4L2_DEC_CMD_START decoder-cmds · 434 unmodified lines
435replace define V4L2_DEC_CMD_STOP decoder-cmds435replace define V4L2_DEC_CMD_STOP decoder-cmds
436replace define V4L2_DEC_CMD_PAUSE decoder-cmds436replace define V4L2_DEC_CMD_PAUSE decoder-cmds
437replace define V4L2_DEC_CMD_RESUME decoder-cmds437replace define V4L2_DEC_CMD_RESUME decoder-cmds
438replace define V4L2_DEC_CMD_FLUSH decoder-cmds
438 439
439replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds440replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds
440replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds441replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds
include/uapi/linux/videodev2.h+1−0
@@ -1984,6 +1984,7 @@ struct v4l2_encoder_cmd { · 1983 unmodified lines
1984#define V4L2_DEC_CMD_STOP (1)1984#define V4L2_DEC_CMD_STOP (1)
1985#define V4L2_DEC_CMD_PAUSE (2)1985#define V4L2_DEC_CMD_PAUSE (2)
1986#define V4L2_DEC_CMD_RESUME (3)1986#define V4L2_DEC_CMD_RESUME (3)
1987#define V4L2_DEC_CMD_FLUSH (4)
1987 1988
1988/* Flags for V4L2_DEC_CMD_START */1989/* Flags for V4L2_DEC_CMD_START */
1989#define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0)1990#define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0)