meson: Add build files for androidmedia and opensles

Note that androidmedia requires Android gstgl
This commit is contained in:
Nirbheek Chauhan 2018-08-28 12:54:07 +05:30
parent 4ca76e0c12
commit 4af7637012
4 changed files with 74 additions and 2 deletions

View file

@ -74,6 +74,7 @@ option('x11', type : 'feature', value : 'auto', description : 'X11 support in Vu
# Feature options for plugins that need external deps # Feature options for plugins that need external deps
option('aom', type : 'feature', value : 'auto', description : 'AOM AV1 video codec plugin') option('aom', type : 'feature', value : 'auto', description : 'AOM AV1 video codec plugin')
option('androidmedia', type : 'feature', value : 'auto', description : 'Video capture and codec plugins for Android')
option('applemedia', type : 'feature', value : 'auto', description : 'Video capture and codec access plugins for macOS and iOS') option('applemedia', type : 'feature', value : 'auto', description : 'Video capture and codec access plugins for macOS and iOS')
option('assrender', type : 'feature', value : 'auto', description : 'ASS/SSA subtitle renderer plugin') option('assrender', type : 'feature', value : 'auto', description : 'ASS/SSA subtitle renderer plugin')
option('bluez', type : 'feature', value : 'auto', description : 'Bluetooth audio A2DP/AVDTP sink, AVDTP source plugin') option('bluez', type : 'feature', value : 'auto', description : 'Bluetooth audio A2DP/AVDTP sink, AVDTP source plugin')
@ -112,6 +113,7 @@ option('musepack', type : 'feature', value : 'auto', description : 'libmpcdec Mu
option('neon', type : 'feature', value : 'auto', description : 'NEON HTTP source plugin') option('neon', type : 'feature', value : 'auto', description : 'NEON HTTP source plugin')
option('openh264', type : 'feature', value : 'auto', description : 'H.264 video codec plugin') option('openh264', type : 'feature', value : 'auto', description : 'H.264 video codec plugin')
option('openjpeg', type : 'feature', value : 'auto', description : 'JPEG2000 image codec plugin') option('openjpeg', type : 'feature', value : 'auto', description : 'JPEG2000 image codec plugin')
option('opensles', type : 'feature', value : 'auto', description : 'OpenSL ES audio source/sink plugin')
option('opus', type : 'feature', value : 'auto', description : 'OPUS audio parser plugin') option('opus', type : 'feature', value : 'auto', description : 'OPUS audio parser plugin')
option('resindvd', type : 'feature', value : 'auto', description : 'Resin DVD playback plugin') option('resindvd', type : 'feature', value : 'auto', description : 'Resin DVD playback plugin')
option('rsvg', type : 'feature', value : 'auto', description : 'SVG overlayer and image decoder plugin') option('rsvg', type : 'feature', value : 'auto', description : 'SVG overlayer and image decoder plugin')

View file

@ -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

View file

@ -1,7 +1,7 @@
#FIXME #FIXME
#subdir('acmenc') #subdir('acmenc')
#subdir('acmmp3dec') #subdir('acmmp3dec')
#subdir('androidmedia') subdir('androidmedia')
subdir('applemedia') subdir('applemedia')
subdir('bluez') subdir('bluez')
subdir('d3dvideosink') subdir('d3dvideosink')
@ -16,7 +16,7 @@ subdir('ipcpipeline')
subdir('kms') subdir('kms')
subdir('msdk') subdir('msdk')
#subdir('nvenc') #subdir('nvenc')
#subdir('opensles') subdir('opensles')
subdir('shm') subdir('shm')
subdir('uvch264') subdir('uvch264')
#subdir('vcd') #subdir('vcd')

29
sys/opensles/meson.build Normal file
View file

@ -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