libcamera: v4l2_videodevice: Extract exportDmabufFd()

The part in createPlane() that exports a dma buffer from a video device
will be used directly by the FrameBuffer interface. Break it out to a
separate function.

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:
Niklas Söderlund
2019-11-21 16:06:27 +01:00
parent 3f9d34f55e
commit 13724144f9
2 changed files with 28 additions and 16 deletions
+2
View File
@@ -26,6 +26,7 @@ class Buffer;
class BufferMemory;
class BufferPool;
class EventNotifier;
class FileDescriptor;
class MediaDevice;
class MediaEntity;
@@ -179,6 +180,7 @@ private:
int requestBuffers(unsigned int count);
int createPlane(BufferMemory *buffer, unsigned int index,
unsigned int plane, unsigned int length);
FileDescriptor exportDmabufFd(unsigned int index, unsigned int plane);
Buffer *dequeueBuffer();
void bufferAvailable(EventNotifier *notifier);