diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-03-23 02:48:10 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-03-23 02:48:39 +0530 |
commit | ddcd7735b673a111bc73a3e58853a662d1e6c72e (patch) | |
tree | 856804e57009d05cf403b8b4f85dca160fc69265 | |
parent | 40a2deef808b9a34d0a257134bf836962a5a1065 (diff) | |
download | gstreamer-plugins-bad-ddcd7735b673a111bc73a3e58853a662d1e6c72e.tar.gz |
meson: Build mpeg2enc and mplex when available
-rw-r--r-- | ext/meson.build | 4 | ||||
-rw-r--r-- | ext/mpeg2enc/meson.build | 19 | ||||
-rw-r--r-- | ext/mplex/meson.build | 18 | ||||
-rw-r--r-- | meson.build | 12 |
4 files changed, 51 insertions, 2 deletions
diff --git a/ext/meson.build b/ext/meson.build index 0eba7b49a..eba12d7a9 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -26,8 +26,8 @@ subdir('libde265') subdir('libmms') #subdir('lv2') #subdir('modplug') -#subdir('mpeg2enc') -#subdir('mplex') +subdir('mpeg2enc') +subdir('mplex') #subdir('musepack') #subdir('neon') #subdir('ofa') diff --git a/ext/mpeg2enc/meson.build b/ext/mpeg2enc/meson.build new file mode 100644 index 000000000..670015bca --- /dev/null +++ b/ext/mpeg2enc/meson.build @@ -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 diff --git a/ext/mplex/meson.build b/ext/mplex/meson.build new file mode 100644 index 000000000..ee949e4f9 --- /dev/null +++ b/ext/mplex/meson.build @@ -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 diff --git a/meson.build b/meson.build index be96e8d33..a3161a1cd 100644 --- a/meson.build +++ b/meson.build @@ -302,9 +302,21 @@ glib_dep = dependency('glib-2.0', version : glib_req) gio_dep = dependency('gio-2.0', version : glib_req) gmodule_dep = dependency('gmodule-2.0', version : glib_req) x11_dep = dependency('x11', required : false) + # Used by dtls and hls 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() cdata.set('HAVE_X11', 1) endif |