diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-01-20 01:09:34 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-02-13 13:23:23 +0200 |
commit | da3f50ee9cdb6896b365357b0d35577344f72ba4 (patch) | |
tree | 4e3b31244adeb18f0458992153ab77ce47dd1c93 /src/android/camera_proxy.h | |
parent | 8a8502ec0ea5e64a0c44eb18aac0ecd4b6771e6b (diff) |
android: Remove internal thread
Now that libcamera creates threads internally and doesn't rely on an
application-provided event loop, remove the thread from the Android
Camera HAL layer. The CameraProxy class becomes meaningless, remove it
and communicate directly from the CameraHalManager to the CameraDevice.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_proxy.h')
-rw-r--r-- | src/android/camera_proxy.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/android/camera_proxy.h b/src/android/camera_proxy.h deleted file mode 100644 index e8cfbc9d..00000000 --- a/src/android/camera_proxy.h +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2019, Google Inc. - * - * camera_proxy.h - Proxy to camera devices - */ -#ifndef __ANDROID_CAMERA_PROXY_H__ -#define __ANDROID_CAMERA_PROXY_H__ - -#include <memory> - -#include <hardware/camera3.h> - -#include <libcamera/camera.h> - -class CameraDevice; - -class CameraProxy -{ -public: - CameraProxy(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera); - ~CameraProxy(); - - int open(const hw_module_t *hardwareModule); - void close(); - - void initialize(const camera3_callback_ops_t *callbacks); - const 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); - - unsigned int id() const { return id_; } - camera3_device_t *camera3Device() { return &camera3Device_; } - -private: - unsigned int id_; - CameraDevice *cameraDevice_; - camera3_device_t camera3Device_; -}; - -#endif /* __ANDROID_CAMERA_PROXY_H__ */ |