Add function for moving a transport from one channel to another

This commit is contained in:
Andreas Öman 2007-12-07 08:47:59 +00:00
parent b936b4d62e
commit 9d9848659c
2 changed files with 14 additions and 0 deletions

View 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);
}

View 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 */