summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2017-03-07 18:05:06 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-03-16 14:33:02 +0200
commite3701914cc9e7156fcd50a75516327a8887eefe3 (patch)
tree2942bc5bdef6a9f884b2b5a5a9cef51e3d6efcb0
parente37d31c82f809a83b372f239ae12b9b4e79bfa37 (diff)
Add color format related methods and memebers to pykmsbase.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--py/pykms/pykmsbase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index ecb6edb..3053608 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -71,6 +71,7 @@ void init_pykmsbase(py::module &m)
py::class_<Plane, Plane*>(m, "Plane", py::base<DrmPropObject>())
.def("supports_crtc", &Plane::supports_crtc)
+ .def_property_readonly("formats", &Plane::get_formats)
.def_property_readonly("plane_type", &Plane::plane_type)
.def("__repr__", [](const Plane& o) { return "<pykms.Plane " + to_string(o.id()) + ">"; })
;
@@ -138,8 +139,10 @@ void init_pykmsbase(py::module &m)
.value("ABGR8888", PixelFormat::ABGR8888)
.value("RGB888", PixelFormat::RGB888)
+ .value("BGR888", PixelFormat::BGR888)
.value("RGB565", PixelFormat::RGB565)
+ .value("BGR565", PixelFormat::BGR565)
;
py::class_<Videomode>(m, "Videomode")