mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
py: Re-structure the controls API
Add ControlInfo class and change the controls related methods to resemble the C++ API (e.g. no more string based control methods). We don't implement ControlList or ControlInfoMap but just expose the same data via standard Python dict. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
3c82ae3821
commit
1698442aa8
3 changed files with 61 additions and 60 deletions
|
@ -46,14 +46,14 @@ class CameraContext:
|
|||
def do_cmd_list_props(self):
|
||||
print('Properties for', self.id)
|
||||
|
||||
for name, prop in self.camera.properties.items():
|
||||
print('\t{}: {}'.format(name, prop))
|
||||
for cid, val in self.camera.properties.items():
|
||||
print('\t{}: {}'.format(cid, val))
|
||||
|
||||
def do_cmd_list_controls(self):
|
||||
print('Controls for', self.id)
|
||||
|
||||
for name, prop in self.camera.controls.items():
|
||||
print('\t{}: {}'.format(name, prop))
|
||||
for cid, info in self.camera.controls.items():
|
||||
print('\t{}: {}'.format(cid, info))
|
||||
|
||||
def do_cmd_info(self):
|
||||
print('Stream info for', self.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue