Qsphinx.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]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_BUFShNtauh1jhjhhhNhNubhdesc)}(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}(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)}(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&]uh1jhj~ubah}(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 ](xrefjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc*userspace-api/media/v4l/vidioc-create-bufs refdomainjsreftypefunc 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)}(hj.h]hargp}(hj0hhhNhNubah}(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 }(hjFhhhNhNubh)}(h:c:type:`v4l2_create_buffers`h]j)}(hjPh]hv4l2_create_buffers}(hjRhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_create_buffersuh1hhhhKhjFubh.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjCubah}(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 refexplicitrefwarnjmmapuh1hhhhK"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 refexplicitrefwarnjuserpuh1hhhhK"hjubh or }(hjhhhNhNubh)}(h:ref:`DMA buffer `h]j)}(hjh]h DMA buffer}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjdmabufuh1hhhhK"hjubh= I/O. It can be used as an alternative or in addition to the }(hjhhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hjh]hVIDIOC_REQBUFS}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj&reftyperef refexplicitrefwarnjvidioc_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 }(hjBhhhNhNubh)}(h:c:type:`v4l2_create_buffers`h]j)}(hjLh]hv4l2_create_buffers}(hjNhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_create_buffersuh1hhhhK)hjBubh structure. The }(hjBhhhNhNubj)}(h ``count``h]hcount}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh; field must be set to the number of requested buffers, the }(hjBhhhNhNubj)}(h ``memory``h]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh2 field specifies the requested I/O method and the }(hjBhhhNhNubj)}(h ``reserved``h]hreserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh array must be zeroed.}(hjBhhhNhNubeh}(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 ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype 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}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef 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}(hj.hhhNhNubah}(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 }(hjFhhhNhNubj)}(h``format.pix.sizeimage``h]hformat.pix.sizeimage}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubhL field (or the corresponding fields for other format types). Usually if the }(hjFhhhNhNubj)}(h``format.pix.sizeimage``h]hformat.pix.sizeimage}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubhX0 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.}(hjFhhhNhNubeh}(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 }(hjxhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubh and the }(hjxhhhNhNubj)}(h ``index``h]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubh fields respectively. On return }(hjxhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubh* can be smaller than the number requested.}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j V4L.v4l2_create_buffers (C type)c.V4L.v4l2_create_buffershNtauh1jhjhhhNhNubj#)}(hhh](j()}(hv4l2_create_buffersh]j.)}(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&]uh1jhjhhhhhKIubj4)}(hv4l2_create_buffersh]j:)}(hjh]hv4l2_create_buffers}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKIubeh}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhjhhhhhKIubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKIhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKIubeh}(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}|uh1j*hhhKKhjhhubhtable)}(hhh](h)}(hstruct v4l2_create_buffersh]hstruct v4l2_create_buffers}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj9ubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjLubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjLubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjLubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhj{ubah}(h]h ]h"]h$]h&]uh1jyhjvubjz)}(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&]uh1jyhjvubjz)}(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&]uh1jyhjvubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jyhjubjz)}(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&]uh1jyhjubjz)}(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)}(hjh]hVIDIOC_CREATE_BUFS}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj"reftyperef refexplicitrefwarnjvidioc_create_bufsuh1hhhhKWhj ubh will set }(hj hhhNhNubj)}(h ``index``h]hindex}(hj8hhhNhNubah}(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}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh and }(hj hhhNhNubj)}(h``format.type``h]h format.type}(hj\hhhNhNubah}(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}(hjnhhhNhNubah}(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 refexplicitrefwarnjvidioc_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&]uh1hhhhKWhj ubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjubah}(h]h ]h"]h$]h&]uh1jyhjubjz)}(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&]uh1jyhjubjz)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h``V4L2_MEMORY_USERPTR``h]hV4L2_MEMORY_USERPTR}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. See }(hjhhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjEh]h v4l2_memory}(hjGhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_memoryuh1hhhhK`hjubeh}(h]h ]h"]h$]h&]uh1hhhhK`hjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(hstruct :c:type:`v4l2_format`h](hstruct }(hjzhhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhKchjzubeh}(h]h ]h"]h$]h&]uh1hhhhKchjwubah}(h]h ]h"]h$]h&]uh1jyhjtubjz)}(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&]uh1jyhjtubjz)}(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&]uh1jyhjtubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jyhjubjz)}(hhh]h)}(h``capabilities``h]j)}(hj h]h capabilities}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jyhjubjz)}(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}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh and }(hj'hhhNhNubhemphasis)}(h*might*h]hmight}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jAhj'ubh support other }(hj'hhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjWh]h v4l2_memory}(hjYhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_memoryuh1hhhhKhhj'ubh8 types. It will not support any other capabilities. See }(hj'hhhNhNubh)}(h#:ref:`here `h]j)}(hjzh]hhere}(hj|hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjv4l2-buf-capabilitiesuh1hhhhKhhj'ubh for a list of the capabilities.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhj$ubh)}(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&]uh1hhhhKohj$ubeh}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj ubah}(h]h ]h"]h$]h&]uh1jyhj ubjz)}(hhh]h)}(h ``flags``h]j)}(hj# h]hflags}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj! ubah}(h]h ]h"]h$]h&]uh1hhhhKthj ubah}(h]h ]h"]h$]h&]uh1jyhj ubjz)}(hhh]h)}(hKSpecifies additional buffer management attributes. See :ref:`memory-flags`.h](h7Specifies additional buffer management attributes. See }(hjA hhhNhNubh)}(h:ref:`memory-flags`h]j)}(hjK h]h memory-flags}(hjM hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjI ubah}(h]h ]h"]h$]h&]refdocj refdomainjW reftyperef refexplicitrefwarnj memory-flagsuh1hhhhKuhjA ubh.}(hjA hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhj> ubah}(h]h ]h"]h$]h&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj ubah}(h]h ]h"]h$]h&]uh1jyhj ubjz)}(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&]uh1jyhj ubjz)}(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&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jthjqubju)}(hhh](jz)}(hhh]h)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj ubah}(h]h ]h"]h$]h&]uh1jyhj ubjz)}(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&]uh1jyhj ubjz)}(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&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jthjqubeh}(h]h ]h"]h$]h&]uh1johjLubeh}(h]h ]h"]h$]h&]colsKuh1jJhj9ubeh}(h]id1ah ]h"]h$]h&]uh1j7hjhhhNhNubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjN 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}(hjg 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)}(hj{ h]hGeneric Error Codes}(hj} hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjy ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj gen-errorsuh1hhhhKhj_ ubh chapter.}(hj_ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjN 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 refexplicitrefwarnjmmapuh1hhhhKhj 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}(hj: 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&]uh1jhjN 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}jr hsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjyfootnote_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]hasnameids}(jr hjq jn hhjjjjjK jH ji jf u nametypes}(jr jq hjjjK ji uh}(hhjn hhhjjj j)jjjH jjjjf jN jA j9u 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&]levelKtypeINFOsourcehlineKuh1j uba transformerN include_log] decorationNhhub.