summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorOliver Freyermuth <o.freyermuth@googlemail.com>2014-12-30 20:33:16 +0100
committerwm4 <wm4@nowhere>2015-01-06 19:52:27 +0100
commitae81cb43430090c4a08dbd9cc3a1d182c20e97e5 (patch)
tree3925374230989c962214ea1a51a032be4f54efa3 /stream
parent24c805331dff910c716ceb76926e78ff1357e23a (diff)
downloadmpv-ae81cb43430090c4a08dbd9cc3a1d182c20e97e5.tar.bz2
mpv-ae81cb43430090c4a08dbd9cc3a1d182c20e97e5.tar.xz
dvbin: Prepare S2API-implementation, support different DVB-API versions.
Define a new macro "DVB_USE_S2API" to be used to switch to S2API if available, also document what is the main difference in the new S2API. StreamID-handling is only supported since API 5.2, and some macros were renamed or only added later with 5.8 (somewhere around kernel 3.6), so some define-fixups are needed to support these intermediate kernel header versions.
Diffstat (limited to 'stream')
-rw-r--r--stream/dvbin.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/stream/dvbin.h b/stream/dvbin.h
index e225e38383..3c10b6cc17 100644
--- a/stream/dvbin.h
+++ b/stream/dvbin.h
@@ -25,9 +25,25 @@
/* kernel headers >=2.6.28 have version 5.
*
- * FIXME: are there any real differences between 3.1 and 5?
+ * Version 5 is also called S2API, it adds support for tuning to S2 channels
+ * and is extensible for future delivery systems. Old API is deprecated.
+ * StreamID-implementation only supported since API >=5.2.
*/
+#if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 2)
+#define DVB_USE_S2API 1
+
+// This had a different name until API 5.8.
+#ifndef DTV_STREAM_ID
+#define DTV_STREAM_ID DTV_ISDBS_TS_ID
+#endif
+
+// This is only defined, for convenience, since API 5.8.
+#ifndef NO_STREAM_ID_FILTER
+#define NO_STREAM_ID_FILTER (~0U)
+#endif
+#endif
+
#if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5
#define DVB_ATSC 1
#endif