diff options
author | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2017-10-08 05:01:55 +0200 |
---|---|---|
committer | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2017-10-09 20:06:29 +0200 |
commit | e46338c66a6ded23c364d79d5beb2432980cba19 (patch) | |
tree | 9f490378f591bf12cbf2e8b29b0a1fd37646ed43 /stream/stream_dvb.c | |
parent | 20381a5f5a933744503a0889dca5dba68222aa73 (diff) | |
download | mpv-e46338c66a6ded23c364d79d5beb2432980cba19.tar.bz2 mpv-e46338c66a6ded23c364d79d5beb2432980cba19.tar.xz |
dvb: Fixes for ATSC tuning.
ATSC is a mix of terrestrial and cable,
and depending on modulation is actually using
DVBC_ANNEX_B. Thus, we need to override the delivery
system depending on the modulation, channel by channel.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Diffstat (limited to 'stream/stream_dvb.c')
-rw-r--r-- | stream/stream_dvb.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 1572f2687b..856c9a7ffd 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -319,6 +319,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_C: case SYS_ATSC: + case SYS_DVBC_ANNEX_B: mp_verbose(log, "VDR, %s, NUM: %d, NUM_FIELDS: %d, NAME: %s, " "FREQ: %d, SRATE: %d", get_dvb_delsys(delsys), @@ -390,6 +391,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, break; #ifdef DVB_ATSC case SYS_ATSC: + case SYS_DVBC_ANNEX_B: fields = sscanf(&line[k], atsc_conf, &ptr->freq, mod, vpid_str, apid_str); mp_verbose(log, "%s, NUM: %d, NUM_FIELDS: %d, NAME: %s, FREQ: %d\n", @@ -523,6 +525,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_C: case SYS_ATSC: + case SYS_DVBC_ANNEX_B: if (!strcmp(mod, "QAM_128")) { ptr->mod = QAM_128; } else if (!strcmp(mod, "QAM_256")) { @@ -541,6 +544,19 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log, #endif } } +#ifdef DVB_ATSC + /* Modulation defines real delsys for ATSC: + Terrestrial (VSB) is SYS_ATSC, Cable (QAM) is SYS_DVBC_ANNEX_B. */ + if (delsys == SYS_ATSC || delsys == SYS_DVBC_ANNEX_B) { + if (ptr->mod == VSB_8 || ptr->mod == VSB_16) { + delsys = SYS_ATSC; + } else { + delsys = SYS_DVBC_ANNEX_B; + } + mp_verbose(log, "Defined delivery system for ATSC as %s from modulation.\n", + get_dvb_delsys(delsys)); + } +#endif switch (delsys) { case SYS_DVBT: |