summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/ipu3/cio2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/pipeline/ipu3/cio2.cpp')
-rw-r--r--src/libcamera/pipeline/ipu3/cio2.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp
index cf5ccd60..972787a8 100644
--- a/src/libcamera/pipeline/ipu3/cio2.cpp
+++ b/src/libcamera/pipeline/ipu3/cio2.cpp
@@ -33,7 +33,7 @@ static const std::map<uint32_t, PixelFormat> mbusCodesToInfo = {
} /* namespace */
CIO2Device::CIO2Device()
- : output_(nullptr), csi2_(nullptr), sensor_(nullptr)
+ : sensor_(nullptr), csi2_(nullptr), output_(nullptr)
{
}
@@ -125,6 +125,8 @@ int CIO2Device::init(const MediaDevice *media, unsigned int index)
if (ret)
return ret;
+ output_->bufferReady.connect(this, &CIO2Device::cio2BufferReady);
+
return 0;
}
@@ -226,6 +228,12 @@ int CIO2Device::allocateBuffers()
return ret;
}
+int CIO2Device::exportBuffers(unsigned int count,
+ std::vector<std::unique_ptr<FrameBuffer>> *buffers)
+{
+ return output_->exportBuffers(count, buffers);
+}
+
void CIO2Device::freeBuffers()
{
/* The default std::queue constructor is explicit with gcc 5 and 6. */
@@ -266,4 +274,14 @@ int CIO2Device::stop()
return output_->streamOff();
}
+int CIO2Device::queueBuffer(FrameBuffer *buffer)
+{
+ return output_->queueBuffer(buffer);
+}
+
+void CIO2Device::cio2BufferReady(FrameBuffer *buffer)
+{
+ bufferReady.emit(buffer);
+}
+
} /* namespace libcamera */