summaryrefslogtreecommitdiff
path: root/py/pykms
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2018-10-29 12:15:09 -0500
committerTomi Valkeinen <tomi.valkeinen@iki.fi>2018-11-01 16:43:35 +0200
commit4097a83c68b89a70179244da01db0691a6c7c269 (patch)
treeff87a7892dd3ecccce1ccf6de19026094fa40a9b /py/pykms
parent419babcd8ef423e787e122044601567fbff3457c (diff)
videodevice: Add selection API support
Add selection API support to the VideoSteamer class. Signed-off-by: Benoit Parrot <bparrot@ti.com>
Diffstat (limited to 'py/pykms')
-rw-r--r--py/pykms/pyvid.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/py/pykms/pyvid.cpp b/py/pykms/pyvid.cpp
index 92006c4..8b0450a 100644
--- a/py/pykms/pyvid.cpp
+++ b/py/pykms/pyvid.cpp
@@ -30,6 +30,15 @@ void init_pyvid(py::module &m)
.def("set_port", &VideoStreamer::set_port)
.def_property_readonly("formats", &VideoStreamer::get_formats)
.def("set_format", &VideoStreamer::set_format)
+ .def("get_selection", [](VideoStreamer *self) {
+ uint32_t left, top, width, height;
+ self->get_selection(left, top, width, height);
+ return make_tuple(left, top, width, height);
+ } )
+ .def("set_selection", [](VideoStreamer *self, uint32_t left, uint32_t top, uint32_t width, uint32_t height) {
+ self->set_selection(left, top, width, height);
+ return make_tuple(left, top, width, height);
+ } )
.def("set_queue_size", &VideoStreamer::set_queue_size)
.def("queue", &VideoStreamer::queue)
.def("dequeue", &VideoStreamer::dequeue)