diff options
author | Han-Lin Chen <hanlinchen@chromium.org> | 2021-12-03 17:44:23 +0800 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-12-03 10:23:26 +0000 |
commit | 5d2aad02e86d456f77ca2bab5025ff7044f10125 (patch) | |
tree | ad192409d4b1b736db4d6b04110ad90fe282697d /include | |
parent | 95937ff189f0730a9cb4817a4606a9eb7b82188a (diff) |
libcamera: add model() for retrieving model name in V4L2Subdevice
CameraSensor retrieves model name from media entity. Move the heuristics
method into V4L2Subdevice, so CameraLens can reuse the function.
Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/v4l2_subdevice.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h index 484fcfdd..a6873b67 100644 --- a/include/libcamera/internal/v4l2_subdevice.h +++ b/include/libcamera/internal/v4l2_subdevice.h @@ -61,6 +61,8 @@ public: int setFormat(unsigned int pad, V4L2SubdeviceFormat *format, Whence whence = ActiveFormat); + const std::string &model(); + static std::unique_ptr<V4L2Subdevice> fromEntityName(const MediaDevice *media, const std::string &entity); @@ -75,6 +77,8 @@ private: unsigned int code); const MediaEntity *entity_; + + std::string model_; }; } /* namespace libcamera */ |