libcamera: pipeline_handler: Extend the interface to support capture

In order to support capture, the pipeline handler needs methods to
allocate and free buffers, to start and stop the capture and to queue
requests. Define those interfaces in the PipelineHandler class and
implement them as stubs in the existing pipeline handlers.

This initial implementation only considers the allocation of new
buffers. Future work would need to expand this to also cover importing
buffers from an external source.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund
2019-01-23 20:11:34 +01:00
committed by Laurent Pinchart
parent 5aef825764
commit 5239f6e656
5 changed files with 179 additions and 0 deletions
+34
View File
@@ -30,6 +30,14 @@ public:
int configureStreams(Camera *camera,
std::map<Stream *, StreamConfiguration> &config) override;
int allocateBuffers(Camera *camera, Stream *stream) override;
int freeBuffers(Camera *camera, Stream *stream) override;
int start(const Camera *camera) override;
void stop(const Camera *camera) override;
int queueRequest(const Camera *camera, Request *request) override;
bool match(DeviceEnumerator *enumerator);
private:
@@ -82,6 +90,32 @@ int PipelineHandlerUVC::configureStreams(Camera *camera,
return 0;
}
int PipelineHandlerUVC::allocateBuffers(Camera *camera, Stream *stream)
{
return -ENOTRECOVERABLE;
}
int PipelineHandlerUVC::freeBuffers(Camera *camera, Stream *stream)
{
return 0;
}
int PipelineHandlerUVC::start(const Camera *camera)
{
LOG(UVC, Error) << "TODO: start camera";
return 0;
}
void PipelineHandlerUVC::stop(const Camera *camera)
{
LOG(UVC, Error) << "TODO: stop camera";
}
int PipelineHandlerUVC::queueRequest(const Camera *camera, Request *request)
{
return 0;
}
bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)
{
DeviceMatch dm("uvcvideo");