From ae81cb43430090c4a08dbd9cc3a1d182c20e97e5 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Tue, 30 Dec 2014 20:33:16 +0100 Subject: 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. --- stream/dvbin.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'stream') 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 -- cgit v1.2.3