summaryrefslogtreecommitdiff
path: root/sys/androidmedia/meson.build
blob: a52cc0eb8d9e85ade481cbcfa229d5d07234ed05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
androidmedia_sources = [
  'gstahcsrc.c',
  'gstahssrc.c',
  'gstamcaudiodec.c',
  'gstamc.c',
  'gstamcsurface.c',
  'gstamcsurfacetexture.c',
  'gstamcvideodec.c',
  'gstamcvideoenc.c',
  'gst-android-graphics-imageformat.c',
  'gst-android-hardware-camera.c',
  'gst-android-hardware-sensor.c',
  'gstjniutils.c'
]

if host_system != 'android' or get_option('androidmedia').disabled()
  subdir_done()
endif

if not gstgl_dep.found()
  if get_option('androidmedia').enabled()
    error('androidmedia plugin enabled but GL support was not detected')
  endif
  subdir_done()
endif

have_jni_h = cc.has_header('jni.h', required : false)
if not have_jni_h and get_option('androidmedia').enabled()
  error('androidmedia plugin enabled but jni.h not found')
endif

if have_jni_h
  gstandroidmedia = library('gstandroidmedia',
    androidmedia_sources,
    c_args : gst_plugins_bad_args,
    include_directories : [configinc],
    dependencies : [gstgl_dep, gstpbutils_dep, gstaudio_dep, gstvideo_dep, gstphotography_dep],
    install : true,
    install_dir : plugins_install_dir)
  pkgconfig.generate(gstandroidmedia, install_dir : plugins_pkgconfig_install_dir)
endif