From 7ee255830a93478f436d5da0fa0b53538f6aaee5 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Wed, 25 Jan 2006 04:20:00 +0200 Subject: [PATCH] Updated for vdr-1.3.40. Fixed a translation bug (Thanks to Antti Hartikainen). Fixed AC3 header parsing bug (Thanks to Axel Katzur for reporting this one). Fixed EgalsTry theme (Thanks to Uwe Hanke). --- HISTORY | 7 +++++ femon.c | 2 +- femon.h | 2 +- femoncfg.c | 5 ++-- femoni18n.c | 4 +-- femonosd.c | 2 +- femonreceiver.c | 75 +++++++++++++++++++++++++++++++++++++++++-------- 7 files changed, 78 insertions(+), 19 deletions(-) diff --git a/HISTORY b/HISTORY index 8a7746b..2e9c8ca 100644 --- a/HISTORY +++ b/HISTORY @@ -194,3 +194,10 @@ VDR Plugin 'femon' Revision History - Added "Duotone" theme for 2bpp on screen displays. - Fixed crash bug in femonreceiver. - Fixed setup page bug (Thanks to Thomas Günther for reporting this one). + +2006-01-25: Version 0.9.6 + +- Updated for vdr-1.3.40. +- Fixed a translation bug (Thanks to Antti Hartikainen). +- Fixed AC3 header parsing bug (Thanks to Axel Katzur for reporting this one). +- Fixed EgalsTry theme (Thanks to Uwe Hanke). diff --git a/femon.c b/femon.c index 535b6b4..631d13d 100644 --- a/femon.c +++ b/femon.c @@ -15,7 +15,7 @@ #include "femontools.h" #include "femon.h" -#if defined(VDRVERSNUM) && VDRVERSNUM < 10336 +#if defined(VDRVERSNUM) && VDRVERSNUM < 10340 #error "You don't exist! Go away! Upgrade yourself!" #endif diff --git a/femon.h b/femon.h index 257dbca..cdc54e3 100644 --- a/femon.h +++ b/femon.h @@ -11,7 +11,7 @@ #include -static const char *VERSION = "0.9.5"; +static const char *VERSION = "0.9.6"; static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)"; static const char *MAINMENUENTRY = "Signal Information"; diff --git a/femoncfg.c b/femoncfg.c index 70b3962..15a793f 100644 --- a/femoncfg.c +++ b/femoncfg.c @@ -96,6 +96,7 @@ const cFemonTheme femonTheme[eFemonThemeMaxNumber] = }, { // eFemonThemeEgalsTry + 4, // bpp 0xCA2B1B9E, // clrBackground 0xDFBEBAC3, // clrTitleBackground 0xFF280249, // clrTitleText @@ -110,8 +111,8 @@ const cFemonTheme femonTheme[eFemonThemeMaxNumber] = 2, // bpp 0x7F000000, // clrBackground 0xFFFCFCFC, // clrTitleBackground - 0x7F000000, // clrTitleText - 0xFFFCFCFC, // clrActiveText + 0x7F000000, // clrTitleText + 0xFFFCFCFC, // clrActiveText 0xFFFCFCFC, // clrInactiveText 0xFFFC1414, // clrRed 0xFFFCFCFC, // clrYellow diff --git a/femoni18n.c b/femoni18n.c index 186cec7..8584ffc 100644 --- a/femoni18n.c +++ b/femoni18n.c @@ -576,7 +576,7 @@ const tI18nPhrase Phrases[] = { "Kaablikaart", // Eesti "", // Dansk }, - { "Terrestial Card", // English + { "Terrestrial Card", // English "Terrestrische Karte", // Deutsch "", // Slovenski "Scheda terrestre", // Italiano @@ -584,7 +584,7 @@ const tI18nPhrase Phrases[] = { "", // Português "Carte TNT", // Français "", // Norsk - "Terrestiaalikortti", // suomi + "Terrestriaalikortti", // suomi "", // Polski "", // Español "", // ĊëëçíéêÜ (Greek) diff --git a/femonosd.c b/femonosd.c index 13d3052..23c287c 100644 --- a/femonosd.c +++ b/femonosd.c @@ -594,7 +594,7 @@ void cFemonOsd::DrawInfoWindow(void) break; default: - snprintf(buf, sizeof(buf), "%s #%d - %s", tr("Terrestial Card"), cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name); + snprintf(buf, sizeof(buf), "%s #%d - %s", tr("Terrestrial Card"), cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name); m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); offset += OSDROWHEIGHT; m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Frequency"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); diff --git a/femonreceiver.c b/femonreceiver.c index 028368c..42d948f 100644 --- a/femonreceiver.c +++ b/femonreceiver.c @@ -230,20 +230,71 @@ void cFemonReceiver::GetAC3Info(uint8_t *mbuf, int count) m_AC3FrameSize <<= 1; m_AC3BitStreamMode = (headr[3] & 7); m_AC3AudioCodingMode = (headr[4] & 0xE0) >> 5; - if ((m_AC3AudioCodingMode & 0x01) && (m_AC3AudioCodingMode != 0x01)) // if 3 front channels + if ((m_AC3AudioCodingMode & 0x01) && (m_AC3AudioCodingMode != 0x01)) { + // 3 front channels m_AC3CenterMixLevel = (headr[4] & 0x18) >> 3; - else + if (m_AC3AudioCodingMode & 0x04) { + // a surround channel exists + m_AC3SurroundMixLevel = (headr[4] & 0x06) >> 1; + if (m_AC3AudioCodingMode == 0x02) { + // if in 2/0 mode + m_AC3DolbySurroundMode = ((headr[4] & 0x01) << 1) | ((headr[5] & 0x80) >> 7); + m_AC3LfeOn = (headr[5] & 0x40) >> 6; + m_AC3DialogLevel = (headr[5] & 0x3e) >> 1; + } + else { + m_AC3DolbySurroundMode = FR_NOTVALID; + m_AC3LfeOn = (headr[4] & 0x01); + m_AC3DialogLevel = (headr[5] & 0xF8) >> 3; + } + } + else { + m_AC3SurroundMixLevel = FR_NOTVALID; + if (m_AC3AudioCodingMode == 0x02) { + // if in 2/0 mode + m_AC3DolbySurroundMode = (headr[4] & 0x06) >> 1; + m_AC3LfeOn = (headr[4] & 0x01); + m_AC3DialogLevel = (headr[5] & 0xF8) >> 3; + } + else { + m_AC3DolbySurroundMode = FR_NOTVALID; + m_AC3LfeOn = (headr[4] & 0x04) >> 2; + m_AC3DialogLevel = (headr[4] & 0x03) << 3 | ((headr[5] & 0xE0) >> 5); + } + } + } + else { m_AC3CenterMixLevel = FR_NOTVALID; - if (m_AC3AudioCodingMode & 0x04) // if a surround channel exists - m_AC3SurroundMixLevel = (headr[4] & 0x06) >> 1; - else - m_AC3SurroundMixLevel = FR_NOTVALID; - if (m_AC3AudioCodingMode == 0x02) // if in 2/0 mode - m_AC3DolbySurroundMode = ((headr[4] & 1) << 1) | ((headr[5] & 0x80) >> 7); - else - m_AC3DolbySurroundMode = FR_NOTVALID; - m_AC3LfeOn = (headr[5] & 0x40) >> 6; - m_AC3DialogLevel = (headr[5] & 0x3e) >> 1; + if (m_AC3AudioCodingMode & 0x04) { + // a surround channel exists + m_AC3SurroundMixLevel = (headr[4] & 0x18) >> 3; + if (m_AC3AudioCodingMode == 0x02) { + // if in 2/0 mode + m_AC3DolbySurroundMode = (headr[4] & 0x06) >> 1; + m_AC3LfeOn = (headr[4] & 0x01); + m_AC3DialogLevel = (headr[5] & 0xF8) >> 3; + } + else { + m_AC3DolbySurroundMode = FR_NOTVALID; + m_AC3LfeOn = (headr[4] & 0x04) >> 2; + m_AC3DialogLevel = (headr[4] & 0x03) << 3 | ((headr[5] & 0xE0) >> 5); + } + } + else { + m_AC3SurroundMixLevel = FR_NOTVALID; + if (m_AC3AudioCodingMode == 0x02) { + // if in 2/0 mode + m_AC3DolbySurroundMode = (headr[4] & 0x18) >> 3; + m_AC3LfeOn = (headr[4] & 0x04) >> 2; + m_AC3DialogLevel = (headr[4] & 0x03) << 3 | ((headr[5] & 0xE0) >> 5); + } + else { + m_AC3DolbySurroundMode = FR_NOTVALID; + m_AC3LfeOn = (headr[4] & 0x10) >> 4; + m_AC3DialogLevel = ((headr[4] & 0x0F) << 1) | ((headr[5] & 0x80) >> 7); + } + } + } } void cFemonReceiver::Activate(bool On)