[vlc-commits] DTV: add DVB-T2 PLP ID parameter
Rémi Denis-Courmont
git at videolan.org
Fri Mar 16 10:16:44 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 16 11:16:02 2012 +0200| [4dd64b21ad90be76e7834b4ca969e9fb441eff93] | committer: Rémi Denis-Courmont
DTV: add DVB-T2 PLP ID parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4dd64b21ad90be76e7834b4ca969e9fb441eff93
---
modules/access/dtv/access.c | 8 +++++++-
modules/access/dtv/bdagraph.cpp | 2 +-
modules/access/dtv/dtv.h | 2 +-
modules/access/dtv/linux.c | 5 +++--
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index de6f2a9..93b8ee1 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -141,6 +141,8 @@ static const char *const hierarchy_user[] = { N_("Automatic"),
N_("None"), "1", "2", "4",
};
+#define PLP_ID_TEXT N_("DVB-T2 Physical Layer Pipe")
+
#define SEGMENT_COUNT_A_TEXT N_("Layer A segments count")
#define SEGMENT_COUNT_B_TEXT N_("Layer B segments count")
#define SEGMENT_COUNT_C_TEXT N_("Layer C segments count")
@@ -290,6 +292,9 @@ vlc_module_begin ()
add_integer ("dvb-hierarchy", -1, HIERARCHY_TEXT, HIERARCHY_TEXT, true)
change_integer_list (hierarchy_vlc, hierarchy_user)
change_safe ()
+ add_integer ("dvb-plp-id", 0, PLP_ID_TEXT, PLP_ID_TEXT, false)
+ change_integer_range (0, 0xFFFFFFFF)
+ change_safe ()
set_section (N_("ISDB-T reception parameters"), NULL)
add_string ("dvb-a-modulation", NULL,
@@ -904,9 +909,10 @@ static int dvbt2_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
uint32_t fec = var_InheritCodeRate (obj, "dvb-fec");
uint32_t guard = var_InheritGuardInterval (obj);
uint32_t bw = var_InheritInteger (obj, "dvb-bandwidth");
+ uint32_t plp = var_InheritInteger (obj, "dvd-plp-id");
int tx = var_InheritInteger (obj, "dvb-transmission");
- return dvb_set_dvbt2 (dev, freq, mod, fec, bw, tx, guard);
+ return dvb_set_dvbt2 (dev, freq, mod, fec, bw, tx, guard, plp);
}
static const delsys_t dvbt = { .setup = dvbt_setup };
diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp
index 5ef3ac5..31f2d0a 100644
--- a/modules/access/dtv/bdagraph.cpp
+++ b/modules/access/dtv/bdagraph.cpp
@@ -240,7 +240,7 @@ int dvb_set_dvbt (dvb_device_t *d, uint32_t freq, const char * /*mod*/,
int dvb_set_dvbt2 (dvb_device_t *, uint32_t /*freq*/, const char * /*mod*/,
uint32_t /*fec*/, uint32_t /*bandwidth*/, int /*tx_mode*/,
- uint32_t /*guard*/)
+ uint32_t /*guard*/, uint32_t /*plp*/)
{
return VLC_EGENERIC;
}
diff --git a/modules/access/dtv/dtv.h b/modules/access/dtv/dtv.h
index 66887b5..f399572 100644
--- a/modules/access/dtv/dtv.h
+++ b/modules/access/dtv/dtv.h
@@ -85,7 +85,7 @@ int dvb_set_dvbt (dvb_device_t *, uint32_t freq, const char *mod,
int transmission, uint32_t guard, int hierarchy);
int dvb_set_dvbt2 (dvb_device_t *, uint32_t freq, const char *mod,
uint32_t fec, uint32_t bandwidth,
- int transmission, uint32_t guard);
+ int transmission, uint32_t guard, uint32_t plp);
/* ATSC */
int dvb_set_atsc (dvb_device_t *, uint32_t freq, const char *mod);
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index dc4d9f5..ef87f39 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -938,7 +938,7 @@ int dvb_set_dvbt (dvb_device_t *d, uint32_t freq, const char *modstr,
int dvb_set_dvbt2 (dvb_device_t *d, uint32_t freq, const char *modstr,
uint32_t fec, uint32_t bandwidth,
- int transmit_mode, uint32_t guard)
+ int transmit_mode, uint32_t guard, uint32_t plp)
{
#if DVBv5(3)
uint32_t mod = dvb_parse_modulation (modstr, QAM_AUTO);
@@ -953,7 +953,8 @@ int dvb_set_dvbt2 (dvb_device_t *d, uint32_t freq, const char *modstr,
DTV_FREQUENCY, freq, DTV_MODULATION, mod,
DTV_INNER_FEC, fec, DTV_BANDWIDTH_HZ, bandwidth,
DTV_TRANSMISSION_MODE, transmit_mode,
- DTV_GUARD_INTERVAL, guard);
+ DTV_GUARD_INTERVAL, guard,
+ DTV_DVBT2_PLP_ID, plp);
#else
# warning DVB-T2 needs Linux DVB version 5.3 or later.
msg_Err (d->obj, "DVB-T2 support not compiled-in");
More information about the vlc-commits
mailing list