keep track of muxer used for each subscription
This commit is contained in:
parent
e9167436c0
commit
237616ef96
6 changed files with 11 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
2
rtsp.c
|
@ -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;
|
||||
}
|
||||
|
|
6
tsmux.c
6
tsmux.c
|
@ -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);
|
||||
|
|
2
tsmux.h
2
tsmux.h
|
@ -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);
|
||||
|
||||
|
|
2
tvhead.h
2
tvhead.h
|
@ -645,6 +645,8 @@ typedef struct th_subscription {
|
|||
|
||||
subscription_raw_input_t *ths_raw_input;
|
||||
|
||||
th_muxer_t *ths_muxer;
|
||||
|
||||
} th_subscription_t;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue