summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/ipu3/cio2.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-06-01 22:02:13 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-06-26 13:32:29 +0200
commitbb82835bc59b578d055010e4abc8e5c282a505b9 (patch)
tree6682f7e113fe975777a3545dbb6d044e1f2b5b43 /src/libcamera/pipeline/ipu3/cio2.h
parentd2c94456d98126ab1aa4c7672b86226c50cb869f (diff)
libcamera: ipu3: cio2: Make the V4L2 devices private
In order to make the CIO2 easier to extend with new features make the V4L2 devices (sensor, CIO2 and video device) private members. This requires a few helper functions to be added to allow for the IPU3 driver to still be able to interact with all parts of the CIO2. These helper functions will later be extended to add new features to the IPU3 pipeline. 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>
Diffstat (limited to 'src/libcamera/pipeline/ipu3/cio2.h')
-rw-r--r--src/libcamera/pipeline/ipu3/cio2.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
index 58254332..8cb90c9d 100644
--- a/src/libcamera/pipeline/ipu3/cio2.h
+++ b/src/libcamera/pipeline/ipu3/cio2.h
@@ -11,6 +11,8 @@
#include <queue>
#include <vector>
+#include <libcamera/signal.h>
+
namespace libcamera {
class CameraSensor;
@@ -36,6 +38,8 @@ public:
StreamConfiguration generateConfiguration(Size size) const;
int allocateBuffers();
+ int exportBuffers(unsigned int count,
+ std::vector<std::unique_ptr<FrameBuffer>> *buffers);
void freeBuffers();
FrameBuffer *getBuffer();
@@ -44,11 +48,18 @@ public:
int start();
int stop();
- V4L2VideoDevice *output_;
- V4L2Subdevice *csi2_;
- CameraSensor *sensor_;
+ CameraSensor *sensor() { return sensor_; }
+
+ int queueBuffer(FrameBuffer *buffer);
+ Signal<FrameBuffer *> bufferReady;
private:
+ void cio2BufferReady(FrameBuffer *buffer);
+
+ CameraSensor *sensor_;
+ V4L2Subdevice *csi2_;
+ V4L2VideoDevice *output_;
+
std::vector<std::unique_ptr<FrameBuffer>> buffers_;
std::queue<FrameBuffer *> availableBuffers_;
};