mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
py: libcamera: Define and use Orientation
Define an enumeration type for Orientation and expose the CameraConfiguration::orientation property in place of CameraConfiguration::transform. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-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
69b2dc16a0
commit
a28f871836
2 changed files with 11 additions and 0 deletions
|
@ -31,4 +31,14 @@ void init_py_enums(py::module &m)
|
|||
.value("String", ControlType::ControlTypeString)
|
||||
.value("Rectangle", ControlType::ControlTypeRectangle)
|
||||
.value("Size", ControlType::ControlTypeSize);
|
||||
|
||||
py::enum_<Orientation>(m, "Orientation")
|
||||
.value("Rotate0", Orientation::Rotate0)
|
||||
.value("Rotate0Mirror", Orientation::Rotate0Mirror)
|
||||
.value("Rotate180", Orientation::Rotate180)
|
||||
.value("Rotate180Mirror", Orientation::Rotate180Mirror)
|
||||
.value("Rotate90Mirror", Orientation::Rotate90Mirror)
|
||||
.value("Rotate270", Orientation::Rotate270)
|
||||
.value("Rotate270Mirror", Orientation::Rotate270Mirror)
|
||||
.value("Rotate90", Orientation::Rotate90);
|
||||
}
|
||||
|
|
|
@ -330,6 +330,7 @@ PYBIND11_MODULE(_libcamera, m)
|
|||
.def_property_readonly("empty", &CameraConfiguration::empty)
|
||||
.def_readwrite("sensor_config", &CameraConfiguration::sensorConfig)
|
||||
.def_readwrite("transform", &CameraConfiguration::transform);
|
||||
.def_readwrite("orientation", &CameraConfiguration::orientation);
|
||||
|
||||
pyCameraConfigurationStatus
|
||||
.value("Valid", CameraConfiguration::Valid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue