| 1 |
mpeg2dec_opt = get_option('mpeg2dec').require(gpl_allowed, error_message: ''' |
| 2 |
Plugin mpeg2dec 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. |
| 4 |
''') |
| 5 |
|
| 6 |
mpeg2dec_sources = [ |
| 7 |
'gstmpeg2dec.c', |
| 8 |
] |
| 9 |
|
| 10 |
mpeg2dec_headers = [ |
| 11 |
'gstmpeg2dec.h', |
| 12 |
] |
| 13 |
|
| 14 |
doc_sources = [] |
| 15 |
foreach s: mpeg2dec_sources + mpeg2dec_headers |
| 16 |
doc_sources += meson.current_source_dir() / s |
| 17 |
endforeach |
| 18 |
|
| 19 |
plugin_sources += { |
| 20 |
'mpeg2dec': pathsep.join(doc_sources) |
| 21 |
} |
| 22 |
|
| 23 |
mpeg2_dep = dependency('libmpeg2', version : '>= 0.4.0', required : mpeg2dec_opt) |
| 24 |
|
| 25 |
if mpeg2_dep.found() |
| 26 |
warning('The `mpeg2dec` plugin is deprecated and will be removed in the next release cycle. `avdec_mpeg2video` from gst-libav should be used instead') |
| 27 |
mpeg2dec = library('gstmpeg2dec', |
| 28 |
mpeg2dec_sources, |
| 29 |
c_args : ugly_args, |
| 30 |
include_directories : [configinc], |
| 31 |
dependencies : [gstvideo_dep, mpeg2_dep], |
| 32 |
install : true, |
| 33 |
install_dir : plugins_install_dir, |
| 34 |
) |
| 35 |
plugins += [mpeg2dec] |
| 36 |
endif |