Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved QT and GStreamer

    General and Desktop
    4
    9
    4267
    Loading More Posts
    • 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.
    • R
      rtavakko last edited by

      Hi guys,

      So from what I understad, GStreamer can be directly integrated into QT? I'm trying to use GStreamer for hardware-accelerated video playback.

      Any ideas on how to get started with this?

      Cheers!

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        Hi
        It's used as a backend (on linux) for the Qt multimedia classes.

        Do you mean to use it like that (indirectly) or a more direct way like
        https://gstreamer.freedesktop.org/bindings/qt.html
        (this is old. just as example)

        1 Reply Last reply Reply Quote 1
        • R
          rtavakko last edited by

          Thanks for the response! Directly would be definitely ideal. I'm on Windows with GCC 32 / 64 bit. Is there a way I could interface directly with GStreamer's C API from C++?

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @rtavakko last edited by mrjj

            @rtavakko
            Hi
            Well i have never tried to use it on Windows, but it seems quite supported
            https://gstreamer.freedesktop.org/documentation/installing/on-windows.html?gi-language=c
            However, they seem to supply libs only for visual studio so not sure mingw will work out of the box but it might be able to compile it yourself and get up and running.
            Its mostly C api and should not be that picky with compiler however it might use external libs that harder to compile on windows.

            Regarding using it.
            There are many examples
            https://gstreamer.freedesktop.org/documentation/tutorials/playback/hardware-accelerated-video-decoding.html?gi-language=c

            R 1 Reply Last reply Reply Quote 3
            • S
              Shazter last edited by

              I would recommend different solution.

              1. First think about good IPC for Windows
              2. Make gstreamer as microservice for windows with your ipc interface, means you are able to use MSCV Compiler
              3. Talk through IPC with gstreamer and your main application

              I learned over the time separating between Main Application (GUI) and Micro services is the best way to go, because some 3rd Party Libs are only for MSCV Compiler, minGw, Python, Javascript etc. available and adapting to different compiler is sometimes very tricky and maintenance caused by updates over time consumes a lot of time. Is better to spent the time into good IPC Infrastructure and communicated with back-end services. Additional by large projects teams/persons are able to work on different services at same time without big issue.

              1 Reply Last reply Reply Quote 2
              • K
                kuzulis Qt Champions 2020 last edited by

                I'm trying to use GStreamer for hardware-accelerated video playback.
                I'm on Windows with GCC 32 / 64 bit.

                AFAIK, GStreamer does not provide an accelerated modules for Windows (at least in default installer package).

                IMHO, a better case is to use the VLC library, or the native DirectShow API.

                1 Reply Last reply Reply Quote 2
                • R
                  rtavakko @mrjj last edited by

                  @mrjj Makes sense. So far its been ok with GCC at least through OpenCV. I'm working on getting it to work directly it seems to link & compile but still working on getting it to work.

                  @Shazter I'm a little new to all of this stuff and not sure how this IPC would work. Do you have any examples I could look at?

                  @kuzulis Do you know which packages are unsupported on windows? The VLC library seems pretty good, I'll look into that.

                  1 Reply Last reply Reply Quote 0
                  • K
                    kuzulis Qt Champions 2020 last edited by kuzulis

                    @rtavakko said in QT and GStreamer:

                    @kuzulis Do you know which packages are unsupported on windows?

                    As I know (if I'm not mistake) there are no HW accelerated coders/decoders at all (e.g. for h264 and etc).. F.e. for Intel, NVidia and AMD video-cards you need to download and compile the appropriate plugins separatelly from the external repos. You can google it himself.

                    1 Reply Last reply Reply Quote 1
                    • R
                      rtavakko last edited by rtavakko

                      It seems that for windows the best solution is to use the MSVC compiler in QT and Windows Media Foundation or Directshow. There is a bit of work to setup MSVC compilers in QT especially if you're used to the MINGW but the examples that come with Microsoft SDK mostly run ok.
                      GStreamer works as well but it seems to be a bit more work to get it to work. I'll experiment a little more with it on Windows.

                      UPDATE:

                      For anyone linking directly to GStreamer on windows, you will need the Windows SDK (specifically the WS2_32 library). There is almost no information on which specific libraries to link to. These are the base libraries needed to run the examples:

                      gstreamer-1.0
                      glib-2.0
                      gmodule-2.0
                      gobject-2.0
                      intl (Not sure if this one is hardware-dependent)
                      WS2_32 (part of windows SDK)

                      Apart from WS2_32 every library is part of the GStreamer runtime / development installation.

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post