meson: Add an option for the 'Tremor' Vorbis implementation

It makes sense to control it explicitly to allow us to enable it on
platforms that don't have hardware floating-point, and to allow people
to enable the 'vorbis' plugin without having to also provide the
Tremor dependency which is useless on most devices.
This commit is contained in:
Nirbheek Chauhan 2018-09-10 22:22:16 +05:30
parent 22f6ff094a
commit 41b7a65b81
3 changed files with 4 additions and 2 deletions

View file

@ -29,7 +29,6 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
/* if tremor is around, there is probably good reason for it, so preferred */
if (!gst_element_register (plugin, "ivorbisdec", GST_RANK_SECONDARY,
gst_vorbis_dec_get_type ()))
return FALSE;

View file

@ -17,7 +17,7 @@ vorbisidec_sources = [
vorbis_dep = dependency('vorbis', version : '>=1.0', required : get_option('vorbis'))
vorbisenc_dep = dependency('vorbisenc', version : '>=1.0', required : get_option('vorbis'))
vorbisidec_dep = dependency('vorbisidec', required : get_option('vorbis'))
vorbisidec_dep = dependency('vorbisidec', required : get_option('tremor'))
if vorbis_dep.found() or vorbisidec_dep.found()
if cc.has_header_symbol('vorbis/codec.h', 'vorbis_synthesis_restart')
@ -43,6 +43,8 @@ if vorbis_dep.found()
endif
if vorbisidec_dep.found()
# NOTE: This plugin is only useful if your device does not support hardware
# floating point and needs integer ops for performance reasons.
gstivorbisdec = library('gstivorbisdec',
vorbisidec_sources,
c_args : gst_plugins_base_args + ['-DTREMOR'],

View file

@ -57,6 +57,7 @@ option('ogg', type : 'feature', value : 'auto', description : 'ogg parser, muxer
option('opus', type : 'feature', value : 'auto', description : 'OPUS audio codec plugin')
option('pango', type : 'feature', value : 'auto', description : 'Pango text rendering and overlay plugin')
option('theora', type : 'feature', value : 'auto', description : 'Theora video parser and codec plugin')
option('tremor', type : 'feature', value : 'auto', description : 'Integer Vorbis decoder plugin for devices without floating point')
option('vorbis', type : 'feature', value : 'auto', description : 'Vorbis audio parser, tagger, and codec plugin')
option('x11', type : 'feature', value : 'auto', description : 'X11 ximagesink plugin, and X11 support in libraries, plugins, examples')
option('xshm', type : 'feature', value : 'auto', description : 'X11 shared memory support for X11 plugins')