Lines Matching refs:buffers

18 Streaming is an I/O method where only pointers to buffers are exchanged
20 mapping is primarily intended to map buffers in device memory into the
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
32 To allocate device buffers applications call the
34 of buffers and buffer type, for example ``V4L2_BUF_TYPE_VIDEO_CAPTURE``.
35 This ioctl can also be used to change the number of buffers or to free
36 the allocated memory, provided none of the buffers are still mapped.
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
50 be equal to number of buffers times number of planes in each buffer. The
51 offset and length values must not be modified. Remember, the buffers are
53 swapped out to disk. Applications should free the buffers as soon as
56 Example: Mapping buffers in the single-planar API
65 } *buffers;
82 /* We want at least five buffers. */
85 /* You may need to free the buffers here. */
90 buffers = calloc(reqbuf.count, sizeof(*buffers));
91 assert(buffers != NULL);
106 buffers[i].length = buffer.length; /* remember for munmap() */
108 buffers[i].start = mmap(NULL, buffer.length,
113 if (MAP_FAILED == buffers[i].start) {
115 the buffers mapped so far. */
124 munmap(buffers[i].start, buffers[i].length);
126 Example: Mapping buffers in the multi-planar API
138 } *buffers;
155 /* We want at least five buffers. */
158 /* You may need to free the buffers here. */
163 buffers = calloc(reqbuf.count, sizeof(*buffers));
164 assert(buffers != NULL);
186 buffers[i].length[j] = buffer.m.planes[j].length; /* remember for munmap() */
188 buffers[i].start[j] = mmap(NULL, buffer.m.planes[j].length,
193 if (MAP_FAILED == buffers[i].start[j]) {
195 the buffers and planes mapped so far. */
206 munmap(buffers[i].start[j], buffers[i].length[j]);
213 as FIFOs, buffers will be output in the order enqueued in the incoming
216 The driver may require a minimum number of buffers enqueued at all times
217 to function, apart of this no limit exists on the number of buffers
219 also enqueue in a different order than buffers have been dequeued, and
220 the driver can *fill* enqueued *empty* buffers in any order. [#f2]_ The
224 Initially all mapped buffers are in dequeued state, inaccessible by the
226 mapped buffers, then to start capturing and enter the read loop. Here
229 applications fill and enqueue buffers, when enough buffers are stacked
231 In the write loop, when the application runs out of free buffers, it
239 buffers can be dequeued. By default :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`
251 removes all buffers from both queues as a side effect. Since there is
255 or outputted buffers.
277 order (such as video codecs) to return buffers earlier, reducing the
279 buffers on a LIFO-basis, taking advantage of caches holding