diff options
-rw-r--r-- | device.c | 57 | ||||
-rw-r--r-- | device.h | 15 | ||||
-rw-r--r-- | dummy_player.c | 10 | ||||
-rw-r--r-- | equalizer.c | 6 | ||||
-rw-r--r-- | media_player.c | 40 | ||||
-rw-r--r-- | tools/timer.c | 10 | ||||
-rw-r--r-- | xineliboutput.c | 9 |
7 files changed, 11 insertions, 136 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.44 2007-10-14 18:32:00 phintuka Exp $ + * $Id: device.c,v 1.45 2007-10-15 00:15:07 phintuka Exp $ * */ @@ -74,12 +74,8 @@ class cXinelibStatusMonitor : public cStatus protected: virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); -#if VDRVERSNUM < 10338 - virtual void Replaying(const cControl *Control, const char *Name); -#else virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); -#endif cXinelibDevice& m_Device; int m_cardIndex; @@ -136,18 +132,6 @@ void cXinelibStatusMonitor::ChannelSwitch(const cDevice *Device, } } -#if VDRVERSNUM < 10338 -void cXinelibStatusMonitor::Replaying(const cControl *Control, - const char *Name) -{ - TRACEF("cXinelibStatusMonitor::Replaying"); - - if (Name != NULL) { - TRACE("cXinelibStatusMonitor: Replaying " << Name); - m_Device.SetReplayMode(); - } -} -#else void cXinelibStatusMonitor::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) @@ -159,7 +143,6 @@ void cXinelibStatusMonitor::Replaying(const cControl *Control, m_Device.SetReplayMode(); } } -#endif //----------------------------- device ---------------------------------------- @@ -369,10 +352,8 @@ void cXinelibDevice::ForcePrimaryDeviceImpl(bool On) LOGMSG("Forcing primary device, original index = %d", m_OriginalPrimaryDevice); if(cOsd::IsOpen()) { LOGMSG("Forcing primary device, old OSD still open !"); -#if VDRVERSNUM >= 10400 xc.main_menu_mode = CloseOsd; cRemote::CallPlugin("xineliboutput"); -#endif } SetPrimaryDevice(DeviceNumber() + 1); } @@ -389,10 +370,8 @@ void cXinelibDevice::ForcePrimaryDeviceImpl(bool On) cControl::Shutdown(); if(cOsd::IsOpen()) { LOGMSG("Restoring primary device, xineliboutput OSD still open !"); -#if VDRVERSNUM >= 10400 xc.main_menu_mode = CloseOsd; /* will be executed in future by vdr main thread */ cRemote::CallPlugin("xineliboutput"); -#endif } cChannel *channel = Channels.GetByNumber(CurrentChannel()); cDevice::SetPrimaryDevice(m_OriginalPrimaryDevice); @@ -1499,38 +1478,6 @@ cSpuDecoder *cXinelibDevice::GetSpuDecoder(void) // Image Grabbing // -#if VDRVERSNUM < 10338 - -bool cXinelibDevice::GrabImage(const char *FileName, bool Jpeg, - int Quality, int SizeX, int SizeY) -{ - uchar *Data = NULL; - int Size = 0; - TRACEF("cXinelibDevice::GrabImage"); - - if(m_local) - Data = m_local->GrabImage(Size, Jpeg, Quality, SizeX, SizeY); - if(!Data && m_server) - Data = m_local->GrabImage(Size, Jpeg, Quality, SizeX, SizeY); - - if(Data) { - FILE *fp = fopen(FileName, "wb"); - if(fp) { - fwrite(Data, Size, 1, fp); - fclose(fp); - free(Data); - return true; - } - LOGERR("Grab: Can't open %s", FileName); - free(Data); - } else { - LOGMSG("Grab to %s failed", FileName); - } - return false; -} - -#else - uchar *cXinelibDevice::GrabImage(int &Size, bool Jpeg, int Quality, int SizeX, int SizeY) { @@ -1544,8 +1491,6 @@ uchar *cXinelibDevice::GrabImage(int &Size, bool Jpeg, return NULL; } -#endif - // // DVD SPU support in VDR recordings @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.h,v 1.24 2007-09-17 23:29:22 phintuka Exp $ + * $Id: device.h,v 1.25 2007-10-15 00:15:07 phintuka Exp $ * */ @@ -162,15 +162,8 @@ class cXinelibDevice : public cDevice // Image grabbing public: - -#if VDRVERSNUM < 10338 - virtual bool GrabImage(const char *FileName, bool Jpeg = true, - int Quality = -1, int SizeX = -1, int SizeY = -1); - -#else virtual uchar *GrabImage(int &Size, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1); -#endif // SPU decoder @@ -270,12 +263,6 @@ class cXinelibDevice : public cDevice // override cDevice to get DVD SPUs virtual int PlayPesPacket(const uchar *Data, int Length, bool VideoOnly = false); - -#if VDRVERSNUM < 10342 - // API changed in VDR 1.3.42 - virtual int PlayAudio(const uchar *Data, int Length) - { return PlayAudio(Data, Length, 0); } -#endif }; #endif // __XINELIB_DEVICE_H diff --git a/dummy_player.c b/dummy_player.c index 9bb1152c..8980e656 100644 --- a/dummy_player.c +++ b/dummy_player.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: dummy_player.c,v 1.2 2006-06-04 08:18:18 phintuka Exp $ + * $Id: dummy_player.c,v 1.3 2007-10-15 00:15:07 phintuka Exp $ * */ @@ -64,20 +64,12 @@ cMutex cDummyPlayerControl::m_Lock; cDummyPlayerControl::cDummyPlayerControl(void) : cControl(OpenPlayer()) { -#if VDRVERSNUM < 10338 - cStatus::MsgReplaying(this, "none"); -#else cStatus::MsgReplaying(this, "none", NULL, true); -#endif } cDummyPlayerControl::~cDummyPlayerControl() { -#if VDRVERSNUM < 10338 - cStatus::MsgReplaying(this, NULL); -#else cStatus::MsgReplaying(this, NULL, NULL, false); -#endif Close(); } diff --git a/equalizer.c b/equalizer.c index 4114b497..98b81a00 100644 --- a/equalizer.c +++ b/equalizer.c @@ -4,16 +4,12 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: equalizer.c,v 1.3 2007-09-01 08:47:04 phintuka Exp $ + * $Id: equalizer.c,v 1.4 2007-10-15 00:15:07 phintuka Exp $ * */ #include <vdr/config.h> -#if VDRVERSNUM < 10307 -# error VDR < 1.3.7 not supported -#endif - #include "config.h" #include "device.h" #include "equalizer.h" diff --git a/media_player.c b/media_player.c index ccc32922..3128c3ab 100644 --- a/media_player.c +++ b/media_player.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: media_player.c,v 1.35 2007-09-28 23:07:06 phintuka Exp $ + * $Id: media_player.c,v 1.36 2007-10-15 00:15:07 phintuka Exp $ * */ @@ -25,34 +25,10 @@ #include "tools/iconv.h" -#if VDRVERSNUM < 10400 -// Dirty hack to bring menu back ... -#include <vdr/remote.h> -static void BackToMenu(void) -{ - static bool MagicKeyAdded = false; - - if(!MagicKeyAdded) { - MagicKeyAdded = true; - cKeyMacro *m = new cKeyMacro(); - char *tmp = strdup("User1\t@xineliboutput"); - m->Parse(tmp); - free(tmp); - eKeys *keys = (eKeys*)m->Macro(); - keys[0] = (eKeys)(k_Plugin|0x1000); /* replace kUser1 if it is used to something else */ - keys[1] = k_Plugin; - - KeyMacros.Add(m); - } - - cRemote::PutMacro((eKeys)(k_Plugin|0x1000)); -} -#else static void BackToMenu(void) { cRemote::CallPlugin("xineliboutput"); } -#endif // @@ -493,15 +469,9 @@ cXinelibPlayerControl::~cXinelibPlayerControl() void cXinelibPlayerControl::MsgReplaying(const char *Title, const char *File) { -#if VDRVERSNUM < 10338 - cStatus::MsgReplaying(this, NULL); - if(File) - cStatus::MsgReplaying(this, File); -#else cStatus::MsgReplaying(this, NULL, NULL, false); if(Title || File) cStatus::MsgReplaying(this, Title, File, true); -#endif } void cXinelibPlayerControl::Queue(const char *File) @@ -1112,11 +1082,7 @@ cXinelibImagesControl::~cXinelibImagesControl() delete m_DisplayReplay; m_DisplayReplay = NULL; -#if VDRVERSNUM < 10338 - cStatus::MsgReplaying(this, NULL); -#else cStatus::MsgReplaying(this, NULL, NULL, false); -#endif Close(); if(m_Files) { @@ -1185,11 +1151,7 @@ void cXinelibImagesControl::Seek(int Rel) if(NULL != (pt=strrchr(m_File, '.'))) *pt = 0; -#if VDRVERSNUM < 10338 - cStatus::MsgReplaying(this, m_Files[m_Index]); -#else cStatus::MsgReplaying(this, m_File, m_Files[m_Index], true); -#endif m_Player->ShowImage(m_Files[m_Index]); m_LastShowTime = time(NULL); diff --git a/tools/timer.c b/tools/timer.c index 1730edab..f24e925a 100644 --- a/tools/timer.c +++ b/tools/timer.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: timer.c,v 1.1 2006-06-03 10:04:28 phintuka Exp $ + * $Id: timer.c,v 1.2 2007-10-15 00:15:07 phintuka Exp $ * */ @@ -25,10 +25,6 @@ # define TRACEF(x) #endif -#if VDRVERSNUM>10317 - #define time_ms() cTimeMs::Now() -#endif - // ---------------------------- cTimerThreadEvent ---------------------------- class cTimerThreadEvent : public cListObject { @@ -39,7 +35,7 @@ class cTimerThreadEvent : public cListObject { m_DeleteOnCancel(DeleteOnCancel), m_TimeoutMs(TimeoutMs) { - m_NextEventTime = time_ms(); + m_NextEventTime = cTimeMs::Now(); UpdateEventTime(); } @@ -56,7 +52,7 @@ class cTimerThreadEvent : public cListObject { int TimeToNextEvent(void) { - return m_NextEventTime - time_ms(); + return m_NextEventTime - cTimeMs::Now(); } virtual bool operator< (const cListObject &ListObject) diff --git a/xineliboutput.c b/xineliboutput.c index 0fbf1da3..80de0c72 100644 --- a/xineliboutput.c +++ b/xineliboutput.c @@ -21,7 +21,7 @@ * * xineliboutput.c: VDR Plugin interface * - * $Id: xineliboutput.c,v 1.24 2007-09-18 13:52:52 phintuka Exp $ + * $Id: xineliboutput.c,v 1.25 2007-10-15 00:15:07 phintuka Exp $ * */ @@ -34,11 +34,8 @@ #include "setup_menu.h" #include "menu.h" -#if VDRVERSNUM < 10342 -# if VDRVERSNUM < 10331 -# error VDR versions < 1.3.31 are not supported ! -# endif -# warning This plugin is not tested with VDR versions < 1.3.42 ! +#if VDRVERSNUM < 10400 +# error VDR versions < 1.4.0 are not supported ! #endif //---------------------------------plugin------------------------------------- |