Lines Matching +full:no +full:- +full:can +full:- +full:fd
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
21 application's address space. Device memory can be for example the video
22 memory on a graphics card with a video capture add-on. However, being
24 drivers support streaming as well, allocating buffers in DMA-able main
27 A driver can support many sets of buffers. Each set is identified by a
28 unique buffer type value. The sets are independent and each set can hold
35 This ioctl can also be used to change the number of buffers or to free
38 Before applications can access the buffers they must map them into their
40 location of the buffers in device memory can be determined with the
41 :ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar
45 multi-planar API, struct :c:type:`v4l2_buffer` contains an
48 multi-planar API, every plane of every buffer has to be mapped
52 allocated in physical memory, as opposed to virtual memory, which can be
56 Example: Mapping buffers in the single-planar API
59 .. code-block:: c
73 if (-1 == ioctl (fd, VIDIOC_REQBUFS, &reqbuf)) {
75 printf("Video capturing or mmap-streaming is not supported\\n");
101 if (-1 == ioctl (fd, VIDIOC_QUERYBUF, &buffer)) {
111 fd, buffer.m.offset);
126 Example: Mapping buffers in the multi-planar API
129 .. code-block:: c
146 if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) < 0) {
148 printf("Video capturing or mmap-streaming is not supported\\n");
174 /* length in struct v4l2_buffer in multi-planar API stores the size
179 if (ioctl(fd, VIDIOC_QUERYBUF, &buffer) < 0) {
191 fd, buffer.m.planes[j].m.mem_offset);
217 to function, apart of this no limit exists on the number of buffers
218 applications can enqueue in advance, or dequeue and process. They can
220 the driver can *fill* enqueued *empty* buffers in any order. [#f2]_ The
222 ``index``) plays no role here, it only identifies the buffer.
227 the application waits until a filled buffer can be dequeued, and
228 re-enqueues the buffer when the data is no longer needed. Output
232 must wait until an empty buffer can be dequeued and reused.
236 ioctl. The status of a buffer being mapped, enqueued, full or empty can
239 buffers can be dequeued. By default :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`
240 blocks when no buffer is in the outgoing queue. When the ``O_NONBLOCK``
243 error code when no buffer is available. The :c:func:`select()`
252 no notion of doing anything "now" on a multitasking system, if an
262 <func-mmap>`, :c:func:`munmap()`, :ref:`select()
263 <func-select>` and :c:func:`poll()` function. [#f3]_
279 buffers on a LIFO-basis, taking advantage of caches holding
280 scatter-gather lists and the like.