summaryrefslogtreecommitdiff
path: root/PLUGINS/SRC/status/status.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-06-16 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-06-16 18:00:00 +0200
commitf06d2c27fca449148d9d8fac19d81c668744f170 (patch)
tree8f21a604339719672bf7ab8b6e9d69bfa1817ac5 /PLUGINS/SRC/status/status.c
parentd07e3829f7c44d713b2677ef73f864af80b3dea3 (diff)
downloadvdr-patch-lnbsharing-f06d2c27fca449148d9d8fac19d81c668744f170.tar.gz
vdr-patch-lnbsharing-f06d2c27fca449148d9d8fac19d81c668744f170.tar.bz2
Version 1.1.3vdr-1.1.3
- Improved the VDR Makefile to avoid a warning if the '.dependencies' file does not exist, and also using $(MAKE) to call recursive makes. - Changed the name of the 'package' target in the plugin Makefiles to 'dist' (following the suggestions in the "GNU Make" manual). If you already have started a plugin project, you may want to change this in your Makefile accordingly. - Improved the plugin Makefile to avoid a warning if the '.dependencies' file does not exist, and also using $(shell...) to get the version numbers. If you already have started a plugin project, you may want to change this in your Makefile accordingly. - Fixed some function headers to make them compile with gcc 3.x (thanks to Gregoire Favre). - Fixed the cutting mechanism to make it re-sync in case a frame is larger than the buffer (thanks to Sven Grothklags). - Added an error message if the directory specified in the '-L' option can't be accessed (suggested by Stefan Huelswitt). - Rearranged OSD class names to make 'cOsd' available for the main OSD interface. - Completely moved OSD handling out of the cDvbApi class, into the new cOsd. - Implemented cStatus to allow plugins to set up a status monitor. See PLUGINS.html for details. - Moved the cEITScanner out of dvbapi.h/.c, into the new eitscan.h/.c. - Added Swedish language texts (thanks to Tomas Prybil). - Fixed parsing 'E' records in epg2html.pl (thanks to Matthias Fechner for pointing out this one). - Removed compiler option '-m486' to make it work on non-Intel platforms. If you have already started a plugin project, you may want to make sure you remove this option from your existing Makefile. - Completely rearranged the recording and replay functions to make them available to plugins. - Replay is now done in a single thread (no more syncing between input and output thread necessary). - It is now possible to record several channels on the same transponder with "budget cards". VDR automatically attaches a recording timer to a card that already records on the appropriate transponder. How many parallel recordings can actually be done depends on the computer's performance. Currently any number of recordings gets attached to a card, so you should carefully plan your timers to not exceed the limit. On a K6-II/450 it was possible to record three channels from transponder 12480 with a single WinTV NOVA-S. - Timers that record two successive shows on the same channel may now overlap and will use the same DVB card. During the time where both timers record the data is simply saved to both files. - The following limitations apply to this version: + Transfer mode doesn't work yet. + The '-a' option (for Dolby Digital audio) doesn't work yet. + Switching between different language tracks doesn't work yet. + Cutting doesn't work yet.
Diffstat (limited to 'PLUGINS/SRC/status/status.c')
-rw-r--r--PLUGINS/SRC/status/status.c179
1 files changed, 179 insertions, 0 deletions
diff --git a/PLUGINS/SRC/status/status.c b/PLUGINS/SRC/status/status.c
new file mode 100644
index 0000000..c9c494a
--- /dev/null
+++ b/PLUGINS/SRC/status/status.c
@@ -0,0 +1,179 @@
+/*
+ * status.c: A plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id$
+ */
+
+#include <vdr/plugin.h>
+#include <vdr/status.h>
+
+static const char *VERSION = "0.0.1";
+static const char *DESCRIPTION = "Status monitor test";
+static const char *MAINMENUENTRY = NULL;
+
+// ---
+
+class cStatusTest : public cStatus {
+protected:
+ virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
+ virtual void Recording(const cDevice *Device, const char *Name);
+ virtual void Replaying(const cDvbPlayerControl *DvbPlayerControl, const char *Name);
+ virtual void SetVolume(int Volume, bool Absolute);
+ virtual void OsdClear(void);
+ virtual void OsdTitle(const char *Title);
+ virtual void OsdStatusMessage(const char *Message);
+ virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue);
+ virtual void OsdCurrentItem(const char *Text);
+ virtual void OsdTextItem(const char *Text, bool Scroll);
+ virtual void OsdChannel(const char *Text);
+ virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle);
+ };
+
+void cStatusTest::ChannelSwitch(const cDevice *Device, int ChannelNumber)
+{
+ dsyslog("status: cStatusTest::ChannelSwitch %d %d", Device->CardIndex(), ChannelNumber);
+}
+
+void cStatusTest::Recording(const cDevice *Device, const char *Name)
+{
+ dsyslog("status: cStatusTest::Recording %d %s", Device->CardIndex(), Name);
+}
+
+void cStatusTest::Replaying(const cDvbPlayerControl *DvbPlayerControl, const char *Name)
+{
+ dsyslog("status: cStatusTest::Replaying %s", Name);
+}
+
+void cStatusTest::SetVolume(int Volume, bool Absolute)
+{
+ dsyslog("status: cStatusTest::SetVolume %d %d", Volume, Absolute);
+}
+
+void cStatusTest::OsdClear(void)
+{
+ dsyslog("status: cStatusTest::OsdClear");
+}
+
+void cStatusTest::OsdTitle(const char *Title)
+{
+ dsyslog("status: cStatusTest::OsdTitle '%s'", Title);
+}
+
+void cStatusTest::OsdStatusMessage(const char *Message)
+{
+ dsyslog("status: cStatusTest::OsdStatusMessage '%s'", Message);
+}
+
+void cStatusTest::OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
+{
+ dsyslog("status: cStatusTest::OsdHelpKeys %s - %s - %s - %s", Red, Green, Yellow, Blue);
+}
+
+void cStatusTest::OsdCurrentItem(const char *Text)
+{
+ dsyslog("status: cStatusTest::OsdCurrentItem %s", Text);
+}
+
+void cStatusTest::OsdTextItem(const char *Text, bool Scroll)
+{
+ dsyslog("status: cStatusTest::OsdTextItem %s %d", Text, Scroll);
+}
+
+void cStatusTest::OsdChannel(const char *Text)
+{
+ dsyslog("status: cStatusTest::OsdChannel %s", Text);
+}
+
+void cStatusTest::OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
+{
+ char buffer[25];
+ struct tm tm_r;
+ dsyslog("status: cStatusTest::OsdProgramme");
+ strftime(buffer, sizeof(buffer), "%R", localtime_r(&PresentTime, &tm_r));
+ dsyslog("%5s %s", buffer, PresentTitle);
+ dsyslog("%5s %s", "", PresentSubtitle);
+ strftime(buffer, sizeof(buffer), "%R", localtime_r(&FollowingTime, &tm_r));
+ dsyslog("%5s %s", buffer, FollowingTitle);
+ dsyslog("%5s %s", "", FollowingSubtitle);
+}
+
+// ---
+
+class cPluginStatus : public cPlugin {
+private:
+ // Add any member variables or functions you may need here.
+ cStatusTest *statusTest;
+public:
+ cPluginStatus(void);
+ virtual ~cPluginStatus();
+ virtual const char *Version(void) { return VERSION; }
+ virtual const char *Description(void) { return DESCRIPTION; }
+ virtual const char *CommandLineHelp(void);
+ virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual bool Start(void);
+ virtual void Housekeeping(void);
+ virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
+ virtual cOsdMenu *MainMenuAction(void);
+ virtual cMenuSetupPage *SetupMenu(void);
+ virtual bool SetupParse(const char *Name, const char *Value);
+ };
+
+cPluginStatus::cPluginStatus(void)
+{
+ // Initialize any member varaiables here.
+ // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
+ // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
+ statusTest = NULL;
+}
+
+cPluginStatus::~cPluginStatus()
+{
+ // Clean up after yourself!
+ delete statusTest;
+}
+
+const char *cPluginStatus::CommandLineHelp(void)
+{
+ // Return a string that describes all known command line options.
+ return NULL;
+}
+
+bool cPluginStatus::ProcessArgs(int argc, char *argv[])
+{
+ // Implement command line argument processing here if applicable.
+ return true;
+}
+
+bool cPluginStatus::Start(void)
+{
+ // Start any background activities the plugin shall perform.
+ statusTest = new cStatusTest;
+ return true;
+}
+
+void cPluginStatus::Housekeeping(void)
+{
+ // Perform any cleanup or other regular tasks.
+}
+
+cOsdMenu *cPluginStatus::MainMenuAction(void)
+{
+ // Perform the action when selected from the main VDR menu.
+ return NULL;
+}
+
+cMenuSetupPage *cPluginStatus::SetupMenu(void)
+{
+ // Return a setup menu in case the plugin supports one.
+ return NULL;
+}
+
+bool cPluginStatus::SetupParse(const char *Name, const char *Value)
+{
+ // Parse your own setup parameters and store their values.
+ return false;
+}
+
+VDRPLUGINCREATOR(cPluginStatus); // Don't touch this!