libcamera: buffer: Switch from Plane to FrameBuffer::Plane
It is not libcamera's responsibility to handle memory mappings. Switch from the soon to be removed Plane class which deals with memory mappings to FrameBuffer::Plane which just describes it. This makes the transition to the full FrameBuffer easier. As the full FrameBuffer interface has not yet spread to all parts of libcamera core it is hard to create efficient caching of memory mappings in the qcam application. This will be fixed in a later patch, for now the dmabuf is mapped and unmapped each time it is seen by the application. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -135,7 +135,7 @@ void V4L2Camera::freeBuffers()
|
||||
FileDescriptor V4L2Camera::getBufferFd(unsigned int index)
|
||||
{
|
||||
Stream *stream = *camera_->streams().begin();
|
||||
return FileDescriptor(stream->buffers()[index].planes()[0].dmabuf());
|
||||
return stream->buffers()[index].planes()[0].fd;
|
||||
}
|
||||
|
||||
int V4L2Camera::streamOn()
|
||||
|
||||
Reference in New Issue
Block a user