Gsphinx.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-create-bufsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/zh_TW/userspace-api/media/v4l/vidioc-create-bufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/it_IT/userspace-api/media/v4l/vidioc-create-bufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/ja_JP/userspace-api/media/v4l/vidioc-create-bufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/ko_KR/userspace-api/media/v4l/vidioc-create-bufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/pt_BR/userspace-api/media/v4l/vidioc-create-bufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/sp_SP/userspace-api/media/v4l/vidioc-create-bufsmodnameN 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:spacepreserveuh1hhhhhhX/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/vidioc-create-bufs.rsthKubhtarget)}(h.. _VIDIOC_CREATE_BUFS:h]h}(h]h ]h"]h$]h&]refidvidioc-create-bufsuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hioctl VIDIOC_CREATE_BUFSh]hioctl VIDIOC_CREATE_BUFS}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hWVIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/Oh]hWVIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O}(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](single V4L.VIDIOC_CREATE_BUFS (C macro)c.V4L.VIDIOC_CREATE_BUFShNtauh1j%hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hVIDIOC_CREATE_BUFSh]hdesc_signature_line)}(hVIDIOC_CREATE_BUFSh]h desc_name)}(hVIDIOC_CREATE_BUFSh]h desc_sig_name)}(hj?h]hVIDIOC_CREATE_BUFS}(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)}(hK``int ioctl(int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp)``h]hliteral)}(hjh]hGint ioctl(int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *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)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh 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-create-bufs refdomainjreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)} identifierV4LsbNasb reftargetopenuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h:``argp`` Pointer to struct :c:type:`v4l2_create_buffers`. h](j)}(h``argp``h]j)}(hjBh]hargp}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhhhKhj<ubj)}(hhh]h)}(h0Pointer to struct :c:type:`v4l2_create_buffers`.h](hPointer to struct }(hjZhhhNhNubh)}(h:c:type:`v4l2_create_buffers`h]j)}(hjdh]hv4l2_create_buffers}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$v4l2_create_buffersuh1hhhhKhjZubh.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(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)}(hXYThis ioctl is used to create buffers for :ref:`memory mapped ` or :ref:`user pointer ` or :ref:`DMA buffer ` I/O. It can be used as an alternative or in addition to the :ref:`VIDIOC_REQBUFS` ioctl, when a tighter control over buffers is required. This ioctl can be called multiple times to create buffers of different sizes.h](h)This ioctl is used to create buffers for }(hjhhhNhNubh)}(h:ref:`memory mapped `h]hinline)}(hjh]h memory mapped}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$mmapuh1hhhhK"hjubh or }(hjhhhNhNubh)}(h:ref:`user pointer `h]j)}(hjh]h user pointer}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$userpuh1hhhhK"hjubh or }(hjhhhNhNubh)}(h:ref:`DMA buffer `h]j)}(hj h]h DMA buffer}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$dmabufuh1hhhhK"hjubh= I/O. It can be used as an alternative or in addition to the }(hjhhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hj.h]hVIDIOC_REQBUFS}(hj0hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]refdocj refdomainj:reftyperef refexplicitrefwarnj$vidioc_reqbufsuh1hhhhK"hjubh ioctl, when a tighter control over buffers is required. This ioctl can be called multiple times to create buffers of different sizes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hjhhubh)}(hX-To allocate the device buffers applications must initialize the relevant fields of the struct :c:type:`v4l2_create_buffers` structure. The ``count`` field must be set to the number of requested buffers, the ``memory`` field specifies the requested I/O method and the ``reserved`` array must be zeroed.h](h^To allocate the device buffers applications must initialize the relevant fields of the struct }(hjVhhhNhNubh)}(h:c:type:`v4l2_create_buffers`h]j)}(hj`h]hv4l2_create_buffers}(hjbhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$v4l2_create_buffersuh1hhhhK)hjVubh structure. The }(hjVhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh; field must be set to the number of requested buffers, the }(hjVhhhNhNubj)}(h ``memory``h]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh2 field specifies the requested I/O method and the }(hjVhhhNhNubj)}(h ``reserved``h]hreserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh array must be zeroed.}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjhhubh)}(hXkThe ``format`` field specifies the image format that the buffers must be able to handle. The application has to fill in this struct :c:type:`v4l2_format`. Usually this will be done using the :ref:`VIDIOC_TRY_FMT ` or :ref:`VIDIOC_G_FMT ` ioctls to ensure that the requested format is supported by the driver. Based on the format's ``type`` field the requested buffer size (for single-planar) or plane sizes (for multi-planar formats) will be used for the allocated buffers. The driver may return an error if the size(s) are not supported by the hardware (usually because they are too small).h](hThe }(hjhhhNhNubj)}(h ``format``h]hformat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhv field specifies the image format that the buffers must be able to handle. The application has to fill in this 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&. Usually this will be done using the }(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_fmtuh1hhhhK/hjubh or }(hjhhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]j)}(hj h]h VIDIOC_G_FMT}(hj"hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj,reftyperef refexplicitrefwarnj$ vidioc_g_fmtuh1hhhhK/hjubh` ioctls to ensure that the requested format is supported by the driver. Based on the format’s }(hjhhhNhNubj)}(h``type``h]htype}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field the requested buffer size (for single-planar) or plane sizes (for multi-planar formats) will be used for the allocated buffers. The driver may return an error if the size(s) are not supported by the hardware (usually because they are too small).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjhhubh)}(hXThe buffers created by this ioctl will have as minimum size the size defined by the ``format.pix.sizeimage`` field (or the corresponding fields for other format types). Usually if the ``format.pix.sizeimage`` field is less than the minimum required for the given format, then an error will be returned since drivers will typically not allow this. If it is larger, then the value will be used as-is. In other words, the driver may reject the requested size, but if it is accepted the driver will use it unchanged.h](hTThe buffers created by this ioctl will have as minimum size the size defined by the }(hjZhhhNhNubj)}(h``format.pix.sizeimage``h]hformat.pix.sizeimage}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubhL field (or the corresponding fields for other format types). Usually if the }(hjZhhhNhNubj)}(h``format.pix.sizeimage``h]hformat.pix.sizeimage}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubhX0 field is less than the minimum required for the given format, then an error will be returned since drivers will typically not allow this. If it is larger, then the value will be used as-is. In other words, the driver may reject the requested size, but if it is accepted the driver will use it unchanged.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubh)}(hX6When the ioctl is called with a pointer to this structure the driver will attempt to allocate up to the requested number of buffers and store the actual number allocated and the starting index in the ``count`` and the ``index`` fields respectively. On return ``count`` can be smaller than the number requested.h](hWhen the ioctl is called with a pointer to this structure the driver will attempt to allocate up to the requested number of buffers and store the actual number allocated and the starting index in the }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and the }(hjhhhNhNubj)}(h ``index``h]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh fields respectively. On return }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh* can be smaller than the number requested.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChjhhubj&)}(hhh]h}(h]h ]h"]h$]h&]entries](j2 V4L.v4l2_create_buffers (C type)c.V4L.v4l2_create_buffershNtauh1j%hjhhhNhNubj7)}(hhh](j<)}(hv4l2_create_buffersh]jB)}(htype v4l2_create_buffersh](hdesc_sig_keyword)}(htypeh]htype}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhhhKIubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhhhKIubjH)}(hv4l2_create_buffersh]jN)}(hjh]hv4l2_create_buffers}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jMhj ubah}(h]h ](j`jaeh"]h$]h&]hhuh1jGhjhhhhhKIubeh}(h]h ]h"]h$]h&]hhjkuh1jAjljmhjhhhhhKIubah}(h]jah ](jqjreh"]h$]h&]jvjw)jxhuh1j;hhhKIhjhhubjz)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhjhhhhhKIubeh}(h]h ](jtypeeh"]h$]h&]jjjj:jj:jjjuh1j6hhhjhNhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{4.4cm}|p{4.4cm}|p{8.5cm}|uh1j>hhhKKhjhhubhtable)}(hhh](h)}(hstruct v4l2_create_buffersh]hstruct v4l2_create_buffers}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjMubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchj`ubjd)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchj`ubjd)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchj`ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``index``h]j)}(hjh]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h2The starting buffer index, returned by the driver.h]h2The starting buffer index, returned by the driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXThe number of buffers requested or granted. If count == 0, then :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of created buffers, and it will check the validity of ``memory`` and ``format.type``. If those are invalid -1 is returned and errno is set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns 0. It will never set errno to ``EBUSY`` error code in this particular case.h](h@The number of buffers requested or granted. If count == 0, then }(hj hhhNhNubh)}(h:ref:`VIDIOC_CREATE_BUFS`h]j)}(hj*h]hVIDIOC_CREATE_BUFS}(hj,hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainj6reftyperef refexplicitrefwarnj$vidioc_create_bufsuh1hhhhKWhj ubh will set }(hj hhhNhNubj)}(h ``index``h]hindex}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhM to the current number of created buffers, and it will check the validity of }(hj hhhNhNubj)}(h ``memory``h]hmemory}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh and }(hj hhhNhNubj)}(h``format.type``h]h format.type}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh:. If those are invalid -1 is returned and errno is set to }(hj hhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh error code, otherwise }(hj hhhNhNubh)}(h:ref:`VIDIOC_CREATE_BUFS`h]j)}(hjh]hVIDIOC_CREATE_BUFS}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$vidioc_create_bufsuh1hhhhKWhj ubh' returns 0. It will never set errno to }(hj hhhNhNubj)}(h ``EBUSY``h]hEBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh$ error code in this particular case.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``memory``h]j)}(hjh]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hApplications set this field to ``V4L2_MEMORY_MMAP``, ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See :c:type:`v4l2_memory`h](hApplications set this field to }(hjhhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``V4L2_MEMORY_DMABUF``h]hV4L2_MEMORY_DMABUF}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h``V4L2_MEMORY_USERPTR``h]hV4L2_MEMORY_USERPTR}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. See }(hjhhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjYh]h v4l2_memory}(hj[hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_memoryuh1hhhhK`hjubeh}(h]h ]h"]h$]h&]uh1hhhhK`hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hstruct :c:type:`v4l2_format`h](hstruct }(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_formatuh1hhhhKchjubeh}(h]h ]h"]h$]h&]uh1hhhhKchjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h ``format``h]j)}(hjh]hformat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h6Filled in by the application, preserved by the driver.h]h6Filled in by the application, preserved by the driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``capabilities``h]j)}(hjh]h capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](h)}(hXLSet by the driver. If 0, then the driver doesn't support capabilities. In that case all you know is that the driver is guaranteed to support ``V4L2_MEMORY_MMAP`` and *might* support other :c:type:`v4l2_memory` types. It will not support any other capabilities. See :ref:`here ` for a list of the capabilities.h](hSet by the driver. If 0, then the driver doesn’t support capabilities. In that case all you know is that the driver is guaranteed to support }(hj;hhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh and }(hj;hhhNhNubhemphasis)}(h*might*h]hmight}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jUhj;ubh support other }(hj;hhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjkh]h v4l2_memory}(hjmhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_memoryuh1hhhhKhhj;ubh8 types. It will not support any other capabilities. See }(hj;hhhNhNubh)}(h#:ref:`here `h]j)}(hjh]hhere}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$v4l2-buf-capabilitiesuh1hhhhKhhj;ubh for a list of the capabilities.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhj8ubh)}(hIf you want to just query the capabilities without making any other changes, then set ``count`` to 0, ``memory`` to ``V4L2_MEMORY_MMAP`` and ``format.type`` to the buffer type.h](hVIf you want to just query the capabilities without making any other changes, then set }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to 0, }(hjhhhNhNubj)}(h ``memory``h]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``format.type``h]h format.type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to the buffer type.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohj8ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h ``flags``h]j)}(hj7 h]hflags}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5 ubah}(h]h ]h"]h$]h&]uh1hhhhKthj2 ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hKSpecifies additional buffer management attributes. See :ref:`memory-flags`.h](h7Specifies additional buffer management attributes. See }(hjU hhhNhNubh)}(h:ref:`memory-flags`h]j)}(hj_ h]h memory-flags}(hja hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj] ubah}(h]h ]h"]h$]h&]refdocj refdomainjk reftyperef refexplicitrefwarnj$ memory-flagsuh1hhhhKuhjU ubh.}(hjU hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjR ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``max_num_buffers``h]j)}(hj h]hmax_num_buffers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKxhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hIf the V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set this field indicates the maximum possible number of buffers for this queue.h]hIf the V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set this field indicates the maximum possible number of buffers for this queue.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``reserved``\ [5]h](j)}(h ``reserved``h]hreserved}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh [5]}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK}hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hZA place holder for future extensions. Drivers and applications must set the array to zero.h]hZA place holder for future extensions. Drivers and applications must set the array to zero.}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hj) ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]colsKuh1j^hjMubeh}(h]id1ah ]h"]h$]h&]uh1jKhjhhhNhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb 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 }(hjs hhhNhNubj)}(h ``errno``h]herrno}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs ubhM variable is set appropriately. The generic error codes are described at the }(hjs hhhNhNubh)}(h':ref:`Generic Error Codes `h]j)}(hj h]hGeneric Error Codes}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj$ gen-errorsuh1hhhhKhjs ubh chapter.}(hjs hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjb hhubj)}(hhh](j)}(hJENOMEM No memory to allocate buffers for :ref:`memory mapped ` I/O. h](j)}(hENOMEMh]hENOMEM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(hBNo memory to allocate buffers for :ref:`memory mapped ` I/O.h](h"No memory to allocate buffers for }(hj hhhNhNubh)}(h:ref:`memory mapped `h]j)}(hj h]h memory mapped}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj$mmapuh1hhhhKhj ubh I/O.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(h|EINVAL The buffer type (``format.type`` field), requested I/O method (``memory``) or format (``format`` field) is not valid.h](j)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]h)}(huThe buffer type (``format.type`` field), requested I/O method (``memory``) or format (``format`` field) is not valid.h](hThe buffer type (}(hj" hhhNhNubj)}(h``format.type``h]h format.type}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj" ubh field), requested I/O method (}(hj" hhhNhNubj)}(h ``memory``h]hmemory}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj" ubh ) or format (}(hj" hhhNhNubj)}(h ``format``h]hformat}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj" ubh field) is not valid.}(hj" hhhNhNubeh}(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&]uh1jhjb hhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKubeh}(h](ioctl-vidioc-create-bufsheh ]h"](ioctl vidioc_create_bufsvidioc_create_bufseh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}j hsexpect_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_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]hasnameids}(j hj j jjjjjjj_ j\ j} jz u nametypes}(j j jjjj_ j} uh}(hhj hjhjjj4j=jjj\ jjjjz jb jU jMu 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]h8Hyperlink target "vidioc-create-bufs" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehnjlineKuh1j uba transformerN include_log] decorationNhhub.