summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Freyermuth <o.freyermuth@googlemail.com>2023-08-23 22:42:42 +0200
committersfan5 <sfan5@live.de>2023-09-03 13:08:58 +0200
commitd88e3d105a725ce446e0f2ceb25d473ec6fdd721 (patch)
treef17c3e7a4912de26b608ca69eb41d45a2cda9312
parent67368ac5d207a72dcec1488e112af00198c650db (diff)
downloadmpv-d88e3d105a725ce446e0f2ceb25d473ec6fdd721.tar.bz2
mpv-d88e3d105a725ce446e0f2ceb25d473ec6fdd721.tar.xz
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.
-rw-r--r--DOCS/man/options.rst4
-rw-r--r--stream/dvb_tune.c2
-rw-r--r--stream/dvbin.h1
-rw-r--r--stream/stream_dvb.c8
4 files changed, 13 insertions, 2 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index ebd0882acf..304dc7918c 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -5136,8 +5136,8 @@ DVB
``--dvbin-file=<filename>``
Instructs mpv to read the channels list from ``<filename>``. The default is
in the mpv configuration directory (usually ``~/.config/mpv``) with the
- filename ``channels.conf.{sat,ter,cbl,atsc}`` (based on your card type) or
- ``channels.conf`` as a last resort.
+ filename ``channels.conf.{sat,ter,cbl,atsc,isdbt}`` (based on your card
+ type) or ``channels.conf`` as a last resort.
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
decoding the PMT (which largely improves the demuxing).
diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c
index d097131f7a..b02e915cb3 100644
--- a/stream/dvb_tune.c
+++ b/stream/dvb_tune.c
@@ -447,6 +447,7 @@ static int tune_it(dvb_priv_t *priv, int fd_frontend, unsigned int delsys,
switch (delsys) {
case SYS_DVBT2:
case SYS_DVBT:
+ case SYS_ISDBT:
if (freq < 1000000)
freq *= 1000UL;
switch (bandwidth) {
@@ -563,6 +564,7 @@ static int tune_it(dvb_priv_t *priv, int fd_frontend, unsigned int delsys,
break;
case SYS_DVBT:
case SYS_DVBT2:
+ case SYS_ISDBT:
{
struct dtv_property p[] = {
{ .cmd = DTV_DELIVERY_SYSTEM, .u.data = delsys },
diff --git a/stream/dvbin.h b/stream/dvbin.h
index 9bb06abe36..43acc9264b 100644
--- a/stream/dvbin.h
+++ b/stream/dvbin.h
@@ -130,6 +130,7 @@ typedef struct {
DELSYS_BIT(SYS_ATSC) | \
DELSYS_BIT(SYS_DVBC_ANNEX_B) | \
DELSYS_BIT(SYS_DVBT2) | \
+ DELSYS_BIT(SYS_ISDBT) | \
DELSYS_BIT(SYS_DVBC_ANNEX_C) \
)
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index e6cac0048a..dc70b43b19 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -386,6 +386,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
case SYS_DVBC_ANNEX_C:
case SYS_ATSC:
case SYS_DVBC_ANNEX_B:
+ case SYS_ISDBT:
mp_verbose(log, "VDR, %s, NUM: %d, NUM_FIELDS: %d, NAME: %s, "
"FREQ: %d, SRATE: %d",
get_dvb_delsys(delsys),
@@ -437,6 +438,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) {
case SYS_DVBT:
case SYS_DVBT2:
+ case SYS_ISDBT:
fields = sscanf(&line[k], ter_conf,
&ptr->freq, inv, bw, cr, tmp_lcr, mod,
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) {
case SYS_DVBT:
case SYS_DVBT2:
+ case SYS_ISDBT:
case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_C:
if (!strcmp(inv, "INVERSION_ON")) {
@@ -586,6 +589,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) {
case SYS_DVBT:
case SYS_DVBT2:
+ case SYS_ISDBT:
case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_C:
case SYS_ATSC:
@@ -624,6 +628,7 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
switch (delsys) {
case SYS_DVBT:
case SYS_DVBT2:
+ case SYS_ISDBT:
if (!strcmp(bw, "BANDWIDTH_5_MHZ")) {
ptr->bw = BANDWIDTH_5_MHZ;
} else if (!strcmp(bw, "BANDWIDTH_6_MHZ")) {
@@ -1199,6 +1204,9 @@ dvb_state_t *dvb_get_state(stream_t *stream)
case SYS_DVBT2:
conf_file_name = "channels.conf.ter";
break;
+ case SYS_ISDBT:
+ conf_file_name = "channels.conf.isdbt";
+ break;
case SYS_DVBS:
if (DELSYS_IS_SET(delsys_mask[f], SYS_DVBS2))
continue; /* Add all channels later with S2. */