Add this new V4L2_DEC_CMD_FLUSH decoder command and document it.
Unified · Split
| @@ -208,7 +208,15 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod · 207 unmodified lines | ||
| 208 | 208 | been started yet, the driver will return an ``EPERM`` error code. When |
| 209 | 209 | the decoder is already running, this command does nothing. No |
| 210 | 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 | |
| 213 | 221 | Return Value |
| 214 | 222 | ============ |
| @@ -435,6 +435,7 @@ replace define V4L2_DEC_CMD_START decoder-cmds · 434 unmodified lines | ||
| 435 | 435 | replace define V4L2_DEC_CMD_STOP decoder-cmds |
| 436 | 436 | replace define V4L2_DEC_CMD_PAUSE decoder-cmds |
| 437 | 437 | replace define V4L2_DEC_CMD_RESUME decoder-cmds |
| 438 | +replace define V4L2_DEC_CMD_FLUSH decoder-cmds | |
| 438 | 439 | |
| 439 | 440 | replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds |
| 440 | 441 | replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds |
| @@ -1984,6 +1984,7 @@ struct v4l2_encoder_cmd { · 1983 unmodified lines | ||
| 1984 | 1984 | #define V4L2_DEC_CMD_STOP (1) |
| 1985 | 1985 | #define V4L2_DEC_CMD_PAUSE (2) |
| 1986 | 1986 | #define V4L2_DEC_CMD_RESUME (3) |
| 1987 | +#define V4L2_DEC_CMD_FLUSH (4) | |
| 1987 | 1988 | |
| 1988 | 1989 | /* Flags for V4L2_DEC_CMD_START */ |
| 1989 | 1990 | #define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0) |