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. QtGStreamer build system integration
Forum Updated to NodeBB v4.3 + New Features

QtGStreamer build system integration

Scheduled Pinned Locked Moved General and Desktop
14 Posts 5 Posters 10.6k Views 1 Watching
  • 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
    musimbate
    wrote on 5 Oct 2014, 14:37 last edited by
    #1

    Hi,
    I am trying to build "QtGstreamer":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/ in my Qt 4 application on windows . I am following the guide "here ":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/build_system_integration.html .

    It says:
    @
    If you are using cmake as your build system, using QtGStreamer is quite easy. You can just do:
    find_package(QtGStreamer) # for Qt4 QtGStreamer

    ..... OR .....

    find_package(Qt5GStreamer) # for Qt5 QtGStreamer

    @

    and

    @
    If you are using qmake as your build system, you can use QtGStreamer via pkg-config. For example:
    CONFIG += link_pkgconfig
    PKGCONFIG += QtGStreamer-1.0

    @

    Since I already use qmake to build my project ,I think cmake does not concern me and I am wondering how adding
    @
    CONFIG += link_pkgconfig
    PKGCONFIG += QtGStreamer-1.0

    @

    to my pro file will help build QtGstreamer .I have downloaded QGstreamer and my folder structure is as follows:
    @

    • qt-gstreamer-1.2.0
      |------cmake[Folder]
      |------codegen[Folder]
      |------docs[Folder]
      |------elements[Folder]
      |------examples[Folder]
      |------src[Folder]
      |------tests[Folder]
      |------CMakelists[File]
      |------COPYING[File]
      |------Doxyfile.in[File]
      |------HACKING[File]
      |------NEWS[File]
      |------README[File]
      @

    Lets suppose it is stored on my C:\ drive .What steps do I need to carry out so I can build an instance of QtGstreamer I can link against in my application?I saw pkgconfing mentioned ;How is PKGCONFIG used exactly ?Any pointers or hints will be greatly appreciated.

    Thank you for your time.

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 5 Oct 2014, 16:16 last edited by
      #2

      I can't help you with building QtGStreamer but these instructions are not for building it. They are for linking an app to a QtGStreamer library via package manager on Linux.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 5 Oct 2014, 22:18 last edited by
        #3

        Hi,

        To add to Chris, IIRC, you can find a pkgconfig.exe for windows. But if you want to avoid spending time on this, just use the old method:
        @QTGSTREAMERPATH = C:/where_QtGStreamer_hides
        INCLUDEPATH += $$QTSTREAMERPATH/include
        LIBS +=
        -L$$QTSTREAMERPATH/bin(or lib etc…)
        -lQtGStreamer-1.0
        @

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          musimbate
          wrote on 6 Oct 2014, 01:36 last edited by
          #4

          Thank you Chris and SGaist for the replies ,
          SGaist:

          @
          QTGSTREAMERPATH = C:/where_QtGStreamer_hides
          INCLUDEPATH += $$QTSTREAMERPATH/include
          LIBS +=
          -L$$QTSTREAMERPATH/bin(or lib etc…)
          -lQtGStreamer-1.0

          @

          These statements are for linking against already built binaries right?I only have the source code and could not find prebuilt binaries for windows(THE FOLDER STRUCTURE I SHOWED WAS FOR MY SOURCE CODE .I guess I have to go through the process of building myself .

          This is a section on building from the README file:

          @
          2.3 Procedure

          The build procedure is simple:

          $ mkdir build && cd build
          $ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/prefix
          $ make
          $ make install

          @

          I am going to download and install cmake and try to build with msvs2010 .Any advice on this would be helpful as this is my first time to use cmake.

          Thank you for your time .

          Why join the navy if you can be a pirate?-Steve Jobs

          1 Reply Last reply
          0
          • M Offline
            M Offline
            musimbate
            wrote on 6 Oct 2014, 07:10 last edited by
            #5

            I have managed to install cmake and run
            @
            cmake ..
            @

            In a build directory I created under qt-gstreamer-1.2.0 but I am getting the following errors:
            @

            -- Building for: Visual Studio 10 2010
            -- Using Qt4 (min: 4.7)
            -- Could NOT find Boost
            -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
            -- Could NOT find GSTREAMER_BASE_LIBRARY
            .........
            @

            It seems cmake in not picking up the location of boost ,I got it under
            @
            C:\local\boost_1_53_0\boost
            @

            I saw in my CMakelists.txt file the following statement:

            @
            find_package(Boost 1.39)
            macro_log_feature(Boost_FOUND "Boost" "Required for building QtGLib" "http://www.boost.org/" TRUE "1.39")
            @

            I think that it is the failure of this statement that is causing the errors.
            To sum it up: How do I make cmake aware of the location of the boost libraries and other unrecognized components .For example I got gstreamer installed but it is also missing it .Is it through edits to the CMakelists.txt file?

            I realize this is not really a Qt question but QtGstreamer is Qt right ? :-)

            Thank you for your time.

            Why join the navy if you can be a pirate?-Steve Jobs

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 6 Oct 2014, 11:30 last edited by
              #6

              Use
              -D "CMAKE_PREFIX_PATH":http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html ="path to boost cmake files"

              when calling cmake

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Solidus
                wrote on 26 Nov 2014, 19:15 last edited by
                #7

                Hello.

                I've ended up on the same problem. Did you manage to find a solution for this?

                Thanks in advance.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Solidus
                  wrote on 26 Nov 2014, 19:15 last edited by
                  #8

                  Hello.

                  I've ended up on the same problem. Did you manage to find a solution for this?

                  Thanks in advance.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    musimbate
                    wrote on 27 Nov 2014, 04:07 last edited by
                    #9

                    Hi,
                    I could not build it and I used ffmpeg for my needs .But is seems some people have been able to build it here : http://gstreamer-devel.966125.n4.nabble.com/Problems-building-QtGStreamer-release-build-on-Windows-td4657300.html#a4669019 .I haven't tried this yet as I am tight on time but I am interested in knowing if you get it to build :-) .

                    Why join the navy if you can be a pirate?-Steve Jobs

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      musimbate
                      wrote on 27 Nov 2014, 04:07 last edited by
                      #10

                      Hi,
                      I could not build it and I used ffmpeg for my needs .But is seems some people have been able to build it here : http://gstreamer-devel.966125.n4.nabble.com/Problems-building-QtGStreamer-release-build-on-Windows-td4657300.html#a4669019 .I haven't tried this yet as I am tight on time but I am interested in knowing if you get it to build :-) .

                      Why join the navy if you can be a pirate?-Steve Jobs

                      1 Reply Last reply
                      0
                      • dionis.D Offline
                        dionis.D Offline
                        dionis.
                        wrote on 6 Aug 2015, 17:41 last edited by
                        #11

                        Hi,

                        I know it has been some time, but have you managed to solve this? I have to build some apps with GStreamer, but don't know how to include it and access it from Qt.

                        TIA

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          musimbate
                          wrote on 9 Aug 2015, 02:48 last edited by
                          #12

                          Sorry I haven't had the time to look into this lately.I have used ffmpeg to solve my problems.If this helps ,I used it as an external process and this saves the hassle to go and build it yourself :-) .

                          Why join the navy if you can be a pirate?-Steve Jobs

                          1 Reply Last reply
                          0
                          • dionis.D Offline
                            dionis.D Offline
                            dionis.
                            wrote on 11 Aug 2015, 17:08 last edited by
                            #13

                            Thanks for your reply @musimbate , I managed to link the gstreamer library header files, so I didn't build it, but just include its path and access the header files and libs. Anyway, now I have an error of The program has unexpectedly finished. When I try to debug it, I get the following error in a pop-up:
                            During startup program excited with code 0xc0000135.

                            On General Messages:
                            <dump of C:\Qt\Qt5.5.0_Android\5.5\mingw492_32\qml>:1:24: Reading only version 1.1 parts.
                            <dump of C:\Qt\Qt5.5.0_Android\5.5\mingw492_32\qml>:10:5: Expected only Component and ModuleApi object definitions.

                            I read many questions realated to this error, but none helped, I think is an error with the gstream library, but may be a compiler/debugger error also. I am just asking, in case you have encountered any error using ffmpeg.

                            I am relatively new to Qt, and never encountered this error before. If you need any code:

                            .pro:

                            QT += core gui

                            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

                            TARGET = GStreamer-test5
                            TEMPLATE = app

                            SOURCES += main.cpp
                            mainwindow.cpp

                            HEADERS += mainwindow.h

                            FORMS += mainwindow.ui

                            INCLUDEPATH += C:/gstreamer/1.0/x86/include/gstreamer-1.0
                            C:/gstreamer/1.0/x86/lib/gstreamer-1.0/include
                            C:/gstreamer/1.0/x86/include/glib-2.0
                            C:/gstreamer/1.0/x86/lib/glib-2.0/include

                            LIBS += -L C:/gstreamer/1.0/x86/lib/ -lgstreamer-1.0

                            and .main:

                            #include "mainwindow.h"
                            #include <QApplication>

                            #include <QDebug>

                            #include <stdio.h>
                            #include "gst/gst.h"

                            void *__gxx_personality_v0;

                            int main(int argc, char *argv[])
                            {
                            QApplication a(argc, argv);
                            MainWindow w;
                            w.show();

                              const gchar *nano_str;
                              guint major, minor, micro, nano;
                            
                              gst_init (&argc, &argv);
                            
                              gst_version (&major, &minor, &micro, &nano);
                            
                              if (nano == 1)
                                nano_str = "(CVS)";
                              else if (nano == 2)
                                nano_str = "(Prerelease)";
                              else
                                nano_str = "";
                            
                              // printf ("This program is linked against GStreamer %d.%d.%d %s\n", major, minor, micro, nano_str);
                            
                              qDebug() << "This program is linked against GStreamer %d.%d.%d %s\n", major, minor, micro, nano_str ;
                            
                            return a.exec();
                            

                            Firstly, I had the error :
                            undefined reference to `__gxx_personality_v0' , but fixed it by adding void *__gxx_personality_v0;, although I don't know what excatly it is.

                            Its been three days I struggle with this problem. Any help appreciated, or maybe if you can help me by some code on how to access the header files and libs.
                            Thank you!

                            1 Reply Last reply
                            1
                            • M Offline
                              M Offline
                              musimbate
                              wrote on 12 Aug 2015, 14:07 last edited by
                              #14

                              I wish I could be of more help but I could not build it myself.

                              Why join the navy if you can be a pirate?-Steve Jobs

                              1 Reply Last reply
                              0

                              • Login

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