summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-06-17 02:34:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-09 22:51:47 +0300
commite0c8403c3c5670c290e0c6ec653b3abd151a9ced (patch)
treeba7515f914ae48f03abaaafdccb9912e9b6e8984 /py
parent74d60e252839a03a2f179d82126d1e0db1b4184e (diff)
utils: Add a dump_framebuffer() methodwriteback
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'py')
-rw-r--r--py/pykms/pykmsutil.cpp3
1 files changed, 3 insertions, 0 deletions
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);
+ });
}