#include "fvec.h"
#include "fmat.h"
#include "io/source.h"
-#ifdef HAVE_AVCODEC
+#ifdef HAVE_LIBAV
#include "io/source_avcodec.h"
-#endif /* HAVE_AVCODEC */
+#endif /* HAVE_LIBAV */
#ifdef __APPLE__
#include "io/source_apple_audio.h"
#endif /* __APPLE__ */
aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size) {
aubio_source_t * s = AUBIO_NEW(aubio_source_t);
-#if HAVE_AVCODEC
+#if HAVE_LIBAV
s->source = (void *)new_aubio_source_avcodec(uri, samplerate, hop_size);
if (s->source) {
s->s_do = (aubio_source_do_t)(aubio_source_avcodec_do);
s->s_del = (del_aubio_source_t)(del_aubio_source_avcodec);
return s;
}
-#endif /* HAVE_AVCODEC */
+#endif /* HAVE_LIBAV */
#ifdef __APPLE__
s->source = (void *)new_aubio_source_apple_audio(uri, samplerate, hop_size);
if (s->source) {
args = '--cflags --libs', uselib_store = 'AVUTIL', mandatory = False)
ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
args = '--cflags --libs', uselib_store = 'AVRESAMPLE', mandatory = False)
+ if all ( 'HAVE_' + i in ctx.env.define_key
+ for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ):
+ ctx.define('HAVE_LIBAV', 1)
+ ctx.msg('Checking for all libav libraries', 'yes')
+ else:
+ ctx.msg('Checking for all libav libraries', 'not found', color = 'YELLOW')
# use memcpy hacks
if (ctx.options.enable_memcpy == True):