Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nirbheek committed Sep 10, 2018
1 parent 22f6ff0 commit 41b7a65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion ext/vorbis/gstivorbisdec.c
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion ext/vorbis/meson.build
Expand Up @@ -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')
Expand All @@ -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'],
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Expand Up @@ -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')
Expand Down

0 comments on commit 41b7a65

Please sign in to comment.