Lines Matching +full:drive +full:- +full:open +full:- +full:source
1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
6 Memory-to-Memory Stateful Video Encoder Interface
12 further post-processing by the client.
34 5. Single-planar API (see :ref:`planar-apis`) and applicable structures may be
35 used interchangeably with multi-planar API, unless specified otherwise,
47 Refer to :ref:`decoder-glossary`.
52 .. kernel-render:: DOT
65 qi -> Initialization [ label = "open()" ];
67 Initialization -> Encoding [ label = "Both queues streaming" ];
69 Encoding -> Drain [ label = "V4L2_ENC_CMD_STOP" ];
70 Encoding -> Reset [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
71 Encoding -> Stopped [ label = "VIDIOC_STREAMOFF(OUTPUT)" ];
72 Encoding -> Encoding;
74 Drain -> Stopped [ label = "All CAPTURE\nbuffers dequeued\nor\nVIDIOC_STREAMOFF(OUTPUT)" ];
75 Drain -> Reset [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
77 Reset -> Encoding [ label = "VIDIOC_STREAMON(CAPTURE)" ];
78 Reset -> Initialization [ label = "VIDIOC_REQBUFS(OUTPUT, 0)" ];
80 Stopped -> Encoding [ label = "V4L2_ENC_CMD_START\nor\nVIDIOC_STREAMON(OUTPUT)" ];
81 Stopped -> Reset [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
161 ignored (read-only).
173 ``OUTPUT`` format, selection rectangles, etc. (read-only).
182 source) for the selected coded format via :c:func:`VIDIOC_ENUM_FMT`.
201 3. Set the raw source format on the ``OUTPUT`` queue via
210 raw format of the source.
213 source resolution.
264 changed to a different value. This is useful for off-line encoding
284 the case for off-line encoding. Support for this feature is signalled
285 by the :ref:`V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL <fmtdesc-flags>` format flag.
350 equal to the full source frame, matching the active ``OUTPUT``
357 rectangle within the source buffer to be encoded into the
362 A common use case for this selection target is encoding a source
364 e.g. the common 1920x1080 resolution may require the source
455 format and may be affected by codec-specific extended controls, as stated
459 queues and memory-to-memory devices. In addition, the order of encoded frames
502 ``CAPTURE`` buffers are out-of-order compared to the ``OUTPUT`` buffers):
532 further operations on corresponding encoder file handle will return the -EIO
533 error code. The client may close the file handle and open a new one, or
541 parameters at any time. The availability of parameters is encoder-specific
544 The ability to change each parameter during encoding is encoder-specific, as
547 -EBUSY error code, the ``CAPTURE`` queue needs to be stopped for the
551 The timing of parameter updates is encoder-specific, as per the standard
554 (:ref:`media-request-api`) should be considered, if supported by the encoder.
603 marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from
623 * ``V4L2_ENC_CMD_START`` - the encoder will not be reset and will resume
627 ``CAPTURE`` queue - the encoder will be reset (see the `Reset` sequence)
631 ``OUTPUT`` queue - the encoder will resume operation normally, however any
632 source frames queued to the ``OUTPUT`` queue between ``V4L2_ENC_CMD_STOP``
637 Once the drain sequence is initiated, the client needs to drive it to
642 will fail with -EBUSY error code if attempted.
683 1. Perform the `Drain` sequence to ensure all the in-flight encoding finishes
725 return the -EBUSY error code for any such format change attempt.