I’m having some issues trying to get gstreamer to work with QT.
Trying to use gstreamer for some basic background processing of a pipewire video stream. But I’m having troubles because the glib main loop doesn’t seem able to run whilst the QT app has started. I borrowed the gstreamer glib code from another (working) project which doesn’t use QT, so I know it works elsewhere.
This is the function which runs in a new thread and is supposed to create the glib main loop:
Fyi I believe the problem is with the glib loop because if I try run this code before app = QApplication(sys.argv)it actually does start, but running it after that point causes it to hang and then time out with “Source selection timed out”. I think running it before causes some troubles elsewhere with QT, and probably would have wider ramifications on the app than I’d like to think through right now.
How can I use gstreamer alongside in my QT app?
If anyone can give me any help or advice I would very much appreciate it! Thanks
Qt on Linux likely uses a glib mainloop for its own event processing. You can just use Qt’s glib mainloop for your own event processing and do not have to create your own.
Otherwise you would likely need to ensure that the glib main loop you create is not the default.