libcamera: camera: extend camera object to support streams
A camera consists of one or more video streams originating from the same video source. The different streams could for example have access to different hardware blocks in the video pipeline and therefore be able to process the video source in different ways. All static information describing each stream need to be recorded at camera creation. After a camera is created an application can retrieve the static information about its streams at any time. Update all pipeline handlers to register one stream per camera, this will be extended in the future for some of the pipelines. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
ff96eb2ebb
commit
75476f86d2
5 changed files with 44 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <libcamera/camera.h>
|
||||
#include <libcamera/stream.h>
|
||||
|
||||
#include "device_enumerator.h"
|
||||
#include "media_device.h"
|
||||
|
@ -23,6 +24,7 @@ public:
|
|||
|
||||
private:
|
||||
std::shared_ptr<MediaDevice> media_;
|
||||
Stream stream_;
|
||||
};
|
||||
|
||||
PipeHandlerVimc::PipeHandlerVimc(CameraManager *manager)
|
||||
|
@ -56,7 +58,8 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
|
|||
|
||||
media_->acquire();
|
||||
|
||||
std::shared_ptr<Camera> camera = Camera::create(this, "Dummy VIMC Camera");
|
||||
std::vector<Stream *> streams{ &stream_ };
|
||||
std::shared_ptr<Camera> camera = Camera::create(this, "Dummy VIMC Camera", streams);
|
||||
registerCamera(std::move(camera));
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue