/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2019, Google Inc. * * camera_device.h - libcamera Android Camera Device */ #ifndef __ANDROID_CAMERA_DEVICE_H__ #define __ANDROID_CAMERA_DEVICE_H__ #include #include #include #include #include #include #include #include "message.h" class CameraMetadata; class ThreadRpc; class CameraDevice : public libcamera::Object { public: CameraDevice(unsigned int id, const std::shared_ptr &camera); ~CameraDevice(); void call(ThreadRpc *rpc); int open(); void close(); void setCallbacks(const camera3_callback_ops_t *callbacks); camera_metadata_t *getStaticMetadata(); const camera_metadata_t *constructDefaultRequestSettings(int type); int configureStreams(camera3_stream_configuration_t *stream_list); int processCaptureRequest(camera3_capture_request_t *request); void requestComplete(libcamera::Request *request, const std::map &buffers); private: struct Camera3RequestDescriptor { Camera3RequestDescriptor(unsigned int frameNumber, unsigned int numBuffers); ~Camera3RequestDescriptor(); uint32_t frameNumber; uint32_t numBuffers; camera3_stream_buffer_t *buffers; }; void notifyShutter(uint32_t frameNumber, uint64_t timestamp); void notifyError(uint32_t frameNumber, camera3_stream_t *stream); std::unique_ptr getResultMetadata(int frame_number, int64_t timestamp); bool running_; std::shared_ptr camera_; std::unique_ptr config_; CameraMetadata *staticMetadata_; std::map requestTemplates_; const camera3_callback_ops_t *callbacks_; }; #endif /* __ANDROID_CAMERA_DEVICE_H__ */ r.svg?h=pobrn/rebase&id=1a082a3e957bc669ae7b143e04d8d1012dddac4c'>diff
blob: f8886eca8e6e4e3b6efdd4a11957528ea2e0f4cd (plain)
1
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-twitter"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>