diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-07-04 11:30:52 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-07-14 16:01:10 +0300 |
commit | b5010e4cee6a84f2101a34318221623d8cba009a (patch) | |
tree | 719466715f69c2aa2a663c918707efdb1ad38267 /src/libcamera/pipeline/vimc.cpp | |
parent | 9ed9d9b3c1a5e6a51e1aa869c758458c57c1a0f1 (diff) |
libcamera: pipeline: Support importing buffers
Add support for importing external buffers in all pipeline handlers.
Use the stream memory type in the pipeline handlers during buffer
allocation to import buffers to or export buffers from the video device.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/pipeline/vimc.cpp')
-rw-r--r-- | src/libcamera/pipeline/vimc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 7d96c364..61b68a32 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -202,7 +202,10 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera, LOG(VIMC, Debug) << "Requesting " << cfg.bufferCount << " buffers"; - return data->video_->exportBuffers(&stream->bufferPool()); + if (stream->memoryType() == InternalMemory) + return data->video_->exportBuffers(&stream->bufferPool()); + else + return data->video_->importBuffers(&stream->bufferPool()); } int PipelineHandlerVimc::freeBuffers(Camera *camera, |