keep track of muxer used for each subscription

This commit is contained in:
Andreas Öman 2007-11-21 16:39:33 +00:00
parent e9167436c0
commit 237616ef96
6 changed files with 11 additions and 5 deletions

View file

@ -433,7 +433,7 @@ client_subscription_callback(struct th_subscription *s,
case TRANSPORT_UNAVAILABLE:
assert(c->c_muxer != NULL);
ts_muxer_deinit(c->c_muxer);
ts_muxer_deinit(c->c_muxer, s);
c->c_muxer = NULL;
break;
}

View file

@ -75,7 +75,7 @@ iptv_subscription_callback(struct th_subscription *s,
break;
case TRANSPORT_UNAVAILABLE:
ts_muxer_deinit(om->om_muxer);
ts_muxer_deinit(om->om_muxer, s);
om->om_muxer = NULL;
break;
}

2
rtsp.c
View file

@ -124,7 +124,7 @@ rtsp_subscription_callback(struct th_subscription *s,
case TRANSPORT_UNAVAILABLE:
assert(rs->rs_muxer != NULL);
ts_muxer_deinit(rs->rs_muxer);
ts_muxer_deinit(rs->rs_muxer, s);
rs->rs_muxer = NULL;
break;
}

View file

@ -811,6 +811,8 @@ ts_muxer_init(th_subscription_t *s, th_mux_output_t *cb, void *opaque,
tm->tm_pat = tm_create_meta_stream(tm, 0);
tm->tm_pmt = tm_create_meta_stream(tm, 100);
s->ths_muxer = tm;
return tm;
}
@ -835,10 +837,12 @@ tms_destroy(th_muxstream_t *tms)
*
*/
void
ts_muxer_deinit(th_muxer_t *tm)
ts_muxer_deinit(th_muxer_t *tm, th_subscription_t *s)
{
th_muxstream_t *tms;
s->ths_muxer = NULL;
LIST_REMOVE(tm, tm_transport_link);
dtimer_disarm(&tm->tm_timer);

View file

@ -22,7 +22,7 @@
th_muxer_t *ts_muxer_init(th_subscription_t *s, th_mux_output_t *cb,
void *opaque, int flags);
void ts_muxer_deinit(th_muxer_t *tm);
void ts_muxer_deinit(th_muxer_t *tm, th_subscription_t *s);
void ts_muxer_play(th_muxer_t *tm, int64_t toffset);

View file

@ -645,6 +645,8 @@ typedef struct th_subscription {
subscription_raw_input_t *ths_raw_input;
th_muxer_t *ths_muxer;
} th_subscription_t;