summaryrefslogtreecommitdiff
path: root/patches/lcdproc-0.0.10-rtservice.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/lcdproc-0.0.10-rtservice.diff')
-rw-r--r--patches/lcdproc-0.0.10-rtservice.diff84
1 files changed, 84 insertions, 0 deletions
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