libcamera: camera: Extend the interface to support capture
In order to support capture, the camera needs methods to allocate and free buffers, to start and stop the capture and to queue requests. Define those interfaces in the Camera class and implement them to call the corresponding pipeline handler methods. Once a camera is started the pipeline handler of the camera will begin processing requests queued to the camera by the application until it gets stopped. Once a request is created it can be queued to the camera and the application will be notified asynchronously once the request is completed and be able to process all the buffers involved in the request. At this point the request objects don't support controls. This will be extended in the future. 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:
parent
98edf29e01
commit
bd38112b77
3 changed files with 159 additions and 5 deletions
|
@ -18,6 +18,7 @@ namespace libcamera {
|
|||
|
||||
class Buffer;
|
||||
class PipelineHandler;
|
||||
class Request;
|
||||
class Stream;
|
||||
class StreamConfiguration;
|
||||
|
||||
|
@ -44,6 +45,15 @@ public:
|
|||
streamConfiguration(std::vector<Stream *> &streams);
|
||||
int configureStreams(std::map<Stream *, StreamConfiguration> &config);
|
||||
|
||||
int allocateBuffers();
|
||||
void freeBuffers();
|
||||
|
||||
Request *createRequest();
|
||||
int queueRequest(Request *request);
|
||||
|
||||
int start();
|
||||
int stop();
|
||||
|
||||
private:
|
||||
Camera(PipelineHandler *pipe, const std::string &name);
|
||||
~Camera();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue