summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-08-28 12:54:07 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-08-29 14:58:19 +0530
commit4af7637012413209ce728ec377b265acbbaadc08 (patch)
treea12b1e25fcd326f5d6c6f9e5fc4790cd8aee982f /sys
parent4ca76e0c123b37175dd76057dbb45c96b47e7477 (diff)
meson: Add build files for androidmedia and opensles
Note that androidmedia requires Android gstgl
Diffstat (limited to 'sys')
-rw-r--r--sys/androidmedia/meson.build41
-rw-r--r--sys/meson.build4
-rw-r--r--sys/opensles/meson.build29
3 files changed, 72 insertions, 2 deletions
diff --git a/sys/androidmedia/meson.build b/sys/androidmedia/meson.build
new file mode 100644
index 000000000..a52cc0eb8
--- /dev/null
+++ b/sys/androidmedia/meson.build
@@ -0,0 +1,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
diff --git a/sys/meson.build b/sys/meson.build
index 69956f0a2..c21494df8 100644
--- a/sys/meson.build
+++ b/sys/meson.build
@@ -1,7 +1,7 @@
#FIXME
#subdir('acmenc')
#subdir('acmmp3dec')
-#subdir('androidmedia')
+subdir('androidmedia')
subdir('applemedia')
subdir('bluez')
subdir('d3dvideosink')
@@ -16,7 +16,7 @@ subdir('ipcpipeline')
subdir('kms')
subdir('msdk')
#subdir('nvenc')
-#subdir('opensles')
+subdir('opensles')
subdir('shm')
subdir('uvch264')
#subdir('vcd')
diff --git a/sys/opensles/meson.build b/sys/opensles/meson.build
new file mode 100644
index 000000000..75bdb6c5d
--- /dev/null
+++ b/sys/opensles/meson.build
@@ -0,0 +1,29 @@
+opensles_sources = [
+ 'openslescommon.c',
+ 'openslesringbuffer.c',
+ 'openslessink.c',
+ 'openslessrc.c',
+ 'opensles.c',
+]
+
+opensles_option = get_option('opensles')
+if opensles_option.disabled()
+ subdir_done()
+endif
+
+have_opensles_h = cc.has_header('SLES/OpenSLES.h', required : false)
+if not have_opensles_h and opensles_option.enabled()
+ error('opensles plugin enabled but SLES/OpenSLES.h not found')
+endif
+opensles_dep = cc.find_library('OpenSLES', required : opensles_option)
+
+if have_opensles_h and opensles_dep.found()
+ gstopensles = library('gstopensles',
+ opensles_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [gstaudio_dep, opensles_dep],
+ install : true,
+ install_dir : plugins_install_dir)
+ pkgconfig.generate(gstopensles, install_dir : plugins_pkgconfig_install_dir)
+endif