gl: update plugins to use GstGL from -base

This commit is contained in:
Tim-Philipp Müller 2017-12-17 20:54:06 +00:00
parent ee589cd337
commit 06e4403fdb
12 changed files with 103 additions and 61 deletions

View file

@ -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)

View file

@ -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) \

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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'])

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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