diff --git a/src/input/mpegts/linuxdvb/linuxdvb_mux.c b/src/input/mpegts/linuxdvb/linuxdvb_mux.c index 40ea6835..115ea3cc 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_mux.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_mux.c @@ -397,16 +397,15 @@ linuxdvb_mux_display_name ( mpegts_mux_t *mm, char *buf, size_t len ) { linuxdvb_mux_t *lm = (linuxdvb_mux_t*)mm; linuxdvb_network_t *ln = (linuxdvb_network_t*)mm->mm_network; - int freq = lm->lm_tuning.dmc_fe_params.frequency; + uint32_t freq = lm->lm_tuning.dmc_fe_params.frequency; char pol[2] = { 0 }; if (ln->ln_type == FE_QPSK) { pol[0] = *(dvb_pol2str(lm->lm_tuning.dmc_fe_polarisation)); + freq /= 1000; + } else { + freq /= 1000; } - snprintf(buf, len, "%d %s%s [onid:%04X, tsid:%04X]", - freq, - (ln->ln_type == FE_QPSK) ? "MHz " : "Hz", - (ln->ln_type == FE_QPSK) ? pol : "", - mm->mm_onid, mm->mm_tsid); + snprintf(buf, len, "%d%s", freq, pol); } static void diff --git a/src/input/mpegts/mpegts_mux.c b/src/input/mpegts/mpegts_mux.c index 6295d85b..4571d590 100644 --- a/src/input/mpegts/mpegts_mux.c +++ b/src/input/mpegts/mpegts_mux.c @@ -132,6 +132,18 @@ mpegts_mux_class_get_network ( void *ptr ) return &s; } +static const void * +mpegts_mux_class_get_name ( void *ptr ) +{ + static char buf[512], *s = buf; + mpegts_mux_t *mm = ptr; + if (mm && mm->mm_display_name) + mm->mm_display_name(mm, buf, sizeof(buf)); + else + *buf = 0; + return &s; +} + const idclass_t mpegts_mux_class = { .ic_class = "mpegts_mux", @@ -151,6 +163,13 @@ const idclass_t mpegts_mux_class = .opts = PO_RDONLY | PO_NOSAVE, .get = mpegts_mux_class_get_network, }, + { + .type = PT_STR, + .id = "name", + .name = "Name", + .opts = PO_RDONLY | PO_NOSAVE, + .get = mpegts_mux_class_get_name, + }, { .type = PT_U16, .id = "onid",