1 mpeg2enc_opt = get_option('mpeg2enc').require(gpl_allowed, error_message: '''
2 Plugin mpeg2enc explicitly required via options but GPL-licensed plugins disabled via options.
3 Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
6 # mjpegtools upstream breaks API constantly and doesn't export the version in
7 # a header anywhere. The configure file has a lot of logic to support old
8 # versions, but it all seems untested and broken. Require 2.0.0. Can be changed
9 # if someone complains.
10 mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : mpeg2enc_opt)
11 mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : mpeg2enc_opt)
13 if mjpegtools_dep.found() and mpeg2enc_dep.found()
16 '-Wno-mismatched-tags', # mjpeg headers get class/struct mixed up
19 if cxx.has_argument(arg)
24 gstmpeg2enc = library('gstmpeg2enc',
26 'gstmpeg2encoptions.cc',
28 'gstmpeg2encstreamwriter.cc',
29 'gstmpeg2encpicturereader.cc',
30 cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=20000'] + no_warn_args,
31 link_args : noseh_link_args,
32 include_directories : [configinc, libsinc],
33 dependencies : [gstvideo_dep, mjpegtools_dep, mpeg2enc_dep],
35 install_dir : plugins_install_dir,
37 pkgconfig.generate(gstmpeg2enc, install_dir : plugins_pkgconfig_install_dir)
38 plugins += [gstmpeg2enc]