summaryrefslogtreecommitdiff
path: root/src/v4l2/meson.build
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2020-12-11 09:53:35 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-12-11 14:13:38 +0200
commit2bc6ba2e1f013530677080c60ab0a24ce39fcf0b (patch)
tree794fb9387684bac8e951b4cb4e3e30fc4c2429e8 /src/v4l2/meson.build
parentc2df74364fe380b17ae00e0178fa0e56b4dd55b2 (diff)
android: camera_device: Use Camera3StreamConfig in configureStreams()
Use the newly introduced Camera3StreamConfig to associate the Android requested streams with the associated StreamConfiguration in a vector of configurations. This change prepares to sort the vector of configuration before using it to configure the Camera and populate the streams_ vector. No functional changes intended. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/meson.build')
0 files changed, 0 insertions, 0 deletions
t; #include <linux/v4l2-controls.h> #include <linux/videodev2.h> namespace libcamera { class V4L2ControlInfo { public: V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl); unsigned int id() const { return id_; } unsigned int type() const { return type_; } size_t size() const { return size_; } const std::string &name() const { return name_; } int64_t min() const { return min_; } int64_t max() const { return max_; } private: unsigned int id_; unsigned int type_; size_t size_; std::string name_; int64_t min_; int64_t max_; }; using V4L2ControlInfoMap = std::map<unsigned int, V4L2ControlInfo>; class V4L2Control { public: V4L2Control(unsigned int id, int value = 0) : id_(id), value_(value) {} int64_t value() const { return value_; } void setValue(int64_t value) { value_ = value; } unsigned int id() const { return id_; } private: unsigned int id_; int64_t value_; }; class V4L2ControlList { public: using iterator = std::vector<V4L2Control>::iterator; using const_iterator = std::vector<V4L2Control>::const_iterator; iterator begin() { return controls_.begin(); } const_iterator begin() const { return controls_.begin(); } iterator end() { return controls_.end(); } const_iterator end() const { return controls_.end(); } bool empty() const { return controls_.empty(); } std::size_t size() const { return controls_.size(); } void clear() { controls_.clear(); } void add(unsigned int id, int64_t value = 0); V4L2Control *getByIndex(unsigned int index); V4L2Control *operator[](unsigned int id); private: std::vector<V4L2Control> controls_; }; } /* namespace libcamera */ #endif /* __LIBCAMERA_V4L2_CONTROLS_H__ */