summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-09-23 10:19:58 +0200
committerLars-Dominik Braun <lars@6xq.net>2018-09-23 10:19:58 +0200
commitd0cdce3646189775b3bd6f884669cad509201902 (patch)
tree5badad621f1f05708babada736738b5ac5622747 /src/config.h
parentbbbdd99fdaacfe0a3c9a1237fa0d086907c1286f (diff)
downloadpianobar-d0cdce3646189775b3bd6f884669cad509201902.tar.gz
pianobar-d0cdce3646189775b3bd6f884669cad509201902.tar.bz2
pianobar-d0cdce3646189775b3bd6f884669cad509201902.zip
Don’t use deprecated ffmpeg functions
These are now optional according to doc/APIchanges. Closes #670.
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h
index e6982db..bc8934a 100644
--- a/src/config.h
+++ b/src/config.h
@@ -12,10 +12,33 @@
* ffmpeg’s micro versions always start at 100, that’s how we can distinguish
* ffmpeg and libav */
#include <libavfilter/version.h>
+#include <libavformat/version.h>
/* does graph_send_command exist (ffmpeg >=2.2) */
-#if LIBAVFILTER_VERSION_MAJOR >= 4 && \
+#if !defined(HAVE_AVFILTER_GRAPH_SEND_COMMAND) && \
+ LIBAVFILTER_VERSION_MAJOR >= 4 && \
LIBAVFILTER_VERSION_MICRO >= 100
#define HAVE_AVFILTER_GRAPH_SEND_COMMAND
#endif
+/* explicit init is optional for ffmpeg>=4.0 */
+#if !defined(HAVE_AVFORMAT_NETWORK_INIT) && \
+ LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 5, 100) && \
+ LIBAVFORMAT_VERSION_MICRO >= 100
+#define HAVE_AVFORMAT_NETWORK_INIT
+#endif
+
+/* dito */
+#if !defined(HAVE_AVFILTER_REGISTER_ALL) && \
+ LIBAVFILTER_VERSION_INT < AV_VERSION_INT(7, 14, 100) && \
+ LIBAVFILTER_VERSION_MICRO >= 100
+#define HAVE_AVFILTER_REGISTER_ALL
+#endif
+
+/* dito */
+#if !defined(HAVE_AV_REGISTER_ALL) && \
+ LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100) && \
+ LIBAVFORMAT_VERSION_MICRO >= 100
+#define HAVE_AV_REGISTER_ALL
+#endif
+