mpegts: fixed some issues with input init

This commit is contained in:
Adam Sutton 2013-06-10 17:28:45 +01:00
parent 44d5fc6671
commit 226a3600f9
5 changed files with 6 additions and 3 deletions

View file

@ -318,7 +318,6 @@ void linuxdvb_device_init ( int adapter_mask )
if ((s = hts_settings_load_r(1, "input/linuxdvb/devices"))) {
HTSMSG_FOREACH(f, s) {
if (!(e = htsmsg_get_map_by_field(f))) continue;
if (!(e = htsmsg_get_map(e, "config"))) continue;
(void)linuxdvb_device_create0(f->hmf_name, e);
}
}

View file

@ -83,8 +83,6 @@ const idclass_t linuxdvb_hardware_class =
.ic_get_title = linuxdvb_hardware_class_get_title,
.ic_get_childs = linuxdvb_hardware_class_get_childs,
.ic_properties = (const property_t[]){
{ PROPDEF1("enabled", "Enabled",
PT_BOOL, linuxdvb_hardware_t, mi_enabled) },
{ PROPDEF1("displayname", "Name",
PT_STR, linuxdvb_hardware_t, lh_displayname) },
{}

View file

@ -30,6 +30,7 @@
* Class definition
* *************************************************************************/
#if 0
static const char *
mpegts_input_class_get_name ( void *in )
{
@ -41,6 +42,7 @@ mpegts_input_class_get_name ( void *in )
*buf = 0;
return buf;
}
#endif
const idclass_t mpegts_input_class =
{
@ -51,10 +53,12 @@ const idclass_t mpegts_input_class =
PROPDEF1("enabled", "Enabled", PT_BOOL,
mpegts_input_t, mi_enabled)
},
#if 0
{
PROPDEF0("displayname", "Name", PT_STR, PO_NOSAVE | PO_RDONLY),
.str_get = mpegts_input_class_get_name
},
#endif
{}
}
};

View file

@ -56,6 +56,7 @@ prop_write_values(void *obj, const property_t *pl, htsmsg_t *m)
//fprintf(stderr, "Property %s unmappable\n", f->hmf_name);
continue;
}
if(p->options & PO_NOSAVE) continue;
void *val = obj + p->off;
switch(TO_FROM(p->type, f->hmf_type)) {

View file

@ -268,6 +268,7 @@ extjs_mpegts_network
return HTTP_STATUS_BAD_REQUEST;
}
mm = mn->mn_mux_create2(mn, conf);
if(mm) mm->mm_config_save(mm);
pthread_mutex_unlock(&global_lock);
if (!mm) return HTTP_STATUS_BAD_REQUEST; // TODO: error message
} else {