diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2015-12-12 15:18:14 +0100 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2015-12-12 15:18:14 +0100 |
commit | 4f9b3886780382addf8f233905ca9d0b738ebf5a (patch) | |
tree | da1456942179f040df8e3a862b263112b67cc2a5 | |
parent | e00fe192159433435b5f6b531cb6895c091d76de (diff) | |
download | skin-flatplus-4f9b3886780382addf8f233905ca9d0b738ebf5a.tar.gz skin-flatplus-4f9b3886780382addf8f233905ca9d0b738ebf5a.tar.bz2 |
add support for vdr-2.3.1
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | baserender.c | 7 | ||||
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | displaychannel.c | 130 | ||||
-rw-r--r-- | displaychannel.h | 9 | ||||
-rw-r--r-- | displaymenu.c | 112 | ||||
-rw-r--r-- | po/de_DE.po | 8 | ||||
-rw-r--r-- | po/it_IT.po | 15 | ||||
-rw-r--r-- | setup.c | 7 |
11 files changed, 137 insertions, 161 deletions
@@ -4,6 +4,7 @@ VDR Plugin 'skinflatplus' Revision History - [fix] eMenuSortMode in displaymenu.h for compile with VDR < 2.2.0 - [fix] position of widgets in main menu (add menu item border size) - [fix] wrong epg logo in epgsearch eventsview +- [fix] remove show bitrate of audio and video in displaychannel - [update] default themes inverted style, selected item fore color is now back color - [update] disk usage icons with 32 sections instead of 16, thanks to MegaV0lt @@ -11,6 +12,7 @@ VDR Plugin 'skinflatplus' Revision History - [update] README, fix logo folder, add 3PO logo pack - [update] translation (thanks to MegaV0lt) - [update] MV-Themes +- [add] support for vdr-2.3.1 - [add] displaychannel - dvbapi info you need oscam min rev 10653 and dvbapi min commit 85da7b2 - [add] add italian translation (thanks to fiveten_59) @@ -75,7 +75,7 @@ LIBS += $(shell pkg-config --libs Magick++) ### The object files (add further files here): -OBJS = config.o setup.o imagecache.o imagescaler.o imagemagickwrapper.o imageloader.o baserender.o complexcontent.o textscroller.o femonreceiver.o displaychannel.o displaymenu.o displaymessage.o \ +OBJS = config.o setup.o imagecache.o imagescaler.o imagemagickwrapper.o imageloader.o baserender.o complexcontent.o textscroller.o displaychannel.o displaymenu.o displaymessage.o \ displayreplay.o displaytracks.o displayvolume.o flat.o $(PLUGIN).o ### The main target: diff --git a/baserender.c b/baserender.c index 5a97da09..56fcc0e1 100644 --- a/baserender.c +++ b/baserender.c @@ -423,7 +423,12 @@ void cFlatBaseRender::TopBarUpdate(void) { int numRec = 0; if( Config.TopBarRecordingShow ) { // look for timers - for(cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti)) { + #if VDRVERSNUM >= 20301 + LOCK_TIMERS_READ; + for(const cTimer *ti = Timers->First(); ti; ti = Timers->Next(ti)) { + #else + for(cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti)) { + #endif if( ti->HasFlags(tfRecording) ) { numRec++; } @@ -24,8 +24,6 @@ cFlatConfig::cFlatConfig(void) { ChannelFormatShow = true; ChannelResolutionAspectShow = true; ChannelSimpleAspectFormat = true; - ChannelBitrateShow = false; - ChannelBitrateShowCalcInterval = 20; ChannelTimeLeft = 0; ChannelDvbapiInfoShow = 1; @@ -321,10 +319,8 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "ScrollerType") == 0) ScrollerType = atoi(Value); else if (strcmp(Name, "DiskUsageShort") == 0) DiskUsageShort = atoi(Value); else if (strcmp(Name, "DiskUsageFree") == 0) DiskUsageFree = atoi(Value); - else if (strcmp(Name, "ChannelBitrateShow") == 0) ChannelBitrateShow = atoi(Value); else if (strcmp(Name, "TopBarFontClockScale") == 0) TopBarFontClockScale = atod(Value); else if (strcmp(Name, "TimeSecsScale") == 0) TimeSecsScale = atod(Value); - else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) ChannelBitrateShowCalcInterval = atoi(Value); else if (strcmp(Name, "TopBarHideClockText") == 0) TopBarHideClockText = atoi(Value); else if (strcmp(Name, "ChannelTimeLeft") == 0) ChannelTimeLeft = atoi(Value); else if (strcmp(Name, "MenuFullOsd") == 0) MenuFullOsd = atoi(Value); @@ -204,8 +204,6 @@ class cFlatConfig int ChannelResolutionAspectShow; int ChannelFormatShow; int ChannelSimpleAspectFormat; - int ChannelBitrateShow; - int ChannelBitrateShowCalcInterval; // hidden config int ChannelTimeLeft; int ChannelDvbapiInfoShow; diff --git a/displaychannel.c b/displaychannel.c index 982b8bd8..c979f52e 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -1,7 +1,7 @@ #include "displaychannel.h" #include "flat.h" -cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) : m_Receiver(NULL) { +cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) { if (firstDisplay) { firstDisplay = false; doOutput = false; @@ -89,18 +89,6 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) : m_Receiver(NULL) { scrollers.SetScrollDelay( Config.ScrollerDelay ); scrollers.SetScrollType( Config.ScrollerType ); - bitrateVideo = bitrateAudio = bitrateDolby = 0.0; - m_Receiver = NULL; - /* - if( Config.ChannelBitrateShow ) { - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); - if( channel ) { - m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0); - cDevice::ActualDevice()->AttachReceiver(m_Receiver); - } - } - */ if( Config.ChannelWeatherShow ) DrawWidgetWeather(); @@ -111,10 +99,6 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) : m_Receiver(NULL) { cFlatDisplayChannel::~cFlatDisplayChannel() { - if (m_Receiver != NULL ) { - m_Receiver->Deactivate(); - delete m_Receiver; - } if( !doOutput ) return; if (osd) { @@ -620,92 +604,6 @@ void cFlatDisplayChannel::DvbapiInfoDraw(void) { chanInfoBottomPixmap->DrawText(cPoint(left, top), dvbapiInfoText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), dvbapiInfoFont, dvbapiInfoFont->Width(dvbapiInfoText) * 2); } -void cFlatDisplayChannel::BitrateDraw(void) { - int top = fontHeight*2 + fontSmlHeight*2 + marginItem; - top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem*2; - int left = SignalStrengthRight + marginItem * 4; - cFont *SignalFont = cFont::CreateFont(Setup.FontOsd, Config.decorProgressSignalSize); - cFont *BitrateFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2) + marginItem); - -/* - if( Config.SignalQualityShow ) { - int signalWidth = channelWidth / 2; - int progressLeft = bottomLeft + SignalFont->Width("STR") + SignalFont->Width(" ") + marginItem; - int progressWidth = signalWidth / 2 - progressLeft - marginItem; - - left = progressLeft + progressWidth + marginItem * 4; - } -*/ - cString bitrateText; - if( bitrateAudio > 0.0 || bitrateDolby == 0.0 ) - bitrateText = cString::sprintf("Video: %.2f Mbit/s | Audio: %.2f kbit/s", bitrateVideo / 1000000.0, bitrateAudio / 1000.0 ); - else - bitrateText = cString::sprintf("Video: %.2f Mbit/s | Dolby: %.2f kbit/s", bitrateVideo / 1000000.0, bitrateDolby / 1000.0 ); - - chanInfoBottomPixmap->DrawText(cPoint(left, top), bitrateText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), BitrateFont, BitrateFont->Width(bitrateText) * 2); - - BitrateRight = left + BitrateFont->Width(bitrateText) + marginItem; - - delete SignalFont; - delete BitrateFont; -} - -// Indicates a channel switch on the given DVB device. -// If ChannelNumber is 0, this is before the channel is being switched, -// otherwise ChannelNumber is the number of the channel that has been switched to. -// LiveView tells whether this channel switch is for live viewing. -void cFlatDisplayChannel::ChannelSwitch(const cDevice * device, int channelNumber, bool liveView) -{ - if( liveView == false) // ChannelSwitch from EPG-Scan, streamdev or other? - return; - if( channelNumber == 0 ) { // before the channel is being switched -> remove receiver - if (m_Receiver) { - //dsyslog("ChannelSwitch: Receiver REMOVE"); - m_Receiver->Deactivate(); - DELETENULL(m_Receiver); - } - return; - } - - // at this point we finally switch to a new channel on liveView - bitrateVideo = bitrateAudio = bitrateDolby = 0.0; - eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - - if( channel && Config.ChannelBitrateShow && doOutput ) { - if ( m_Receiver ) { // this should not be happen!!! - //dsyslog("ChannelSwitch: Receiver is still Active -> remove it!"); - m_Receiver->Deactivate(); - DELETENULL(m_Receiver); - } - //dsyslog("ChannelSwitch: Receiver ATTACH %d - %s", cDevice::PrimaryDevice()->DeviceNumber(), channel->Name()); - - m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0); - cDevice::ActualDevice()->AttachReceiver(m_Receiver); - } -} - -void cFlatDisplayChannel::SetAudioTrack(int Index, const char * const *Tracks) -{ - bitrateVideo = bitrateAudio = bitrateDolby = 0.0; - eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); - if( m_Receiver ) { - dsyslog("SetAudioTrack: Receiver remove"); - m_Receiver->Deactivate(); - DELETENULL(m_Receiver); - } - - if( !Config.ChannelBitrateShow ) - return; - - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - if( channel && doOutput ) { - dsyslog("SetAudioTrack: Receiver attach - %s", channel->Name()); - m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0); - cDevice::ActualDevice()->AttachReceiver(m_Receiver); - } -} - void cFlatDisplayChannel::Flush(void) { if( !doOutput ) return; @@ -730,24 +628,6 @@ void cFlatDisplayChannel::Flush(void) { } } - if( Config.ChannelBitrateShow && doOutput && !m_Receiver ) { - const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); - if( channel ) { - //dsyslog("ChannelSwitch: Receiver ATTACH %d - %s FLUSH", cDevice::PrimaryDevice()->DeviceNumber(), channel->Name()); - m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0); - cDevice::ActualDevice()->AttachReceiver(m_Receiver); - } - } - - if( Config.ChannelBitrateShow && m_Receiver ) { - bitrateVideo = m_Receiver->VideoBitrate(); - bitrateAudio = m_Receiver->AudioBitrate(); - bitrateDolby = m_Receiver->AC3Bitrate(); - - BitrateDraw(); - } - if( Config.ChannelDvbapiInfoShow ) DvbapiInfoDraw(); @@ -772,8 +652,12 @@ void cFlatDisplayChannel::PreLoadImages(void) { int index = 0; height = ((fontHeight*2) + (fontSmlHeight*2) + marginItem) - marginItem*2; cImage *img = NULL; - for(cChannel *Channel = Channels.First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels.Next(Channel) ) - { +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + for(const cChannel *Channel = Channels->First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels->Next(Channel) ) { +#else + for(cChannel *Channel = Channels.First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels.Next(Channel) ) { +#endif img = imgLoader.LoadLogo(Channel->Name(), imageBGWidth - 4, imageBGHeight - 4); if( img ) index++; diff --git a/displaychannel.h b/displaychannel.h index 8e41dcba..78ad1d69 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -5,7 +5,6 @@ #include "flat.h" #include "services/scraper2vdr.h" #include "services/dvbapi.h" -#include "femonreceiver.h" class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, public cStatus { private: @@ -32,10 +31,6 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, int LastSignalStrength, LastSignalQuality; int SignalStrengthRight, BitrateRight; - // femon - cFemonReceiver *m_Receiver; - double bitrateVideo, bitrateAudio, bitrateDolby; - // TVScraper int TVSLeft, TVSTop, TVSWidth, TVSHeight; @@ -47,7 +42,6 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, bool isGroup; void SignalQualityDraw(void); - void BitrateDraw(void); void ChannelIconsDraw(const cChannel *Channel, bool Resolution); void DvbapiInfoDraw(void); @@ -60,7 +54,4 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, virtual void Flush(void); void PreLoadImages(void); - protected: - virtual void ChannelSwitch(const cDevice *device, int channelNumber, bool liveView); - virtual void SetAudioTrack(int Index, const char * const *Tracks); }; diff --git a/displaymenu.c b/displaymenu.c index c6ca01f1..0bb3f887 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -250,7 +250,12 @@ void cFlatDisplayMenu::SetTitle(const char *Title) { icon = "menuIcons/Channels"; if( Config.MenuChannelShowCount ) { int chanCount = 0; +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + for(const cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) { +#else for(cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { +#endif if( !Channel->GroupSep() ) chanCount++; } @@ -262,7 +267,12 @@ void cFlatDisplayMenu::SetTitle(const char *Title) { icon = "menuIcons/Timers"; if( Config.MenuTimerShowCount ) { int timerCount = 0, timerActiveCount = 0; +#if VDRVERSNUM >= 20301 + LOCK_TIMERS_READ; + for(const cTimer *Timer = Timers->First(); Timer; Timer = Timers->Next(Timer)) { +#else for(cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer)) { +#endif timerCount++; if( Timer->HasFlags(tfActive) ) timerActiveCount++; @@ -278,7 +288,12 @@ void cFlatDisplayMenu::SetTitle(const char *Title) { int recCount = 0, recNewCount = 0; LastRecFolder = RecFolder; if( RecFolder != "" && LastItemRecordingLevel > 0 ) { +#if VDRVERSNUM >= 20301 + LOCK_RECORDINGS_READ; + for(const cRecording *Rec = Recordings->First(); Rec; Rec = Recordings->Next(Rec)) { +#else for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) { +#endif std::string RecFolder2 = GetRecordingName(Rec, LastItemRecordingLevel-1, true); if( RecFolder == RecFolder2 ) { recCount++; @@ -287,7 +302,12 @@ void cFlatDisplayMenu::SetTitle(const char *Title) { } } } else { +#if VDRVERSNUM >= 20301 + LOCK_RECORDINGS_READ; + for(const cRecording *Rec = Recordings->First(); Rec; Rec = Recordings->Next(Rec)) { +#else for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) { +#endif recCount++; if( Rec->IsNew() ) recNewCount++; @@ -724,8 +744,12 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C if( Config.MenuChannelView == 0 || !Channel ) return false; +#if VDRVERSNUM >= 20301 + LOCK_SCHEDULES_READ; +#else cSchedulesLock schedulesLock; const cSchedules *schedules = cSchedules::Schedules(schedulesLock); +#endif const cEvent *Event = NULL; bool DrawProgress = true; @@ -776,7 +800,12 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C float progress = 0.0; cString EventTitle = ""; +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + cString ws = cString::sprintf("%d", Channels->MaxNumber()); +#else cString ws = cString::sprintf("%d", Channels.MaxNumber()); +#endif int w = font->Width(ws); if( !Channel->GroupSep() ) buffer = cString::sprintf("%d", Channel->Number()); @@ -850,7 +879,11 @@ bool cFlatDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool C LeftName = Left; // event from channel +#if VDRVERSNUM >= 20301 + const cSchedule *Schedule = Schedules->GetSchedule( Channel ); +#else const cSchedule *Schedule = schedules->GetSchedule( Channel->GetChannelID() ); +#endif if( Schedule ) { Event = Schedule->GetPresentEvent(); if( Event ) { @@ -1250,7 +1283,12 @@ bool cFlatDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current } Left += imageHeight + marginItem * 2; +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + cString ws = cString::sprintf("%d", Channels->MaxNumber()); +#else cString ws = cString::sprintf("%d", Channels.MaxNumber()); +#endif int w = font->Width(ws); buffer = cString::sprintf("%d", Channel->Number()); int Width = font->Width(buffer); @@ -1510,7 +1548,12 @@ bool cFlatDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current if( Current ) { ItemEventLastChannelName = Channel->Name(); } +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + cString ws = cString::sprintf("%d", Channels->MaxNumber()); +#else cString ws = cString::sprintf("%d", Channels.MaxNumber()); +#endif w = font->Width(ws); if( !Channel->GroupSep() ) { buffer = cString::sprintf("%d", Channel->Number()); @@ -1856,6 +1899,10 @@ bool cFlatDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, if( Config.MenuRecordingView == 0 ) return false; +#if VDRVERSNUM >= 20301 + LOCK_RECORDINGS_READ; +#endif + cString buffer; cString RecName = GetRecordingName(Recording, Level, Total == 0); @@ -1870,7 +1917,11 @@ bool cFlatDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, int recCount = 0, recNewCount = 0; LastRecFolder = RecFolder; if( RecFolder != "" && LastItemRecordingLevel > 0 ) { +#if VDRVERSNUM >= 20301 + for(const cRecording *Rec = Recordings->First(); Rec; Rec = Recordings->Next(Rec)) { +#else for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) { +#endif std::string RecFolder2 = GetRecordingName(Rec, LastItemRecordingLevel-1, true); if( RecFolder == RecFolder2 ) { recCount++; @@ -1879,7 +1930,11 @@ bool cFlatDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, } } } else { +#if VDRVERSNUM >= 20301 + for(const cRecording *Rec = Recordings->First(); Rec; Rec = Recordings->Next(Rec)) { +#else for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) { +#endif recCount++; if( Rec->IsNew() ) recNewCount++; @@ -2474,7 +2529,12 @@ void cFlatDisplayMenu::SetEvent(const cEvent *Event) { continue; i++; sstrReruns << *DayDateTime(r->event->StartTime()); +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByChannelID(r->event->ChannelID(), true, true); +#else cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true); +#endif if (channel) { sstrReruns << ", " << channel->Number() << " -"; sstrReruns << " " << channel->ShortName(true); @@ -2777,7 +2837,12 @@ void cFlatDisplayMenu::DrawItemExtraRecording(const cRecording *Recording, cStri // lent from skinelchi if( Config.RecordingAdditionalInfoShow ) { +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByChannelID(((cRecordingInfo *)recInfo)->ChannelID()); +#else cChannel *channel = Channels.GetByChannelID(((cRecordingInfo *)recInfo)->ChannelID()); +#endif if (channel) text << trVDR("Channel") << ": " << channel->Number() << " - " << channel->Name() << endl; @@ -3123,7 +3188,12 @@ void cFlatDisplayMenu::SetRecording(const cRecording *Recording) { // lent from skinelchi if( Config.RecordingAdditionalInfoShow ) { +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + const cChannel *channel = Channels->GetByChannelID(((cRecordingInfo *)recInfo)->ChannelID()); +#else cChannel *channel = Channels.GetByChannelID(((cRecordingInfo *)recInfo)->ChannelID()); +#endif if (channel) recAdditional << trVDR("Channel") << ": " << channel->Number() << " - " << channel->Name() << endl; @@ -3800,7 +3870,12 @@ void cFlatDisplayMenu::Flush(void) { if( Config.MenuTimerShowCount && menuCategory == mcTimer ) { int timerCount = 0, timerActiveCount = 0; +#if VDRVERSNUM >= 20301 + LOCK_TIMERS_READ; + for(const cTimer *Timer = Timers->First(); Timer; Timer = Timers->Next(Timer)) { +#else for(cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer)) { +#endif timerCount++; if( Timer->HasFlags(tfActive) ) timerActiveCount++; @@ -3860,7 +3935,12 @@ time_t cFlatDisplayMenu::GetLastRecTimeFromFolder(const cRecording *Recording, i std::string RecFolder = GetRecordingName(Recording, Level, true); time_t RecStart = Recording->Start(); +#if VDRVERSNUM >= 20301 + LOCK_RECORDINGS_READ; + for(const cRecording *rec = Recordings->First(); rec; rec = Recordings->Next(rec)) { +#else for(cRecording *rec = Recordings.First(); rec; rec = Recordings.Next(rec)) { +#endif std::string RecFolder2 = GetRecordingName(rec, Level, true); if( RecFolder == RecFolder2 ) { // recordings must be in the same folder time_t RecStart2 = rec->Start(); @@ -4172,7 +4252,12 @@ int cFlatDisplayMenu::DrawMainMenuWidgetDVBDevices(int wLeft, int wWidth, int Co bool *recDevices = new bool[numDevices]; for( int i=0; i < numDevices; i++ ) recDevices[i] = false; +#if VDRVERSNUM >= 20301 + LOCK_TIMERS_READ; + for (const cTimer *timer = Timers->First(); timer; timer = Timers->Next(timer)) { +#else for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) { +#endif if (!timer->Recording()) { continue; } @@ -4280,8 +4365,13 @@ int cFlatDisplayMenu::DrawMainMenuWidgetActiveTimers(int wLeft, int wWidth, int //check if remotetimers plugin is available static cPlugin* pRemoteTimers = cPluginManager::GetPlugin("remotetimers"); - cSchedulesLock SchedulesLock; - const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock); + +#if VDRVERSNUM >= 20301 + LOCK_SCHEDULES_READ; +#else + cSchedulesLock schedulesLock; + const cSchedules *schedules = cSchedules::Schedules(schedulesLock); +#endif time_t now; time(&now); @@ -4297,7 +4387,12 @@ int cFlatDisplayMenu::DrawMainMenuWidgetActiveTimers(int wLeft, int wWidth, int cVector<const cTimer *> timerRemoteRec; cVector<const cTimer *> timerRemoteActive; +#if VDRVERSNUM >= 20301 + LOCK_TIMERS_READ; + for(const cTimer *ti = Timers->First(); ti; ti = Timers->Next(ti) ) { +#else for(cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti) ) { +#endif if( ti->HasFlags(tfRecording) && Config.MainMenuWidgetActiveTimerShowRecording ) timerRec.Append(ti); if( ti->HasFlags(tfActive) && !ti->HasFlags(tfRecording) && Config.MainMenuWidgetActiveTimerShowActive ) @@ -4446,7 +4541,12 @@ int cFlatDisplayMenu::DrawMainMenuWidgetLastRecordings(int wLeft, int wWidth, in ContentTop += 6; std::vector<std::pair<time_t, std::string> > Recs; +#if VDRVERSNUM >= 20301 + LOCK_RECORDINGS_READ; + for(const cRecording *rec = Recordings->First(); rec; rec = Recordings->Next(rec)) { +#else for(cRecording *rec = Recordings.First(); rec; rec = Recordings.Next(rec)) { +#endif time_t RecStart = rec->Start(); int Minutes = (rec->LengthInSeconds() + 30) / 60; @@ -5185,8 +5285,12 @@ void cFlatDisplayMenu::PreLoadImages(void) { int index = 0; cImage *img = NULL; - for(cChannel *Channel = Channels.First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels.Next(Channel)) - { +#if VDRVERSNUM >= 20301 + LOCK_CHANNELS_READ; + for(const cChannel *Channel = Channels->First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels->Next(Channel)) { +#else + for(cChannel *Channel = Channels.First(); Channel && index < LOGO_PRE_CACHE; Channel = Channels.Next(Channel)) { +#endif img = imgLoader.LoadLogo(Channel->Name(), imageBGWidth - 4, imageBGHeight - 4); if( img ) index++; diff --git a/po/de_DE.po b/po/de_DE.po index 683a06fa..367e139e 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinflat 0.5.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2015-05-12 13:16+0200\n" +"POT-Creation-Date: 2015-12-12 15:10+0100\n" "PO-Revision-Date: 2015-02-09 20:09+0100\n" "Last-Translator: Martin Schirrmacher\n" "Language-Team: Martin Schirrmacher\n" @@ -555,9 +555,6 @@ msgstr "Zeige Auflösung & Bildformat" msgid "Show format (hd/sd)" msgstr "Zeige Format (HD/SD)" -msgid "Show video/audio bitrate" -msgstr "Zeige Video/Audio Bitrate" - msgid "Simple aspect & format" msgstr "Auflösung & Bildformat Einfache Anzeige" @@ -902,3 +899,6 @@ msgstr "Eigene Befehle-Widget: Anzeigen" msgid "Widget custom commands: position" msgstr "Eigene Befehle-Widget: Position" + +#~ msgid "Show video/audio bitrate" +#~ msgstr "Zeige Video/Audio Bitrate" diff --git a/po/it_IT.po b/po/it_IT.po index 7553562b..b1f88289 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinflat 0.5.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2015-05-12 13:16+0200\n" +"POT-Creation-Date: 2015-12-12 15:10+0100\n" "PO-Revision-Date: 2015-02-09 20:09+0100\n" "Last-Translator: fiveten_59\n" "Language-Team: Italian\n" @@ -555,14 +555,11 @@ msgstr "Mostra risoluzione & aspetto" msgid "Show format (hd/sd)" msgstr "Mostra formato (HD/SD)" -msgid "Show video/audio bitrate" -msgstr "Mostra Video/Audio Bitrate" - msgid "Simple aspect & format" msgstr "Aspetto & formato semplice" -msgid "dvbapi plugin non installed" -msgstr "dvbapi plugin non installato" +msgid "dvbapi plugin not installed" +msgstr "" msgid "Show dvbapi informations" msgstr "Mostra informazioni dvbapi" @@ -902,3 +899,9 @@ msgstr "Uso comandi dei widget: abilita" msgid "Widget custom commands: position" msgstr "Uso comandi dei widget: posizione" + +#~ msgid "Show video/audio bitrate" +#~ msgstr "Mostra Video/Audio Bitrate" + +#~ msgid "dvbapi plugin non installed" +#~ msgstr "dvbapi plugin non installato" @@ -273,8 +273,6 @@ void cFlatSetup::Store(void) { SetupStore("DiskUsageFree", Config.DiskUsageFree); SetupStore("TopBarFontClockScale", dtoa(Config.TopBarFontClockScale)); SetupStore("TimeSecsScale", dtoa(Config.TimeSecsScale)); - SetupStore("ChannelBitrateShow", Config.ChannelBitrateShow); - SetupStore("ChannelBitrateShowCalcInterval", Config.ChannelBitrateShowCalcInterval); SetupStore("TopBarHideClockText", Config.TopBarHideClockText); SetupStore("ChannelTimeLeft", Config.ChannelTimeLeft); SetupStore("MenuFullOsd", Config.MenuFullOsd); @@ -461,10 +459,8 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "ScrollerType") == 0) SetupConfig->ScrollerType = atoi(Value); else if (strcmp(Name, "DiskUsageShort") == 0) SetupConfig->DiskUsageShort = atoi(Value); else if (strcmp(Name, "DiskUsageFree") == 0) SetupConfig->DiskUsageFree = atoi(Value); - else if (strcmp(Name, "ChannelBitrateShow") == 0) SetupConfig->ChannelBitrateShow = atoi(Value); else if (strcmp(Name, "TopBarFontClockScale") == 0) SetupConfig->TopBarFontClockScale = atod(Value); else if (strcmp(Name, "TimeSecsScale") == 0) SetupConfig->TimeSecsScale = atod(Value); - else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) SetupConfig->ChannelBitrateShowCalcInterval = atoi(Value); else if (strcmp(Name, "TopBarHideClockText") == 0) SetupConfig->TopBarHideClockText = atoi(Value); else if (strcmp(Name, "ChannelTimeLeft") == 0) SetupConfig->ChannelTimeLeft = atoi(Value); else if (strcmp(Name, "MenuFullOsd") == 0) SetupConfig->MenuFullOsd = atoi(Value); @@ -634,8 +630,6 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) { Config.Store("DiskUsageFree", SetupConfig->DiskUsageFree, *Filename); Config.Store("TopBarFontClockScale", dtoa(Config.TopBarFontClockScale), *Filename); Config.Store("TimeSecsScale", dtoa(Config.TimeSecsScale), *Filename); - Config.Store("ChannelBitrateShow", SetupConfig->ChannelBitrateShow, *Filename); - Config.Store("ChannelBitrateShowCalcInterval", SetupConfig->ChannelBitrateShowCalcInterval, *Filename); Config.Store("TopBarHideClockText", SetupConfig->TopBarHideClockText, *Filename); Config.Store("ChannelTimeLeft", SetupConfig->ChannelTimeLeft, *Filename); Config.Store("MenuFullOsd", SetupConfig->MenuFullOsd, *Filename); @@ -863,7 +857,6 @@ void cFlatSetupChannelInfo::Setup(void) { Add(new cMenuEditBoolItem(tr("Colors for signal quality"), &SetupConfig->SignalQualityUseColors)); Add(new cMenuEditBoolItem(tr("Show resolution & aspect"), &SetupConfig->ChannelResolutionAspectShow)); Add(new cMenuEditBoolItem(tr("Show format (hd/sd)"), &SetupConfig->ChannelFormatShow)); - Add(new cMenuEditBoolItem(tr("Show video/audio bitrate"), &SetupConfig->ChannelBitrateShow)); Add(new cMenuEditBoolItem(tr("Simple aspect & format"), &SetupConfig->ChannelSimpleAspectFormat)); static cPlugin *pDVBApi = cPluginManager::GetPlugin("dvbapi"); if (!pDVBApi) { |