1TEMPLATE = lib 2 3TARGET = gstqmlgl 4 5QT += qml quick gui 6 7win32:!defined(packagesExist, test) { 8 # Change this to your gstreamer SDK installation path 9 GSTREAMER_PATH=C:/gstreamer/1.0/x86 10 11 # pkgconfig dependencies: gstreamer-1.0, gstreamer-video-1.0, gstreamer-gl-1.0 12 13 GSTREAMER_1_0_INCLUDEPATH = $${GSTREAMER_PATH}/include/gstreamer-1.0 14 win32-g++:GSTREAMER_1_0_LIBS = -L$${GSTREAMER_PATH}/lib -lgstreamer-1.0 15 win32-msvc:GSTREAMER_1_0_LIBS = /LIBPATH:$${GSTREAMER_PATH}/lib gstreamer-1.0.lib 16 17 GSTREAMER_VIDEO_1_0_INCLUDEPATH = $${GSTREAMER_PATH}/include/gstreamer-1.0 18 win32-g++:GSTREAMER_VIDEO_1_0_LIBS = -L$${GSTREAMER_PATH}/lib -lgstvideo-1.0 19 win32-msvc:GSTREAMER_VIDEO_1_0_LIBS = /LIBPATH:$${GSTREAMER_PATH}/lib gstvideo-1.0.lib 20 21 GSTREAMER_GL_1_0_INCLUDEPATH = $${GSTREAMER_PATH}/include \ 22 $${GSTREAMER_PATH}/lib/gstreamer-1.0/include 23 win32-g++:GSTREAMER_GL_1_0_LIBS = -L$${GSTREAMER_PATH}/lib -lgstgl-1.0 24 win32-msvc:GSTREAMER_GL_1_0_LIBS = /LIBPATH:$${GSTREAMER_PATH}/lib gstgl-1.0.lib 25 26 # Extra dependencies: 27 # glib-2.0, gobject-2.0 (required by gstreamer-1.0) 28 # gstreamer-base-1.0 (required by gstreamer-video-1.0) 29 30 GLIB_2_0_INCLUDEPATH = $${GSTREAMER_PATH}/include/glib-2.0 \ 31 $${GSTREAMER_PATH}/lib/glib-2.0/include 32 win32-g++:GLIB_2_0_LIBS = -L$${GSTREAMER_PATH}/lib -lglib-2.0 -lintl 33 win32-msvc:GLIB_2_0_LIBS = /LIBPATH:$${GSTREAMER_PATH}/lib glib-2.0.lib intl.lib 34 35 GOBJECT_2_0_INCLUDEPATH = $${GSTREAMER_PATH}/include 36 win32-g++:GOBJECT_2_0_LIBS = -L$${GSTREAMER_PATH}/lib -lgobject-2.0 37 win32-msvc:GOBJECT_2_0_LIBS = /LIBPATH:$${GSTREAMER_PATH}/lib gobject-2.0.lib 38 39 GSTREAMER_BASE_1_0_INCLUDEPATH = $${GSTREAMER_PATH}/include/gstreamer-1.0 40 win32-g++:GSTREAMER_BASE_1_0_LIBS = -L$${GSTREAMER_PATH}/lib -lgstbase-1.0 41 win32-msvc:GSTREAMER_BASE_1_0_LIBS = /LIBPATH:$${GSTREAMER_PATH}/lib gstbase-1.0.lib 42 43 INCLUDEPATH += $${GSTREAMER_1_0_INCLUDEPATH} \ 44 $${GSTREAMER_VIDEO_1_0_INCLUDEPATH} \ 45 $${GSTREAMER_GL_1_0_INCLUDEPATH} \ 46 $${GLIB_2_0_INCLUDEPATH} \ 47 $${GOBJECT_2_0_INCLUDEPATH} \ 48 $${GSTREAMER_BASE_1_0_INCLUDEPATH} 49 50 LIBS += $${GSTREAMER_1_0_LIBS} \ 51 $${GSTREAMER_VIDEO_1_0_LIBS} \ 52 $${GSTREAMER_GL_1_0_LIBS} \ 53 $${GLIB_2_0_LIBS} \ 54 $${GOBJECT_2_0_LIBS} \ 55 $${GSTREAMER_BASE_1_0_LIBS} 56} else { 57 QT_CONFIG -= no-pkg-config 58 CONFIG += link_pkgconfig debug 59 PKGCONFIG = \ 60 gstreamer-1.0 \ 61 gstreamer-video-1.0 \ 62 gstreamer-gl-1.0 63} 64 65android { 66 CONFIG += static 67} else { 68 CONFIG += plugin 69} 70 71android:DEFINES += HAVE_QT_ANDROID 72win32:DEFINES += HAVE_QT_WIN32 73macx:DEFINES += HAVE_QT_MAC 74 75versionAtLeast(QT_VERSION, "5.5") { 76 win32-msvc: LIBS += opengl32.lib 77 win32-g++: LIBS += -lopengl32 78} 79 80SOURCES += \ 81 gstplugin.cc \ 82 gstqtelement.cc \ 83 gstqtglutility.cc \ 84 gstqsgtexture.cc \ 85 gstqtoverlay.cc \ 86 gstqtsink.cc \ 87 gstqtsrc.cc \ 88 qtglrenderer.cc \ 89 qtwindow.cc \ 90 qtitem.cc 91 92HEADERS += \ 93 gstqtelements.h \ 94 gstqsgtexture.h \ 95 gstqtgl.h \ 96 gstqtglutility.h \ 97 gstqtoverlay.h \ 98 gstqtsink.h \ 99 gstqtsrc.h \ 100 qtglrenderer.h \ 101 qtwindow.h \ 102 qtitem.h 103