descrambler: add descrambler_ca_section function
This commit is contained in:
parent
8f13641d57
commit
78f6b5a23d
3 changed files with 15 additions and 6 deletions
|
@ -20,6 +20,7 @@
|
|||
#define __TVH_DESCRAMBLER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include "queue.h"
|
||||
|
||||
struct service;
|
||||
|
@ -89,6 +90,8 @@ void descrambler_service_stop ( struct service *t );
|
|||
int descrambler_descramble ( struct service *t,
|
||||
struct elementary_stream *st,
|
||||
const uint8_t *tsb );
|
||||
void descrambler_ca_section ( struct elementary_stream *st,
|
||||
const uint8_t *data, size_t len );
|
||||
const char *descrambler_caid2name( uint16_t caid );
|
||||
uint16_t descrambler_name2caid ( const char *str );
|
||||
card_type_t detect_card_type ( const uint16_t caid );
|
||||
|
|
|
@ -145,7 +145,7 @@ descrambler_service_stop ( service_t *t )
|
|||
|
||||
int
|
||||
descrambler_descramble ( service_t *t,
|
||||
struct elementary_stream *st,
|
||||
elementary_stream_t *st,
|
||||
const uint8_t *tsb )
|
||||
{
|
||||
th_descrambler_t *td;
|
||||
|
@ -167,6 +167,16 @@ descrambler_descramble ( service_t *t,
|
|||
return count == failed ? -1 : 0;
|
||||
}
|
||||
|
||||
void
|
||||
descrambler_ca_section( elementary_stream_t *st,
|
||||
const uint8_t *data, size_t len )
|
||||
{
|
||||
th_descrambler_t *td;
|
||||
|
||||
LIST_FOREACH(td, &st->es_service->s_descramblers, td_service_link)
|
||||
td->td_table(td, st, data, len);
|
||||
}
|
||||
|
||||
// TODO: might actually put const char* into caid_t
|
||||
const char *
|
||||
descrambler_caid2name(uint16_t caid)
|
||||
|
|
|
@ -50,13 +50,9 @@ static void ts_remux(mpegts_service_t *t, const uint8_t *tsb);
|
|||
static void
|
||||
got_ca_section(const uint8_t *data, size_t len, void *opaque)
|
||||
{
|
||||
th_descrambler_t *td;
|
||||
elementary_stream_t *st = opaque;
|
||||
assert(st->es_service->s_source_type == S_MPEG_TS);
|
||||
mpegts_service_t *t = (mpegts_service_t*)st->es_service;
|
||||
|
||||
LIST_FOREACH(td, &t->s_descramblers, td_service_link)
|
||||
td->td_table(td, st, data, len);
|
||||
descrambler_ca_section(st, data, len);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue