1audio_src = files([ 2 'audio.c', 3 'audio-buffer.c', 4 'audio-channel-mixer.c', 5 'audio-channels.c', 6 'audio-converter.c', 7 'audio-format.c', 8 'audio-info.c', 9 'audio-quantize.c', 10 'audio-resampler.c', 11 'gstaudioaggregator.c', 12 'gstaudiobasesink.c', 13 'gstaudiobasesrc.c', 14 'gstaudiocdsrc.c', 15 'gstaudioclock.c', 16 'gstaudiodecoder.c', 17 'gstaudioencoder.c', 18 'gstaudiofilter.c', 19 'gstaudioiec61937.c', 20 'gstaudiometa.c', 21 'gstaudioringbuffer.c', 22 'gstaudiosink.c', 23 'gstaudiosrc.c', 24 'gstaudioutilsprivate.c', 25 'streamvolume.c', 26 'gstaudiostreamalign.c', 27]) 28 29audio_mkenum_headers = files([ 30 'audio.h', 31 'audio-format.h', 32 'audio-channels.h', 33 'audio-channel-mixer.h', 34 'audio-converter.h', 35 'audio-info.h', 36 'audio-quantize.h', 37 'audio-resampler.h', 38 'gstaudioaggregator.h', 39 'gstaudioringbuffer.h', 40 'gstaudiobasesrc.h', 41 'gstaudiocdsrc.h', 42 'gstaudiobasesink.h', 43 'gstaudiostreamalign.h', 44]) 45 46# FIXME: check headers 47audio_headers = audio_mkenum_headers + files([ 48 'audio-prelude.h', 49 'audio-buffer.h', 50 'gstaudiobasesink.h', 51 'gstaudiobasesrc.h', 52 'gstaudiocdsrc.h', 53 'gstaudioclock.h', 54 'gstaudiodecoder.h', 55 'gstaudioencoder.h', 56 'gstaudiofilter.h', 57 'gstaudioiec61937.h', 58 'gstaudiometa.h', 59 'gstaudiosink.h', 60 'gstaudiosrc.h', 61 'streamvolume.h', 62]) 63install_headers(audio_headers, subdir : 'gstreamer-1.0/gst/audio/') 64 65audio_enums = gnome.mkenums_simple('audio-enumtypes', 66 sources : audio_mkenum_headers, 67 body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', 68 header_prefix : '#include <gst/audio/audio-prelude.h>', 69 decorator : 'GST_AUDIO_API', 70 install_header: true, 71 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/audio')) 72gstaudio_c = audio_enums[0] 73gstaudio_h = audio_enums[1] 74 75audio_gen_sources = [gstaudio_h] 76 77gstaudio_deps = [tag_dep, gst_base_dep, libm] 78orcsrc = 'gstaudiopack' 79if have_orcc 80 gstaudio_deps += [orc_dep] 81 orc_h = custom_target(orcsrc + '.h', 82 input : orcsrc + '.orc', 83 output : orcsrc + '.h', 84 command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']) 85 orc_c = custom_target(orcsrc + '.c', 86 input : orcsrc + '.orc', 87 output : orcsrc + '.c', 88 command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']) 89 orc_targets += {'name': orcsrc, 'orc-source': files(orcsrc + '.orc'), 'header': orc_h, 'source': orc_c} 90else 91 orc_h = configure_file(input : orcsrc + '-dist.h', 92 output : orcsrc + '.h', 93 copy : true) 94 orc_c = configure_file(input : orcsrc + '-dist.c', 95 output : orcsrc + '.c', 96 copy : true) 97endif 98 99simd_cargs = [] 100simd_dependencies = [] 101 102if have_sse 103 audio_resampler_sse = static_library('audio_resampler_sse', 104 ['audio-resampler-x86-sse.c', gstaudio_h], 105 c_args : gst_plugins_base_args + [sse_args], 106 include_directories : [configinc, libsinc], 107 dependencies : [gst_base_dep], 108 pic : true, 109 install : false 110 ) 111 simd_cargs += ['-DHAVE_SSE'] 112 simd_dependencies += audio_resampler_sse 113endif 114 115if have_sse2 116 audio_resampler_sse2 = static_library('audio_resampler_sse2', 117 ['audio-resampler-x86-sse2.c', gstaudio_h], 118 c_args : gst_plugins_base_args + [sse2_args], 119 include_directories : [configinc, libsinc], 120 dependencies : [gst_base_dep], 121 pic : true, 122 install : false 123 ) 124 125 simd_cargs += ['-DHAVE_SSE2'] 126 simd_dependencies += audio_resampler_sse2 127endif 128 129if have_sse41 130 audio_resampler_sse41 = static_library('audio_resampler_sse41', 131 ['audio-resampler-x86-sse41.c', gstaudio_h], 132 c_args : gst_plugins_base_args + [sse41_args], 133 include_directories : [configinc, libsinc], 134 dependencies : [gst_base_dep], 135 pic : true, 136 install : false 137 ) 138 139 simd_cargs += ['-DHAVE_SSE41'] 140 simd_dependencies += audio_resampler_sse41 141endif 142 143gstaudio = library('gstaudio-@0@'.format(api_version), 144 audio_src, gstaudio_h, gstaudio_c, orc_c, orc_h, 145 c_args : gst_plugins_base_args + simd_cargs + ['-DBUILDING_GST_AUDIO', '-DG_LOG_DOMAIN="GStreamer-Audio"'], 146 include_directories: [configinc, libsinc], 147 link_with : simd_dependencies, 148 version : libversion, 149 soversion : soversion, 150 darwin_versions : osxversion, 151 install : true, 152 dependencies : gstaudio_deps, 153) 154pkg_name = 'gstreamer-audio-1.0' 155pkgconfig.generate(gstaudio, 156 libraries : [gst_dep, gst_base_dep], 157 variables : pkgconfig_variables, 158 subdirs : pkgconfig_subdirs, 159 name : pkg_name, 160 description : 'Audio helper functions and base classes', 161) 162 163library_def = {'lib': gstaudio} 164if build_gir 165 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ] 166 gir = { 167 'sources' : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h], 168 'namespace' : 'GstAudio', 169 'nsversion' : api_version, 170 'identifier_prefix' : 'Gst', 171 'symbol_prefix' : 'gst', 172 'export_packages' : pkg_name, 173 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GLib-2.0', 'GObject-2.0', 'GModule-2.0' ], 174 'install' : true, 175 'extra_args' : gst_gir_extra_args, 176 'dependencies' : gstaudio_deps 177 } 178 library_def = {'lib': library_def['lib'], 'gir': [gir]} 179 if not static_build 180 audio_gir = gnome.generate_gir(gstaudio, kwargs: gir) 181 audio_gen_sources += [audio_gir] 182 endif 183endif 184libraries += [[pkg_name, library_def]] 185 186audio_dep = declare_dependency(link_with : gstaudio, 187 include_directories : [libsinc], 188 dependencies : gstaudio_deps, 189 sources : audio_gen_sources) 190 191meson.override_dependency(pkg_name, audio_dep) 192