summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/vimc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/pipeline/vimc.cpp')
-rw-r--r--src/libcamera/pipeline/vimc.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index 292900bc..3fb5cacd 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -82,6 +82,11 @@ public:
const StreamRoles &roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
+ int exportFrameBuffers(Camera *camera, Stream *stream,
+ std::vector<std::unique_ptr<FrameBuffer>> *buffers) override;
+ int importFrameBuffers(Camera *camera, Stream *stream) override;
+ void freeFrameBuffers(Camera *camera, Stream *stream) override;
+
int allocateBuffers(Camera *camera,
const std::set<Stream *> &streams) override;
int freeBuffers(Camera *camera,
@@ -259,6 +264,30 @@ int PipelineHandlerVimc::configure(Camera *camera, CameraConfiguration *config)
return 0;
}
+int PipelineHandlerVimc::exportFrameBuffers(Camera *camera, Stream *stream,
+ std::vector<std::unique_ptr<FrameBuffer>> *buffers)
+{
+ VimcCameraData *data = cameraData(camera);
+ unsigned int count = stream->configuration().bufferCount;
+
+ return data->video_->exportBuffers(count, buffers);
+}
+
+int PipelineHandlerVimc::importFrameBuffers(Camera *camera, Stream *stream)
+{
+ VimcCameraData *data = cameraData(camera);
+ unsigned int count = stream->configuration().bufferCount;
+
+ return data->video_->importBuffers(count);
+}
+
+void PipelineHandlerVimc::freeFrameBuffers(Camera *camera, Stream *stream)
+{
+ VimcCameraData *data = cameraData(camera);
+
+ data->video_->releaseBuffers();
+}
+
int PipelineHandlerVimc::allocateBuffers(Camera *camera,
const std::set<Stream *> &streams)
{