Calling Gst.init()
or the option group API is sufficient to initialize GStreamer and use GStreamer API.
It is necessary to call XInitThreads()
before initializing GTK if you’re using any of the X11 GStreamer elements due to how X11 works. If you don’t use any (not even indirectly), then this is not needed.
XInitThreads()
must be called before the first usage of any X11 APIs and GTK doesn’t call it itself while calling it from the X11 GStreamer elements would usually be too late.
You won’t have such problems when using Wayland or on literally any other platform than X11.