add 'show dvbadapters'
This commit is contained in:
parent
11561e7ae9
commit
b4c43925ec
3 changed files with 24 additions and 2 deletions
2
dvb.h
2
dvb.h
|
@ -19,7 +19,7 @@
|
|||
#ifndef DVB_H_
|
||||
#define DVB_H_
|
||||
|
||||
#define DVB_FEC_ERROR_LIMIT 20
|
||||
#define DVB_FEC_ERROR_LIMIT 10
|
||||
|
||||
extern struct th_dvb_adapter_list dvb_adapters_probing;
|
||||
extern struct th_dvb_adapter_list dvb_adapters_running;
|
||||
|
|
|
@ -152,7 +152,7 @@ dvb_start_feed(th_transport_t *t, unsigned int weight)
|
|||
if(tdmi->tdmi_status != NULL)
|
||||
continue; /* no lock */
|
||||
|
||||
if(tdmi->tdmi_fec_err_per_sec > DVB_FEC_ERROR_LIMIT)
|
||||
if(tdmi->tdmi_fec_err_per_sec > DVB_FEC_ERROR_LIMIT / 3)
|
||||
continue; /* too much errors to even consider */
|
||||
|
||||
if(tdmi->tdmi_state == TDMI_RUNNING)
|
||||
|
|
22
htsclient.c
22
htsclient.c
|
@ -172,6 +172,7 @@ cr_show(client_t *c, char **argv, int argc)
|
|||
th_subscription_t *s;
|
||||
th_transport_t *t;
|
||||
th_channel_t *ch;
|
||||
th_dvb_adapter_t *tda;
|
||||
th_dvb_mux_t *tdm;
|
||||
th_dvb_mux_instance_t *tdmi;
|
||||
event_t *e;
|
||||
|
@ -300,6 +301,27 @@ cr_show(client_t *c, char **argv, int argc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(!strcasecmp(subcmd, "dvbadapters")) {
|
||||
LIST_FOREACH(tda, &dvb_adapters_running, tda_link) {
|
||||
|
||||
cprintf(c, "%20s: ", tda->tda_path);
|
||||
|
||||
tdmi = tda->tda_mux_current;
|
||||
|
||||
if(tdmi == NULL) {
|
||||
cprintf(c, "inactive\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
cprintf(c, "Tuned to \"%s\"\n", tdmi->tdmi_mux->tdm_title);
|
||||
cprintf(c, "\t\t ");
|
||||
|
||||
print_tdmi(c, tda->tda_mux_current);
|
||||
cprintf(c, "\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue