diff options
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | plugins/ffmpeg/ffmpeg.c | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index a752aec8..b62a75fd 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ AC_ARG_ENABLE(vtx, [AS_HELP_STRING([--disable-vtx ], [disable libayemy AC_ARG_ENABLE(adplug, [AS_HELP_STRING([--disable-adplug ], [disable adplug plugin (default: enabled)])], [enable_adplug=$enableval], [enable_adplug=yes]) AC_ARG_ENABLE(hotkeys, [AS_HELP_STRING([--disable-hotkeys ], [disable global hotkeys plugin (default: enabled)])], [enable_hotkeys=$enableval], [enable_hotkeys=yes]) AC_ARG_ENABLE(vorbis, [AS_HELP_STRING([--disable-vorbis ], [disable Ogg Vorbis player plugin (default: enabled)])], [enable_vorbis=$enableval], [enable_vorbis=yes]) -AC_ARG_ENABLE(ffmpeg, [AS_HELP_STRING([--disable-ffmpeg ], [disable FFMPEG plugin for WMA, AMR, etc (default: disabled)])], [enable_ffmpeg=$enableval], [enable_ffmpeg=no]) +AC_ARG_ENABLE(ffmpeg, [AS_HELP_STRING([--disable-ffmpeg ], [disable FFMPEG plugin for WMA, AMR, etc (default: enabled)])], [enable_ffmpeg=$enableval], [enable_ffmpeg=yes]) AC_ARG_ENABLE(flac, [AS_HELP_STRING([--disable-flac ], [disable FLAC player plugin (default: enabled)])], [enable_flac=$enableval], [enable_flac=yes]) AC_ARG_ENABLE(sndfile, [AS_HELP_STRING([--disable-sndfile ], [disable libsndfile plugin for PCM wave files (default: enabled)])], [enable_sndfile=$enableval], [enable_sndfile=yes]) AC_ARG_ENABLE(wavpack, [AS_HELP_STRING([--disable-wavpack ], [disable wavpack plugin (default: enabled)])], [enable_wavpack=$enableval], [enable_wavpack=yes]) @@ -215,7 +215,6 @@ AS_IF([test "${enable_ffmpeg}" != "no"], [ HAVE_FFMPEG=yes ], [ PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec >= 51.0.0 libavutil libavformat >= 52.0.0, HAVE_FFMPEG=yes, HAVE_FFMPEG=no) - dnl PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec libavutil libavformat < 54.6.0, HAVE_FFMPEG=yes, HAVE_FFMPEG=no) ]) ]) diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index 98561aa3..92c8771b 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -52,9 +52,12 @@ #endif #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 6, 0) -#error FFMPEG-0.11 and higher is unsupported. please downgrade to an older FFMPEG version, or configure deadbeef with --disable-ffmpeg flag -//#define av_get_bits_per_sample_format av_get_bits_per_sample_fmt -#else +#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 +#define av_find_stream_info(ctx) avformat_find_stream_info(ctx,NULL) +#define avcodec_open(ctx,codec) avcodec_open2(ctx,codec,NULL) +#define av_get_bits_per_sample_format(fmt) (av_get_bytes_per_sample(fmt)*8) +#define av_close_input_file(ctx) avformat_close_input(&(ctx)) +#endif //#define trace(...) { fprintf(stderr, __VA_ARGS__); } #define trace(fmt,...) @@ -65,7 +68,7 @@ static DB_decoder_t plugin; static DB_functions_t *deadbeef; -#define DEFAULT_EXTS "wma;aa3;oma;ac3;vqf;amr" +#define DEFAULT_EXTS "aa3;oma;ac3;vqf;amr;opus" #define EXT_MAX 100 @@ -796,8 +799,6 @@ ffmpeg_start (void) { av_register_all (); #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 6, 0) #warning FFMPEG-0.11 is no longer exposing register_protocol API, which means that it cant work with MMS and HTTP plugins. if you need this functionality, please downgrade FFMPEG, and rebuild the FFMPEG plugin -// ffurl_register_protocol(&vfswrapper, sizeof(vfswrapper)); - avformat_network_init (); #elif LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 69, 0) av_register_protocol2 (&vfswrapper, sizeof(vfswrapper)); #else @@ -943,4 +944,3 @@ ffmpeg_load (DB_functions_t *api) { return DB_PLUGIN (&plugin); } -#endif |