2021-09-18 23:55:34 +00:00
|
|
|
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.
|
|
|
|
''')
|
|
|
|
|
2016-08-12 15:55:34 +00:00
|
|
|
x264_sources = [
|
|
|
|
'gstx264enc.c',
|
2019-10-17 12:55:51 +00:00
|
|
|
'gstencoderbitrateprofilemanager.c',
|
2016-08-12 15:55:34 +00:00
|
|
|
]
|
|
|
|
|
2023-09-13 14:12:44 +00:00
|
|
|
x264_dep = dependency('x264', version : '>=0.156', required : x264_opt,
|
2019-03-27 16:29:45 +00:00
|
|
|
fallback: ['x264', 'libx264_dep'])
|
2016-08-12 15:55:34 +00:00
|
|
|
|
|
|
|
if x264_dep.found()
|
2016-11-11 12:15:17 +00:00
|
|
|
x264_libraries = get_option('x264_libraries')
|
|
|
|
x264_args = []
|
|
|
|
if x264_libraries != ''
|
|
|
|
x264_args += ['-DHAVE_X264_ADDITIONAL_LIBRARIES="@0@"'.format(x264_libraries)]
|
2019-01-25 12:36:55 +00:00
|
|
|
extra_gmodule_dep = [gmodule_dep]
|
|
|
|
else
|
|
|
|
extra_gmodule_dep = []
|
2016-11-11 12:15:17 +00:00
|
|
|
endif
|
|
|
|
|
2016-08-12 15:55:34 +00:00
|
|
|
gstx264 = library('gstx264',
|
|
|
|
x264_sources,
|
2016-11-11 12:15:17 +00:00
|
|
|
c_args : ugly_args + x264_args,
|
2016-08-12 15:55:34 +00:00
|
|
|
include_directories : [configinc],
|
2019-01-25 12:36:55 +00:00
|
|
|
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, x264_dep] + extra_gmodule_dep,
|
2016-08-12 15:55:34 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-10-22 09:47:37 +00:00
|
|
|
plugins += [gstx264]
|
2016-12-16 19:52:00 +00:00
|
|
|
|
|
|
|
install_data(sources: 'GstX264Enc.prs', install_dir: presetdir)
|
2022-02-21 16:37:26 +00:00
|
|
|
env = environment()
|
|
|
|
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
|
|
|
|
meson.add_devenv(env)
|
2016-08-12 15:55:34 +00:00
|
|
|
endif
|