From: Andreas Ă–man Date: Fri, 7 Dec 2007 08:47:59 +0000 (+0000) Subject: Add function for moving a transport from one channel to another X-Git-Tag: 2.12~1293 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d9848659cd3bc663eeb4c73134cf67efe481fd9;p=thirdparty%2Ftvheadend.git Add function for moving a transport from one channel to another --- diff --git a/transports.c b/transports.c index 9079627d1..48da64717 100644 --- a/transports.c +++ b/transports.c @@ -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); +} diff --git a/transports.h b/transports.h index b32ce7585..246bd31b8 100644 --- a/transports.h +++ b/transports.h @@ -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 */