Add color format related methods and memebers to pykmsbase.
authorJyri Sarha <jsarha@ti.com>
Tue, 7 Mar 2017 16:05:06 +0000 (18:05 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 16 Mar 2017 12:33:02 +0000 (14:33 +0200)
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
py/pykms/pykmsbase.cpp

index ecb6edb903a1392cdd99b43489017d34f0b47b59..30536086d6bb4bffd6697cb5ee2237dafed8a1f7 100644 (file)
@@ -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")