summaryrefslogtreecommitdiff
path: root/py/pykms
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-06-02 12:14:11 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-06-02 12:14:11 +0300
commitcb0786049f960f2bd383617151b01318e02e9ff9 (patch)
tree8dbce2679b0b87e9edf971efc87a05c1550d0ffb /py/pykms
parent719f72a065f07c59e77a25b1f23daccb5369cf81 (diff)
parent7450c364a57ec7d9e2abd61ac6e025c53e9e7a42 (diff)
Merge branch 'color-features' of git://github.com/jsarha/kmsxx
Diffstat (limited to 'py/pykms')
-rw-r--r--py/pykms/pykmsbase.cpp3
-rw-r--r--py/pykms/pykmsutil.cpp10
2 files changed, 12 insertions, 1 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index d013f1f..604e07c 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -33,6 +33,7 @@ void init_pykmsbase(py::module &m)
.def("get_prop_value", (uint64_t (DrmPropObject::*)(const string&) const)&DrmPropObject::get_prop_value)
.def("set_prop_value",(int (DrmPropObject::*)(const string&, uint64_t)) &DrmPropObject::set_prop_value)
.def("get_prop_value_as_blob", &DrmPropObject::get_prop_value_as_blob)
+ .def("get_prop", &DrmPropObject::get_prop)
;
py::class_<Connector, Connector*>(m, "Connector", py::base<DrmPropObject>())
@@ -50,6 +51,7 @@ void init_pykmsbase(py::module &m)
py::class_<Crtc, Crtc*>(m, "Crtc", py::base<DrmPropObject>())
.def("set_mode", &Crtc::set_mode)
+ .def("disable_mode", &Crtc::disable_mode)
.def("page_flip",
[](Crtc* self, Framebuffer& fb, py::object ob)
{
@@ -86,6 +88,7 @@ void init_pykmsbase(py::module &m)
py::class_<Property, Property*>(m, "Property", py::base<DrmObject>())
.def_property_readonly("name", &Property::name)
+ .def_property_readonly("enums", &Property::get_enums)
;
py::class_<Blob>(m, "Blob", py::base<DrmObject>())
diff --git a/py/pykms/pykmsutil.cpp b/py/pykms/pykmsutil.cpp
index cb09dea..a5a6041 100644
--- a/py/pykms/pykmsutil.cpp
+++ b/py/pykms/pykmsutil.cpp
@@ -40,9 +40,17 @@ void init_pykmstest(py::module &m)
py::arg("crtc"),
py::arg("format") = PixelFormat::Undefined)
;
+ py::enum_<YUVType>(m, "YUVType")
+ .value("BT601_Lim", YUVType::BT601_Lim)
+ .value("BT601_Full", YUVType::BT601_Full)
+ .value("BT709_Lim", YUVType::BT709_Lim)
+ .value("BT709_Full", YUVType::BT709_Full)
+ ;
// Use lambdas to handle IMappedFramebuffer
- m.def("draw_test_pattern", [](MappedFramebuffer& fb) { draw_test_pattern(fb); } );
+ m.def("draw_test_pattern", [](MappedFramebuffer& fb, YUVType yuvt) { draw_test_pattern(fb, yuvt); },
+ py::arg("fb"),
+ py::arg("yuvt") = YUVType::BT601_Lim);
m.def("draw_color_bar", [](MappedFramebuffer& fb, int old_xpos, int xpos, int width) {
draw_color_bar(fb, old_xpos, xpos, width);
} );