diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2024-09-16 01:24:20 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-09-25 23:54:42 +0300 |
commit | 505e49b76ed4f3040182f66a1c3884ea1648a612 (patch) | |
tree | 608f4c1c54df6f24316cd00485f042af45d81319 /src/android | |
parent | ab48009a81c929d37d236554ca0914b9a8994a4a (diff) |
py: Add bindings for ControlId enum name
Add python bindings for querying enum value names from a ControlId.
Example usage:
>>> cid
libcamera.ControlId(16, AwbMode, ControlType.Integer32)
>>> cid.enumerators()
{0: 'AwbAuto', 1: 'AwbIncandescent', 2: 'AwbTungsten', 3: 'AwbFluorescent', 4: 'AwbIndoor', 5: 'AwbDaylight', 6: 'AwbCloudy', 7: 'AwbCustom'}
>>> cinfo
libcamera.ControlInfo([2..5])
>>> cinfo.values
[2, 3, 5]
>>> [cid.enumerators()[v] for v in cinfo.values]
['AwbTungsten', 'AwbFluorescent', 'AwbDaylight']
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android')
0 files changed, 0 insertions, 0 deletions