Home > other >  Questions about the v4l2 buffer in quantity.
Questions about the v4l2 buffer in quantity.

Time:09-29

Read online application, use v4l2 framework, the number of buffer are basically three, did the theory support, if set to a, what will be the result? For the column buffer principle is not very understanding, have a great god guide once?

CodePudding user response:

The buf for image data in the drive, drive data storage can be out of the team after the meeting, a buf, the team after the driver is not buf could fit the image data,
And the buf is to use physical memory, can not use too much, at least make sure & gt; The user program and drive=2, easy to use,

CodePudding user response:

reference 1st floor zarelaky response:
the buf for image data in the drive, drive data storage can be out of the team after the meeting, a buf, the team after the driver is not buf could fit the image data,
And the buf is to use physical memory, can not use too much, at least make sure & gt; The user program and drive=2, easy to use,


Input the column if there is no buffer what consequence can you produce? Is that video stream is stuck, when I will be that a buffer to the team, and then save the data?

CodePudding user response:

refer to the second floor stoneboy_z response:
Quote: refer to 1st floor zarelaky response:

The buf for image data in the drive, drive data storage can be out of the team after the meeting, a buf, the team after the driver is not buf could fit the image data,
And the buf is to use physical memory, can not use too much, at least make sure & gt; The user program and drive=2, easy to use,


Input the column if there is no buffer what consequence can you produce? Is that video stream is stuck, when I will be that a buffer to the team, and then save the data?


Queue without buf, whether need to see you when you open the device using the O_NONBLOCK non-blocking mode, if use, is not blocked, program returns - EAGAIN directly, if not, will be a blocking call,

If you are interested in can under a Linux kernel code and see this part of the functions in the kernel code locations, the corresponding ioctrl for
VIDIOC_REQBUFS,
VIDIOC_QUERYBUF,
VIDIOC_QBUF,
VIDIOC_DQBUF,
The realization of a kernel implementation can refer to the following code:
Drivers/media/v4l2 - core/v4l2 - ioctl. C
Drivers/media/platform/manipulated - camif/camif - capture. C

  • Related