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. Opencv with gstreamer
Qt 6.11 is out! See what's new in the release blog

Opencv with gstreamer

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.0k 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.
  • V Offline
    V Offline
    Vijaykarthikeyan
    wrote on last edited by
    #1

    I have successfully implemented video streaming using openCV method. Now, I want to integrate openCV with GStreamer. For that, I have downloaded GStreamer-1.0 packages. Now, what the problem is I don't know how to link the gstreamer with Qt. If I included this:
    CONFIG += link_pkgconfig

    Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
    PKGCONFIG += gstreamer-1.0

    I'm getting error like this:
    C:\gstreamer\1.0\mingw_x86_64\lib\libstdc++.a(ext11-inst.o):-1: error: undefined reference to `__imp__fseeki64'

    My compiler is : MINGW-64 bit compiler
    Im running in Windows Os.

    This is my .pro file:

    QT       += core gui quick multimediawidgets
    QT += network
    QT += widgets
    QT += quick
    QT += gamepad
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++17
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    #INCLUDEPATH += C:/gstreamer/1.0/mingw_x86_64/include
    # Tell qmake to use pkg-config to find QtGStreamer.
    CONFIG += link_pkgconfig
    
    # Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
    PKGCONFIG += gstreamer-1.0
    
    # Recommended if you are using g++ 4.5 or later. Must be removed for other compilers.
    #QMAKE_CXXFLAGS += -std=c++0x
    
    INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include"
    INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/gstreamer-1.0"
    INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/glib-2.0"
    INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/gobject-2.0"
    INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/lib/glib-2.0/include"
    
    
    SOURCES += \
        link.cpp \
        main.cpp \
        mainwindow.cpp \
        opencvimageprovider.cpp \
        videostreamer.cpp
    
    HEADERS += \
        link.h \
        mainwindow.h \
        opencvimageprovider.h \
        videostreamer.h
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    
    
    RESOURCES += \
        qml.qrc
        win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_core452.dll
    
        INCLUDEPATH += $$PWD/../../../opencv2/include
        DEPENDPATH += $$PWD/../../../opencv2/include
    
        win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_highgui452.dll
    
        INCLUDEPATH += $$PWD/../../../opencv2/include
        DEPENDPATH += $$PWD/../../../opencv2/include
    
        win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/bin/ -llibopencv_videoio452.dll
    
        INCLUDEPATH += $$PWD/../../../opencv2/include
        DEPENDPATH += $$PWD/../../../opencv2/include
    
        RESOURCES += \
            qml.qrc
    
    
        unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_imgproc452.dll
    
        INCLUDEPATH += $$PWD/../../../opencv2/include
        DEPENDPATH += $$PWD/../../../opencv2/include
    
    
    
        unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_imgcodecs452.dll
    
        INCLUDEPATH += $$PWD/../../../opencv2/include
        DEPENDPATH += $$PWD/../../../opencv2/include
    
        unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_calib3d452.dll
    
        INCLUDEPATH += $$PWD/../../../opencv2/include
        DEPENDPATH += $$PWD/../../../opencv2/include
    
    
    
    V 1 Reply Last reply
    0
    • V Vijaykarthikeyan

      I have successfully implemented video streaming using openCV method. Now, I want to integrate openCV with GStreamer. For that, I have downloaded GStreamer-1.0 packages. Now, what the problem is I don't know how to link the gstreamer with Qt. If I included this:
      CONFIG += link_pkgconfig

      Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
      PKGCONFIG += gstreamer-1.0

      I'm getting error like this:
      C:\gstreamer\1.0\mingw_x86_64\lib\libstdc++.a(ext11-inst.o):-1: error: undefined reference to `__imp__fseeki64'

      My compiler is : MINGW-64 bit compiler
      Im running in Windows Os.

      This is my .pro file:

      QT       += core gui quick multimediawidgets
      QT += network
      QT += widgets
      QT += quick
      QT += gamepad
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++17
      # You can make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      #INCLUDEPATH += C:/gstreamer/1.0/mingw_x86_64/include
      # Tell qmake to use pkg-config to find QtGStreamer.
      CONFIG += link_pkgconfig
      
      # Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
      PKGCONFIG += gstreamer-1.0
      
      # Recommended if you are using g++ 4.5 or later. Must be removed for other compilers.
      #QMAKE_CXXFLAGS += -std=c++0x
      
      INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include"
      INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/gstreamer-1.0"
      INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/glib-2.0"
      INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/gobject-2.0"
      INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/lib/glib-2.0/include"
      
      
      SOURCES += \
          link.cpp \
          main.cpp \
          mainwindow.cpp \
          opencvimageprovider.cpp \
          videostreamer.cpp
      
      HEADERS += \
          link.h \
          mainwindow.h \
          opencvimageprovider.h \
          videostreamer.h
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      
      
      RESOURCES += \
          qml.qrc
          win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_core452.dll
      
          INCLUDEPATH += $$PWD/../../../opencv2/include
          DEPENDPATH += $$PWD/../../../opencv2/include
      
          win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_highgui452.dll
      
          INCLUDEPATH += $$PWD/../../../opencv2/include
          DEPENDPATH += $$PWD/../../../opencv2/include
      
          win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/bin/ -llibopencv_videoio452.dll
      
          INCLUDEPATH += $$PWD/../../../opencv2/include
          DEPENDPATH += $$PWD/../../../opencv2/include
      
          RESOURCES += \
              qml.qrc
      
      
          unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_imgproc452.dll
      
          INCLUDEPATH += $$PWD/../../../opencv2/include
          DEPENDPATH += $$PWD/../../../opencv2/include
      
      
      
          unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_imgcodecs452.dll
      
          INCLUDEPATH += $$PWD/../../../opencv2/include
          DEPENDPATH += $$PWD/../../../opencv2/include
      
          unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_calib3d452.dll
      
          INCLUDEPATH += $$PWD/../../../opencv2/include
          DEPENDPATH += $$PWD/../../../opencv2/include
      
      
      
      V Offline
      V Offline
      Vijaykarthikeyan
      wrote on last edited by
      #4

      @Vijaykarthikeyan Atlast I finally found that my Ming-GW 64 bit compiler was not fully supported by gstreamer.So,I downgraded to 1.16 which is fully supported.Problem solved

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bonnie
        wrote on last edited by
        #2

        Take a look at https://gstreamer.freedesktop.org/download/
        The Toolchain Compatibility Notes section.
        Your mingw64 toolchain needs to be compatible with the gstreamer libs you are trying to link.

        V 1 Reply Last reply
        2
        • B Bonnie

          Take a look at https://gstreamer.freedesktop.org/download/
          The Toolchain Compatibility Notes section.
          Your mingw64 toolchain needs to be compatible with the gstreamer libs you are trying to link.

          V Offline
          V Offline
          Vijaykarthikeyan
          wrote on last edited by
          #3

          @Bonnie When I look into that,it has been said that for MINGW64 bit,the versions above 1.18 are partially supoorted. only for 1.16 versions,it is fully supported

          1 Reply Last reply
          0
          • V Vijaykarthikeyan

            I have successfully implemented video streaming using openCV method. Now, I want to integrate openCV with GStreamer. For that, I have downloaded GStreamer-1.0 packages. Now, what the problem is I don't know how to link the gstreamer with Qt. If I included this:
            CONFIG += link_pkgconfig

            Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
            PKGCONFIG += gstreamer-1.0

            I'm getting error like this:
            C:\gstreamer\1.0\mingw_x86_64\lib\libstdc++.a(ext11-inst.o):-1: error: undefined reference to `__imp__fseeki64'

            My compiler is : MINGW-64 bit compiler
            Im running in Windows Os.

            This is my .pro file:

            QT       += core gui quick multimediawidgets
            QT += network
            QT += widgets
            QT += quick
            QT += gamepad
            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
            
            CONFIG += c++17
            # You can make your code fail to compile if it uses deprecated APIs.
            # In order to do so, uncomment the following line.
            #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
            #INCLUDEPATH += C:/gstreamer/1.0/mingw_x86_64/include
            # Tell qmake to use pkg-config to find QtGStreamer.
            CONFIG += link_pkgconfig
            
            # Now tell qmake to link to QtGStreamer and also use its include path and Cflags.
            PKGCONFIG += gstreamer-1.0
            
            # Recommended if you are using g++ 4.5 or later. Must be removed for other compilers.
            #QMAKE_CXXFLAGS += -std=c++0x
            
            INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include"
            INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/gstreamer-1.0"
            INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/glib-2.0"
            INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/include/gobject-2.0"
            INCLUDEPATH += "C:/gstreamer/1.0/mingw_x86_64/lib/glib-2.0/include"
            
            
            SOURCES += \
                link.cpp \
                main.cpp \
                mainwindow.cpp \
                opencvimageprovider.cpp \
                videostreamer.cpp
            
            HEADERS += \
                link.h \
                mainwindow.h \
                opencvimageprovider.h \
                videostreamer.h
            
            # Default rules for deployment.
            qnx: target.path = /tmp/$${TARGET}/bin
            else: unix:!android: target.path = /opt/$${TARGET}/bin
            !isEmpty(target.path): INSTALLS += target
            
            
            
            RESOURCES += \
                qml.qrc
                win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_core452.dll
            
                INCLUDEPATH += $$PWD/../../../opencv2/include
                DEPENDPATH += $$PWD/../../../opencv2/include
            
                win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_highgui452.dll
            
                INCLUDEPATH += $$PWD/../../../opencv2/include
                DEPENDPATH += $$PWD/../../../opencv2/include
            
                win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/bin/ -llibopencv_videoio452.dll
            
                INCLUDEPATH += $$PWD/../../../opencv2/include
                DEPENDPATH += $$PWD/../../../opencv2/include
            
                RESOURCES += \
                    qml.qrc
            
            
                unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_imgproc452.dll
            
                INCLUDEPATH += $$PWD/../../../opencv2/include
                DEPENDPATH += $$PWD/../../../opencv2/include
            
            
            
                unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_imgcodecs452.dll
            
                INCLUDEPATH += $$PWD/../../../opencv2/include
                DEPENDPATH += $$PWD/../../../opencv2/include
            
                unix|win32: LIBS += -L$$PWD/../../../opencv2/x64/mingw/lib/ -llibopencv_calib3d452.dll
            
                INCLUDEPATH += $$PWD/../../../opencv2/include
                DEPENDPATH += $$PWD/../../../opencv2/include
            
            
            
            V Offline
            V Offline
            Vijaykarthikeyan
            wrote on last edited by
            #4

            @Vijaykarthikeyan Atlast I finally found that my Ming-GW 64 bit compiler was not fully supported by gstreamer.So,I downgraded to 1.16 which is fully supported.Problem solved

            1 Reply Last reply
            0
            • V Vijaykarthikeyan has marked this topic as solved on

            • Login

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