diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/pykms/pyvid.cpp | 9 |
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) |