mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
meson: add 'gpl' option and only build plugins with (A)GPL deps if explicitly enabled
Require explicit opt-in to build plugins with (A)GPL dependencies. Keep ugly/bad options on 'auto' for now so cerbero doesn't fail. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1084>
This commit is contained in:
parent
95eb8672a6
commit
d4bdbeaa0d
22 changed files with 180 additions and 67 deletions
|
@ -63,6 +63,7 @@ variables:
|
||||||
-Drtsp_server=enabled
|
-Drtsp_server=enabled
|
||||||
-Dvaapi=enabled
|
-Dvaapi=enabled
|
||||||
-Dsharp=disabled
|
-Dsharp=disabled
|
||||||
|
-Dgpl=enabled
|
||||||
|
|
||||||
MESON_GST_WERROR: >
|
MESON_GST_WERROR: >
|
||||||
-Dgstreamer:werror=true
|
-Dgstreamer:werror=true
|
||||||
|
|
24
README.md
24
README.md
|
@ -129,6 +129,30 @@ the build files to find `libmfx`.
|
||||||
The plugin will be automatically enabled if possible, but you can ensure it by
|
The plugin will be automatically enabled if possible, but you can ensure it by
|
||||||
passing `-Dbad=enabled -Dgst-plugins-bad:msdk=enabled` to `meson`.
|
passing `-Dbad=enabled -Dgst-plugins-bad:msdk=enabled` to `meson`.
|
||||||
|
|
||||||
|
### Building plugins with (A)GPL-licensed dependencies
|
||||||
|
|
||||||
|
Some plugins have GPL- or AGPL-licensed dependencies and will only be built
|
||||||
|
if you have explicitly opted in to allow (A)GPL-licensed dependencies by
|
||||||
|
passing `-Dgpl=enabled` to Meson.
|
||||||
|
|
||||||
|
List of plugins with (A)GPL-licensed dependencies (non-exhaustive) in gst-plugins-bad:
|
||||||
|
- dts (DTS audio decoder plugin)
|
||||||
|
- faad (Free AAC audio decoder plugin)
|
||||||
|
- iqa (Image quality assessment plugin based on dssim-c)
|
||||||
|
- mpeg2enc (MPEG-2 video encoder plugin)
|
||||||
|
- mplex (audio/video multiplexer plugin)
|
||||||
|
- ofa (Open Fingerprint Architecture library plugin)
|
||||||
|
- resindvd (Resin DVD playback plugin)
|
||||||
|
- x265 (HEVC/H.265 video encoder plugin)
|
||||||
|
|
||||||
|
List of plugins with (A)GPL-licensed dependencies (non-exhaustive) in gst-plugins-ugly:
|
||||||
|
- a52dec (Dolby Digital (AC-3) audio decoder plugin)
|
||||||
|
- cdio (CD audio source plugin based on libcdio)
|
||||||
|
- dvdread (DVD video source plugin based on libdvdread)
|
||||||
|
- mpeg2dec (MPEG-2 video decoder plugin based on libmpeg2)
|
||||||
|
- sidplay (Commodore 64 audio decoder plugin based on libsidplay)
|
||||||
|
- x264 (H.264 video encoder plugin based on libx264)
|
||||||
|
|
||||||
### Static build
|
### Static build
|
||||||
|
|
||||||
Since *1.18.0* when doing a static build using `--default-library=static`, a
|
Since *1.18.0* when doing a static build using `--default-library=static`, a
|
||||||
|
|
|
@ -53,7 +53,8 @@ $env:MESON_ARGS = "-Dglib:installed_tests=false " +
|
||||||
"-Dlibav=disabled " +
|
"-Dlibav=disabled " +
|
||||||
"-Dvaapi=disabled " +
|
"-Dvaapi=disabled " +
|
||||||
"-Dgst-plugins-base:pango=enabled " +
|
"-Dgst-plugins-base:pango=enabled " +
|
||||||
"-Dgst-plugins-good:cairo=enabled "
|
"-Dgst-plugins-good:cairo=enabled " +
|
||||||
|
"-Dgpl=enabled "
|
||||||
|
|
||||||
Write-Output "Building gst"
|
Write-Output "Building gst"
|
||||||
cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson _build $env:MESON_ARGS && meson compile -C _build && ninja -C _build install"
|
cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson _build $env:MESON_ARGS && meson compile -C _build && ninja -C _build install"
|
||||||
|
|
|
@ -34,6 +34,10 @@ option('gst-full-device-providers', type : 'string', value : '',
|
||||||
option('gst-full-dynamic-types', type : 'string', value : '',
|
option('gst-full-dynamic-types', type : 'string', value : '',
|
||||||
description : '''List of dynamic types to expose in gstreamer-full's ABI with the syntax plugin:dt1,dt2. By default '' will export all device provider of the enabled plugin.''')
|
description : '''List of dynamic types to expose in gstreamer-full's ABI with the syntax plugin:dt1,dt2. By default '' will export all device provider of the enabled plugin.''')
|
||||||
|
|
||||||
|
# License-related feature options
|
||||||
|
option('gpl', type: 'feature', value: 'disabled',
|
||||||
|
description: 'Allow build of plugins that have (A)GPL-licensed dependencies')
|
||||||
|
|
||||||
# Common options, automatically inherited by subprojects
|
# Common options, automatically inherited by subprojects
|
||||||
option('tests', type : 'feature', value : 'auto', description : 'Build tests')
|
option('tests', type : 'feature', value : 'auto', description : 'Build tests')
|
||||||
option('examples', type : 'feature', value : 'auto', description : 'Build examples')
|
option('examples', type : 'feature', value : 'auto', description : 'Build examples')
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
|
dts_opt = get_option('dts').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin dts explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
# Don't do any dependency checks if disabled
|
# Don't do any dependency checks if disabled
|
||||||
if get_option('dts').disabled()
|
if dts_opt.disabled()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -9,7 +14,7 @@ if not dca_dep.found()
|
||||||
if cc.has_header_symbol('dca.h', 'dca_init')
|
if cc.has_header_symbol('dca.h', 'dca_init')
|
||||||
dca_dep = cc.find_library('dca', required : false)
|
dca_dep = cc.find_library('dca', required : false)
|
||||||
endif
|
endif
|
||||||
if not dca_dep.found() and get_option('dts').enabled()
|
if not dca_dep.found() and dts_opt.enabled()
|
||||||
error('DTS plugin enabled, but libdca not found')
|
error('DTS plugin enabled, but libdca not found')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,12 +1,22 @@
|
||||||
|
faad_opt = get_option('faad').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin faad explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
if faad_opt.disabled()
|
||||||
|
faad_dep = dependency('', required: false)
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
faad_args = [ ]
|
faad_args = [ ]
|
||||||
|
|
||||||
have_faad = cc.has_header_symbol('neaacdec.h', 'NeAACDecOpen')
|
have_faad = cc.has_header_symbol('neaacdec.h', 'NeAACDecOpen')
|
||||||
have_faad_2_7 = have_faad and cc.has_header_symbol('neaacdec.h', 'LATM')
|
have_faad_2_7 = have_faad and cc.has_header_symbol('neaacdec.h', 'LATM')
|
||||||
if have_faad and not have_faad_2_7 and get_option('faad').enabled()
|
if have_faad and not have_faad_2_7 and faad_opt.enabled()
|
||||||
message('Found faad2, but too old (< v2.7.0)')
|
message('Found faad2, but too old (< v2.7.0)')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
faad_dep = cc.find_library('faad', required : get_option('faad'))
|
faad_dep = cc.find_library('faad', required : faad_opt)
|
||||||
|
|
||||||
if faad_dep.found() and have_faad_2_7
|
if faad_dep.found() and have_faad_2_7
|
||||||
gstfaad = library('gstfaad',
|
gstfaad = library('gstfaad',
|
||||||
|
|
|
@ -516,6 +516,7 @@ plugin_init (GstPlugin * plugin)
|
||||||
return GST_ELEMENT_REGISTER (iqa, plugin);
|
return GST_ELEMENT_REGISTER (iqa, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: effective iqa plugin license should be AGPL3+ !
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
iqa,
|
iqa,
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
dssim_dep = dependency('dssim', required : get_option('iqa'),
|
iqa_opt = get_option('iqa').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin iqa explicitly required via options but (A)GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow (A)GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
dssim_dep = dependency('dssim', required: iqa_opt,
|
||||||
fallback: ['dssim', 'dssim_dep'])
|
fallback: ['dssim', 'dssim_dep'])
|
||||||
|
|
||||||
if dssim_dep.found()
|
if dssim_dep.found()
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
|
mpeg2enc_opt = get_option('mpeg2enc').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin mpeg2enc explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
# mjpegtools upstream breaks API constantly and doesn't export the version in
|
# 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
|
# 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
|
# versions, but it all seems untested and broken. Require 2.0.0. Can be changed
|
||||||
# if someone complains.
|
# if someone complains.
|
||||||
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mpeg2enc'))
|
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : mpeg2enc_opt)
|
||||||
mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : get_option('mpeg2enc'))
|
mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : mpeg2enc_opt)
|
||||||
|
|
||||||
|
if mjpegtools_dep.found() and mpeg2enc_dep.found()
|
||||||
no_warn_args = []
|
no_warn_args = []
|
||||||
foreach arg : [
|
foreach arg : [
|
||||||
'-Wno-mismatched-tags', # mjpeg headers get class/struct mixed up
|
'-Wno-mismatched-tags', # mjpeg headers get class/struct mixed up
|
||||||
|
@ -15,7 +21,6 @@ foreach arg : [
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if mjpegtools_dep.found() and mpeg2enc_dep.found()
|
|
||||||
gstmpeg2enc = library('gstmpeg2enc',
|
gstmpeg2enc = library('gstmpeg2enc',
|
||||||
'gstmpeg2enc.cc',
|
'gstmpeg2enc.cc',
|
||||||
'gstmpeg2encoptions.cc',
|
'gstmpeg2encoptions.cc',
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
# See: ext/mpeg2enc for note about mjpegtools dep
|
mplex_opt = get_option('mplex').require(gpl_allowed, error_message: '''
|
||||||
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mplex'))
|
Plugin mplex explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
mplex2_dep = cxx.find_library('mplex2', required : get_option('mplex'))
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
# See: ext/mplex for note about mjpegtools dep
|
||||||
|
mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : mplex_opt)
|
||||||
|
mplex2_dep = cxx.find_library('mplex2', required : mplex_opt)
|
||||||
|
|
||||||
if mjpegtools_dep.found() and mplex2_dep.found()
|
if mjpegtools_dep.found() and mplex2_dep.found()
|
||||||
gstmplex2 = library('gstmplex',
|
gstmplex2 = library('gstmplex',
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
resindvd_opt = get_option('resindvd').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin resindvd explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
resindvd_sources = [
|
resindvd_sources = [
|
||||||
'gstmpegdemux.c',
|
'gstmpegdemux.c',
|
||||||
'gstmpegdesc.c',
|
'gstmpegdesc.c',
|
||||||
|
@ -10,8 +15,8 @@ resindvd_sources = [
|
||||||
'rsnparsetter.c',
|
'rsnparsetter.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : get_option('resindvd'))
|
dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : resindvd_opt)
|
||||||
dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : get_option('resindvd'))
|
dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : resindvd_opt)
|
||||||
|
|
||||||
if dvdnav_dep.found() and dvdread_dep.found()
|
if dvdnav_dep.found() and dvdread_dep.found()
|
||||||
gstresindvd = library('gstresindvd',
|
gstresindvd = library('gstresindvd',
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
x265_dep = dependency('x265', required: get_option('x265'))
|
x265_opt = get_option('x265').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin x265 explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
x265_dep = dependency('x265', required: x265_opt)
|
||||||
if x265_dep.found()
|
if x265_dep.found()
|
||||||
gstx265 = library('gstx265',
|
gstx265 = library('gstx265',
|
||||||
'gstx265enc.c',
|
'gstx265enc.c',
|
||||||
|
|
|
@ -486,6 +486,8 @@ pkgconfig.generate(
|
||||||
description : 'Streaming media framework, bad plugins libraries',
|
description : 'Streaming media framework, bad plugins libraries',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
gpl_allowed = get_option('gpl').allowed()
|
||||||
|
|
||||||
subdir('gst-libs')
|
subdir('gst-libs')
|
||||||
subdir('gst')
|
subdir('gst')
|
||||||
subdir('sys')
|
subdir('sys')
|
||||||
|
@ -559,5 +561,9 @@ if meson.version().version_compare('>= 0.54')
|
||||||
plugin_names += [plugin.name()]
|
plugin_names += [plugin.name()]
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
summary({'Plugins':plugin_names}, list_sep: ', ')
|
|
||||||
|
summary({
|
||||||
|
'Plugins': plugin_names,
|
||||||
|
'(A)GPL license allowed': gpl_allowed,
|
||||||
|
}, list_sep: ', ')
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -101,10 +101,10 @@ option('decklink', type : 'feature', value : 'auto', description : 'DeckLink aud
|
||||||
option('directfb', type : 'feature', value : 'auto', description : 'DirectFB video sink plugin')
|
option('directfb', type : 'feature', value : 'auto', description : 'DirectFB video sink plugin')
|
||||||
option('directsound', type : 'feature', value : 'auto', description : 'Directsound audio source plugin')
|
option('directsound', type : 'feature', value : 'auto', description : 'Directsound audio source plugin')
|
||||||
option('dtls', type : 'feature', value : 'auto', description : 'DTLS encoder and decoder plugin')
|
option('dtls', type : 'feature', value : 'auto', description : 'DTLS encoder and decoder plugin')
|
||||||
option('dts', type : 'feature', value : 'auto', description : 'DTS audio decoder plugin')
|
option('dts', type : 'feature', value : 'auto', description : 'DTS audio decoder plugin (GPL - only built if gpl option is also enabled!)')
|
||||||
option('dvb', type : 'feature', value : 'auto', description : 'DVB video bin and source plugin')
|
option('dvb', type : 'feature', value : 'auto', description : 'DVB video bin and source plugin')
|
||||||
option('faac', type : 'feature', value : 'auto', description : 'Free AAC audio encoder plugin')
|
option('faac', type : 'feature', value : 'auto', description : 'Free AAC audio encoder plugin')
|
||||||
option('faad', type : 'feature', value : 'auto', description : 'Free AAC audio decoder plugin')
|
option('faad', type : 'feature', value : 'auto', description : 'Free AAC audio decoder plugin (GPL - only built if gpl option is also enabled!)')
|
||||||
option('fbdev', type : 'feature', value : 'auto', description : 'Framebuffer video sink plugin')
|
option('fbdev', type : 'feature', value : 'auto', description : 'Framebuffer video sink plugin')
|
||||||
option('fdkaac', type : 'feature', value : 'auto', description : 'Fraunhofer AAC audio codec plugin')
|
option('fdkaac', type : 'feature', value : 'auto', description : 'Fraunhofer AAC audio codec plugin')
|
||||||
option('flite', type : 'feature', value : 'auto', description : 'Flite speech synthesizer source plugin')
|
option('flite', type : 'feature', value : 'auto', description : 'Flite speech synthesizer source plugin')
|
||||||
|
@ -114,7 +114,7 @@ option('gme', type : 'feature', value : 'auto', description : 'libgme gaming con
|
||||||
option('gs', type : 'feature', value : 'auto', description : 'Google Cloud Storage source and sink plugin')
|
option('gs', type : 'feature', value : 'auto', description : 'Google Cloud Storage source and sink plugin')
|
||||||
option('gsm', type : 'feature', value : 'auto', description : 'GSM encoder/decoder plugin')
|
option('gsm', type : 'feature', value : 'auto', description : 'GSM encoder/decoder plugin')
|
||||||
option('ipcpipeline', type : 'feature', value : 'auto', description : 'Inter-process communication plugin')
|
option('ipcpipeline', type : 'feature', value : 'auto', description : 'Inter-process communication plugin')
|
||||||
option('iqa', type : 'feature', value : 'auto', description : 'Image quality assessment plugin')
|
option('iqa', type : 'feature', value : 'auto', description : 'Image quality assessment plugin (AGPL - only built if gpl option is also enabled!)')
|
||||||
option('kate', type : 'feature', value : 'auto', description : 'Kate subtitle parser, tagger, and codec plugin')
|
option('kate', type : 'feature', value : 'auto', description : 'Kate subtitle parser, tagger, and codec plugin')
|
||||||
option('kms', type : 'feature', value : 'auto', description : 'KMS video sink plugin')
|
option('kms', type : 'feature', value : 'auto', description : 'KMS video sink plugin')
|
||||||
option('ladspa', type : 'feature', value : 'auto', description : 'LADSPA plugin bridge')
|
option('ladspa', type : 'feature', value : 'auto', description : 'LADSPA plugin bridge')
|
||||||
|
@ -126,8 +126,8 @@ option('lv2', type : 'feature', value : 'auto', description : 'LV2 audio plugin
|
||||||
option('mediafoundation', type : 'feature', value : 'auto', description : 'Microsoft Media Foundation plugin')
|
option('mediafoundation', type : 'feature', value : 'auto', description : 'Microsoft Media Foundation plugin')
|
||||||
option('microdns', type : 'feature', value : 'auto', description : 'libmicrodns-based device provider')
|
option('microdns', type : 'feature', value : 'auto', description : 'libmicrodns-based device provider')
|
||||||
option('modplug', type : 'feature', value : 'auto', description : 'ModPlug audio decoder plugin')
|
option('modplug', type : 'feature', value : 'auto', description : 'ModPlug audio decoder plugin')
|
||||||
option('mpeg2enc', type : 'feature', value : 'auto', description : 'mpeg2enc video encoder plugin')
|
option('mpeg2enc', type : 'feature', value : 'auto', description : 'mpeg2enc video encoder plugin (GPL - only built if gpl option is also enabled!)')
|
||||||
option('mplex', type : 'feature', value : 'auto', description : 'mplex audio/video multiplexer plugin')
|
option('mplex', type : 'feature', value : 'auto', description : 'mplex audio/video multiplexer plugin (GPL - only built if gpl option is also enabled!)')
|
||||||
option('msdk', type : 'feature', value : 'auto', description : 'Intel Media SDK video encoder/decoder plugin')
|
option('msdk', type : 'feature', value : 'auto', description : 'Intel Media SDK video encoder/decoder plugin')
|
||||||
option('musepack', type : 'feature', value : 'auto', description : 'libmpcdec Musepack decoder plugin')
|
option('musepack', type : 'feature', value : 'auto', description : 'libmpcdec Musepack decoder plugin')
|
||||||
option('neon', type : 'feature', value : 'auto', description : 'NEON HTTP source plugin')
|
option('neon', type : 'feature', value : 'auto', description : 'NEON HTTP source plugin')
|
||||||
|
@ -141,7 +141,7 @@ option('openmpt', type : 'feature', value : 'auto', description : 'OpenMPT modul
|
||||||
option('openni2', type : 'feature', value : 'auto', description : 'OpenNI2 library plugin')
|
option('openni2', type : 'feature', value : 'auto', description : 'OpenNI2 library plugin')
|
||||||
option('opensles', type : 'feature', value : 'auto', description : 'OpenSL ES audio source/sink 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 (GPL - only built if gpl option is also enabled!)')
|
||||||
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')
|
||||||
option('rtmp', type : 'feature', value : 'auto', description : 'RTMP video network source and sink plugin')
|
option('rtmp', type : 'feature', value : 'auto', description : 'RTMP video network source and sink plugin')
|
||||||
option('sbc', type : 'feature', value : 'auto', description : 'SBC bluetooth audio codec plugin')
|
option('sbc', type : 'feature', value : 'auto', description : 'SBC bluetooth audio codec plugin')
|
||||||
|
@ -171,7 +171,7 @@ option('webrtcdsp', type : 'feature', value : 'auto', description : 'Plugin with
|
||||||
option('wildmidi', type : 'feature', value : 'auto', description : 'WildMidi midi soft synth plugin')
|
option('wildmidi', type : 'feature', value : 'auto', description : 'WildMidi midi soft synth plugin')
|
||||||
option('winks', type : 'feature', value : 'auto', description : 'Windows Kernel Streaming video source plugin')
|
option('winks', type : 'feature', value : 'auto', description : 'Windows Kernel Streaming video source plugin')
|
||||||
option('winscreencap', type : 'feature', value : 'auto', description : 'Windows Screen Capture video source plugin')
|
option('winscreencap', type : 'feature', value : 'auto', description : 'Windows Screen Capture video source plugin')
|
||||||
option('x265', type : 'feature', value : 'auto', description : 'HEVC/H.265 video encoder plugin')
|
option('x265', type : 'feature', value : 'auto', description : 'HEVC/H.265 video encoder plugin (GPL - only built if gpl option is also enabled!)')
|
||||||
option('zbar', type : 'feature', value : 'auto', description : 'Barcode image scanner plugin using zbar library')
|
option('zbar', type : 'feature', value : 'auto', description : 'Barcode image scanner plugin using zbar library')
|
||||||
option('zxing', type : 'feature', value : 'auto', description : 'Barcode image scanner plugin using zxing-cpp library')
|
option('zxing', type : 'feature', value : 'auto', description : 'Barcode image scanner plugin using zxing-cpp library')
|
||||||
option('wpe', type : 'feature', value : 'auto', description : 'WPE Web browser plugin')
|
option('wpe', type : 'feature', value : 'auto', description : 'WPE Web browser plugin')
|
||||||
|
@ -192,6 +192,10 @@ option('sctp-internal-usrsctp', type: 'feature', value : 'enabled',
|
||||||
option('mfx_api', type : 'combo', choices : ['MSDK', 'oneVPL', 'auto'], value : 'auto',
|
option('mfx_api', type : 'combo', choices : ['MSDK', 'oneVPL', 'auto'], value : 'auto',
|
||||||
description : 'Select MFX API to build against')
|
description : 'Select MFX API to build against')
|
||||||
|
|
||||||
|
# License-related feature options
|
||||||
|
option('gpl', type: 'feature', value: 'auto', yield: true, # FIXME: disable by default
|
||||||
|
description: 'Allow build plugins that have (A)GPL-licensed dependencies')
|
||||||
|
|
||||||
# Common feature options
|
# Common feature options
|
||||||
option('examples', type : 'feature', value : 'auto', yield : true)
|
option('examples', type : 'feature', value : 'auto', yield : true)
|
||||||
option('tests', type : 'feature', value : 'auto', yield : true)
|
option('tests', type : 'feature', value : 'auto', yield : true)
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
if get_option('a52dec').disabled()
|
a52dec_opt = get_option('a52dec').require(gpl_allowed, error_message: '''
|
||||||
subdir_done()
|
Plugin a52dec explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
endif
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
a52_dep = cc.find_library('a52', required : get_option('a52dec'))
|
a52_dep = cc.find_library('a52', required : get_option('a52dec'))
|
||||||
|
if a52_dep.found()
|
||||||
have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
|
have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
|
||||||
if not have_a52_h and get_option('a52dec').enabled()
|
|
||||||
error('a52dec plugin enabled but a52.h not found')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if a52_dep.found() and have_a52_h
|
if have_a52_h
|
||||||
a52dec = library('gsta52dec',
|
a52dec = library('gsta52dec',
|
||||||
'gsta52dec.c',
|
'gsta52dec.c',
|
||||||
c_args : ugly_args,
|
c_args : ugly_args,
|
||||||
|
@ -19,4 +18,7 @@ if a52_dep.found() and have_a52_h
|
||||||
)
|
)
|
||||||
pkgconfig.generate(a52dec, install_dir : plugins_pkgconfig_install_dir)
|
pkgconfig.generate(a52dec, install_dir : plugins_pkgconfig_install_dir)
|
||||||
plugins += [a52dec]
|
plugins += [a52dec]
|
||||||
|
elif a52dec_opt.enabled()
|
||||||
|
error('a52dec plugin enabled but a52.h not found')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
cdio_dep = dependency('libcdio', version : '>= 0.76', required : get_option('cdio'))
|
cdio_opt = get_option('cdio').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin cdio explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
cdio_dep = dependency('libcdio', version : '>= 0.76', required : cdio_opt)
|
||||||
|
|
||||||
if cdio_dep.found()
|
if cdio_dep.found()
|
||||||
cdio = library('gstcdio',
|
cdio = library('gstcdio',
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
dvdread_dep = dependency('dvdread', version : '>= 0.5.0', required : get_option('dvdread'))
|
dvdread_opt = get_option('dvdread').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin dvdread explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
dvdread_dep = dependency('dvdread', version : '>= 0.5.0', required : dvdread_opt)
|
||||||
|
|
||||||
if gmodule_dep.found() and dvdread_dep.found()
|
if gmodule_dep.found() and dvdread_dep.found()
|
||||||
dvdread = library('gstdvdread',
|
dvdread = library('gstdvdread',
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
mpeg2_dep = dependency('libmpeg2', version : '>= 0.4.0', required : get_option('mpeg2dec'))
|
mpeg2dec_opt = get_option('mpeg2dec').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin mpeg2dec explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
|
mpeg2_dep = dependency('libmpeg2', version : '>= 0.4.0', required : mpeg2dec_opt)
|
||||||
|
|
||||||
if mpeg2_dep.found()
|
if mpeg2_dep.found()
|
||||||
mpeg2dec = library('gstmpeg2dec',
|
mpeg2dec = library('gstmpeg2dec',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
sidplay_option = get_option('sidplay')
|
sidplay_option = get_option('sidplay').require(gpl_allowed, error_message: '''
|
||||||
if sidplay_option.disabled()
|
Plugin sidplay explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
subdir_done()
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
endif
|
''')
|
||||||
|
|
||||||
if not add_languages('cpp', native: false, required: sidplay_option)
|
if not add_languages('cpp', native: false, required: sidplay_option)
|
||||||
subdir_done()
|
subdir_done()
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
|
x264_opt = get_option('x264').require(gpl_allowed, error_message: '''
|
||||||
|
Plugin x264 explicitly required via options but GPL-licensed plugins disabled via options.
|
||||||
|
Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
|
||||||
|
''')
|
||||||
|
|
||||||
x264_sources = [
|
x264_sources = [
|
||||||
'gstx264enc.c',
|
'gstx264enc.c',
|
||||||
'gstencoderbitrateprofilemanager.c',
|
'gstencoderbitrateprofilemanager.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
x264_dep = dependency('x264', required : get_option('x264'),
|
x264_dep = dependency('x264', required : x264_opt,
|
||||||
fallback: ['x264', 'libx264_dep'])
|
fallback: ['x264', 'libx264_dep'])
|
||||||
|
|
||||||
if x264_dep.found()
|
if x264_dep.found()
|
||||||
|
|
|
@ -271,7 +271,10 @@ if get_option('default_library') == 'shared'
|
||||||
plugins_pkgconfig_install_dir = disabler()
|
plugins_pkgconfig_install_dir = disabler()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
gpl_allowed = get_option('gpl').allowed()
|
||||||
|
|
||||||
python3 = import('python').find_installation()
|
python3 = import('python').find_installation()
|
||||||
|
|
||||||
subdir('gst')
|
subdir('gst')
|
||||||
subdir('ext')
|
subdir('ext')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -312,5 +315,8 @@ if meson.version().version_compare('>= 0.54')
|
||||||
plugin_names += [plugin.name()]
|
plugin_names += [plugin.name()]
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
summary({'Plugins':plugin_names}, list_sep: ', ')
|
summary({
|
||||||
|
'Plugins': plugin_names,
|
||||||
|
'(A)GPL license allowed': gpl_allowed,
|
||||||
|
}, list_sep: ', ')
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -9,14 +9,18 @@ option('realmedia', type : 'feature', value : 'auto')
|
||||||
option('xingmux', type : 'feature', value : 'auto')
|
option('xingmux', type : 'feature', value : 'auto')
|
||||||
|
|
||||||
# Feature options for plugins that need external deps
|
# Feature options for plugins that need external deps
|
||||||
option('a52dec', type : 'feature', value : 'auto', description : 'Dolby Digital (AC-3) audio decoder plugin')
|
option('a52dec', type : 'feature', value : 'auto', description : 'Dolby Digital (AC-3) audio decoder plugin based on liba52 (GPL - only built if gpl option is also enabled!)')
|
||||||
option('amrnb', type : 'feature', value : 'auto', description : 'Adaptive Multi-Rate Narrow-Band audio codec plugin')
|
option('amrnb', type : 'feature', value : 'auto', description : 'Adaptive Multi-Rate Narrow-Band audio codec plugin')
|
||||||
option('amrwbdec', type : 'feature', value : 'auto', description : 'Adaptive Multi-Rate Wide-Band audio decoder plugin')
|
option('amrwbdec', type : 'feature', value : 'auto', description : 'Adaptive Multi-Rate Wide-Band audio decoder plugin')
|
||||||
option('cdio', type : 'feature', value : 'auto', description : 'CD audio source plugin')
|
option('cdio', type : 'feature', value : 'auto', description : 'CD audio source plugin based on libcdio (GPL - only built if gpl option is also enabled!)')
|
||||||
option('dvdread', type : 'feature', value : 'auto', description : 'DVD video source plugin')
|
option('dvdread', type : 'feature', value : 'auto', description : 'DVD video source plugin based on libdvdread (GPL - only built if gpl option is also enabled!)')
|
||||||
option('mpeg2dec', type : 'feature', value : 'auto', description : 'MPEG 2 video decoder plugin')
|
option('mpeg2dec', type : 'feature', value : 'auto', description : 'MPEG 2 video decoder plugin based on libmpeg2 (GPL - only built if gpl option is also enabled!)')
|
||||||
option('sidplay', type : 'feature', value : 'auto', description : 'Commodore 64 audio decoder plugin')
|
option('sidplay', type : 'feature', value : 'auto', description : 'Commodore 64 audio decoder plugin based on libsidplay (GPL - only built if gpl option is also enabled!)')
|
||||||
option('x264', type : 'feature', value : 'auto', description : 'H.264 video encoder plugin')
|
option('x264', type : 'feature', value : 'auto', description : 'H.264 video encoder plugin based on libx264 (GPL - only built if gpl option is also enabled!)')
|
||||||
|
|
||||||
|
# License-related feature options
|
||||||
|
option('gpl', type: 'feature', value: 'auto', yield: true, # FIXME: disable by default
|
||||||
|
description: 'Allow build plugins that have GPL-licensed dependencies')
|
||||||
|
|
||||||
# Common feature options
|
# Common feature options
|
||||||
option('nls', type : 'feature', value : 'auto', yield: true,
|
option('nls', type : 'feature', value : 'auto', yield: true,
|
||||||
|
|
Loading…
Reference in a new issue