cmsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget9/translations/zh_CN/userspace-api/media/v4l/vidioc-g-cropmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/zh_TW/userspace-api/media/v4l/vidioc-g-cropmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/it_IT/userspace-api/media/v4l/vidioc-g-cropmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/ja_JP/userspace-api/media/v4l/vidioc-g-cropmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/ko_KR/userspace-api/media/v4l/vidioc-g-cropmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget9/translations/sp_SP/userspace-api/media/v4l/vidioc-g-cropmodnameN 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:spacepreserveuh1hhhhhhS/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/vidioc-g-crop.rsthKubhtarget)}(h.. _VIDIOC_G_CROP:h]h}(h]h ]h"]h$]h&]refid vidioc-g-cropuh1hhKhhhhhhubhsection)}(hhh](htitle)}(h"ioctl VIDIOC_G_CROP, VIDIOC_S_CROPh]h"ioctl VIDIOC_G_CROP, VIDIOC_S_CROP}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hIVIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangleh]hIVIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle}(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_CROP (C macro)c.V4L.VIDIOC_G_CROPhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h VIDIOC_G_CROPh]hdesc_signature_line)}(h VIDIOC_G_CROPh]h desc_name)}(h VIDIOC_G_CROPh]h desc_sig_name)}(hj+h]h VIDIOC_G_CROP}(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_CROP, struct v4l2_crop *argp)``h]hliteral)}(hjh]h8int ioctl(int fd, VIDIOC_G_CROP, struct v4l2_crop *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_CROP (C macro)c.V4L.VIDIOC_S_CROPhNtauh1jhjhhhNhNubj#)}(hhh](j()}(h VIDIOC_S_CROPh]j.)}(h VIDIOC_S_CROPh]j4)}(h VIDIOC_S_CROPh]j:)}(hjh]h VIDIOC_S_CROP}(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)}(hB``int ioctl(int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp)``h]j)}(hjh]h>int ioctl(int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hj"h]hfd}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hj<hhhNhNubh)}(h:c:func:`open()`h]j)}(hjFh]hopen()}(hjHhhhNhNubah}(h]h ](xrefjsc-funceh"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]refdoc%userspace-api/media/v4l/vidioc-g-crop refdomainjsreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]je ASTIdentifier)} identifierV4LsbNasb reftargetopenuh1hhhhKhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj9ubah}(h]h ]h"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h0``argp`` Pointer to struct :c:type:`v4l2_crop`. h](j)}(h``argp``h]j)}(hjh]hargp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK!hjubj8)}(hhh]h)}(h&Pointer to struct :c:type:`v4l2_crop`.h](hPointer to struct }(hjhhhNhNubh)}(h:c:type:`v4l2_crop`h]j)}(hjh]h v4l2_crop}(hjhhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_cropuh1hhhhK!hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]uh1jhhhK!hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK$ubh)}(hXnTo query the cropping rectangle size and position applications set the ``type`` field of a struct :c:type:`v4l2_crop` structure to the respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP ` ioctl with a pointer to this structure. The driver fills the rest of the structure or returns the ``EINVAL`` error code if cropping is not supported.h](hGTo query the cropping rectangle size and position applications set the }(hjhhhNhNubj)}(h``type``h]htype}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field of a struct }(hjhhhNhNubh)}(h:c:type:`v4l2_crop`h]j)}(hj!h]h v4l2_crop}(hj#hhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_cropuh1hhhhK&hjubh? structure to the respective buffer (stream) type and call the }(hjhhhNhNubh)}(h$:ref:`VIDIOC_G_CROP `h]hinline)}(hjDh]h VIDIOC_G_CROP}(hjHhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjBubah}(h]h ]h"]h$]h&]refdocj^ refdomainjRreftyperef refexplicitrefwarnjs vidioc_g_cropuh1hhhhK&hjubhc ioctl with a pointer to this structure. The driver fills the rest of the structure or returns the }(hjhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) error code if cropping is not supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK&hjhhubh)}(hTo change the cropping rectangle applications initialize the ``type`` and struct :c:type:`v4l2_rect` substructure named ``c`` of a v4l2_crop structure and call the :ref:`VIDIOC_S_CROP ` ioctl with a pointer to this structure.h](h=To change the cropping rectangle applications initialize the }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and struct }(hjhhhNhNubh)}(h:c:type:`v4l2_rect`h]j)}(hjh]h v4l2_rect}(hjhhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_rectuh1hhhhK,hjubh substructure named }(hjhhhNhNubj)}(h``c``h]hc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh' of a v4l2_crop structure and call the }(hjhhhNhNubh)}(h$:ref:`VIDIOC_S_CROP `h]jG)}(hjh]h VIDIOC_S_CROP}(hjhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjreftyperef refexplicitrefwarnjs vidioc_g_cropuh1hhhhK,hjubh( ioctl with a pointer to this structure.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK,hjhhubh)}(hX|The driver first adjusts the requested dimensions against hardware limits, i. e. the bounds given by the capture/output window, and it rounds to the closest possible values of horizontal and vertical offset, width and height. In particular the driver must round the vertical offset of the cropping rectangle to frame lines modulo two, such that the field order cannot be confused.h]hX|The driver first adjusts the requested dimensions against hardware limits, i. e. the bounds given by the capture/output window, and it rounds to the closest possible values of horizontal and vertical offset, width and height. In particular the driver must round the vertical offset of the cropping rectangle to frame lines modulo two, such that the field order cannot be confused.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubh)}(hSecond the driver adjusts the image size (the opposite rectangle of the scaling process, source or target depending on the data direction) to the closest size possible while maintaining the current horizontal and vertical scaling factor.h]hSecond the driver adjusts the image size (the opposite rectangle of the scaling process, source or target depending on the data direction) to the closest size possible while maintaining the current horizontal and vertical scaling factor.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hXFinally the driver programs the hardware with the actual cropping and image parameters. :ref:`VIDIOC_S_CROP ` is a write-only ioctl, it does not return the actual parameters. To query them applications must call :ref:`VIDIOC_G_CROP ` and :ref:`VIDIOC_G_FMT`. When the parameters are unsuitable the application may modify the cropping or image parameters and repeat the cycle until satisfactory parameters have been negotiated.h](hXFinally the driver programs the hardware with the actual cropping and image parameters. }(hjhhhNhNubh)}(h$:ref:`VIDIOC_S_CROP `h]jG)}(hjh]h VIDIOC_S_CROP}(hj!hhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainj+reftyperef refexplicitrefwarnjs vidioc_g_cropuh1hhhhK=hjubhg is a write-only ioctl, it does not return the actual parameters. To query them applications must call }(hjhhhNhNubh)}(h$:ref:`VIDIOC_G_CROP `h]jG)}(hjCh]h VIDIOC_G_CROP}(hjEhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjAubah}(h]h ]h"]h$]h&]refdocj^ refdomainjOreftyperef refexplicitrefwarnjs vidioc_g_cropuh1hhhhK=hjubh and }(hjhhhNhNubh)}(h:ref:`VIDIOC_G_FMT`h]jG)}(hjgh]h VIDIOC_G_FMT}(hjihhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjeubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftyperef refexplicitrefwarnjs vidioc_g_fmtuh1hhhhK=hjubh. When the parameters are unsuitable the application may modify the cropping or image parameters and repeat the cycle until satisfactory parameters have been negotiated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubh)}(hWhen cropping is not supported then no parameters are changed and :ref:`VIDIOC_S_CROP ` returns the ``EINVAL`` error code.h](hBWhen cropping is not supported then no parameters are changed and }(hjhhhNhNubh)}(h$:ref:`VIDIOC_S_CROP `h]jG)}(hjh]h VIDIOC_S_CROP}(hjhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjreftyperef refexplicitrefwarnjs vidioc_g_cropuh1hhhhKEhjubh returns the }(hjhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKEhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jV4L.v4l2_crop (C type)c.V4L.v4l2_crophNtauh1jhjhhhNhNubj#)}(hhh](j()}(h v4l2_croph]j.)}(htype v4l2_croph](hdesc_sig_keyword)}(htypeh]htype}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhhhKHubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhhhKHubj4)}(h v4l2_croph]j:)}(hjh]h v4l2_crop}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKHubeh}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhjhhhhhKHubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKHhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKHubeh}(h]h ](jstypeeh"]h$]h&]jxjsjyj=jzj=j{j|j}uh1j"hhhjhNhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{4.4cm}|p{4.4cm}|p{8.5cm}|uh1jAhhhKJhjhhubhtable)}(hhh](h)}(hstruct v4l2_croph]hstruct v4l2_crop}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjPubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jfhjcubjg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jfhjcubjg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jfhjcubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(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&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hX5Type of the data stream, set by the application. Only these types are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``, ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :c:type:`v4l2_buf_type` and the note below.h](hRType of the data stream, set by the application. Only these types are valid here: }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_CAPTURE``h]hV4L2_BUF_TYPE_VIDEO_CAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h&``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``h]h"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_OUTPUT``h]hV4L2_BUF_TYPE_VIDEO_OUTPUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h%``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``h]h!V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``V4L2_BUF_TYPE_VIDEO_OVERLAY``h]hV4L2_BUF_TYPE_VIDEO_OVERLAY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. See }(hjhhhNhNubh)}(h:c:type:`v4l2_buf_type`h]j)}(hj0h]h v4l2_buf_type}(hj2hhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_buf_typeuh1hhhhKShjubh and the note below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hstruct :c:type:`v4l2_rect`h](hstruct }(hjihhhNhNubh)}(h:c:type:`v4l2_rect`h]j)}(hjsh]h v4l2_rect}(hjuhhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_rectuh1hhhhKWhjiubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjfubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(h``c``h]j)}(hjh]hc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(hhCropping rectangle. The same co-ordinate system as for struct :c:type:`v4l2_cropcap` ``bounds`` is used.h](h>Cropping rectangle. The same co-ordinate system as for struct }(hjhhhNhNubh)}(h:c:type:`v4l2_cropcap`h]j)}(hjh]h v4l2_cropcap}(hjhhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_cropcapuh1hhhhKYhjubh }(hjhhhNhNubj)}(h ``bounds``h]hbounds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is used.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]colsKuh1jahjPubeh}(h]id1ah ]h"]h$]h&]uh1jNhjhhhNhNubhnote)}(hXUnfortunately in the case of multiplanar buffer types (``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``) this API was messed up with regards to how the :c:type:`v4l2_crop` ``type`` field should be filled in. Some drivers only accepted the ``_MPLANE`` buffer type while other drivers only accepted a non-multiplanar buffer type (i.e. without the ``_MPLANE`` at the end). Starting with kernel 4.13 both variations are allowed.h](h)}(hXUnfortunately in the case of multiplanar buffer types (``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``) this API was messed up with regards to how the :c:type:`v4l2_crop` ``type`` field should be filled in. Some drivers only accepted the ``_MPLANE`` buffer type while other drivers only accepted a non-multiplanar buffer type (i.e. without the ``_MPLANE`` at the end).h](h7Unfortunately in the case of multiplanar buffer types (}(hj(hhhNhNubj)}(h&``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``h]h"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh and }(hj(hhhNhNubj)}(h%``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``h]h!V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh1) this API was messed up with regards to how the }(hj(hhhNhNubh)}(h:c:type:`v4l2_crop`h]j)}(hjVh]h v4l2_crop}(hjXhhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjs v4l2_cropuh1hhhhK]hj(ubh }(hj(hhhNhNubj)}(h``type``h]htype}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh; field should be filled in. Some drivers only accepted the }(hj(hhhNhNubj)}(h ``_MPLANE``h]h_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh_ buffer type while other drivers only accepted a non-multiplanar buffer type (i.e. without the }(hj(hhhNhNubj)}(h ``_MPLANE``h]h_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh at the end).}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK]hj$ubh)}(h6Starting with kernel 4.13 both variations are allowed.h]h6Starting with kernel 4.13 both variations are allowed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhj$ubeh}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK$ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKgubh)}(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 }(hjhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhM variable is set appropriately. The generic error codes are described at the }(hjhhhNhNubh)}(h':ref:`Generic Error Codes `h]jG)}(hjh]hGeneric Error Codes}(hjhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jFhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjreftyperef refexplicitrefwarnjs gen-errorsuh1hhhhKihjubh chapter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKihjhhubj)}(hhh]j)}(h;ENODATA Cropping is not supported for this input or output.h](j)}(hENODATAh]hENODATA}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKmhj'ubj8)}(hhh]h)}(h3Cropping is not supported for this input or output.h]h3Cropping is not supported for this input or output.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj9ubah}(h]h ]h"]h$]h&]uh1j7hj'ubeh}(h]h ]h"]h$]h&]uh1jhhhKmhj$ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKgubeh}(h](!ioctl-vidioc-g-crop-vidioc-s-cropheh ]h"]("ioctl vidioc_g_crop, vidioc_s_crop vidioc_g_cropeh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jjhsexpect_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}(jjhjijfhhjjjjjjjaj^u nametypes}(jjjihjjjjauh}(hhjfhhhjjj j)jjjjjjjjj^jjjPu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h3Hyperlink target "vidioc-g-crop" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1juba transformerN include_log] decorationNhhub.