Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dvb_mux_conf_str: add support for ISDB types
  • Loading branch information
perexg committed Aug 29, 2016
1 parent 1c1ef10 commit 8b51103
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/input/mpegts/dvb_support.c
Expand Up @@ -1045,6 +1045,32 @@ dvb_mux_conf_str_atsc_t ( dvb_mux_conf_t *dmc, char *buf, size_t bufsize )
dvb_qam2str(dmc->dmc_fe_modulation));
}

static int
dvb_mux_conf_str_isdb_t ( dvb_mux_conf_t *dmc, char *buf, size_t bufsize )
{
char hp[16];
snprintf(hp, sizeof(hp), "%s", dvb_fec2str(dmc->u.dmc_fe_ofdm.code_rate_HP));
return
snprintf(buf, bufsize,
"%s freq %d bw %s guard %s A (%s,%s,%d,%d) B (%s,%s,%d,%d) C (%s,%s,%d,%d)",
dvb_delsys2str(dmc->dmc_fe_delsys),
dmc->dmc_fe_freq,
dvb_bw2str(dmc->u.dmc_fe_isdbt.bandwidth),
dvb_guard2str(dmc->u.dmc_fe_isdbt.guard_interval),
dvb_fec2str(dmc->u.dmc_fe_isdbt.layers[0].fec),
dvb_qam2str(dmc->u.dmc_fe_isdbt.layers[0].modulation),
dmc->u.dmc_fe_isdbt.layers[0].segment_count,
dmc->u.dmc_fe_isdbt.layers[0].time_interleaving,
dvb_fec2str(dmc->u.dmc_fe_isdbt.layers[1].fec),
dvb_qam2str(dmc->u.dmc_fe_isdbt.layers[1].modulation),
dmc->u.dmc_fe_isdbt.layers[1].segment_count,
dmc->u.dmc_fe_isdbt.layers[1].time_interleaving,
dvb_fec2str(dmc->u.dmc_fe_isdbt.layers[2].fec),
dvb_qam2str(dmc->u.dmc_fe_isdbt.layers[2].modulation),
dmc->u.dmc_fe_isdbt.layers[3].segment_count,
dmc->u.dmc_fe_isdbt.layers[3].time_interleaving);
}

int
dvb_mux_conf_str ( dvb_mux_conf_t *dmc, char *buf, size_t bufsize )
{
Expand All @@ -1056,11 +1082,14 @@ dvb_mux_conf_str ( dvb_mux_conf_t *dmc, char *buf, size_t bufsize )
return dvb_mux_conf_str_dvbt(dmc, buf, bufsize);
case DVB_TYPE_C:
case DVB_TYPE_ATSC_C:
case DVB_TYPE_ISDB_C:
return dvb_mux_conf_str_dvbc(dmc, buf, bufsize);
case DVB_TYPE_S:
return dvb_mux_conf_str_dvbs(dmc, buf, bufsize);
case DVB_TYPE_ATSC_T:
return dvb_mux_conf_str_atsc_t(dmc, buf, bufsize);
case DVB_TYPE_ISDB_T:
return dvb_mux_conf_str_isdb_t(dmc, buf, bufsize);
default:
return
snprintf(buf, bufsize, "UNKNOWN MUX CONFIG");
Expand Down

2 comments on commit 8b51103

@connaisseur
Copy link

@connaisseur connaisseur commented on 8b51103 Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While compiling this, I received the following error message:

`
CC src/input/mpegts/dvb_support.o
src/input/mpegts/dvb_support.c: In function ‘dvb_mux_conf_str’:
src/input/mpegts/dvb_support.c:1071:38: error: array subscript is above array bounds [-Werror=array-bounds]
dmc->u.dmc_fe_isdbt.layers[3].time_interleaving);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
src/input/mpegts/dvb_support.c:1070:38: error: array subscript is above array bounds [-Werror=array-bounds]
dmc->u.dmc_fe_isdbt.layers[3].segment_count,
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
make: *** [Makefile:626: /home/volker/builds/tvheadend-git/src/tvheadend/build.linux/src/input/mpegts/dvb_support.o] Error 1
==> ERROR: A failure occurred in build().

`
Compiler:
$ gcc --version
gcc (GCC) 6.1.1 20160802

This is on 64 bit Arch Linux.

@perexg
Copy link
Contributor Author

@perexg perexg commented on 8b51103 Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed in 3bf7fd4 .

Please sign in to comment.