Use gstreamer gtk signaling in QT application
-
Hi i am writing a small Qt Application and part of that would be a webRTC video stream for which planned to use Gstreamer. This is where i can into problems.
Naturally my app is a QtApplication and is thus managed by Qt a processes. Now while planning the code I learned that The component webrtcbin from Gstreamer relies on GLib and the GTK signaling.
so things like g_signal_emit_by_name or
g_signal_connect
will run into nirvana without theGLib main loop
.Now after researching and getting a headache over this I hope that I overlooked something and that the power of the crowd-brain can help me with a hint.
An answer to any of the following would help
- Is it possible to have Glib signaling inside a QT app?
- Is it feasible/possible to run both main loops (QT and GLib)?
- Is there a good example on how to connect a gstremer pipeline with pure webrtc (not using webrtcbin)
-
@monkfood said in Use gstreamer gtk signaling in QT application:
g_main_loop_run
No need for this - g_main_context_iteration is enough. Otherwise QEventDispatcherGlib would somehow did not make sense when the glib functionality would not work.
-
Normally Qt is compiled with glib support (QEventDispatcherGlib) so I don't see any problems.
-
@Christian-Ehrlicher Hi, true that, but does that also mean that the signal loops are compatible? Meaning will the Glib signals work without running
g_main_loop_run
-
@monkfood said in Use gstreamer gtk signaling in QT application:
g_main_loop_run
No need for this - g_main_context_iteration is enough. Otherwise QEventDispatcherGlib would somehow did not make sense when the glib functionality would not work.
-
@Christian-Ehrlicher OH that is very nice, so running the g_main_context_iteration manually in a regular Qtimer. I will try that
-
@monkfood said in Use gstreamer gtk signaling in QT application:
so running the g_main_context_iteration manually in a regular Qtimer. I will try that
Why?
What do you think is QEventDispatcherGlib for? For handling messages from MS windows? -
@Christian-Ehrlicher to be honest, i have no idea what is about since I am unable to find any reference in the Qt Documentation. An on the web only some class diagram from Qt4. So i need to go with what I can find, learn, understand and then use.
However, I value your input a lot and will read some more in the direction of QAbstractEventDispatcher and QEventDispatcherGlib.
-