gstglx11_dep = dependency('', required : false)
gstglwayland_dep = dependency('', required : false)
gstglegl_dep = dependency('', required : false)
+gstglviv_fb_dep = dependency('', required : false)
if get_option('gl').disabled()
message('GStreamer OpenGL integration disabled via options.')
gl_wayland_headers = []
gl_egl_sources = []
gl_egl_headers = []
+gl_viv_fb_sources = []
+gl_viv_fb_headers = []
glconf = configuration_data()
glconf_options = [
if egl_dep.found() and cc.has_function ('fbGetDisplay', dependencies : egl_dep)
enabled_gl_winsys += 'viv-fb'
glconf.set('GST_GL_HAVE_WINDOW_VIV_FB', 1)
- gl_priv_sources += [
+ gl_priv_sources += files([
'viv-fb/gstgldisplay_viv_fb.c',
'viv-fb/gstglwindow_viv_fb_egl.c',
- ]
+ ])
+ gl_viv_fb_sources += files([
+ 'viv-fb/gstgldisplay_viv_fb.c',
+ ])
+
gl_cpp_args += ['-DEGL_API_FB']
- gl_viv_fb_headers = [
+ gl_viv_fb_headers = files([
+ 'viv-fb/gstglviv-fb.h',
'viv-fb/gstgldisplay_viv_fb.h',
- ]
- install_headers(gl_viv_fb_headers, subdir : 'gstreamer-1.0/gst/gl/viv-fb')
+ ])
endif
endif
common_args += '-I@0@'.format(meson.current_build_dir())
gstgl = library('gstgl-' + api_version,
- gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h,
+ gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_viv_fb_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h,
c_args : common_args,
cpp_args : common_args,
objc_args : common_args + gl_objc_args,
meson.override_dependency(pkg_name, gstglegl_dep)
endif
+ if gl_viv_fb_headers.length() > 0
+ install_headers(gl_viv_fb_headers, subdir : 'gstreamer-1.0/gst/gl/viv-fb')
+ pkg_name = 'gstreamer-gl-viv-fb-1.0'
+ pkgconfig.generate(
+ libraries : [gstgl],
+ subdirs : pkgconfig_subdirs,
+ name : pkg_name,
+ description : 'Streaming media framework, OpenGL plugins libraries (Vivante Framebuffer specifics)',
+ )
+ gl_viv_fb_gir = []
+ if build_gir
+ gir = {
+ 'sources' : gl_viv_fb_sources + gl_viv_fb_headers,
+ 'namespace' : 'GstGLVivFB',
+ 'nsversion' : api_version,
+ 'identifier_prefix' : 'Gst',
+ 'symbol_prefix' : 'gst',
+ 'export_packages' : pkg_name,
+ 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
+ 'install' : true,
+ 'extra_args' : gir_init_section + ['--c-include=gst/gl/viv-fb/gstglviv-fb.h'],
+ 'dependencies' : [video_dep, gst_dep, gst_base_dep]
+ }
+ gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']}
+ gst_libraries += [[pkg_name, {'gir': gir_dict}]]
+ if not static_build
+ gir += {'includes': gir['includes'] + [gl_gir[0]]}
+ gl_viv_fb_gir = gnome.generate_gir(gstgl, kwargs: gir)
+ library_def += {'gir_targets': library_def.get('gir_targets', []) + [gl_viv_fb_gir]}
+ endif
+ endif
+ gstglviv_fb_dep = declare_dependency(dependencies : [gstgl_dep],
+ sources : gl_viv_fb_gir)
+ meson.override_dependency(pkg_name, gstglviv_fb_dep)
+ endif
+
elif get_option('gl').enabled()
error('GStreamer OpenGL integration required via options, but needed dependencies not found.')
endif
--- /dev/null
+/*
+ * GStreamer
+ * Copyright (C) 2023 Matthew Waters <matthew@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_GL_VIV_FB_H__
+#define __GST_GL_VIV_FB_H__
+
+#include <gst/gl/gl.h>
+#include <gst/gl/viv-fb/gstgldisplay_viv_fb.h>
+
+#endif /* __GST_GL_VIV_FB_H__ */
#include <gst/gl/wayland/gstgldisplay_wayland.h>
#endif
-#if GST_GL_HAVE_WINDOW_VIV_FB
+#if GST_GL_HAVE_WINDOW_VIV_FB && defined (HAVE_QT_VIV_FB)
#include <gst/gl/viv-fb/gstgldisplay_viv_fb.h>
#endif
}
#elif GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_EGLFS)
if (QString::fromUtf8("eglfs") == app->platformName()) {
-#if GST_GL_HAVE_WINDOW_VIV_FB
+#if GST_GL_HAVE_WINDOW_VIV_FB && defined (HAVE_QT_VIV_FB)
/* FIXME: Could get the display directly from Qt like this
* QPlatformNativeInterface *native =
* QGuiApplication::platformNativeInterface();
}
#endif
#if GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_EGLFS)
-#if GST_GL_HAVE_WINDOW_VIV_FB
+#if GST_GL_HAVE_WINDOW_VIV_FB && defined (HAVE_QT_VIV_FB)
if (GST_IS_GL_DISPLAY_VIV_FB (display)) {
#else
if (GST_IS_GL_DISPLAY_EGL (display)) {
gstglx11_dep = dependency('', required : false)
gstglwayland_dep = dependency('', required : false)
gstglegl_dep = dependency('', required : false)
+gstglviv_fb_dep = dependency('', required : false)
have_gstgl = gstgl_dep.found()
gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstglegl_dep'], required: true)
endif
+ if gst_gl_have_window_viv_fb
+ gstglviv_fb_dep = dependency('gstreamer-gl-viv-fb-1.0', version : gst_req,
+ fallback : ['gst-plugins-base', 'gstglviv_fb_dep'], required: true)
+ endif
endif
zlib_dep = dependency('zlib')