7 #ifndef __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ 8 #define __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ 15 #include <sys/types.h> 28 class CameraConfiguration;
30 class DeviceEnumerator;
34 class PipelineHandler;
78 virtual int exportFrameBuffers(
Camera *camera,
Stream *stream,
79 std::vector<std::unique_ptr<FrameBuffer>> *buffers) = 0;
82 virtual void stop(
Camera *camera) = 0;
83 bool hasPendingRequests(
const Camera *camera)
const;
85 void queueRequest(
Request *request);
88 void completeRequest(
Request *request);
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;
106 virtual void disconnect();
108 std::vector<std::shared_ptr<MediaDevice>> mediaDevices_;
109 std::vector<std::weak_ptr<Camera>> cameras_;
110 std::map<const Camera *, std::unique_ptr<CameraData>> cameraData_;
123 std::shared_ptr<PipelineHandler> create(
CameraManager *manager);
125 const std::string &
name()
const {
return name_; }
128 static std::vector<PipelineHandlerFactory *> &factories();
136 #define REGISTER_PIPELINE_HANDLER(handler) \ 137 class handler##Factory final : public PipelineHandlerFactory \ 140 handler##Factory() : PipelineHandlerFactory(#handler) {} \ 143 PipelineHandler *createInstance(CameraManager *manager) \ 145 return new handler(manager); \ 148 static handler##Factory global_##handler##Factory; Utilities to help constructing class interfaces.
std::vector< StreamRole > StreamRoles
A vector of StreamRole.
Definition: stream.h:68
ControlList properties_
The list of properties supported by the camera.
Definition: pipeline_handler.h:49
Video stream for a camera.
Definition: stream.h:70
Top-level libcamera namespace.
Definition: bound_method.h:15
CameraManager * manager_
The Camera manager associated with the pipeline handler.
Definition: pipeline_handler.h:102
Frame buffer data and its associated dynamic metadata.
Definition: buffer.h:37
const std::string & name() const
Retrieve the factory name.
Definition: pipeline_handler.h:125
Video stream for a Camera.
Hold configuration for streams of the camera.
Definition: camera.h:30
A map of ControlId to ControlInfo.
Definition: controls.h:301
ControlInfoMap controlInfo_
The set of controls supported by the camera.
Definition: pipeline_handler.h:48
A frame capture request.
Definition: request.h:27
#define LIBCAMERA_DISABLE_COPY(klass)
Disable copy construction and assignment of the klass.
CameraData(PipelineHandler *pipe)
Construct a CameraData instance for the given pipeline handler.
Definition: pipeline_handler.h:40
Create and manage cameras based on a set of media devices.
Definition: pipeline_handler.h:57
Camera device.
Definition: camera.h:74
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:784
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
Base object to support automatic signal disconnection.
uint32_t requestSequence_
The queuing sequence of the request.
Definition: pipeline_handler.h:51
const ControlIdMap controls
List of all supported libcamera controls.
Definition: control_ids.cpp:893
Associate a list of ControlId with their values for an object.
Definition: controls.h:346
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:37
Registration of PipelineHandler classes and creation of instances.
Definition: pipeline_handler.h:117