1opengl_sources = [ 2 'gstopengl.c', 3 'gstglalpha.c', 4 'gstgluploadelement.c', 5 'gstgldownloadelement.c', 6 'gstglcolorconvertelement.c', 7 'gstglfilterbin.c', 8 'gstglsinkbin.c', 9 'gstglsrcbin.c', 10 'gstglimagesink.c', 11 'gstglfiltercube.c', 12 'gstgleffects.c', 13 'effects/gstgleffectscurves.c', 14 'effects/gstgleffectssources.c', 15 'effects/gstgleffectidentity.c', 16 'effects/gstgleffectmirror.c', 17 'effects/gstgleffectsqueeze.c', 18 'effects/gstgleffectstretch.c', 19 'effects/gstgleffectfisheye.c', 20 'effects/gstgleffecttwirl.c', 21 'effects/gstgleffectbulge.c', 22 'effects/gstgleffecttunnel.c', 23 'effects/gstgleffectsquare.c', 24 'effects/gstgleffectlumatocurve.c', 25 'effects/gstgleffectrgbtocurve.c', 26 'effects/gstgleffectsin.c', 27 'effects/gstgleffectxray.c', 28 'effects/gstgleffectglow.c', 29 'effects/gstgleffectblur.c', 30 'effects/gstgleffectsobel.c', 31 'effects/gstgleffectlaplacian.c', 32 'gstglbasemixer.c', 33 'gstglcolorscale.c', 34 'gstglcolorbalance.c', 35 'gstgldeinterlace.c', 36 'gstglfiltershader.c', 37 'gstglfilterapp.c', 38 'gstglmixerbin.c', 39 'gstglmixer.c', 40 'gstglvideomixer.c', 41 'gstglstereomix.c', 42 'gstglstereosplit.c', 43 'gstglviewconvert.c', 44 'gltestsrc.c', 45 'gstgltestsrc.c', 46 'gstgloverlaycompositorelement.c', 47 'gstglutils.c' 48] 49 50if get_option('gl').disabled() or not gstgl_dep.found() 51 subdir_done() 52endif 53 54optional_deps = [] 55 56if gl_dep.found() # have desktop GL 57 opengl_sources += [ 58 'gstglfilterglass.c', 59 'gstglmosaic.c', 60 ] 61endif 62 63graphene_dep = dependency('graphene-1.0', version : '>=1.4.0', required : get_option('gl-graphene')) 64if graphene_dep.found() 65 optional_deps += graphene_dep 66 core_conf.set('HAVE_GRAPHENE', true) 67 opengl_sources += [ 68 'gstgltransformation.c', 69 'gstglvideoflip.c', 70 ] 71endif 72 73png_dep = dependency('libpng', version : '>=1.0', required : get_option('gl-png')) 74jpeg_dep = dependency('libjpeg', required : get_option('gl-jpeg')) 75 76if png_dep.found() 77 optional_deps += png_dep 78 core_conf.set('HAVE_PNG', true) 79 opengl_sources += [ 80 'gstgldifferencematte.c', 81 ] 82 if jpeg_dep.found() 83 optional_deps += jpeg_dep 84 core_conf.set('HAVE_JPEG', true) 85 opengl_sources += [ 86 'gstgloverlay.c', 87 ] 88 endif 89endif 90 91if glconf.get('GST_GL_HAVE_WINDOW_COCOA', 0) == 1 92 foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false) 93 quartzcore_dep = dependency('appleframeworks', modules : ['QuartzCore'], required : false) 94 if foundation_dep.found() and quartzcore_dep.found() # have cocoa 95 opengl_sources += [ 96 'caopengllayersink.m', 97 ] 98 optional_deps += quartzcore_dep 99 endif 100endif 101 102if x11_dep.found() 103 # for XInitThreads() 104 optional_deps += x11_dep 105endif 106 107if bcm_host_dep.found() 108 optional_deps += bcm_host_dep 109endif 110 111if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h') 112 optional_deps += allocators_dep 113endif 114 115gstopengl = library('gstopengl', 116 opengl_sources, 117 c_args : gst_plugins_base_args, 118 link_args : noseh_link_args, 119 include_directories : [configinc], 120 dependencies : [gstgl_dep, video_dep, 121 gst_base_dep, gst_controller_dep, libm] + optional_deps, 122 install : true, 123 install_dir : plugins_install_dir) 124 125pkgconfig.generate(gstopengl, install_dir : plugins_pkgconfig_install_dir) 126