]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Remove 'channelname' from map function call
authorAndreas Öman <andreas@lonelycoder.com>
Fri, 2 May 2008 19:29:14 +0000 (19:29 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Fri, 2 May 2008 19:29:14 +0000 (19:29 +0000)
ajaxui/ajaxui_config_transport.c
avgen.c
dvb.c
file_input.c
iptv_input.c
serviceprobe.c
transports.c
transports.h
v4l.c

index 13bb54bfa3c2512b1e056796268f5d43522a61af..2460d4e15a2305f4b3eb21206b39a565dab58490 100644 (file)
@@ -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);
 
diff --git a/avgen.c b/avgen.c
index 6b71702b888ab8bde711ceb6c9b01edc94a7631c..c69d21ca2751b84fe2addf82286213ac2ed1454d 100644 (file)
--- a/avgen.c
+++ b/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);
 }
 
 
diff --git a/dvb.c b/dvb.c
index c6479af3e59f6661335116dd86b59038d100bd08..0cd9baeed1c0e298975274addf3e277bd84e6137 100644 (file)
--- a/dvb.c
+++ b/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);
 
       
 
index 6694e9bcd0c1d0a005d9eaa469448e88b3e0511f..9adfc76945224768ddc38e37693485cdd4fb33a0 100644 (file)
@@ -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);
   }
 }
 
index e87a8a13acb63910144d1f2145a388ae583f0da4..56aafc3d243f47f642506410ead91ce8f20b6d6a 100644 (file)
@@ -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);
 
index eb4b02a7776c3b822d3362fd85e23102d6856b0f..8e7262caf7fb54fd7027a13d76ff164886c10e6d 100644 (file)
@@ -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);
     }
   }
index 6ad321100aa5e5e2a579c133810287817ff4ac97..9b70ee8d83057c269b92eea57e2b02dcb08887f7 100644 (file)
@@ -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);
index 4c750c4900437b96d7b559b83f455b58cfa77b24..5867a621191b15b5bd5c63e059209418503dc893 100644 (file)
@@ -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);
 
diff --git a/v4l.c b/v4l.c
index 09b839807e1ea1998456d9973fc60534466563c1..88420fb6cd9be8c29a40d0a6a2c94e2bb42c96c2 100644 (file)
--- a/v4l.c
+++ b/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;
 }