summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--radio.c3
-rw-r--r--radioaudio.c2
-rw-r--r--radioaudio.h98
-rw-r--r--radiocheck.c5
-rw-r--r--radioimage.c1
-rw-r--r--radioimage.h24
-rw-r--r--radiotextosd.c1
-rw-r--r--radiotextosd.h48
-rw-r--r--rdsreceiver.c1
-rw-r--r--rdsreceiver.h31
-rw-r--r--rtpluslist.c1
-rw-r--r--rtpluslist.h25
-rw-r--r--rtplusosd.c2
-rw-r--r--rtplusosd.h30
14 files changed, 174 insertions, 98 deletions
diff --git a/radio.c b/radio.c
index 7f89f03..99c4a6f 100644
--- a/radio.c
+++ b/radio.c
@@ -19,6 +19,9 @@
#include "service.h"
#include "menusetupradio.h"
#include "radiocheck.h"
+#include "radioimage.h"
+#include "radiotextosd.h"
+#include "rtplusosd.h"
#if VDRVERSNUM < 10737
#error This version of radio-plugin requires vdr >= 1.7.37
diff --git a/radioaudio.c b/radioaudio.c
index 1823e26..ed931b5 100644
--- a/radioaudio.c
+++ b/radioaudio.c
@@ -11,6 +11,8 @@
#include "radioaudio.h"
#include "radioskin.h"
#include "radiotools.h"
+#include "radiotextosd.h"
+#include "rdsreceiver.h"
#include "service.h"
#include <math.h>
diff --git a/radioaudio.h b/radioaudio.h
index a09d189..b3797ba 100644
--- a/radioaudio.h
+++ b/radioaudio.h
@@ -16,6 +16,7 @@
#include <vdr/osd.h>
#include <vdr/menu.h>
#include <vdr/receiver.h>
+#include "radioimage.h"
extern char *ConfigDir;
extern char *DataDir;
@@ -60,41 +61,6 @@ extern bool InfoRequest;
void radioStatusMsg(void);
-// seperate thread for showing RadioImages
-class cRadioImage: public cThread {
-private:
- char *imagepath;
- bool imageShown;
- void Show (const char *file);
- void send_pes_packet(unsigned char *data, int len, int timestamp);
-protected:
- virtual void Action(void);
- void Stop(void);
-public:
- cRadioImage(void);
- virtual ~cRadioImage();
- static void Init(void);
- static void Exit(void);
- void SetBackgroundImage(const char *Image);
-};
-
-// RDS-Receiver for seperate Data-Pids
-class cRDSReceiver : public cReceiver {
-private:
- int pid;
- bool rt_start;
- bool rt_bstuff;
-protected:
-#if VDRVERSNUM >= 20300
- virtual void Receive(const uchar *Data, int Length);
-#else
- virtual void Receive(uchar *Data, int Length);
-#endif
-public:
- cRDSReceiver(int Pid);
- virtual ~cRDSReceiver(void);
-};
-
class cRadioAudio : public cAudio {
private:
bool enabled;
@@ -122,68 +88,6 @@ public:
void RDS_PsPtynDecode(bool PTYN, uchar *Data, int Length);
};
-class cRadioTextOsd : public cOsdObject, public cCharSetConv {
-private:
- cOsd *osd;
- cOsd *qosd;
- cOsd *qiosd;
- const cFont *ftitel;
- const cFont *ftext;
- int fheight;
- int bheight;
- eKeys LastKey;
- cTimeMs osdtimer;
- void rtp_print(void);
- bool rtclosed;
- bool rassclosed;
- static cBitmap rds, arec, rass, radio;
- static cBitmap index, marker, page1, pages2, pages3, pages4, pageE;
- static cBitmap no0, no1, no2, no3, no4, no5, no6, no7, no8, no9, bok;
-public:
- cRadioTextOsd();
- ~cRadioTextOsd();
- virtual void Hide(void);
- virtual void Show(void);
- void ShowText(void);
- void RTOsdClose(void);
- int RassImage(int QArchiv, int QKey, bool DirUp);
- void RassOsd(void);
- void RassOsdTip(void);
- void RassOsdClose(void);
- void RassImgSave(const char *size, int pos);
- virtual eOSState ProcessKey(eKeys Key);
- virtual bool IsMenu(void) const { return false; }
-};
-
-class cRTplusOsd : public cOsdMenu, public cCharSetConv {
-private:
- int bcount;
- int helpmode;
- const char *listtyp[7];
- char *btext[7];
- int rtptyp(char *btext);
- void rtp_fileprint(void);
-public:
- cRTplusOsd(void);
- virtual ~cRTplusOsd();
- virtual void Load(void);
- virtual void Update(void);
- virtual eOSState ProcessKey(eKeys Key);
-};
-
-class cRTplusList : public cOsdMenu, public cCharSetConv {
-private:
- int typ;
- bool refresh;
-public:
- cRTplusList(int Typ = 0);
- ~cRTplusList();
- virtual void Load(void);
- virtual void Update(void);
- virtual eOSState ProcessKey(eKeys Key);
-};
-
-
// Radiotext-Memory RT+Classes 2.1
#define MAX_RTPC 50
struct rtp_classes {
diff --git a/radiocheck.c b/radiocheck.c
index d0a8d2e..79b39cb 100644
--- a/radiocheck.c
+++ b/radiocheck.c
@@ -150,11 +150,14 @@ void cRadioCheck::Action(void)
// temp. OSD-CloseTimeout
(RT_OsdTOTemp > 0) ? RT_OsdTOTemp -= 2 : RT_OsdTOTemp = 0; // in sec like this cycletime
-
+// TODO
+esyslog("%s %d cOsd::IsOpen %d Skins.IsOpen %d", __FILE__, __LINE__,
+ cOsd::IsOpen(), Skins.IsOpen());
// Radiotext-Autodisplay
if ((S_RtDispl == 2) && (RT_Info >= 0) && !RT_OsdTO
&& (RT_OsdTOTemp == 0) && RT_ReOpen && !Skins.IsOpen()
&& !cOsd::IsOpen()) {
+esyslog("CallPlugin(radio)"); // TODO
cRemote::CallPlugin("radio");
}
}
diff --git a/radioimage.c b/radioimage.c
index a27b828..d9cd065 100644
--- a/radioimage.c
+++ b/radioimage.c
@@ -1,6 +1,7 @@
#include <vdr/remote.h>
#include <vdr/status.h>
#include <vdr/plugin.h>
+#include "radioimage.h"
#include "radioaudio.h"
#include "radioskin.h"
#include "radiotools.h"
diff --git a/radioimage.h b/radioimage.h
new file mode 100644
index 0000000..8a1bae7
--- /dev/null
+++ b/radioimage.h
@@ -0,0 +1,24 @@
+#ifndef __RADIO_IMAGE_H
+#define __RADIO_IMAGE_H
+
+#include <vdr/thread.h>
+
+// Separate thread for showing RadioImages
+class cRadioImage: public cThread {
+private:
+ char *imagepath;
+ bool imageShown;
+ void Show (const char *file);
+ void send_pes_packet(unsigned char *data, int len, int timestamp);
+protected:
+ virtual void Action(void);
+ void Stop(void);
+public:
+ cRadioImage(void);
+ virtual ~cRadioImage();
+ static void Init(void);
+ static void Exit(void);
+ void SetBackgroundImage(const char *Image);
+};
+
+#endif
diff --git a/radiotextosd.c b/radiotextosd.c
index 72c7fda..31ab563 100644
--- a/radiotextosd.c
+++ b/radiotextosd.c
@@ -12,6 +12,7 @@
#include "radioskin.h"
#include "radiotools.h"
#include "service.h"
+#include "radiotextosd.h"
#include <math.h>
// OSD-Symbols
diff --git a/radiotextosd.h b/radiotextosd.h
new file mode 100644
index 0000000..04e3e5a
--- /dev/null
+++ b/radiotextosd.h
@@ -0,0 +1,48 @@
+/*
+ * radiotextosd.h
+ *
+ * Created on: 27.05.2018
+ * Author: uli
+ */
+
+#ifndef __RADIOTEXTOSD_H_
+#define __RADIOTEXTOSD_H_
+
+#include <vdr/osdbase.h>
+
+class cRadioTextOsd : public cOsdObject, public cCharSetConv {
+private:
+ cOsd *osd;
+ cOsd *qosd;
+ cOsd *qiosd;
+ const cFont *ftitel;
+ const cFont *ftext;
+ int fheight;
+ int bheight;
+ eKeys LastKey;
+ cTimeMs osdtimer;
+ void rtp_print(void);
+ bool rtclosed;
+ bool rassclosed;
+ static cBitmap rds, arec, rass, radio;
+ static cBitmap index, marker, page1, pages2, pages3, pages4, pageE;
+ static cBitmap no0, no1, no2, no3, no4, no5, no6, no7, no8, no9, bok;
+public:
+ cRadioTextOsd();
+ ~cRadioTextOsd();
+ virtual void Hide(void);
+ virtual void Show(void);
+ void ShowText(void);
+ void RTOsdClose(void);
+ int RassImage(int QArchiv, int QKey, bool DirUp);
+ void RassOsd(void);
+ void RassOsdTip(void);
+ void RassOsdClose(void);
+ void RassImgSave(const char *size, int pos);
+ virtual eOSState ProcessKey(eKeys Key);
+ virtual bool IsMenu(void) const { return false; }
+};
+
+
+
+#endif /* RADIOTEXTOSD_H_ */
diff --git a/rdsreceiver.c b/rdsreceiver.c
index 8c95474..63bbeac 100644
--- a/rdsreceiver.c
+++ b/rdsreceiver.c
@@ -6,6 +6,7 @@
#include "radiotools.h"
#include "service.h"
#include <math.h>
+#include "rdsreceiver.h"
extern bool RdsLogo;
extern cRadioAudio *RadioAudio;
diff --git a/rdsreceiver.h b/rdsreceiver.h
new file mode 100644
index 0000000..8b65c8b
--- /dev/null
+++ b/rdsreceiver.h
@@ -0,0 +1,31 @@
+/*
+ * rdsreceiver.h
+ *
+ * Created on: 27.05.2018
+ * Author: uli
+ */
+
+#ifndef __RDSRECEIVER_H_
+#define __RDSRECEIVER_H_
+
+#include <vdr/receiver.h>
+
+// RDS-Receiver for seperate Data-Pids
+class cRDSReceiver : public cReceiver {
+private:
+ int pid;
+ bool rt_start;
+ bool rt_bstuff;
+protected:
+#if VDRVERSNUM >= 20300
+ virtual void Receive(const uchar *Data, int Length);
+#else
+ virtual void Receive(uchar *Data, int Length);
+#endif
+public:
+ cRDSReceiver(int Pid);
+ virtual ~cRDSReceiver(void);
+};
+
+
+#endif /* __RDSRECEIVER_H_ */
diff --git a/rtpluslist.c b/rtpluslist.c
index 97eb374..d7f4728 100644
--- a/rtpluslist.c
+++ b/rtpluslist.c
@@ -4,6 +4,7 @@
#include "radioaudio.h"
#include "radioskin.h"
#include "radiotools.h"
+#include "rtpluslist.h"
#include "service.h"
#include <math.h>
diff --git a/rtpluslist.h b/rtpluslist.h
new file mode 100644
index 0000000..02463a0
--- /dev/null
+++ b/rtpluslist.h
@@ -0,0 +1,25 @@
+/*
+ * rtpluslist.h
+ *
+ * Created on: 27.05.2018
+ * Author: uli
+ */
+
+#ifndef __RTPLUSLIST_H_
+#define __RTPLUSLIST_H_
+
+#include <vdr/osdbase.h>
+
+class cRTplusList : public cOsdMenu, public cCharSetConv {
+private:
+ int typ;
+ bool refresh;
+public:
+ cRTplusList(int Typ = 0);
+ ~cRTplusList();
+ virtual void Load(void);
+ virtual void Update(void);
+ virtual eOSState ProcessKey(eKeys Key);
+};
+
+#endif /* RTPLUSLIST_H_ */
diff --git a/rtplusosd.c b/rtplusosd.c
index 86a2cb7..61d2ed3 100644
--- a/rtplusosd.c
+++ b/rtplusosd.c
@@ -4,6 +4,8 @@
#include "radioaudio.h"
#include "radioskin.h"
#include "radiotools.h"
+#include "rtplusosd.h"
+#include "rtpluslist.h"
#include "service.h"
#include <math.h>
diff --git a/rtplusosd.h b/rtplusosd.h
new file mode 100644
index 0000000..e58beeb
--- /dev/null
+++ b/rtplusosd.h
@@ -0,0 +1,30 @@
+/*
+ * rtplusosd.h
+ *
+ * Created on: 27.05.2018
+ * Author: uli
+ */
+
+#ifndef __RTPLUSOSD_H_
+#define __RTPLUSOSD_H_
+
+#include <vdr/osdbase.h>
+
+class cRTplusOsd : public cOsdMenu, public cCharSetConv {
+private:
+ int bcount;
+ int helpmode;
+ const char *listtyp[7];
+ char *btext[7];
+ int rtptyp(char *btext);
+ void rtp_fileprint(void);
+public:
+ cRTplusOsd(void);
+ virtual ~cRTplusOsd();
+ virtual void Load(void);
+ virtual void Update(void);
+ virtual eOSState ProcessKey(eKeys Key);
+};
+
+
+#endif /* RTPLUSOSD_H_ */