From 66eca7f8b5dfe42803a09b8ed72cda6da387a921 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Mon, 12 Mar 2012 21:59:34 +0200 Subject: [PATCH] Fixed channel switching. Cleaned up compilation warnings. --- HISTORY | 5 +++++ femon.c | 2 +- femonaac.c | 2 +- femonaac.h | 2 +- femonac3.c | 6 +++--- femonac3.h | 6 +++--- femoncfg.h | 18 +++++++++--------- femonlatm.c | 4 ++-- femonlatm.h | 4 ++-- femonmpeg.c | 4 ++-- femonmpeg.h | 6 +++--- femonosd.c | 2 +- po/de_DE.po | 2 +- po/es_ES.po | 2 +- po/et_EE.po | 2 +- po/fi_FI.po | 2 +- po/fr_FR.po | 2 +- po/hu_HU.po | 2 +- po/it_IT.po | 2 +- po/lt_LT.po | 2 +- po/ru_RU.po | 2 +- po/zh_CN.po | 2 +- po/zh_TW.po | 2 +- 23 files changed, 44 insertions(+), 39 deletions(-) diff --git a/HISTORY b/HISTORY index 0451b72..5b92fbd 100644 --- a/HISTORY +++ b/HISTORY @@ -436,3 +436,8 @@ VDR Plugin 'femon' Revision History 2012-03-10: Version 1.7.14 - Updated for vdr-1.7.26. + +2012-03-12: Version 1.7.15 + +- Cleaned up compilation warnings. +- Fixed channel switching. diff --git a/femon.c b/femon.c index b46e2ef..03410ae 100644 --- a/femon.c +++ b/femon.c @@ -22,7 +22,7 @@ #define GITVERSION "" #endif -static const char VERSION[] = "1.7.14" GITVERSION; +static const char VERSION[] = "1.7.15" GITVERSION; static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)"); static const char MAINMENUENTRY[] = trNOOP("Signal Information"); diff --git a/femonaac.c b/femonaac.c index d0448a6..a96b745 100644 --- a/femonaac.c +++ b/femonaac.c @@ -10,7 +10,7 @@ #define IS_HEAAC_AUDIO(buf) (((buf)[0] == 0xFF) && (((buf)[1] & 0xF6) == 0xF0)) -unsigned int cFemonAAC::s_Samplerates[16] = +int cFemonAAC::s_Samplerates[16] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, -1, -1, -1, -1 }; diff --git a/femonaac.h b/femonaac.h index 52b5c7e..f517f1d 100644 --- a/femonaac.h +++ b/femonaac.h @@ -14,7 +14,7 @@ class cFemonAAC { private: cFemonAudioIf *m_AudioHandler; - static unsigned int s_Samplerates[16]; + static int s_Samplerates[16]; public: cFemonAAC(cFemonAudioIf *audiohandler); diff --git a/femonac3.c b/femonac3.c index 1ebe18e..087e071 100644 --- a/femonac3.c +++ b/femonac3.c @@ -9,17 +9,17 @@ #include "femontools.h" #include "femonac3.h" -unsigned int cFemonAC3::s_Bitrates[32] = +int cFemonAC3::s_Bitrates[32] = { 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -unsigned int cFemonAC3::s_Frequencies[4] = +int cFemonAC3::s_Frequencies[4] = { 480, 441, 320, 0 }; -unsigned int cFemonAC3::s_Frames[3][32] = +int cFemonAC3::s_Frames[3][32] = { {64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896, 1024, 1152, 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {69, 87, 104, 121, 139, 174, 208, 243, 278, 348, 417, 487, 557, 696, 835, 975, 1114, 1253, 1393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, diff --git a/femonac3.h b/femonac3.h index ae3744b..22f2fbc 100644 --- a/femonac3.h +++ b/femonac3.h @@ -14,9 +14,9 @@ class cFemonAC3 { private: cFemonAC3If *m_AudioHandler; - static unsigned int s_Bitrates[32]; - static unsigned int s_Frequencies[4]; - static unsigned int s_Frames[3][32]; + static int s_Bitrates[32]; + static int s_Frequencies[4]; + static int s_Frames[3][32]; public: cFemonAC3(cFemonAC3If *audiohandler); diff --git a/femoncfg.h b/femoncfg.h index c8c7f59..a12a794 100644 --- a/femoncfg.h +++ b/femoncfg.h @@ -64,15 +64,15 @@ enum eFemonThemes struct cFemonTheme { - int bpp; - int clrBackground; - int clrTitleBackground; - int clrTitleText; - int clrActiveText; - int clrInactiveText; - int clrRed; - int clrYellow; - int clrGreen; + unsigned int bpp; + unsigned int clrBackground; + unsigned int clrTitleBackground; + unsigned int clrTitleText; + unsigned int clrActiveText; + unsigned int clrInactiveText; + unsigned int clrRed; + unsigned int clrYellow; + unsigned int clrGreen; }; extern const cFemonTheme femonTheme[eFemonThemeMaxNumber]; diff --git a/femonlatm.c b/femonlatm.c index 49d8ec4..7edb6c3 100644 --- a/femonlatm.c +++ b/femonlatm.c @@ -8,14 +8,14 @@ #include "femontools.h" #include "femonlatm.h" -unsigned int cFemonLATM::s_Bitrates[3][16] = +int cFemonLATM::s_Bitrates[3][16] = { {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1}, // MPEG-2 Layer II/III {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1} // MPEG-2 Layer II/III }; -unsigned int cFemonLATM::s_Samplerates[4] = +int cFemonLATM::s_Samplerates[4] = { 22050, 24000, 16000, -1 }; diff --git a/femonlatm.h b/femonlatm.h index 864d63e..731f69c 100644 --- a/femonlatm.h +++ b/femonlatm.h @@ -14,8 +14,8 @@ class cFemonLATM { private: cFemonAudioIf *m_AudioHandler; - static unsigned int s_Bitrates[3][16]; - static unsigned int s_Samplerates[4]; + static int s_Bitrates[3][16]; + static int s_Samplerates[4]; public: cFemonLATM(cFemonAudioIf *audiohandler); diff --git a/femonmpeg.c b/femonmpeg.c index 3656369..e0f0564 100644 --- a/femonmpeg.c +++ b/femonmpeg.c @@ -10,7 +10,7 @@ #define IS_EXTENSION_START(buf) (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == 0xB5)) -unsigned int cFemonMPEG::s_Bitrates[2][3][16] = +int cFemonMPEG::s_Bitrates[2][3][16] = { { {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I @@ -24,7 +24,7 @@ unsigned int cFemonMPEG::s_Bitrates[2][3][16] = } }; -unsigned int cFemonMPEG::s_Samplerates[2][4] = +int cFemonMPEG::s_Samplerates[2][4] = { {22050, 24000, 16000, -1}, // MPEG-2 {44100, 48000, 32000, -1} // MPEG-1 diff --git a/femonmpeg.h b/femonmpeg.h index bb29aad..b602d3b 100644 --- a/femonmpeg.h +++ b/femonmpeg.h @@ -16,9 +16,9 @@ private: cFemonVideoIf *m_VideoHandler; cFemonAudioIf *m_AudioHandler; - static unsigned int s_Bitrates[2][3][16]; - static unsigned int s_Samplerates[2][4]; - static eAudioCodec s_Formats[2][4]; + static int s_Bitrates[2][3][16]; + static int s_Samplerates[2][4]; + static eAudioCodec s_Formats[2][4]; public: cFemonMPEG(cFemonVideoIf *videohandler, cFemonAudioIf *audiohandler); diff --git a/femonosd.c b/femonosd.c index acf1006..44e1738 100644 --- a/femonosd.c +++ b/femonosd.c @@ -731,7 +731,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool li eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - if (!liveView || !device->IsPrimaryDevice() || !channelNumber || !channel || channel->Number() != channelNumber) + if (!liveView || !channelNumber || !channel || channel->Number() != channelNumber) return; m_DeviceSource = DEVICESOURCE_DVBAPI; diff --git a/po/de_DE.po b/po/de_DE.po index d5a9819..2b82825 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/es_ES.po b/po/es_ES.po index 5d56a51..74255b7 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/et_EE.po b/po/et_EE.po index ba3de52..7563b11 100644 --- a/po/et_EE.po +++ b/po/et_EE.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index 05e1f79..bf6dccc 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index ddd581f..3c55463 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/hu_HU.po b/po/hu_HU.po index c9be479..6b756b5 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0200\n" "PO-Revision-Date: 2010-10-10 10:10+0200\n" diff --git a/po/it_IT.po b/po/it_IT.po index 0e2f04c..3617a1d 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -6,7 +6,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/lt_LT.po b/po/lt_LT.po index 384edf3..641934b 100644 --- a/po/lt_LT.po +++ b/po/lt_LT.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index bdbbed4..49d6ced 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index a5cf9e3..78e76c2 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index edac5a9..cf05afd 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-femon 1.7.14\n" +"Project-Id-Version: vdr-femon 1.7.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-10 10:10+0300\n" "PO-Revision-Date: 2010-10-10 10:10+0300\n"