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>
This commit is contained in:
parent
95937ff189
commit
5d2aad02e8
3 changed files with 59 additions and 30 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue