I am developing an application that should receive images from a camera device and display them in a GTK window.
The camera provides raw RGB images (3 bytes per pixel, no alpha, fixed size) with a varying frame rate (1-50 frames per second).
I have already done all this hardware and now I have a callback function that is called with every new image taken by the camera.
What is the easiest, but fast enough way to display these images in my window?
Here is what I have already tried:
using gtk in the drawing area: it basically works, but it is displayed so slowly that the drawing processes overlap, and the application crashes after the first few frames even when capturing 1 fps speed. gdk_draw_rgb_image()
highlighting GdkPixbuf for each new frame and calling in gtk widgets: only the first frame is displayed, after which I do not see any changes to the window. Maybe there is a mistake in my code, but I donβt know if it will be fast enough. gtk_image_set_from_pixbuf()
using Cairo ( cairo_set_source_surface(), then cairo_paint()): it seemed pretty fast, but the image looked a bit too much, I don't know if the image format is compatible.
, - gstreamer , , , .
!