From 3d6262d56406e17163deddafbe2b928168784594 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 17 Jun 2019 02:34:29 +0300 Subject: utils: Add a dump_framebuffer() method Add a new method to write the contents of a framebuffer to a file descriptor. This can be used to capture frames from writeback connectors. Signed-off-by: Laurent Pinchart --- py/pykms/pykmsutil.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py') diff --git a/py/pykms/pykmsutil.cpp b/py/pykms/pykmsutil.cpp index 666cbdc..6cf79ee 100644 --- a/py/pykms/pykmsutil.cpp +++ b/py/pykms/pykmsutil.cpp @@ -59,4 +59,7 @@ void init_pykmstest(py::module& m) draw_circle(fb, xCenter, yCenter, radius, color); }); m.def("draw_text", [](Framebuffer& fb, uint32_t x, uint32_t y, const string& str, RGB color) { draw_text(fb, x, y, str, color); }); + m.def("dump_framebuffer", [](Framebuffer& fb, int fd) { + dump_framebuffer(fb, fd); + }); } -- cgit v1.2.3