]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Add function for moving a transport from one channel to another
authorAndreas Öman <andreas@lonelycoder.com>
Fri, 7 Dec 2007 08:47:59 +0000 (08:47 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Fri, 7 Dec 2007 08:47:59 +0000 (08:47 +0000)
transports.c
transports.h

index 9079627d14c4f13af197b9f42506424cc0bc7aa0..48da64717ee3780adeff467af969874f84565e97 100644 (file)
@@ -438,3 +438,15 @@ transport_set_priority(th_transport_t *t, int prio)
   t->tht_prio = prio;
   LIST_INSERT_SORTED(&ch->ch_transports, t, tht_channel_link, transportcmp);
 }
+
+
+/**
+ *
+ */
+void
+transport_move(th_transport_t *t, th_channel_t *ch)
+{
+  LIST_REMOVE(t, tht_channel_link);
+  t->tht_channel = ch;
+  LIST_INSERT_SORTED(&ch->ch_transports, t, tht_channel_link, transportcmp);
+}
index b32ce7585a74fb739e2fdf9b95dbe83f1dce5c6c..246bd31b877534931cfdfd40053cb68cd8b45b5f 100644 (file)
@@ -38,4 +38,6 @@ th_stream_t *transport_add_stream(th_transport_t *t, int pid,
 
 void transport_set_priority(th_transport_t *t, int prio);
 
+void transport_move(th_transport_t *t, th_channel_t *ch);
+
 #endif /* TRANSPORTS_H */