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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget8/translations/pt_BR/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_FMThNtauh1j%hjhhhNhNubhdesc)}(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}(hjOhhhNhNubah}(h]h ]nah"]h$]h&]uh1jMhjIubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jGhjChhhhhKubah}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jAsphinx_line_type declaratorhj=hhhhhKubah}(h]j4ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j;hhhKhj8hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhj8hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j6hhhjhNhNubh)}(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&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj&)}(hhh]h}(h]h ]h"]h$]h&]entries](j2V4L.VIDIOC_S_FMT (C macro)c.V4L.VIDIOC_S_FMThNtauh1j%hjhhhNhNubj7)}(hhh](j<)}(h VIDIOC_S_FMTh]jB)}(h VIDIOC_S_FMTh]jH)}(h VIDIOC_S_FMTh]jN)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jMhjubah}(h]h ](j`jaeh"]h$]h&]hhuh1jGhjhhhhhKubah}(h]h ]h"]h$]h&]hhjkuh1jAjljmhjhhhhhKubah}(h]jah ](jqjreh"]h$]h&]jvjw)jxhuh1j;hhhKhjhhubjz)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhjhhhhhKubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1j6hhhjhNhNubh)}(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](j2V4L.VIDIOC_TRY_FMT (C macro)c.V4L.VIDIOC_TRY_FMThNtauh1j%hjhhhNhNubj7)}(hhh](j<)}(hVIDIOC_TRY_FMTh]jB)}(hVIDIOC_TRY_FMTh]jH)}(hVIDIOC_TRY_FMTh]jN)}(hj!h]hVIDIOC_TRY_FMT}(hj+hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jMhj'ubah}(h]h ](j`jaeh"]h$]h&]hhuh1jGhj#hhhhhKubah}(h]h ]h"]h$]h&]hhjkuh1jAjljmhjhhhhhKubah}(h]jah ](jqjreh"]h$]h&]jvjw)jxhuh1j;hhhKhjhhubjz)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhjhhhhhKubeh}(h]h ](jmacroeh"]h$]h&]jjjjVjjVjjjuh1j6hhhjhNhNubh)}(h?``int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)``h]j)}(hj\h]h;int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhhhhhKubhdefinition_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"hjubh 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 ](xrefjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc$userspace-api/media/v4l/vidioc-g-fmt refdomainjreftypefunc 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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK"hjubj)}(h2``argp`` Pointer to struct :c:type:`v4l2_format`. h](j)}(h``argp``h]j)}(hjh]hargp}(hj hhhNhNubah}(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)}(hj*h]h v4l2_format}(hj,hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhK%hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK%hjhhubeh}(h]h ]h"]h$]h&]uh1jhjyhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhhhhhK(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.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjkhhubh)}(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 }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field of a struct }(hjhhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhK-hjubhO to the respective buffer (stream) type. For example video capture devices use }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_CAPTURE``h]hV4L2_BUF_TYPE_VIDEO_CAPTURE}(hjhhhNhNubah}(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!. When the application calls the }(hjhhhNhNubh)}(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-hjubhV ioctl with a pointer to this structure the driver fills the respective member of the }(hjhhhNhNubj)}(h``fmt``h]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhC union. In case of video capture devices that is either the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hj%h]hv4l2_pix_format}(hj'hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjv4l2_pix_formatuh1hhhhK-hjubh }(hjhhhNhNubj)}(h``pix``h]hpix}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or the struct }(hjhhhNhNubh)}(h :c:type:`v4l2_pix_format_mplane`h]j)}(hjZh]hv4l2_pix_format_mplane}(hj\hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjv4l2_pix_format_mplaneuh1hhhhK-hjubh }hjsbj)}(h ``pix_mp``h]hpix_mp}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhK member. When the requested buffer type is not supported drivers return an }(hjhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK-hjkhhubh)}(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}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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)}(hjPh]h VIDIOC_S_FMT}(hjRhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]refdocj refdomainj\reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhK:hjubh0 ioctl returns the current format parameters as }(hjhhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]j)}(hjth]h VIDIOC_G_FMT}(hjvhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef 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:hjkhhubh)}(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)}(hj$h]hVIDIOC_TRY_FMT}(hj&hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainj0reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKPhjubh ioctl is equivalent to }(hjhhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j)}(hjHh]h VIDIOC_S_FMT}(hjJhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjTreftyperef 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}(hjjhhhNhNubah}(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&]uh1hhhhKPhjkhhubh)}(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 }(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_fmtuh1hhhhKWhjubh must be identical to what }(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_fmtuh1hhhhKWhjubh& returns for the same input or output.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjkhhubj&)}(hhh]h}(h]h ]h"]h$]h&]entries](j2V4L.v4l2_format (C type)c.V4L.v4l2_formathNtauh1j%hjkhhhNhNubj7)}(hhh](j<)}(h v4l2_formath]jB)}(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&]uh1jhjhhhhhKZubjH)}(h v4l2_formath]jN)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jMhjubah}(h]h ](j`jaeh"]h$]h&]hhuh1jGhjhhhhhKZubeh}(h]h ]h"]h$]h&]hhjkuh1jAjljmhjhhhhhKZubah}(h]jah ](jqjreh"]h$]h&]jvjw)jxhuh1j;hhhKZhjhhubjz)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhjhhhhhKZubeh}(h]h ](jtypeeh"]h$]h&]jjjjBjjBjjjuh1j6hhhjkhNhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{7.4cm}|p{4.4cm}|p{5.5cm}|uh1jFhhhK\hjkhhubhtable)}(hhh](h)}(hstruct v4l2_formath]hstruct v4l2_format}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjUubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jkhjhubjl)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jkhjhubjl)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jkhjhubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj v4l2_buf_typeuh1hhhhKdhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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)}(hj-h]hfmt}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1hhhhKfhj(ubah}(h]h ]h"]h$]h&]morecolsKuh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_pix_format`h](hstruct }(hjUhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hj_h]hv4l2_pix_format}(hjahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjv4l2_pix_formatuh1hhhhKghjUubeh}(h]h ]h"]h$]h&]uh1hhhhKghjRubah}(h]h ]h"]h$]h&]uh1jhjOubj)}(hhh]h)}(h``pix``h]j)}(hjh]hpix}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjOubj)}(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&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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 }(hjE hhhNhNubh)}(h :ref:`pixfmt`h]j)}(hjO h]hpixfmt}(hjQ hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjM ubah}(h]h ]h"]h$]h&]refdocj refdomainj[ reftyperef refexplicitrefwarnjpixfmtuh1hhhhKmhjE ubh<, used by video capture and output devices that support the }(hjE hhhNhNubh)}(h4:ref:`multi-planar version of the API `h]j)}(hjs h]hmulti-planar version of the API}(hju hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjq ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj planar-apisuh1hhhhKmhjE ubh.}(hjE hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKmhjB ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_vbi_format`h](hstruct }(hjG hhhNhNubh)}(h:c:type:`v4l2_vbi_format`h]j)}(hjQ h]hv4l2_vbi_format}(hjS hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjO ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjv4l2_vbi_formatuh1hhhhKthjG ubeh}(h]h ]h"]h$]h&]uh1hhhhKthjD ubah}(h]h ]h"]h$]h&]uh1jhjA ubj)}(hhh]h)}(h``vbi``h]j)}(hj h]hvbi}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj} ubah}(h]h ]h"]h$]h&]uh1hhhhKuhjz ubah}(h]h ]h"]h$]h&]uh1jhjA 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&]uh1jhjA ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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 }(hj7 hhhNhNubh)}(h :ref:`sliced`h]j)}(hjA h]hsliced}(hjC hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj? ubah}(h]h ]h"]h$]h&]refdocj refdomainjM reftyperef refexplicitrefwarnjsliceduh1hhhhK{hj7 ubh< for details. Used by sliced VBI capture and output devices.}(hj7 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK{hj4 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_sdr_format`h](hstruct }(hj{ hhhNhNubh)}(h:c:type:`v4l2_sdr_format`h]j)}(hj h]hv4l2_sdr_format}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjv4l2_sdr_formatuh1hhhhK}hj{ ubeh}(h]h ]h"]h$]h&]uh1hhhhK}hjx ubah}(h]h ]h"]h$]h&]uh1jhju 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&]uh1jhju 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&]uh1jhju ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjv4l2_meta_formatuh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``meta``h]j)}(hjM h]hmeta}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK ubah}(h]h ]h"]h$]h&]uh1hhhhKhjH 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 }(hjk hhhNhNubh)}(h:ref:`meta-formats`h]j)}(hju h]h meta-formats}(hjw hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjs ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj meta-formatsuh1hhhhKhjk ubh#, used by metadata capture devices.}(hjk hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjh ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]colsKuh1jfhjUubeh}(h]id1ah ]h"]h$]h&]uh1jShjkhhhNhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK(ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK 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 }(hj\ hhhNhNubj)}(h ``errno``h]herrno}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ ubhM variable is set appropriately. The generic error codes are described at the }(hj\ hhhNhNubh)}(h':ref:`Generic Error Codes `h]j)}(hjx h]hGeneric Error Codes}(hjz hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjv ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj gen-errorsuh1hhhhKhj\ ubh chapter.}(hj\ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjK hhubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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&]uh1jhhhKhj 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&]uh1jhhhKhjubj)}(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)}(hj&h]h VIDIOC_S_FMT}(hj(hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]refdocj refdomainj2reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKhjubh only.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubeh}(h]h ]h"]h$]h&]uh1jhjK 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}jnhsexpect_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_sourcehnj _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}(jnhjmjjjjjvjsjhjejH jE jejbu nametypes}(jnjmjjvjhjH jeuh}(hhjjhjhjsjj4j=jjjjjejyjE jkjjjbjK j> jUu 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.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKuh1juba transformerN include_log] decorationNhhub.