summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-07-21 17:17:03 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-07-21 17:17:03 +0200
commitd16d6eb53869e8380ccfbe7dbc2c09d98c40ab6c (patch)
treef7bb0a9b5b1ff9a99082e69aa5ecf9d171acc274 /src/config.h
parent8172003638eb2e5bb38e9a98be0f86a0c6e1cf1f (diff)
downloadpianobar-d16d6eb53869e8380ccfbe7dbc2c09d98c40ab6c.tar.gz
pianobar-d16d6eb53869e8380ccfbe7dbc2c09d98c40ab6c.tar.bz2
pianobar-d16d6eb53869e8380ccfbe7dbc2c09d98c40ab6c.zip
Refactor audio player, add retry timeout
Fixes #442.
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index 6d7147d..fb8a041 100644
--- a/src/config.h
+++ b/src/config.h
@@ -6,4 +6,29 @@
#define VERSION "2014.06.08-dev"
+/* ffmpeg/libav quirks detection
+ * ffmpeg’s micro versions always start at 100, that’s how we can distinguish
+ * ffmpeg and libav */
+#include <libavfilter/version.h>
+
+/* is "timeout" option present (all versions of ffmpeg, not libav) */
+#if LIBAVFILTER_VERSION_MICRO >= 100
+#define HAVE_AV_TIMEOUT
+#endif
+
+/* does graph_send_command exist (ffmpeg >=2.2) */
+#if LIBAVFILTER_VERSION_MAJOR == 4 && \
+ LIBAVFILTER_VERSION_MICRO >= 100
+#define HAVE_AVFILTER_GRAPH_SEND_COMMAND
+#endif
+
+/* need avcodec.h (ffmpeg 1.2) */
+#if LIBAVFILTER_VERSION_MAJOR == 3 && \
+ LIBAVFILTER_VERSION_MINOR <= 42 && \
+ LIBAVFILTER_VERSION_MINOR > 32 && \
+ LIBAVFILTER_VERSION_MICRO >= 100
+#define HAVE_AV_BUFFERSINK_GET_BUFFER_REF
+#define HAVE_LIBAVFILTER_AVCODEC_H
+#endif
+
#endif /* SRC_CONFIG_H_S6A1C09K */