• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1wasapi_sources = [
2  'gstmmdeviceenumerator.cpp',
3  'gstwasapi.c',
4  'gstwasapisrc.c',
5  'gstwasapisink.c',
6  'gstwasapiutil.c',
7  'gstwasapidevice.c',
8]
9
10if host_system != 'windows'
11  if get_option('wasapi').disabled()
12    subdir_done()
13  elif get_option('wasapi').enabled()
14    error('Cannot build wasapi plugin when not building for Windows')
15  endif
16endif
17
18ole32_dep = cc.find_library('ole32', required : get_option('wasapi'))
19ksuser_dep = cc.find_library('ksuser', required : get_option('wasapi'))
20have_audioclient_h = cc.has_header('audioclient.h')
21if not have_audioclient_h and get_option('wasapi').enabled()
22  error('wasapi plugin enabled but audioclient.h not found')
23endif
24
25if ole32_dep.found() and ksuser_dep.found() and have_audioclient_h
26  wasapi_args = ['-DCOBJMACROS']
27  if cc.has_header_symbol('audioclient.h', 'AUDCLNT_STREAMOPTIONS_NONE')
28    wasapi_args += ['-DHAVE_AUDCLNT_STREAMOPTIONS']
29  endif
30
31  gstwasapi = library('gstwasapi',
32    wasapi_sources,
33    c_args : gst_plugins_bad_args + wasapi_args,
34    cpp_args: gst_plugins_bad_args,
35    include_directories : [configinc],
36    dependencies : [gstaudio_dep, ole32_dep, ksuser_dep],
37    install : true,
38    install_dir : plugins_install_dir)
39  pkgconfig.generate(gstwasapi, install_dir : plugins_pkgconfig_install_dir)
40  plugins += [gstwasapi]
41endif
42