summaryrefslogtreecommitdiff
path: root/dish.c
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2011-10-29 12:54:47 +0200
committerDimitar Petrovski <dimeptr@gmail.com>2011-10-29 12:54:47 +0200
commite593a990f708d73ca5c1ad7636e39662722bcf05 (patch)
tree411500a6c33d56932b5478d875d63e27a63b9fb2 /dish.c
parent726d99a3ed5c12242e0e3c6416b3175c18dbedfd (diff)
parentb4da1b8b6dfec941cb97cc14c7fc14040a7695ff (diff)
downloadvdr-plugin-eepg-e593a990f708d73ca5c1ad7636e39662722bcf05.tar.gz
vdr-plugin-eepg-e593a990f708d73ca5c1ad7636e39662722bcf05.tar.bz2
Merge branch 'test-naepg2' into eit_test
use Tid to resolve conflicts with VDR
Diffstat (limited to 'dish.c')
-rw-r--r--dish.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/dish.c b/dish.c
index 021ac72..662e170 100644
--- a/dish.c
+++ b/dish.c
@@ -12,7 +12,7 @@
#include "dish.h"
#include <libsi/si.h>
-#include <libsi/descriptor.h>
+//#include <libsi/descriptor.h>
#include <string.h>
#include <string>
#include <stdlib.h>
@@ -22,23 +22,24 @@ namespace SI
{
// returns the value of a sequence of bits in the byte array
- static unsigned int getBits(int bitIndex, int bitCount, const unsigned char *byteptr, int length)
- {
- union {
- unsigned char b[4];
- unsigned long val;
- } chunk;
-
- int offset = bitIndex >> 3;
- int bitnum = bitIndex - (offset << 3);
- int rightend = 32 - bitnum - bitCount;
-
- chunk.b[3] = byteptr[offset];
- chunk.b[2] = (offset+1 < length) ? byteptr[offset+1] : 0;
- chunk.b[1] = (offset+2 < length) ? byteptr[offset+2] : 0;
- chunk.b[0] = 0; // Never need to look this far ahead.
-
- return (unsigned int)(((chunk.val & (0xFFFFFFFF >> bitnum)) >> rightend));
+ static unsigned int getBits(int bitIndex, int bitCount, const unsigned char *byteptr,
+ int length) {
+ union
+ {
+ unsigned char b[4];
+ unsigned long val;
+ } chunk;
+
+ int offset = bitIndex >> 3;
+ int bitnum = bitIndex - (offset << 3);
+ int rightend = 32 - bitnum - bitCount;
+
+ chunk.b[3] = byteptr[offset];
+ chunk.b[2] = (offset + 1 < length) ? byteptr[offset + 1] : 0;
+ chunk.b[1] = (offset + 2 < length) ? byteptr[offset + 2] : 0;
+ chunk.b[0] = 0; // Never need to look this far ahead.
+
+ return (unsigned int) ((((((chunk.val & (0xFFFFFFFF >> bitnum)) >> rightend)))));
}
DishDescriptor::DishDescriptor()
@@ -108,7 +109,7 @@ namespace SI
const char *DishDescriptor::getCategory()
{
- using namespace DISH_CATEGORIES;
+ using namespace DISH_CATEGORIES;
switch (DishCategory) {
case Action: return "Action";
@@ -478,7 +479,6 @@ namespace SI
return decompressed;
}
-
struct DishDescriptor::HuffmanTable DishDescriptor::Table128[SIZE_TABLE_128] = {
{ 0x0000, 0x20, 0x03 }, { 0x0100, 0x65, 0x04 }, { 0x0180, 0x74, 0x04 },
{ 0x0200, 0x61, 0x04 }, { 0x0280, 0x6F, 0x04 }, { 0x0300, 0x73, 0x04 },
@@ -613,4 +613,4 @@ struct DishDescriptor::HuffmanTable DishDescriptor::Table255[SIZE_TABLE_255] = {
{ 0x1FFD, 0x02, 0x0D }, { 0x1FFE, 0x01, 0x0D }, { 0x1FFF, 0x00, 0x0D }
};
-} //end of namespace
+} //end of namespace