Opencv with gstreamer
-
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_pkgconfigNow tell qmake to link to QtGStreamer and also use its include path and Cflags.
PKGCONFIG += gstreamer-1.0I'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
-
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_pkgconfigNow tell qmake to link to QtGStreamer and also use its include path and Cflags.
PKGCONFIG += gstreamer-1.0I'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
@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
-
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. -
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.@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
-
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_pkgconfigNow tell qmake to link to QtGStreamer and also use its include path and Cflags.
PKGCONFIG += gstreamer-1.0I'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
@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
-