]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/commitdiff
py: PixelFormat & DumbFB impro
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Sat, 11 Jun 2016 20:42:42 +0000 (23:42 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Sat, 11 Jun 2016 20:43:05 +0000 (23:43 +0300)
py/pykmsbase.cpp

index 3d1998e6723ef5372edc6f7cb327658f27be66ed..d63d4fc39c3b1b55c550e2ba67ed1cbf29734490 100644 (file)
@@ -92,10 +92,17 @@ void init_pykmsbase(py::module &m)
        py::class_<DumbFramebuffer>(m, "DumbFramebuffer",  py::base<Framebuffer>())
                        .def(py::init<Card&, uint32_t, uint32_t, const string&>(),
                             py::keep_alive<1, 2>())    // Keep Card alive until this is destructed
+                       .def(py::init<Card&, uint32_t, uint32_t, PixelFormat>(),
+                            py::keep_alive<1, 2>())    // Keep Card alive until this is destructed
                        .def_property_readonly("width", &DumbFramebuffer::width)
                        .def_property_readonly("height", &DumbFramebuffer::height)
                        ;
 
+       py::enum_<PixelFormat>(m, "PixelFormat")
+                       .value("XRGB8888", PixelFormat::XRGB8888)
+                       .value("YUYV", PixelFormat::YUYV)
+                       ;
+
        py::class_<Videomode>(m, "Videomode")
                        .def(py::init<>())