[vlc-commits] Linux DVB: drop support for API version 5.0
Rémi Denis-Courmont
git at videolan.org
Mon Mar 12 17:32:54 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 12 18:29:12 2012 +0200| [144ac6b60365cd03fcf4cdea8b706d5551170038] | committer: Rémi Denis-Courmont
Linux DVB: drop support for API version 5.0
That corresponds to kernel versions 2.6.28-2.6.31 inclusive, none of
which are supported upstream anymore.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=144ac6b60365cd03fcf4cdea8b706d5551170038
---
configure.ac | 16 ++++++++++------
modules/access/dtv/linux.c | 22 ----------------------
2 files changed, 10 insertions(+), 28 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4244dad..0b35430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1962,17 +1962,21 @@ fi
dnl
dnl Linux DVB
dnl
-AC_CACHE_CHECK([for Linux DVB version 5], [ac_cv_linux_s2api], [
+AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
[#include <linux/dvb/version.h>
#if (DVB_API_VERSION < 5)
-EXPLODE
-#endif]])], [
- ac_cv_linux_s2api=yes
+# error Linux DVB API v3.2 and older are not supported.
+#endif
+#if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
+# error Linux DVB API v5.0 is unsupported. Please update.
+#endif
+]])], [
+ ac_cv_linux_dvb_5_1=yes
], [
- ac_cv_linux_s2api=no
+ ac_cv_linux_dvb_5_1=no
])])
-AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = "yes"])
+AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
dnl
dnl Screen capture module
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index c40fe48..b4615f9 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -49,9 +49,6 @@
#define DVBv5(minor) \
(DVB_API_VERSION > 5 \
|| (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= (minor)))
-#if !DVBv5(0)
-# error Linux DVB kernel headers version 2.6.28 or later required.
-#endif
/** Opens the device directory for the specified DVB adapter */
static int dvb_open_adapter (uint8_t adapter)
@@ -914,9 +911,7 @@ static int dvb_parse_transmit_mode (int i)
{ 1, TRANSMISSION_MODE_1K },
#endif
{ 2, TRANSMISSION_MODE_2K },
-#if DVBv5(1)
{ 4, TRANSMISSION_MODE_4K },
-#endif
{ 8, TRANSMISSION_MODE_8K },
#if DVBv5(3)
{ 16, TRANSMISSION_MODE_16K },
@@ -1033,7 +1028,6 @@ int dvb_set_isdbc (dvb_device_t *d, uint32_t freq, const char *modstr,
/*** ISDB-S ***/
int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id)
{
-#if DVBv5(1)
uint32_t freq = freq_Hz / 1000;
if (dvb_find_frontend (d, ISDB_S))
@@ -1041,17 +1035,10 @@ int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id)
return dvb_set_props (d, 5, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_ISDBS,
DTV_FREQUENCY, freq,
DTV_ISDBS_TS_ID, (uint32_t)ts_id);
-#else
-# warning ISDB-S needs Linux DVB version 5.1 or later.
- msg_Err (d->obj, "ISDB-S support not compiled-in");
- (void) freq_Hz; (void) ts_id;
- return -1;
-#endif
}
/*** ISDB-T ***/
-#if DVBv5(1)
static int dvb_set_isdbt_layer (dvb_device_t *d, unsigned num,
const isdbt_layer_t *l)
{
@@ -1068,13 +1055,11 @@ static int dvb_set_isdbt_layer (dvb_device_t *d, unsigned num,
DTV_ISDBT_LAYERA_SEGMENT_COUNT + num, count,
DTV_ISDBT_LAYERA_TIME_INTERLEAVING + num, ti);
}
-#endif
int dvb_set_isdbt (dvb_device_t *d, uint32_t freq, uint32_t bandwidth,
int transmit_mode, uint32_t guard,
const isdbt_layer_t layers[3])
{
-#if DVBv5(1)
bandwidth = dvb_parse_bandwidth (bandwidth);
transmit_mode = dvb_parse_transmit_mode (transmit_mode);
guard = dvb_parse_guard (guard);
@@ -1089,13 +1074,6 @@ int dvb_set_isdbt (dvb_device_t *d, uint32_t freq, uint32_t bandwidth,
if (dvb_set_isdbt_layer (d, i, layers + i))
return -1;
return 0;
-#else
-# warning ISDB-T needs Linux DVB version 5.1 or later.
- msg_Err (d->obj, "ISDB-T support not compiled-in");
- (void) freq; (void) bandwidth; (void) transmit_mode; (void) guard;
- (void) layers;
- return -1;
-#endif
}
More information about the vlc-commits
mailing list