1.1 --- a/HISTORY Tue Feb 03 12:28:53 2009 +0800
1.2 +++ b/HISTORY Tue Feb 03 20:33:04 2009 +0800
1.3 @@ -13,6 +13,7 @@
1.4 Dauskardt.
1.5 - Backward compatible on-the-fly creation of the i18n.c file using Udo Richter's
1.6 po2i18n package.
1.7 +- Removed compatibility with VDR versions < 1.4.5.
1.8 - Added italian translations.
1.9 - Updated french and russian translations.
1.10
2.1 --- a/Makefile Tue Feb 03 12:28:53 2009 +0800
2.2 +++ b/Makefile Tue Feb 03 20:33:04 2009 +0800
2.3 @@ -130,10 +130,6 @@
2.4 setup-mplayer.o player-mplayer.o
2.5 LIBS2 =
2.6
2.7 -ifeq ($(shell test -f $(VDRDIR)/fontsym.h ; echo $$?),0)
2.8 - DEFINES += -DHAVE_BEAUTYPATCH
2.9 -endif
2.10 -
2.11 ifdef DBG
2.12 CXXFLAGS += -g
2.13 endif
3.1 --- a/common.h Tue Feb 03 12:28:53 2009 +0800
3.2 +++ b/common.h Tue Feb 03 20:33:04 2009 +0800
3.3 @@ -1,7 +1,7 @@
3.4 /*
3.5 * MP3/MPlayer plugin to VDR (C++)
3.6 *
3.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
3.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
3.9 *
3.10 * This code is free software; you can redistribute it and/or
3.11 * modify it under the terms of the GNU General Public License
3.12 @@ -31,23 +31,13 @@
3.13 #endif
3.14 #include "config.h"
3.15
3.16 -#if APIVERSNUM >= 10313
3.17 #define SLEEP(x) cCondWait::SleepMs(x)
3.18 -#else
3.19 -#define SLEEP(x) usleep((x)*1000)
3.20 -#endif
3.21
3.22 -#if APIVERSNUM >= 10318
3.23 #include <vdr/tools.h>
3.24 static cTimeMs __time;
3.25 #define time_ms() ((int)__time.Elapsed())
3.26 -#endif
3.27
3.28 -#if APIVERSNUM >= 10338
3.29 #define BUTTON "Button$"
3.30 -#else
3.31 -#define BUTTON
3.32 -#endif
3.33
3.34 #if !defined(NO_DEBUG) && defined(DEBUG)
3.35 #define d(x) { (x); }
4.1 --- a/data-mp3.c Tue Feb 03 12:28:53 2009 +0800
4.2 +++ b/data-mp3.c Tue Feb 03 20:33:04 2009 +0800
4.3 @@ -1,7 +1,7 @@
4.4 /*
4.5 * MP3/MPlayer plugin to VDR (C++)
4.6 *
4.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
4.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
4.9 *
4.10 * This code is free software; you can redistribute it and/or
4.11 * modify it under the terms of the GNU General Public License
4.12 @@ -141,18 +141,10 @@
4.13 obj->Source()->Block();
4.14 }
4.15
4.16 -#if APIVERSNUM >= 10315
4.17 int cSong::Compare(const cListObject &ListObject) const
4.18 -#else
4.19 -bool cSong::operator<(const cListObject &ListObject)
4.20 -#endif
4.21 {
4.22 cSong *song=(cSong *)&ListObject;
4.23 -#if APIVERSNUM >= 10315
4.24 return strcasecmp(obj->Path(),song->obj->Path());
4.25 -#else
4.26 - return strcasecmp(obj->Path(),song->obj->Path())<0;
4.27 -#endif
4.28 }
4.29
4.30 cSongInfo *cSong::Info(bool get)
4.31 @@ -405,18 +397,10 @@
4.32 }
4.33 }
4.34
4.35 -#if APIVERSNUM >= 10315
4.36 int cPlayList::Compare(const cListObject &ListObject) const
4.37 -#else
4.38 -bool cPlayList::operator<(const cListObject &ListObject)
4.39 -#endif
4.40 {
4.41 cPlayList *list=(cPlayList *)&ListObject;
4.42 -#if APIVERSNUM >= 10315
4.43 return strcasecmp(obj->Name(),list->obj->Name());
4.44 -#else
4.45 - return strcasecmp(obj->Name(),list->obj->Name())<0;
4.46 -#endif
4.47 }
4.48
4.49 bool cPlayList::Load(void)
5.1 --- a/data-mp3.h Tue Feb 03 12:28:53 2009 +0800
5.2 +++ b/data-mp3.h Tue Feb 03 20:33:04 2009 +0800
5.3 @@ -1,7 +1,7 @@
5.4 /*
5.5 * MP3/MPlayer plugin to VDR (C++)
5.6 *
5.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
5.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
5.9 *
5.10 * This code is free software; you can redistribute it and/or
5.11 * modify it under the terms of the GNU General Public License
5.12 @@ -59,11 +59,7 @@
5.13 cSong(cFileSource *Source, const char *Subdir, const char *Name);
5.14 cSong(cSong *Song);
5.15 ~cSong();
5.16 -#if APIVERSNUM >= 10315
5.17 virtual int Compare(const cListObject &ListObject) const;
5.18 -#else
5.19 - virtual bool operator<(const cListObject &ListObject);
5.20 -#endif
5.21 bool Parse(char *s, const char *reldir) const;
5.22 bool Save(FILE *f, const char *reldir) const;
5.23 void Convert(void);
5.24 @@ -94,11 +90,7 @@
5.25 ~cPlayList();
5.26 virtual bool Load(void);
5.27 virtual bool Save(void);
5.28 -#if APIVERSNUM >= 10315
5.29 virtual int Compare(const cListObject &ListObject) const;
5.30 -#else
5.31 - virtual bool operator<(const cListObject &ListObject);
5.32 -#endif
5.33 //
5.34 bool Rename(const char *newName);
5.35 bool Delete(void);
6.1 --- a/data.c Tue Feb 03 12:28:53 2009 +0800
6.2 +++ b/data.c Tue Feb 03 20:33:04 2009 +0800
6.3 @@ -1,7 +1,7 @@
6.4 /*
6.5 * MP3/MPlayer plugin to VDR (C++)
6.6 *
6.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
6.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
6.9 *
6.10 * This code is free software; you can redistribute it and/or
6.11 * modify it under the terms of the GNU General Public License
6.12 @@ -185,7 +185,6 @@
6.13 free(fpath);
6.14 }
6.15
6.16 -#if APIVERSNUM >= 10315
6.17 int cFileObj::Compare(const cListObject &ListObject) const
6.18 {
6.19 cFileObj *obj=(cFileObj *)&ListObject;
6.20 @@ -199,21 +198,6 @@
6.21 }
6.22 return strcasecmp(path,obj->path);
6.23 }
6.24 -#else
6.25 -bool cFileObj::operator<(const cListObject &ListObject)
6.26 -{
6.27 - cFileObj *obj=(cFileObj *)&ListObject;
6.28 - if(type==otParent) return obj->type==otParent ? false:true;
6.29 - if(obj->type==otParent) return false;
6.30 - if(type==otBase) return false;
6.31 - if(obj->type==otBase) return true;
6.32 - if(type!=obj->type) {
6.33 - if(type==otFile) return false;
6.34 - return true;
6.35 - }
6.36 - return strcasecmp(path,obj->path)<0;
6.37 -}
6.38 -#endif
6.39
6.40 void cFileObj::SplitAndSet(const char *Path)
6.41 {
7.1 --- a/data.h Tue Feb 03 12:28:53 2009 +0800
7.2 +++ b/data.h Tue Feb 03 20:33:04 2009 +0800
7.3 @@ -1,7 +1,7 @@
7.4 /*
7.5 * MP3/MPlayer plugin to VDR (C++)
7.6 *
7.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
7.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
7.9 *
7.10 * This code is free software; you can redistribute it and/or
7.11 * modify it under the terms of the GNU General Public License
7.12 @@ -59,11 +59,7 @@
7.13 cFileObj(cFileSource *Source, const char *Subdir, const char *Name, const eObjType Type);
7.14 cFileObj(const cFileObj *obj);
7.15 virtual ~cFileObj();
7.16 -#if APIVERSNUM >= 10315
7.17 virtual int Compare(const cListObject &ListObject) const;
7.18 -#else
7.19 - virtual bool operator<(const cListObject &ListObject);
7.20 -#endif
7.21 void SetName(const char *Name);
7.22 void SplitAndSet(const char *Path);
7.23 bool GuessType(void);
8.1 --- a/menu.c Tue Feb 03 12:28:53 2009 +0800
8.2 +++ b/menu.c Tue Feb 03 20:33:04 2009 +0800
8.3 @@ -1,7 +1,7 @@
8.4 /*
8.5 * MP3/MPlayer plugin to VDR (C++)
8.6 *
8.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
8.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
8.9 *
8.10 * This code is free software; you can redistribute it and/or
8.11 * modify it under the terms of the GNU General Public License
8.12 @@ -39,32 +39,17 @@
8.13
8.14 void Status(const char *text)
8.15 {
8.16 -#if APIVERSNUM >= 10307
8.17 Skins.Message(mtStatus,text);
8.18 -#else
8.19 - if(text) {
8.20 - Interface->Status(text);
8.21 - Interface->Flush();
8.22 - }
8.23 -#endif
8.24 }
8.25
8.26 void Error(const char *text)
8.27 {
8.28 -#if APIVERSNUM >= 10307
8.29 Skins.Message(mtError,text);
8.30 -#else
8.31 - Interface->Error(text);
8.32 -#endif
8.33 }
8.34
8.35 void Info(const char *text)
8.36 {
8.37 -#if APIVERSNUM >= 10307
8.38 Skins.Message(mtInfo,text);
8.39 -#else
8.40 - Interface->Info(text);
8.41 -#endif
8.42 }
8.43
8.44 // --- cMenuBrowseItem ---------------------------------------------------------
8.45 @@ -390,13 +375,8 @@
8.46 {
8.47 if(Total > 0) {
8.48 int p = Current * Width / Total;;
8.49 -#if APIVERSNUM >= 10307
8.50 DrawRectangle(0, 0, p, Height - 1, clrGreen);
8.51 DrawRectangle(p + 1, 0, Width - 1, Height - 1, clrWhite);
8.52 -#else
8.53 - Fill(0, 0, p, Height - 1, clrGreen);
8.54 - Fill(p + 1, 0, Width - 1, Height - 1, clrWhite);
8.55 -#endif
8.56 - }
8.57 -}
8.58 -
8.59 + }
8.60 +}
8.61 +
9.1 --- a/menu.h Tue Feb 03 12:28:53 2009 +0800
9.2 +++ b/menu.h Tue Feb 03 20:33:04 2009 +0800
9.3 @@ -1,7 +1,7 @@
9.4 /*
9.5 * MP3/MPlayer plugin to VDR (C++)
9.6 *
9.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
9.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
9.9 *
9.10 * This code is free software; you can redistribute it and/or
9.11 * modify it under the terms of the GNU General Public License
9.12 @@ -23,11 +23,7 @@
9.13 #define ___MENU_H
9.14
9.15 #include "common.h"
9.16 -#if APIVERSNUM >= 10307
9.17 #include <vdr/osdbase.h>
9.18 -#else
9.19 -#include <vdr/osd.h>
9.20 -#endif
9.21
9.22 // ----------------------------------------------------------------
9.23
10.1 --- a/mp3.c Tue Feb 03 12:28:53 2009 +0800
10.2 +++ b/mp3.c Tue Feb 03 20:33:04 2009 +0800
10.3 @@ -1,7 +1,7 @@
10.4 /*
10.5 * MP3/MPlayer plugin to VDR (C++)
10.6 *
10.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
10.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
10.9 *
10.10 * This code is free software; you can redistribute it and/or
10.11 * modify it under the terms of the GNU General Public License
10.12 @@ -29,10 +29,8 @@
10.13 #include <vdr/menuitems.h>
10.14 #include <vdr/status.h>
10.15 #include <vdr/plugin.h>
10.16 -#if APIVERSNUM >= 10307
10.17 #include <vdr/interface.h>
10.18 #include <vdr/skins.h>
10.19 -#endif
10.20
10.21 #include "setup.h"
10.22 #include "setup-mp3.h"
10.23 @@ -88,11 +86,9 @@
10.24 Add(new cMenuEditStraItem(tr("Setup.MP3$Audio output mode"), &amode,numModes,aout));
10.25 Add(new cMenuEditBoolItem(tr("Setup.MP3$Audio mode"), &data.AudioMode, tr("Round"), tr("Dither")));
10.26 Add(new cMenuEditBoolItem(tr("Setup.MP3$Use 48kHz mode only"), &data.Only48kHz));
10.27 -#if APIVERSNUM >= 10307
10.28 disp[0]=tr("classic");
10.29 disp[1]=tr("via skin");
10.30 Add(new cMenuEditStraItem(tr("Setup.MP3$Replay display"), &data.ReplayDisplay, 2, disp));
10.31 -#endif
10.32 Add(new cMenuEditIntItem( tr("Setup.MP3$Display mode"), &data.DisplayMode, 1, 3));
10.33 bgr[0]=tr("Black");
10.34 bgr[1]=tr("Live");
10.35 @@ -147,9 +143,7 @@
10.36 SetupStore("CddbHost", MP3Setup.CddbHost );
10.37 SetupStore("CddbPort", MP3Setup.CddbPort );
10.38 SetupStore("AbortAtEOL", MP3Setup.AbortAtEOL );
10.39 -#if APIVERSNUM >= 10307
10.40 SetupStore("ReplayDisplay", MP3Setup.ReplayDisplay );
10.41 -#endif
10.42 SetupStore("HideMainMenu", MP3Setup.HideMainMenu );
10.43 SetupStore("KeepSelect", MP3Setup.KeepSelect );
10.44 SetupStore("TitleArtistOrder", MP3Setup.TitleArtistOrder);
10.45 @@ -208,25 +202,13 @@
10.46
10.47 // --- cMP3Control --------------------------------------------------------
10.48
10.49 -#if APIVERSNUM >= 10307
10.50 -#define clrBackground clrGray50
10.51 -#define eDvbColor int
10.52 #define MAXROWS 120
10.53 -#define INLINE
10.54 -#else
10.55 -#define MAXROWS MAXOSDHEIGHT
10.56 -#define INLINE inline
10.57 -#endif
10.58
10.59 class cMP3Control : public cControl {
10.60 private:
10.61 -#if APIVERSNUM >= 10307
10.62 cOsd *osd;
10.63 const cFont *font;
10.64 cSkinDisplayReplay *disp;
10.65 -#else
10.66 - bool statusInterfaceOpen;
10.67 -#endif
10.68 int bw, bh, bwc, fw, fh;
10.69 //
10.70 cMP3Player *player;
10.71 @@ -254,8 +236,8 @@
10.72 void JumpProcess(eKeys Key);
10.73 void Jump(void);
10.74 void Stop(void);
10.75 - INLINE void Write(int x, int y, int w, const char *text, eDvbColor fg=clrWhite, eDvbColor bg=clrBackground);
10.76 - INLINE void Fill(int x, int y, int w, int h, eDvbColor fg);
10.77 + void Write(int x, int y, int w, const char *text, int fg=clrWhite, int bg=clrGray50);
10.78 + void Fill(int x, int y, int w, int h, int fg);
10.79 inline void Flush(void);
10.80 public:
10.81 cMP3Control(void);
10.82 @@ -275,17 +257,9 @@
10.83 lastkeytime=number=0;
10.84 lastMode=0;
10.85 framesPerSecond=SecondsToFrames(1);
10.86 -#if APIVERSNUM >= 10307
10.87 osd=0; disp=0;
10.88 font=cFont::GetFont(fontOsd);
10.89 -#else
10.90 - statusInterfaceOpen=false;
10.91 -#endif
10.92 -#if APIVERSNUM >= 10338
10.93 cStatus::MsgReplaying(this,"MP3",0,true);
10.94 -#else
10.95 - cStatus::MsgReplaying(this,"MP3");
10.96 -#endif
10.97 }
10.98
10.99 cMP3Control::~cMP3Control()
10.100 @@ -297,11 +271,7 @@
10.101
10.102 void cMP3Control::Stop(void)
10.103 {
10.104 -#if APIVERSNUM >= 10338
10.105 cStatus::MsgReplaying(this,0,0,false);
10.106 -#else
10.107 - cStatus::MsgReplaying(this,0);
10.108 -#endif
10.109 delete player; player=0;
10.110 mgr->Halt();
10.111 mgr->Flush(); //XXX remove later
10.112 @@ -340,12 +310,8 @@
10.113 HideStatus();
10.114 timeoutShow=0;
10.115 if(visible) {
10.116 -#if APIVERSNUM >= 10307
10.117 delete osd; osd=0;
10.118 delete disp; disp=0;
10.119 -#else
10.120 - Interface->Close();
10.121 -#endif
10.122 visible=bigwin=false;
10.123 #if APIVERSNUM >= 10500
10.124 SetNeedsFastResponse(false);
10.125 @@ -360,7 +326,6 @@
10.126 if((asyncStatus.Changed() || (force && !statusActive)) && !jumpactive) {
10.127 const char *text=asyncStatus.Begin();
10.128 if(text) {
10.129 -#if APIVERSNUM >= 10307
10.130 if(MP3Setup.ReplayDisplay || !osd) {
10.131 if(statusActive) Skins.Message(mtStatus,0);
10.132 Skins.Message(mtStatus,text);
10.133 @@ -370,14 +335,6 @@
10.134 osd->DrawText(0,bh-2*fh,text,clrBlack,clrCyan,font,bw,fh,taCenter);
10.135 osd->Flush();
10.136 }
10.137 -#else
10.138 - if(!Interface->IsOpen()) {
10.139 - Interface->Open(0,-1);
10.140 - statusInterfaceOpen=true;
10.141 - }
10.142 - Interface->Status(text);
10.143 - Interface->Flush();
10.144 -#endif
10.145 statusActive=true;
10.146 }
10.147 else
10.148 @@ -389,23 +346,12 @@
10.149 void cMP3Control::HideStatus(void)
10.150 {
10.151 if(statusActive) {
10.152 -#if APIVERSNUM >= 10307
10.153 if(MP3Setup.ReplayDisplay || !osd)
10.154 Skins.Message(mtStatus,0);
10.155 else {
10.156 osd->RestoreRegion();
10.157 osd->Flush();
10.158 }
10.159 -#else
10.160 - if(statusInterfaceOpen) {
10.161 - Interface->Close();
10.162 - statusInterfaceOpen=false;
10.163 - }
10.164 - else {
10.165 - Interface->Status(0);
10.166 - Interface->Flush();
10.167 - }
10.168 -#endif
10.169 }
10.170 statusActive=false;
10.171 }
10.172 @@ -413,45 +359,28 @@
10.173 #define CTAB 11 // some tabbing values for the progress display
10.174 #define CTAB2 5
10.175
10.176 -void cMP3Control::Write(int x, int y, int w, const char *text, eDvbColor fg, eDvbColor bg)
10.177 -{
10.178 -#if APIVERSNUM >= 10307
10.179 +void cMP3Control::Write(int x, int y, int w, const char *text, int fg, int bg)
10.180 +{
10.181 if(osd) {
10.182 - //d(printf("write x=%d y=%d w=%d ->",x,y,w))
10.183 x*=fw; if(x<0) x+=bw;
10.184 y*=fh; if(y<0) y+=bh;
10.185 osd->DrawText(x,y,text,fg,bg,font,w*fw);
10.186 - //d(printf(" x=%d y=%d w=%d\n",x,y,w*fw))
10.187 - }
10.188 -#else
10.189 - if(w>0) Fill(x,y,w,1,bg);
10.190 - Interface->Write(x,y,text,fg,bg);
10.191 -#endif
10.192 -}
10.193 -
10.194 -void cMP3Control::Fill(int x, int y, int w, int h, eDvbColor fg)
10.195 -{
10.196 -#if APIVERSNUM >= 10307
10.197 + }
10.198 +}
10.199 +
10.200 +void cMP3Control::Fill(int x, int y, int w, int h, int fg)
10.201 +{
10.202 if(osd) {
10.203 - //d(printf("fill x=%d y=%d w=%d h=%d ->",x,y,w,h))
10.204 x*=fw; if(x<0) x+=bw;
10.205 y*=fh; if(y<0) y+=bh;
10.206 osd->DrawRectangle(x,y,x+w*fw-1,y+h*fh-1,fg);
10.207 - //d(printf(" x=%d y=%d x2=%d y2=%d\n",x,y,x+h*fh-1,y+w*fw-1))
10.208 - }
10.209 -#else
10.210 - Interface->Fill(x,y,w,h,fg);
10.211 -#endif
10.212 + }
10.213 }
10.214
10.215 void cMP3Control::Flush(void)
10.216 {
10.217 -#if APIVERSNUM >= 10307
10.218 if(MP3Setup.ReplayDisplay) Skins.Flush();
10.219 else if(osd) osd->Flush();
10.220 -#else
10.221 - Interface->Flush();
10.222 -#endif
10.223 }
10.224
10.225 void cMP3Control::ShowProgress(bool open, bool bigWin)
10.226 @@ -461,7 +390,6 @@
10.227 if(player->GetIndex(index,total) && total>=0) {
10.228 if(!visible && open) {
10.229 HideStatus();
10.230 -#if APIVERSNUM >= 10307
10.231 if(MP3Setup.ReplayDisplay) {
10.232 disp=Skins.Current()->DisplayReplay(false);
10.233 if(!disp) return;
10.234 @@ -500,15 +428,6 @@
10.235 osd->DrawRectangle(0,0,bw-1,bh-1,clrGray50);
10.236 osd->Flush();
10.237 }
10.238 -#else
10.239 - fw=cOsd::CellWidth();
10.240 - fh=cOsd::LineHeight();
10.241 - bh=bigWin ? Setup.OSDheight : -2;
10.242 - bw=bwc=Setup.OSDwidth;
10.243 - rows=Setup.OSDheight-3;
10.244 - Interface->Open(bw,bh);
10.245 - Interface->Clear();
10.246 -#endif
10.247 ShowStatus(true);
10.248 bigwin=bigWin;
10.249 visible=true;
10.250 @@ -531,18 +450,13 @@
10.251 if(changed || mode->Loop!=lastMode->Loop || mode->Shuffle!=lastMode->Shuffle) {
10.252 snprintf(buf,sizeof(buf),"[%c%c] (%d/%d) %s",
10.253 mode->Loop?'L':'.',mode->Shuffle?'S':'.',mode->Num,mode->MaxNum,TitleArtist(mode->Title,mode->Artist));
10.254 -#if APIVERSNUM >= 10338
10.255 cStatus::MsgReplaying(this,buf,mode->Filename[0]?mode->Filename:0,true);
10.256 -#else
10.257 - cStatus::MsgReplaying(this,buf);
10.258 -#endif
10.259 }
10.260 }
10.261
10.262 if(visible) { // refresh the OSD progress display
10.263 bool flush=false;
10.264
10.265 -#if APIVERSNUM >= 10307
10.266 if(MP3Setup.ReplayDisplay) {
10.267 if(!statusActive) {
10.268 if(total>0) disp->SetProgress(index,total);
10.269 @@ -556,7 +470,6 @@
10.270 }
10.271 }
10.272 else {
10.273 -#endif
10.274 if(!selecting && changed && !statusActive) {
10.275 snprintf(buf,sizeof(buf),"(%d/%d)",mode->Num,mode->MaxNum);
10.276 Write(0,-2,CTAB,buf);
10.277 @@ -565,33 +478,26 @@
10.278
10.279 if(!lastMode || mode->Loop!=lastMode->Loop) {
10.280 if(mode->Loop) Write(-4,-1,0,"L",clrBlack,clrYellow);
10.281 - else Fill(-4,-1,2,1,clrBackground);
10.282 + else Fill(-4,-1,2,1,clrGray50);
10.283 flush=true;
10.284 }
10.285 if(!lastMode || mode->Shuffle!=lastMode->Shuffle) {
10.286 if(mode->Shuffle) Write(-2,-1,0,"S",clrWhite,clrRed);
10.287 - else Fill(-2,-1,2,1,clrBackground);
10.288 + else Fill(-2,-1,2,1,clrGray50);
10.289 flush=true;
10.290 }
10.291
10.292 index/=framesPerSecond; total/=framesPerSecond;
10.293 if(index!=lastIndex || total!=lastTotal) {
10.294 if(total>0) {
10.295 -#if APIVERSNUM >= 10307
10.296 cProgressBar ProgressBar(bw-(CTAB+CTAB2)*fw,fh,index,total);
10.297 osd->DrawBitmap(CTAB*fw,bh-fh,ProgressBar);
10.298 -#else
10.299 - cProgressBar ProgressBar((bw-CTAB-CTAB2)*fw,fh,index,total);
10.300 - Interface->SetBitmap(CTAB*fw,(abs(bh)-1)*fh,ProgressBar);
10.301 -#endif
10.302 }
10.303 snprintf(buf,sizeof(buf),total?"%02d:%02d/%02d:%02d":"%02d:%02d",index/60,index%60,total/60,total%60);
10.304 Write(0,-1,11,buf);
10.305 flush=true;
10.306 }
10.307 -#if APIVERSNUM >= 10307
10.308 - }
10.309 -#endif
10.310 + }
10.311
10.312 if(!jumpactive) {
10.313 bool doflip=false;
10.314 @@ -632,7 +538,6 @@
10.315 break;
10.316 }
10.317 if(buf[0]) {
10.318 -#if APIVERSNUM >= 10307
10.319 if(MP3Setup.ReplayDisplay) {
10.320 char buf2[256];
10.321 snprintf(buf2,sizeof(buf2),"[%c%c] (%d/%d) %s",
10.322 @@ -641,15 +546,12 @@
10.323 flush=true;
10.324 }
10.325 else {
10.326 -#endif
10.327 if(!statusActive) {
10.328 DisplayInfo(buf);
10.329 flush=true;
10.330 }
10.331 else { d(printf("mp3-ctrl: display info skip due to status active\n")) }
10.332 -#if APIVERSNUM >= 10307
10.333 }
10.334 -#endif
10.335 }
10.336 }
10.337 }
10.338 @@ -665,7 +567,7 @@
10.339 cMP3PlayInfo pi;
10.340 mgr->Info(num,&pi); if(!pi.Title[0]) break;
10.341 snprintf(buf,sizeof(buf),"%d.\t%s",num,TitleArtist(pi.Title,pi.Artist));
10.342 - eDvbColor fg=clrWhite, bg=clrBackground;
10.343 + int fg=clrWhite, bg=clrGray50;
10.344 int hash=MakeHash(buf);
10.345 if(num==mode->Num) { fg=clrBlack; bg=clrCyan; hash=(hash^77) + 23; }
10.346 if(all || hash!=hashlist[i]) {
10.347 @@ -696,7 +598,7 @@
10.348 void cMP3Control::DisplayInfo(const char *s)
10.349 {
10.350 if(s) Write(CTAB,-2,bwc-CTAB,s);
10.351 - else Fill(CTAB,-2,bwc-CTAB,1,clrBackground);
10.352 + else Fill(CTAB,-2,bwc-CTAB,1,clrGray50);
10.353 }
10.354
10.355 void cMP3Control::JumpDisplay(void)
10.356 @@ -705,16 +607,12 @@
10.357 const char *j=trVDR("Jump: "), u=jumpsecs?'s':'m';
10.358 if(!jumpmm) sprintf(buf,"%s- %c", j,u);
10.359 else sprintf(buf,"%s%d- %c",j,jumpmm,u);
10.360 -#if APIVERSNUM >= 10307
10.361 if(MP3Setup.ReplayDisplay) {
10.362 disp->SetJump(buf);
10.363 }
10.364 else {
10.365 -#endif
10.366 DisplayInfo(buf);
10.367 -#if APIVERSNUM >= 10307
10.368 - }
10.369 -#endif
10.370 + }
10.371 }
10.372
10.373 void cMP3Control::JumpProcess(eKeys Key)
10.374 @@ -746,9 +644,7 @@
10.375
10.376 if(!jumpactive) {
10.377 if(jumphide) Hide();
10.378 -#if APIVERSNUM >= 10307
10.379 else if(MP3Setup.ReplayDisplay) disp->SetJump(0);
10.380 -#endif
10.381 }
10.382 }
10.383
10.384 @@ -769,29 +665,21 @@
10.385
10.386 if(timeoutShow && time(0)>timeoutShow) Hide();
10.387 ShowProgress();
10.388 -#if APIVERSNUM >= 10307
10.389 ShowStatus(Key==kNone && !Skins.IsOpen());
10.390 -#else
10.391 - ShowStatus(Key==kNone && !Interface->IsOpen());
10.392 -#endif
10.393
10.394 if(jumpactive && Key!=kNone) { JumpProcess(Key); return osContinue; }
10.395
10.396 switch(Key) {
10.397 case kUp:
10.398 case kUp|k_Repeat:
10.399 -#if APIVERSNUM >= 10347
10.400 case kNext:
10.401 case kNext|k_Repeat:
10.402 -#endif
10.403 mgr->Next(); player->Play();
10.404 break;
10.405 case kDown:
10.406 case kDown|k_Repeat:
10.407 -#if APIVERSNUM >= 10347
10.408 case kPrev:
10.409 case kPrev|k_Repeat:
10.410 -#endif
10.411 if(!player->PrevCheck()) mgr->Prev();
10.412 player->Play();
10.413 break;
10.414 @@ -848,12 +736,8 @@
10.415 return osEnd;
10.416 case kBack:
10.417 Hide();
10.418 -#if APIVERSNUM >= 10332
10.419 cRemote::CallPlugin(plugin_name);
10.420 return osBack;
10.421 -#else
10.422 - return osEnd;
10.423 -#endif
10.424
10.425 case k0 ... k9:
10.426 number=number*10+Key-k0;
10.427 @@ -862,18 +746,14 @@
10.428 else if(timeoutShow>0) timeoutShow=time(0)+SELECTHIDE_TIMEOUT;
10.429 selecting=true; lastkeytime=time_ms();
10.430 char buf[32];
10.431 -#if APIVERSNUM >= 10307
10.432 if(MP3Setup.ReplayDisplay) {
10.433 snprintf(buf,sizeof(buf),"%s%d-/%d",trVDR("Jump: "),number,lastMode->MaxNum);
10.434 disp->SetJump(buf);
10.435 }
10.436 else {
10.437 -#endif
10.438 snprintf(buf,sizeof(buf),"(%d-/%d)",number,lastMode->MaxNum);
10.439 Write(0,-2,CTAB,buf);
10.440 -#if APIVERSNUM >= 10307
10.441 }
10.442 -#endif
10.443 Flush();
10.444 break;
10.445 }
10.446 @@ -884,9 +764,7 @@
10.447 if(number>0) { mgr->Goto(number); player->Play(); }
10.448 if(lastMode) lastMode->Hash=-1;
10.449 number=0; selecting=false;
10.450 -#if APIVERSNUM >= 10307
10.451 if(MP3Setup.ReplayDisplay && disp) disp->SetJump(0);
10.452 -#endif
10.453 }
10.454 break;
10.455 case kOk:
10.456 @@ -970,11 +848,7 @@
10.457 char *buf=0;
10.458 asprintf(&buf,"%s:\t%s",name,text?text:"");
10.459 cOsdItem *item = new cOsdItem(buf,osBack);
10.460 -#if APIVERSNUM >= 10307
10.461 item->SetSelectable(false);
10.462 -#else
10.463 - item->SetColor(clrWhite, clrBackground);
10.464 -#endif
10.465 free(buf);
10.466 Add(item); return item;
10.467 }
10.468 @@ -1249,11 +1123,7 @@
10.469 char *buf=NULL;
10.470 asprintf(&buf,"%s\t%s",tr("Old name:"),oldname);
10.471 cOsdItem *old = new cOsdItem(buf,osContinue);
10.472 -#if APIVERSNUM >= 10307
10.473 old->SetSelectable(false);
10.474 -#else
10.475 - old->SetColor(clrWhite, clrBackground);
10.476 -#endif
10.477 Add(old);
10.478 free(buf);
10.479
10.480 @@ -1544,9 +1414,7 @@
10.481
10.482 class cPluginMp3 : public cPlugin {
10.483 private:
10.484 -#if APIVERSNUM >= 10330
10.485 bool ExternalPlay(const char *path, bool test);
10.486 -#endif
10.487 public:
10.488 cPluginMp3(void);
10.489 virtual ~cPluginMp3();
10.490 @@ -1554,23 +1422,15 @@
10.491 virtual const char *Description(void) { return tr(DESCRIPTION); }
10.492 virtual const char *CommandLineHelp(void);
10.493 virtual bool ProcessArgs(int argc, char *argv[]);
10.494 -#if APIVERSNUM >= 10131
10.495 virtual bool Initialize(void);
10.496 -#else
10.497 - virtual bool Start(void);
10.498 -#endif
10.499 virtual void Housekeeping(void);
10.500 virtual const char *MainMenuEntry(void);
10.501 virtual cOsdObject *MainMenuAction(void);
10.502 virtual cMenuSetupPage *SetupMenu(void);
10.503 virtual bool SetupParse(const char *Name, const char *Value);
10.504 -#if APIVERSNUM >= 10330
10.505 virtual bool Service(const char *Id, void *Data);
10.506 -#if APIVERSNUM >= 10331
10.507 virtual const char **SVDRPHelpPages(void);
10.508 virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
10.509 -#endif
10.510 -#endif
10.511 };
10.512
10.513 cPluginMp3::cPluginMp3(void)
10.514 @@ -1673,13 +1533,9 @@
10.515 return true;
10.516 }
10.517
10.518 -#if APIVERSNUM >= 10131
10.519 bool cPluginMp3::Initialize(void)
10.520 -#else
10.521 -bool cPluginMp3::Start(void)
10.522 -#endif
10.523 -{
10.524 - if(!CheckVDRVersion(1,1,29,"mp3")) return false;
10.525 +{
10.526 + if(!CheckVDRVersion(1,4,5,"mp3")) return false;
10.527 plugin_name="mp3";
10.528 #if APIVERSNUM < 10507
10.529 i18n_name="mp3";
10.530 @@ -1756,9 +1612,7 @@
10.531 }
10.532 #endif
10.533 }
10.534 -#if APIVERSNUM >= 10307
10.535 else if (!strcasecmp(Name, "ReplayDisplay")) MP3Setup.ReplayDisplay = atoi(Value);
10.536 -#endif
10.537 else if (!strcasecmp(Name, "HideMainMenu")) MP3Setup.HideMainMenu = atoi(Value);
10.538 else if (!strcasecmp(Name, "KeepSelect")) MP3Setup.KeepSelect = atoi(Value);
10.539 else if (!strcasecmp(Name, "TitleArtistOrder")) MP3Setup.TitleArtistOrder = atoi(Value);
10.540 @@ -1766,8 +1620,6 @@
10.541 return true;
10.542 }
10.543
10.544 -#if APIVERSNUM >= 10330
10.545 -
10.546 bool cPluginMp3::ExternalPlay(const char *path, bool test)
10.547 {
10.548 char real[PATH_MAX+1];
10.549 @@ -1821,8 +1673,6 @@
10.550 return false;
10.551 }
10.552
10.553 -#if APIVERSNUM >= 10331
10.554 -
10.555 const char **cPluginMp3::SVDRPHelpPages(void)
10.556 {
10.557 static const char *HelpPages[] = {
10.558 @@ -1865,7 +1715,4 @@
10.559 return NULL;
10.560 }
10.561
10.562 -#endif // 1.3.31
10.563 -#endif // 1.3.30
10.564 -
10.565 VDRPLUGINCREATOR(cPluginMp3); // Don't touch this!
11.1 --- a/mplayer.c Tue Feb 03 12:28:53 2009 +0800
11.2 +++ b/mplayer.c Tue Feb 03 20:33:04 2009 +0800
11.3 @@ -1,7 +1,7 @@
11.4 /*
11.5 * MP3/MPlayer plugin to VDR (C++)
11.6 *
11.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
11.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
11.9 *
11.10 * This code is free software; you can redistribute it and/or
11.11 * modify it under the terms of the GNU General Public License
11.12 @@ -32,36 +32,9 @@
11.13 #include <vdr/font.h>
11.14 #include <vdr/osdbase.h>
11.15 #include <vdr/menuitems.h>
11.16 -#ifdef HAVE_BEAUTYPATCH
11.17 -#include <vdr/fontsym.h>
11.18 -#endif
11.19 -#if APIVERSNUM >= 10307
11.20 #include <vdr/skins.h>
11.21 -#endif
11.22 -#if APIVERSNUM >= 10332
11.23 #include <vdr/remote.h>
11.24 -#endif
11.25 -
11.26 -#if APIVERSNUM > 10307
11.27 #include <vdr/menu.h>
11.28 -#elif APIVERSNUM == 10307
11.29 -class cMenuText : public cOsdMenu {
11.30 -private:
11.31 - char *text;
11.32 -public:
11.33 - cMenuText(const char *Title, const char *Text, eDvbFont Font = fontOsd);
11.34 - virtual ~cMenuText();
11.35 - void SetText(const char *Text);
11.36 - virtual void Display(void);
11.37 - virtual eOSState ProcessKey(eKeys Key);
11.38 - };
11.39 -#else
11.40 -class cMenuText : public cOsdMenu {
11.41 -public:
11.42 - cMenuText(const char *Title, const char *Text, eDvbFont Font = fontOsd);
11.43 - virtual eOSState ProcessKey(eKeys Key);
11.44 - };
11.45 -#endif
11.46
11.47 #include "setup.h"
11.48 #include "setup-mplayer.h"
11.49 @@ -96,9 +69,6 @@
11.50 data=MPlayerSetup;
11.51 SetSection(tr("MPlayer"));
11.52 Add(new cMenuEditBoolItem(tr("Setup.MPlayer$Control mode"), &data.SlaveMode, tr("Traditional"), tr("Slave")));
11.53 -#if APIVERSNUM < 10307
11.54 - Add(new cMenuEditIntItem( tr("Setup.MPlayer$OSD position"), &data.OsdPos, 0, 6));
11.55 -#endif
11.56 res[0]=tr("disabled");
11.57 res[1]=tr("global only");
11.58 res[2]=tr("local first");
11.59 @@ -118,9 +88,6 @@
11.60 SetupStore("ControlMode", MPlayerSetup.SlaveMode);
11.61 SetupStore("HideMainMenu",MPlayerSetup.HideMainMenu);
11.62 SetupStore("ResumeMode", MPlayerSetup.ResumeMode);
11.63 -#if APIVERSNUM < 10307
11.64 - SetupStore("OsdPos", MPlayerSetup.OsdPos);
11.65 -#endif
11.66 for(int i=0; i<10; i++) {
11.67 char name[16];
11.68 snprintf(name,sizeof(name),"KeyCmd%d",i);
11.69 @@ -135,9 +102,7 @@
11.70 static cFileObj *file;
11.71 static bool rewind;
11.72 cMPlayerPlayer *player;
11.73 -#if APIVERSNUM >= 10307
11.74 cSkinDisplayReplay *display;
11.75 -#endif
11.76 bool visible, modeOnly, haveBeauty;
11.77 time_t timeoutShow;
11.78 int lastCurrent, lastTotal;
11.79 @@ -148,7 +113,6 @@
11.80 //
11.81 void Stop(void);
11.82 void ShowTimed(int Seconds=0);
11.83 - void DisplayAtBottom(const char *s);
11.84 void ShowProgress(void);
11.85 void ShowMode(void);
11.86 void ShowTitle(void);
11.87 @@ -172,38 +136,14 @@
11.88 {
11.89 visible=modeOnly=jumpactive=haveBeauty=false;
11.90 lastReplayMsg=0;
11.91 -#if APIVERSNUM >= 10307
11.92 display=0;
11.93 -#else
11.94 -#ifdef HAVE_BEAUTYPATCH
11.95 -#if APIVERSNUM >= 10300
11.96 - const cFont *sym=cFont::GetFont(fontSym);
11.97 - const cFont *osd=cFont::GetFont(fontOsd);
11.98 - const cFont::tCharData *symD=sym->CharData(32);
11.99 - const cFont::tCharData *osdD=osd->CharData(32);
11.100 -#else //APIVERSNUM >= 10300
11.101 - cFont *sym=new cFont(fontSym);
11.102 - cFont *osd=new cFont(fontOsd);
11.103 - const cFont::tCharData *symD=sym->CharData(32);
11.104 - const cFont::tCharData *osdD=osd->CharData(32);
11.105 - delete sym;
11.106 - delete osd;
11.107 -#endif //APIVERSNUM >= 10300
11.108 - if(symD != osdD) haveBeauty=true;
11.109 - d(printf("mplayer: beauty patch %sdetected\n",haveBeauty?"":"NOT "))
11.110 -#endif //HAVE_BEAUTYPATCH
11.111 -#endif //APIVERSNUM >= 10307
11.112 ShowTitle();
11.113 }
11.114
11.115 cMPlayerControl::~cMPlayerControl()
11.116 {
11.117 Stop();
11.118 -#if APIVERSNUM >= 10338
11.119 cStatus::MsgReplaying(this,0,0,false);
11.120 -#else
11.121 - cStatus::MsgReplaying(this, NULL);
11.122 -#endif
11.123 free(lastReplayMsg);
11.124 }
11.125
11.126 @@ -231,11 +171,7 @@
11.127 void cMPlayerControl::Hide(void)
11.128 {
11.129 if(visible) {
11.130 -#if APIVERSNUM >= 10307
11.131 delete display; display=0;
11.132 -#else
11.133 - Interface->Close();
11.134 -#endif
11.135 visible=modeOnly=false;
11.136 #if APIVERSNUM >= 10500
11.137 SetNeedsFastResponse(false);
11.138 @@ -245,20 +181,6 @@
11.139 }
11.140 }
11.141
11.142 -void cMPlayerControl::DisplayAtBottom(const char *s)
11.143 -{
11.144 -#if APIVERSNUM < 10307
11.145 - const int p=modeOnly ? 0 : 2;
11.146 - if(s) {
11.147 - const int d=max(Width()-cOsd::WidthInCells(s),0) / 2;
11.148 - if(modeOnly) Interface->Fill(0, p, Interface->Width(), 1, clrTransparent);
11.149 - Interface->Write(d, p, s);
11.150 - }
11.151 - else
11.152 - Interface->Fill(12, p, Width() - 22, 1, clrBackground);
11.153 -#endif
11.154 -}
11.155 -
11.156 void cMPlayerControl::ShowTitle(void)
11.157 {
11.158 const char *path=0;
11.159 @@ -272,27 +194,12 @@
11.160 const char *name=rindex(path,'/');
11.161 if(name) name++; else name=path;
11.162 if(!lastReplayMsg || strcmp(lastReplayMsg,path)) {
11.163 -#if APIVERSNUM >= 10338
11.164 cStatus::MsgReplaying(this,name,path,true);
11.165 -#else
11.166 - cStatus::MsgReplaying(this,path);
11.167 -#endif
11.168 free(lastReplayMsg);
11.169 lastReplayMsg=strdup(path);
11.170 }
11.171 if(visible) {
11.172 -#if APIVERSNUM >= 10307
11.173 if(display) display->SetTitle(name);
11.174 -#else
11.175 - int n=strlen(name);
11.176 - if(n>Width()) {
11.177 - n=n-Width()+4; if(n<0) n=0;
11.178 - char str[72];
11.179 - snprintf(str,sizeof(str),"... %s",name+n);
11.180 - Interface->Write(0,0,str);
11.181 - }
11.182 - else Interface->Write(0,0,name);
11.183 -#endif
11.184 }
11.185 }
11.186 if(release) free((void *)path);
11.187 @@ -305,13 +212,7 @@
11.188 if(GetIndex(Current,Total) && Total>0) {
11.189 bool flush=false;
11.190 if(!visible) {
11.191 -#if APIVERSNUM >= 10307
11.192 display=Skins.Current()->DisplayReplay(false);
11.193 -#else
11.194 - Interface->Open(Setup.OSDwidth,-MPlayerSetup.OsdPos-3);
11.195 - Interface->Clear();
11.196 - if(MPlayerSetup.OsdPos>0) Interface->Fill(0,3,Interface->Width(),MPlayerSetup.OsdPos,clrTransparent);
11.197 -#endif
11.198 visible=true; modeOnly=false;
11.199 #if APIVERSNUM >= 10500
11.200 SetNeedsFastResponse(true);
11.201 @@ -323,7 +224,6 @@
11.202 }
11.203
11.204 if(abs(Current-lastCurrent)>12) {
11.205 -#if APIVERSNUM >= 10307
11.206 if(Total>0) display->SetProgress(Current, Total);
11.207 display->SetCurrent(IndexToHMSF(Current));
11.208 display->SetTotal(IndexToHMSF(Total));
11.209 @@ -331,33 +231,16 @@
11.210 int Speed;
11.211 if(GetReplayMode(Play,Forward,Speed))
11.212 display->SetMode(Play, Forward, Speed);
11.213 -#else
11.214 - cProgressBar ProgressBar(Width() * cOsd::CellWidth(), cOsd::LineHeight(), Current, Total);
11.215 - Interface->SetBitmap(0, cOsd::LineHeight(), ProgressBar);
11.216 - Interface->Write(0,2,IndexToHMSF(Current));
11.217 - Interface->Write(-7,2,IndexToHMSF(Total));
11.218 -#endif
11.219 ShowTitle();
11.220 flush=true;
11.221 lastCurrent=Current; lastTotal=Total;
11.222 }
11.223 if(flush)
11.224 -#if APIVERSNUM >= 10307
11.225 Skins.Flush();
11.226 -#else
11.227 - Interface->Flush();
11.228 -#endif
11.229 ShowMode();
11.230 }
11.231 }
11.232
11.233 -#if APIVERSNUM < 10307
11.234 -#ifdef HAVE_BEAUTYPATCH
11.235 -int forwSym[] = { FSYM_FORW,FSYM_FORW1,FSYM_FORW2,FSYM_FORW3 };
11.236 -int backSym[] = { FSYM_BACK,FSYM_BACK1,FSYM_BACK2,FSYM_BACK3 };
11.237 -#endif
11.238 -#endif
11.239 -
11.240 void cMPlayerControl::ShowMode(void)
11.241 {
11.242 if(Setup.ShowReplayMode && !jumpactive) {
11.243 @@ -368,50 +251,13 @@
11.244
11.245 if(!visible) {
11.246 if(NormalPlay) return;
11.247 -#if APIVERSNUM >= 10307
11.248 display = Skins.Current()->DisplayReplay(true);
11.249 -#else
11.250 - Interface->Open(0,-MPlayerSetup.OsdPos-1);
11.251 -#endif
11.252 visible=modeOnly=true;
11.253 }
11.254
11.255 if(modeOnly && !timeoutShow && NormalPlay) timeoutShow=time(0)+SELECTHIDE_TIMEOUT;
11.256
11.257 -#if APIVERSNUM >= 10307
11.258 display->SetMode(Play, Forward, Speed);
11.259 -#else
11.260 - char buf[16];
11.261 - eDvbFont OldFont;
11.262 -#ifdef HAVE_BEAUTYPATCH
11.263 - if(haveBeauty) {
11.264 - int i=0;
11.265 - if(!(Width()&1)) buf[i++]=' ';
11.266 - buf[i]=FSYM_EMPTY; if(Speed>=0 && !Forward) buf[i]=backSym[Speed];
11.267 - i++;
11.268 - buf[i++]=Play?(Speed==-1?FSYM_PLAY:FSYM_EMPTY):FSYM_PAUSE;
11.269 - buf[i]=FSYM_EMPTY; if(Speed>=0 && Forward) buf[i]=forwSym[Speed];
11.270 - i++;
11.271 - if(!(Width()&1)) buf[i++]=' ';
11.272 - buf[i]=0;
11.273 - OldFont = Interface->SetFont(fontSym);
11.274 - }
11.275 - else {
11.276 -#endif //HAVE_BEAUTYPATCH
11.277 - const char *Mode;
11.278 - if (Speed == -1) Mode = Play ? " > " : " || ";
11.279 - else if (Play) Mode = Forward ? " X>> " : " <<X ";
11.280 - else Mode = Forward ? " X|> " : " <|X ";
11.281 - strn0cpy(buf, Mode, sizeof(buf));
11.282 - char *p = strchr(buf, 'X');
11.283 - if(p) *p = Speed > 0 ? '1' + Speed - 1 : ' ';
11.284 - OldFont = Interface->SetFont(fontFix);
11.285 -#ifdef HAVE_BEAUTYPATCH
11.286 - }
11.287 -#endif //HAVE_BEAUTYPATCH
11.288 - DisplayAtBottom(buf);
11.289 - Interface->SetFont(OldFont);
11.290 -#endif //APIVERSNUM >= 10307
11.291 }
11.292 }
11.293 }
11.294 @@ -422,11 +268,7 @@
11.295 const char *j=trVDR("Jump: "), u=jumpmode?'%':'m';
11.296 if(!jumpval) sprintf(buf,"%s- %c", j,u);
11.297 else sprintf(buf,"%s%d- %c",j,jumpval,u);
11.298 -#if APIVERSNUM >= 10307
11.299 display->SetJump(buf);
11.300 -#else
11.301 - DisplayAtBottom(buf);
11.302 -#endif
11.303 }
11.304
11.305 void cMPlayerControl::JumpProcess(eKeys Key)
11.306 @@ -442,7 +284,7 @@
11.307 break;
11.308 case kBlue:
11.309 jumpmode=!jumpmode; jumpval=0;
11.310 - DisplayAtBottom(0); JumpDisplay();
11.311 + JumpDisplay();
11.312 break;
11.313 case kPlay:
11.314 case kUp:
11.315 @@ -466,11 +308,7 @@
11.316 if(!jumpactive) {
11.317 if(jumphide) Hide();
11.318 else
11.319 -#if APIVERSNUM >= 10307
11.320 display->SetJump(0);
11.321 -#else
11.322 - DisplayAtBottom(0);
11.323 -#endif
11.324 }
11.325 }
11.326
11.327 @@ -540,11 +378,9 @@
11.328 // case kYellow: player->SkipNext(); break;
11.329
11.330 case kBack:
11.331 -#if APIVERSNUM >= 10332
11.332 Hide();
11.333 cRemote::CallPlugin(plugin_name);
11.334 return osBack;
11.335 -#endif
11.336 case kStop:
11.337 case kBlue: Hide(); Stop(); return osEnd;
11.338
11.339 @@ -554,11 +390,9 @@
11.340 case kOk: if(visible && !modeOnly) { Hide(); DoShowMode=true; }
11.341 else ShowTimed();
11.342 break;
11.343 -#if APIVERSNUM >= 10318
11.344 case kAudio:
11.345 player->KeyCmd("switch_audio");
11.346 break;
11.347 -#endif
11.348 case k0:
11.349 case k1:
11.350 case k2:
11.351 @@ -739,9 +573,7 @@
11.352
11.353 class cPluginMPlayer : public cPlugin {
11.354 private:
11.355 -#if APIVERSNUM >= 10330
11.356 bool ExternalPlay(const char *path, bool test);
11.357 -#endif
11.358 public:
11.359 cPluginMPlayer(void);
11.360 virtual ~cPluginMPlayer();
11.361 @@ -749,22 +581,14 @@
11.362 virtual const char *Description(void) { return tr(DESCRIPTION); }
11.363 virtual const char *CommandLineHelp(void);
11.364 virtual bool ProcessArgs(int argc, char *argv[]);
11.365 -#if APIVERSNUM >= 10131
11.366 virtual bool Initialize(void);
11.367 -#else
11.368 - virtual bool Start(void);
11.369 -#endif
11.370 virtual const char *MainMenuEntry(void);
11.371 virtual cOsdMenu *MainMenuAction(void);
11.372 virtual cMenuSetupPage *SetupMenu(void);
11.373 virtual bool SetupParse(const char *Name, const char *Value);
11.374 -#if APIVERSNUM >= 10330
11.375 virtual bool Service(const char *Id, void *Data);
11.376 -#if APIVERSNUM >= 10331
11.377 virtual const char **SVDRPHelpPages(void);
11.378 virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
11.379 -#endif
11.380 -#endif
11.381 };
11.382
11.383 cPluginMPlayer::cPluginMPlayer(void)
11.384 @@ -824,13 +648,9 @@
11.385 return true;
11.386 }
11.387
11.388 -#if APIVERSNUM >= 10131
11.389 bool cPluginMPlayer::Initialize(void)
11.390 -#else
11.391 -bool cPluginMPlayer::Start(void)
11.392 -#endif
11.393 -{
11.394 - if(!CheckVDRVersion(1,1,16,"mplayer")) return false;
11.395 +{
11.396 + if(!CheckVDRVersion(1,4,5,"mplayer")) return false;
11.397 plugin_name="mplayer";
11.398 #if APIVERSNUM < 10507
11.399 i18n_name="mplayer";
11.400 @@ -870,15 +690,12 @@
11.401 if( !strcasecmp(Name, "ControlMode")) MPlayerSetup.SlaveMode = atoi(Value);
11.402 else if (!strcasecmp(Name, "HideMainMenu")) MPlayerSetup.HideMainMenu = atoi(Value);
11.403 else if (!strcasecmp(Name, "ResumeMode")) MPlayerSetup.ResumeMode = atoi(Value);
11.404 - else if (!strcasecmp(Name, "OsdPos")) MPlayerSetup.OsdPos = atoi(Value);
11.405 else if (!strncasecmp(Name,"KeyCmd", 6) && strlen(Name)==7 && isdigit(Name[6]))
11.406 strn0cpy(MPlayerSetup.KeyCmd[Name[6]-'0'],Value,sizeof(MPlayerSetup.KeyCmd[0]));
11.407 else return false;
11.408 return true;
11.409 }
11.410
11.411 -#if APIVERSNUM >= 10330
11.412 -
11.413 bool cPluginMPlayer::ExternalPlay(const char *path, bool test)
11.414 {
11.415 char real[PATH_MAX+1];
11.416 @@ -930,8 +747,6 @@
11.417 return false;
11.418 }
11.419
11.420 -#if APIVERSNUM >= 10331
11.421 -
11.422 const char **cPluginMPlayer::SVDRPHelpPages(void)
11.423 {
11.424 static const char *HelpPages[] = {
11.425 @@ -963,7 +778,4 @@
11.426 return NULL;
11.427 }
11.428
11.429 -#endif // 1.3.31
11.430 -#endif // 1.3.30
11.431 -
11.432 VDRPLUGINCREATOR(cPluginMPlayer); // Don't touch this!
12.1 --- a/network.c Tue Feb 03 12:28:53 2009 +0800
12.2 +++ b/network.c Tue Feb 03 20:33:04 2009 +0800
12.3 @@ -1,7 +1,7 @@
12.4 /*
12.5 * MP3/MPlayer plugin to VDR (C++)
12.6 *
12.7 - * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
12.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
12.9 *
12.10 * This code is free software; you can redistribute it and/or
12.11 * modify it under the terms of the GNU General Public License
12.12 @@ -47,10 +47,6 @@
12.13
12.14 const char *netscript=0;
12.15
12.16 -#if APIVERSNUM == 10131
12.17 -#error Using this plugin with vdr 1.1.31 is not recommended (may cause high cpu load during streaming)
12.18 -#endif
12.19 -
12.20 // -----------------------------------------------------------------------------
12.21
12.22 int RunCommand(const char *cmd, const char *State, const char *Name=0)
12.23 @@ -59,11 +55,7 @@
12.24 if(cmd) {
12.25 char *tmp=0;
12.26 if(Name)
12.27 -#if APIVERSNUM < 10318
12.28 - asprintf(&tmp,"%s %s \"%s\"",cmd,State,strescape(Name,"\"$"));
12.29 -#else
12.30 asprintf(&tmp,"%s %s \"%s\"",cmd,State,*strescape(Name,"\"$"));
12.31 -#endif
12.32 else asprintf(&tmp,"%s %s",cmd,State);
12.33
12.34 d(printf("run: executing '%s'\n",tmp))
12.35 @@ -206,9 +198,7 @@
12.36 connected=netup=false;
12.37 rwTimeout =RwTimeoutMs ? RwTimeoutMs :RW_TIMEOUT;
12.38 conTimeout=ConTimeoutMs ? ConTimeoutMs:CON_TIMEOUT;
12.39 -#if APIVERSNUM >= 10132
12.40 SetTimeouts(50,50);
12.41 -#endif
12.42 }
12.43
12.44 cNet::~cNet()
13.1 --- a/player-mp3.c Tue Feb 03 12:28:53 2009 +0800
13.2 +++ b/player-mp3.c Tue Feb 03 20:33:04 2009 +0800
13.3 @@ -1,7 +1,7 @@
13.4 /*
13.5 * MP3/MPlayer plugin to VDR (C++)
13.6 *
13.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
13.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
13.9 *
13.10 * This code is free software; you can redistribute it and/or
13.11 * modify it under the terms of the GNU General Public License
13.12 @@ -1227,11 +1227,7 @@
13.13 {
13.14 only48khz=MP3Setup.Only48kHz;
13.15 outSr=0;
13.16 -#if APIVERSNUM == 10318
13.17 - cDevice::PrimaryDevice()->SetCurrentAudioTrack(ttDolbyFirst);
13.18 -#elif APIVERSNUM >= 10319
13.19 cDevice::PrimaryDevice()->SetCurrentAudioTrack(ttAudio);
13.20 -#endif
13.21 d(printf("mp3-dvb: using DVB output\n"))
13.22 }
13.23
13.24 @@ -1330,11 +1326,7 @@
13.25 int pc=sizeof(testAudio);
13.26 int r;
13.27 do {
13.28 -#if APIVERSNUM < 10318
13.29 - r=player->PlayVideo(p,pc);
13.30 -#else
13.31 r=player->PlayPes(p,pc);
13.32 -#endif
13.33 if(r>0) { p+=r; pc-=r; }
13.34 if(r==0) Poll();
13.35 } while(r>=0 && pc>0);
13.36 @@ -1346,11 +1338,7 @@
13.37 n=FHS;
13.38 Data+=n; Len-=n;
13.39 }
13.40 -#if APIVERSNUM < 10318
13.41 - int r=player->PlayVideo(Data,Len);
13.42 -#else
13.43 int r=player->PlayPes(Data,Len);
13.44 -#endif
13.45 return (r>=0 ? r+n : -1);
13.46 }
13.47
14.1 --- a/player-mplayer.c Tue Feb 03 12:28:53 2009 +0800
14.2 +++ b/player-mplayer.c Tue Feb 03 20:33:04 2009 +0800
14.3 @@ -1,7 +1,7 @@
14.4 /*
14.5 * MP3/MPlayer plugin to VDR (C++)
14.6 *
14.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
14.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
14.9 *
14.10 * This code is free software; you can redistribute it and/or
14.11 * modify it under the terms of the GNU General Public License
14.12 @@ -80,14 +80,9 @@
14.13 Lock();
14.14 if(Absolute && Volume==0) mute=true;
14.15 else {
14.16 -#if APIVERSNUM>=10401
14.17 -#if APIVERSNUM==10401
14.18 -#warning Caution! This code does not work with VDR 1.4.1 and 1.4.1-1. You can ignore this warning if you are using VDR 1.4.1-2 or later.
14.19 -#endif
14.20 if(!Absolute)
14.21 volume+=Volume;
14.22 else
14.23 -#endif
14.24 volume=Volume;
14.25 if(volume>0) mute=false;
14.26 }
15.1 --- a/setup-mplayer.c Tue Feb 03 12:28:53 2009 +0800
15.2 +++ b/setup-mplayer.c Tue Feb 03 20:33:04 2009 +0800
15.3 @@ -1,7 +1,7 @@
15.4 /*
15.5 * MP3/MPlayer plugin to VDR (C++)
15.6 *
15.7 - * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
15.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
15.9 *
15.10 * This code is free software; you can redistribute it and/or
15.11 * modify it under the terms of the GNU General Public License
15.12 @@ -33,7 +33,6 @@
15.13 SlaveMode = 1;
15.14 ResumeMode = 2;
15.15 HideMainMenu = 0;
15.16 - OsdPos = 0;
15.17 memset(KeyCmd,0,sizeof(KeyCmd));
15.18 strcpy(KeyCmd[1],"audio_delay +0.1");
15.19 strcpy(KeyCmd[7],"audio_delay -0.1");
16.1 --- a/setup-mplayer.h Tue Feb 03 12:28:53 2009 +0800
16.2 +++ b/setup-mplayer.h Tue Feb 03 20:33:04 2009 +0800
16.3 @@ -1,7 +1,7 @@
16.4 /*
16.5 * MP3/MPlayer plugin to VDR (C++)
16.6 *
16.7 - * (C) 2001-2005 Stefan Huelswitt <s.huelswitt@gmx.de>
16.8 + * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
16.9 *
16.10 * This code is free software; you can redistribute it and/or
16.11 * modify it under the terms of the GNU General Public License
16.12 @@ -33,7 +33,6 @@
16.13 int SlaveMode;
16.14 int ResumeMode;
16.15 int HideMainMenu;
16.16 - int OsdPos;
16.17 char KeyCmd[10][MAX_KEYCMD];
16.18 public:
16.19 cMPlayerSetup(void);