tvhdhomerun: Add ATSC type for device-override

This commit is contained in:
Patric Karlstrom 2014-07-06 22:45:52 +02:00 committed by Jaroslav Kysela
parent 6718019acb
commit 24d2ab4071
2 changed files with 17 additions and 2 deletions

View file

@ -75,6 +75,7 @@ tvhdhomerun_device_class_override_enum( void * p )
htsmsg_t *m = htsmsg_create_list(); htsmsg_t *m = htsmsg_create_list();
htsmsg_add_str(m, NULL, "DVB-T"); htsmsg_add_str(m, NULL, "DVB-T");
htsmsg_add_str(m, NULL, "DVB-C"); htsmsg_add_str(m, NULL, "DVB-C");
htsmsg_add_str(m, NULL, "ATSC");
return m; return m;
} }
@ -239,7 +240,7 @@ static void tvhdhomerun_device_create(struct hdhomerun_discover_device_t *dInfo)
const char *override_type = htsmsg_get_str(conf, "fe_override"); const char *override_type = htsmsg_get_str(conf, "fe_override");
if ( override_type != NULL) { if ( override_type != NULL) {
type = dvb_str2type(override_type); type = dvb_str2type(override_type);
if ( ! ( type == DVB_TYPE_C || type == DVB_TYPE_T ) ) { if ( ! ( type == DVB_TYPE_C || type == DVB_TYPE_T || type == DVB_TYPE_ATSC ) ) {
type = DVB_TYPE_C; type = DVB_TYPE_C;
} }
} }

View file

@ -415,6 +415,8 @@ tvhdhomerun_frontend_network_list ( mpegts_input_t *mi )
idc = &dvb_network_dvbt_class; idc = &dvb_network_dvbt_class;
else if (hfe->hf_type == DVB_TYPE_C) else if (hfe->hf_type == DVB_TYPE_C)
idc = &dvb_network_dvbc_class; idc = &dvb_network_dvbc_class;
else if (hfe->hf_type == DVB_TYPE_ATSC)
idc = &dvb_network_atsc_class;
else else
return NULL; return NULL;
@ -486,6 +488,16 @@ const idclass_t tvhdhomerun_frontend_dvbc_class =
} }
}; };
const idclass_t tvhdhomerun_frontend_atsc_class =
{
.ic_super = &tvhdhomerun_frontend_class,
.ic_class = "tvhdhomerun_frontend_atsc",
.ic_caption = "HDHomeRun ATSC Frontend",
.ic_properties = (const property_t[]){
{}
}
};
void void
tvhdhomerun_frontend_delete ( tvhdhomerun_frontend_t *hfe ) tvhdhomerun_frontend_delete ( tvhdhomerun_frontend_t *hfe )
{ {
@ -532,7 +544,9 @@ tvhdhomerun_frontend_create(tvhdhomerun_device_t *hd, struct hdhomerun_discover_
idc = &tvhdhomerun_frontend_dvbt_class; idc = &tvhdhomerun_frontend_dvbt_class;
else if (type == DVB_TYPE_C) else if (type == DVB_TYPE_C)
idc = &tvhdhomerun_frontend_dvbc_class; idc = &tvhdhomerun_frontend_dvbc_class;
else { else if (type == DVB_TYPE_ATSC) {
idc = &tvhdhomerun_frontend_atsc_class;
} else {
tvherror("stvhdhomerun", "unknown FE type %d", type); tvherror("stvhdhomerun", "unknown FE type %d", type);
return NULL; return NULL;
} }