sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget8/translations/zh_CN/userspace-api/media/v4l/vidioc-g-fmtmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget8/translations/zh_TW/userspace-api/media/v4l/vidioc-g-fmtmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget8/translations/it_IT/userspace-api/media/v4l/vidioc-g-fmtmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget8/translations/ja_JP/userspace-api/media/v4l/vidioc-g-fmtmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget8/translations/ko_KR/userspace-api/media/v4l/vidioc-g-fmtmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget8/translations/sp_SP/userspace-api/media/v4l/vidioc-g-fmtmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhR/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/vidioc-g-fmt.rsthKubhtarget)}(h.. _VIDIOC_G_FMT:h]h}(h]h ]h"]h$]h&]refid vidioc-g-fmtuh1hhKhhhhhhubhsection)}(hhh](htitle)}(h0ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMTh]h0ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hWVIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a formath]hWVIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a format}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleV4L.VIDIOC_G_FMT (C macro)c.V4L.VIDIOC_G_FMThNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h VIDIOC_G_FMTh]hdesc_signature_line)}(h VIDIOC_G_FMTh]h desc_name)}(h VIDIOC_G_FMTh]h desc_sig_name)}(hj+h]h VIDIOC_G_FMT}(hj;hhhNhNubah}(h]h ]nah"]h$]h&]uh1j9hj5ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j3hj/hhhhhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhhhKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hhhKhj$hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jehj$hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjsobjtypejtdesctypejtnoindex noindexentrynocontentsentryuh1j"hhhjhNhNubh)}(h=``int ioctl(int fd, VIDIOC_G_FMT, struct v4l2_format *argp)``h]hliteral)}(hjh]h9int ioctl(int fd, VIDIOC_G_FMT, struct v4l2_format *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jV4L.VIDIOC_S_FMT (C macro)c.V4L.VIDIOC_S_FMThNtauh1jhjhhhNhNubj#)}(hhh](j()}(h VIDIOC_S_FMTh]j.)}(h VIDIOC_S_FMTh]j4)}(h VIDIOC_S_FMTh]j:)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKubah}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhjhhhhhKubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKubeh}(h]h ](jsmacroeh"]h$]h&]jxjsjyjjzjj{j|j}uh1j"hhhjhNhNubh)}(h=``int ioctl(int fd, VIDIOC_S_FMT, struct v4l2_format *argp)``h]j)}(hjh]h9int ioctl(int fd, VIDIOC_S_FMT, struct v4l2_format *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jV4L.VIDIOC_TRY_FMT (C macro)c.V4L.VIDIOC_TRY_FMThNtauh1jhjhhhNhNubj#)}(hhh](j()}(hVIDIOC_TRY_FMTh]j.)}(hVIDIOC_TRY_FMTh]j4)}(hVIDIOC_TRY_FMTh]j:)}(hj h]hVIDIOC_TRY_FMT}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKubah}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhj hhhhhKubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKubeh}(h]h ](jsmacroeh"]h$]h&]jxjsjyjBjzjBj{j|j}uh1j"hhhjhNhNubh)}(h?``int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)``h]j)}(hjHh]h;int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK"hj}ubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hjhhhNhNubh)}(h:c:func:`open()`h]j)}(hjh]hopen()}(hjhhhNhNubah}(h]h ](xrefjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc$userspace-api/media/v4l/vidioc-g-fmt refdomainjsreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)} identifierV4LsbNasb reftargetopenuh1hhhhK"hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1j{hhhK"hjxubj|)}(h2``argp`` Pointer to struct :c:type:`v4l2_format`. h](j)}(h``argp``h]j)}(hjh]hargp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK%hjubj)}(hhh]h)}(h(Pointer to struct :c:type:`v4l2_format`.h](hPointer to struct }(hj hhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhK%hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hhhK%hjxhhubeh}(h]h ]h"]h$]h&]uh1jvhjehhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhhhhhK(ubh)}(hxThese ioctls are used to negotiate the format of data (typically image format) exchanged between driver and application.h]hxThese ioctls are used to negotiate the format of data (typically image format) exchanged between driver and application.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjWhhubh)}(hXTo query the current parameters applications set the ``type`` field of a struct :c:type:`v4l2_format` to the respective buffer (stream) type. For example video capture devices use ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. When the application calls the :ref:`VIDIOC_G_FMT ` ioctl with a pointer to this structure the driver fills the respective member of the ``fmt`` union. In case of video capture devices that is either the struct :c:type:`v4l2_pix_format` ``pix`` or the struct :c:type:`v4l2_pix_format_mplane` ``pix_mp`` member. When the requested buffer type is not supported drivers return an ``EINVAL`` error code.h](h5To query the current parameters applications set the }(hjvhhhNhNubj)}(h``type``h]htype}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh field of a struct }(hjvhhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhK-hjvubhO to the respective buffer (stream) type. For example video capture devices use }(hjvhhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_CAPTURE``h]hV4L2_BUF_TYPE_VIDEO_CAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh or }(hjvhhhNhNubj)}(h&``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``h]h"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh!. When the application calls the }(hjvhhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]hinline)}(hjh]h VIDIOC_G_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK-hjvubhV ioctl with a pointer to this structure the driver fills the respective member of the }(hjvhhhNhNubj)}(h``fmt``h]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubhC union. In case of video capture devices that is either the struct }(hjvhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hjh]hv4l2_pix_format}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_pix_formatuh1hhhhK-hjvubh }(hjvhhhNhNubj)}(h``pix``h]hpix}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh or the struct }(hjvhhhNhNubh)}(h :c:type:`v4l2_pix_format_mplane`h]j)}(hjFh]hv4l2_pix_format_mplane}(hjHhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_pix_format_mplaneuh1hhhhK-hjvubh }hjvsbj)}(h ``pix_mp``h]hpix_mp}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubhK member. When the requested buffer type is not supported drivers return an }(hjvhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh error code.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK-hjWhhubh)}(hXTo change the current format parameters applications initialize the ``type`` field and all fields of the respective ``fmt`` union member. For details see the documentation of the various devices types in :ref:`devices`. Good practice is to query the current parameters first, and to modify only those parameters not suitable for the application. When the application calls the :ref:`VIDIOC_S_FMT ` ioctl with a pointer to a struct :c:type:`v4l2_format` structure the driver checks and adjusts the parameters against hardware abilities. Drivers should not return an error code unless the ``type`` field is invalid, this is a mechanism to fathom device capabilities and to approach parameters acceptable for both the application and driver. On success the driver may program the hardware, allocate resources and generally prepare for data exchange. Finally the :ref:`VIDIOC_S_FMT ` ioctl returns the current format parameters as :ref:`VIDIOC_G_FMT ` does. Very simple, inflexible devices may even ignore all input and always return the default parameters. However all V4L2 devices exchanging data with the application must implement the :ref:`VIDIOC_G_FMT ` and :ref:`VIDIOC_S_FMT ` ioctl. When the requested buffer type is not supported drivers return an EINVAL error code on a :ref:`VIDIOC_S_FMT ` attempt. When I/O is already in progress or the resource is not available for other reasons drivers return the ``EBUSY`` error code.h](hDTo change the current format parameters applications initialize the }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh( field and all fields of the respective }(hjhhhNhNubj)}(h``fmt``h]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhQ union member. For details see the documentation of the various devices types in }(hjhhhNhNubh)}(h:ref:`devices`h]j)}(hjh]hdevices}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjdevicesuh1hhhhK:hjubh. Good practice is to query the current parameters first, and to modify only those parameters not suitable for the application. When the application calls the }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubh" ioctl with a pointer to a struct }(hjhhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjh]h v4l2_format}(hj hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhK:hjubh structure the driver checks and adjusts the parameters against hardware abilities. Drivers should not return an error code unless the }(hjhhhNhNubj)}(h``type``h]htype}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX field is invalid, this is a mechanism to fathom device capabilities and to approach parameters acceptable for both the application and driver. On success the driver may program the hardware, allocate resources and generally prepare for data exchange. Finally the }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hj<h]h VIDIOC_S_FMT}(hj>hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjHreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubh0 ioctl returns the current format parameters as }(hjhhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]j)}(hj`h]h VIDIOC_G_FMT}(hjbhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]refdocj refdomainjlreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubh does. Very simple, inflexible devices may even ignore all input and always return the default parameters. However all V4L2 devices exchanging data with the application must implement the }(hjhhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]j)}(hjh]h VIDIOC_G_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubh and }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubha ioctl. When the requested buffer type is not supported drivers return an EINVAL error code on a }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubhp attempt. When I/O is already in progress or the resource is not available for other reasons drivers return the }(hjhhhNhNubj)}(h ``EBUSY``h]hEBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjWhhubh)}(hXThe :ref:`VIDIOC_TRY_FMT ` ioctl is equivalent to :ref:`VIDIOC_S_FMT ` with one exception: it does not change driver state. It can also be called at any time, never returning ``EBUSY``. This function is provided to negotiate parameters, to learn about hardware limitations, without disabling I/O or possibly time consuming hardware preparations. Although strongly recommended drivers are not required to implement this ioctl.h](hThe }(hjhhhNhNubh)}(h$:ref:`VIDIOC_TRY_FMT `h]j)}(hjh]hVIDIOC_TRY_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKPhjubh ioctl is equivalent to }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hj4h]h VIDIOC_S_FMT}(hj6hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainj@reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKPhjubhi with one exception: it does not change driver state. It can also be called at any time, never returning }(hjhhhNhNubj)}(h ``EBUSY``h]hEBUSY}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. This function is provided to negotiate parameters, to learn about hardware limitations, without disabling I/O or possibly time consuming hardware preparations. Although strongly recommended drivers are not required to implement this ioctl.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKPhjWhhubh)}(hThe format as returned by :ref:`VIDIOC_TRY_FMT ` must be identical to what :ref:`VIDIOC_S_FMT ` returns for the same input or output.h](hThe format as returned by }(hjnhhhNhNubh)}(h$:ref:`VIDIOC_TRY_FMT `h]j)}(hjxh]hVIDIOC_TRY_FMT}(hjzhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKWhjnubh must be identical to what }(hjnhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKWhjnubh& returns for the same input or output.}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjWhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jV4L.v4l2_format (C type)c.V4L.v4l2_formathNtauh1jhjWhhhNhNubj#)}(hhh](j()}(h v4l2_formath]j.)}(htype v4l2_formath](hdesc_sig_keyword)}(htypeh]htype}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhhhKZubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhhhKZubj4)}(h v4l2_formath]j:)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKZubeh}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhjhhhhhKZubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKZhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKZubeh}(h]h ](jstypeeh"]h$]h&]jxjsjyj.jzj.j{j|j}uh1j"hhhjWhNhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{7.4cm}|p{4.4cm}|p{5.5cm}|uh1j2hhhK\hjWhhubhtable)}(hhh](h)}(hstruct v4l2_formath]hstruct v4l2_format}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjAubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jWhjTubjX)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jWhjTubjX)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jWhjTubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1jhj~ubj)}(hhh]h)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKchjubah}(h]h ]h"]h$]h&]uh1jhj~ubj)}(hhh]h)}(h5Type of the data stream, see :c:type:`v4l2_buf_type`.h](hType of the data stream, see }(hjhhhNhNubh)}(h:c:type:`v4l2_buf_type`h]j)}(hjh]h v4l2_buf_type}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_buf_typeuh1hhhhKdhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(hunion {h]hunion {}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``fmt``h]j)}(hjh]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]morecolsKuh1jhjubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_pix_format`h](hstruct }(hjAhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hjKh]hv4l2_pix_format}(hjMhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_pix_formatuh1hhhhKghjAubeh}(h]h ]h"]h$]h&]uh1hhhhKghj>ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hhh]h)}(h``pix``h]j)}(hjyh]hpix}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1hhhhKhhjtubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hhh]h)}(h[Definition of an image format, see :ref:`pixfmt`, used by video capture and output devices.h](h#Definition of an image format, see }(hjhhhNhNubh)}(h :ref:`pixfmt`h]j)}(hjh]hpixfmt}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjpixfmtuh1hhhhKihjubh+, used by video capture and output devices.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h'struct :c:type:`v4l2_pix_format_mplane`h](hstruct }(hjhhhNhNubh)}(h :c:type:`v4l2_pix_format_mplane`h]j)}(hjh]hv4l2_pix_format_mplane}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_pix_format_mplaneuh1hhhhKkhjubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``pix_mp``h]j)}(hj h]hpix_mp}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKlhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hDefinition of an image format, see :ref:`pixfmt`, used by video capture and output devices that support the :ref:`multi-planar version of the API `.h](h#Definition of an image format, see }(hj1 hhhNhNubh)}(h :ref:`pixfmt`h]j)}(hj; h]hpixfmt}(hj= hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj9 ubah}(h]h ]h"]h$]h&]refdocj refdomainjG reftyperef refexplicitrefwarnjpixfmtuh1hhhhKmhj1 ubh<, used by video capture and output devices that support the }(hj1 hhhNhNubh)}(h4:ref:`multi-planar version of the API `h]j)}(hj_ h]hmulti-planar version of the API}(hja hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj] ubah}(h]h ]h"]h$]h&]refdocj refdomainjk reftyperef refexplicitrefwarnj planar-apisuh1hhhhKmhj1 ubh.}(hj1 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKmhj. ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(hstruct :c:type:`v4l2_window`h](hstruct }(hj hhhNhNubh)}(h:c:type:`v4l2_window`h]j)}(hj h]h v4l2_window}(hj hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_windowuh1hhhhKphj ubeh}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``win``h]j)}(hj h]hwin}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKqhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hSDefinition of an overlaid image, see :ref:`overlay`, used by video overlay devices.h](h%Definition of an overlaid image, see }(hj hhhNhNubh)}(h:ref:`overlay`h]j)}(hj h]hoverlay}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjoverlayuh1hhhhKrhj ubh , used by video overlay devices.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_vbi_format`h](hstruct }(hj3 hhhNhNubh)}(h:c:type:`v4l2_vbi_format`h]j)}(hj= h]hv4l2_vbi_format}(hj? hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj; ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_vbi_formatuh1hhhhKthj3 ubeh}(h]h ]h"]h$]h&]uh1hhhhKthj0 ubah}(h]h ]h"]h$]h&]uh1jhj- ubj)}(hhh]h)}(h``vbi``h]j)}(hjk h]hvbi}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jhji ubah}(h]h ]h"]h$]h&]uh1hhhhKuhjf ubah}(h]h ]h"]h$]h&]uh1jhj- ubj)}(hhh]h)}(hRaw VBI capture or output parameters. This is discussed in more detail in :ref:`raw-vbi`. Used by raw VBI capture and output devices.h](hJRaw VBI capture or output parameters. This is discussed in more detail in }(hj hhhNhNubh)}(h:ref:`raw-vbi`h]j)}(hj h]hraw-vbi}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjraw-vbiuh1hhhhKvhj ubh-. Used by raw VBI capture and output devices.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKvhj ubah}(h]h ]h"]h$]h&]uh1jhj- ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h'struct :c:type:`v4l2_sliced_vbi_format`h](hstruct }(hj hhhNhNubh)}(h :c:type:`v4l2_sliced_vbi_format`h]j)}(hj h]hv4l2_sliced_vbi_format}(hj hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_sliced_vbi_formatuh1hhhhKyhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKyhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h ``sliced``h]j)}(hj h]hsliced}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKzhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hvSliced VBI capture or output parameters. See :ref:`sliced` for details. Used by sliced VBI capture and output devices.h](h-Sliced VBI capture or output parameters. See }(hj# hhhNhNubh)}(h :ref:`sliced`h]j)}(hj- h]hsliced}(hj/ hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj+ ubah}(h]h ]h"]h$]h&]refdocj refdomainj9 reftyperef refexplicitrefwarnjsliceduh1hhhhK{hj# ubh< for details. Used by sliced VBI capture and output devices.}(hj# hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK{hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_sdr_format`h](hstruct }(hjg hhhNhNubh)}(h:c:type:`v4l2_sdr_format`h]j)}(hjq h]hv4l2_sdr_format}(hjs hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjo ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_sdr_formatuh1hhhhK}hjg ubeh}(h]h ]h"]h$]h&]uh1hhhhK}hjd ubah}(h]h ]h"]h$]h&]uh1jhja ubj)}(hhh]h)}(h``sdr``h]j)}(hj h]hsdr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhK~hj ubah}(h]h ]h"]h$]h&]uh1jhja ubj)}(hhh]h)}(hWDefinition of a data format, see :ref:`pixfmt`, used by SDR capture and output devices.h](h!Definition of a data format, see }(hj hhhNhNubh)}(h :ref:`pixfmt`h]j)}(hj h]hpixfmt}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjpixfmtuh1hhhhKhj ubh), used by SDR capture and output devices.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhja ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h!struct :c:type:`v4l2_meta_format`h](hstruct }(hj hhhNhNubh)}(h:c:type:`v4l2_meta_format`h]j)}(hj h]hv4l2_meta_format}(hj hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_meta_formatuh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``meta``h]j)}(hj9 h]hmeta}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7 ubah}(h]h ]h"]h$]h&]uh1hhhhKhj4 ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h[Definition of a metadata format, see :ref:`meta-formats`, used by metadata capture devices.h](h%Definition of a metadata format, see }(hjW hhhNhNubh)}(h:ref:`meta-formats`h]j)}(hja h]h meta-formats}(hjc hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj_ ubah}(h]h ]h"]h$]h&]refdocj refdomainjm reftyperef refexplicitrefwarnj meta-formatsuh1hhhhKhjW ubh#, used by metadata capture devices.}(hjW hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjT ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``raw_data``\ [200]h](j)}(h ``raw_data``h]hraw_data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh [200]}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h#Place holder for future extensions.h]h#Place holder for future extensions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j|hjyubj})}(hhh](j)}(hhh]h)}(h}h]h}}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]morecolsKuh1jhj ubeh}(h]h ]h"]h$]h&]uh1j|hjyubeh}(h]h ]h"]h$]h&]uh1jwhjTubeh}(h]h ]h"]h$]h&]colsKuh1jRhjAubeh}(h]id1ah ]h"]h$]h&]uh1j?hjWhhhNhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK(ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7 hhhhhKubh)}(hOn success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes ` chapter.h](h.On success 0 is returned, on error -1 and the }(hjH hhhNhNubj)}(h ``errno``h]herrno}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH ubhM variable is set appropriately. The generic error codes are described at the }(hjH hhhNhNubh)}(h':ref:`Generic Error Codes `h]j)}(hjd h]hGeneric Error Codes}(hjf hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjb ubah}(h]h ]h"]h$]h&]refdocj refdomainjp reftyperef refexplicitrefwarnj gen-errorsuh1hhhhKhjH ubh chapter.}(hjH hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj7 hhubjw)}(hhh](j|)}(hnEINVAL The struct :c:type:`v4l2_format` ``type`` field is invalid or the requested buffer type not supported. h](j)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(hfThe struct :c:type:`v4l2_format` ``type`` field is invalid or the requested buffer type not supported.h](h The struct }(hj hhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hj h]h v4l2_format}(hj hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhKhj ubh }(hj hhhNhNubj)}(h``type``h]htype}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh= field is invalid or the requested buffer type not supported.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hhhKhj ubj|)}(hEBUSY The device is busy and cannot change the format. This could be because or the device is streaming or buffers are allocated or queued to the driver. Relevant for :ref:`VIDIOC_S_FMT ` only.h](j)}(hEBUSYh]hEBUSY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(hThe device is busy and cannot change the format. This could be because or the device is streaming or buffers are allocated or queued to the driver. Relevant for :ref:`VIDIOC_S_FMT ` only.h](hThe device is busy and cannot change the format. This could be because or the device is streaming or buffers are allocated or queued to the driver. Relevant for }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKhjubh only.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hhhKhj hhubeh}(h]h ]h"]h$]h&]uh1jvhj7 hhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKubeh}(h](.ioctl-vidioc-g-fmt-vidioc-s-fmt-vidioc-try-fmtheh ]h"](0ioctl vidioc_g_fmt, vidioc_s_fmt, vidioc_try_fmt vidioc_g_fmteh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jZhsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(jZhjYjVhhjbj_jTjQj4 j1 jQjNu nametypes}(jZjYhjbjTj4 jQuh}(hhjVhhhj_jj j)jjjj jQjej1 jWjjjNj7 j* jAu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]hsystem_message)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineKsourcehuh1jhj ubatransform_messages]j)}(hhh]h)}(hhh]h2Hyperlink target "vidioc-g-fmt" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1juba transformerN include_log] decorationNhhub.