[vlc-commits] DTV: add 10 and 1.712 MHz bandwidth (from DVB-T2)

Rémi Denis-Courmont git at videolan.org
Thu Jul 28 18:04:13 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 28 19:03:19 2011 +0300| [5ccbe67f8a083f01b1e01b9ac673642360797477] | committer: Rémi Denis-Courmont

DTV: add 10 and 1.712 MHz bandwidth (from DVB-T2)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ccbe67f8a083f01b1e01b9ac673642360797477
---

 modules/access/dtv/access.c |    5 +++--
 modules/access/dtv/linux.c  |   14 ++++++++++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 0b2fbc3..e03e0fa 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -111,10 +111,11 @@ static const char *const transmission_user[] = { N_("Automatic"),
 
 #define BANDWIDTH_TEXT N_("Bandwidth (MHz)")
 const int bandwidth_vlc[] = { 0,
-    8, 7, 6, 5,
+    10, 8, 7, 6, 5, 2
 };
 static const char *const bandwidth_user[] = { N_("Automatic"),
-    N_("8 MHz"), N_("7 MHz"), N_("6 MHz"), N_("5 MHz"),
+    N_("10 MHz"), N_("8 MHz"), N_("7 MHz"), N_("6 MHz"),
+    N_("5 MHz"), N_("1.712 MHz"),
 };
 
 #define GUARD_TEXT N_("Guard interval")
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 9e353dd..9788449 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -798,6 +798,16 @@ int dvb_set_dvbs2 (dvb_device_t *d, uint64_t freq_Hz, const char *modstr,
 
 
 /*** DVB-T ***/
+static uint32_t dvb_parse_bandwidth (uint32_t i)
+{
+    switch (i)
+    {
+      //case  0: return 0;
+        case  2: return 1712000;
+        default: return i * 1000000;
+    }
+}
+
 static int dvb_parse_transmit_mode (int i)
 {
     static const dvb_int_map_t tab[] = {
@@ -857,7 +867,7 @@ int dvb_set_dvbt (dvb_device_t *d, uint32_t freq, const char *modstr,
     uint32_t mod = dvb_parse_modulation (modstr, QAM_AUTO);
     fec_hp = dvb_parse_fec (fec_hp);
     fec_lp = dvb_parse_fec (fec_lp);
-    bandwidth *= 1000000;
+    bandwidth = dvb_parse_bandwidth (bandwidth);
     transmit_mode = dvb_parse_transmit_mode (transmit_mode);
     guard = dvb_parse_guard (guard);
     hierarchy = dvb_parse_hierarchy (hierarchy);
@@ -880,7 +890,7 @@ int dvb_set_dvbt2 (dvb_device_t *d, uint32_t freq, const char *modstr,
 #if DVBv5(3)
     uint32_t mod = dvb_parse_modulation (modstr, QAM_AUTO);
     fec = dvb_parse_fec (fec);
-    bandwidth *= 1000000;
+    bandwidth = dvb_parse_bandwidth (bandwidth);
     transmit_mode = dvb_parse_transmit_mode (transmit_mode);
     guard = dvb_parse_guard (guard);
 



More information about the vlc-commits mailing list