diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | audio.c | 15 | ||||
-rw-r--r-- | channels.c | 5 | ||||
-rw-r--r-- | channels.h | 5 | ||||
-rw-r--r-- | config.h | 6 | ||||
-rw-r--r-- | device.h | 5 | ||||
-rw-r--r-- | dvbdevice.c | 20 | ||||
-rw-r--r-- | dvbdevice.h | 7 | ||||
-rw-r--r-- | menu.c | 20 |
9 files changed, 12 insertions, 73 deletions
@@ -4750,3 +4750,5 @@ Video Disk Recorder Revision History - Fixed the PremiereContentTransmissionDescriptor in 'libsi' (thanks to Stefan Huelswitt). +- Removed all the compatibility '#if APIVERSNUM...' stuff and instead increased + the API version number - plugins will have to be recompiled. @@ -4,17 +4,11 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: audio.c 1.4 2006/05/20 10:02:08 kls Exp $ + * $Id: audio.c 1.5 2006/05/28 15:03:24 kls Exp $ */ #include "audio.h" #include <stdlib.h> -// TODO remove the following if APIVERSNUM > 10400 -#include "config.h" -#if APIVERSNUM != 10400 -#warning ******* API version changed - remove old stuff -#endif -// TODO #include "dvbdevice.h" // --- cAudio ---------------------------------------------------------------- @@ -68,14 +62,7 @@ void cExternalAudio::Play(const uchar *Data, int Length, uchar Id) if (command && !mute) { if (pipe || pipe.Open(command, "w")) { if (0x80 <= Id && Id <= 0x87 || Id == 0xBD) { // AC3 -#if APIVERSNUM == 10400 - extern int cDvbDevice__setTransferModeForDolbyDigital; - cDvbDevice__setTransferModeForDolbyDigital = 2; - cDvbDevice::SetTransferModeForDolbyDigital(false); -#else -#warning ******* API version changed - remove old stuff cDvbDevice::SetTransferModeForDolbyDigital(2); -#endif int written = Data[8] + 9; // skips the PES header if (Id != 0xBD) written += 4; // skips AC3 bytes @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.52 2006/05/28 10:14:18 kls Exp $ + * $Id: channels.c 1.53 2006/05/28 15:03:40 kls Exp $ */ #include "channels.h" @@ -925,8 +925,6 @@ int cChannels::GetNextNormal(int Idx) return channel ? Idx : -1; } -#if APIVERSNUM != 10400 -#warning ******* API version changed - activate new code int cChannels::GetPrevNormal(int Idx) { cChannel *channel = Get(--Idx); @@ -934,7 +932,6 @@ int cChannels::GetPrevNormal(int Idx) channel = Get(--Idx); return channel ? Idx : -1; } -#endif void cChannels::ReNumber( void ) { @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.h 1.41 2006/05/28 10:13:21 kls Exp $ + * $Id: channels.h 1.42 2006/05/28 15:03:56 kls Exp $ */ #ifndef __CHANNELS_H @@ -233,10 +233,7 @@ public: int GetNextGroup(int Idx); // Get next channel group int GetPrevGroup(int Idx); // Get previous channel group int GetNextNormal(int Idx); // Get next normal channel (not group) -#if APIVERSNUM != 10400 -#warning ******* API version changed - activate new code int GetPrevNormal(int Idx); // Get previous normal channel (not group) -#endif void ReNumber(void); // Recalculate 'number' based on channel type cChannel *GetByNumber(int Number, int SkipGap = 0); cChannel *GetByServiceID(int Source, int Transponder, unsigned short ServiceID); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.258 2006/05/28 14:42:21 kls Exp $ + * $Id: config.h 1.259 2006/05/28 15:04:08 kls Exp $ */ #ifndef __CONFIG_H @@ -26,8 +26,8 @@ // The plugin API's version number: -#define APIVERSION "1.4.0" -#define APIVERSNUM 10400 // Version * 10000 + Major * 100 + Minor +#define APIVERSION "1.4.1" +#define APIVERSNUM 10401 // Version * 10000 + Major * 100 + Minor // When loading plugins, VDR searches them by their APIVERSION, which // may be smaller than VDRVERSION in case there have been no changes to @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 1.77 2006/05/28 09:19:30 kls Exp $ + * $Id: device.h 1.78 2006/05/28 15:04:24 kls Exp $ */ #ifndef __DEVICE_H @@ -239,13 +239,10 @@ protected: public: static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; } ///< Returns the number of the current channel on the primary device. -#if APIVERSNUM != 10400 -#warning ******* API version changed - activate new code static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; } ///< Sets the number of the current channel on the primary device, without ///< actually switching to it. This can be used to correct the current ///< channel number while replaying. -#endif void ForceTransferMode(void); ///< Forces the device into transfermode for the current channel. virtual bool HasLock(int TimeoutMs = 0);//XXX PLUGINS.html diff --git a/dvbdevice.c b/dvbdevice.c index 6570695e..fc57c5b0 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.157 2006/05/20 09:52:23 kls Exp $ + * $Id: dvbdevice.c 1.158 2006/05/28 15:05:03 kls Exp $ */ #include "dvbdevice.h" @@ -357,11 +357,6 @@ void cDvbTuner::Action(void) int cDvbDevice::devVideoOffset = -1; int cDvbDevice::setTransferModeForDolbyDigital = 1; -#if APIVERSNUM == 10400 -int cDvbDevice__setTransferModeForDolbyDigital = -1; -#else -#warning ******* API version changed - remove old stuff -#endif cDvbDevice::cDvbDevice(int n) { @@ -919,23 +914,10 @@ void cDvbDevice::SetDigitalAudioDevice(bool On) } } -#if APIVERSNUM == 10400 -void cDvbDevice::SetTransferModeForDolbyDigital(bool On) -{ - if (cDvbDevice__setTransferModeForDolbyDigital >= 0) { - setTransferModeForDolbyDigital = cDvbDevice__setTransferModeForDolbyDigital; - cDvbDevice__setTransferModeForDolbyDigital = -1; - } - else - setTransferModeForDolbyDigital = On; -} -#else -#warning ******* API version changed - remove old stuff void cDvbDevice::SetTransferModeForDolbyDigital(int Mode) { setTransferModeForDolbyDigital = Mode; } -#endif void cDvbDevice::SetAudioTrackDevice(eTrackType Type) { diff --git a/dvbdevice.h b/dvbdevice.h index 1031c83d..effa5fb9 100644 --- a/dvbdevice.h +++ b/dvbdevice.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.h 1.40 2006/05/20 09:32:06 kls Exp $ + * $Id: dvbdevice.h 1.41 2006/05/28 15:05:19 kls Exp $ */ #ifndef __DVBDEVICE_H @@ -111,17 +111,12 @@ protected: virtual void SetVolumeDevice(int Volume); virtual void SetDigitalAudioDevice(bool On); public: -#if APIVERSNUM == 10400 - static void SetTransferModeForDolbyDigital(bool On); -#else -#warning ******* API version changed - remove old stuff static void SetTransferModeForDolbyDigital(int Mode); ///< Controls how the DVB device handles Transfer Mode when replaying ///< Dolby Digital audio. ///< 0 = don't set "audio bypass" in driver/firmware, don't force Transfer Mode ///< 1 = set "audio bypass" in driver/firmware, force Transfer Mode (default) ///< 2 = don't set "audio bypass" in driver/firmware, force Transfer Mode -#endif // Player facilities @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.438 2006/05/28 10:47:40 kls Exp $ + * $Id: menu.c 1.439 2006/05/28 15:05:42 kls Exp $ */ #include "menu.h" @@ -512,20 +512,8 @@ eOSState cMenuChannels::Delete(void) if (Interface->Confirm(tr("Delete channel?"))) { if (CurrentChannel && channel == CurrentChannel) { int n = Channels.GetNextNormal(CurrentChannel->Index()); -#if APIVERSNUM == 10400 - if (n < 0) { - int Idx = CurrentChannel->Index(); - cChannel *channel = Channels.Get(--Idx); - while (channel && channel->GroupSep()) - channel = Channels.Get(--Idx); - if (channel) - n = Idx; - } -#else -#warning ******* API version changed - remove old stuff if (n < 0) n = Channels.GetPrevNormal(CurrentChannel->Index()); -#endif CurrentChannel = Channels.Get(n); CurrentChannelNr = 0; // triggers channel switch below } @@ -536,11 +524,8 @@ eOSState cMenuChannels::Delete(void) if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) { if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) Channels.SwitchTo(CurrentChannel->Number()); -#if APIVERSNUM != 10400 -#warning ******* API version changed - activate new code else cDevice::SetCurrentChannel(CurrentChannel); -#endif } } } @@ -563,11 +548,8 @@ void cMenuChannels::Move(int From, int To) if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) { if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) Channels.SwitchTo(CurrentChannel->Number()); -#if APIVERSNUM != 10400 -#warning ******* API version changed - activate new code else cDevice::SetCurrentChannel(CurrentChannel); -#endif } } } |