Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Use gstreamer gtk signaling in QT application
Forum Updated to NodeBB v4.3 + New Features

Use gstreamer gtk signaling in QT application

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 592 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    monkfood
    wrote on 5 Dec 2021, 10:14 last edited by
    #1

    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 the GLib 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)
    1 Reply Last reply
    0
    • M monkfood
      5 Dec 2021, 10:33

      @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

      C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 5 Dec 2021, 10:37 last edited by
      #4

      @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.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      M 1 Reply Last reply 5 Dec 2021, 10:50
      1
      • C Online
        C Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on 5 Dec 2021, 10:22 last edited by
        #2

        Normally Qt is compiled with glib support (QEventDispatcherGlib) so I don't see any problems.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        M 1 Reply Last reply 5 Dec 2021, 10:33
        0
        • C Christian Ehrlicher
          5 Dec 2021, 10:22

          Normally Qt is compiled with glib support (QEventDispatcherGlib) so I don't see any problems.

          M Offline
          M Offline
          monkfood
          wrote on 5 Dec 2021, 10:33 last edited by
          #3

          @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

          C 1 Reply Last reply 5 Dec 2021, 10:37
          0
          • M monkfood
            5 Dec 2021, 10:33

            @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

            C Online
            C Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 5 Dec 2021, 10:37 last edited by
            #4

            @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.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            M 1 Reply Last reply 5 Dec 2021, 10:50
            1
            • C Christian Ehrlicher
              5 Dec 2021, 10:37

              @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.

              M Offline
              M Offline
              monkfood
              wrote on 5 Dec 2021, 10:50 last edited by
              #5

              @Christian-Ehrlicher OH that is very nice, so running the g_main_context_iteration manually in a regular Qtimer. I will try that

              C 1 Reply Last reply 5 Dec 2021, 11:28
              0
              • M monkfood
                5 Dec 2021, 10:50

                @Christian-Ehrlicher OH that is very nice, so running the g_main_context_iteration manually in a regular Qtimer. I will try that

                C Online
                C Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 5 Dec 2021, 11:28 last edited by
                #6

                @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?

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                M 1 Reply Last reply 6 Dec 2021, 07:35
                0
                • C Christian Ehrlicher
                  5 Dec 2021, 11:28

                  @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?

                  M Offline
                  M Offline
                  monkfood
                  wrote on 6 Dec 2021, 07:35 last edited by
                  #7

                  @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.

                  1 Reply Last reply
                  0
                  • R RJV B referenced this topic on 3 Aug 2024, 11:34

                  3/7

                  5 Dec 2021, 10:33

                  • Login

                  • Login or register to search.
                  3 out of 7
                  • First post
                    3/7
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved