• Home
  • Raw
  • Download

Lines Matching full:buffer

28 unique buffer type value. The sets are independent and each set can hold
34 of buffers and buffer type, for example ``V4L2_BUF_TYPE_VIDEO_CAPTURE``.
48 multi-planar API, every plane of every buffer has to be mapped
50 be equal to number of buffers times number of planes in each buffer. The
86 printf("Not enough buffer memory\\n");
94 struct v4l2_buffer buffer;
96 memset(&buffer, 0, sizeof(buffer));
97 buffer.type = reqbuf.type;
98 buffer.memory = V4L2_MEMORY_MMAP;
99 buffer.index = i;
101 if (-1 == ioctl (fd, VIDIOC_QUERYBUF, &buffer)) {
106 buffers[i].length = buffer.length; /* remember for munmap() */
108 buffers[i].start = mmap(NULL, buffer.length,
111 fd, buffer.m.offset);
132 /* Our current format uses 3 planes per buffer */
159 printf("Not enough buffer memory\\n");
167 struct v4l2_buffer buffer;
170 memset(&buffer, 0, sizeof(buffer));
171 buffer.type = reqbuf.type;
172 buffer.memory = V4L2_MEMORY_MMAP;
173 buffer.index = i;
176 buffer.length = FMT_NUM_PLANES;
177 buffer.m.planes = planes;
179 if (ioctl(fd, VIDIOC_QUERYBUF, &buffer) < 0) {
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,
191 fd, buffer.m.planes[j].m.mem_offset);
208 Conceptually streaming drivers maintain two buffer queues, an incoming
221 index number of a buffer (struct :c:type:`v4l2_buffer`
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.
234 To enqueue and dequeue a buffer applications use the
236 ioctl. The status of a buffer being mapped, enqueued, full or empty can
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()`
268 One could use one file descriptor and set the buffer type field