if (lfe->lfe_satconf && !strcmp(str ?: "", lfe->lfe_satconf->ls_type))
return 0;
linuxdvb_satconf_destroy(lfe->lfe_satconf);
- lfe->lfe_satconf = linuxdvb_satconf_create(lfe, str);
+ lfe->lfe_satconf = linuxdvb_satconf_create(lfe, str, NULL, NULL);
return 1;
}
const char *str;
const idclass_t *idc;
pthread_t tid;
+ const char *scuuid = NULL, *sctype = NULL;
+ htsmsg_t *scconf = NULL;
/* Get type */
if (conf) {
/* Start table thread */
tvhthread_create(&tid, NULL, mpegts_input_table_thread, lfe, 1);
+ /* Satconf */
+ if (conf) {
+ if ((scconf = htsmsg_get_map(conf, "satconf"))) {
+ sctype = htsmsg_get_str(scconf, "type");
+ scuuid = htsmsg_get_str(scconf, "uuid");
+ }
+ }
+
/* Create satconf */
if (type == FE_QPSK && !lfe->lfe_satconf)
- lfe->lfe_satconf = linuxdvb_satconf_create(lfe, "");
+ lfe->lfe_satconf = linuxdvb_satconf_create(lfe, sctype, scuuid, scconf);
/* No conf */
if (!conf)
{
mpegts_input_save((mpegts_input_t*)lfe, m);
htsmsg_add_str(m, "type", dvb_type2str(lfe->lfe_info.type));
-htsmsg_print(m);
if (lfe->lfe_satconf) {
htsmsg_t *s = htsmsg_create_map();
linuxdvb_satconf_save(lfe->lfe_satconf, s);
htsmsg_add_str(s, "uuid", idnode_uuid_as_str(&lfe->lfe_satconf->ls_id));
htsmsg_add_msg(m, "satconf", s);
}
-htsmsg_print(m);
}
/******************************************************************************
htsmsg_t *linuxdvb_satconf_type_list ( void *o );
-linuxdvb_satconf_t *linuxdvb_satconf_create0(const char *uuid, htsmsg_t *conf);
-
linuxdvb_satconf_t *linuxdvb_satconf_create
- ( linuxdvb_frontend_t *lfe, const char *type );
+ ( linuxdvb_frontend_t *lfe,
+ const char *type, const char *uuid, htsmsg_t *conf );
void linuxdvb_satconf_delete ( linuxdvb_satconf_t *ls );
void linuxdvb_satconf_destroy ( linuxdvb_satconf_t *ls );
-linuxdvb_satconf_t *linuxdvb_satconf_create
- ( linuxdvb_frontend_t *lfe, const char *type );
-
void linuxdvb_satconf_destroy ( linuxdvb_satconf_t *ls );
#endif /* __TVH_LINUXDVB_PRIVATE_H__ */
{
int i = 0;
linuxdvb_satconf_ele_t *lse;
- printf("SET NETWORK %p %d = %s\n", ls, idx, uuid);
LIST_FOREACH(lse, &ls->ls_elements, ls_link) {
- printf("element\n");
if (i == idx) break;
i++;
}
- printf("lse = %p\n", lse);
if (lse)
return linuxdvb_satconf_ele_class_network_set(lse, uuid);
return 0;
linuxdvb_satconf_t *
linuxdvb_satconf_create
- ( linuxdvb_frontend_t *lfe, const char *type )
+ ( linuxdvb_frontend_t *lfe, const char *type, const char *uuid,
+ htsmsg_t *conf )
{
int i;
linuxdvb_satconf_ele_t *lse;
struct linuxdvb_satconf_type *lst
= linuxdvb_satconf_type_find(type);
- const char *uuid = NULL;//"TODO";
- htsmsg_t *conf = NULL;
assert(lst);
linuxdvb_satconf_t *ls = calloc(1, sizeof(linuxdvb_satconf_t));
mpegts_input_t *mi = o;
mpegts_network_t *mn = mi->mi_network;
const char *s = v;
- printf("SET NETWORK %s\n", (const char*)v);
if (mi->mi_network && !strcmp(idnode_uuid_as_str(&mn->mn_id), s ?: ""))
return 0;