Any good example of Python code for GStreamer + Wayland?

You can find a C example for the GStreamer gtksink and gtkglsink here: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/tree/master/tests/examples/gtk

I also have examples in Rust but I don’t know if there are examples for Python somewhere.

Generally it all works the same though: you create the sink element like any other GStreamer element, via the "widget" property you can get a GtkWidget and that you would include in your UI then. Anything passed to the GStreamer sink would then be rendered inside that GtkWidget.

1 Like