[vlc-commits] DTV: add stream parameter for DVB-S2 (refs #12034)

Rémi Denis-Courmont git at videolan.org
Wed Feb 18 18:45:06 CET 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 18 19:40:42 2015 +0200| [848f0aed72e490f377c1c52e568e75aef3e7a682] | committer: Rémi Denis-Courmont

DTV: add stream parameter for DVB-S2 (refs #12034)

(cherry picked from commit c48aa72c5056b098e9c44fd8b9a6d752b3bdd6e4)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=848f0aed72e490f377c1c52e568e75aef3e7a682
---

 modules/access/dtv/access.c     |    8 +++++++-
 modules/access/dtv/bdagraph.cpp |    3 ++-
 modules/access/dtv/dtv.h        |    3 ++-
 modules/access/dtv/linux.c      |    3 ++-
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 11f93a6..f7d3bef 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -151,6 +151,8 @@ static const char *const hierarchy_user[] = { N_("Automatic"),
 #define TIME_INTERLEAVING_B_TEXT N_("Layer B time interleaving")
 #define TIME_INTERLEAVING_C_TEXT N_("Layer C time interleaving")
 
+#define STREAM_ID_TEXT N_("Stream identifier")
+
 #define PILOT_TEXT N_("Pilot")
 
 #define ROLLOFF_TEXT N_("Roll-off factor")
@@ -358,6 +360,9 @@ vlc_module_begin ()
         change_safe ()
 
     set_section (N_("DVB-S2 parameters"), NULL)
+    add_integer ("dvb-stream", 0, STREAM_ID_TEXT, STREAM_ID_TEXT, false)
+        change_integer_range (0, 255)
+        change_safe ()
     add_integer ("dvb-pilot", -1, PILOT_TEXT, PILOT_TEXT, true)
         change_integer_list (auto_off_on_vlc, auto_off_on_user)
         change_safe ()
@@ -872,8 +877,9 @@ static int dvbs2_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
     uint32_t srate = var_InheritInteger (obj, "dvb-srate");
     int pilot = var_InheritInteger (obj, "dvb-pilot");
     int rolloff = var_InheritInteger (obj, "dvb-rolloff");
+    uint8_t sid = var_InheritInteger (obj, "dvb-stream");
 
-    int ret = dvb_set_dvbs2 (dev, freq, mod, srate, fec, pilot, rolloff);
+    int ret = dvb_set_dvbs2 (dev, freq, mod, srate, fec, pilot, rolloff, sid);
     if (ret == 0)
         sec_setup (obj, dev, freq);
     return ret;
diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp
index 7bd8a5d..3ace60f 100644
--- a/modules/access/dtv/bdagraph.cpp
+++ b/modules/access/dtv/bdagraph.cpp
@@ -209,7 +209,8 @@ int dvb_set_dvbs (dvb_device_t *d, uint64_t freq, uint32_t srate, uint32_t fec)
 }
 
 int dvb_set_dvbs2 (dvb_device_t *, uint64_t /*freq*/, const char * /*mod*/,
-                   uint32_t /*srate*/, uint32_t /*fec*/, int /*pilot*/, int /*rolloff*/)
+                   uint32_t /*srate*/, uint32_t /*fec*/, int /*pilot*/, int /*rolloff*/,
+                   uint8_t /*sid*/)
 {
     return VLC_EGENERIC;
 }
diff --git a/modules/access/dtv/dtv.h b/modules/access/dtv/dtv.h
index 8a3b2fb..e218076 100644
--- a/modules/access/dtv/dtv.h
+++ b/modules/access/dtv/dtv.h
@@ -75,7 +75,8 @@ int dvb_set_dvbc (dvb_device_t *, uint32_t freq, const char *mod,
 /* DVB-S */
 int dvb_set_dvbs (dvb_device_t *, uint64_t freq, uint32_t srate, uint32_t fec);
 int dvb_set_dvbs2 (dvb_device_t *, uint64_t freq, const char *mod,
-                   uint32_t srate, uint32_t fec, int pilot, int rolloff);
+                   uint32_t srate, uint32_t fec, int pilot, int rolloff,
+                   uint8_t sid);
 int dvb_set_sec (dvb_device_t *, uint64_t freq, char pol,
                  uint32_t lowf, uint32_t highf, uint32_t switchf);
 
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 1dc2d3d..6b36f9b 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -875,7 +875,8 @@ int dvb_set_dvbs (dvb_device_t *d, uint64_t freq_Hz,
 }
 
 int dvb_set_dvbs2 (dvb_device_t *d, uint64_t freq_Hz, const char *modstr,
-                   uint32_t srate, uint32_t fec, int pilot, int rolloff)
+                   uint32_t srate, uint32_t fec, int pilot, int rolloff,
+                   uint8_t sid)
 {
     uint32_t freq = freq_Hz / 1000;
     unsigned mod = dvb_parse_modulation (modstr, QPSK);



More information about the vlc-commits mailing list