diff options
Diffstat (limited to 'patches')
-rw-r--r-- | patches/lcdproc-0.0.10-epg-update.diff | 86 | ||||
-rw-r--r-- | patches/lcdproc-0.0.10-fix-for-1.3.38.diff | 40 | ||||
-rw-r--r-- | patches/lcdproc-0.0.10-fix_for_absolute_volume.diff | 21 | ||||
-rw-r--r-- | patches/lcdproc-0.0.10-for-1.3.18.diff | 12 | ||||
-rw-r--r-- | patches/lcdproc-0.0.10-lcr-service.diff | 172 | ||||
-rw-r--r-- | patches/lcdproc-0.0.10-rtservice.diff | 84 |
6 files changed, 415 insertions, 0 deletions
diff --git a/patches/lcdproc-0.0.10-epg-update.diff b/patches/lcdproc-0.0.10-epg-update.diff new file mode 100644 index 0000000..980bb90 --- /dev/null +++ b/patches/lcdproc-0.0.10-epg-update.diff @@ -0,0 +1,86 @@ +diff -rup lcdproc-0.0.10.sav/lcd.c lcdproc-0.0.10/lcd.c +--- lcdproc-0.0.10.sav/lcd.c Wed Nov 9 22:01:59 2005 ++++ lcdproc-0.0.10/lcd.c Thu Jan 5 16:52:01 2006 +@@ -43,6 +43,7 @@ cLcd::cLcd() { + for (i=0;i<LCDMAXSTATEBUF;i++) LastState[i]=Title; LastStateP=0; + ThreadStateData.barx=1, ThreadStateData.bary=1, ThreadStateData.barl=0; + for (i=0;i<LCDMAXCARDS;i++) ThreadStateData.CardStat[i]=0; ++ channelSwitched = false; + } + + cLcd::~cLcd() { +@@ -667,12 +668,15 @@ void cLcd::Action(void) { // LCD output + + voltime.tv_sec=0; + for (i=0;i<LCDMAXSTATES;i++) for (j=0;j<4;j++) Lcddirty[i][j]=true; +- time_t nextLcdUpdate = (time(NULL)/60)*60+60; +- ++ time_t nextLcdUpdate = 0; // trigger first update immediately + while (true) { // main loop, wakes up every WakeUpCycle, any output to LCDd is done here + gettimeofday(&now,NULL); + + // epg update ++ if (channelSwitched) { ++ channelSwitched = false; ++ nextLcdUpdate = 0; //trigger next epg update ++ } + + #ifdef OLDVDR + +@@ -700,8 +704,6 @@ void cLcd::Action(void) { // LCD output + } + if ( nextLcdUpdate <= time(NULL) ) + nextLcdUpdate=(time(NULL)/60)*60+60; +- else if ( nextLcdUpdate > time(NULL)+60 ) +- nextLcdUpdate=(time(NULL)/60)*60+60; + } + + #else +@@ -731,8 +733,6 @@ void cLcd::Action(void) { // LCD output + } + if ( nextLcdUpdate <= time(NULL) ) + nextLcdUpdate=(time(NULL)/60)*60+60; +- else if ( nextLcdUpdate > time(NULL)+60 ) +- nextLcdUpdate=(time(NULL)/60)*60+60; + } + + #endif +@@ -1023,4 +1023,8 @@ void cLcd::Action(void) { // LCD output + } + usleep(WakeUpCycle-(now.tv_usec%WakeUpCycle)); // sync to systemtime for nicer time output + } ++} ++ ++void cLcd::ChannelSwitched() { ++ channelSwitched = true; + } +diff -rup lcdproc-0.0.10.sav/lcd.h lcdproc-0.0.10/lcd.h +--- lcdproc-0.0.10.sav/lcd.h Wed Nov 9 22:01:59 2005 ++++ lcdproc-0.0.10/lcd.h Thu Jan 5 16:57:18 2006 +@@ -57,6 +57,7 @@ class cLcd : public cThread { + void PopThreadState(); + void SetReplayDevice(cControl *DvbApi); + void SetPrimaryDevice(cDevice *DvbApi); ++ void ChannelSwitched(); //to propagate "ChannelSwitched"-Event from cLcdFeed to cLcd + private: + char *SummaryText; + unsigned int SummaryTextL; +@@ -75,6 +76,7 @@ class cLcd : public cThread { + void GetTimeDateStat( char *string, unsigned int OutStateData[] ); + void Action(void); + int closing ; ++ bool channelSwitched; + }; + + #endif //__LCD_H +diff -rup lcdproc-0.0.10.sav/lcdproc.c lcdproc-0.0.10/lcdproc.c +--- lcdproc-0.0.10.sav/lcdproc.c Wed Nov 9 22:01:59 2005 ++++ lcdproc-0.0.10/lcdproc.c Thu Jan 5 16:32:59 2006 +@@ -73,6 +73,7 @@ void cLcdFeed::ChannelSwitch(const cDevi + LCDproc->SetLine(1,2," "); + LCDproc->SetLine(1,3," "); + LCDproc->SetRunning(false,tr("Waiting for EPG info."), NULL); ++ LCDproc->ChannelSwitched(); + switched = true; + } else switched = false; + LCDproc->SetPrimaryDevice( (cDevice *) Device ); diff --git a/patches/lcdproc-0.0.10-fix-for-1.3.38.diff b/patches/lcdproc-0.0.10-fix-for-1.3.38.diff new file mode 100644 index 0000000..8765dbe --- /dev/null +++ b/patches/lcdproc-0.0.10-fix-for-1.3.38.diff @@ -0,0 +1,40 @@ +diff -rup lcdproc-0.0.10.sav/lcdproc.c lcdproc-0.0.10/lcdproc.c +--- lcdproc-0.0.10.sav/lcdproc.c Sun Jan 8 18:28:59 2006 ++++ lcdproc-0.0.10/lcdproc.c Sun Jan 8 20:02:31 2006 +@@ -51,8 +51,8 @@ static const char * PrioBackFunctionText + class cLcdFeed : public cStatus { + protected: + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); +- virtual void Recording(const cDevice *Device, const char *Name); +- virtual void Replaying(const cControl *DvbPlayerControl, const char *Name); ++ virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); ++ virtual void Replaying(const cControl *DvbPlayerControl, const char *Name, const char *FileName, bool On); + virtual void SetVolume(int Volume, bool Absolute); + virtual void OsdClear(void); + virtual void OsdTitle(const char *Title); +@@ -80,20 +80,20 @@ void cLcdFeed::ChannelSwitch(const cDevi + } + } + +-void cLcdFeed::Recording(const cDevice *Device, const char *Name) ++void cLcdFeed::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) + { + //syslog(LOG_INFO, "lcdproc: cLcdFeed::Recording %d %s", Device->CardIndex(), Name); +- if (Name) ++ if (On) + LCDproc->SetCardStat(Device->CardIndex(),2); + else + LCDproc->SetCardStat(Device->CardIndex(),1); + } + +-void cLcdFeed::Replaying(const cControl *DvbPlayerControl, const char *Name) ++void cLcdFeed::Replaying(const cControl *DvbPlayerControl, const char *Name, const char *FileName, bool On) + { + //syslog(LOG_INFO, "lcdproc: cLcdFeed::Replaying %s", Name); +- replaymode=(Name)?true:false; +- if ( replaymode ) { ++ replaymode=On; ++ if (replaymode) { + LCDproc->SetReplayDevice( (cDvbPlayerControl *) DvbPlayerControl); + LCDproc->SetMain(2, Name); + LCDproc->SetThreadState( (cLcd::ThreadStates) 2); // Replaying diff --git a/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff b/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff new file mode 100644 index 0000000..24ef596 --- /dev/null +++ b/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff @@ -0,0 +1,21 @@ +diff -rup lcdproc-0.0.10.sav/lcd.c lcdproc-0.0.10/lcd.c +--- lcdproc-0.0.10.sav/lcd.c Wed Aug 30 21:11:17 2006 ++++ lcdproc-0.0.10/lcd.c Sun Sep 17 12:48:23 2006 +@@ -258,11 +258,14 @@ void cLcd::SetWarning( const char *strin + } + } + +-void cLcd::ShowVolume(unsigned int vol, bool muted ) { ++void cLcd::ShowVolume(unsigned int vol, bool absolute ) { + if (!connected) return; + BeginMutualExclusion(); +- ThreadStateData.volume=vol; +- ThreadStateData.muted=muted; ++ if (absolute) ++ ThreadStateData.volume=vol; ++ else ++ ThreadStateData.volume+=vol; ++ ThreadStateData.muted=(ThreadStateData.volume==0); + ThreadStateData.showvolume=true; + EndMutualExclusion(); + if (ThreadStateData.muted) { diff --git a/patches/lcdproc-0.0.10-for-1.3.18.diff b/patches/lcdproc-0.0.10-for-1.3.18.diff new file mode 100644 index 0000000..b6bb8ea --- /dev/null +++ b/patches/lcdproc-0.0.10-for-1.3.18.diff @@ -0,0 +1,12 @@ +diff -Nru lcdproc-0.0.10.o/lcd.c lcdproc-0.0.10/lcd.c +--- lcdproc-0.0.10.o/lcd.c Thu Nov 4 17:38:44 2004 ++++ lcdproc-0.0.10/lcd.c Sun Jan 9 19:27:28 2005 +@@ -586,7 +586,7 @@ + if ( offset || !( ShowStates && ((t%LcdSetup.FullCycle) >= LcdSetup.TimeCycle) )) { + if (wid > 19) + snprintf(string,wid+1,"<%s %02d.%02d %02d:%02d:%02d>", +- WeekDayName(now->tm_wday), now->tm_mday, now->tm_mon+1, now->tm_hour, now->tm_min,now->tm_sec); ++ *WeekDayName(now->tm_wday), now->tm_mday, now->tm_mon+1, now->tm_hour, now->tm_min,now->tm_sec); + else + snprintf(string,wid+1,"<%02d.%02d %02d:%02d:%02d>", + now->tm_mday, now->tm_mon+1, now->tm_hour, now->tm_min,now->tm_sec); diff --git a/patches/lcdproc-0.0.10-lcr-service.diff b/patches/lcdproc-0.0.10-lcr-service.diff new file mode 100644 index 0000000..e298297 --- /dev/null +++ b/patches/lcdproc-0.0.10-lcr-service.diff @@ -0,0 +1,172 @@ +diff -up autopatch/lcd.c ./lcd.c +--- autopatch/lcd.c Sun Mar 5 19:25:08 2006 ++++ ./lcd.c Tue Mar 7 20:51:22 2006 +@@ -622,6 +622,9 @@ void cLcd::Action(void) { // LCD output + // RT + static int rtcycle; + ++ // LCR ++ static int lcrCycle; ++ + // backlight init + if ((lastBackLight=LcdSetup.BackLight)) + sock_send_string(sock,"backlight on\n"); +@@ -705,6 +708,7 @@ void cLcd::Action(void) { // LCD output + if ((Present = Schedule->GetFollowingEvent()) != NULL) + nextLcdUpdate=(Present->GetTime()<nextLcdUpdate)?Present->GetTime():nextLcdUpdate; + rtcycle = 10; // RT ++ lcrCycle = 10; // LCR + } + } + if ( nextLcdUpdate <= time(NULL) ) +@@ -735,6 +739,7 @@ void cLcd::Action(void) { // LCD output + if ((Present = Schedule->GetFollowingEvent()) != NULL) + nextLcdUpdate=(Present->StartTime()<nextLcdUpdate)?Present->StartTime():nextLcdUpdate; + rtcycle = 10; // RT ++ lcrCycle = 10; // LCR + } + } + if ( nextLcdUpdate <= time(NULL) ) +@@ -763,7 +768,26 @@ void cLcd::Action(void) { // LCD output + } + rtcycle = 0; + //printf("lcdproc - get Radiotext ...\n"); +- } ++ } ++ // get&display LcrData ++ if (lcrCycle++ == 10) // every 10 times ++ { ++ lcrCycle = 0; ++ cPlugin *p; ++ p = cPluginManager::CallFirstService("LcrService-v1.0", NULL); ++ if (p) ++ { ++ LcrService_v1_0 lcrData; ++ if (cPluginManager::CallFirstService("LcrService-v1.0", &lcrData)) ++ { ++ if ( strstr( lcrData.destination, "---" ) == NULL ) ++ { ++ SetRunning(false, (const char *)lcrData.destination, (const char *)lcrData.price, (const char *)lcrData.pulse); ++ nextLcdUpdate = 0; //trigger next epg update ++ } ++ } ++ } ++ } + #endif + + // replaying +diff -up autopatch/lcd.c.orig ./lcd.c.orig +--- autopatch/lcd.c.orig Sun Feb 26 20:11:02 2006 ++++ ./lcd.c.orig Sun Mar 5 19:25:08 2006 +@@ -11,6 +11,7 @@ + #include "lcd.h" + #include "sockets.h" + #include "i18n.h" ++#include <vdr/plugin.h> + + #ifdef LCD_EXT_KEY_CONF + #include LCD_EXT_KEY_CONF +@@ -390,6 +391,7 @@ void cLcd::SetRunning( bool nownext, con + void cLcd::SummaryInit(char *string) { + SummaryText = string; + SummaryTextL = strlen(string); ++ dsyslog("> %i", SummaryTextL); + SummaryCurrent=0; + } + +@@ -406,7 +408,7 @@ void cLcd::SummaryUp() { + } + + void cLcd::SummaryDisplay() { +- if ( (!connected) || (SummaryTextL < 1) ) return; ++ if ( (!connected) || (SummaryTextL < 1) || !SummaryText ) return; + + char workstring[256]; + unsigned int i, offset=0; +@@ -617,6 +619,8 @@ void cLcd::Action(void) { // LCD output + bool Lcddirty[LCDMAXSTATES][4]; + bool LcdShiftkeyPressed=false; + char priostring[35]; ++ // RT ++ static int rtcycle; + + // backlight init + if ((lastBackLight=LcdSetup.BackLight)) +@@ -700,6 +704,7 @@ void cLcd::Action(void) { // LCD output + SetRunning(false,tr("No EPG info available."), NULL); + if ((Present = Schedule->GetFollowingEvent()) != NULL) + nextLcdUpdate=(Present->GetTime()<nextLcdUpdate)?Present->GetTime():nextLcdUpdate; ++ rtcycle = 10; // RT + } + } + if ( nextLcdUpdate <= time(NULL) ) +@@ -729,12 +734,36 @@ void cLcd::Action(void) { // LCD output + SetRunning(false,tr("No EPG info available."), NULL); + if ((Present = Schedule->GetFollowingEvent()) != NULL) + nextLcdUpdate=(Present->StartTime()<nextLcdUpdate)?Present->StartTime():nextLcdUpdate; ++ rtcycle = 10; // RT + } + } + if ( nextLcdUpdate <= time(NULL) ) + nextLcdUpdate=(time(NULL)/60)*60+60; + } + ++#endif ++ ++#if VDRVERSNUM >= 10330 ++ // get&display Radiotext ++ if (++rtcycle > 10) { // every 10 times ++ cPlugin *p; ++ p = cPluginManager::CallFirstService("RadioTextService-v1.0", NULL); ++ if (p) { ++ RadioTextService_v1_0 rtext; ++ if (cPluginManager::CallFirstService("RadioTextService-v1.0", &rtext)) { ++ if (rtext.rds_info == 2 && strstr(rtext.rds_title, "---") == NULL) { ++ char timestr[20]; ++ sprintf(timestr, "%02d:%02d", rtext.title_start->tm_hour, rtext.title_start->tm_min); ++ SetRunning(false, timestr, rtext.rds_title, rtext.rds_artist); ++ } ++ else if (rtext.rds_info > 0) { ++ SetRunning(false, NULL, rtext.rds_text); ++ } ++ } ++ } ++ rtcycle = 0; ++ //printf("lcdproc - get Radiotext ...\n"); ++ } + #endif + + // replaying +diff -up autopatch/lcd.h ./lcd.h +--- autopatch/lcd.h Sun Feb 26 20:11:01 2006 ++++ ./lcd.h Tue Mar 7 20:46:30 2006 +@@ -89,4 +89,11 @@ struct RadioTextService_v1_0 { + struct tm *title_start; + }; + ++// LcrData ++struct LcrService_v1_0 { ++ cString destination; ++ cString price; ++ cString pulse; ++}; ++ + #endif //__LCD_H +diff -up autopatch/lcd.h.orig ./lcd.h.orig +--- autopatch/lcd.h.orig Sun Feb 26 20:11:02 2006 ++++ ./lcd.h.orig Sun Feb 26 20:11:01 2006 +@@ -79,4 +79,14 @@ class cLcd : public cThread { + bool channelSwitched; + }; + ++// Radiotext ++struct RadioTextService_v1_0 { ++ int rds_info; ++ int rds_pty; ++ char *rds_text; ++ char *rds_title; ++ char *rds_artist; ++ struct tm *title_start; ++}; ++ + #endif //__LCD_H diff --git a/patches/lcdproc-0.0.10-rtservice.diff b/patches/lcdproc-0.0.10-rtservice.diff new file mode 100644 index 0000000..f256ca2 --- /dev/null +++ b/patches/lcdproc-0.0.10-rtservice.diff @@ -0,0 +1,84 @@ +diff -Nru lcdproc-0.0.10.org/lcd.c lcdproc-0.0.10.diff/lcd.c +--- lcdproc-0.0.10.org/lcd.c 2004-01-17 17:40:28.000000000 +0100 ++++ lcdproc-0.0.10.diff/lcd.c 2006-01-07 11:48:29.000000000 +0100 +@@ -11,6 +11,7 @@ + #include "lcd.h" + #include "sockets.h" + #include "i18n.h" ++#include <vdr/plugin.h> + + #ifdef LCD_EXT_KEY_CONF + #include LCD_EXT_KEY_CONF +@@ -613,6 +614,8 @@ + bool Lcddirty[LCDMAXSTATES][4]; + bool LcdShiftkeyPressed=false; + char priostring[35]; ++ // RT ++ static int rtcycle; + + // backlight init + if ((lastBackLight=LcdSetup.BackLight)) +@@ -693,6 +696,7 @@ + SetRunning(false,tr("No EPG info available."), NULL); + if ((Present = Schedule->GetFollowingEvent()) != NULL) + nextLcdUpdate=(Present->GetTime()<nextLcdUpdate)?Present->GetTime():nextLcdUpdate; ++ rtcycle = 10; // RT + } + } + if ( nextLcdUpdate <= time(NULL) ) +@@ -724,6 +728,7 @@ + SetRunning(false,tr("No EPG info available."), NULL); + if ((Present = Schedule->GetFollowingEvent()) != NULL) + nextLcdUpdate=(Present->StartTime()<nextLcdUpdate)?Present->StartTime():nextLcdUpdate; ++ rtcycle = 10; // RT + } + } + if ( nextLcdUpdate <= time(NULL) ) +@@ -734,6 +739,29 @@ + + #endif + ++#if VDRVERSNUM >= 10330 ++ // get&display Radiotext ++ if (++rtcycle > 10) { // every 10 times ++ cPlugin *p; ++ p = cPluginManager::CallFirstService("RadioTextService-v1.0", NULL); ++ if (p) { ++ RadioTextService_v1_0 rtext; ++ if (cPluginManager::CallFirstService("RadioTextService-v1.0", &rtext)) { ++ if (rtext.rds_info == 2 && strstr(rtext.rds_title, "---") == NULL) { ++ char timestr[20]; ++ sprintf(timestr, "%02d:%02d", rtext.title_start->tm_hour, rtext.title_start->tm_min); ++ SetRunning(false, timestr, rtext.rds_title, rtext.rds_artist); ++ } ++ else if (rtext.rds_info > 0) { ++ SetRunning(false, NULL, rtext.rds_text); ++ } ++ } ++ } ++ rtcycle = 0; ++ //printf("lcdproc - get Radiotext ...\n"); ++ } ++#endif ++ + // replaying + + if ( (now.tv_usec < WakeUpCycle) && (replayDvbApi) ) { +diff -Nru lcdproc-0.0.10.org/lcd.h lcdproc-0.0.10.diff/lcd.h +--- lcdproc-0.0.10.org/lcd.h 2002-11-16 10:17:42.000000000 +0100 ++++ lcdproc-0.0.10.diff/lcd.h 2006-01-07 11:44:30.000000000 +0100 +@@ -77,4 +77,14 @@ + int closing ; + }; + ++// Radiotext ++struct RadioTextService_v1_0 { ++ int rds_info; ++ int rds_pty; ++ char *rds_text; ++ char *rds_title; ++ char *rds_artist; ++ struct tm *title_start; ++}; ++ + #endif //__LCD_H |