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>
This commit is contained in:
committed by
Laurent Pinchart
parent
9ed9d9b3c1
commit
b5010e4cee
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user