diff options
Diffstat (limited to 'src/android/camera_device.h')
-rw-r--r-- | src/android/camera_device.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/android/camera_device.h b/src/android/camera_device.h index caa617dc..55eac317 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -13,7 +13,6 @@ #include <libcamera/buffer.h> #include <libcamera/camera.h> -#include <libcamera/object.h> #include <libcamera/request.h> #include <libcamera/stream.h> @@ -21,19 +20,23 @@ class CameraMetadata; -class CameraDevice : public libcamera::Object +class CameraDevice { public: CameraDevice(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera); ~CameraDevice(); - int open(); + int open(const hw_module_t *hardwareModule); void close(); + + unsigned int id() const { return id_; } + camera3_device_t *camera3Device() { return &camera3Device_; } + void setCallbacks(const camera3_callback_ops_t *callbacks); - camera_metadata_t *getStaticMetadata(); + const camera_metadata_t *getStaticMetadata(); const camera_metadata_t *constructDefaultRequestSettings(int type); int configureStreams(camera3_stream_configuration_t *stream_list); - void processCaptureRequest(camera3_capture_request_t *request); + int processCaptureRequest(camera3_capture_request_t *request); void requestComplete(libcamera::Request *request); private: @@ -52,6 +55,9 @@ private: std::unique_ptr<CameraMetadata> getResultMetadata(int frame_number, int64_t timestamp); + unsigned int id_; + camera3_device_t camera3Device_; + bool running_; std::shared_ptr<libcamera::Camera> camera_; std::unique_ptr<libcamera::CameraConfiguration> config_; |