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:
parent
9ed9d9b3c1
commit
b5010e4cee
4 changed files with 51 additions and 14 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue