sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget7/translations/zh_CN/userspace-api/media/v4l/dev-decodermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/zh_TW/userspace-api/media/v4l/dev-decodermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/it_IT/userspace-api/media/v4l/dev-decodermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ja_JP/userspace-api/media/v4l/dev-decodermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ko_KR/userspace-api/media/v4l/dev-decodermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/sp_SP/userspace-api/media/v4l/dev-decodermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhQ/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/dev-decoder.rsthKubhtarget)}(h .. _decoder:h]h}(h]h ]h"]h$]h&]refiddecoderuh1hhKhhhhhhubhsection)}(hhh](htitle)}(h1Memory-to-Memory Stateful Video Decoder Interfaceh]h1Memory-to-Memory Stateful Video Decoder Interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXA stateful video decoder takes complete chunks of the bytestream (e.g. Annex-B H.264/HEVC stream, raw VP8/9 stream) and decodes them into raw video frames in display order. The decoder is expected not to require any additional information from the client to process these buffers.h]hXA stateful video decoder takes complete chunks of the bytestream (e.g. Annex-B H.264/HEVC stream, raw VP8/9 stream) and decodes them into raw video frames in display order. The decoder is expected not to require any additional information from the client to process these buffers.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hPerforming software parsing, processing etc. of the stream in the driver in order to support this interface is strongly discouraged. In case such operations are needed, use of the Stateless Video Decoder Interface (in development) is strongly advised.h]hPerforming software parsing, processing etc. of the stream in the driver in order to support this interface is strongly discouraged. In case such operations are needed, use of the Stateless Video Decoder Interface (in development) is strongly advised.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h/Conventions and Notations Used in This Documenth]h/Conventions and Notations Used in This Document}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhenumerated_list)}(hhh](h list_item)}(hNThe general V4L2 API rules apply if not specified in this document otherwise. h]h)}(hMThe general V4L2 API rules apply if not specified in this document otherwise.h]hMThe general V4L2 API rules apply if not specified in this document otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hpThe meaning of words "must", "may", "should", etc. is as per `RFC 2119 `_. h]h)}(hoThe meaning of words "must", "may", "should", etc. is as per `RFC 2119 `_.h](hIThe meaning of words “must”, “may”, “should”, etc. is as per }(hj)hhhNhNubh reference)}(h1`RFC 2119 `_h]hRFC 2119}(hj3hhhNhNubah}(h]h ]h"]h$]h&]nameRFC 2119refuri#https://tools.ietf.org/html/rfc2119uh1j1hj)ubh)}(h& h]h}(h]rfc-2119ah ]h"]rfc 2119ah$]h&]refurijDuh1h referencedKhj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj%ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(h.All steps not marked "optional" are required. h]h)}(h-All steps not marked "optional" are required.h]h1All steps not marked “optional” are required.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjcubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(h:c:func:`VIDIOC_G_EXT_CTRLS` and :c:func:`VIDIOC_S_EXT_CTRLS` may be used interchangeably with :c:func:`VIDIOC_G_CTRL` and :c:func:`VIDIOC_S_CTRL`, unless specified otherwise. h]h)}(h:c:func:`VIDIOC_G_EXT_CTRLS` and :c:func:`VIDIOC_S_EXT_CTRLS` may be used interchangeably with :c:func:`VIDIOC_G_CTRL` and :c:func:`VIDIOC_S_CTRL`, unless specified otherwise.h](h)}(h:c:func:`VIDIOC_G_EXT_CTRLS`h]hliteral)}(hjh]hVIDIOC_G_EXT_CTRLS()}(hjhhhNhNubah}(h]h ](xrefcc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc#userspace-api/media/v4l/dev-decoder refdomainjreftypefunc refexplicitrefwarn reftargetVIDIOC_G_EXT_CTRLSuh1hhhhKhjubh and }(hjhhhNhNubh)}(h:c:func:`VIDIOC_S_EXT_CTRLS`h]j)}(hjh]hVIDIOC_S_EXT_CTRLS()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_S_EXT_CTRLSuh1hhhhKhjubh" may be used interchangeably with }(hjhhhNhNubh)}(h:c:func:`VIDIOC_G_CTRL`h]j)}(hjh]hVIDIOC_G_CTRL()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_CTRLuh1hhhhKhjubh and }hjsbh)}(h:c:func:`VIDIOC_S_CTRL`h]j)}(hjh]hVIDIOC_S_CTRL()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_S_CTRLuh1hhhhKhjubh, unless specified otherwise.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj{ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hSingle-planar API (see :ref:`planar-apis`) and applicable structures may be used interchangeably with multi-planar API, unless specified otherwise, depending on decoder capabilities and following the general V4L2 guidelines. h]h)}(hSingle-planar API (see :ref:`planar-apis`) and applicable structures may be used interchangeably with multi-planar API, unless specified otherwise, depending on decoder capabilities and following the general V4L2 guidelines.h](hSingle-planar API (see }(hj%hhhNhNubh)}(h:ref:`planar-apis`h]hinline)}(hj/h]h planar-apis}(hj3hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j1hj-ubah}(h]h ]h"]h$]h&]refdocj refdomainj=reftyperef refexplicitrefwarnj planar-apisuh1hhhhK"hj%ubh) and applicable structures may be used interchangeably with multi-planar API, unless specified otherwise, depending on decoder capabilities and following the general V4L2 guidelines.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hj!ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hWi = [a..b]: sequence of integers from a to b, inclusive, i.e. i = [0..2]: i = 0, 1, 2. h]h)}(hVi = [a..b]: sequence of integers from a to b, inclusive, i.e. i = [0..2]: i = 0, 1, 2.h]hVi = [a..b]: sequence of integers from a to b, inclusive, i.e. i = [0..2]: i = 0, 1, 2.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hj_ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hGiven an ``OUTPUT`` buffer A, then A' represents a buffer on the ``CAPTURE`` queue containing data that resulted from processing buffer A. h]h)}(hGiven an ``OUTPUT`` buffer A, then A' represents a buffer on the ``CAPTURE`` queue containing data that resulted from processing buffer A.h](h Given an }(hj{hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh0 buffer A, then A’ represents a buffer on the }(hj{hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh> queue containing data that resulted from processing buffer A.}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjwubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhhhhhhhKubh)}(h.. _decoder-glossary:h]h}(h]h ]h"]h$]h&]hdecoder-glossaryuh1hhK,hhhhhhubeh}(h]/conventions-and-notations-used-in-this-documentah ]h"]/conventions and notations used in this documentah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hGlossaryh]hGlossary}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK/ubhdefinition_list)}(hhh](hdefinition_list_item)}(hX1CAPTURE the destination buffer queue; for decoders, the queue of buffers containing decoded frames; for encoders, the queue of buffers containing an encoded bytestream; ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``; data is captured from the hardware into ``CAPTURE`` buffers. h](hterm)}(hCAPTUREh]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK6hjubh definition)}(hhh]h)}(hX(the destination buffer queue; for decoders, the queue of buffers containing decoded frames; for encoders, the queue of buffers containing an encoded bytestream; ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``; data is captured from the hardware into ``CAPTURE`` buffers.h](hthe destination buffer queue; for decoders, the queue of buffers containing decoded frames; for encoders, the queue of buffers containing an encoded bytestream; }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_CAPTURE``h]hV4L2_BUF_TYPE_VIDEO_CAPTURE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h&``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``h]h"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh*; data is captured from the hardware into }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh buffers.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK6hjubj)}(h^client the application communicating with the decoder or encoder implementing this interface. h](j)}(hclienth]hclient}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK:hjRubj)}(hhh]h)}(hVthe application communicating with the decoder or encoder implementing this interface.h]hVthe application communicating with the decoder or encoder implementing this interface.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjdubah}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1jhhhK:hjhhubj)}(hgcoded format encoded/compressed video bytestream format (e.g. H.264, VP8, etc.); see also: raw format. h](j)}(h coded formath]h coded format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK>hjubj)}(hhh]h)}(hYencoded/compressed video bytestream format (e.g. H.264, VP8, etc.); see also: raw format.h]hYencoded/compressed video bytestream format (e.g. H.264, VP8, etc.); see also: raw format.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK>hjhhubj)}(h0coded height height for given coded resolution. h](j)}(h coded heighth]h coded height}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKAhjubj)}(hhh]h)}(h"height for given coded resolution.h]h"height for given coded resolution.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKAhjhhubj)}(hcoded resolution stream resolution in pixels aligned to codec and hardware requirements; typically visible resolution rounded up to full macroblocks; see also: visible resolution. h](j)}(hcoded resolutionh]hcoded resolution}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKFhjubj)}(hhh]h)}(hstream resolution in pixels aligned to codec and hardware requirements; typically visible resolution rounded up to full macroblocks; see also: visible resolution.h]hstream resolution in pixels aligned to codec and hardware requirements; typically visible resolution rounded up to full macroblocks; see also: visible resolution.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKFhjhhubj)}(h.coded width width for given coded resolution. h](j)}(h coded widthh]h coded width}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKIhjubj)}(hhh]h)}(h!width for given coded resolution.h]h!width for given coded resolution.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKIhjhhubj)}(hcoding tree unit processing unit of the HEVC codec (corresponds to macroblock units in H.264, VP8, VP9), can use block structures of up to 64×64 pixels. Good at sub-partitioning the picture into variable sized structures. h](j)}(hcoding tree unith]hcoding tree unit}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKOhj=ubj)}(hhh]h)}(hprocessing unit of the HEVC codec (corresponds to macroblock units in H.264, VP8, VP9), can use block structures of up to 64×64 pixels. Good at sub-partitioning the picture into variable sized structures.h]hprocessing unit of the HEVC codec (corresponds to macroblock units in H.264, VP8, VP9), can use block structures of up to 64×64 pixels. Good at sub-partitioning the picture into variable sized structures.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjOubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhhhKOhjhhubj)}(hX/decode order the order in which frames are decoded; may differ from display order if the coded format includes a feature of frame reordering; for decoders, ``OUTPUT`` buffers must be queued by the client in decode order; for encoders ``CAPTURE`` buffers must be returned by the encoder in decode order. h](j)}(h decode orderh]h decode order}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKUhjlubj)}(hhh]h)}(hX!the order in which frames are decoded; may differ from display order if the coded format includes a feature of frame reordering; for decoders, ``OUTPUT`` buffers must be queued by the client in decode order; for encoders ``CAPTURE`` buffers must be returned by the encoder in decode order.h](hthe order in which frames are decoded; may differ from display order if the coded format includes a feature of frame reordering; for decoders, }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhD buffers must be queued by the client in decode order; for encoders }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 buffers must be returned by the encoder in decode order.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKRhj~ubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhhhKUhjhhubj)}(hEdestination data resulting from the decode process; see ``CAPTURE``. h](j)}(h destinationh]h destination}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKXhjubj)}(hhh]h)}(h8data resulting from the decode process; see ``CAPTURE``.h](h,data resulting from the decode process; see }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKXhjhhubj)}(hdisplay order the order in which frames must be displayed; for encoders, ``OUTPUT`` buffers must be queued by the client in display order; for decoders, ``CAPTURE`` buffers must be returned by the decoder in display order. h](j)}(h display orderh]h display order}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK]hjubj)}(hhh]h)}(hthe order in which frames must be displayed; for encoders, ``OUTPUT`` buffers must be queued by the client in display order; for decoders, ``CAPTURE`` buffers must be returned by the decoder in display order.h](h;the order in which frames must be displayed; for encoders, }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhF buffers must be queued by the client in display order; for decoders, }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: buffers must be returned by the decoder in display order.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK]hjhhubj)}(hDPB Decoded Picture Buffer; an H.264/HEVC term for a buffer that stores a decoded raw frame available for reference in further decoding steps. h](j)}(hDPBh]hDPB}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKahjSubj)}(hhh]h)}(hDecoded Picture Buffer; an H.264/HEVC term for a buffer that stores a decoded raw frame available for reference in further decoding steps.h]hDecoded Picture Buffer; an H.264/HEVC term for a buffer that stores a decoded raw frame available for reference in further decoding steps.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjeubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhhhKahjhhubj)}(hEOS end of stream. h](j)}(hEOSh]hEOS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKdhjubj)}(hhh]h)}(hend of stream.h]hend of stream.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKdhjhhubj)}(hIDR Instantaneous Decoder Refresh; a type of a keyframe in an H.264/HEVC-encoded stream, which clears the list of earlier reference frames (DPBs). h](j)}(hIDRh]hIDR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhhjubj)}(hhh]h)}(hInstantaneous Decoder Refresh; a type of a keyframe in an H.264/HEVC-encoded stream, which clears the list of earlier reference frames (DPBs).h]hInstantaneous Decoder Refresh; a type of a keyframe in an H.264/HEVC-encoded stream, which clears the list of earlier reference frames (DPBs).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhhjhhubj)}(hpkeyframe an encoded frame that does not reference frames decoded earlier, i.e. can be decoded fully on its own. h](j)}(hkeyframeh]hkeyframe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKlhjubj)}(hhh]h)}(hfan encoded frame that does not reference frames decoded earlier, i.e. can be decoded fully on its own.h]hfan encoded frame that does not reference frames decoded earlier, i.e. can be decoded fully on its own.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKlhjhhubj)}(hX,macroblock a processing unit in image and video compression formats based on linear block transforms (e.g. H.264, VP8, VP9); codec-specific, but for most of popular codecs the size is 16x16 samples (pixels). The HEVC codec uses a slightly more flexible processing unit called coding tree unit (CTU). h](j)}(h macroblockh]h macroblock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKrhjubj)}(hhh]h)}(hX a processing unit in image and video compression formats based on linear block transforms (e.g. H.264, VP8, VP9); codec-specific, but for most of popular codecs the size is 16x16 samples (pixels). The HEVC codec uses a slightly more flexible processing unit called coding tree unit (CTU).h]hX a processing unit in image and video compression formats based on linear block transforms (e.g. H.264, VP8, VP9); codec-specific, but for most of popular codecs the size is 16x16 samples (pixels). The HEVC codec uses a slightly more flexible processing unit called coding tree unit (CTU).}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKrhjhhubj)}(hXOUTPUT the source buffer queue; for decoders, the queue of buffers containing an encoded bytestream; for encoders, the queue of buffers containing raw frames; ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``; the hardware is fed with data from ``OUTPUT`` buffers. h](j)}(hOUTPUTh]hOUTPUT}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKyhj>ubj)}(hhh]h)}(hXthe source buffer queue; for decoders, the queue of buffers containing an encoded bytestream; for encoders, the queue of buffers containing raw frames; ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``; the hardware is fed with data from ``OUTPUT`` buffers.h](hthe source buffer queue; for decoders, the queue of buffers containing an encoded bytestream; for encoders, the queue of buffers containing raw frames; }(hjShhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_OUTPUT``h]hV4L2_BUF_TYPE_VIDEO_OUTPUT}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh or }(hjShhhNhNubj)}(h%``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``h]h!V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh%; the hardware is fed with data from }(hjShhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh buffers.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjPubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhhhKyhjhhubj)}(hRPPS Picture Parameter Set; a type of metadata entity in an H.264/HEVC bytestream. h](j)}(hPPSh]hPPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK|hjubj)}(hhh]h)}(hMPicture Parameter Set; a type of metadata entity in an H.264/HEVC bytestream.h]hMPicture Parameter Set; a type of metadata entity in an H.264/HEVC bytestream.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK|hjhhubj)}(hRraw format uncompressed format containing raw pixel data (e.g. YUV, RGB formats). h](j)}(h raw formath]h raw format}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hFuncompressed format containing raw pixel data (e.g. YUV, RGB formats).h]hFuncompressed format containing raw pixel data (e.g. YUV, RGB formats).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXresume point a point in the bytestream from which decoding may start/continue, without any previous state/data present, e.g.: a keyframe (VP8/VP9) or SPS/PPS/IDR sequence (H.264/HEVC); a resume point is required to start decode of a new stream, or to resume decoding after a seek. h](j)}(h resume pointh]h resume point}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hX a point in the bytestream from which decoding may start/continue, without any previous state/data present, e.g.: a keyframe (VP8/VP9) or SPS/PPS/IDR sequence (H.264/HEVC); a resume point is required to start decode of a new stream, or to resume decoding after a seek.h]hX a point in the bytestream from which decoding may start/continue, without any previous state/data present, e.g.: a keyframe (VP8/VP9) or SPS/PPS/IDR sequence (H.264/HEVC); a resume point is required to start decode of a new stream, or to resume decoding after a seek.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h;source data fed to the decoder or encoder; see ``OUTPUT``. h](j)}(hsourceh]hsource}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj0ubj)}(hhh]h)}(h3data fed to the decoder or encoder; see ``OUTPUT``.h](h(data fed to the decoder or encoder; see }(hjEhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjBubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hWsource height height in pixels for given source resolution; relevant to encoders only. h](j)}(h source heighth]h source height}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjqubj)}(hhh]h)}(hHheight in pixels for given source resolution; relevant to encoders only.h]hHheight in pixels for given source resolution; relevant to encoders only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hsource resolution resolution in pixels of source frames being source to the encoder and subject to further cropping to the bounds of visible resolution; relevant to encoders only. h](j)}(hsource resolutionh]hsource resolution}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hresolution in pixels of source frames being source to the encoder and subject to further cropping to the bounds of visible resolution; relevant to encoders only.h]hresolution in pixels of source frames being source to the encoder and subject to further cropping to the bounds of visible resolution; relevant to encoders only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hUsource width width in pixels for given source resolution; relevant to encoders only. h](j)}(h source widthh]h source width}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hGwidth in pixels for given source resolution; relevant to encoders only.h]hGwidth in pixels for given source resolution; relevant to encoders only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hSSPS Sequence Parameter Set; a type of metadata entity in an H.264/HEVC bytestream. h](j)}(hSPSh]hSPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hNSequence Parameter Set; a type of metadata entity in an H.264/HEVC bytestream.h]hNSequence Parameter Set; a type of metadata entity in an H.264/HEVC bytestream.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hstream metadata additional (non-visual) information contained inside encoded bytestream; for example: coded resolution, visible resolution, codec profile. h](j)}(hstream metadatah]hstream metadata}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj-ubj)}(hhh]h)}(hadditional (non-visual) information contained inside encoded bytestream; for example: coded resolution, visible resolution, codec profile.h]hadditional (non-visual) information contained inside encoded bytestream; for example: coded resolution, visible resolution, codec profile.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj?ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hDvisible height height for given visible resolution; display height. h](j)}(hvisible heighth]hvisible height}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj\ubj)}(hhh]h)}(h4height for given visible resolution; display height.h]h4height for given visible resolution; display height.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hvisible resolution stream resolution of the visible picture, in pixels, to be used for display purposes; must be smaller or equal to coded resolution; display resolution. h](j)}(hvisible resolutionh]hvisible resolution}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hstream resolution of the visible picture, in pixels, to be used for display purposes; must be smaller or equal to coded resolution; display resolution.h]hstream resolution of the visible picture, in pixels, to be used for display purposes; must be smaller or equal to coded resolution; display resolution.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hAvisible width width for given visible resolution; display width. h](j)}(h visible widthh]h visible width}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h2width for given visible resolution; display width.h]h2width for given visible resolution; display width.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h](glossaryjeh ]h"](glossarydecoder-glossaryeh$]h&]uh1hhhhhhhhK/expect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hhh](h)}(h State Machineh]h State Machine}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhfigure)}(hhh](kfigure kernel_render)}(hhh]h literal_block)}(hXdigraph decoder_state_machine { node [shape = doublecircle, label="Decoding"] Decoding; node [shape = circle, label="Initialization"] Initialization; node [shape = circle, label="Capture\nsetup"] CaptureSetup; node [shape = circle, label="Dynamic\nResolution\nChange"] ResChange; node [shape = circle, label="Stopped"] Stopped; node [shape = circle, label="Drain"] Drain; node [shape = circle, label="Seek"] Seek; node [shape = circle, label="End of Stream"] EoS; node [shape = point]; qi qi -> Initialization [ label = "open()" ]; Initialization -> CaptureSetup [ label = "CAPTURE\nformat\nestablished" ]; CaptureSetup -> Stopped [ label = "CAPTURE\nbuffers\nready" ]; Decoding -> ResChange [ label = "Stream\nresolution\nchange" ]; Decoding -> Drain [ label = "V4L2_DEC_CMD_STOP" ]; Decoding -> EoS [ label = "EoS mark\nin the stream" ]; Decoding -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; Decoding -> Stopped [ label = "VIDIOC_STREAMOFF(CAPTURE)" ]; Decoding -> Decoding; ResChange -> CaptureSetup [ label = "CAPTURE\nformat\nestablished" ]; ResChange -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; EoS -> Drain [ label = "Implicit\ndrain" ]; Drain -> Stopped [ label = "All CAPTURE\nbuffers dequeued\nor\nVIDIOC_STREAMOFF(CAPTURE)" ]; Drain -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; Seek -> Decoding [ label = "VIDIOC_STREAMON(OUTPUT)" ]; Seek -> Initialization [ label = "VIDIOC_REQBUFS(OUTPUT, 0)" ]; Stopped -> Decoding [ label = "V4L2_DEC_CMD_START\nor\nVIDIOC_STREAMON(CAPTURE)" ]; Stopped -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; }h]hXdigraph decoder_state_machine { node [shape = doublecircle, label="Decoding"] Decoding; node [shape = circle, label="Initialization"] Initialization; node [shape = circle, label="Capture\nsetup"] CaptureSetup; node [shape = circle, label="Dynamic\nResolution\nChange"] ResChange; node [shape = circle, label="Stopped"] Stopped; node [shape = circle, label="Drain"] Drain; node [shape = circle, label="Seek"] Seek; node [shape = circle, label="End of Stream"] EoS; node [shape = point]; qi qi -> Initialization [ label = "open()" ]; Initialization -> CaptureSetup [ label = "CAPTURE\nformat\nestablished" ]; CaptureSetup -> Stopped [ label = "CAPTURE\nbuffers\nready" ]; Decoding -> ResChange [ label = "Stream\nresolution\nchange" ]; Decoding -> Drain [ label = "V4L2_DEC_CMD_STOP" ]; Decoding -> EoS [ label = "EoS mark\nin the stream" ]; Decoding -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; Decoding -> Stopped [ label = "VIDIOC_STREAMOFF(CAPTURE)" ]; Decoding -> Decoding; ResChange -> CaptureSetup [ label = "CAPTURE\nformat\nestablished" ]; ResChange -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; EoS -> Drain [ label = "Implicit\ndrain" ]; Drain -> Stopped [ label = "All CAPTURE\nbuffers dequeued\nor\nVIDIOC_STREAMOFF(CAPTURE)" ]; Drain -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; Seek -> Decoding [ label = "VIDIOC_STREAMON(OUTPUT)" ]; Seek -> Initialization [ label = "VIDIOC_REQBUFS(OUTPUT, 0)" ]; Stopped -> Decoding [ label = "V4L2_DEC_CMD_START\nor\nVIDIOC_STREAMON(CAPTURE)" ]; Stopped -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ]; }}hj sbah}(h]h ]h"]h$]h&]hhuh1j hj hhubah}(h]h ]h"]h$]h&]alt$DOT digraph of decoder state machinesrclangDOTuh1j hj ubhcaption)}(hDecoder State Machineh]hDecoder State Machine}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1j2 hhhKhj ubeh}(h]id1ah ]h"]h$]h&]altj/ captionj6 uh1j hjhhhhhNubeh}(h] state-machineah ]h"] state machineah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hQuerying Capabilitiesh]hQuerying Capabilities}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS hhhhhKubj)}(hhh](j )}(hXTo enumerate the set of coded formats supported by the decoder, the client may call :c:func:`VIDIOC_ENUM_FMT` on ``OUTPUT``. * The full set of supported formats will be returned, regardless of the format set on ``CAPTURE``. * Check the flags field of :c:type:`v4l2_fmtdesc` for more information about the decoder's capabilities with respect to each coded format. In particular whether or not the decoder has a full-fledged bytestream parser and if the decoder supports dynamic resolution changes. h](h)}(h|To enumerate the set of coded formats supported by the decoder, the client may call :c:func:`VIDIOC_ENUM_FMT` on ``OUTPUT``.h](hTTo enumerate the set of coded formats supported by the decoder, the client may call }(hjk hhhNhNubh)}(h:c:func:`VIDIOC_ENUM_FMT`h]j)}(hju h]hVIDIOC_ENUM_FMT()}(hjw hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjs ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FMTuh1hhhhKhjk ubh on }(hjk hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk ubh.}(hjk hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjg ubh bullet_list)}(hhh](j )}(h`The full set of supported formats will be returned, regardless of the format set on ``CAPTURE``.h]h)}(h`The full set of supported formats will be returned, regardless of the format set on ``CAPTURE``.h](hTThe full set of supported formats will be returned, regardless of the format set on }(hj hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hXCheck the flags field of :c:type:`v4l2_fmtdesc` for more information about the decoder's capabilities with respect to each coded format. In particular whether or not the decoder has a full-fledged bytestream parser and if the decoder supports dynamic resolution changes. h]h)}(hXCheck the flags field of :c:type:`v4l2_fmtdesc` for more information about the decoder's capabilities with respect to each coded format. In particular whether or not the decoder has a full-fledged bytestream parser and if the decoder supports dynamic resolution changes.h](hCheck the flags field of }(hj hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj v4l2_fmtdescuh1hhhhKhj ubh for more information about the decoder’s capabilities with respect to each coded format. In particular whether or not the decoder has a full-fledged bytestream parser and if the decoder supports dynamic resolution changes.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]bullet*uh1j hhhKhjg ubeh}(h]h ]h"]h$]h&]uh1j hjd hhhNhNubj )}(hX~To enumerate the set of supported raw formats, the client may call :c:func:`VIDIOC_ENUM_FMT` on ``CAPTURE``. * Only the formats supported for the format currently active on ``OUTPUT`` will be returned. * In order to enumerate raw formats supported by a given coded format, the client must first set that coded format on ``OUTPUT`` and then enumerate formats on ``CAPTURE``. h](h)}(hlTo enumerate the set of supported raw formats, the client may call :c:func:`VIDIOC_ENUM_FMT` on ``CAPTURE``.h](hCTo enumerate the set of supported raw formats, the client may call }(hj* hhhNhNubh)}(h:c:func:`VIDIOC_ENUM_FMT`h]j)}(hj4 h]hVIDIOC_ENUM_FMT()}(hj6 hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj2 ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FMTuh1hhhhKhj* ubh on }(hj* hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj* ubh.}(hj* hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj& ubj )}(hhh](j )}(h[Only the formats supported for the format currently active on ``OUTPUT`` will be returned. h]h)}(hZOnly the formats supported for the format currently active on ``OUTPUT`` will be returned.h](h>Only the formats supported for the format currently active on }(hjt hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt ubh will be returned.}(hjt hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjp ubah}(h]h ]h"]h$]h&]uh1j hjm ubj )}(hIn order to enumerate raw formats supported by a given coded format, the client must first set that coded format on ``OUTPUT`` and then enumerate formats on ``CAPTURE``. h]h)}(hIn order to enumerate raw formats supported by a given coded format, the client must first set that coded format on ``OUTPUT`` and then enumerate formats on ``CAPTURE``.h](htIn order to enumerate raw formats supported by a given coded format, the client must first set that coded format on }(hj hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh and then enumerate formats on }(hj hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hjm ubeh}(h]h ]h"]h$]h&]j j uh1j hhhKhj& ubeh}(h]h ]h"]h$]h&]uh1j hjd hhhNhNubj )}(hXYThe client may use :c:func:`VIDIOC_ENUM_FRAMESIZES` to detect supported resolutions for a given format, passing desired pixel format in :c:type:`v4l2_frmsizeenum` ``pixel_format``. * Values returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a coded pixel format will include all possible coded resolutions supported by the decoder for given coded pixel format. * Values returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a raw pixel format will include all possible frame buffer resolutions supported by the decoder for given raw pixel format and the coded format currently set on ``OUTPUT``. h](h)}(hThe client may use :c:func:`VIDIOC_ENUM_FRAMESIZES` to detect supported resolutions for a given format, passing desired pixel format in :c:type:`v4l2_frmsizeenum` ``pixel_format``.h](hThe client may use }(hj hhhNhNubh)}(h :c:func:`VIDIOC_ENUM_FRAMESIZES`h]j)}(hj h]hVIDIOC_ENUM_FRAMESIZES()}(hj hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FRAMESIZESuh1hhhhKhj ubhU to detect supported resolutions for a given format, passing desired pixel format in }(hj hhhNhNubh)}(h:c:type:`v4l2_frmsizeenum`h]j)}(hj h]hv4l2_frmsizeenum}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjv4l2_frmsizeenumuh1hhhhKhj ubh }(hj hhhNhNubj)}(h``pixel_format``h]h pixel_format}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubj )}(hhh](j )}(hValues returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a coded pixel format will include all possible coded resolutions supported by the decoder for given coded pixel format. h]h)}(hValues returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a coded pixel format will include all possible coded resolutions supported by the decoder for given coded pixel format.h](hValues returned by }(hjS hhhNhNubh)}(h :c:func:`VIDIOC_ENUM_FRAMESIZES`h]j)}(hj] h]hVIDIOC_ENUM_FRAMESIZES()}(hj_ hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj[ ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FRAMESIZESuh1hhhhKhjS ubh| for a coded pixel format will include all possible coded resolutions supported by the decoder for given coded pixel format.}(hjS hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjO ubah}(h]h ]h"]h$]h&]uh1j hjL ubj )}(hValues returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a raw pixel format will include all possible frame buffer resolutions supported by the decoder for given raw pixel format and the coded format currently set on ``OUTPUT``. h]h)}(hValues returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a raw pixel format will include all possible frame buffer resolutions supported by the decoder for given raw pixel format and the coded format currently set on ``OUTPUT``.h](hValues returned by }(hj hhhNhNubh)}(h :c:func:`VIDIOC_ENUM_FRAMESIZES`h]j)}(hj h]hVIDIOC_ENUM_FRAMESIZES()}(hj hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FRAMESIZESuh1hhhhKhj ubh for a raw pixel format will include all possible frame buffer resolutions supported by the decoder for given raw pixel format and the coded format currently set on }(hj hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hjL ubeh}(h]h ]h"]h$]h&]j j uh1j hhhKhj ubeh}(h]h ]h"]h$]h&]uh1j hjd hhhNhNubj )}(hSupported profiles and levels for the coded format currently set on ``OUTPUT``, if applicable, may be queried using their respective controls via :c:func:`VIDIOC_QUERYCTRL`. h]h)}(hSupported profiles and levels for the coded format currently set on ``OUTPUT``, if applicable, may be queried using their respective controls via :c:func:`VIDIOC_QUERYCTRL`.h](hDSupported profiles and levels for the coded format currently set on }(hj hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhD, if applicable, may be queried using their respective controls via }(hj hhhNhNubh)}(h:c:func:`VIDIOC_QUERYCTRL`h]j)}(hj h]hVIDIOC_QUERYCTRL()}(hj hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_QUERYCTRLuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hjd hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhjS hhhhhKubeh}(h]querying-capabilitiesah ]h"]querying capabilitiesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hInitializationh]hInitialization}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj> hhhhhKubj)}(hhh](j )}(hXSet the coded format on ``OUTPUT`` via :c:func:`VIDIOC_S_FMT`. * **Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. ``pixelformat`` a coded pixel format. ``width``, ``height`` coded resolution of the stream; required only if it cannot be parsed from the stream for the given coded format; otherwise the decoder will use this resolution as a placeholder resolution that will likely change as soon as it can parse the actual coded resolution from the stream. ``sizeimage`` desired size of ``OUTPUT`` buffers; the decoder may adjust it to match hardware requirements. other fields follow standard semantics. * **Returned fields:** ``sizeimage`` adjusted size of ``OUTPUT`` buffers. * The ``CAPTURE`` format will be updated with an appropriate frame buffer resolution instantly based on the width and height returned by :c:func:`VIDIOC_S_FMT`. However, for coded formats that include stream resolution information, after the decoder is done parsing the information from the stream, it will update the ``CAPTURE`` format with new values and signal a source change event, regardless of whether they match the values set by the client or not. .. important:: Changing the ``OUTPUT`` format may change the currently set ``CAPTURE`` format. How the new ``CAPTURE`` format is determined is up to the decoder and the client must ensure it matches its needs afterwards. h](h)}(h>Set the coded format on ``OUTPUT`` via :c:func:`VIDIOC_S_FMT`.h](hSet the coded format on }(hjV hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV ubh via }(hjV hhhNhNubh)}(h:c:func:`VIDIOC_S_FMT`h]j)}(hjr h]hVIDIOC_S_FMT()}(hjt hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjp ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_S_FMTuh1hhhhMhjV ubh.}(hjV hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjR ubj )}(hhh](j )}(hXg**Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. ``pixelformat`` a coded pixel format. ``width``, ``height`` coded resolution of the stream; required only if it cannot be parsed from the stream for the given coded format; otherwise the decoder will use this resolution as a placeholder resolution that will likely change as soon as it can parse the actual coded resolution from the stream. ``sizeimage`` desired size of ``OUTPUT`` buffers; the decoder may adjust it to match hardware requirements. other fields follow standard semantics. h](h)}(h**Required fields:**h]hstrong)}(hj h]hRequired fields:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh](j)}(h@``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. h](j)}(h``type``h]j)}(hj h]htype}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(h6a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``.h](ha }(hj hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh enum appropriate for }(hj hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(h&``pixelformat`` a coded pixel format. h](j)}(h``pixelformat``h]j)}(hj h]h pixelformat}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhM hj ubj)}(hhh]h)}(ha coded pixel format.h]ha coded pixel format.}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj3 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhM hj ubj)}(hX/``width``, ``height`` coded resolution of the stream; required only if it cannot be parsed from the stream for the given coded format; otherwise the decoder will use this resolution as a placeholder resolution that will likely change as soon as it can parse the actual coded resolution from the stream. h](j)}(h``width``, ``height``h](j)}(h ``width``h]hwidth}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT ubh, }(hjT hhhNhNubj)}(h ``height``h]hheight}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjP ubj)}(hhh]h)}(hXcoded resolution of the stream; required only if it cannot be parsed from the stream for the given coded format; otherwise the decoder will use this resolution as a placeholder resolution that will likely change as soon as it can parse the actual coded resolution from the stream.h]hXcoded resolution of the stream; required only if it cannot be parsed from the stream for the given coded format; otherwise the decoder will use this resolution as a placeholder resolution that will likely change as soon as it can parse the actual coded resolution from the stream.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ ubah}(h]h ]h"]h$]h&]uh1jhjP ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hl``sizeimage`` desired size of ``OUTPUT`` buffers; the decoder may adjust it to match hardware requirements. h](j)}(h ``sizeimage``h]j)}(hj h]h sizeimage}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(h]desired size of ``OUTPUT`` buffers; the decoder may adjust it to match hardware requirements.h](hdesired size of }(hj hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhC buffers; the decoder may adjust it to match hardware requirements.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(h(other fields follow standard semantics. h](j)}(h other fieldsh]h other fields}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(hfollow standard semantics.h]hfollow standard semantics.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hM**Returned fields:** ``sizeimage`` adjusted size of ``OUTPUT`` buffers. h](h)}(h**Returned fields:**h]j )}(hj&h]hReturned fields:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]j)}(h3``sizeimage`` adjusted size of ``OUTPUT`` buffers. h](j)}(h ``sizeimage``h]j)}(hjDh]h sizeimage}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1jhhhMhj>ubj)}(hhh]h)}(h$adjusted size of ``OUTPUT`` buffers.h](hadjusted size of }(hj\hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh buffers.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(hXThe ``CAPTURE`` format will be updated with an appropriate frame buffer resolution instantly based on the width and height returned by :c:func:`VIDIOC_S_FMT`. However, for coded formats that include stream resolution information, after the decoder is done parsing the information from the stream, it will update the ``CAPTURE`` format with new values and signal a source change event, regardless of whether they match the values set by the client or not. h]h)}(hXThe ``CAPTURE`` format will be updated with an appropriate frame buffer resolution instantly based on the width and height returned by :c:func:`VIDIOC_S_FMT`. However, for coded formats that include stream resolution information, after the decoder is done parsing the information from the stream, it will update the ``CAPTURE`` format with new values and signal a source change event, regardless of whether they match the values set by the client or not.h](hThe }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhx format will be updated with an appropriate frame buffer resolution instantly based on the width and height returned by }(hjhhhNhNubh)}(h:c:func:`VIDIOC_S_FMT`h]j)}(hjh]hVIDIOC_S_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_S_FMTuh1hhhhMhjubh. However, for coded formats that include stream resolution information, after the decoder is done parsing the information from the stream, it will update the }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh format with new values and signal a source change event, regardless of whether they match the values set by the client or not.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhjR ubh important)}(hChanging the ``OUTPUT`` format may change the currently set ``CAPTURE`` format. How the new ``CAPTURE`` format is determined is up to the decoder and the client must ensure it matches its needs afterwards.h]h)}(hChanging the ``OUTPUT`` format may change the currently set ``CAPTURE`` format. How the new ``CAPTURE`` format is determined is up to the decoder and the client must ensure it matches its needs afterwards.h](h Changing the }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh% format may change the currently set }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh format. How the new }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhf format is determined is up to the decoder and the client must ensure it matches its needs afterwards.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM(hjubah}(h]h ]h"]h$]h&]uh1jhjR ubeh}(h]h ]h"]h$]h&]uh1j hjO hhhNhNubj )}(hXAllocate source (bytestream) buffers via :c:func:`VIDIOC_REQBUFS` on ``OUTPUT``. * **Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. ``memory`` follows standard semantics. * **Returned fields:** ``count`` the actual number of buffers allocated. .. warning:: The actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns. Alternatively, :c:func:`VIDIOC_CREATE_BUFS` on the ``OUTPUT`` queue can be used to have more control over buffer allocation. * **Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. ``memory`` follows standard semantics. ``format`` follows standard semantics. * **Returned fields:** ``count`` adjusted to the number of allocated buffers. .. warning:: The actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns. h](h)}(hPAllocate source (bytestream) buffers via :c:func:`VIDIOC_REQBUFS` on ``OUTPUT``.h](h)Allocate source (bytestream) buffers via }(hjShhhNhNubh)}(h:c:func:`VIDIOC_REQBUFS`h]j)}(hj]h]hVIDIOC_REQBUFS()}(hj_hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_REQBUFSuh1hhhhM,hjSubh on }(hjShhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubh.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM,hjOubj )}(hhh](j )}(h**Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. ``memory`` follows standard semantics. h](h)}(h**Required fields:**h]j )}(hjh]hRequired fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhM/hjubj)}(hhh](j)}(hF``count`` requested number of buffers to allocate; greater than zero. h](j)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhM2hjubj)}(hhh]h)}(h;requested number of buffers to allocate; greater than zero.h]h;requested number of buffers to allocate; greater than zero.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM2hjubj)}(h@``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. h](j)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhM5hjubj)}(hhh]h)}(h6a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``.h](ha }(hj hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh enum appropriate for }(hj hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM5hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] h"]h$]h&]uh1jhhhM5hjubj)}(h'``memory`` follows standard semantics. h](j)}(h ``memory``h]j)}(hjQh]hmemory}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1jhhhM8hjKubj)}(hhh]h)}(hfollows standard semantics.h]hfollows standard semantics.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjfubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jhhhM8hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hL**Returned fields:** ``count`` the actual number of buffers allocated. h](h)}(h**Returned fields:**h]j )}(hjh]hReturned fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubj)}(hhh]j)}(h2``count`` the actual number of buffers allocated. h](j)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhM=hjubj)}(hhh]h)}(h'the actual number of buffers allocated.h]h'the actual number of buffers allocated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM=hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]j j uh1j hhhM/hjOubhwarning)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h]h)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h](h;The actual number of allocated buffers may differ from the }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3 given. The client must check the updated value of }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh after the call returns.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMAhjubah}(h]h ]h"]h$]h&]uh1jhjOubh)}(h|Alternatively, :c:func:`VIDIOC_CREATE_BUFS` on the ``OUTPUT`` queue can be used to have more control over buffer allocation.h](hAlternatively, }(hj5hhhNhNubh)}(h:c:func:`VIDIOC_CREATE_BUFS`h]j)}(hj?h]hVIDIOC_CREATE_BUFS()}(hjAhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_CREATE_BUFSuh1hhhhMEhj5ubh on the }(hj5hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh? queue can be used to have more control over buffer allocation.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMEhjOubj )}(hhh](j )}(h**Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. ``memory`` follows standard semantics. ``format`` follows standard semantics. h](h)}(h**Required fields:**h]j )}(hjh]hRequired fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMHhj{ubj)}(hhh](j)}(hF``count`` requested number of buffers to allocate; greater than zero. h](j)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMKhjubj)}(hhh]h)}(h;requested number of buffers to allocate; greater than zero.h]h;requested number of buffers to allocate; greater than zero.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMKhjubj)}(h@``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. h](j)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMNhjubj)}(hhh]h)}(h6a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``.h](ha }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh enum appropriate for }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMNhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMNhjubj)}(h'``memory`` follows standard semantics. h](j)}(h ``memory``h]j)}(hj3h]hmemory}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jhhhMQhj-ubj)}(hhh]h)}(hfollows standard semantics.h]hfollows standard semantics.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjHubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhhhMQhjubj)}(h'``format`` follows standard semantics. h](j)}(h ``format``h]j)}(hjkh]hformat}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1jhhhMThjeubj)}(hhh]h)}(hfollows standard semantics.h]hfollows standard semantics.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhhhMThjubeh}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1j hjxubj )}(hQ**Returned fields:** ``count`` adjusted to the number of allocated buffers. h](h)}(h**Returned fields:**h]j )}(hjh]hReturned fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMVhjubj)}(hhh]j)}(h7``count`` adjusted to the number of allocated buffers. h](j)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMYhjubj)}(hhh]h)}(h,adjusted to the number of allocated buffers.h]h,adjusted to the number of allocated buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMYhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]j j uh1j hhhMHhjOubj)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h]h)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h](h;The actual number of allocated buffers may differ from the }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3 given. The client must check the updated value of }(hjhhhNhNubj)}(h ``count``h]hcount}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh after the call returns.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]hjubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1j hjO hhhNhNubj )}(hGStart streaming on the ``OUTPUT`` queue via :c:func:`VIDIOC_STREAMON`. h]h)}(hFStart streaming on the ``OUTPUT`` queue via :c:func:`VIDIOC_STREAMON`.h](hStart streaming on the }(hjWhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh queue via }(hjWhhhNhNubh)}(h:c:func:`VIDIOC_STREAMON`h]j)}(hjsh]hVIDIOC_STREAMON()}(hjuhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMONuh1hhhhMahjWubh.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMahjSubah}(h]h ]h"]h$]h&]uh1j hjO hhhhhNubj )}(hX\**This step only applies to coded formats that contain resolution information in the stream.** Continue queuing/dequeuing bytestream buffers to/from the ``OUTPUT`` queue via :c:func:`VIDIOC_QBUF` and :c:func:`VIDIOC_DQBUF`. The buffers will be processed and returned to the client in order, until required metadata to configure the ``CAPTURE`` queue are found. This is indicated by the decoder sending a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION``. * It is not an error if the first buffer does not contain enough data for this to occur. Processing of the buffers will continue as long as more data is needed. * If data in a buffer that triggers the event is required to decode the first frame, it will not be returned to the client, until the initialization sequence completes and the frame is decoded. * If the client has not set the coded resolution of the stream on its own, calling :c:func:`VIDIOC_G_FMT`, :c:func:`VIDIOC_S_FMT`, :c:func:`VIDIOC_TRY_FMT` or :c:func:`VIDIOC_REQBUFS` on the ``CAPTURE`` queue will not return the real values for the stream until a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION`` is signaled. .. important:: Any client query issued after the decoder queues the event will return values applying to the just parsed stream, including queue formats, selection rectangles and controls. .. note:: A client capable of acquiring stream parameters from the bytestream on its own may attempt to set the width and height of the ``OUTPUT`` format to non-zero values matching the coded size of the stream, skip this step and continue with the `Capture Setup` sequence. However, it must not rely on any driver queries regarding stream parameters, such as selection rectangles and controls, since the decoder has not parsed them from the stream yet. If the values configured by the client do not match those parsed by the decoder, a `Dynamic Resolution Change` will be triggered to reconfigure them. .. note:: No decoded frames are produced during this phase. h](h)}(hX**This step only applies to coded formats that contain resolution information in the stream.** Continue queuing/dequeuing bytestream buffers to/from the ``OUTPUT`` queue via :c:func:`VIDIOC_QBUF` and :c:func:`VIDIOC_DQBUF`. The buffers will be processed and returned to the client in order, until required metadata to configure the ``CAPTURE`` queue are found. This is indicated by the decoder sending a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION``.h](j )}(h^**This step only applies to coded formats that contain resolution information in the stream.**h]hZThis step only applies to coded formats that contain resolution information in the stream.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh; Continue queuing/dequeuing bytestream buffers to/from the }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh queue via }(hjhhhNhNubh)}(h:c:func:`VIDIOC_QBUF`h]j)}(hjh]h VIDIOC_QBUF()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_QBUFuh1hhhhMchjubh and }(hjhhhNhNubh)}(h:c:func:`VIDIOC_DQBUF`h]j)}(hjh]hVIDIOC_DQBUF()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_DQBUFuh1hhhhMchjubhn. The buffers will be processed and returned to the client in order, until required metadata to configure the }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh= queue are found. This is indicated by the decoder sending a }(hjhhhNhNubj)}(h``V4L2_EVENT_SOURCE_CHANGE``h]hV4L2_EVENT_SOURCE_CHANGE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh event with }(hjhhhNhNubj)}(h ``changes``h]hchanges}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh set to }(hjhhhNhNubj)}(h ``V4L2_EVENT_SRC_CH_RESOLUTION``h]hV4L2_EVENT_SRC_CH_RESOLUTION}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMchjubj )}(hhh](j )}(hIt is not an error if the first buffer does not contain enough data for this to occur. Processing of the buffers will continue as long as more data is needed. h]h)}(hIt is not an error if the first buffer does not contain enough data for this to occur. Processing of the buffers will continue as long as more data is needed.h]hIt is not an error if the first buffer does not contain enough data for this to occur. Processing of the buffers will continue as long as more data is needed.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjcubah}(h]h ]h"]h$]h&]uh1j hj`ubj )}(hIf data in a buffer that triggers the event is required to decode the first frame, it will not be returned to the client, until the initialization sequence completes and the frame is decoded. h]h)}(hIf data in a buffer that triggers the event is required to decode the first frame, it will not be returned to the client, until the initialization sequence completes and the frame is decoded.h]hIf data in a buffer that triggers the event is required to decode the first frame, it will not be returned to the client, until the initialization sequence completes and the frame is decoded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj{ubah}(h]h ]h"]h$]h&]uh1j hj`ubj )}(hXoIf the client has not set the coded resolution of the stream on its own, calling :c:func:`VIDIOC_G_FMT`, :c:func:`VIDIOC_S_FMT`, :c:func:`VIDIOC_TRY_FMT` or :c:func:`VIDIOC_REQBUFS` on the ``CAPTURE`` queue will not return the real values for the stream until a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION`` is signaled. h]h)}(hXnIf the client has not set the coded resolution of the stream on its own, calling :c:func:`VIDIOC_G_FMT`, :c:func:`VIDIOC_S_FMT`, :c:func:`VIDIOC_TRY_FMT` or :c:func:`VIDIOC_REQBUFS` on the ``CAPTURE`` queue will not return the real values for the stream until a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION`` is signaled.h](hQIf the client has not set the coded resolution of the stream on its own, calling }(hjhhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hjh]hVIDIOC_G_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhMshjubh, }(hjhhhNhNubh)}(h:c:func:`VIDIOC_S_FMT`h]j)}(hjh]hVIDIOC_S_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_S_FMTuh1hhhhMshjubh, }(hjhhhNhNubh)}(h:c:func:`VIDIOC_TRY_FMT`h]j)}(hjh]hVIDIOC_TRY_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_TRY_FMTuh1hhhhMshjubh or }(hjhhhNhNubh)}(h:c:func:`VIDIOC_REQBUFS`h]j)}(hj h]hVIDIOC_REQBUFS()}(hj hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_REQBUFSuh1hhhhMshjubh on the }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh> queue will not return the real values for the stream until a }(hjhhhNhNubj)}(h``V4L2_EVENT_SOURCE_CHANGE``h]hV4L2_EVENT_SOURCE_CHANGE}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh event with }(hjhhhNhNubj)}(h ``changes``h]hchanges}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh set to }(hjhhhNhNubj)}(h ``V4L2_EVENT_SRC_CH_RESOLUTION``h]hV4L2_EVENT_SRC_CH_RESOLUTION}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is signaled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjubah}(h]h ]h"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMkhjubj)}(hAny client query issued after the decoder queues the event will return values applying to the just parsed stream, including queue formats, selection rectangles and controls.h]h)}(hAny client query issued after the decoder queues the event will return values applying to the just parsed stream, including queue formats, selection rectangles and controls.h]hAny client query issued after the decoder queues the event will return values applying to the just parsed stream, including queue formats, selection rectangles and controls.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubhnote)}(hXQA client capable of acquiring stream parameters from the bytestream on its own may attempt to set the width and height of the ``OUTPUT`` format to non-zero values matching the coded size of the stream, skip this step and continue with the `Capture Setup` sequence. However, it must not rely on any driver queries regarding stream parameters, such as selection rectangles and controls, since the decoder has not parsed them from the stream yet. If the values configured by the client do not match those parsed by the decoder, a `Dynamic Resolution Change` will be triggered to reconfigure them.h]h)}(hXQA client capable of acquiring stream parameters from the bytestream on its own may attempt to set the width and height of the ``OUTPUT`` format to non-zero values matching the coded size of the stream, skip this step and continue with the `Capture Setup` sequence. However, it must not rely on any driver queries regarding stream parameters, such as selection rectangles and controls, since the decoder has not parsed them from the stream yet. If the values configured by the client do not match those parsed by the decoder, a `Dynamic Resolution Change` will be triggered to reconfigure them.h](h~A client capable of acquiring stream parameters from the bytestream on its own may attempt to set the width and height of the }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhg format to non-zero values matching the coded size of the stream, skip this step and continue with the }(hjhhhNhNubhtitle_reference)}(h`Capture Setup`h]h Capture Setup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX sequence. However, it must not rely on any driver queries regarding stream parameters, such as selection rectangles and controls, since the decoder has not parsed them from the stream yet. If the values configured by the client do not match those parsed by the decoder, a }(hjhhhNhNubj)}(h`Dynamic Resolution Change`h]hDynamic Resolution Change}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh' will be triggered to reconfigure them.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h1No decoded frames are produced during this phase.h]h)}(hjh]h1No decoded frames are produced during this phase.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjO hhhNhNubj )}(h,Continue with the `Capture Setup` sequence. h]h)}(h+Continue with the `Capture Setup` sequence.h](hContinue with the }(hjhhhNhNubj)}(h`Capture Setup`h]h Capture Setup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh sequence.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hjO hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj> hhhhhMubeh}(h]initializationah ]h"]initializationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Capture Setuph]h Capture Setup}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhMubj)}(hhh](j )}(hXCall :c:func:`VIDIOC_G_FMT` on the ``CAPTURE`` queue to get format for the destination buffers parsed/decoded from the bytestream. * **Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. * **Returned fields:** ``width``, ``height`` frame buffer resolution for the decoded frames. ``pixelformat`` pixel format for decoded frames. ``num_planes`` (for _MPLANE ``type`` only) number of planes for pixelformat. ``sizeimage``, ``bytesperline`` as per standard semantics; matching frame buffer format. .. note:: The value of ``pixelformat`` may be any pixel format supported by the decoder for the current stream. The decoder should choose a preferred/optimal format for the default configuration. For example, a YUV format may be preferred over an RGB format if an additional conversion step would be required for the latter. h](h)}(hCall :c:func:`VIDIOC_G_FMT` on the ``CAPTURE`` queue to get format for the destination buffers parsed/decoded from the bytestream.h](hCall }(hj\hhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hjfh]hVIDIOC_G_FMT()}(hjhhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhMhj\ubh on the }(hj\hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubhT queue to get format for the destination buffers parsed/decoded from the bytestream.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjXubj )}(hhh](j )}(h[**Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](h)}(h**Required fields:**h]j )}(hjh]hRequired fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]j)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.h](ha }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh enum appropriate for }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hXF**Returned fields:** ``width``, ``height`` frame buffer resolution for the decoded frames. ``pixelformat`` pixel format for decoded frames. ``num_planes`` (for _MPLANE ``type`` only) number of planes for pixelformat. ``sizeimage``, ``bytesperline`` as per standard semantics; matching frame buffer format. h](h)}(h**Returned fields:**h]j )}(hj.h]hReturned fields:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubj)}(hhh](j)}(hF``width``, ``height`` frame buffer resolution for the decoded frames. h](j)}(h``width``, ``height``h](j)}(h ``width``h]hwidth}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubh, }(hjJhhhNhNubj)}(h ``height``h]hheight}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhhhMhjFubj)}(hhh]h)}(h/frame buffer resolution for the decoded frames.h]h/frame buffer resolution for the decoded frames.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhhhMhjCubj)}(h1``pixelformat`` pixel format for decoded frames. h](j)}(h``pixelformat``h]j)}(hjh]h pixelformat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(h pixel format for decoded frames.h]h pixel format for decoded frames.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjCubj)}(hM``num_planes`` (for _MPLANE ``type`` only) number of planes for pixelformat. h](j)}(h*``num_planes`` (for _MPLANE ``type`` only)h](j)}(h``num_planes``h]h num_planes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (for _MPLANE }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh only)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(h!number of planes for pixelformat.h]h!number of planes for pixelformat.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjCubj)}(hY``sizeimage``, ``bytesperline`` as per standard semantics; matching frame buffer format. h](j)}(h``sizeimage``, ``bytesperline``h](j)}(h ``sizeimage``h]h sizeimage}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``bytesperline``h]h bytesperline}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(h8as per standard semantics; matching frame buffer format.h]h8as per standard semantics; matching frame buffer format.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjCubeh}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhjXubj)}(hX:The value of ``pixelformat`` may be any pixel format supported by the decoder for the current stream. The decoder should choose a preferred/optimal format for the default configuration. For example, a YUV format may be preferred over an RGB format if an additional conversion step would be required for the latter.h]h)}(hX:The value of ``pixelformat`` may be any pixel format supported by the decoder for the current stream. The decoder should choose a preferred/optimal format for the default configuration. For example, a YUV format may be preferred over an RGB format if an additional conversion step would be required for the latter.h](h The value of }(hjyhhhNhNubj)}(h``pixelformat``h]h pixelformat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubhX may be any pixel format supported by the decoder for the current stream. The decoder should choose a preferred/optimal format for the default configuration. For example, a YUV format may be preferred over an RGB format if an additional conversion step would be required for the latter.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1j hjUhhhNhNubj )}(hX**Optional.** Acquire the visible resolution via :c:func:`VIDIOC_G_SELECTION`. * **Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``target`` set to ``V4L2_SEL_TGT_COMPOSE``. * **Returned fields:** ``r.left``, ``r.top``, ``r.width``, ``r.height`` the visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``. * The following selection targets are supported on ``CAPTURE``: ``V4L2_SEL_TGT_CROP_BOUNDS`` corresponds to the coded resolution of the stream. ``V4L2_SEL_TGT_CROP_DEFAULT`` the rectangle covering the part of the ``CAPTURE`` buffer that contains meaningful picture data (visible area); width and height will be equal to the visible resolution of the stream. ``V4L2_SEL_TGT_CROP`` the rectangle within the coded resolution to be output to ``CAPTURE``; defaults to ``V4L2_SEL_TGT_CROP_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. ``V4L2_SEL_TGT_COMPOSE_BOUNDS`` the maximum rectangle within a ``CAPTURE`` buffer, which the cropped frame can be composed into; equal to ``V4L2_SEL_TGT_CROP`` if the hardware does not support compose/scaling. ``V4L2_SEL_TGT_COMPOSE_DEFAULT`` equal to ``V4L2_SEL_TGT_CROP``. ``V4L2_SEL_TGT_COMPOSE`` the rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. ``V4L2_SEL_TGT_COMPOSE_PADDED`` the rectangle inside a ``CAPTURE`` buffer which is overwritten by the hardware; equal to ``V4L2_SEL_TGT_COMPOSE`` if the hardware does not write padding pixels. .. warning:: The values are guaranteed to be meaningful only after the decoder successfully parses the stream metadata. The client must not rely on the query before that happens. h](h)}(hN**Optional.** Acquire the visible resolution via :c:func:`VIDIOC_G_SELECTION`.h](j )}(h **Optional.**h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh$ Acquire the visible resolution via }(hjhhhNhNubh)}(h:c:func:`VIDIOC_G_SELECTION`h]j)}(hjh]hVIDIOC_G_SELECTION()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_G_SELECTIONuh1hhhhMhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubj )}(hhh](j )}(h**Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``target`` set to ``V4L2_SEL_TGT_COMPOSE``. h](h)}(h**Required fields:**h]j )}(hjh]hRequired fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](j)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.h](ha }(hj'hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh enum appropriate for }(hj'hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h,``target`` set to ``V4L2_SEL_TGT_COMPOSE``. h](j)}(h ``target``h]j)}(hjkh]htarget}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1jhhhMhjeubj)}(hhh]h)}(h set to ``V4L2_SEL_TGT_COMPOSE``.h](hset to }(hjhhhNhNubj)}(h``V4L2_SEL_TGT_COMPOSE``h]hV4L2_SEL_TGT_COMPOSE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(h**Returned fields:** ``r.left``, ``r.top``, ``r.width``, ``r.height`` the visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``. h](h)}(h**Returned fields:**h]j )}(hjh]hReturned fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]j)}(h``r.left``, ``r.top``, ``r.width``, ``r.height`` the visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``. h](j)}(h0``r.left``, ``r.top``, ``r.width``, ``r.height``h](j)}(h ``r.left``h]hr.left}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``r.top``h]hr.top}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h ``r.width``h]hr.width}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h ``r.height``h]hr.height}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hxthe visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``.h](hRthe visible rectangle; it must fit within the frame buffer resolution returned by }(hj.hhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hj8h]hVIDIOC_G_FMT()}(hj:hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhMhj.ubh on }(hj.hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hX3The following selection targets are supported on ``CAPTURE``: ``V4L2_SEL_TGT_CROP_BOUNDS`` corresponds to the coded resolution of the stream. ``V4L2_SEL_TGT_CROP_DEFAULT`` the rectangle covering the part of the ``CAPTURE`` buffer that contains meaningful picture data (visible area); width and height will be equal to the visible resolution of the stream. ``V4L2_SEL_TGT_CROP`` the rectangle within the coded resolution to be output to ``CAPTURE``; defaults to ``V4L2_SEL_TGT_CROP_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. ``V4L2_SEL_TGT_COMPOSE_BOUNDS`` the maximum rectangle within a ``CAPTURE`` buffer, which the cropped frame can be composed into; equal to ``V4L2_SEL_TGT_CROP`` if the hardware does not support compose/scaling. ``V4L2_SEL_TGT_COMPOSE_DEFAULT`` equal to ``V4L2_SEL_TGT_CROP``. ``V4L2_SEL_TGT_COMPOSE`` the rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. ``V4L2_SEL_TGT_COMPOSE_PADDED`` the rectangle inside a ``CAPTURE`` buffer which is overwritten by the hardware; equal to ``V4L2_SEL_TGT_COMPOSE`` if the hardware does not write padding pixels. h](h)}(h=The following selection targets are supported on ``CAPTURE``:h](h1The following selection targets are supported on }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](j)}(hP``V4L2_SEL_TGT_CROP_BOUNDS`` corresponds to the coded resolution of the stream. h](j)}(h``V4L2_SEL_TGT_CROP_BOUNDS``h]j)}(hjh]hV4L2_SEL_TGT_CROP_BOUNDS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(h2corresponds to the coded resolution of the stream.h]h2corresponds to the coded resolution of the stream.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h``V4L2_SEL_TGT_CROP_DEFAULT`` the rectangle covering the part of the ``CAPTURE`` buffer that contains meaningful picture data (visible area); width and height will be equal to the visible resolution of the stream. h](j)}(h``V4L2_SEL_TGT_CROP_DEFAULT``h]j)}(hjh]hV4L2_SEL_TGT_CROP_DEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hthe rectangle covering the part of the ``CAPTURE`` buffer that contains meaningful picture data (visible area); width and height will be equal to the visible resolution of the stream.h](h'the rectangle covering the part of the }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh buffer that contains meaningful picture data (visible area); width and height will be equal to the visible resolution of the stream.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h``V4L2_SEL_TGT_CROP`` the rectangle within the coded resolution to be output to ``CAPTURE``; defaults to ``V4L2_SEL_TGT_CROP_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. h](j)}(h``V4L2_SEL_TGT_CROP``h]j)}(hj8h]hV4L2_SEL_TGT_CROP}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1jhhhMhj2ubj)}(hhh]h)}(hthe rectangle within the coded resolution to be output to ``CAPTURE``; defaults to ``V4L2_SEL_TGT_CROP_DEFAULT``; read-only on hardware without additional compose/scaling capabilities.h](h:the rectangle within the coded resolution to be output to }(hjPhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubh; defaults to }(hjPhhhNhNubj)}(h``V4L2_SEL_TGT_CROP_DEFAULT``h]hV4L2_SEL_TGT_CROP_DEFAULT}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubhH; read-only on hardware without additional compose/scaling capabilities.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h``V4L2_SEL_TGT_COMPOSE_BOUNDS`` the maximum rectangle within a ``CAPTURE`` buffer, which the cropped frame can be composed into; equal to ``V4L2_SEL_TGT_CROP`` if the hardware does not support compose/scaling. h](j)}(h``V4L2_SEL_TGT_COMPOSE_BOUNDS``h]j)}(hjh]hV4L2_SEL_TGT_COMPOSE_BOUNDS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hthe maximum rectangle within a ``CAPTURE`` buffer, which the cropped frame can be composed into; equal to ``V4L2_SEL_TGT_CROP`` if the hardware does not support compose/scaling.h](hthe maximum rectangle within a }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@ buffer, which the cropped frame can be composed into; equal to }(hjhhhNhNubj)}(h``V4L2_SEL_TGT_CROP``h]hV4L2_SEL_TGT_CROP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2 if the hardware does not support compose/scaling.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hA``V4L2_SEL_TGT_COMPOSE_DEFAULT`` equal to ``V4L2_SEL_TGT_CROP``. h](j)}(h ``V4L2_SEL_TGT_COMPOSE_DEFAULT``h]j)}(hjh]hV4L2_SEL_TGT_COMPOSE_DEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hequal to ``V4L2_SEL_TGT_CROP``.h](h equal to }(hjhhhNhNubj)}(h``V4L2_SEL_TGT_CROP``h]hV4L2_SEL_TGT_CROP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h``V4L2_SEL_TGT_COMPOSE`` the rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. h](j)}(h``V4L2_SEL_TGT_COMPOSE``h]j)}(hj:h]hV4L2_SEL_TGT_COMPOSE}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1jhhhMhj4ubj)}(hhh]h)}(hthe rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities.h](hthe rectangle inside a }(hjRhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh= buffer into which the cropped frame is written; defaults to }(hjRhhhNhNubj)}(h ``V4L2_SEL_TGT_COMPOSE_DEFAULT``h]hV4L2_SEL_TGT_COMPOSE_DEFAULT}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubhH; read-only on hardware without additional compose/scaling capabilities.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjOubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h``V4L2_SEL_TGT_COMPOSE_PADDED`` the rectangle inside a ``CAPTURE`` buffer which is overwritten by the hardware; equal to ``V4L2_SEL_TGT_COMPOSE`` if the hardware does not write padding pixels. h](j)}(h``V4L2_SEL_TGT_COMPOSE_PADDED``h]j)}(hjh]hV4L2_SEL_TGT_COMPOSE_PADDED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hthe rectangle inside a ``CAPTURE`` buffer which is overwritten by the hardware; equal to ``V4L2_SEL_TGT_COMPOSE`` if the hardware does not write padding pixels.h](hthe rectangle inside a }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh7 buffer which is overwritten by the hardware; equal to }(hjhhhNhNubj)}(h``V4L2_SEL_TGT_COMPOSE``h]hV4L2_SEL_TGT_COMPOSE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ if the hardware does not write padding pixels.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhjubj)}(hThe values are guaranteed to be meaningful only after the decoder successfully parses the stream metadata. The client must not rely on the query before that happens.h]h)}(hThe values are guaranteed to be meaningful only after the decoder successfully parses the stream metadata. The client must not rely on the query before that happens.h]hThe values are guaranteed to be meaningful only after the decoder successfully parses the stream metadata. The client must not rely on the query before that happens.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjUhhhNhNubj )}(hXS**Optional.** Enumerate ``CAPTURE`` formats via :c:func:`VIDIOC_ENUM_FMT` on the ``CAPTURE`` queue. Once the stream information is parsed and known, the client may use this ioctl to discover which raw formats are supported for given stream and select one of them via :c:func:`VIDIOC_S_FMT`. .. important:: The decoder will return only formats supported for the currently established coded format, as per the ``OUTPUT`` format and/or stream metadata parsed in this initialization sequence, even if more formats may be supported by the decoder in general. In other words, the set returned will be a subset of the initial query mentioned in the `Querying Capabilities` section. For example, a decoder may support YUV and RGB formats for resolutions 1920x1088 and lower, but only YUV for higher resolutions (due to hardware limitations). After parsing a resolution of 1920x1088 or lower, :c:func:`VIDIOC_ENUM_FMT` may return a set of YUV and RGB pixel formats, but after parsing resolution higher than 1920x1088, the decoder will not return RGB, unsupported for this resolution. However, subsequent resolution change event triggered after discovering a resolution change within the same stream may switch the stream into a lower resolution and :c:func:`VIDIOC_ENUM_FMT` would return RGB formats again in that case. h](h)}(hX"**Optional.** Enumerate ``CAPTURE`` formats via :c:func:`VIDIOC_ENUM_FMT` on the ``CAPTURE`` queue. Once the stream information is parsed and known, the client may use this ioctl to discover which raw formats are supported for given stream and select one of them via :c:func:`VIDIOC_S_FMT`.h](j )}(h **Optional.**h]h Optional.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh Enumerate }(hj hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh formats via }(hj hhhNhNubh)}(h:c:func:`VIDIOC_ENUM_FMT`h]j)}(hjJh]hVIDIOC_ENUM_FMT()}(hjLhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FMTuh1hhhhMhj ubh on the }(hj hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh queue. Once the stream information is parsed and known, the client may use this ioctl to discover which raw formats are supported for given stream and select one of them via }(hj hhhNhNubh)}(h:c:func:`VIDIOC_S_FMT`h]j)}(hjh]hVIDIOC_S_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_S_FMTuh1hhhhMhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hXThe decoder will return only formats supported for the currently established coded format, as per the ``OUTPUT`` format and/or stream metadata parsed in this initialization sequence, even if more formats may be supported by the decoder in general. In other words, the set returned will be a subset of the initial query mentioned in the `Querying Capabilities` section. For example, a decoder may support YUV and RGB formats for resolutions 1920x1088 and lower, but only YUV for higher resolutions (due to hardware limitations). After parsing a resolution of 1920x1088 or lower, :c:func:`VIDIOC_ENUM_FMT` may return a set of YUV and RGB pixel formats, but after parsing resolution higher than 1920x1088, the decoder will not return RGB, unsupported for this resolution. However, subsequent resolution change event triggered after discovering a resolution change within the same stream may switch the stream into a lower resolution and :c:func:`VIDIOC_ENUM_FMT` would return RGB formats again in that case.h](h)}(hXpThe decoder will return only formats supported for the currently established coded format, as per the ``OUTPUT`` format and/or stream metadata parsed in this initialization sequence, even if more formats may be supported by the decoder in general. In other words, the set returned will be a subset of the initial query mentioned in the `Querying Capabilities` section.h](hfThe decoder will return only formats supported for the currently established coded format, as per the }(hjhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh format and/or stream metadata parsed in this initialization sequence, even if more formats may be supported by the decoder in general. In other words, the set returned will be a subset of the initial query mentioned in the }(hjhhhNhNubj)}(h`Querying Capabilities`h]hQuerying Capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh section.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXFor example, a decoder may support YUV and RGB formats for resolutions 1920x1088 and lower, but only YUV for higher resolutions (due to hardware limitations). After parsing a resolution of 1920x1088 or lower, :c:func:`VIDIOC_ENUM_FMT` may return a set of YUV and RGB pixel formats, but after parsing resolution higher than 1920x1088, the decoder will not return RGB, unsupported for this resolution.h](hFor example, a decoder may support YUV and RGB formats for resolutions 1920x1088 and lower, but only YUV for higher resolutions (due to hardware limitations). After parsing a resolution of 1920x1088 or lower, }(hjhhhNhNubh)}(h:c:func:`VIDIOC_ENUM_FMT`h]j)}(hjh]hVIDIOC_ENUM_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FMTuh1hhhhMhjubh may return a set of YUV and RGB pixel formats, but after parsing resolution higher than 1920x1088, the decoder will not return RGB, unsupported for this resolution.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hHowever, subsequent resolution change event triggered after discovering a resolution change within the same stream may switch the stream into a lower resolution and :c:func:`VIDIOC_ENUM_FMT` would return RGB formats again in that case.h](hHowever, subsequent resolution change event triggered after discovering a resolution change within the same stream may switch the stream into a lower resolution and }(hj hhhNhNubh)}(h:c:func:`VIDIOC_ENUM_FMT`h]j)}(hjh]hVIDIOC_ENUM_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FMTuh1hhhhMhj ubh- would return RGB formats again in that case.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjUhhhNhNubj )}(hXD**Optional.** Set the ``CAPTURE`` format via :c:func:`VIDIOC_S_FMT` on the ``CAPTURE`` queue. The client may choose a different format than selected/suggested by the decoder in :c:func:`VIDIOC_G_FMT`. * **Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``pixelformat`` a raw pixel format. ``width``, ``height`` frame buffer resolution of the decoded stream; typically unchanged from what was returned with :c:func:`VIDIOC_G_FMT`, but it may be different if the hardware supports composition and/or scaling. h](h)}(h**Optional.** Set the ``CAPTURE`` format via :c:func:`VIDIOC_S_FMT` on the ``CAPTURE`` queue. The client may choose a different format than selected/suggested by the decoder in :c:func:`VIDIOC_G_FMT`.h](j )}(h **Optional.**h]h Optional.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubh Set the }(hjNhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubh format via }(hjNhhhNhNubh)}(h:c:func:`VIDIOC_S_FMT`h]j)}(hjxh]hVIDIOC_S_FMT()}(hjzhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_S_FMTuh1hhhhMhjNubh on the }(hjNhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubh[ queue. The client may choose a different format than selected/suggested by the decoder in }(hjNhhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hjh]hVIDIOC_G_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhMhjNubh.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjJubj )}(hhh]j )}(hXh**Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``pixelformat`` a raw pixel format. ``width``, ``height`` frame buffer resolution of the decoded stream; typically unchanged from what was returned with :c:func:`VIDIOC_G_FMT`, but it may be different if the hardware supports composition and/or scaling. h](h)}(h**Required fields:**h]j )}(hjh]hRequired fields:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhhhM hjubj)}(hhh](j)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.h](ha }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh enum appropriate for }(hjhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(h$``pixelformat`` a raw pixel format. h](j)}(h``pixelformat``h]j)}(hjWh]h pixelformat}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1jhhhMhjQubj)}(hhh]h)}(ha raw pixel format.h]ha raw pixel format.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(h``width``, ``height`` frame buffer resolution of the decoded stream; typically unchanged from what was returned with :c:func:`VIDIOC_G_FMT`, but it may be different if the hardware supports composition and/or scaling. h](j)}(h``width``, ``height``h](j)}(h ``width``h]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``height``h]hheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hframe buffer resolution of the decoded stream; typically unchanged from what was returned with :c:func:`VIDIOC_G_FMT`, but it may be different if the hardware supports composition and/or scaling.h](h_frame buffer resolution of the decoded stream; typically unchanged from what was returned with }(hjhhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hjh]hVIDIOC_G_FMT()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhMhjubhN, but it may be different if the hardware supports composition and/or scaling.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]j j uh1j hhhM hjJubeh}(h]h ]h"]h$]h&]uh1j hjUhhhNhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhjDhhhhhMubh block_quote)}(h* Setting the ``CAPTURE`` format will reset the compose selection rectangles to their default values, based on the new resolution, as described in the previous step. h]j )}(hhh]j )}(hSetting the ``CAPTURE`` format will reset the compose selection rectangles to their default values, based on the new resolution, as described in the previous step. h]h)}(hSetting the ``CAPTURE`` format will reset the compose selection rectangles to their default values, based on the new resolution, as described in the previous step.h](h Setting the }(hj" hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj" ubh format will reset the compose selection rectangles to their default values, based on the new resolution, as described in the previous step.}(hj" hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]j j uh1j hhhMhj ubah}(h]h ]h"]h$]h&]uh1j hhhMhjDhhubj)}(hhh](j )}(hX **Optional.** Set the compose rectangle via :c:func:`VIDIOC_S_SELECTION` on the ``CAPTURE`` queue if it is desired and if the decoder has compose and/or scaling capabilities. * **Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``target`` set to ``V4L2_SEL_TGT_COMPOSE``. ``r.left``, ``r.top``, ``r.width``, ``r.height`` the rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. * **Returned fields:** ``r.left``, ``r.top``, ``r.width``, ``r.height`` the visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``. .. warning:: The decoder may adjust the compose rectangle to the nearest supported one to meet codec and hardware requirements. The client needs to check the adjusted rectangle returned by :c:func:`VIDIOC_S_SELECTION`. h](h)}(h**Optional.** Set the compose rectangle via :c:func:`VIDIOC_S_SELECTION` on the ``CAPTURE`` queue if it is desired and if the decoder has compose and/or scaling capabilities.h](j )}(h **Optional.**h]h Optional.}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj[ ubh Set the compose rectangle via }(hj[ hhhNhNubh)}(h:c:func:`VIDIOC_S_SELECTION`h]j)}(hjs h]hVIDIOC_S_SELECTION()}(hju hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjq ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_S_SELECTIONuh1hhhhMhj[ ubh on the }(hj[ hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ ubhS queue if it is desired and if the decoder has compose and/or scaling capabilities.}(hj[ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjW ubj )}(hhh](j )}(hX**Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``target`` set to ``V4L2_SEL_TGT_COMPOSE``. ``r.left``, ``r.top``, ``r.width``, ``r.height`` the rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. h](h)}(h**Required fields:**h]j )}(hj h]hRequired fields:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh](j)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hj h]htype}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhM!hj ubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.Vh](ha }(hj hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh enum appropriate for }(hj hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhM!hj ubj)}(h,``target`` set to ``V4L2_SEL_TGT_COMPOSE``. h](j)}(h ``target``h]j)}(hj/!h]htarget}(hj1!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-!ubah}(h]h ]h"]h$]h&]uh1jhhhM$hj)!ubj)}(hhh]h)}(h set to ``V4L2_SEL_TGT_COMPOSE``.h](hset to }(hjG!hhhNhNubj)}(h``V4L2_SEL_TGT_COMPOSE``h]hV4L2_SEL_TGT_COMPOSE}(hjO!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG!ubh.}(hjG!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM$hjD!ubah}(h]h ]h"]h$]h&]uh1jhj)!ubeh}(h]h ]h"]h$]h&]uh1jhhhM$hj ubj)}(h``r.left``, ``r.top``, ``r.width``, ``r.height`` the rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities. h](j)}(h0``r.left``, ``r.top``, ``r.width``, ``r.height``h](j)}(h ``r.left``h]hr.left}(hj{!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw!ubh, }(hjw!hhhNhNubj)}(h ``r.top``h]hr.top}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw!ubh, }hjw!sbj)}(h ``r.width``h]hr.width}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw!ubh, }hjw!sbj)}(h ``r.height``h]hr.height}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw!ubeh}(h]h ]h"]h$]h&]uh1jhhhM)hjs!ubj)}(hhh]h)}(hthe rectangle inside a ``CAPTURE`` buffer into which the cropped frame is written; defaults to ``V4L2_SEL_TGT_COMPOSE_DEFAULT``; read-only on hardware without additional compose/scaling capabilities.h](hthe rectangle inside a }(hj!hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh= buffer into which the cropped frame is written; defaults to }(hj!hhhNhNubj)}(h ``V4L2_SEL_TGT_COMPOSE_DEFAULT``h]hV4L2_SEL_TGT_COMPOSE_DEFAULT}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubhH; read-only on hardware without additional compose/scaling capabilities.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM'hj!ubah}(h]h ]h"]h$]h&]uh1jhjs!ubeh}(h]h ]h"]h$]h&]uh1jhhhM)hj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(h**Returned fields:** ``r.left``, ``r.top``, ``r.width``, ``r.height`` the visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``. h](h)}(h**Returned fields:**h]j )}(hj"h]hReturned fields:}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&]uh1hhhhM+hj"ubj)}(hhh]j)}(h``r.left``, ``r.top``, ``r.width``, ``r.height`` the visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``. h](j)}(h0``r.left``, ``r.top``, ``r.width``, ``r.height``h](j)}(h ``r.left``h]hr.left}(hj8"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4"ubh, }(hj4"hhhNhNubj)}(h ``r.top``h]hr.top}(hjJ"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4"ubh, }hj4"sbj)}(h ``r.width``h]hr.width}(hj\"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4"ubh, }hj4"sbj)}(h ``r.height``h]hr.height}(hjn"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4"ubeh}(h]h ]h"]h$]h&]uh1jhhhM/hj0"ubj)}(hhh]h)}(hxthe visible rectangle; it must fit within the frame buffer resolution returned by :c:func:`VIDIOC_G_FMT` on ``CAPTURE``.h](hRthe visible rectangle; it must fit within the frame buffer resolution returned by }(hj"hhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hj"h]hVIDIOC_G_FMT()}(hj"hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhM.hj"ubh on }(hj"hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hj"ubah}(h]h ]h"]h$]h&]uh1jhj0"ubeh}(h]h ]h"]h$]h&]uh1jhhhM/hj-"ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhjW ubj)}(hThe decoder may adjust the compose rectangle to the nearest supported one to meet codec and hardware requirements. The client needs to check the adjusted rectangle returned by :c:func:`VIDIOC_S_SELECTION`.h]h)}(hThe decoder may adjust the compose rectangle to the nearest supported one to meet codec and hardware requirements. The client needs to check the adjusted rectangle returned by :c:func:`VIDIOC_S_SELECTION`.h](hThe decoder may adjust the compose rectangle to the nearest supported one to meet codec and hardware requirements. The client needs to check the adjusted rectangle returned by }(hj"hhhNhNubh)}(h:c:func:`VIDIOC_S_SELECTION`h]j)}(hj"h]hVIDIOC_S_SELECTION()}(hj"hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_S_SELECTIONuh1hhhhM3hj"ubh.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM3hj"ubah}(h]h ]h"]h$]h&]uh1jhjW ubeh}(h]h ]h"]h$]h&]uh1j hjT hhhNhNubj )}(hXIf all the following conditions are met, the client may resume the decoding instantly: * ``sizeimage`` of the new format (determined in previous steps) is less than or equal to the size of currently allocated buffers, * the number of buffers currently allocated is greater than or equal to the minimum number of buffers acquired in previous steps. To fulfill this requirement, the client may use :c:func:`VIDIOC_CREATE_BUFS` to add new buffers. In that case, the remaining steps do not apply and the client may resume the decoding by one of the following actions: * if the ``CAPTURE`` queue is streaming, call :c:func:`VIDIOC_DECODER_CMD` with the ``V4L2_DEC_CMD_START`` command, * if the ``CAPTURE`` queue is not streaming, call :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue. However, if the client intends to change the buffer set, to lower memory usage or for any other reasons, it may be achieved by following the steps below. h](h)}(hVIf all the following conditions are met, the client may resume the decoding instantly:h]hVIf all the following conditions are met, the client may resume the decoding instantly:}(hj+#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj'#ubj )}(hhh](j )}(h``sizeimage`` of the new format (determined in previous steps) is less than or equal to the size of currently allocated buffers, h]h)}(h``sizeimage`` of the new format (determined in previous steps) is less than or equal to the size of currently allocated buffers,h](j)}(h ``sizeimage``h]h sizeimage}(hjD#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@#ubhs of the new format (determined in previous steps) is less than or equal to the size of currently allocated buffers,}(hj@#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM:hj<#ubah}(h]h ]h"]h$]h&]uh1j hj9#ubj )}(hthe number of buffers currently allocated is greater than or equal to the minimum number of buffers acquired in previous steps. To fulfill this requirement, the client may use :c:func:`VIDIOC_CREATE_BUFS` to add new buffers. h]h)}(hthe number of buffers currently allocated is greater than or equal to the minimum number of buffers acquired in previous steps. To fulfill this requirement, the client may use :c:func:`VIDIOC_CREATE_BUFS` to add new buffers.h](hthe number of buffers currently allocated is greater than or equal to the minimum number of buffers acquired in previous steps. To fulfill this requirement, the client may use }(hjf#hhhNhNubh)}(h:c:func:`VIDIOC_CREATE_BUFS`h]j)}(hjp#h]hVIDIOC_CREATE_BUFS()}(hjr#hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjn#ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_CREATE_BUFSuh1hhhhM=hjf#ubh to add new buffers.}(hjf#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM=hjb#ubah}(h]h ]h"]h$]h&]uh1j hj9#ubeh}(h]h ]h"]h$]h&]j j uh1j hhhM:hj'#ubh)}(hvIn that case, the remaining steps do not apply and the client may resume the decoding by one of the following actions:h]hvIn that case, the remaining steps do not apply and the client may resume the decoding by one of the following actions:}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj'#ubj )}(hhh](j )}(hrif the ``CAPTURE`` queue is streaming, call :c:func:`VIDIOC_DECODER_CMD` with the ``V4L2_DEC_CMD_START`` command, h]h)}(hqif the ``CAPTURE`` queue is streaming, call :c:func:`VIDIOC_DECODER_CMD` with the ``V4L2_DEC_CMD_START`` command,h](hif the }(hj#hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh queue is streaming, call }(hj#hhhNhNubh)}(h:c:func:`VIDIOC_DECODER_CMD`h]j)}(hj#h]hVIDIOC_DECODER_CMD()}(hj#hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_DECODER_CMDuh1hhhhMEhj#ubh with the }(hj#hhhNhNubj)}(h``V4L2_DEC_CMD_START``h]hV4L2_DEC_CMD_START}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh command,}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMEhj#ubah}(h]h ]h"]h$]h&]uh1j hj#ubj )}(hdif the ``CAPTURE`` queue is not streaming, call :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue. h]h)}(hcif the ``CAPTURE`` queue is not streaming, call :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue.h](hif the }(hj$hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh queue is not streaming, call }(hj$hhhNhNubh)}(h:c:func:`VIDIOC_STREAMON`h]j)}(hj3$h]hVIDIOC_STREAMON()}(hj5$hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj1$ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMONuh1hhhhMHhj$ubh on the }(hj$hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjT$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh queue.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj$ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMEhj'#ubh)}(hHowever, if the client intends to change the buffer set, to lower memory usage or for any other reasons, it may be achieved by following the steps below.h]hHowever, if the client intends to change the buffer set, to lower memory usage or for any other reasons, it may be achieved by following the steps below.}(hjx$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj'#ubeh}(h]h ]h"]h$]h&]uh1j hjT hhhhhNubj )}(h**If the** ``CAPTURE`` **queue is streaming,** keep queuing and dequeuing buffers on the ``CAPTURE`` queue until a buffer marked with the ``V4L2_BUF_FLAG_LAST`` flag is dequeued. h]h)}(h**If the** ``CAPTURE`` **queue is streaming,** keep queuing and dequeuing buffers on the ``CAPTURE`` queue until a buffer marked with the ``V4L2_BUF_FLAG_LAST`` flag is dequeued.h](j )}(h **If the**h]hIf the}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh }(hj$hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh }hj$sbj )}(h**queue is streaming,**h]hqueue is streaming,}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh+ keep queuing and dequeuing buffers on the }(hj$hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh& queue until a buffer marked with the }(hj$hhhNhNubj)}(h``V4L2_BUF_FLAG_LAST``h]hV4L2_BUF_FLAG_LAST}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh flag is dequeued.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMOhj$ubah}(h]h ]h"]h$]h&]uh1j hjT hhhhhNubj )}(hX**If the** ``CAPTURE`` **queue is streaming,** call :c:func:`VIDIOC_STREAMOFF` on the ``CAPTURE`` queue to stop streaming. .. warning:: The ``OUTPUT`` queue must remain streaming. Calling :c:func:`VIDIOC_STREAMOFF` on it would abort the sequence and trigger a seek. h](h)}(hz**If the** ``CAPTURE`` **queue is streaming,** call :c:func:`VIDIOC_STREAMOFF` on the ``CAPTURE`` queue to stop streaming.h](j )}(h **If the**h]hIf the}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh }(hj$hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh }hj$sbj )}(h**queue is streaming,**h]hqueue is streaming,}(hj&%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh call }(hj$hhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hj:%h]hVIDIOC_STREAMOFF()}(hj<%hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj8%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhMShj$ubh on the }(hj$hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj[%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh queue to stop streaming.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMShj$ubj)}(hThe ``OUTPUT`` queue must remain streaming. Calling :c:func:`VIDIOC_STREAMOFF` on it would abort the sequence and trigger a seek.h]h)}(hThe ``OUTPUT`` queue must remain streaming. Calling :c:func:`VIDIOC_STREAMOFF` on it would abort the sequence and trigger a seek.h](hThe }(hjw%hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw%ubh& queue must remain streaming. Calling }(hjw%hhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hj%h]hVIDIOC_STREAMOFF()}(hj%hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhMXhjw%ubh3 on it would abort the sequence and trigger a seek.}(hjw%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMXhjs%ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1j hjT hhhNhNubj )}(hX$**If the** ``CAPTURE`` **queue has buffers allocated,** free the ``CAPTURE`` buffers using :c:func:`VIDIOC_REQBUFS`. * **Required fields:** ``count`` set to 0. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``memory`` follows standard semantics. h](h)}(ht**If the** ``CAPTURE`` **queue has buffers allocated,** free the ``CAPTURE`` buffers using :c:func:`VIDIOC_REQBUFS`.h](j )}(h **If the**h]hIf the}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubh }(hj%hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh }hj%sbj )}(h **queue has buffers allocated,**h]hqueue has buffers allocated,}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubh free the }(hj%hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh buffers using }(hj%hhhNhNubh)}(h:c:func:`VIDIOC_REQBUFS`h]j)}(hj&h]hVIDIOC_REQBUFS()}(hj&hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_REQBUFSuh1hhhhM\hj%ubh.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM\hj%ubj )}(hhh]j )}(h**Required fields:** ``count`` set to 0. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``memory`` follows standard semantics. h](h)}(h**Required fields:**h]j )}(hjH&h]hRequired fields:}(hjJ&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjF&ubah}(h]h ]h"]h$]h&]uh1hhhhM_hjB&ubj)}(hhh](j)}(h``count`` set to 0. h](j)}(h ``count``h]j)}(hjf&h]hcount}(hjh&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd&ubah}(h]h ]h"]h$]h&]uh1jhhhMbhj`&ubj)}(hhh]h)}(h set to 0.h]h set to 0.}(hj~&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj{&ubah}(h]h ]h"]h$]h&]uh1jhj`&ubeh}(h]h ]h"]h$]h&]uh1jhhhMbhj]&ubj)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hj&h]htype}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhhhMehj&ubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.h](ha }(hj&hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh enum appropriate for }(hj&hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMehj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMehj]&ubj)}(h'``memory`` follows standard semantics. h](j)}(h ``memory``h]j)}(hj&h]hmemory}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhhhMhhj&ubj)}(hhh]h)}(hfollows standard semantics.h]hfollows standard semantics.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj'ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMhhj]&ubeh}(h]h ]h"]h$]h&]uh1jhjB&ubeh}(h]h ]h"]h$]h&]uh1j hj?&ubah}(h]h ]h"]h$]h&]j j uh1j hhhM_hj%ubeh}(h]h ]h"]h$]h&]uh1j hjT hhhNhNubj )}(hX' Allocate ``CAPTURE`` buffers via :c:func:`VIDIOC_REQBUFS` on the ``CAPTURE`` queue. * **Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``memory`` follows standard semantics. * **Returned fields:** ``count`` actual number of buffers allocated. .. warning:: The actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns. .. note:: To allocate more than the minimum number of buffers (for pipeline depth), the client may query the ``V4L2_CID_MIN_BUFFERS_FOR_CAPTURE`` control to get the minimum number of buffers required, and pass the obtained value plus the number of additional buffers needed in the ``count`` field to :c:func:`VIDIOC_REQBUFS`. Alternatively, :c:func:`VIDIOC_CREATE_BUFS` on the ``CAPTURE`` queue can be used to have more control over buffer allocation. For example, by allocating buffers larger than the current ``CAPTURE`` format, future resolution changes can be accommodated. * **Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``memory`` follows standard semantics. ``format`` a format representing the maximum framebuffer resolution to be accommodated by newly allocated buffers. * **Returned fields:** ``count`` adjusted to the number of allocated buffers. .. warning:: The actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns. .. note:: To allocate buffers for a format different than parsed from the stream metadata, the client must proceed as follows, before the metadata parsing is initiated: * set width and height of the ``OUTPUT`` format to desired coded resolution to let the decoder configure the ``CAPTURE`` format appropriately, * query the ``CAPTURE`` format using :c:func:`VIDIOC_G_FMT` and save it until this step. The format obtained in the query may be then used with :c:func:`VIDIOC_CREATE_BUFS` in this step to allocate the buffers. h](h)}(hSAllocate ``CAPTURE`` buffers via :c:func:`VIDIOC_REQBUFS` on the ``CAPTURE`` queue.h](h Allocate }(hjH'hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjP'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH'ubh buffers via }(hjH'hhhNhNubh)}(h:c:func:`VIDIOC_REQBUFS`h]j)}(hjd'h]hVIDIOC_REQBUFS()}(hjf'hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjb'ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_REQBUFSuh1hhhhMjhjH'ubh on the }(hjH'hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH'ubh queue.}(hjH'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMjhjD'ubj )}(hhh](j )}(h**Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``memory`` follows standard semantics. h](h)}(h**Required fields:**h]j )}(hj'h]hRequired fields:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&]uh1hhhhMmhj'ubj)}(hhh](j)}(hF``count`` requested number of buffers to allocate; greater than zero. h](j)}(h ``count``h]j)}(hj'h]hcount}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jhhhMphj'ubj)}(hhh]h)}(h;requested number of buffers to allocate; greater than zero.h]h;requested number of buffers to allocate; greater than zero.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMphj'ubj)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hj'h]htype}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jhhhMshj'ubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.h](ha }(hj(hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh enum appropriate for }(hj(hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj.(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshj(ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMshj'ubj)}(h'``memory`` follows standard semantics. h](j)}(h ``memory``h]j)}(hjX(h]hmemory}(hjZ(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV(ubah}(h]h ]h"]h$]h&]uh1jhhhMvhjR(ubj)}(hhh]h)}(hfollows standard semantics.h]hfollows standard semantics.}(hjp(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjm(ubah}(h]h ]h"]h$]h&]uh1jhjR(ubeh}(h]h ]h"]h$]h&]uh1jhhhMvhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1j hj'ubj )}(hH**Returned fields:** ``count`` actual number of buffers allocated. h](h)}(h**Returned fields:**h]j )}(hj(h]hReturned fields:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]uh1hhhhMxhj(ubj)}(hhh]j)}(h.``count`` actual number of buffers allocated. h](j)}(h ``count``h]j)}(hj(h]hcount}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhhhM{hj(ubj)}(hhh]h)}(h#actual number of buffers allocated.h]h#actual number of buffers allocated.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhhhM{hj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMmhjD'ubj)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h]h)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h](h;The actual number of allocated buffers may differ from the }(hj)hhhNhNubj)}(h ``count``h]hcount}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh3 given. The client must check the updated value of }(hj)hhhNhNubj)}(h ``count``h]hcount}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh after the call returns.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jhjD'ubj)}(hX;To allocate more than the minimum number of buffers (for pipeline depth), the client may query the ``V4L2_CID_MIN_BUFFERS_FOR_CAPTURE`` control to get the minimum number of buffers required, and pass the obtained value plus the number of additional buffers needed in the ``count`` field to :c:func:`VIDIOC_REQBUFS`.h]h)}(hX;To allocate more than the minimum number of buffers (for pipeline depth), the client may query the ``V4L2_CID_MIN_BUFFERS_FOR_CAPTURE`` control to get the minimum number of buffers required, and pass the obtained value plus the number of additional buffers needed in the ``count`` field to :c:func:`VIDIOC_REQBUFS`.h](hcTo allocate more than the minimum number of buffers (for pipeline depth), the client may query the }(hj>)hhhNhNubj)}(h$``V4L2_CID_MIN_BUFFERS_FOR_CAPTURE``h]h V4L2_CID_MIN_BUFFERS_FOR_CAPTURE}(hjF)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>)ubh control to get the minimum number of buffers required, and pass the obtained value plus the number of additional buffers needed in the }(hj>)hhhNhNubj)}(h ``count``h]hcount}(hjX)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>)ubh field to }(hj>)hhhNhNubh)}(h:c:func:`VIDIOC_REQBUFS`h]j)}(hjl)h]hVIDIOC_REQBUFS()}(hjn)hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_REQBUFSuh1hhhhMhj>)ubh.}(hj>)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj:)ubah}(h]h ]h"]h$]h&]uh1jhjD'ubh)}(hAlternatively, :c:func:`VIDIOC_CREATE_BUFS` on the ``CAPTURE`` queue can be used to have more control over buffer allocation. For example, by allocating buffers larger than the current ``CAPTURE`` format, future resolution changes can be accommodated.h](hAlternatively, }(hj)hhhNhNubh)}(h:c:func:`VIDIOC_CREATE_BUFS`h]j)}(hj)h]hVIDIOC_CREATE_BUFS()}(hj)hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_CREATE_BUFSuh1hhhhMhj)ubh on the }(hj)hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh{ queue can be used to have more control over buffer allocation. For example, by allocating buffers larger than the current }(hj)hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh7 format, future resolution changes can be accommodated.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjD'ubj )}(hhh](j )}(hXN**Required fields:** ``count`` requested number of buffers to allocate; greater than zero. ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. ``memory`` follows standard semantics. ``format`` a format representing the maximum framebuffer resolution to be accommodated by newly allocated buffers. h](h)}(h**Required fields:**h]j )}(hj)h]hRequired fields:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubj)}(hhh](j)}(hF``count`` requested number of buffers to allocate; greater than zero. h](j)}(h ``count``h]j)}(hj*h]hcount}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhhhMhj*ubj)}(hhh]h)}(h;requested number of buffers to allocate; greater than zero.h]h;requested number of buffers to allocate; greater than zero.}(hj-*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj**ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj *ubj)}(hA``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``. h](j)}(h``type``h]j)}(hjM*h]htype}(hjO*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK*ubah}(h]h ]h"]h$]h&]uh1jhhhMhjG*ubj)}(hhh]h)}(h7a ``V4L2_BUF_TYPE_*`` enum appropriate for ``CAPTURE``.h](ha }(hje*hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hjm*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje*ubh enum appropriate for }(hje*hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje*ubh.}(hje*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjb*ubah}(h]h ]h"]h$]h&]uh1jhjG*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj *ubj)}(h'``memory`` follows standard semantics. h](j)}(h ``memory``h]j)}(hj*h]hmemory}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhhhMhj*ubj)}(hhh]h)}(hfollows standard semantics.h]hfollows standard semantics.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj *ubj)}(hs``format`` a format representing the maximum framebuffer resolution to be accommodated by newly allocated buffers. h](j)}(h ``format``h]j)}(hj*h]hformat}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhhhMhj*ubj)}(hhh]h)}(hga format representing the maximum framebuffer resolution to be accommodated by newly allocated buffers.h]hga format representing the maximum framebuffer resolution to be accommodated by newly allocated buffers.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj *ubeh}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1j hj)ubj )}(hQ**Returned fields:** ``count`` adjusted to the number of allocated buffers. h](h)}(h**Returned fields:**h]j )}(hj%+h]hReturned fields:}(hj'+hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#+ubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubj)}(hhh]j)}(h7``count`` adjusted to the number of allocated buffers. h](j)}(h ``count``h]j)}(hjC+h]hcount}(hjE+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA+ubah}(h]h ]h"]h$]h&]uh1jhhhMhj=+ubj)}(hhh]h)}(h,adjusted to the number of allocated buffers.h]h,adjusted to the number of allocated buffers.}(hj[+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjX+ubah}(h]h ]h"]h$]h&]uh1jhj=+ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj:+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhjD'ubj)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h]h)}(hThe actual number of allocated buffers may differ from the ``count`` given. The client must check the updated value of ``count`` after the call returns.h](h;The actual number of allocated buffers may differ from the }(hj+hhhNhNubj)}(h ``count``h]hcount}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh3 given. The client must check the updated value of }(hj+hhhNhNubj)}(h ``count``h]hcount}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh after the call returns.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhjD'ubj)}(hXTo allocate buffers for a format different than parsed from the stream metadata, the client must proceed as follows, before the metadata parsing is initiated: * set width and height of the ``OUTPUT`` format to desired coded resolution to let the decoder configure the ``CAPTURE`` format appropriately, * query the ``CAPTURE`` format using :c:func:`VIDIOC_G_FMT` and save it until this step. The format obtained in the query may be then used with :c:func:`VIDIOC_CREATE_BUFS` in this step to allocate the buffers.h](h)}(hTo allocate buffers for a format different than parsed from the stream metadata, the client must proceed as follows, before the metadata parsing is initiated:h]hTo allocate buffers for a format different than parsed from the stream metadata, the client must proceed as follows, before the metadata parsing is initiated:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubj )}(hhh](j )}(hset width and height of the ``OUTPUT`` format to desired coded resolution to let the decoder configure the ``CAPTURE`` format appropriately, h]h)}(hset width and height of the ``OUTPUT`` format to desired coded resolution to let the decoder configure the ``CAPTURE`` format appropriately,h](hset width and height of the }(hj+hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubhE format to desired coded resolution to let the decoder configure the }(hj+hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh format appropriately,}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1j hj+ubj )}(hWquery the ``CAPTURE`` format using :c:func:`VIDIOC_G_FMT` and save it until this step. h]h)}(hVquery the ``CAPTURE`` format using :c:func:`VIDIOC_G_FMT` and save it until this step.h](h query the }(hj,hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh format using }(hj,hhhNhNubh)}(h:c:func:`VIDIOC_G_FMT`h]j)}(hj4,h]hVIDIOC_G_FMT()}(hj6,hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj2,ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_G_FMTuh1hhhhMhj,ubh and save it until this step.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhj+ubh)}(hyThe format obtained in the query may be then used with :c:func:`VIDIOC_CREATE_BUFS` in this step to allocate the buffers.h](h7The format obtained in the query may be then used with }(hjg,hhhNhNubh)}(h:c:func:`VIDIOC_CREATE_BUFS`h]j)}(hjq,h]hVIDIOC_CREATE_BUFS()}(hjs,hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjo,ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_CREATE_BUFSuh1hhhhMhjg,ubh& in this step to allocate the buffers.}(hjg,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+ubeh}(h]h ]h"]h$]h&]uh1jhjD'ubeh}(h]h ]h"]h$]h&]uh1j hjT hhhNhNubj )}(hRCall :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue to start decoding frames. h]h)}(hQCall :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue to start decoding frames.h](hCall }(hj,hhhNhNubh)}(h:c:func:`VIDIOC_STREAMON`h]j)}(hj,h]hVIDIOC_STREAMON()}(hj,hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMONuh1hhhhMhj,ubh on the }(hj,hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh queue to start decoding frames.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1j hjT hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjstartKuh1jhjDhhhhhMubeh}(h] capture-setupah ]h"] capture setupah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hDecodingh]hDecoding}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hhhhhMubh)}(hThis state is reached after the `Capture Setup` sequence finishes successfully. In this state, the client queues and dequeues buffers to both queues via :c:func:`VIDIOC_QBUF` and :c:func:`VIDIOC_DQBUF`, following the standard semantics.h](h This state is reached after the }(hj-hhhNhNubj)}(h`Capture Setup`h]h Capture Setup}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubhj sequence finishes successfully. In this state, the client queues and dequeues buffers to both queues via }(hj-hhhNhNubh)}(h:c:func:`VIDIOC_QBUF`h]j)}(hj--h]h VIDIOC_QBUF()}(hj/-hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj+-ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_QBUFuh1hhhhMhj-ubh and }(hj-hhhNhNubh)}(h:c:func:`VIDIOC_DQBUF`h]j)}(hjP-h]hVIDIOC_DQBUF()}(hjR-hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjN-ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_DQBUFuh1hhhhMhj-ubh#, following the standard semantics.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubh)}(hThe content of the source ``OUTPUT`` buffers depends on the active coded pixel format and may be affected by codec-specific extended controls, as stated in the documentation of each format.h](hThe content of the source }(hjw-hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw-ubh buffers depends on the active coded pixel format and may be affected by codec-specific extended controls, as stated in the documentation of each format.}(hjw-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubh)}(hXUBoth queues operate independently, following the standard behavior of V4L2 buffer queues and memory-to-memory devices. In addition, the order of decoded frames dequeued from the ``CAPTURE`` queue may differ from the order of queuing coded frames to the ``OUTPUT`` queue, due to properties of the selected coded format, e.g. frame reordering.h](hBoth queues operate independently, following the standard behavior of V4L2 buffer queues and memory-to-memory devices. In addition, the order of decoded frames dequeued from the }(hj-hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh@ queue may differ from the order of queuing coded frames to the }(hj-hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubhN queue, due to properties of the selected coded format, e.g. frame reordering.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubh)}(hThe client must not assume any direct relationship between ``CAPTURE`` and ``OUTPUT`` buffers and any specific timing of buffers becoming available to dequeue. Specifically:h](h;The client must not assume any direct relationship between }(hj-hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh and }(hj-hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubhX buffers and any specific timing of buffers becoming available to dequeue. Specifically:}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubj )}(hhh](j )}(ha buffer queued to ``OUTPUT`` may result in no buffers being produced on ``CAPTURE`` (e.g. if it does not contain encoded data, or if only metadata syntax structures are present in it), h]h)}(ha buffer queued to ``OUTPUT`` may result in no buffers being produced on ``CAPTURE`` (e.g. if it does not contain encoded data, or if only metadata syntax structures are present in it),h](ha buffer queued to }(hj.hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh, may result in no buffers being produced on }(hj.hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubhe (e.g. if it does not contain encoded data, or if only metadata syntax structures are present in it),}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1j hj-hhhhhNubj )}(hXa buffer queued to ``OUTPUT`` may result in more than one buffer produced on ``CAPTURE`` (if the encoded data contained more than one frame, or if returning a decoded frame allowed the decoder to return a frame that preceded it in decode, but succeeded it in the display order), h]h)}(hXa buffer queued to ``OUTPUT`` may result in more than one buffer produced on ``CAPTURE`` (if the encoded data contained more than one frame, or if returning a decoded frame allowed the decoder to return a frame that preceded it in decode, but succeeded it in the display order),h](ha buffer queued to }(hj>.hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjF.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>.ubh0 may result in more than one buffer produced on }(hj>.hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjX.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>.ubh (if the encoded data contained more than one frame, or if returning a decoded frame allowed the decoder to return a frame that preceded it in decode, but succeeded it in the display order),}(hj>.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj:.ubah}(h]h ]h"]h$]h&]uh1j hj-hhhhhNubj )}(ha buffer queued to ``OUTPUT`` may result in a buffer being produced on ``CAPTURE`` later into decode process, and/or after processing further ``OUTPUT`` buffers, or be returned out of order, e.g. if display reordering is used, h]h)}(ha buffer queued to ``OUTPUT`` may result in a buffer being produced on ``CAPTURE`` later into decode process, and/or after processing further ``OUTPUT`` buffers, or be returned out of order, e.g. if display reordering is used,h](ha buffer queued to }(hjz.hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz.ubh* may result in a buffer being produced on }(hjz.hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz.ubh< later into decode process, and/or after processing further }(hjz.hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz.ubhJ buffers, or be returned out of order, e.g. if display reordering is used,}(hjz.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv.ubah}(h]h ]h"]h$]h&]uh1j hj-hhhhhNubj )}(hXbuffers may become available on the ``CAPTURE`` queue without additional buffers queued to ``OUTPUT`` (e.g. during drain or ``EOS``), because of the ``OUTPUT`` buffers queued in the past whose decoding results are only available at later time, due to specifics of the decoding process. h]h)}(hXbuffers may become available on the ``CAPTURE`` queue without additional buffers queued to ``OUTPUT`` (e.g. during drain or ``EOS``), because of the ``OUTPUT`` buffers queued in the past whose decoding results are only available at later time, due to specifics of the decoding process.h](h$buffers may become available on the }(hj.hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh, queue without additional buffers queued to }(hj.hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh (e.g. during drain or }(hj.hhhNhNubj)}(h``EOS``h]hEOS}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh), because of the }(hj.hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh~ buffers queued in the past whose decoding results are only available at later time, due to specifics of the decoding process.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1j hj-hhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhj-hhubj)}(hXTo allow matching decoded ``CAPTURE`` buffers with ``OUTPUT`` buffers they originated from, the client can set the ``timestamp`` field of the :c:type:`v4l2_buffer` struct when queuing an ``OUTPUT`` buffer. The ``CAPTURE`` buffer(s), which resulted from decoding that ``OUTPUT`` buffer will have their ``timestamp`` field set to the same value when dequeued. In addition to the straightforward case of one ``OUTPUT`` buffer producing one ``CAPTURE`` buffer, the following cases are defined: * one ``OUTPUT`` buffer generates multiple ``CAPTURE`` buffers: the same ``OUTPUT`` timestamp will be copied to multiple ``CAPTURE`` buffers. * multiple ``OUTPUT`` buffers generate one ``CAPTURE`` buffer: timestamp of the ``OUTPUT`` buffer queued first will be copied. * the decoding order differs from the display order (i.e. the ``CAPTURE`` buffers are out-of-order compared to the ``OUTPUT`` buffers): ``CAPTURE`` timestamps will not retain the order of ``OUTPUT`` timestamps.h](h)}(hXeTo allow matching decoded ``CAPTURE`` buffers with ``OUTPUT`` buffers they originated from, the client can set the ``timestamp`` field of the :c:type:`v4l2_buffer` struct when queuing an ``OUTPUT`` buffer. The ``CAPTURE`` buffer(s), which resulted from decoding that ``OUTPUT`` buffer will have their ``timestamp`` field set to the same value when dequeued.h](hTo allow matching decoded }(hj./hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj6/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh buffers with }(hj./hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjH/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh6 buffers they originated from, the client can set the }(hj./hhhNhNubj)}(h ``timestamp``h]h timestamp}(hjZ/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh field of the }(hj./hhhNhNubh)}(h:c:type:`v4l2_buffer`h]j)}(hjn/h]h v4l2_buffer}(hjp/hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjl/ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj v4l2_bufferuh1hhhhMhj./ubh struct when queuing an }(hj./hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh buffer. The }(hj./hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh. buffer(s), which resulted from decoding that }(hj./hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh buffer will have their }(hj./hhhNhNubj)}(h ``timestamp``h]h timestamp}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj./ubh+ field set to the same value when dequeued.}(hj./hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj*/ubh)}(hIn addition to the straightforward case of one ``OUTPUT`` buffer producing one ``CAPTURE`` buffer, the following cases are defined:h](h/In addition to the straightforward case of one }(hj/hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh buffer producing one }(hj/hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh) buffer, the following cases are defined:}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj*/ubj )}(hhh](j )}(hone ``OUTPUT`` buffer generates multiple ``CAPTURE`` buffers: the same ``OUTPUT`` timestamp will be copied to multiple ``CAPTURE`` buffers. h]h)}(hone ``OUTPUT`` buffer generates multiple ``CAPTURE`` buffers: the same ``OUTPUT`` timestamp will be copied to multiple ``CAPTURE`` buffers.h](hone }(hj0hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh buffer generates multiple }(hj0hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj00hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh buffers: the same }(hj0hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjB0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh& timestamp will be copied to multiple }(hj0hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjT0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh buffers.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1j hj0ubj )}(h}multiple ``OUTPUT`` buffers generate one ``CAPTURE`` buffer: timestamp of the ``OUTPUT`` buffer queued first will be copied. h]h)}(h|multiple ``OUTPUT`` buffers generate one ``CAPTURE`` buffer: timestamp of the ``OUTPUT`` buffer queued first will be copied.h](h multiple }(hjv0hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj~0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv0ubh buffers generate one }(hjv0hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv0ubh buffer: timestamp of the }(hjv0hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv0ubh$ buffer queued first will be copied.}(hjv0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr0ubah}(h]h ]h"]h$]h&]uh1j hj0ubj )}(hthe decoding order differs from the display order (i.e. the ``CAPTURE`` buffers are out-of-order compared to the ``OUTPUT`` buffers): ``CAPTURE`` timestamps will not retain the order of ``OUTPUT`` timestamps.h]h)}(hthe decoding order differs from the display order (i.e. the ``CAPTURE`` buffers are out-of-order compared to the ``OUTPUT`` buffers): ``CAPTURE`` timestamps will not retain the order of ``OUTPUT`` timestamps.h](hhjP4ubh.}(hjP4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM>hjL4ubj )}(hhh](j )}(hZ**Required fields:** ``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. h](h)}(h**Required fields:**h]j )}(hj4h]hRequired fields:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4ubah}(h]h ]h"]h$]h&]uh1hhhhM@hj4ubj)}(hhh]j)}(h@``type`` a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``. h](j)}(h``type``h]j)}(hj4h]htype}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1jhhhMChj4ubj)}(hhh]h)}(h6a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT``.h](ha }(hj4hhhNhNubj)}(h``V4L2_BUF_TYPE_*``h]hV4L2_BUF_TYPE_*}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh enum appropriate for }(hj4hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMChj4ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhhhMChj4ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1j hj4ubj )}(hWThe decoder will start accepting new source bytestream buffers after the call returns. h]h)}(hVThe decoder will start accepting new source bytestream buffers after the call returns.h]hVThe decoder will start accepting new source bytestream buffers after the call returns.}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj5ubah}(h]h ]h"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]j j uh1j hhhM@hjL4ubeh}(h]h ]h"]h$]h&]uh1j hjC3hhhNhNubj )}(hXStart queuing buffers containing coded data after the seek to the ``OUTPUT`` queue until a suitable resume point is found. .. note:: There is no requirement to begin queuing coded data starting exactly from a resume point (e.g. SPS or a keyframe). Any queued ``OUTPUT`` buffers will be processed and returned to the client until a suitable resume point is found. While looking for a resume point, the decoder should not produce any decoded frames into ``CAPTURE`` buffers. Some hardware is known to mishandle seeks to a non-resume point. Such an operation may result in an unspecified number of corrupted decoded frames being made available on the ``CAPTURE`` queue. Drivers must ensure that no fatal decoding errors or crashes occur, and implement any necessary handling and workarounds for hardware issues related to seek operations. .. warning:: In case of the H.264/HEVC codec, the client must take care not to seek over a change of SPS/PPS. Even though the target frame could be a keyframe, the stale SPS/PPS inside decoder state would lead to undefined results when decoding. Although the decoder must handle that case without a crash or a fatal decode error, the client must not expect a sensible decode output. If the hardware can detect such corrupted decoded frames, then corresponding buffers will be returned to the client with the V4L2_BUF_FLAG_ERROR set. See the `Decoding` section for further description of decode error reporting. h](h)}(hzStart queuing buffers containing coded data after the seek to the ``OUTPUT`` queue until a suitable resume point is found.h](hBStart queuing buffers containing coded data after the seek to the }(hjD5hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjL5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD5ubh. queue until a suitable resume point is found.}(hjD5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj@5ubj)}(hXThere is no requirement to begin queuing coded data starting exactly from a resume point (e.g. SPS or a keyframe). Any queued ``OUTPUT`` buffers will be processed and returned to the client until a suitable resume point is found. While looking for a resume point, the decoder should not produce any decoded frames into ``CAPTURE`` buffers. Some hardware is known to mishandle seeks to a non-resume point. Such an operation may result in an unspecified number of corrupted decoded frames being made available on the ``CAPTURE`` queue. Drivers must ensure that no fatal decoding errors or crashes occur, and implement any necessary handling and workarounds for hardware issues related to seek operations.h](h)}(hXTThere is no requirement to begin queuing coded data starting exactly from a resume point (e.g. SPS or a keyframe). Any queued ``OUTPUT`` buffers will be processed and returned to the client until a suitable resume point is found. While looking for a resume point, the decoder should not produce any decoded frames into ``CAPTURE`` buffers.h](h~There is no requirement to begin queuing coded data starting exactly from a resume point (e.g. SPS or a keyframe). Any queued }(hjh5hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjp5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh5ubh buffers will be processed and returned to the client until a suitable resume point is found. While looking for a resume point, the decoder should not produce any decoded frames into }(hjh5hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh5ubh buffers.}(hjh5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMMhjd5ubh)}(hXjSome hardware is known to mishandle seeks to a non-resume point. Such an operation may result in an unspecified number of corrupted decoded frames being made available on the ``CAPTURE`` queue. Drivers must ensure that no fatal decoding errors or crashes occur, and implement any necessary handling and workarounds for hardware issues related to seek operations.h](hSome hardware is known to mishandle seeks to a non-resume point. Such an operation may result in an unspecified number of corrupted decoded frames being made available on the }(hj5hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh queue. Drivers must ensure that no fatal decoding errors or crashes occur, and implement any necessary handling and workarounds for hardware issues related to seek operations.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMShjd5ubeh}(h]h ]h"]h$]h&]uh1jhj@5ubj)}(hXVIn case of the H.264/HEVC codec, the client must take care not to seek over a change of SPS/PPS. Even though the target frame could be a keyframe, the stale SPS/PPS inside decoder state would lead to undefined results when decoding. Although the decoder must handle that case without a crash or a fatal decode error, the client must not expect a sensible decode output. If the hardware can detect such corrupted decoded frames, then corresponding buffers will be returned to the client with the V4L2_BUF_FLAG_ERROR set. See the `Decoding` section for further description of decode error reporting.h](h)}(hXqIn case of the H.264/HEVC codec, the client must take care not to seek over a change of SPS/PPS. Even though the target frame could be a keyframe, the stale SPS/PPS inside decoder state would lead to undefined results when decoding. Although the decoder must handle that case without a crash or a fatal decode error, the client must not expect a sensible decode output.h]hXqIn case of the H.264/HEVC codec, the client must take care not to seek over a change of SPS/PPS. Even though the target frame could be a keyframe, the stale SPS/PPS inside decoder state would lead to undefined results when decoding. Although the decoder must handle that case without a crash or a fatal decode error, the client must not expect a sensible decode output.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj5ubh)}(hIf the hardware can detect such corrupted decoded frames, then corresponding buffers will be returned to the client with the V4L2_BUF_FLAG_ERROR set. See the `Decoding` section for further description of decode error reporting.h](hIf the hardware can detect such corrupted decoded frames, then corresponding buffers will be returned to the client with the V4L2_BUF_FLAG_ERROR set. See the }(hj5hhhNhNubj)}(h `Decoding`h]hDecoding}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh; section for further description of decode error reporting.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMbhj5ubeh}(h]h ]h"]h$]h&]uh1jhj@5ubeh}(h]h ]h"]h$]h&]uh1j hjC3hhhNhNubj )}(hoAfter a resume point is found, the decoder will start returning ``CAPTURE`` buffers containing decoded frames. h]h)}(hnAfter a resume point is found, the decoder will start returning ``CAPTURE`` buffers containing decoded frames.h](h@After a resume point is found, the decoder will start returning }(hj6hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj 6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh# buffers containing decoded frames.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMghj5ubah}(h]h ]h"]h$]h&]uh1j hjC3hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj3hhhhhM3ubj)}(hA seek may result in the `Dynamic Resolution Change` sequence being initiated, due to the seek target having decoding parameters different from the part of the stream decoded before the seek. The sequence must be handled as per normal decoder operation.h]h)}(hA seek may result in the `Dynamic Resolution Change` sequence being initiated, due to the seek target having decoding parameters different from the part of the stream decoded before the seek. The sequence must be handled as per normal decoder operation.h](hA seek may result in the }(hj26hhhNhNubj)}(h`Dynamic Resolution Change`h]hDynamic Resolution Change}(hj:6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj26ubh sequence being initiated, due to the seek target having decoding parameters different from the part of the stream decoded before the seek. The sequence must be handled as per normal decoder operation.}(hj26hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhj.6ubah}(h]h ]h"]h$]h&]uh1jhj3hhhhhNubj)}(hX5It is not specified when the ``CAPTURE`` queue starts producing buffers containing decoded data from the ``OUTPUT`` buffers queued after the seek, as it operates independently from the ``OUTPUT`` queue. The decoder may return a number of remaining ``CAPTURE`` buffers containing decoded frames originating from the ``OUTPUT`` buffers queued before the seek sequence is performed. The ``VIDIOC_STREAMOFF`` operation discards any remaining queued ``OUTPUT`` buffers, which means that not all of the ``OUTPUT`` buffers queued before the seek sequence may have matching ``CAPTURE`` buffers produced. For example, given the sequence of operations on the ``OUTPUT`` queue: QBUF(A), QBUF(B), STREAMOFF(), STREAMON(), QBUF(G), QBUF(H), any of the following results on the ``CAPTURE`` queue is allowed: {A', B', G', H'}, {A', G', H'}, {G', H'}. To determine the CAPTURE buffer containing the first decoded frame after the seek, the client may observe the timestamps to match the CAPTURE and OUTPUT buffers or use V4L2_DEC_CMD_STOP and V4L2_DEC_CMD_START to drain the decoder.h](h)}(hIt is not specified when the ``CAPTURE`` queue starts producing buffers containing decoded data from the ``OUTPUT`` buffers queued after the seek, as it operates independently from the ``OUTPUT`` queue.h](hIt is not specified when the }(hj\6hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjd6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\6ubhA queue starts producing buffers containing decoded data from the }(hj\6hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjv6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\6ubhF buffers queued after the seek, as it operates independently from the }(hj\6hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\6ubh queue.}(hj\6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjX6ubh)}(hThe decoder may return a number of remaining ``CAPTURE`` buffers containing decoded frames originating from the ``OUTPUT`` buffers queued before the seek sequence is performed.h](h-The decoder may return a number of remaining }(hj6hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh8 buffers containing decoded frames originating from the }(hj6hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh6 buffers queued before the seek sequence is performed.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMwhjX6ubh)}(hXThe ``VIDIOC_STREAMOFF`` operation discards any remaining queued ``OUTPUT`` buffers, which means that not all of the ``OUTPUT`` buffers queued before the seek sequence may have matching ``CAPTURE`` buffers produced. For example, given the sequence of operations on the ``OUTPUT`` queue:h](hThe }(hj6hhhNhNubj)}(h``VIDIOC_STREAMOFF``h]hVIDIOC_STREAMOFF}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh) operation discards any remaining queued }(hj6hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh* buffers, which means that not all of the }(hj6hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh; buffers queued before the seek sequence may have matching }(hj6hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubhI buffers produced. For example, given the sequence of operations on the }(hj6hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj"7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh queue:}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM{hjX6ubj )}(h=QBUF(A), QBUF(B), STREAMOFF(), STREAMON(), QBUF(G), QBUF(H), h]h)}(h7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:7ubah}(h]h ]h"]h$]h&]uh1j hhhMhjX6ubh)}(hAany of the following results on the ``CAPTURE`` queue is allowed:h](h$any of the following results on the }(hjR7hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjZ7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR7ubh queue is allowed:}(hjR7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjX6ubj )}(h*{A', B', G', H'}, {A', G', H'}, {G', H'}. h]h)}(h){A', B', G', H'}, {A', G', H'}, {G', H'}.h]h;{A’, B’, G’, H’}, {A’, G’, H’}, {G’, H’}.}(hjv7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjr7ubah}(h]h ]h"]h$]h&]uh1j hhhMhjX6ubh)}(hTo determine the CAPTURE buffer containing the first decoded frame after the seek, the client may observe the timestamps to match the CAPTURE and OUTPUT buffers or use V4L2_DEC_CMD_STOP and V4L2_DEC_CMD_START to drain the decoder.h]hTo determine the CAPTURE buffer containing the first decoded frame after the seek, the client may observe the timestamps to match the CAPTURE and OUTPUT buffers or use V4L2_DEC_CMD_STOP and V4L2_DEC_CMD_START to drain the decoder.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjX6ubeh}(h]h ]h"]h$]h&]uh1jhj3hhhhhNubj)}(hTo achieve instantaneous seek, the client may restart streaming on the ``CAPTURE`` queue too to discard decoded, but not yet dequeued buffers.h]h)}(hTo achieve instantaneous seek, the client may restart streaming on the ``CAPTURE`` queue too to discard decoded, but not yet dequeued buffers.h](hGTo achieve instantaneous seek, the client may restart streaming on the }(hj7hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh< queue too to discard decoded, but not yet dequeued buffers.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jhj3hhhhhNubeh}(h]seekah ]h"]seekah$]h&]uh1hhhhhhhhM-ubh)}(hhh](h)}(hDynamic Resolution Changeh]hDynamic Resolution Change}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hhhhhMubh)}(hStreams that include resolution metadata in the bytestream may require switching to a different resolution during the decoding.h]hStreams that include resolution metadata in the bytestream may require switching to a different resolution during the decoding.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7hhubj)}(hNot all decoders can detect resolution changes. Those that do set the ``V4L2_FMT_FLAG_DYN_RESOLUTION`` flag for the coded format when :c:func:`VIDIOC_ENUM_FMT` is called.h]h)}(hNot all decoders can detect resolution changes. Those that do set the ``V4L2_FMT_FLAG_DYN_RESOLUTION`` flag for the coded format when :c:func:`VIDIOC_ENUM_FMT` is called.h](hFNot all decoders can detect resolution changes. Those that do set the }(hj7hhhNhNubj)}(h ``V4L2_FMT_FLAG_DYN_RESOLUTION``h]hV4L2_FMT_FLAG_DYN_RESOLUTION}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh flag for the coded format when }(hj7hhhNhNubh)}(h:c:func:`VIDIOC_ENUM_FMT`h]j)}(hj8h]hVIDIOC_ENUM_FMT()}(hj8hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj 8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_ENUM_FMTuh1hhhhMhj7ubh is called.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jhj7hhhhhNubh)}(hThe sequence starts when the decoder detects a coded frame with one or more of the following parameters different from those previously established (and reflected by corresponding queries):h]hThe sequence starts when the decoder detects a coded frame with one or more of the following parameters different from those previously established (and reflected by corresponding queries):}(hj<8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7hhubj )}(hhh](j )}(h0coded resolution (``OUTPUT`` width and height), h]h)}(h/coded resolution (``OUTPUT`` width and height),h](hcoded resolution (}(hjQ8hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjY8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ8ubh width and height),}(hjQ8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjM8ubah}(h]h ]h"]h$]h&]uh1j hjJ8hhhhhNubj )}(h+visible resolution (selection rectangles), h]h)}(h*visible resolution (selection rectangles),h]h*visible resolution (selection rectangles),}(hj{8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw8ubah}(h]h ]h"]h$]h&]uh1j hjJ8hhhhhNubj )}(h3the minimum number of buffers needed for decoding, h]h)}(h2the minimum number of buffers needed for decoding,h]h2the minimum number of buffers needed for decoding,}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1j hjJ8hhhhhNubj )}(h-bit-depth of the bitstream has been changed. h]h)}(h,bit-depth of the bitstream has been changed.h]h,bit-depth of the bitstream has been changed.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1j hjJ8hhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhj7hhubh)}(h;Whenever that happens, the decoder must proceed as follows:h]h;Whenever that happens, the decoder must proceed as follows:}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7hhubj)}(hhh](j )}(hXAfter encountering a resolution change in the stream, the decoder sends a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION``. .. important:: Any client query issued after the decoder queues the event will return values applying to the stream after the resolution change, including queue formats, selection rectangles and controls. h](h)}(hAfter encountering a resolution change in the stream, the decoder sends a ``V4L2_EVENT_SOURCE_CHANGE`` event with ``changes`` set to ``V4L2_EVENT_SRC_CH_RESOLUTION``.h](hJAfter encountering a resolution change in the stream, the decoder sends a }(hj8hhhNhNubj)}(h``V4L2_EVENT_SOURCE_CHANGE``h]hV4L2_EVENT_SOURCE_CHANGE}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh event with }(hj8hhhNhNubj)}(h ``changes``h]hchanges}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh set to }(hj8hhhNhNubj)}(h ``V4L2_EVENT_SRC_CH_RESOLUTION``h]hV4L2_EVENT_SRC_CH_RESOLUTION}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj8ubj)}(hAny client query issued after the decoder queues the event will return values applying to the stream after the resolution change, including queue formats, selection rectangles and controls.h]h)}(hAny client query issued after the decoder queues the event will return values applying to the stream after the resolution change, including queue formats, selection rectangles and controls.h]hAny client query issued after the decoder queues the event will return values applying to the stream after the resolution change, including queue formats, selection rectangles and controls.}(hj"9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hhhNhNubj )}(hXfThe decoder will then process and decode all remaining buffers from before the resolution change point. * The last buffer from before the change must be marked with the ``V4L2_BUF_FLAG_LAST`` flag, similarly to the `Drain` sequence above. .. warning:: The last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame. .. note:: Any attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`. h](h)}(hgThe decoder will then process and decode all remaining buffers from before the resolution change point.h]hgThe decoder will then process and decode all remaining buffers from before the resolution change point.}(hj@9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<9ubj )}(hhh]j )}(hThe last buffer from before the change must be marked with the ``V4L2_BUF_FLAG_LAST`` flag, similarly to the `Drain` sequence above. h]h)}(hThe last buffer from before the change must be marked with the ``V4L2_BUF_FLAG_LAST`` flag, similarly to the `Drain` sequence above.h](h?The last buffer from before the change must be marked with the }(hjU9hhhNhNubj)}(h``V4L2_BUF_FLAG_LAST``h]hV4L2_BUF_FLAG_LAST}(hj]9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU9ubh flag, similarly to the }(hjU9hhhNhNubj)}(h`Drain`h]hDrain}(hjo9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU9ubh sequence above.}(hjU9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjQ9ubah}(h]h ]h"]h$]h&]uh1j hjN9ubah}(h]h ]h"]h$]h&]j j uh1j hhhMhj<9ubj)}(hThe last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame.h]h)}(hThe last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame.h](h#The last buffer may be empty (with }(hj9hhhNhNubh)}(h:c:type:`v4l2_buffer`h]j)}(hj9h]h v4l2_buffer}(hj9hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj v4l2_bufferuh1hhhhMhj9ubh }(hj9hhhNhNubj)}(h ``bytesused``h]h bytesused}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jhj<9ubj)}(hAny attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`.h]h)}(hAny attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`.h](hAny attempt to dequeue more }(hj9hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh' buffers beyond the buffer marked with }(hj9hhhNhNubj)}(h``V4L2_BUF_FLAG_LAST``h]hV4L2_BUF_FLAG_LAST}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh$ will result in a -EPIPE error from }(hj9hhhNhNubh)}(h:c:func:`VIDIOC_DQBUF`h]j)}(hj:h]hVIDIOC_DQBUF()}(hj:hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_DQBUFuh1hhhhMhj9ubh.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jhj<9ubeh}(h]h ]h"]h$]h&]uh1j hj8hhhNhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj7hhhhhMubh)}(hZThe client must continue the sequence as described below to continue the decoding process.h]hZThe client must continue the sequence as described below to continue the decoding process.}(hjK:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7hhubj)}(hhh](j )}(hXDequeue the source change event. .. important:: A source change triggers an implicit decoder drain, similar to the explicit `Drain` sequence. The decoder is stopped after it completes. The decoding process must be resumed with either a pair of calls to :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue, or a call to :c:func:`VIDIOC_DECODER_CMD` with the ``V4L2_DEC_CMD_START`` command. h](h)}(h Dequeue the source change event.h]h Dequeue the source change event.}(hj`:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\:ubj)}(hXrA source change triggers an implicit decoder drain, similar to the explicit `Drain` sequence. The decoder is stopped after it completes. The decoding process must be resumed with either a pair of calls to :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue, or a call to :c:func:`VIDIOC_DECODER_CMD` with the ``V4L2_DEC_CMD_START`` command.h]h)}(hXrA source change triggers an implicit decoder drain, similar to the explicit `Drain` sequence. The decoder is stopped after it completes. The decoding process must be resumed with either a pair of calls to :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue, or a call to :c:func:`VIDIOC_DECODER_CMD` with the ``V4L2_DEC_CMD_START`` command.h](hLA source change triggers an implicit decoder drain, similar to the explicit }(hjr:hhhNhNubj)}(h`Drain`h]hDrain}(hjz:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr:ubhz sequence. The decoder is stopped after it completes. The decoding process must be resumed with either a pair of calls to }(hjr:hhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hj:h]hVIDIOC_STREAMOFF()}(hj:hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhMhjr:ubh and }(hjr:hhhNhNubh)}(h:c:func:`VIDIOC_STREAMON`h]j)}(hj:h]hVIDIOC_STREAMON()}(hj:hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMONuh1hhhhMhjr:ubh on the }(hjr:hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr:ubh queue, or a call to }(hjr:hhhNhNubh)}(h:c:func:`VIDIOC_DECODER_CMD`h]j)}(hj:h]hVIDIOC_DECODER_CMD()}(hj:hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_DECODER_CMDuh1hhhhMhjr:ubh with the }(hjr:hhhNhNubj)}(h``V4L2_DEC_CMD_START``h]hV4L2_DEC_CMD_START}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr:ubh command.}(hjr:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjn:ubah}(h]h ]h"]h$]h&]uh1jhj\:ubeh}(h]h ]h"]h$]h&]uh1j hjY:hhhNhNubj )}(h,Continue with the `Capture Setup` sequence. h]h)}(h+Continue with the `Capture Setup` sequence.h](hContinue with the }(hj/;hhhNhNubj)}(h`Capture Setup`h]h Capture Setup}(hj7;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/;ubh sequence.}(hj/;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj+;ubah}(h]h ]h"]h$]h&]uh1j hjY:hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj7hhhhhMubj)}(hXDuring the resolution change sequence, the ``OUTPUT`` queue must remain streaming. Calling :c:func:`VIDIOC_STREAMOFF` on the ``OUTPUT`` queue would abort the sequence and initiate a seek. In principle, the ``OUTPUT`` queue operates separately from the ``CAPTURE`` queue and this remains true for the duration of the entire resolution change sequence as well. The client should, for best performance and simplicity, keep queuing/dequeuing buffers to/from the ``OUTPUT`` queue even while processing this sequence.h](h)}(hDuring the resolution change sequence, the ``OUTPUT`` queue must remain streaming. Calling :c:func:`VIDIOC_STREAMOFF` on the ``OUTPUT`` queue would abort the sequence and initiate a seek.h](h+During the resolution change sequence, the }(hj_;hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjg;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_;ubh& queue must remain streaming. Calling }(hj_;hhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hj{;h]hVIDIOC_STREAMOFF()}(hj};hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjy;ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhMhj_;ubh on the }(hj_;hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_;ubh4 queue would abort the sequence and initiate a seek.}(hj_;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj[;ubh)}(hIn principle, the ``OUTPUT`` queue operates separately from the ``CAPTURE`` queue and this remains true for the duration of the entire resolution change sequence as well.h](hIn principle, the }(hj;hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh$ queue operates separately from the }(hj;hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh_ queue and this remains true for the duration of the entire resolution change sequence as well.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj[;ubh)}(hThe client should, for best performance and simplicity, keep queuing/dequeuing buffers to/from the ``OUTPUT`` queue even while processing this sequence.h](hcThe client should, for best performance and simplicity, keep queuing/dequeuing buffers to/from the }(hj;hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh+ queue even while processing this sequence.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj[;ubeh}(h]h ]h"]h$]h&]uh1jhj7hhhhhNubeh}(h]dynamic-resolution-changeah ]h"]dynamic resolution changeah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hDrainh]hDrain}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hhhhhMubh)}(hXATo ensure that all queued ``OUTPUT`` buffers have been processed and related ``CAPTURE`` buffers are given to the client, the client must follow the drain sequence described below. After the drain sequence ends, the client has received all decoded frames for all ``OUTPUT`` buffers queued before the sequence was started.h](hTo ensure that all queued }(hj%<hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj-<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%<ubh) buffers have been processed and related }(hj%<hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj?<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%<ubh buffers are given to the client, the client must follow the drain sequence described below. After the drain sequence ends, the client has received all decoded frames for all }(hj%<hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjQ<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%<ubh0 buffers queued before the sequence was started.}(hj%<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj)}(hhh](j )}(hX%Begin drain by issuing :c:func:`VIDIOC_DECODER_CMD`. * **Required fields:** ``cmd`` set to ``V4L2_DEC_CMD_STOP``. ``flags`` set to 0. ``pts`` set to 0. .. warning:: The sequence can be only initiated if both ``OUTPUT`` and ``CAPTURE`` queues are streaming. For compatibility reasons, the call to :c:func:`VIDIOC_DECODER_CMD` will not fail even if any of the queues is not streaming, but at the same time it will not initiate the `Drain` sequence and so the steps described below would not be applicable. h](h)}(h4Begin drain by issuing :c:func:`VIDIOC_DECODER_CMD`.h](hBegin drain by issuing }(hjp<hhhNhNubh)}(h:c:func:`VIDIOC_DECODER_CMD`h]j)}(hjz<h]hVIDIOC_DECODER_CMD()}(hj|<hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjx<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_DECODER_CMDuh1hhhhMhjp<ubh.}(hjp<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjl<ubj )}(hhh]j )}(hp**Required fields:** ``cmd`` set to ``V4L2_DEC_CMD_STOP``. ``flags`` set to 0. ``pts`` set to 0. h](h)}(h**Required fields:**h]j )}(hj<h]hRequired fields:}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubj)}(hhh](j)}(h&``cmd`` set to ``V4L2_DEC_CMD_STOP``. h](j)}(h``cmd``h]j)}(hj<h]hcmd}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1jhhhMhj<ubj)}(hhh]h)}(hset to ``V4L2_DEC_CMD_STOP``.h](hset to }(hj<hhhNhNubj)}(h``V4L2_DEC_CMD_STOP``h]hV4L2_DEC_CMD_STOP}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<ubj)}(h``flags`` set to 0. h](j)}(h ``flags``h]j)}(hj=h]hflags}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1jhhhMhj =ubj)}(hhh]h)}(h set to 0.h]h set to 0.}(hj*=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'=ubah}(h]h ]h"]h$]h&]uh1jhj =ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<ubj)}(h``pts`` set to 0. h](j)}(h``pts``h]j)}(hjJ=h]hpts}(hjL=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH=ubah}(h]h ]h"]h$]h&]uh1jhhhMhjD=ubj)}(hhh]h)}(h set to 0.h]h set to 0.}(hjb=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_=ubah}(h]h ]h"]h$]h&]uh1jhjD=ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj<ubeh}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]j j uh1j hhhMhjl<ubj)}(hXRThe sequence can be only initiated if both ``OUTPUT`` and ``CAPTURE`` queues are streaming. For compatibility reasons, the call to :c:func:`VIDIOC_DECODER_CMD` will not fail even if any of the queues is not streaming, but at the same time it will not initiate the `Drain` sequence and so the steps described below would not be applicable.h]h)}(hXRThe sequence can be only initiated if both ``OUTPUT`` and ``CAPTURE`` queues are streaming. For compatibility reasons, the call to :c:func:`VIDIOC_DECODER_CMD` will not fail even if any of the queues is not streaming, but at the same time it will not initiate the `Drain` sequence and so the steps described below would not be applicable.h](h+The sequence can be only initiated if both }(hj=hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh and }(hj=hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh> queues are streaming. For compatibility reasons, the call to }(hj=hhhNhNubh)}(h:c:func:`VIDIOC_DECODER_CMD`h]j)}(hj=h]hVIDIOC_DECODER_CMD()}(hj=hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_DECODER_CMDuh1hhhhMhj=ubhi will not fail even if any of the queues is not streaming, but at the same time it will not initiate the }(hj=hhhNhNubj)}(h`Drain`h]hDrain}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhC sequence and so the steps described below would not be applicable.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1jhjl<ubeh}(h]h ]h"]h$]h&]uh1j hji<hhhNhNubj )}(hXAny ``OUTPUT`` buffers queued by the client before the :c:func:`VIDIOC_DECODER_CMD` was issued will be processed and decoded as normal. The client must continue to handle both queues independently, similarly to normal decode operation. This includes: * handling any operations triggered as a result of processing those buffers, such as the `Dynamic Resolution Change` sequence, before continuing with the drain sequence, * queuing and dequeuing ``CAPTURE`` buffers, until a buffer marked with the ``V4L2_BUF_FLAG_LAST`` flag is dequeued, .. warning:: The last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame. .. note:: Any attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`. * dequeuing processed ``OUTPUT`` buffers, until all the buffers queued before the ``V4L2_DEC_CMD_STOP`` command are dequeued, * dequeuing the ``V4L2_EVENT_EOS`` event, if the client subscribed to it. .. note:: For backwards compatibility, the decoder will signal a ``V4L2_EVENT_EOS`` event when the last frame has been decoded and all frames are ready to be dequeued. It is a deprecated behavior and the client must not rely on it. The ``V4L2_BUF_FLAG_LAST`` buffer flag should be used instead. h](h)}(hAny ``OUTPUT`` buffers queued by the client before the :c:func:`VIDIOC_DECODER_CMD` was issued will be processed and decoded as normal. The client must continue to handle both queues independently, similarly to normal decode operation. This includes:h](hAny }(hj >hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj >ubh) buffers queued by the client before the }(hj >hhhNhNubh)}(h:c:func:`VIDIOC_DECODER_CMD`h]j)}(hj%>h]hVIDIOC_DECODER_CMD()}(hj'>hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj#>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_DECODER_CMDuh1hhhhMhj >ubh was issued will be processed and decoded as normal. The client must continue to handle both queues independently, similarly to normal decode operation. This includes:}(hj >hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj>ubj )}(hhh](j )}(hhandling any operations triggered as a result of processing those buffers, such as the `Dynamic Resolution Change` sequence, before continuing with the drain sequence, h]h)}(hhandling any operations triggered as a result of processing those buffers, such as the `Dynamic Resolution Change` sequence, before continuing with the drain sequence,h](hWhandling any operations triggered as a result of processing those buffers, such as the }(hjS>hhhNhNubj)}(h`Dynamic Resolution Change`h]hDynamic Resolution Change}(hj[>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS>ubh5 sequence, before continuing with the drain sequence,}(hjS>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjO>ubah}(h]h ]h"]h$]h&]uh1j hjL>ubj )}(hXqueuing and dequeuing ``CAPTURE`` buffers, until a buffer marked with the ``V4L2_BUF_FLAG_LAST`` flag is dequeued, .. warning:: The last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame. .. note:: Any attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`. h](h)}(hrqueuing and dequeuing ``CAPTURE`` buffers, until a buffer marked with the ``V4L2_BUF_FLAG_LAST`` flag is dequeued,h](hqueuing and dequeuing }(hj}>hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}>ubh) buffers, until a buffer marked with the }(hj}>hhhNhNubj)}(h``V4L2_BUF_FLAG_LAST``h]hV4L2_BUF_FLAG_LAST}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}>ubh flag is dequeued,}(hj}>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjy>ubj)}(hThe last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame.h]h)}(hThe last buffer may be empty (with :c:type:`v4l2_buffer` ``bytesused`` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame.h](h#The last buffer may be empty (with }(hj>hhhNhNubh)}(h:c:type:`v4l2_buffer`h]j)}(hj>h]h v4l2_buffer}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj v4l2_bufferuh1hhhhMhj>ubh }(hj>hhhNhNubj)}(h ``bytesused``h]h bytesused}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh` = 0) and in that case it must be ignored by the client, as it does not contain a decoded frame.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhjy>ubj)}(hAny attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`.h]h)}(hAny attempt to dequeue more ``CAPTURE`` buffers beyond the buffer marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from :c:func:`VIDIOC_DQBUF`.h](hAny attempt to dequeue more }(hj?hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh' buffers beyond the buffer marked with }(hj?hhhNhNubj)}(h``V4L2_BUF_FLAG_LAST``h]hV4L2_BUF_FLAG_LAST}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh$ will result in a -EPIPE error from }(hj?hhhNhNubh)}(h:c:func:`VIDIOC_DQBUF`h]j)}(hj.?h]hVIDIOC_DQBUF()}(hj0?hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj,?ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnj VIDIOC_DQBUFuh1hhhhMhj?ubh.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhjy>ubeh}(h]h ]h"]h$]h&]uh1j hjL>ubj )}(h|dequeuing processed ``OUTPUT`` buffers, until all the buffers queued before the ``V4L2_DEC_CMD_STOP`` command are dequeued, h]h)}(h{dequeuing processed ``OUTPUT`` buffers, until all the buffers queued before the ``V4L2_DEC_CMD_STOP`` command are dequeued,h](hdequeuing processed }(hje?hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjm?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje?ubh2 buffers, until all the buffers queued before the }(hje?hhhNhNubj)}(h``V4L2_DEC_CMD_STOP``h]hV4L2_DEC_CMD_STOP}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje?ubh command are dequeued,}(hje?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhja?ubah}(h]h ]h"]h$]h&]uh1j hjL>ubj )}(hHdequeuing the ``V4L2_EVENT_EOS`` event, if the client subscribed to it. h]h)}(hGdequeuing the ``V4L2_EVENT_EOS`` event, if the client subscribed to it.h](hdequeuing the }(hj?hhhNhNubj)}(h``V4L2_EVENT_EOS``h]hV4L2_EVENT_EOS}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh' event, if the client subscribed to it.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1j hjL>ubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhj>ubj)}(hXFor backwards compatibility, the decoder will signal a ``V4L2_EVENT_EOS`` event when the last frame has been decoded and all frames are ready to be dequeued. It is a deprecated behavior and the client must not rely on it. The ``V4L2_BUF_FLAG_LAST`` buffer flag should be used instead.h]h)}(hXFor backwards compatibility, the decoder will signal a ``V4L2_EVENT_EOS`` event when the last frame has been decoded and all frames are ready to be dequeued. It is a deprecated behavior and the client must not rely on it. The ``V4L2_BUF_FLAG_LAST`` buffer flag should be used instead.h](h7For backwards compatibility, the decoder will signal a }(hj?hhhNhNubj)}(h``V4L2_EVENT_EOS``h]hV4L2_EVENT_EOS}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh event when the last frame has been decoded and all frames are ready to be dequeued. It is a deprecated behavior and the client must not rely on it. The }(hj?hhhNhNubj)}(h``V4L2_BUF_FLAG_LAST``h]hV4L2_BUF_FLAG_LAST}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh$ buffer flag should be used instead.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hj?ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1j hji<hhhNhNubj )}(hX]Once all the ``OUTPUT`` buffers queued before the ``V4L2_DEC_CMD_STOP`` call are dequeued and the last ``CAPTURE`` buffer is dequeued, the decoder is stopped and it will accept, but not process, any newly queued ``OUTPUT`` buffers until the client issues any of the following operations: * ``V4L2_DEC_CMD_START`` - the decoder will not be reset and will resume operation normally, with all the state from before the drain, * a pair of :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue - the decoder will resume the operation normally, however any ``CAPTURE`` buffers still in the queue will be returned to the client, * a pair of :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``OUTPUT`` queue - any pending source buffers will be returned to the client and the `Seek` sequence will be triggered. h](h)}(hXOnce all the ``OUTPUT`` buffers queued before the ``V4L2_DEC_CMD_STOP`` call are dequeued and the last ``CAPTURE`` buffer is dequeued, the decoder is stopped and it will accept, but not process, any newly queued ``OUTPUT`` buffers until the client issues any of the following operations:h](h Once all the }(hj@hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh buffers queued before the }(hj@hhhNhNubj)}(h``V4L2_DEC_CMD_STOP``h]hV4L2_DEC_CMD_STOP}(hj-@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh call are dequeued and the last }(hj@hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj?@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubhb buffer is dequeued, the decoder is stopped and it will accept, but not process, any newly queued }(hj@hhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjQ@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubhA buffers until the client issues any of the following operations:}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM&hj@ubj )}(hhh](j )}(h``V4L2_DEC_CMD_START`` - the decoder will not be reset and will resume operation normally, with all the state from before the drain, h]h)}(h``V4L2_DEC_CMD_START`` - the decoder will not be reset and will resume operation normally, with all the state from before the drain,h](j)}(h``V4L2_DEC_CMD_START``h]hV4L2_DEC_CMD_START}(hjt@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp@ubhn - the decoder will not be reset and will resume operation normally, with all the state from before the drain,}(hjp@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM+hjl@ubah}(h]h ]h"]h$]h&]uh1j hji@ubj )}(ha pair of :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue - the decoder will resume the operation normally, however any ``CAPTURE`` buffers still in the queue will be returned to the client, h]h)}(ha pair of :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue - the decoder will resume the operation normally, however any ``CAPTURE`` buffers still in the queue will be returned to the client,h](h a pair of }(hj@hhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hj@h]hVIDIOC_STREAMOFF()}(hj@hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhM.hj@ubh and }(hj@hhhNhNubh)}(h:c:func:`VIDIOC_STREAMON`h]j)}(hj@h]hVIDIOC_STREAMON()}(hj@hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMONuh1hhhhM.hj@ubh on the }(hj@hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubhE queue - the decoder will resume the operation normally, however any }(hj@hhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh; buffers still in the queue will be returned to the client,}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hj@ubah}(h]h ]h"]h$]h&]uh1j hji@ubj )}(ha pair of :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``OUTPUT`` queue - any pending source buffers will be returned to the client and the `Seek` sequence will be triggered. h]h)}(ha pair of :c:func:`VIDIOC_STREAMOFF` and :c:func:`VIDIOC_STREAMON` on the ``OUTPUT`` queue - any pending source buffers will be returned to the client and the `Seek` sequence will be triggered.h](h a pair of }(hjAhhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hj"Ah]hVIDIOC_STREAMOFF()}(hj$AhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj Aubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhM3hjAubh and }(hjAhhhNhNubh)}(h:c:func:`VIDIOC_STREAMON`h]j)}(hjEAh]hVIDIOC_STREAMON()}(hjGAhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjCAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMONuh1hhhhM3hjAubh on the }(hjAhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjfAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubhK queue - any pending source buffers will be returned to the client and the }(hjAhhhNhNubj)}(h`Seek`h]hSeek}(hjxAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh sequence will be triggered.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM3hjAubah}(h]h ]h"]h$]h&]uh1j hji@ubeh}(h]h ]h"]h$]h&]j j uh1j hhhM+hj@ubeh}(h]h ]h"]h$]h&]uh1j hji<hhhNhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jhj<hhhhhMubj)}(hXOnce the drain sequence is initiated, the client needs to drive it to completion, as described by the steps above, unless it aborts the process by issuing :c:func:`VIDIOC_STREAMOFF` on any of the ``OUTPUT`` or ``CAPTURE`` queues. The client is not allowed to issue ``V4L2_DEC_CMD_START`` or ``V4L2_DEC_CMD_STOP`` again while the drain sequence is in progress and they will fail with -EBUSY error code if attempted. Although not mandatory, the availability of decoder commands may be queried using :c:func:`VIDIOC_TRY_DECODER_CMD`.h](h)}(hXOnce the drain sequence is initiated, the client needs to drive it to completion, as described by the steps above, unless it aborts the process by issuing :c:func:`VIDIOC_STREAMOFF` on any of the ``OUTPUT`` or ``CAPTURE`` queues. The client is not allowed to issue ``V4L2_DEC_CMD_START`` or ``V4L2_DEC_CMD_STOP`` again while the drain sequence is in progress and they will fail with -EBUSY error code if attempted.h](hOnce the drain sequence is initiated, the client needs to drive it to completion, as described by the steps above, unless it aborts the process by issuing }(hjAhhhNhNubh)}(h:c:func:`VIDIOC_STREAMOFF`h]j)}(hjAh]hVIDIOC_STREAMOFF()}(hjAhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_STREAMOFFuh1hhhhM9hjAubh on any of the }(hjAhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh or }(hjAhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh- queues. The client is not allowed to issue }(hjAhhhNhNubj)}(h``V4L2_DEC_CMD_START``h]hV4L2_DEC_CMD_START}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh or }(hjA3hhhNhNubj)}(h``V4L2_DEC_CMD_STOP``h]hV4L2_DEC_CMD_STOP}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubhf again while the drain sequence is in progress and they will fail with -EBUSY error code if attempted.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM9hjAubh)}(hsAlthough not mandatory, the availability of decoder commands may be queried using :c:func:`VIDIOC_TRY_DECODER_CMD`.h](hRAlthough not mandatory, the availability of decoder commands may be queried using }(hj%BhhhNhNubh)}(h :c:func:`VIDIOC_TRY_DECODER_CMD`h]j)}(hj/Bh]hVIDIOC_TRY_DECODER_CMD()}(hj1BhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhj-Bubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_TRY_DECODER_CMDuh1hhhhM@hj%Bubh.}(hj%BhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM@hjAubeh}(h]h ]h"]h$]h&]uh1jhj<hhhhhNubeh}(h]drainah ]h"]drainah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h End of Streamh]h End of Stream}(hjgBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdBhhhhhMDubh)}(hIf the decoder encounters an end of stream marking in the stream, the decoder will initiate the `Drain` sequence, which the client must handle as described above, skipping the initial :c:func:`VIDIOC_DECODER_CMD`.h](h`If the decoder encounters an end of stream marking in the stream, the decoder will initiate the }(hjuBhhhNhNubj)}(h`Drain`h]hDrain}(hj}BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuBubhQ sequence, which the client must handle as described above, skipping the initial }(hjuBhhhNhNubh)}(h:c:func:`VIDIOC_DECODER_CMD`h]j)}(hjBh]hVIDIOC_DECODER_CMD()}(hjBhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypefunc refexplicitrefwarnjVIDIOC_DECODER_CMDuh1hhhhMFhjuBubh.}(hjuBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMFhjdBhhubeh}(h] end-of-streamah ]h"] end of streamah$]h&]uh1hhhhhhhhMDubh)}(hhh](h)}(h Commit Pointsh]h Commit Points}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhMKubh)}(hVSetting formats and allocating buffers trigger changes in the behavior of the decoder.h]hVSetting formats and allocating buffers trigger changes in the behavior of the decoder.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjBhhubj)}(hhh](j )}(hX Setting the format on the ``OUTPUT`` queue may change the set of formats supported/advertised on the ``CAPTURE`` queue. In particular, it also means that the ``CAPTURE`` format may be reset and the client must not rely on the previously set format being preserved. h]h)}(hXSetting the format on the ``OUTPUT`` queue may change the set of formats supported/advertised on the ``CAPTURE`` queue. In particular, it also means that the ``CAPTURE`` format may be reset and the client must not rely on the previously set format being preserved.h](hSetting the format on the }(hjBhhhNhNubj)}(h ``OUTPUT``h]hOUTPUT}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubhA queue may change the set of formats supported/advertised on the }(hjBhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh. queue. In particular, it also means that the }(hjBhhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh_ format may be reset and the client must not rely on the previously set format being preserved.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMPhjBubah}(h]h ]h"]h$]h&]uh1j hjBhhhhhNubj )}(hvEnumerating formats on the ``CAPTURE`` queue always returns only formats supported for the current ``OUTPUT`` format. h]h)}(huEnumerating formats on the ``CAPTURE`` queue always returns only formats supported for the current ``OUTPUT`` format.h](hEnumerating formats on the }(hj4ChhhNhNubj)}(h ``CAPTURE``h]hCAPTURE}(hjj,j,j2j2j7j7j<j<jaBj^BjBjBjDjDu nametypes}(jDjDjjNjjjP j; jAj,j2j7j<jaBjBjDuh}(hhjDhjhjKjEjjjjjM jj8 jS j>j> j,jDj2j-j7j3j<j7j^Bj<jBjdBjDjBjD j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jDKsRparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "5" (ordinal 5)h]h>Enumerated list start value not ordinal-1: “5” (ordinal 5)}(hjQEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNEubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jLEhjDhhhhhMubatransform_messages](jME)}(hhh]h)}(hhh]h-Hyperlink target "decoder" is not referenced.}hjoEsbah}(h]h ]h"]h$]h&]uh1hhjlEubah}(h]h ]h"]h$]h&]levelKtypejgEsourcehlineKuh1jLEubjME)}(hhh]h)}(hhh]h6Hyperlink target "decoder-glossary" is not referenced.}hjEsbah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]levelKtypejgEsourcehlineK,uh1jLEube transformerN include_log] decorationNhhub.