/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2018, Google Inc. * * camera.h - Camera object interface */ #ifndef __LIBCAMERA_CAMERA_H__ #define __LIBCAMERA_CAMERA_H__ #include #include #include #include namespace libcamera { class PipelineHandler; class Stream; class StreamConfiguration; class Camera final { public: static std::shared_ptr create(PipelineHandler *pipe, const std::string &name, const std::vector &streams); Camera(const Camera &) = delete; Camera &operator=(const Camera &) = delete; const std::string &name() const; Signal disconnected; int acquire(); void release(); const std::vector &streams() const; std::map streamConfiguration(std::vector &streams); int configureStreams(std::map &config); private: Camera(PipelineHandler *pipe, const std::string &name); ~Camera(); friend class PipelineHandler; void disconnect(); std::shared_ptr pipe_; std::string name_; std::vector streams_; bool acquired_; bool disconnected_; }; } /* namespace libcamera */ #endif /* __LIBCAMERA_CAMERA_H__ */