Remove 'channelname' from map function call
This commit is contained in:
parent
b21e3e834e
commit
ef10ad3e9f
9 changed files with 18 additions and 14 deletions
|
@ -273,7 +273,7 @@ ajax_transport_rename_channel(http_connection_t *hc, http_reply_t *hr,
|
|||
static void
|
||||
dvb_map_channel(th_transport_t *t, tcp_queue_t *tq)
|
||||
{
|
||||
transport_set_channel(t, t->tht_channelname);
|
||||
transport_map_channel(t);
|
||||
|
||||
printf("Mapped transport %s to channel %s\n",
|
||||
t->tht_servicename, t->tht_channel->ch_name);
|
||||
|
@ -292,7 +292,7 @@ dvb_map_channel(th_transport_t *t, tcp_queue_t *tq)
|
|||
static void
|
||||
dvb_unmap_channel(th_transport_t *t, tcp_queue_t *tq)
|
||||
{
|
||||
transport_unset_channel(t);
|
||||
transport_unmap_channel(t);
|
||||
|
||||
printf("Unmapped transport %s\n", t->tht_servicename);
|
||||
|
||||
|
|
3
avgen.c
3
avgen.c
|
@ -116,8 +116,9 @@ avgen_init(void)
|
|||
t->tht_provider = strdup("HTS Tvheadend");
|
||||
|
||||
t->tht_identifier = strdup("test1");
|
||||
t->tht_servicename = strdup("test1");
|
||||
|
||||
transport_set_channel(t, ch->ch_name);
|
||||
transport_map_channel(t);
|
||||
}
|
||||
|
||||
|
||||
|
|
4
dvb.c
4
dvb.c
|
@ -648,7 +648,7 @@ dvb_tdmi_load(th_dvb_mux_instance_t *tdmi)
|
|||
psi_load_transport(&ce->ce_sub, t);
|
||||
|
||||
if(atoi(config_get_str_sub(&ce->ce_sub, "mapped", "0"))) {
|
||||
transport_set_channel(t, t->tht_channelname);
|
||||
transport_map_channel(t);
|
||||
}
|
||||
}
|
||||
config_free0(&cl);
|
||||
|
@ -745,7 +745,7 @@ dvb_tda_clone(th_dvb_adapter_t *dst, th_dvb_adapter_t *src)
|
|||
t_dst->tht_channelname = strdup(t_src->tht_channelname);
|
||||
|
||||
if(t_src->tht_channel != NULL)
|
||||
transport_set_channel(t_dst, t_src->tht_channel->ch_name);
|
||||
transport_map_channel(t_dst);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ file_input_init(void)
|
|||
t->tht_provider = strdup("HTS Tvheadend");
|
||||
t->tht_identifier = strdup(ch->ch_name);
|
||||
t->tht_file_input = fi;
|
||||
transport_set_channel(t, ch->ch_name);
|
||||
t->tht_servicename = strdup(ch->ch_name);
|
||||
transport_map_channel(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ iptv_probe_done(th_transport_t *t, int timeout)
|
|||
iptv_stop_feed(t);
|
||||
|
||||
if(!timeout)
|
||||
transport_set_channel(t, t->tht_channelname);
|
||||
transport_map_channel(t);
|
||||
else
|
||||
LIST_INSERT_HEAD(&iptv_stale_transports, t, tht_active_link);
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ sp_timeout(void *aux, int64_t now)
|
|||
|
||||
if(sp->sp_error == 0) {
|
||||
if(t->tht_channel == NULL && t->tht_servicename != NULL) {
|
||||
transport_set_channel(t, t->tht_servicename);
|
||||
transport_map_channel(t);
|
||||
t->tht_config_change(t);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -524,9 +524,9 @@ transport_add_stream(th_transport_t *t, int pid, tv_streamtype_t type)
|
|||
*
|
||||
*/
|
||||
void
|
||||
transport_set_channel(th_transport_t *t, const char *chname)
|
||||
transport_map_channel(th_transport_t *t)
|
||||
{
|
||||
th_channel_t *ch = channel_find(chname, 1, NULL);
|
||||
th_channel_t *ch = channel_find(t->tht_servicename, 1, NULL);
|
||||
|
||||
assert(t->tht_channel == NULL);
|
||||
|
||||
|
@ -543,7 +543,7 @@ transport_set_channel(th_transport_t *t, const char *chname)
|
|||
*
|
||||
*/
|
||||
void
|
||||
transport_unset_channel(th_transport_t *t)
|
||||
transport_unmap_channel(th_transport_t *t)
|
||||
{
|
||||
t->tht_channel = NULL;
|
||||
LIST_REMOVE(t, tht_channel_link);
|
||||
|
|
|
@ -32,9 +32,9 @@ th_transport_t *transport_create(const char *identifier, int type,
|
|||
|
||||
th_transport_t *transport_find_by_identifier(const char *identifier);
|
||||
|
||||
void transport_set_channel(th_transport_t *t, const char *name);
|
||||
void transport_map_channel(th_transport_t *t);
|
||||
|
||||
void transport_unset_channel(th_transport_t *t);
|
||||
void transport_unmap_channel(th_transport_t *t);
|
||||
|
||||
th_transport_t *transport_find(th_channel_t *ch, unsigned int weight);
|
||||
|
||||
|
|
4
v4l.c
4
v4l.c
|
@ -97,7 +97,9 @@ v4l_configure_transport(th_transport_t *t, const char *muxname,
|
|||
snprintf(buf, sizeof(buf), "analog_%u", t->tht_v4l_frequency);
|
||||
t->tht_identifier = strdup(buf);
|
||||
|
||||
transport_set_channel(t, channel_name);
|
||||
t->tht_servicename = strdup(channel_name);
|
||||
|
||||
transport_map_channel(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue