From bd38112b7795b79c7056cfe6e9d713e80ee74586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 5 Feb 2019 17:36:04 +0100 Subject: libcamera: camera: Extend the interface to support capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- include/libcamera/camera.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/libcamera/camera.h') diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index 1c0ee07c..bf70255a 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -18,6 +18,7 @@ namespace libcamera { class Buffer; class PipelineHandler; +class Request; class Stream; class StreamConfiguration; @@ -44,6 +45,15 @@ public: streamConfiguration(std::vector &streams); int configureStreams(std::map &config); + int allocateBuffers(); + void freeBuffers(); + + Request *createRequest(); + int queueRequest(Request *request); + + int start(); + int stop(); + private: Camera(PipelineHandler *pipe, const std::string &name); ~Camera(); -- cgit v1.2.1