Commit aee227cb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

DTV: add so-called "Clear" QAM

Use cqam:// as BDA already does.
parent f4195d95
......@@ -193,7 +193,7 @@ vlc_module_begin ()
set_callbacks (Open, Close)
add_shortcut ("dtv", "tv", "dvb", /* "radio", "dab",*/
"cable", "dvb-c", "satellite", "dvb-s", "dvb-s2",
"terrestrial", "dvb-t", "atsc")
"terrestrial", "dvb-t", "atsc", "cqam")
/* All options starting with dvb- can be overriden in the MRL, so they
* must all be "safe". Nevertheless, we do not mark as safe those that are
......@@ -494,6 +494,8 @@ static const delsys_t *GuessSystem (const char *scheme, dvb_device_t *dev)
if (!strcasecmp (scheme, "atsc"))
return &atsc;
if (!strcasecmp (scheme, "cqam"))
return &cqam;
if (!strcasecmp (scheme, "dvb-c"))
return &dvbc;
if (!strcasecmp (scheme, "dvb-s"))
......@@ -592,6 +594,17 @@ static int atsc_setup (vlc_object_t *obj, dvb_device_t *dev, unsigned freq)
const delsys_t atsc = { .setup = atsc_setup };
static int cqam_setup (vlc_object_t *obj, dvb_device_t *dev, unsigned freq)
{
char *mod = var_InheritModulation (obj);
int ret = dvb_set_cqam (dev, freq, mod);
free (mod);
return ret;
}
const delsys_t cqam = { .setup = cqam_setup };
/*** DVB-C ***/
static int dvbc_setup (vlc_object_t *obj, dvb_device_t *dev, unsigned freq)
......
......@@ -22,7 +22,7 @@
typedef struct delsys delsys_t;
extern const delsys_t dvbc, dvbs, dvbs2, dvbt, atsc;
extern const delsys_t dvbc, dvbs, dvbs2, dvbt, atsc, cqam;
typedef struct dvb_device dvb_device_t;
......@@ -59,6 +59,7 @@ int dvb_set_dvbt (dvb_device_t *, uint32_t freq, const char *mod,
/* ATSC */
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-T */
typedef struct isdbt_layer
......
......@@ -726,3 +726,12 @@ int dvb_set_atsc (dvb_device_t *d, uint32_t freq, const char *modstr)
return dvb_set_props (d, 4, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_ATSC,
DTV_FREQUENCY, freq * 1000, DTV_MODULATION, mod);
}
int dvb_set_cqam (dvb_device_t *d, uint32_t freq, const char *modstr)
{
unsigned mod = dvb_parse_modulation (modstr, QAM_AUTO);
return dvb_set_props (d, 4, DTV_CLEAR, 0,
DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_B,
DTV_FREQUENCY, freq * 1000, DTV_MODULATION, mod);
}
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