Re: [PATCHv2 3/9] v4l: add buffer exporting via dmabuf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rémi,

On Wednesday 01 August 2012 10:37:02 Rémi Denis-Courmont wrote:
> On Tue, 31 Jul 2012 23:52:35 +0200, Laurent Pinchart wrote:
> >> I want to receive the video buffers in user space for processing.
> >> Typically "processing" is software encoding or conversion. That's what
> >> virtually any V4L application does on the desktop...
> > 
> > But what prevents you from using MMAP ?
> 
> As I wrote several times earlier, MMAP uses fixed number of buffers. In
> some tightly controlled media pipeline with low latency, it might work.

Sorry about making you repeat.

> But in general, the V4L element in the pipeline does not know how fast the
> downstream element(s) will consume the buffers. Thus it has to copy from
> the MMAP buffers into anonymous user memory pending processing. Then any
> dequeued buffer can be requeued as soon as possible. In theory, it might
> also be that, even though the latency is known, the number of required
> buffers exceeds the maximum MMAP buffers count of the V4L device. Either
> way, user space ends up doing memory copy from MMAP to custom buffers.
> 
> This problem does not exist with USERBUF - the V4L2 element can simply
> allocate a new buffer for each dequeued buffer.

What about using the CREATE_BUFS ioctl to add new MMAP buffers at runtime ?

> By the way, this was already discussed a few months ago for the exact same
> DMABUF patch series...

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux