diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2017-12-17 20:54:06 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2017-12-19 12:02:31 +0000 |
commit | 06e4403fdb86d481e0600e2250f3ae625ba60cb4 (patch) | |
tree | e9465c0d3cf3191e50d0bab3e62d389cfa885dc0 | |
parent | ee589cd337ffaf2c4096cdaaae44c502d7ef0cd0 (diff) |
gl: update plugins to use GstGL from -base
-rw-r--r-- | configure.ac | 37 | ||||
-rw-r--r-- | ext/gl/Makefile.am | 5 | ||||
-rw-r--r-- | ext/gtk/Makefile.am | 19 | ||||
-rw-r--r-- | ext/gtk/meson.build | 4 | ||||
-rw-r--r-- | ext/qt/Makefile.am | 16 | ||||
-rw-r--r-- | meson.build | 17 | ||||
-rw-r--r-- | sys/androidmedia/Makefile.am | 6 | ||||
-rw-r--r-- | sys/applemedia/Makefile.am | 12 | ||||
-rw-r--r-- | sys/nvdec/Makefile.am | 11 | ||||
-rw-r--r-- | sys/nvenc/Makefile.am | 10 | ||||
-rw-r--r-- | tests/check/Makefile.am | 4 | ||||
-rw-r--r-- | tests/examples/gtk/Makefile.am | 23 |
12 files changed, 103 insertions, 61 deletions
diff --git a/configure.ac b/configure.ac index a1707ac03..0fd0110f0 100644 --- a/configure.ac +++ b/configure.ac @@ -196,6 +196,33 @@ AG_GST_CHECK_GST_NET($GST_API_VERSION, [$GST_REQ], yes) AG_GST_PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-[$GST_API_VERSION], [$GST_REQ], yes) AG_GST_PKG_CHECK_MODULES(GST_AUDIO, gstreamer-audio-[$GST_API_VERSION], [$GST_REQ], yes) AG_GST_PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-[$GST_API_VERSION], [$GST_REQ], yes) +AG_GST_PKG_CHECK_MODULES(GST_GL, gstreamer-gl-[$GST_API_VERSION], [$GST_REQ], no) + +AC_MSG_CHECKING([GStreamer OpenGL window systems ...]) +GST_GL_WINSYS=`$PKG_CONFIG --variable=gl_winsys gstreamer-gl-1.0` +AC_MSG_RESULT([$GST_GL_WINSYS]) +GST_GL_HAVE_WINDOW_X11="" +GST_GL_HAVE_WINDOW_WAYLAND="" +GST_GL_HAVE_WINDOW_ANDROID="" +GST_GL_HAVE_WINDOW_COCOA="" +GST_GL_HAVE_WINDOW_EAGL="" +case "$GST_GL_WINSYS" in *x11*) GST_GL_HAVE_WINDOW_X11="1" ;; esac +case "$GST_GL_WINSYS" in *wayland*) GST_GL_HAVE_WINDOW_WAYLAND="1" ;; esac +case "$GST_GL_WINSYS" in *android*) GST_GL_HAVE_WINDOW_ANDROID="1" ;; esac +case "$GST_GL_WINSYS" in *cocoa*) GST_GL_HAVE_WINDOW_COCOA="1" ;; esac +case "$GST_GL_WINSYS" in *eagl*) GST_GL_HAVE_WINDOW_EAGL="1" ;; esac + +AC_MSG_CHECKING([GStreamer OpenGL platforms ...]) +GST_GL_PLATFORMS=`$PKG_CONFIG --variable=gl_platforms gstreamer-gl-1.0` +AC_MSG_RESULT([$GST_GL_PLATFORMS]) +GST_GL_HAVE_PLATFORM_GLX="" +GST_GL_HAVE_PLATFORM_EGL="" +GST_GL_HAVE_PLATFORM_CGL="" +GST_GL_HAVE_PLATFORM_EAGL="" +case "$GST_GL_PLATFORMS" in *glx*) GST_GL_HAVE_PLATFORM_GLX="1" ;; esac +case "$GST_GL_PLATFORMS" in *egl*) GST_GL_HAVE_PLATFORM_EGL="1" ;; esac +case "$GST_GL_PLATFORMS" in *cgl*) GST_GL_HAVE_PLATFORM_CGL="1" ;; esac +case "$GST_GL_PLATFORMS" in *eagl*) GST_GL_HAVE_PLATFORM_EAGL="1" ;; esac AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes") @@ -1892,12 +1919,14 @@ AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [ dnl *** gl *** translit(dnm, m, l) AM_CONDITIONAL(USE_GL, true) AG_GST_CHECK_FEATURE(GL, [gl elements], gl, [ - HAVE_GL="no" - - dnl FIXME: detect and re-enable opengl plugin + if test "x$HAVE_GST_GL" = "xyes"; then + HAVE_GL="yes" + else + HAVE_GL="no" + fi dnl if test x"$USE_OPENGL" = x"yes" -o x"$USE_GLES2" = x"yes"; then dnl HAVE_GL="yes" - dnlfi + dnl fi ]) dnl FIXME AM_CONDITIONAL(USE_OPENGL, false) diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am index 1931af7c5..6246797d8 100644 --- a/ext/gl/Makefile.am +++ b/ext/gl/Makefile.am @@ -32,7 +32,7 @@ endif # (like in AM_CFLAGS)? libgstopenglmixers_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_GL_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CONTROLLER_CFLAGS) \ $(GST_CFLAGS) \ @@ -40,8 +40,7 @@ libgstopenglmixers_la_CFLAGS = \ libgstopenglmixers_la_LIBADD = \ $(top_builddir)/gst-libs/gst/video/libgstbadvideo-@GST_API_VERSION@.la \ - $(GST_PLUGINS_BASE_LIBS) \ - -lgstgl-@GST_API_VERSION@ + $(GST_GL_LIBS) \ $(GST_BASE_LIBS) \ $(GST_CONTROLLER_LIBS) \ $(GST_LIBS) \ diff --git a/ext/gtk/Makefile.am b/ext/gtk/Makefile.am index 34906257f..057ff3f18 100644 --- a/ext/gtk/Makefile.am +++ b/ext/gtk/Makefile.am @@ -22,18 +22,16 @@ sources = \ $(NULL) libgstgtk_la_CFLAGS = \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ - $(GTK3_CFLAGS) \ - $(GST_CFLAGS) \ - $(GST_BASE_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ - $(GL_CFLAGS) + $(GST_GL_CFLAGS) \ + $(GST_CFLAGS) \ + $(GTK3_CFLAGS) libgstgtk_la_LIBADD = \ - $(GTK3_LIBS) \ - $(GST_BASE_LIBS) \ $(GST_PLUGINS_BASE_LIBS) \ - -lgstvideo-$(GST_API_VERSION) + -lgstvideo-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) \ + $(GTK3_LIBS) libgstgtk_la_SOURCES = $(sources) libgstgtk_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) @@ -41,8 +39,7 @@ libgstgtk_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) if USE_GTK3_GL if USE_GL libgstgtk_la_SOURCES += gstgtkglsink.c gstgtkglsink.h gtkgstglwidget.c gtkgstglwidget.h -libgstgtk_la_LIBADD += \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la +libgstgtk_la_LIBADD += $(GST_GL_LIBS) endif endif diff --git a/ext/gtk/meson.build b/ext/gtk/meson.build index d041fbd21..324bfba89 100644 --- a/ext/gtk/meson.build +++ b/ext/gtk/meson.build @@ -15,7 +15,7 @@ if gtk_dep.found() if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0') have_gtk3_gl_windowing = false - if x11_dep.found() and gl_dep.found() + if gst_gl_have_window_x11 and gst_gl_have_platform_glx gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) if gtk_x11_dep.found() optional_deps += gtk_x11_dep @@ -23,7 +23,7 @@ if gtk_dep.found() endif endif - if wayland_egl_dep.found() and egl_dep.found() + if gst_gl_have_window_wayland and gst_gl_have_platform_egl gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) if gtk_wayland_dep.found() optional_deps += gtk_wayland_dep diff --git a/ext/qt/Makefile.am b/ext/qt/Makefile.am index 257644a08..cf2f761c3 100644 --- a/ext/qt/Makefile.am +++ b/ext/qt/Makefile.am @@ -32,20 +32,20 @@ libgstqmlgl_la_SOURCES = \ gstplugin.cc libgstqmlgl_la_CXXFLAGS = \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ - $(GST_CXXFLAGS) \ - $(GST_BASE_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_GL_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CXXFLAGS) \ $(QT_CFLAGS) \ $(GL_CFLAGS) -std=c++11 libgstqmlgl_la_LIBADD = \ - $(GST_BASE_LIBS) \ $(GST_PLUGINS_BASE_LIBS) \ - $(QT_LIBS) \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \ - -lgstvideo-$(GST_API_VERSION) + $(GST_GL_LIBS) \ + -lgstvideo-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) \ + $(QT_LIBS) libgstqmlgl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/meson.build b/meson.build index f822887dd..1fef56885 100644 --- a/meson.build +++ b/meson.build @@ -323,6 +323,23 @@ if host_machine.system() != 'windows' fallback : ['gstreamer', 'gst_check_dep']) endif +# GStreamer OpenGL +gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'gl_dep'], required: false) +build_gstgl = gstgl_dep.found() # FIXME: add option? + +gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys') +message('GStreamer OpenGL window systems: ' + gst_gl_winsys) +foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl'] + set_variable('gst_gl_have_window_@0@'.format(ws), gst_gl_winsys.contains(ws)) +endforeach + +gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms') +message('GStreamer OpenGL platforms: ' + gst_gl_platforms) +foreach p : ['glx', 'egl', 'cgl', 'eagl'] + set_variable('gst_gl_have_platform_@0@'.format(p), gst_gl_platforms.contains(p)) +endforeach + libm = cc.find_library('m', required : false) glib_dep = dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep']) diff --git a/sys/androidmedia/Makefile.am b/sys/androidmedia/Makefile.am index 062ee33a1..ae3a664c0 100644 --- a/sys/androidmedia/Makefile.am +++ b/sys/androidmedia/Makefile.am @@ -31,9 +31,9 @@ noinst_HEADERS = \ gstsensors.h libgstandroidmedia_la_CFLAGS = \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_GL_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(ORC_CFLAGS) \ @@ -41,11 +41,11 @@ libgstandroidmedia_la_CFLAGS = \ libgstandroidmedia_la_LIBADD = \ $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-$(GST_API_VERSION).la \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \ $(GST_PLUGINS_BASE_LIBS) \ -lgstaudio-@GST_API_VERSION@ \ -lgstpbutils-@GST_API_VERSION@ \ -lgstvideo-@GST_API_VERSION@ \ + $(GST_GL_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(ORC_LIBS) diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am index 1bbab6550..9ddaf7a3e 100644 --- a/sys/applemedia/Makefile.am +++ b/sys/applemedia/Makefile.am @@ -18,11 +18,11 @@ libgstapplemedia_la_CPPFLAGS = \ -Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type libgstapplemedia_la_CFLAGS = \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ - $(GST_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_GL_CFLAGS) \ $(GST_BASE_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) + $(GST_CFLAGS) if HAVE_IOS GST_OBJCFLAGS_WITH_VERSION = $(GST_OBJCFLAGS) @@ -45,12 +45,12 @@ libgstapplemedia_la_OBJCFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch endif libgstapplemedia_la_LIBADD = \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \ - $(GST_BASE_LIBS) \ $(GST_PLUGINS_BASE_LIBS) \ -lgstvideo-$(GST_API_VERSION) \ -lgstaudio-$(GST_API_VERSION) \ -lgstpbutils-$(GST_API_VERSION) \ + $(GST_GL_LIBS) \ + $(GST_BASE_LIBS) \ $(GMODULE_NO_EXPORT_LIBS) libgstapplemedia_la_LIBTOOLFLAGS = --tag=CC diff --git a/sys/nvdec/Makefile.am b/sys/nvdec/Makefile.am index 0a314b80a..5539dd25c 100644 --- a/sys/nvdec/Makefile.am +++ b/sys/nvdec/Makefile.am @@ -8,17 +8,18 @@ noinst_HEADERS = \ gstnvdec.h libgstnvdec_la_CFLAGS = \ - -I$(top_srcdir)/gst-libs \ - $(GST_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_GL_CFLAGS) \ $(GST_PBUTILS_CFLAGS) \ $(GST_VIDEO_CFLAGS) \ + $(GST_CFLAGS) \ $(CUDA_CFLAGS) libgstnvdec_la_LIBADD = \ - $(GST_LIBS) \ + $(GST_GL_LIBS) \ $(GST_PBUTILS_LIBS) \ $(GST_VIDEO_LIBS) \ - $(CUDA_LIBS) -lnvcuvid \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la + $(GST_LIBS) \ + $(CUDA_LIBS) -lnvcuvid libgstnvdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/sys/nvenc/Makefile.am b/sys/nvenc/Makefile.am index 000bdb5ab..8c2968eb8 100644 --- a/sys/nvenc/Makefile.am +++ b/sys/nvenc/Makefile.am @@ -11,22 +11,22 @@ noinst_HEADERS = \ gstnvh264enc.h libgstnvenc_la_CFLAGS = \ - -I$(top_srcdir)/gst-libs \ - $(GST_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PBUTILS_CFLAGS) \ $(GST_VIDEO_CFLAGS) \ + $(GST_CFLAGS) \ $(CUDA_CFLAGS) \ $(NVENCODE_CFLAGS) libgstnvenc_la_LIBADD = \ - $(GST_LIBS) \ $(GST_PBUTILS_LIBS) \ $(GST_VIDEO_LIBS) \ + $(GST_LIBS) \ $(CUDA_LIBS) \ $(NVENCODE_LIBS) if USE_NVENC_GST_GL -libgstnvenc_la_LIBADD += \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la +libgstnvenc_la_CFLAGS += $(GST_GL_CFLAGS) +libgstnvenc_la_LIBADD += $(GST_GL_LIBS) endif libgstnvenc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 3fae4e574..4969c4ad0 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -296,8 +296,8 @@ AM_CFLAGS = $(GST_CFLAGS) $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) \ -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS $(PTHREAD_CFLAGS) LDADD = $(GST_CHECK_LIBS) -generic_states_CFLAGS = $(AM_CFLAGS) $(GMODULE_NO_EXPORT_CFLAGS) -generic_states_LDADD = $(LDADD) $(GMODULE_NO_EXPORT_LIBS) +generic_states_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) +generic_states_LDADD = $(LDADD) $(GLIB_LIBS) elements_audiomixer_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) -lgstbase-@GST_API_VERSION@ $(LDADD) elements_audiomixer_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(AM_CFLAGS) diff --git a/tests/examples/gtk/Makefile.am b/tests/examples/gtk/Makefile.am index adf5e3178..15636d9f2 100644 --- a/tests/examples/gtk/Makefile.am +++ b/tests/examples/gtk/Makefile.am @@ -12,30 +12,29 @@ if USE_GL noinst_PROGRAMS += gtkglsink glliveshader gtkglsink_SOURCES = gtkglsink.c -gtkglsink_CFLAGS = $(GTK3_CFLAGS) \ +gtkglsink_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(GL_CFLAGS) \ - -DGST_USE_UNSTABLE_API -gtkglsink_LDADD = $(GTK3_LIBS) \ + $(GTK3_CFLAGS) +gtkglsink_LDADD = \ + $(GST_GL_LIBS) \ $(GST_LIBS) \ - $(GL_LIBS) \ + $(GTK3_LIBS) \ $(X11_LIBS) glliveshader_SOURCES = glliveshader.c -glliveshader_CFLAGS = $(GTK3_CFLAGS) \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ +glliveshader_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_GL_CFLAGS) \ $(GST_CFLAGS) \ - $(GL_CFLAGS) \ - -DGST_USE_UNSTABLE_API -glliveshader_LDADD = $(GTK3_LIBS) \ + $(GTK3_CFLAGS) +glliveshader_LDADD = \ + $(GST_GL_LIBS) \ $(GST_LIBS) \ - $(GL_LIBS) \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \ + $(GTK3_LIBS) \ $(X11_LIBS) endif endif |