diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2011-10-13 20:40:14 +0200 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2011-10-13 20:40:14 +0200 |
commit | 8bab540df87c3f38369c772fd956f85cd655cf6e (patch) | |
tree | 85141a4610957994d77076bb8aba748aa3b03a66 | |
parent | cb5620b02a6cacbb38096e23f57e929bf07b722c (diff) | |
download | vdr-plugin-eepg-8bab540df87c3f38369c772fd956f85cd655cf6e.tar.gz vdr-plugin-eepg-8bab540df87c3f38369c772fd956f85cd655cf6e.tar.bz2 |
test merge branches
-rw-r--r-- | dish.c | 10 | ||||
-rw-r--r-- | dish.h | 7 | ||||
-rw-r--r-- | eepg.c | 12 |
3 files changed, 12 insertions, 17 deletions
@@ -39,19 +39,17 @@ namespace SI return (unsigned int)(((chunk.val & (0xFFFFFFFF >> bitnum)) >> rightend)); } - DishDescriptor::DishDescriptor(UnimplementedDescriptor *unimplementedDesc) + DishDescriptor::DishDescriptor() { text = NULL; shortText = NULL; decompressed = NULL; - this->unimplementedDesc = unimplementedDesc; } DishDescriptor::~DishDescriptor() { delete [] decompressed; decompressed = NULL; - delete unimplementedDesc; } const char *DishDescriptor::getTheme(int contentNibleLvl2) @@ -256,10 +254,10 @@ namespace SI } - void DishDescriptor::Decompress(unsigned char Tid) + void DishDescriptor::Decompress(unsigned char Tid, CharArray data) { - const unsigned char *str = unimplementedDesc->getData().getData(); - const unsigned char *cmp = NULL; // Compressed data + const unsigned char *str = data.getData(); + const unsigned char *cmp = NULL; int length = 0; // Length of compressed data unsigned int dLength = 0; // Length of decompressed data if((str[3] & 0xFC) == 0x80){ @@ -10,6 +10,8 @@ #ifndef LIBSI_DISH_H #define LIBSI_DISH_H +#include <vdr/tools.h> + namespace SI { @@ -243,7 +245,7 @@ class UnimplementedDescriptor; class DishDescriptor { public: - DishDescriptor(UnimplementedDescriptor*); + DishDescriptor(); virtual ~DishDescriptor(); const char* getText(void) const { return text; } @@ -251,12 +253,11 @@ public: const char* getTheme(int contentNibleLvl2); const char* getCategory(int userNible); // Decompress the byte arrary and stores the result to a text string - void Decompress(unsigned char Tid); + void Decompress(unsigned char Tid, CharArray data); protected: const char* text; // name or description of the event const char* shortText; // usually the episode name unsigned char* decompressed; - UnimplementedDescriptor* unimplementedDesc; struct HuffmanTable { unsigned int startingAddress; @@ -3190,21 +3190,17 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat } break; case SI::DishExtendedEventDescriptorTag: { - SI::DishDescriptor *deed = new SI::DishDescriptor((SI::UnimplementedDescriptor *)d); - deed->Decompress(Tid); if (!DishExtendedEventDescriptor) { - DishExtendedEventDescriptor = deed; - d = NULL; // so that it is not deleted + DishExtendedEventDescriptor = new SI::DishDescriptor(); + DishExtendedEventDescriptor->Decompress(Tid, d->getData()); } HasExternalData = true; } break; case SI::DishShortEventDescriptorTag: { - SI::DishDescriptor *dsed = new SI::DishDescriptor((SI::UnimplementedDescriptor *)d); - dsed->Decompress(Tid); if (!DishShortEventDescriptor) { - DishShortEventDescriptor = dsed; - d = NULL; // so that it is not deleted + DishShortEventDescriptor = new SI::DishDescriptor(); + DishShortEventDescriptor->Decompress(Tid, d->getData()); } HasExternalData = true; } |