13 [ 'vpx/vp8cx.h', 'vpx_codec_vp8_cx_algo', '-DHAVE_VP8_ENCODER', 'VP8 encoder' ],
14 [ 'vpx/vp8dx.h', 'vpx_codec_vp8_dx_algo', '-DHAVE_VP8_DECODER', 'VP8 decoder' ],
15 [ 'vpx/vp8cx.h', 'vpx_codec_vp9_cx_algo', '-DHAVE_VP9_ENCODER', 'VP9 encoder' ],
16 [ 'vpx/vp8dx.h', 'vpx_codec_vp9_dx_algo', '-DHAVE_VP9_DECODER', 'VP9 decoder' ],
19 vpx_dep = dependency('vpx', version : '>=1.3.0', required : false)
23 foreach f : vpx_features
25 codec_iface = f.get(1)
26 extra_define = f.get(2)
27 link_code = '''#include <@0@>
28 int main (int a, char ** g) {
29 const vpx_codec_iface_t *c = &@1@;
31 }'''.format(header,codec_iface)
32 # FIXME: should take dependencies : vpx_dep argument
33 if cc.links(link_code, args : ['-lvpx'])
34 vpx_args += extra_define
35 message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1)))
36 have_vpx_feature = true
38 message('libvpx does not provide @0@ interface (@1@)'.format(f.get(3),f.get(1)))
39 have_vpx_feature = false
41 set_variable('have_' + f.get(3).to_lower().underscorify(), have_vpx_feature)
44 if vpx_args.length() == 0
45 message('WARNING: libvpx was built without any encoder or decoder features!')
48 if dependency('vpx', version : '>=1.4.0', required : false).found()
49 vpx_args += '-DHAVE_VPX_1_4'
52 gstvpx = library('gstvpx',
54 c_args : gst_plugins_good_args + vpx_args,
55 include_directories : [configinc],
56 dependencies : [gstbase_dep, gsttag_dep, gstvideo_dep, vpx_dep],
58 install_dir : plugins_install_dir,