/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2020, Google Inc. * * camera_worker.h - Process capture requests on behalf of the Camera HAL */ #ifndef __ANDROID_CAMERA_WORKER_H__ #define __ANDROID_CAMERA_WORKER_H__ #include #include #include #include #include #include #include class CameraDevice; class CaptureRequest { public: CaptureRequest(libcamera::Camera *camera); const std::vector &fences() const { return acquireFences_; } libcamera::ControlList &controls() { return request_->controls(); } const libcamera::ControlList &metadata() const { return request_->metadata(); } unsigned long cookie() const { return request_->cookie(); } void addBuffer(libcamera::Stream *stream, libcamera::FrameBuffer *buffer, int fence); void queue(); private: libcamera::Camera *camera_; std::vector acquireFences_; std::unique_ptr request_; }; class CameraWorker : private libcamera::Thread { public: CameraWorker(); void start(); void stop(); void queueRequest(CaptureRequest *request); protected: void run() override; private: class Worker : public libcamera::Object { public: void processRequest(CaptureRequest *request); private: int waitFence(int fence); }; Worker worker_; }; #endif /* __ANDROID_CAMERA_WORKER_H__ */ era/libcamera.git/tree/src/qcam/assets/feathericons/compass.svg?h=v0.4.0&id=a000a1f6e3208515200aaae6ca8128471c6ed9f3'>treecommitdiff
blob: 32962608031edac0fb09671cecd1c038945e29e8 (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-compass"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>