summaryrefslogtreecommitdiff
path: root/osdpip.c
diff options
context:
space:
mode:
authorAndreas Regel <andreas.regel@powarman.de>2008-04-27 18:44:00 +0200
committerAndreas Regel <andreas.regel@powarman.de>2008-04-27 18:44:00 +0200
commitcac6362d2207752926f9339c1c547d60d5c2a6a0 (patch)
treec8c4ae6d3b5e0bca179b3b28468f6aca736d14c7 /osdpip.c
parent4df61fcc16983f71ca5ab1d539840f7d04b9d48f (diff)
downloadvdr-plugin-osdpip-cac6362d2207752926f9339c1c547d60d5c2a6a0.tar.gz
vdr-plugin-osdpip-cac6362d2207752926f9339c1c547d60d5c2a6a0.tar.bz2
Release version 0.0.9v0.0.9
- dropped support for VDR version lower than 1.3.47. - Now using palette replacemen introduced in VDR 1.4.27, so palette setting workaround is not needed any longer. This simplifies code a bit. - added support for VDR 1.6. Now 1.4 and 1.6 are supported (tested with 1.4.7 and 1.6.0) - added gettext localization support introduced with VDR 1.5.7. - Do not decode B frames when dropping them. - Use cCondWait::SleepMs instead of usleep. - Fixed automatic closing of OSD after some minutes. - Fixed showing wrong channel information. - Added missing inclusion of <vdr/device.h>. - Added new colour reduction mode using 256 dithered colours (thanks to Martin Wache). - Added french translations (thanks to micky979)
Diffstat (limited to 'osdpip.c')
-rw-r--r--osdpip.c88
1 files changed, 48 insertions, 40 deletions
diff --git a/osdpip.c b/osdpip.c
index 6b73dde..3c9b7b2 100644
--- a/osdpip.c
+++ b/osdpip.c
@@ -15,32 +15,34 @@ extern "C"
#include "osd.h"
#include "setup.h"
+#if (APIVERSNUM < 10507)
#include "i18n.h"
+#endif
#include <vdr/plugin.h>
-static const char *VERSION = "0.0.8";
-static const char *DESCRIPTION = "OSD Picture-in-Picture";
-static const char *MAINMENUENTRY = "Picture-in-Picture";
+static const char *VERSION = "0.0.9";
+static const char *DESCRIPTION = trNOOP("OSD Picture-in-Picture");
+static const char *MAINMENUENTRY = trNOOP("Picture-in-Picture");
class cPluginOsdpip : public cPlugin
{
private:
-
+
public:
- cPluginOsdpip(void);
- virtual ~cPluginOsdpip();
- virtual const char *Version(void) { return VERSION; }
- virtual const char *Description(void) { return tr(DESCRIPTION); }
- virtual const char *CommandLineHelp(void);
- virtual bool ProcessArgs(int argc, char *argv[]);
- virtual bool Initialize(void);
- virtual bool Start(void);
- virtual void Housekeeping(void);
- virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
- virtual cOsdObject *MainMenuAction(void);
- virtual cMenuSetupPage *SetupMenu(void);
- virtual bool SetupParse(const char *Name, const char *Value);
+ cPluginOsdpip(void);
+ virtual ~cPluginOsdpip();
+ virtual const char *Version(void) { return VERSION; }
+ virtual const char *Description(void) { return tr(DESCRIPTION); }
+ virtual const char *CommandLineHelp(void);
+ virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual bool Initialize(void);
+ virtual bool Start(void);
+ virtual void Housekeeping(void);
+ virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
+ virtual cOsdObject *MainMenuAction(void);
+ virtual cMenuSetupPage *SetupMenu(void);
+ virtual bool SetupParse(const char *Name, const char *Value);
};
cPluginOsdpip::cPluginOsdpip(void)
@@ -53,28 +55,30 @@ cPluginOsdpip::~cPluginOsdpip()
const char *cPluginOsdpip::CommandLineHelp(void)
{
- return NULL;
+ return NULL;
}
bool cPluginOsdpip::ProcessArgs(int argc, char *argv[])
{
- return true;
+ return true;
}
bool cPluginOsdpip::Initialize(void)
{
- // must be called before using avcodec lib
- avcodec_init();
- // register all the codecs (you can also register only the codec
- // you wish to have smaller code)
- avcodec_register_all();
- return true;
+ // must be called before using avcodec lib
+ avcodec_init();
+ // register all the codecs (you can also register only the codec
+ // you wish to have smaller code)
+ avcodec_register_all();
+ return true;
}
bool cPluginOsdpip::Start(void)
{
- RegisterI18n(Phrases);
- return true;
+#if (APIVERSNUM < 10507)
+ RegisterI18n(Phrases);
+#endif
+ return true;
}
void cPluginOsdpip::Housekeeping(void)
@@ -83,27 +87,31 @@ void cPluginOsdpip::Housekeeping(void)
cOsdObject *cPluginOsdpip::MainMenuAction(void)
{
- const cChannel *chan;
- cDevice *dev;
-
- chan = cDevice::CurrentChannel() != 0
- ? Channels.GetByNumber(cDevice::CurrentChannel()) : NULL;
- if (chan != NULL) {
- dev = cDevice::GetDevice(chan, 1);
- if (dev)
- return new cOsdPipObject(dev, chan);
- }
- return NULL;
+ const cChannel *chan;
+ cDevice *dev;
+
+ chan = cDevice::CurrentChannel() != 0
+ ? Channels.GetByNumber(cDevice::CurrentChannel()) : NULL;
+ if (chan != NULL) {
+#if (APIVERSNUM < 10500)
+ dev = cDevice::GetDevice(chan, 1);
+#else
+ dev = cDevice::GetDevice(chan, 1, false);
+#endif
+ if (dev)
+ return new cOsdPipObject(dev, chan);
+ }
+ return NULL;
}
cMenuSetupPage *cPluginOsdpip::SetupMenu(void)
{
- return new cOsdPipSetupPage;
+ return new cOsdPipSetupPage;
}
bool cPluginOsdpip::SetupParse(const char *Name, const char *Value)
{
- return OsdPipSetup.SetupParse(Name, Value);
+ return OsdPipSetup.SetupParse(Name, Value);
}
VDRPLUGINCREATOR(cPluginOsdpip); // Don't touch this!