diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-01-06 14:44:27 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-01-06 14:44:27 +0100 |
commit | 4e15f6d658139fca773b76088bf1523839c20ffd (patch) | |
tree | 6d51dd4546800274eeddace2069fe08837186076 /libdtv | |
parent | 43b582a04d3b77c0f0f92284bdccbbad190f9d41 (diff) | |
download | vdr-4e15f6d658139fca773b76088bf1523839c20ffd.tar.gz vdr-4e15f6d658139fca773b76088bf1523839c20ffd.tar.bz2 |
Implemented 'Link Layer' based CAM support
Diffstat (limited to 'libdtv')
-rw-r--r-- | libdtv/libsi/include/libsi.h | 23 | ||||
-rw-r--r-- | libdtv/libsi/si_parser.c | 7 |
2 files changed, 29 insertions, 1 deletions
diff --git a/libdtv/libsi/include/libsi.h b/libdtv/libsi/include/libsi.h index 366387a3..8e9e2605 100644 --- a/libdtv/libsi/include/libsi.h +++ b/libdtv/libsi/include/libsi.h @@ -315,6 +315,29 @@ struct Descriptor { }; +/* ConditionalAccessDescriptor */ + +struct ConditionalAccessDescriptor { + struct NODE Node; + unsigned short Tag; + unsigned short Amount; /* Data */ + unsigned char *Data; +}; + +#define CreateConditionalAccessDescriptor(descr, amount, data) \ + do \ + { \ + unsigned char *tmpptr; \ + \ + xMemAlloc (amount, &tmpptr); \ + memcpy (tmpptr, data, amount); \ + xCreateNode (((struct ConditionalAccessDescriptor *)descr), NULL); \ + ((struct ConditionalAccessDescriptor *)descr)->Tag = DESCR_CA; \ + ((struct ConditionalAccessDescriptor *)descr)->Amount = amount; \ + ((struct ConditionalAccessDescriptor *)descr)->Data = tmpptr; \ + } while (0) + + /* Iso639LanguageDescriptor */ struct Iso639LanguageDescriptor { diff --git a/libdtv/libsi/si_parser.c b/libdtv/libsi/si_parser.c index be0d2549..ccca6e5e 100644 --- a/libdtv/libsi/si_parser.c +++ b/libdtv/libsi/si_parser.c @@ -705,6 +705,12 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer) HILO (CastTimeShiftedEventDescriptor(Ptr)->reference_event_id)); break; + case DESCR_CA: + CreateConditionalAccessDescriptor (Descriptor, + *(Ptr + 1) + 2, // we'll need the entire raw data! + Ptr); + break; + case DESCR_ISO_639_LANGUAGE: CreateIso639LanguageDescriptor (Descriptor, CastIso639LanguageDescriptor(Buffer)->lang_code1, @@ -790,7 +796,6 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer) case DESCR_DATA_STREAM_ALIGN: case DESCR_TARGET_BACKGRID: case DESCR_VIDEO_WINDOW: - case DESCR_CA: case DESCR_SYSTEM_CLOCK: case DESCR_MULTIPLEX_BUFFER_UTIL: case DESCR_COPYRIGHT: |