1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

stream/dvbin: add support for delivery system ISDB-T

This is similar to DVB-T, but requires slightly different treatment
as there is no T/T2 differentiation.
Use a new channels.conf.isdbt file as channels config file.
This commit is contained in:
Oliver Freyermuth 2023-08-23 22:42:42 +02:00 committed by sfan5
parent 67368ac5d2
commit d88e3d105a
4 changed files with 13 additions and 2 deletions

View File

@ -5136,8 +5136,8 @@ DVB
``--dvbin-file=<filename>`` ``--dvbin-file=<filename>``
Instructs mpv to read the channels list from ``<filename>``. The default is Instructs mpv to read the channels list from ``<filename>``. The default is
in the mpv configuration directory (usually ``~/.config/mpv``) with the in the mpv configuration directory (usually ``~/.config/mpv``) with the
filename ``channels.conf.{sat,ter,cbl,atsc}`` (based on your card type) or filename ``channels.conf.{sat,ter,cbl,atsc,isdbt}`` (based on your card
``channels.conf`` as a last resort. type) or ``channels.conf`` as a last resort.
For DVB-S/2 cards, a VDR 1.7.x format channel list is recommended For DVB-S/2 cards, a VDR 1.7.x format channel list is recommended
as it allows tuning to DVB-S2 channels, enabling subtitles and as it allows tuning to DVB-S2 channels, enabling subtitles and
decoding the PMT (which largely improves the demuxing). decoding the PMT (which largely improves the demuxing).

View File

@ -447,6 +447,7 @@ static int tune_it(dvb_priv_t *priv, int fd_frontend, unsigned int delsys,
switch (delsys) { switch (delsys) {
case SYS_DVBT2: case SYS_DVBT2:
case SYS_DVBT: case SYS_DVBT:
case SYS_ISDBT:
if (freq < 1000000) if (freq < 1000000)
freq *= 1000UL; freq *= 1000UL;
switch (bandwidth) { switch (bandwidth) {
@ -563,6 +564,7 @@ static int tune_it(dvb_priv_t *priv, int fd_frontend, unsigned int delsys,
break; break;
case SYS_DVBT: case SYS_DVBT:
case SYS_DVBT2: case SYS_DVBT2:
case SYS_ISDBT:
{ {
struct dtv_property p[] = { struct dtv_property p[] = {
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = delsys }, { .cmd = DTV_DELIVERY_SYSTEM, .u.data = delsys },

View File

@ -130,6 +130,7 @@ typedef struct {
DELSYS_BIT(SYS_ATSC) | \ DELSYS_BIT(SYS_ATSC) | \
DELSYS_BIT(SYS_DVBC_ANNEX_B) | \ DELSYS_BIT(SYS_DVBC_ANNEX_B) | \
DELSYS_BIT(SYS_DVBT2) | \ DELSYS_BIT(SYS_DVBT2) | \
DELSYS_BIT(SYS_ISDBT) | \
DELSYS_BIT(SYS_DVBC_ANNEX_C) \ DELSYS_BIT(SYS_DVBC_ANNEX_C) \
) )

View File

@ -386,6 +386,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
case SYS_DVBC_ANNEX_C: case SYS_DVBC_ANNEX_C:
case SYS_ATSC: case SYS_ATSC:
case SYS_DVBC_ANNEX_B: case SYS_DVBC_ANNEX_B:
case SYS_ISDBT:
mp_verbose(log, "VDR, %s, NUM: %d, NUM_FIELDS: %d, NAME: %s, " mp_verbose(log, "VDR, %s, NUM: %d, NUM_FIELDS: %d, NAME: %s, "
"FREQ: %d, SRATE: %d", "FREQ: %d, SRATE: %d",
get_dvb_delsys(delsys), get_dvb_delsys(delsys),
@ -437,6 +438,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) { switch (delsys) {
case SYS_DVBT: case SYS_DVBT:
case SYS_DVBT2: case SYS_DVBT2:
case SYS_ISDBT:
fields = sscanf(&line[k], ter_conf, fields = sscanf(&line[k], ter_conf,
&ptr->freq, inv, bw, cr, tmp_lcr, mod, &ptr->freq, inv, bw, cr, tmp_lcr, mod,
transm, gi, tmp_hier, vpid_str, apid_str); transm, gi, tmp_hier, vpid_str, apid_str);
@ -553,6 +555,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) { switch (delsys) {
case SYS_DVBT: case SYS_DVBT:
case SYS_DVBT2: case SYS_DVBT2:
case SYS_ISDBT:
case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_C: case SYS_DVBC_ANNEX_C:
if (!strcmp(inv, "INVERSION_ON")) { if (!strcmp(inv, "INVERSION_ON")) {
@ -586,6 +589,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) { switch (delsys) {
case SYS_DVBT: case SYS_DVBT:
case SYS_DVBT2: case SYS_DVBT2:
case SYS_ISDBT:
case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_C: case SYS_DVBC_ANNEX_C:
case SYS_ATSC: case SYS_ATSC:
@ -624,6 +628,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) { switch (delsys) {
case SYS_DVBT: case SYS_DVBT:
case SYS_DVBT2: case SYS_DVBT2:
case SYS_ISDBT:
if (!strcmp(bw, "BANDWIDTH_5_MHZ")) { if (!strcmp(bw, "BANDWIDTH_5_MHZ")) {
ptr->bw = BANDWIDTH_5_MHZ; ptr->bw = BANDWIDTH_5_MHZ;
} else if (!strcmp(bw, "BANDWIDTH_6_MHZ")) { } else if (!strcmp(bw, "BANDWIDTH_6_MHZ")) {
@ -1199,6 +1204,9 @@ dvb_state_t *dvb_get_state(stream_t *stream)
case SYS_DVBT2: case SYS_DVBT2:
conf_file_name = "channels.conf.ter"; conf_file_name = "channels.conf.ter";
break; break;
case SYS_ISDBT:
conf_file_name = "channels.conf.isdbt";
break;
case SYS_DVBS: case SYS_DVBS:
if (DELSYS_IS_SET(delsys_mask[f], SYS_DVBS2)) if (DELSYS_IS_SET(delsys_mask[f], SYS_DVBS2))
continue; /* Add all channels later with S2. */ continue; /* Add all channels later with S2. */