7 #ifndef __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ 8 #define __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ 15 #include <sys/types.h> 27 class CameraConfiguration;
29 class DeviceEnumerator;
33 class PipelineHandler;
50 std::unique_ptr<IPAProxy>
ipa_;
78 virtual int exportFrameBuffers(
Camera *camera,
Stream *stream,
79 std::vector<std::unique_ptr<FrameBuffer>> *buffers) = 0;
81 virtual int start(
Camera *camera) = 0;
82 virtual void stop(
Camera *camera) = 0;
90 const char *
name()
const {
return name_; }
93 void registerCamera(std::shared_ptr<Camera> camera,
94 std::unique_ptr<CameraData> data);
97 virtual int queueRequestDevice(
Camera *camera,
Request *request) = 0;
105 virtual void disconnect();
107 std::vector<std::shared_ptr<MediaDevice>> mediaDevices_;
108 std::vector<std::weak_ptr<Camera>> cameras_;
109 std::map<const Camera *, std::unique_ptr<CameraData>> cameraData_;
122 std::shared_ptr<PipelineHandler> create(
CameraManager *manager);
124 const std::string &
name()
const {
return name_; }
127 static std::vector<PipelineHandlerFactory *> &factories();
135 #define REGISTER_PIPELINE_HANDLER(handler) \ 136 class handler##Factory final : public PipelineHandlerFactory \ 139 handler##Factory() : PipelineHandlerFactory(#handler) {} \ 142 PipelineHandler *createInstance(CameraManager *manager) \ 144 return new handler(manager); \ 147 static handler##Factory global_##handler##Factory;
ControlList properties_
The list of properties supported by the camera.
Definition: pipeline_handler.h:49
Video stream for a camera.
Definition: stream.h:69
Definition: bound_method.h:15
CameraManager * manager_
The Camera manager associated with the pipeline handler.
Definition: pipeline_handler.h:101
Frame buffer data and its associated dynamic metadata.
Definition: buffer.h:36
const std::string & name() const
Retrieve the factory name.
Definition: pipeline_handler.h:124
Video stream for a Camera.
Hold configuration for streams of the camera.
Definition: camera.h:27
A map of ControlId to ControlInfo.
Definition: controls.h:296
ControlInfoMap controlInfo_
The set of controls supported by the camera.
Definition: pipeline_handler.h:48
A frame capture request.
Definition: request.h:25
std::unique_ptr< IPAProxy > ipa_
The IPA module used by the camera.
Definition: pipeline_handler.h:50
CameraData(PipelineHandler *pipe)
Construct a CameraData instance for the given pipeline handler.
Definition: pipeline_handler.h:39
Create and manage cameras based on a set of media devices.
Definition: pipeline_handler.h:57
Camera device.
Definition: camera.h:69
const char * name() const
Retrieve the pipeline handler name.
Definition: pipeline_handler.h:90
PipelineHandler * pipe_
The pipeline handler related to this CameraData instance.
Definition: pipeline_handler.h:46
std::list< Request * > queuedRequests_
The list of queued and not yet completed request.
Definition: pipeline_handler.h:47
const ControlIdMap properties
List of all supported libcamera properties.
Definition: property_ids.cpp:419
Description of a media device search pattern.
Definition: device_enumerator.h:22
Provide access and manage all cameras in the system.
Definition: camera_manager.h:23
Enumerate, store and search media devices.
Definition: device_enumerator.h:36
std::vector< StreamRole > StreamRoles
A vector of StreamRole.
Definition: stream.h:67
Base object to support automatic signal disconnection.
Camera * camera_
The camera related to this CameraData instance.
Definition: pipeline_handler.h:45
const ControlIdMap controls
List of all supported libcamera controls.
Definition: control_ids.cpp:291
Associate a list of ControlId with their values for an object.
Definition: controls.h:341
Framework to manage controls related to an object.
Base object to support automatic signal disconnection.
Definition: object.h:24
Base class for platform-specific data associated with a camera.
Definition: pipeline_handler.h:36
Registration of PipelineHandler classes and creation of instances.
Definition: pipeline_handler.h:116