1 if get_option('gl').disabled()
2 message('GStreamer OpenGL integration disabled via options.')
12 'gstglcolorconvert.c',
24 'gstgloverlaycompositor.c',
26 'gstglrenderbuffer.c',
28 'gstglshaderstrings.c',
48 'gstglcolorconvert.h',
59 'gstgloverlaycompositor.h',
61 'gstglrenderbuffer.h',
63 'gstglshaderstrings.h',
73 gl_prototype_headers = [
74 'glprototypes/all_functions.h',
75 'glprototypes/base.h',
76 'glprototypes/blending.h',
77 'glprototypes/buffers.h',
78 'glprototypes/debug.h',
79 'glprototypes/eglimage.h',
81 'glprototypes/fixedfunction.h',
82 'glprototypes/gles.h',
83 'glprototypes/gstgl_compat.h',
84 'glprototypes/gstgl_gles2compat.h',
85 'glprototypes/opengl.h',
86 'glprototypes/query.h',
87 'glprototypes/shaders.h',
88 'glprototypes/sync.h',
93 gl_wayland_headers = []
98 glconf = configuration_data()
100 'GST_GL_HAVE_OPENGL',
103 'GST_GL_HAVE_GLES3EXT3_H',
105 'GST_GL_HAVE_WINDOW_X11',
106 'GST_GL_HAVE_WINDOW_COCOA',
107 'GST_GL_HAVE_WINDOW_WIN32',
108 'GST_GL_HAVE_WINDOW_WAYLAND',
109 'GST_GL_HAVE_WINDOW_ANDROID',
110 'GST_GL_HAVE_WINDOW_DISPMANX',
111 'GST_GL_HAVE_WINDOW_EAGL',
112 'GST_GL_HAVE_WINDOW_VIV_FB',
113 'GST_GL_HAVE_WINDOW_GBM',
115 'GST_GL_HAVE_PLATFORM_EGL',
116 'GST_GL_HAVE_PLATFORM_GLX',
117 'GST_GL_HAVE_PLATFORM_WGL',
118 'GST_GL_HAVE_PLATFORM_CGL',
119 'GST_GL_HAVE_PLATFORM_EAGL',
121 'GST_GL_HAVE_DMABUF',
122 'GST_GL_HAVE_VIV_DIRECTVIV',
124 'GST_GL_HAVE_GLEGLIMAGEOES',
125 'GST_GL_HAVE_GLCHAR',
126 'GST_GL_HAVE_GLSIZEIPTR',
127 'GST_GL_HAVE_GLINTPTR',
128 'GST_GL_HAVE_GLSYNC',
129 'GST_GL_HAVE_GLUINT64',
130 'GST_GL_HAVE_GLINT64',
131 'GST_GL_HAVE_EGLATTRIB',
132 'GST_GL_HAVE_EGLUINT64KHR',
135 foreach option : glconf_options
136 glconf.set10(option, false)
139 unneeded_dep = dependency('', required : false)
140 if unneeded_dep.found()
141 error ('Found unfindable dependency')
144 # OpenGL/GLES2 libraries
146 # GL platform - EGL, GLX, CGL, WGL, etc
147 gl_platform_deps = []
148 # GL winsys - wayland, X11, Cocoa, win32, etc
150 # other things we need.
152 # Other preprocessor arguments
158 enabled_gl_platforms = []
159 enabled_gl_winsys = []
161 # parse provided options
162 libegl_module_name = get_option('egl_module_name')
163 if libegl_module_name != ''
164 gl_cpp_args += ['-DGST_GL_LIBEGL_MODULE_NAME="@0@"'.format(libegl_module_name)]
166 libgles2_module_name = get_option('gles2_module_name')
167 if libgles2_module_name != ''
168 gl_cpp_args += ['-DGST_GL_LIBGLESV2_MODULE_NAME="@0@"'.format(libgles2_module_name)]
170 libgl_module_name = get_option('opengl_module_name')
171 if libgl_module_name != ''
172 gl_cpp_args += ['-DGST_GL_LIBGL_MODULE_NAME="@0@"'.format(libgl_module_name)]
175 gl_apis = get_option('gl_api')
176 if gl_apis.contains('auto')
177 need_api_opengl = 'auto'
178 need_api_gles2 = 'auto'
180 need_api_opengl = 'no'
181 need_api_gles2 = 'no'
182 foreach api : gl_apis
184 need_api_opengl = 'yes'
186 need_api_gles2 = 'yes'
188 error('Unsupported GL api provided ' + api)
193 gl_platforms = get_option('gl_platform')
194 if gl_platforms.contains('auto')
195 need_platform_egl = 'auto'
196 need_platform_glx = 'auto'
197 need_platform_cgl = 'auto'
198 need_platform_wgl = 'auto'
199 need_platform_eagl = 'auto'
201 need_platform_egl = 'no'
202 need_platform_glx = 'no'
203 need_platform_cgl = 'no'
204 need_platform_wgl = 'no'
205 need_platform_eagl = 'no'
206 foreach platform : gl_platforms
208 need_platform_egl = 'yes'
209 elif platform == 'glx'
210 need_platform_glx = 'yes'
211 elif platform == 'cgl'
212 need_platform_cgl = 'yes'
213 elif platform == 'wgl'
214 need_platform_wgl = 'yes'
215 # elif platform == 'eagl'
216 # need_platform_eagl = 'yes'
218 error('Unsupported GL platform provided ' + platform)
223 gl_winsys = get_option('gl_winsys')
224 if gl_winsys.contains('auto')
225 need_win_x11 = 'auto'
226 need_win_wayland = 'auto'
227 need_win_win32 = 'auto'
228 need_win_cocoa = 'auto'
229 need_win_eagl = 'auto'
230 need_win_dispmanx = 'auto'
231 need_win_viv_fb = 'auto'
232 need_win_gbm = 'auto'
235 need_win_wayland = 'no'
236 need_win_win32 = 'no'
237 need_win_cocoa = 'no'
239 need_win_dispmanx = 'no'
240 need_win_viv_fb = 'no'
242 foreach winsys : gl_winsys
245 elif winsys == 'wayland'
246 need_win_wayland = 'yes'
247 elif winsys == 'win32'
248 need_win_win32 = 'yes'
249 elif winsys == 'cocoa'
250 need_win_cocoa = 'yes'
251 # elif winsys == 'eagl'
252 # need_win_eagl = 'yes'
253 elif winsys == 'dispmanx'
254 need_win_dispmanx = 'yes'
255 elif winsys == 'viv-fb'
256 need_win_viv_fb = 'yes'
260 error('Unsupported GL winsys provided ' + winsys)
265 gl_include_header = '''
267 # pragma GCC diagnostic push
268 # pragma GCC diagnostic ignored "-Wredundant-decls"
270 #ifndef GL_GLEXT_PROTOTYPES
271 #define GL_GLEXT_PROTOTYPES 1
275 # convoluted way of getting at the subproject taking into account the wrap-mode
276 # so we don't download a subproject unless allowed
277 # FIXME: dependency() needs a valid name to attempt to find otherwise meson
278 # short-circuits and will always fail and never look into the fallback
279 # subproject. https://github.com/mesonbuild/meson/issues/3754
280 gl_header_dep = dependency('gl-headers-not-findable', method : 'pkg-config',
281 fallback : ['gl-headers', 'gl_headers_dummy_dep'], required : false)
282 if gl_header_dep.type_name() == 'internal'
283 # this will only contain the includes of headers that are not found
284 compat_includes = subproject('gl-headers').get_variable('compatibility_includes')
289 # Desktop OpenGL checks
290 gl_dep = unneeded_dep
291 glx_dep = unneeded_dep
292 if need_api_opengl != 'no' or need_platform_glx != 'no'
293 if host_machine.system() == 'darwin'
294 gl_dep = dependency('OpenGL', required : false)
296 # override meson's braindead gl detection on osx/windows/etc by forcing pkg-config
297 gl_dep = dependency('gl', method: 'pkg-config', required : false)
300 if not gl_dep.found()
301 if host_machine.system() == 'windows'
302 gl_dep = cc.find_library('opengl32', required : false)
304 gl_dep = cc.find_library('GL', required : false)
307 if not cc.has_header('GL/gl.h', include_directories : compat_includes)
308 gl_dep = unneeded_dep
311 if not gl_dep.found() and need_api_opengl == 'yes'
312 error ('Could not find requested OpenGL library')
316 gl_includes += [compat_includes]
321 if need_api_opengl == 'no'
322 gl_dep = unneeded_dep
324 if need_platform_glx == 'no'
325 glx_dep = unneeded_dep
329 if host_machine.system() == 'darwin'
330 opengl_includes += '''
331 #include <OpenGL/OpenGL.h>
332 #include <OpenGL/gl.h>
333 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
334 # define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
335 # include <OpenGL/gl3.h>
339 opengl_includes += '''
341 # include <windows.h>
344 #if __WIN32__ || _WIN32
345 # include <GL/glext.h>
352 gles2_dep = unneeded_dep
355 if need_api_gles2 != 'no'
356 gles2_dep = dependency('glesv2', required : false)
357 if not gles2_dep.found()
358 # if host_machine.system() == 'windows'
359 # elif host_machine.system() == 'darwin'
360 # gles2_dep = cc.find_library('GLESv2', required : false)
362 gles2_dep = cc.find_library('GLESv2', required : false)
365 if not cc.has_header('GLES2/gl2.h', include_directories : compat_includes)
366 gles2_dep = unneeded_dep
369 if not gles2_dep.found() and need_api_gles2 == 'yes'
370 error ('Could not find requested OpenGL ES library')
374 gl_includes += [compat_includes]
378 gles3_h = gles2_dep.found() and cc.has_header('GLES3/gl3.h', dependencies : gles2_dep, include_directories : compat_includes)
381 #ifdef HAVE_IOS /* FIXME */
382 # include <OpenGLES/ES2/gl.h>
383 # include <OpenGLES/ES2/glext.h>
386 gl_includes += [compat_includes]
387 gles3ext3_h = gles3_h and cc.has_header('GLES3/gl3ext.h', dependencies : gles2_dep, include_directories : compat_includes)
389 # include <GLES3/gl3.h>
390 # include <GLES2/gl2ext.h>'''
393 # include <GLES3/gl3ext.h>'''
397 # include <GLES2/gl2.h>
398 # include <GLES2/gl2ext.h>'''
405 # can we include both gles2 and opengl headers?
406 if gles2_dep.found() and gl_dep.found()
407 gl_include_block = gl_include_header + gles_includes + opengl_includes
408 # TODO: Revert to passing gl_include_block via prefix: once
409 # https://github.com/mesonbuild/meson/issues/2364 is fixed
410 if not cc.compiles(gl_include_block + '\n' + 'void f (void) {}',dependencies : [gles2_dep, gl_dep], include_directories : compat_includes)
411 message ('Cannot include both OpenGL and OpenGL ES headers')
412 if need_api_gles2 != 'yes'
413 gles2_dep = unneeded_dep
414 elif need_api_opengl != 'yes'
415 gl_dep = unneeded_dep
417 error('Both OpenGL and OpenGL ES were requested but cannot be included together')
421 gl_include_block = gl_include_header
423 gl_include_block += gles_includes
426 gl_include_block += opengl_includes
430 gl_lib_deps += gles2_dep
431 glconf.set10('GST_GL_HAVE_GLES2', 1)
433 glconf.set10('GST_GL_HAVE_GLES3', 1)
435 glconf.set10('GST_GL_HAVE_GLES3EXT3_H', 1)
438 enabled_gl_apis += 'gles2'
442 gl_lib_deps += gl_dep
443 glconf.set10('GST_GL_HAVE_OPENGL', 1)
444 enabled_gl_apis += 'opengl'
448 egl_dep = unneeded_dep
449 if need_platform_egl != 'no'
450 egl_dep = dependency('egl', required : false)
451 if not egl_dep.found()
452 egl_dep = cc.find_library('EGL', required : false)
454 if not egl_dep.found() and need_platform_egl == 'yes'
455 error ('Could not find requested EGL library')
463 'egl/gstglcontext_egl.c',
464 'egl/gstgldisplay_egl.c',
465 'egl/gstglmemoryegl.c',
470 'egl/gstgldisplay_egl.h',
471 'egl/gstglmemoryegl.h',
473 gl_platform_deps += egl_dep
474 glconf.set10('GST_GL_HAVE_PLATFORM_EGL', 1)
476 if cc.has_header('libdrm/drm_fourcc.h')
477 gl_misc_deps += allocators_dep
478 glconf.set10('GST_GL_HAVE_DMABUF', 1)
483 #include <EGL/eglext.h>
485 enabled_gl_platforms += 'egl'
491 wayland_client_dep = unneeded_dep
492 wayland_cursor_dep = unneeded_dep
493 wayland_egl_dep = unneeded_dep
494 if need_win_wayland != 'no'
495 if need_win_wayland == 'yes'
496 if need_platform_egl == 'no'
497 error('Impossible situation requested: Cannot use Wayland without EGL support')
500 if not egl_dep.found()
501 if need_win_wayland == 'yes'
502 error ('Could not find EGL libraries for wayland')
504 message ('Could not find EGL libraries for wayland')
507 wayland_client_dep = dependency('wayland-client', version : '>= 1.0', required : false)
508 wayland_cursor_dep = dependency('wayland-cursor', version : '>= 1.0', required : false)
509 wayland_egl_dep = dependency('wayland-egl', version : '>= 1.0', required : false)
511 if wayland_client_dep.found() and wayland_cursor_dep.found() and wayland_egl_dep.found()
513 'wayland/gstgldisplay_wayland.c',
514 'wayland/gstglwindow_wayland_egl.c',
515 'wayland/wayland_event_source.c',
517 gl_wayland_headers += [
518 'wayland/gstgldisplay_wayland.h'
520 glconf.set('GST_GL_HAVE_WINDOW_WAYLAND', 1)
521 gl_winsys_deps += [wayland_client_dep, wayland_cursor_dep, wayland_egl_dep]
522 enabled_gl_winsys += 'wayland'
524 if need_win_wayland == 'yes'
525 error ('Could not find requested Wayland libraries')
527 wayland_client_dep = unneeded_dep
528 wayland_cursor_dep = unneeded_dep
529 wayland_egl_dep = unneeded_dep
535 if need_platform_glx == 'yes'
536 if need_win_x11 == 'no'
537 error('Impossible situation requested: Cannot use GLX without X11 support')
538 elif need_api_opengl == 'no'
539 error('Impossible situation requested: Cannot use GLX without the OpenGL library')
543 if need_win_x11 != 'no'
544 xcb_dep = dependency('x11-xcb', required : false)
545 if x11_dep.found() and xcb_dep.found()
547 'x11/gstgldisplay_x11.c',
548 'x11/gstglwindow_x11.c',
549 'x11/xcb_event_source.c',
552 'x11/gstgldisplay_x11.h',
554 glconf.set('GST_GL_HAVE_WINDOW_X11', 1)
555 gl_winsys_deps += [x11_dep, xcb_dep]
556 enabled_gl_winsys += 'x11'
558 if need_platform_glx != 'no' and glx_dep.found()
559 glconf.set('GST_GL_HAVE_PLATFORM_GLX', 1)
561 'x11/gstglcontext_glx.c',
563 # GLX is in the opengl library on linux
564 gl_platform_deps += glx_dep
565 enabled_gl_platforms += 'glx'
567 elif need_win_x11 == 'yes'
568 error ('Could not find requested X11 libraries')
572 bcm_host_dep = unneeded_dep
573 if need_win_dispmanx != 'no'
575 # Try pkg-config for bcm_host then fallback to find_library to also
576 # support older distribution
577 bcm_host_dep = dependency('bcm_host', required : false)
578 if not bcm_host_dep.found()
579 bcm_host_dep = cc.find_library('bcm_host', required : false)
582 if bcm_host_dep.found()
583 if not egl_dep.found()
584 error('dispmanx requires the use of egl')
588 'dispmanx/gstglwindow_dispmanx_egl.c'
591 glconf.set('GST_GL_HAVE_WINDOW_DISPMANX', 1)
592 gl_winsys_deps += bcm_host_dep
593 enabled_gl_winsys += 'dispmanx'
594 gl_cpp_args += ['-DUSE_EGL_RPI']
595 elif need_win_dispmanx == 'yes'
596 error('Could not find dispmanx libraries')
601 if need_platform_wgl == 'yes'
602 if need_win_win32 == 'no'
603 error('Impossible situation requested: Cannot use WGL without the win32 window system')
607 if need_platform_wgl != 'no' and need_win_win32 != 'no'
608 gdi_dep = cc.find_library('gdi32', required : false)
609 # FIXME: Revert back to has_header once it gains prefix support
610 wglext_h = cc.has_header_symbol('GL/wglext.h', 'WGL_WGLEXT_VERSION',
611 prefix : '''#include <windows.h>
612 #include <GL/gl.h>''',
613 include_directories : compat_includes)
615 if wglext_h and gdi_dep.found() and gl_dep.found()
616 gl_includes += [compat_includes]
617 gl_platform_deps += gdi_dep
619 'win32/win32_message_source.c',
620 'win32/gstglwindow_win32.c',
621 'win32/gstglwindow_win32.c',
622 'win32/gstglcontext_wgl.c',
624 enabled_gl_winsys += 'win32'
625 gl_winsys_deps += gdi_dep
626 enabled_gl_platforms += 'wgl'
627 glconf.set('GST_GL_HAVE_WINDOW_WIN32', 1)
628 glconf.set('GST_GL_HAVE_PLATFORM_WGL', 1)
633 if need_platform_cgl == 'yes'
634 if need_win_cocoa == 'no'
635 error('Impossible situation requested: Cannot use CGL without Cocoa support')
636 elif need_api_opengl == 'no'
637 error('Impossible situation requested: Cannot use CGL without the OpenGL library')
639 elif need_platform_cgl == 'no' and need_win_cocoa == 'yes'
640 error('Impossible situation requested: Cannot use Cocoa without CGL support')
643 if host_machine.system() == 'darwin'
645 error('No ObjC compiler found')
648 objc = meson.get_compiler('objc')
649 if not objc.has_argument('-fobjc-arc')
650 error('ARC is required for building')
653 gl_objc_args += ['-fobjc-arc']
655 quartzcore_dep = dependency('QuartzCore', required : false)
656 corefoundation_dep = dependency('CoreFoundation', required : false)
658 if need_platform_cgl != 'no'
659 if quartzcore_dep.found() and corefoundation_dep.found()
660 gl_platform_deps += [quartzcore_dep, corefoundation_dep]
661 enabled_gl_platforms += 'cgl'
662 glconf.set10('GST_GL_HAVE_PLATFORM_CGL', 1)
664 if need_win_cocoa != 'no'
665 cocoa_dep = dependency('Cocoa', required : false)
668 'cocoa/gstglcaopengllayer.m',
669 'cocoa/gstglcontext_cocoa.m',
670 'cocoa/gstgldisplay_cocoa.m',
671 'cocoa/gstglwindow_cocoa.m'
673 gl_winsys_deps += cocoa_dep
674 enabled_gl_winsys += 'cocoa'
675 glconf.set10('GST_GL_HAVE_WINDOW_COCOA', 1)
676 elif need_win_cocoa == 'yes'
677 error('Could not find Cocoa')
680 elif need_platform_cgl == 'yes'
681 error('Could not find CGL dependencies')
687 gbm_gudev_dep = unneeded_dep
688 gbm_libdrm_dep = unneeded_dep
689 gbm_dep = unneeded_dep
690 if need_win_gbm != 'no'
691 if need_win_gbm == 'yes'
692 if need_platform_egl == 'no'
693 error('Impossible situation requested: Cannot use GBM without EGL support')
697 gbm_gudev_dep = dependency('gudev-1.0', version : '>=147', required : false)
698 gbm_libdrm_dep = dependency('libdrm', version : '>= 2.4.55', required : false)
699 gbm_dep = dependency('gbm', required : false)
700 if egl_dep.found() and gbm_gudev_dep.found() and gbm_libdrm_dep.found() and gbm_dep.found()
702 'gbm/gstgldisplay_gbm.c',
703 'gbm/gstgl_gbm_utils.c',
704 'gbm/gstglwindow_gbm_egl.c',
706 enabled_gl_winsys += 'gbm'
707 gl_winsys_deps += [gbm_gudev_dep, gbm_libdrm_dep, gbm_dep]
708 glconf.set('GST_GL_HAVE_WINDOW_GBM', 1)
710 if need_win_gbm == 'yes'
711 error ('Could not find requested GBM libraries')
713 gbm_gudev_dep = unneeded_dep
714 gbm_libdrm_dep = unneeded_dep
715 gbm_dep = unneeded_dep
719 if need_platform_egl != 'no' and need_win_viv_fb != 'no'
720 if egl_dep.found() and cc.has_function ('fbGetDisplay', dependencies : egl_dep)
721 if cc.has_function ('glTexDirectVIV', dependencies : gles2_dep)
722 enabled_gl_winsys += 'viv-fb'
723 glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1)
724 glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1)
726 'viv-fb/gstgldisplay_viv_fb.c',
727 'viv-fb/gstglwindow_viv_fb_egl.c',
729 gl_cpp_args += ['-DEGL_API_FB']
734 # TODO: Add rest of gl config here.
735 # iOS, specific support
738 if enabled_gl_apis.length() == 0
739 message('No OpenGL API libraries found or requested')
742 if enabled_gl_platforms.length() == 0
743 message('No OpenGL Platforms found or requested')
746 if enabled_gl_winsys.length() == 0
747 message('No OpenGL Window systems found or requested')
752 # find some types that may or may not be defined
753 if cc.has_type('GLeglImageOES', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
754 glconf.set('GST_GL_HAVE_GLEGLIMAGEOES', 1)
756 if cc.has_type('GLchar', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
757 glconf.set('GST_GL_HAVE_GLCHAR', 1)
759 if cc.has_type('GLsizeiptr', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
760 glconf.set('GST_GL_HAVE_GLSIZEIPTR', 1)
762 if cc.has_type('GLintptr', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
763 glconf.set('GST_GL_HAVE_GLINTPTR', 1)
765 if cc.has_type('GLsync', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
766 glconf.set('GST_GL_HAVE_GLSYNC', 1)
768 if cc.has_type('GLuint64', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
769 glconf.set('GST_GL_HAVE_GLUINT64', 1)
771 if cc.has_type('GLint64', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
772 glconf.set('GST_GL_HAVE_GLINT64', 1)
774 if egl_dep.found() and cc.has_type('EGLAttrib', prefix : gl_include_block + egl_includes, dependencies : gl_lib_deps + [egl_dep], include_directories : gl_includes)
775 glconf.set('GST_GL_HAVE_EGLATTRIB', 1)
777 if egl_dep.found() and cc.has_type('EGLuint64KHR', prefix : gl_include_block + egl_includes, dependencies : gl_lib_deps + [egl_dep], include_directories : gl_includes)
778 glconf.set('GST_GL_HAVE_EGLUINT64KHR', 1)
781 message('Building libgstgl with GL api: ' + ' '.join(enabled_gl_apis))
782 message('Building libgstgl with GL platform: ' + ' '.join(enabled_gl_platforms))
783 message('Building libgstgl with GL winsys: ' + ' '.join(enabled_gl_winsys))
785 install_headers(gl_headers, subdir : 'gstreamer-1.0/gst/gl')
786 install_headers(gl_cocoa_headers, subdir : 'gstreamer-1.0/gst/gl/cocoa')
787 install_headers(gl_egl_headers, subdir : 'gstreamer-1.0/gst/gl/egl')
788 install_headers(gl_prototype_headers, subdir : 'gstreamer-1.0/gst/gl/glprototypes')
789 install_headers(gl_x11_headers, subdir : 'gstreamer-1.0/gst/gl/x11')
790 install_headers(gl_wayland_headers, subdir : 'gstreamer-1.0/gst/gl/wayland')
792 configure_file(input : 'gstglconfig.h.meson',
793 output : 'gstglconfig.h',
794 install_dir : get_option('libdir') + '/gstreamer-1.0/include/gst/gl',
795 configuration : glconf)
797 gstgl = library('gstgl-' + api_version,
799 c_args : gst_plugins_base_args + gl_cpp_args,
800 objc_args : gst_plugins_base_args + gl_cpp_args + gl_objc_args,
801 include_directories : [configinc, libsinc, gl_includes],
802 version : libversion,
803 soversion : soversion,
805 dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep,
806 gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps])
809 gl_gir = gnome.generate_gir(gstgl,
810 sources : gl_sources + gl_headers,
812 nsversion : api_version,
813 identifier_prefix : 'Gst',
814 symbol_prefix : 'gst',
815 export_packages : 'gstreamer-gl-1.0',
816 includes : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
818 extra_args : gir_init_section + ['--c-include=gst/gl/gl.h'],
819 dependencies : [video_dep, gst_dep, gst_base_dep]
821 gen_sources += gl_gir
825 gstgl_dep = declare_dependency(link_with : gstgl,
826 include_directories : [libsinc, compat_includes],
827 sources: gen_sources,
828 dependencies : [video_dep, gst_base_dep] + gl_winsys_deps)
830 elif get_option('gl').enabled()
831 error('GStreamer OpenGL integration required via options, but needed dependencies not found.')