Allow TS output to get raw data directly from TS inputs
This commit is contained in:
parent
268f5f028c
commit
8692b68a43
2 changed files with 12 additions and 0 deletions
|
@ -98,6 +98,7 @@ void
|
|||
ts_recv_packet(th_transport_t *t, int pid, uint8_t *tsb)
|
||||
{
|
||||
th_stream_t *st = NULL;
|
||||
th_subscription_t *s;
|
||||
int cc, err = 0, afc, afl = 0;
|
||||
int len, pusi;
|
||||
|
||||
|
@ -108,6 +109,10 @@ ts_recv_packet(th_transport_t *t, int pid, uint8_t *tsb)
|
|||
if(st == NULL)
|
||||
return;
|
||||
|
||||
LIST_FOREACH(s, &t->tht_subscriptions, ths_transport_link)
|
||||
if(s->ths_raw_input != NULL)
|
||||
s->ths_raw_input(s, tsb, 188, st, s->ths_opaque);
|
||||
|
||||
avgstat_add(&t->tht_rate, 188, dispatch_clock);
|
||||
|
||||
afc = (tsb[3] >> 4) & 3;
|
||||
|
|
7
tvhead.h
7
tvhead.h
|
@ -614,6 +614,11 @@ typedef void (subscription_callback_t)(struct th_subscription *s,
|
|||
subscription_event_t event,
|
||||
void *opaque);
|
||||
|
||||
typedef void (subscription_raw_input_t)(struct th_subscription *s,
|
||||
void *data, int len,
|
||||
th_stream_t *st,
|
||||
void *opaque);
|
||||
|
||||
typedef struct th_subscription {
|
||||
LIST_ENTRY(th_subscription) ths_global_link;
|
||||
int ths_weight;
|
||||
|
@ -635,6 +640,8 @@ typedef struct th_subscription {
|
|||
subscription_callback_t *ths_callback;
|
||||
void *ths_opaque;
|
||||
|
||||
subscription_raw_input_t *ths_raw_input;
|
||||
|
||||
} th_subscription_t;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue