avsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget:/translations/zh_CN/userspace-api/media/v4l/vidioc-cropcapmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/zh_TW/userspace-api/media/v4l/vidioc-cropcapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/it_IT/userspace-api/media/v4l/vidioc-cropcapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/ja_JP/userspace-api/media/v4l/vidioc-cropcapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/ko_KR/userspace-api/media/v4l/vidioc-cropcapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/sp_SP/userspace-api/media/v4l/vidioc-cropcapmodnameN 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:spacepreserveuh1hhhhhhT/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/vidioc-cropcap.rsthKubhtarget)}(h.. _VIDIOC_CROPCAP:h]h}(h]h ]h"]h$]h&]refidvidioc-cropcapuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hioctl VIDIOC_CROPCAPh]hioctl VIDIOC_CROPCAP}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hKVIDIOC_CROPCAP - Information about the video cropping and scaling abilitiesh]hKVIDIOC_CROPCAP - Information about the video cropping and scaling abilities}(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_CROPCAP (C macro)c.V4L.VIDIOC_CROPCAPhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hVIDIOC_CROPCAPh]hdesc_signature_line)}(hVIDIOC_CROPCAPh]h desc_name)}(hVIDIOC_CROPCAPh]h desc_sig_name)}(hj+h]hVIDIOC_CROPCAP}(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_CROPCAP, struct v4l2_cropcap *argp)``h]hliteral)}(hjh]h`h](hstruct }(hjhhhNhNubh)}(h!:ref:`v4l2_rect `h]j)}(hjh]h v4l2_rect}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjv4l2-rect-cropuh1hhhhK=hjubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``bounds``h]j)}(hjh]hbounds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK>hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXBDefines the window within capturing or output is possible, this may exclude for example the horizontal and vertical blanking areas. The cropping rectangle cannot exceed these limits. Width and height are defined in pixels, the driver writer is free to choose origin and units of the coordinate system in the analog domain.h]hXBDefines the window within capturing or output is possible, this may exclude for example the horizontal and vertical blanking areas. The cropping rectangle cannot exceed these limits. Width and height are defined in pixels, the driver writer is free to choose origin and units of the coordinate system in the analog domain.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h(struct :ref:`v4l2_rect `h](hstruct }(hjhhhNhNubh)}(h!:ref:`v4l2_rect `h]j)}(hj h]h v4l2_rect}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjv4l2-rect-cropuh1hhhhKEhjubeh}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``defrect``h]j)}(hj<h]hdefrect}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1hhhhKFhj7ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXDefault cropping rectangle, it shall cover the "whole picture". Assuming pixel aspect 1/1 this could be for example a 640 × 480 rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM centered over the active picture area. The same coordinate system as for ``bounds`` is used.h](hX Default cropping rectangle, it shall cover the “whole picture”. Assuming pixel aspect 1/1 this could be for example a 640 × 480 rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM centered over the active picture area. The same coordinate system as for }(hjZhhhNhNubj)}(h ``bounds``h]hbounds}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh is used.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhjWubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hstruct :c:type:`v4l2_fract`h](hstruct }(hjhhhNhNubh)}(h:c:type:`v4l2_fract`h]j)}(hjh]h v4l2_fract}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_fractuh1hhhhKLhjubeh}(h]h ]h"]h$]h&]uh1hhhhKLhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``pixelaspect``h]j)}(hjh]h pixelaspect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](h)}(hThis is the pixel aspect (y / x) when no scaling is applied, the ratio of the actual sampling frequency and the frequency required to get square pixels.h]hThis is the pixel aspect (y / x) when no scaling is applied, the ratio of the actual sampling frequency and the frequency required to get square pixels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubh)}(hWhen cropping coordinates refer to square pixels, the driver sets ``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].h](hBWhen cropping coordinates refer to square pixels, the driver sets }(hjhhhNhNubj)}(h``pixelaspect``h]h pixelaspect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh_ to 1/1. Other common values are 54/59 for PAL and SECAM, 11/10 for NTSC sampled according to [}(hjhhhNhNubh)}(h :ref:`itu601`h]j)}(hj h]hitu601}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjitu601uh1hhhhKRhjubh].}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKRhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjsubeh}(h]id1ah ]h"]h$]h&]uh1jqhjhhhNhNubhnote)}(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_cropcap` ``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_cropcap` ``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 (}(hjZhhhNhNubj)}(h&``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``h]h"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh and }(hjZhhhNhNubj)}(h%``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``h]h!V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh1) this API was messed up with regards to how the }(hjZhhhNhNubh)}(h:c:type:`v4l2_cropcap`h]j)}(hjh]h v4l2_cropcap}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_cropcapuh1hhhhKWhjZubh }(hjZhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh; field should be filled in. Some drivers only accepted the }(hjZhhhNhNubj)}(h ``_MPLANE``h]h_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh_ buffer type while other drivers only accepted a non-multiplanar buffer type (i.e. without the }(hjZhhhNhNubj)}(h ``_MPLANE``h]h_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh at the end).}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjVubh)}(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&]uh1hhhhK^hjVubeh}(h]h ]h"]h$]h&]uh1jThjhhhhhNubh)}(h.. _v4l2-rect-crop:h]h}(h]h ]h"]h$]h&]hv4l2-rect-cropuh1hhKahjhhhhubje)}(hhh]h}(h]jah ]h"]v4l2-rect-cropah$]h&]jo|p{4.4cm}|p{4.4cm}|p{8.5cm}|uh1jdhhhKchjhhexpect_referenced_by_name}j jsexpect_referenced_by_id}jjsubjr)}(hhh](h)}(hstruct v4l2_recth]hstruct v4l2_rect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj$ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj$ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj$ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h__s32h]h__s32}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(h``left``h]j)}(hjgh]hleft}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1hhhhKkhjbubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(hFHorizontal offset of the top, left corner of the rectangle, in pixels.h]hFHorizontal offset of the top, left corner of the rectangle, in pixels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh](j)}(hhh]h)}(h__s32h]h__s32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``top``h]j)}(hjh]htop}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hDVertical offset of the top, left corner of the rectangle, in pixels.h]hDVertical offset of the top, left corner of the rectangle, in pixels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``width``h]j)}(hjh]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"Width of the rectangle, in pixels.h]h"Width of the rectangle, in pixels.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthj0ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjPubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(hhh]h)}(h ``height``h]j)}(hjlh]hheight}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1hhhhKvhjgubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(hhh]h)}(h#Height of the rectangle, in pixels.h]h#Height of the rectangle, in pixels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h]id2ah ]h"]h$]h&]uh1jqhjhhhNhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKzubh)}(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]j)}(hjh]hGeneric Error Codes}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj gen-errorsuh1hhhhK|hjubh chapter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK|hjhhubj)}(hhh](j)}(h>EINVAL The struct :c:type:`v4l2_cropcap` ``type`` is invalid. h](j)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(h6The struct :c:type:`v4l2_cropcap` ``type`` is invalid.h](h The struct }(hj- hhhNhNubh)}(h:c:type:`v4l2_cropcap`h]j)}(hj7 h]h v4l2_cropcap}(hj9 hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj5 ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_cropcapuh1hhhhKhj- ubh }(hj- hhhNhNubj)}(h``type``h]htype}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj- ubh is invalid.}(hj- hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj* ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(h;ENODATA Cropping is not supported for this input or output.h](j)}(hENODATAh]hENODATA}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj| ubj)}(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&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj| ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKzubeh}(h](ioctl-vidioc-cropcapheh ]h"](ioctl vidioc_cropcapvidioc_cropcapeh$]h&]uh1hhhhhhhhKj}j hsj}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_handlerj error_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]haj]jaunameids}(j hj j hhjjjjjjj jj j u nametypes}(j j hjjjj j uh}(hhj hhhjjj j)jjjjjjjjj jjOjsjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h4Hyperlink target "vidioc-cropcap" is not referenced.}hjQ sbah}(h]h ]h"]h$]h&]uh1hhjN ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jL ubjM )}(hhh]h)}(hhh]h4Hyperlink target "v4l2-rect-crop" is not referenced.}hjl sbah}(h]h ]h"]h$]h&]uh1hhji ubah}(h]h ]h"]h$]h&]levelKtypejf sourcehlineKauh1jL ube transformerN include_log] decorationNhhub.