Commit a2705d44 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

DTV: add ISDB-C (ITU J.83 Annex C) untested support

parent 24d56264
......@@ -230,7 +230,7 @@ vlc_module_begin ()
set_capability ("access", 0)
set_callbacks (Open, Close)
add_shortcut ("dtv", "tv", "dvb", /* "radio", "dab",*/
"cable", "dvb-c", "cqam"
"cable", "dvb-c", "cqam", "isdb-c",
"satellite", "dvb-s", "dvb-s2", "isdb-s",
"terrestrial", "dvb-t", "dvb-t2", "isdb-t", "atsc")
......@@ -405,7 +405,7 @@ typedef struct delsys
} delsys_t;
static const delsys_t dvbc, dvbs, dvbs2, dvbt, dvbt2;
static const delsys_t isdbs, isdbt;
static const delsys_t isdbc, isdbs, isdbt;
static const delsys_t atsc, cqam;
static block_t *Read (access_t *);
......@@ -621,6 +621,8 @@ static const delsys_t *GuessSystem (const char *scheme, dvb_device_t *dev)
return &dvbt;
if (!strcasecmp (scheme, "dvb-t2"))
return &dvbt2;
if (!strcasecmp (scheme, "isdb-c"))
return &isdbc;
if (!strcasecmp (scheme, "isdb-s"))
return &isdbs;
if (!strcasecmp (scheme, "isdb-t"))
......@@ -886,6 +888,19 @@ static const delsys_t dvbt = { .setup = dvbt_setup };
static const delsys_t dvbt2 = { .setup = dvbt2_setup };
/*** ISDB-C ***/
static int isdbc_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
{
const char *mod = var_InheritModulation (obj, "dvb-modulation");
uint32_t fec = var_InheritCodeRate (obj, "dvb-fec");
unsigned srate = var_InheritInteger (obj, "dvb-srate");
return dvb_set_isdbc (dev, freq, mod, srate, fec);
}
static const delsys_t isdbc = { .setup = isdbc_setup };
/*** ISDB-S ***/
static int isdbs_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t freq)
{
......
......@@ -245,6 +245,13 @@ int dvb_set_dvbt2 (dvb_device_t *, uint32_t /*freq*/, const char * /*mod*/,
return VLC_EGENERIC;
}
/* ISDB-C */
int dvb_set_isdbc (dvb_device_t *, uint32_t freq, const char *mod,
uint32_t srate, uint32_t fec)
{
return VLC_EGENERIC;
}
/* ISDB-S */
int dvb_set_isdbs (dvb_device_t *, uint64_t /*freq*/, uint16_t /*ts_id*/)
{
......
......@@ -90,6 +90,10 @@ int dvb_set_dvbt2 (dvb_device_t *, uint32_t freq, const char *mod,
int dvb_set_atsc (dvb_device_t *, uint32_t freq, const char *mod);
int dvb_set_cqam (dvb_device_t *, uint32_t freq, const char *mod);
/* ISDB-C */
int dvb_set_isdbc (dvb_device_t *, uint32_t freq, const char *mod,
uint32_t srate, uint32_t fec);
/* ISDB-S */
/* TODO: modulation? */
int dvb_set_isdbs (dvb_device_t *, uint64_t freq, uint16_t ts_id);
......
......@@ -911,6 +911,22 @@ int dvb_set_dvbt2 (dvb_device_t *d, uint32_t freq, const char *modstr,
}
/*** ISDB-C ***/
int dvb_set_isdbc (dvb_device_t *d, uint32_t freq, const char *modstr,
uint32_t srate, uint32_t fec)
{
unsigned mod = dvb_parse_modulation (modstr, QAM_AUTO);
fec = dvb_parse_fec (fec);
if (dvb_find_frontend (d, FE_QAM, FE_IS_STUPID))
return -1;
return dvb_set_props (d, 6, DTV_CLEAR, 0,
DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_AC,
DTV_FREQUENCY, freq, DTV_MODULATION, mod,
DTV_SYMBOL_RATE, srate, DTV_INNER_FEC, fec);
}
/*** ISDB-S ***/
int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment