mpegts: some logging cleanups

This commit is contained in:
Adam Sutton 2013-06-17 19:56:30 +01:00
parent dd0e7b1ea4
commit 5db456a020
2 changed files with 11 additions and 6 deletions

View file

@ -397,12 +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;
char pol[2] = { 0 };
if (ln->ln_type == FE_QPSK) {
pol[0] = *(dvb_pol2str(lm->lm_tuning.dmc_fe_polarisation));
}
snprintf(buf, len, "%d %s%s [onid:%04X, tsid:%04X]",
lm->lm_tuning.dmc_fe_params.frequency,
freq,
(ln->ln_type == FE_QPSK) ? "MHz " : "Hz",
(ln->ln_type == FE_QPSK)
? dvb_pol2str(lm->lm_tuning.dmc_fe_polarisation)
: "",
(ln->ln_type == FE_QPSK) ? pol : "",
mm->mm_onid, mm->mm_tsid);
}

View file

@ -206,8 +206,8 @@ mpegts_mux_start ( mpegts_mux_t *mm, const char *reason, int weight )
mpegts_mux_instance_t *mmi, *tune;
mm->mm_display_name(mm, buf, sizeof(buf));
tvhinfo("mpegts", "%s - starting for '%s' (weight %d)",
buf, reason, weight);
tvhtrace("mpegts", "%s - starting for '%s' (weight %d)",
buf, reason, weight);
/* Disabled */
if (!mm->mm_is_enabled(mm)) {
@ -260,6 +260,8 @@ mpegts_mux_start ( mpegts_mux_t *mm, const char *reason, int weight )
/* Tune */
if (tune) {
tvhinfo("mpegts", "%s - starting for '%s' (weight %d)",
buf, reason, weight);
if (!(fail = mpegts_mux_instance_start(&tune))) break;
tune = NULL;
tvhwarn("mpegts", "%s - failed to start, try another", buf);