Swsphinx.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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/pt_BR/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_CROPCAPhNtauh1j%hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hVIDIOC_CROPCAPh]hdesc_signature_line)}(hVIDIOC_CROPCAPh]h desc_name)}(hVIDIOC_CROPCAPh]h desc_sig_name)}(hj?h]hVIDIOC_CROPCAP}(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_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 refexplicitrefwarnj$v4l2-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}(hj#hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj-reftyperef refexplicitrefwarnj$v4l2-rect-cropuh1hhhhKEhjubeh}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``defrect``h]j)}(hjPh]hdefrect}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjKubah}(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 }(hjnhhhNhNubj)}(h ``bounds``h]hbounds}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh is used.}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhjkubah}(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 ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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}(hj hhhNhNubah}(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}(hj"hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj,reftyperef refexplicitrefwarnj$itu601uh1hhhhKRhjubh].}(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&]colsKuh1jhjubeh}(h]id1ah ]h"]h$]h&]uh1jhjhhhNhNubhnote)}(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 (}(hjnhhhNhNubj)}(h&``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``h]h"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh and }(hjnhhhNhNubj)}(h%``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``h]h!V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh1) this API was messed up with regards to how the }(hjnhhhNhNubh)}(h:c:type:`v4l2_cropcap`h]j)}(hjh]h v4l2_cropcap}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_cropcapuh1hhhhKWhjnubh }(hjnhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh; field should be filled in. Some drivers only accepted the }(hjnhhhNhNubj)}(h ``_MPLANE``h]h_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh_ buffer type while other drivers only accepted a non-multiplanar buffer type (i.e. without the }(hjnhhhNhNubj)}(h ``_MPLANE``h]h_MPLANE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubh at the end).}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjjubh)}(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^hjjubeh}(h]h ]h"]h$]h&]uh1jhhjhhhhhNubh)}(h.. _v4l2-rect-crop:h]h}(h]h ]h"]h$]h&]hԌv4l2-rect-cropuh1hhKahjhhhhubjy)}(hhh]h}(h]jah ]h"]v4l2-rect-cropah$]h&]j|p{4.4cm}|p{4.4cm}|p{8.5cm}|uh1jxhhhKchjhhexpect_referenced_by_name}jj sexpect_referenced_by_id}jj subj)}(hhh](h)}(hstruct v4l2_recth]hstruct v4l2_rect}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj'ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj8ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj8ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj8ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h__s32h]h__s32}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhj_ubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(h``left``h]j)}(hj{h]hleft}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1hhhhKkhjvubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(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&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhjYubj)}(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&]uh1jhjYubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h ``width``h]j)}(hj)h]hwidth}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1hhhhKshj$ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h"Width of the rectangle, in pixels.h]h"Width of the rectangle, in pixels.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjDubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjYubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjdubah}(h]h ]h"]h$]h&]uh1jhjaubj)}(hhh]h)}(h ``height``h]j)}(hjh]hheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1hhhhKvhj{ubah}(h]h ]h"]h$]h&]uh1jhjaubj)}(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&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]colsKuh1jhj'ubeh}(h]id2ah ]h"]h$]h&]uh1jhjhhhNhNubeh}(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)}(hj h]hGeneric Error Codes}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef 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}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj, ubj)}(hhh]h)}(h6The struct :c:type:`v4l2_cropcap` ``type`` is invalid.h](h The struct }(hjA hhhNhNubh)}(h:c:type:`v4l2_cropcap`h]j)}(hjK h]h v4l2_cropcap}(hjM hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjI ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_cropcapuh1hhhhKhjA ubh }(hjA hhhNhNubj)}(h``type``h]htype}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA ubh is invalid.}(hjA 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_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]haj]j aunameids}(j hj j jjjjjjjjjjj j u nametypes}(j j jjjjjj uh}(hhj hjhjjj4j=jjjjjjjjj jjcjjj'u 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.}hje sbah}(h]h ]h"]h$]h&]uh1hhjb ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehnjlineKuh1j` ubja )}(hhh]h)}(hhh]h4Hyperlink target "v4l2-rect-crop" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj} ubah}(h]h ]h"]h$]h&]levelKtypejz sourcehnjlineKauh1j` ube transformerN include_log] decorationNhhub.