meson: Build mpeg2enc and mplex when available

This commit is contained in:
Nirbheek Chauhan 2017-03-23 02:48:10 +05:30
parent 40a2deef80
commit ddcd7735b6
4 changed files with 51 additions and 2 deletions

View file

@ -26,8 +26,8 @@ subdir('libde265')
subdir('libmms') subdir('libmms')
#subdir('lv2') #subdir('lv2')
#subdir('modplug') #subdir('modplug')
#subdir('mpeg2enc') subdir('mpeg2enc')
#subdir('mplex') subdir('mplex')
#subdir('musepack') #subdir('musepack')
#subdir('neon') #subdir('neon')
#subdir('ofa') #subdir('ofa')

19
ext/mpeg2enc/meson.build Normal file
View file

@ -0,0 +1,19 @@
if mjpegtools_dep.found()
mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : false)
if mpeg2enc_dep.found()
gstmpeg2enc = library('gstmpeg2enc',
'gstmpeg2enc.cc',
'gstmpeg2encoptions.cc',
'gstmpeg2encoder.cc',
'gstmpeg2encstreamwriter.cc',
'gstmpeg2encpicturereader.cc',
cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=' + mjpegtools_api],
link_args : noseh_link_args,
include_directories : [configinc],
dependencies : [gstvideo_dep, mjpegtools_dep, mpeg2enc_dep],
install : true,
install_dir : plugins_install_dir,
)
endif
endif

18
ext/mplex/meson.build Normal file
View file

@ -0,0 +1,18 @@
if mjpegtools_dep.found()
mplex2_dep = cxx.find_library('mplex2', required : false)
if mplex2_dep.found()
gstmplex2 = library('gstmplex2',
'gstmplex.cc',
'gstmplexibitstream.cc',
'gstmplexjob.cc',
'gstmplexoutputstream.cc',
cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=' + mjpegtools_api],
link_args : noseh_link_args,
include_directories : [configinc],
dependencies : [gstaudio_dep, mjpegtools_dep, mplex2_dep],
install : true,
install_dir : plugins_install_dir,
)
endif
endif

View file

@ -302,9 +302,21 @@ glib_dep = dependency('glib-2.0', version : glib_req)
gio_dep = dependency('gio-2.0', version : glib_req) gio_dep = dependency('gio-2.0', version : glib_req)
gmodule_dep = dependency('gmodule-2.0', version : glib_req) gmodule_dep = dependency('gmodule-2.0', version : glib_req)
x11_dep = dependency('x11', required : false) x11_dep = dependency('x11', required : false)
# Used by dtls and hls # Used by dtls and hls
openssl_dep = dependency('openssl', version : '>= 1.0.1', required : false) openssl_dep = dependency('openssl', version : '>= 1.0.1', required : false)
# Used by mpeg2enc and mplex
# mjpegtools upstream breaks API constantly and doesn't export the version in
# a header anywhere. The configure file has a lot of logic to support old
# versions, but it all seems untested and broken. Require 2.0.0. Can be changed
# if someone complains.
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : false)
mjpegtools_api = '0'
if mjpegtools_dep.found()
mjpegtools_api = '20000'
endif
if x11_dep.found() if x11_dep.found()
cdata.set('HAVE_X11', 1) cdata.set('HAVE_X11', 1)
endif endif