diff --git a/HISTORY b/HISTORY index 2f04de7..7efb36f 100644 --- a/HISTORY +++ b/HISTORY @@ -415,7 +415,7 @@ VDR Plugin 'femon' Revision History - Updated for vdr-1.7.18. - Added scaling for symbols. -2011-xx-xx: Version 1.7.11 +2011-12-04: Version 1.7.11 - Updated for vdr-1.7.22: New API functions for signal strength and quality used to provide information for the OSD. diff --git a/femon.c b/femon.c index 7553c5f..ad6ec64 100644 --- a/femon.c +++ b/femon.c @@ -14,8 +14,8 @@ #include "femonservice.h" #include "femontools.h" -#if defined(APIVERSNUM) && APIVERSNUM < 10719 -#error "VDR-1.7.19 API version or greater is required!" +#if defined(APIVERSNUM) && APIVERSNUM < 10722 +#error "VDR-1.7.22 API version or greater is required!" #endif static const char VERSION[] = "1.7.11"; diff --git a/femonosd.c b/femonosd.c index debff05..932bef3 100644 --- a/femonosd.c +++ b/femonosd.c @@ -851,7 +851,7 @@ eOSState cFemonOsd::ProcessKey(eKeys Key) { eOSState state = cOsdObject::ProcessKey(Key); if (state == osUnknown) { - switch (Key) { + switch (int(Key)) { case k0: if ((m_Number == 0) && (m_OldNumber != 0)) { m_Number = m_OldNumber; diff --git a/femontools.c b/femontools.c index 70f7fc2..4d2ee9f 100644 --- a/femontools.c +++ b/femontools.c @@ -544,45 +544,6 @@ cString getBitrateKbits(double value) // --- cFemonBitStream ------------------------------------------------------- -int cFemonBitStream::GetBit(void) -{ - if (index >= length) - return 1; - int r = (data[index >> 3] >> (7 - (index & 7))) & 1; - ++index; - return r; -} - -uint32_t cFemonBitStream::GetBits(int n) -{ - uint32_t r = 0; - while (n--) - r |= GetBit() << n; - return r; -} - -void cFemonBitStream::ByteAlign(void) -{ - int n = index % 8; - if (n > 0) - SkipBits(8 - n); -} - -void cFemonBitStream::WordAlign(void) -{ - int n = index % 16; - if (n > 0) - SkipBits(16 - n); -} - -bool cFemonBitStream::SetLength(int Length) -{ - if (Length > length) - return false; - length = Length; - return true; -} - uint32_t cFemonBitStream::GetUeGolomb() { int n = 0; diff --git a/femontools.h b/femontools.h index d063f34..f027938 100644 --- a/femontools.h +++ b/femontools.h @@ -71,27 +71,9 @@ cString getVideoBitrate(double value, double stream); cString getBitrateMbits(double value); cString getBitrateKbits(double value); -class cFemonBitStream { -private: - const uint8_t *data; - int length; // in bits - int index; // in bits +class cFemonBitStream : public cBitStream { public: - cFemonBitStream(const uint8_t *Data, int Length) : data(Data), length(Length), index(0) {} - ~cFemonBitStream() {} - int GetBit(void); - uint32_t GetBits(int n); - void ByteAlign(void); - void WordAlign(void); - bool SetLength(int Length); - void SkipBits(int n) { index += n; } - void SkipBit(void) { SkipBits(1); } - bool IsEOF(void) const { return index >= length; } - void Reset(void) { index = 0; } - int Length(void) const { return length; } - int Index(void) const { return (IsEOF() ? length : index); } - const uint8_t *GetData(void) const { return (IsEOF() ? NULL : data + (index / 8)); } - + cFemonBitStream(const uint8_t *Data, const int Length) : cBitStream(Data, Length) {} uint32_t GetUeGolomb(); int32_t GetSeGolomb(); void SkipGolomb();