summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscop <scop>2005-05-28 10:03:24 +0000
committerscop <scop>2005-05-28 10:03:24 +0000
commit21050a9fd6ec17093a3c8aa308912eba0dedaabb (patch)
tree563b326a8e9a34c43b5e690fc997434df23b3721
parent0d12885cbe71c72e7f18d0048dd9ed4025521550 (diff)
downloadvdr-plugin-dxr3-21050a9fd6ec17093a3c8aa308912eba0dedaabb.tar.gz
vdr-plugin-dxr3-21050a9fd6ec17093a3c8aa308912eba0dedaabb.tar.bz2
Clean up non-working dead code for VDR < 1.3.11.
-rw-r--r--HISTORY2
-rw-r--r--INSTALL2
-rw-r--r--dxr3.c6
-rw-r--r--dxr3demuxdevice.c8
-rw-r--r--dxr3demuxdevice.h4
-rw-r--r--dxr3device.c20
-rw-r--r--dxr3device.h3
-rw-r--r--dxr3i18n.c240
-rw-r--r--dxr3interface.c8
-rw-r--r--dxr3interface.h3
-rw-r--r--dxr3interface_spu_encoder.c20
-rw-r--r--dxr3osd.c135
-rw-r--r--dxr3osd.h26
-rw-r--r--dxr3osd_subpicture.c4
-rw-r--r--dxr3osd_subpicture.h5
-rw-r--r--dxr3outputthread.c4
-rw-r--r--dxr3spudecoder.h2
-rw-r--r--dxr3tools.h4
-rw-r--r--dxr3vdrincludes.h4
19 files changed, 82 insertions, 418 deletions
diff --git a/HISTORY b/HISTORY
index c36ea72..8b09241 100644
--- a/HISTORY
+++ b/HISTORY
@@ -285,3 +285,5 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- avoid crashing with some corrupted streams (Jon Burgess)
- remove optimized memcpy routines and related stuff, just use the glibc
one (Ville Skyttä)
+- clean up dead code for old VDR versions that hasn't worked for some time
+ anyway, VDR >= 1.3.11 is now required (Ville Skyttä)
diff --git a/INSTALL b/INSTALL
index 8b92087..61f4b70 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,7 +2,7 @@ Prerequisites:
- Get the current CVS of the dxr3 drivers from http://dxr3.sourceforge.net/
- Make sure your DXR3 card is running under Linux.
-- Install the (latest) VDR developer version.
+- Install the (latest) VDR developer version, or at least >= 1.3.11.
- The plugin needs the libavcodec library from http://ffmpeg.sourceforge.net/
Installation:
diff --git a/dxr3.c b/dxr3.c
index a626c1c..4c36748 100644
--- a/dxr3.c
+++ b/dxr3.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dxr3.c,v 1.1.2.11 2005/05/17 20:26:00 scop Exp $
+ * $Id: dxr3.c,v 1.1.2.12 2005/05/28 10:03:25 scop Exp $
*
*/
@@ -19,6 +19,10 @@ static const char *VERSION = "0.2.3-cvs";
static const char *DESCRIPTION = "Hardware MPEG decoder";
static const char *MAINMENUENTRY = "DXR3";
+#if VDRVERSNUM && VDRVERSNUM < 10311
+#error "This version of the DXR3 plugin needs VDR version >= 1.3.11"
+#endif
+
// ==================================
// 'message-handler' for the main screen
eOSState cDxr3OsdItem::ProcessKey(eKeys Key)
diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c
index 81eeea6..6dc7292 100644
--- a/dxr3demuxdevice.c
+++ b/dxr3demuxdevice.c
@@ -239,14 +239,6 @@ void cDxr3DemuxDevice::SetVideoOnlyMode()
m_dxr3Device.SetPlayMode();
}
-#if VDRVERSNUM < 10307
-// ==================================
-cOsdBase* cDxr3DemuxDevice::NewOsd(int x, int y)
-{
- return m_dxr3Device.NewOsd(x, y);
-}
-#endif
-
// ==================================
void cDxr3DemuxDevice::StillPicture(const uint8_t* buf, int length)
{
diff --git a/dxr3demuxdevice.h b/dxr3demuxdevice.h
index ebccaae..64971d6 100644
--- a/dxr3demuxdevice.h
+++ b/dxr3demuxdevice.h
@@ -55,10 +55,6 @@ public:
void SetReplayMode(void);
void SetTrickMode(eDxr3TrickState trickState, int Speed = 1);
-#if VDRVERSNUM < 10307
- cOsdBase* NewOsd(int x, int y);
-#endif
-
int DemuxPes(const uint8_t* buf, int length, bool bAc3Dts = false);
int DemuxAudioPes(const uint8_t* buf, int length);
void StillPicture(const uint8_t* buf, int length);
diff --git a/dxr3device.c b/dxr3device.c
index 42f48d2..93005a6 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -55,9 +55,7 @@ cDxr3Device::~cDxr3Device()
// ==================================
void cDxr3Device::MakePrimaryDevice(bool On)
{
-#if VDRVERSNUM >= 10307
new cDxr3OsdProvider();
-#endif
}
// replaying
@@ -104,11 +102,9 @@ bool cDxr3Device::SetPlayMode(ePlayMode PlayMode)
cLog::Instance() << "cDxr3Device::SetPlayMode this should be avoided\n";
break;
-#if VDRVERSNUM >= 10307
case pmVideoOnly:
cLog::Instance() << "cDxr3Device::SetPlayMode video only from player, audio from decoder\n";
break;
-#endif
}
}
@@ -362,13 +358,6 @@ void cDxr3Device::PlayAudio(const uchar *Data, int Length)
int origLength = Length;
#endif
-#if VDRVERSNUM < 10307
- if (!m_AC3Present)
- {
- Interface->Write(Interface->Width() / 2, 0, "AC3", clrRed);
- }
-#endif
-
m_AC3Present = true;
if ((m_DemuxDevice.GetDemuxMode() == DXR3_DEMUX_TRICK_MODE &&
@@ -517,15 +506,6 @@ cSpuDecoder *cDxr3Device::GetSpuDecoder(void)
return m_spuDecoder;
}
-#if VDRVERSNUM < 10307
-// ==================================
-// return osd
-cOsdBase *cDxr3Device::NewOsd(int x, int y)
-{
- return m_DemuxDevice.NewOsd(x, y);
-}
-#endif
-
// Local variables:
// mode: c++
// c-file-style: "stroustrup"
diff --git a/dxr3device.h b/dxr3device.h
index ce79ceb..10ec48d 100644
--- a/dxr3device.h
+++ b/dxr3device.h
@@ -71,9 +71,6 @@ public:
// osd
virtual cSpuDecoder *GetSpuDecoder();
-#if VDRVERSNUM < 10307
- virtual cOsdBase* NewOsd(int x, int y);
-#endif
// helper function
void Reset()
diff --git a/dxr3i18n.c b/dxr3i18n.c
index 47360e2..61348e1 100644
--- a/dxr3i18n.c
+++ b/dxr3i18n.c
@@ -41,17 +41,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -71,17 +67,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -101,17 +93,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -131,17 +119,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -161,17 +145,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -191,17 +171,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -221,17 +197,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -251,17 +223,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -281,17 +249,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -311,17 +275,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -341,17 +301,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -371,17 +327,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -401,17 +353,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -431,17 +379,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -461,17 +405,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -491,17 +431,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -521,17 +457,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -551,17 +483,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -581,17 +509,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -611,17 +535,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -641,17 +561,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -671,17 +587,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -701,17 +613,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{
@@ -731,17 +639,13 @@ const tI18nPhrase Phrases[] = {
"", // Românã
"", // Magyar
"", // Català
-#if VDRVERSNUM > 10302
"", // ÀãááÚØÙ (Russian)
-# if VDRVERSNUM > 10307
"", // Hrvatski
-# if VDRVERSNUM > 10312
+#if VDRVERSNUM > 10312
"", // Eesti
-# if VDRVERSNUM > 10315
+#if VDRVERSNUM > 10315
"", // Dansk
-# endif
-# endif
-# endif
+#endif
#endif
},
{ NULL }
diff --git a/dxr3interface.c b/dxr3interface.c
index 939e287..c39fd9a 100644
--- a/dxr3interface.c
+++ b/dxr3interface.c
@@ -877,14 +877,6 @@ void cDxr3Interface::ReOpenAudio()
Unlock();
}
-#if VDRVERSNUM < 10307
-// ==================================
-cOsdBase* cDxr3Interface::NewOsd(int x, int y)
-{
- return new cDxr3Osd(x, y);
-}
-#endif
-
// ==================================
//! uploadroutine for microcode
void cDxr3Interface::UploadMicroCode()
diff --git a/dxr3interface.h b/dxr3interface.h
index 0a6a5b6..3d8226b 100644
--- a/dxr3interface.h
+++ b/dxr3interface.h
@@ -135,9 +135,6 @@ public:
void ReOpenAudio();
// osd/spu
-#if VDRVERSNUM < 10307
- cOsdBase* NewOsd(int x, int y);
-#endif
void ClearOsd();
void WriteSpu(const uint8_t* pBuf, int length);
diff --git a/dxr3interface_spu_encoder.c b/dxr3interface_spu_encoder.c
index 4db1f37..3434eb1 100644
--- a/dxr3interface_spu_encoder.c
+++ b/dxr3interface_spu_encoder.c
@@ -443,27 +443,7 @@ void cSPUEncoder::ScaleOSD(double fac, unsigned char* buf,
for (d = 1; d < (2 * OSDWIDTH); d += 2)
{
-#if VDRVERSNUM <= 10307
- // 'interpolate' values
- if ((dline[d - 1] == BLACK) || (dline[d + 1] == BLACK))
- {
- dline[d] = BLACK;
- }
- else if ((dline[d - 1] == WHITE) || (dline[d + 1] == WHITE))
- {
- dline[d] = WHITE;
- }
- else if ((dline[d - 1] == CYAN) || (dline[d + 1] == CYAN))
- {
- dline[d] = CYAN;
- }
- else
- {
- dline[d] = dline[d + 1];
- }
-#else /*VDRVERSNUM*/
dline[d] = dline[d + 1];
-#endif /*VDRVERSNUM*/
}
for (s = 0, x = 0; x < OSDWIDTH2; x++, s += 3)
diff --git a/dxr3osd.c b/dxr3osd.c
index 1574e83..f0ac192 100644
--- a/dxr3osd.c
+++ b/dxr3osd.c
@@ -31,148 +31,15 @@
#include "dxr3osd.h"
#include "dxr3interface_spu_encoder.h"
-#if VDRVERSNUM >= 10307
-
-//#include "dxr3osd_mpeg.h"
#include "dxr3osd_subpicture.h"
// ==================================
// ! create osd at (Left, Top)
cOsd *cDxr3OsdProvider::CreateOsd(int Left, int Top)
{
- /*
- if (cDxr3ConfigData::Instance().GetMenuMode() == (eMenuMode) SUBPICTURE)
- {
- */
- // use subpicture
- return new cDxr3SubpictureOsd(Left, Top);
- /*
- }
- else
- {
- // mpeg based menu system
- return new cDxr3MpegOsd(Left, Top);
- }
- */
-}
-
-#else /*VDRVERSNUM*/
-
-// ==================================
-bool cDxr3Osd::SetWindow(cWindow *Window)
-{
- if (Window)
- {
- // Window handles are counted 0...(MAXNUMWINDOWS - 1), but the actual
- // window numbers in the driver are used from 1...MAXNUMWINDOWS.
- int Handle = Window->Handle();
- if (0 <= Handle && Handle < MAXNUMWINDOWS)
- {
- Spu->Cmd(OSD_SetWindow, 0, Handle + 1);
- return true;
- }
- esyslog("ERROR: illegal window handle: %d", Handle);
-
- if (cDxr3ConfigData::Instance().GetDebug())
- {
- cLog::Instance() << "cDxr3Osd::SetWindow: illegal window handle:"
- << Handle << "\n";
- }
- }
- return false;
-}
-
-// ==================================
-cDxr3Osd::cDxr3Osd(int x, int y) : cOsdBase(x, y)
-{
- Spu = &cSPUEncoder::Instance();
+ return new cDxr3SubpictureOsd(Left, Top);
}
-// ==================================
-cDxr3Osd::~cDxr3Osd()
-{
- for (int i = 0; i < NumWindows(); i++)
- {
- CloseWindow(GetWindowNr(i));
- }
-}
-
-// ==================================
-bool cDxr3Osd::OpenWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_Open,
- Window->Bpp(),
- X0() + Window->X0(),
- Y0() + Window->Y0(),
- X0() + Window->X0() + Window->Width() - 1,
- Y0() + Window->Y0() + Window->Height() - 1,
- (void *)1); // initially hidden!
- return true;
- }
- return false;
-}
-
-// ==================================
-void cDxr3Osd::CommitWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
-
- if (Window->Dirty(x1, y1, x2, y2))
- {
- // commit colors:
- int FirstColor = 0, LastColor = 0;
- const eDvbColor *pal;
- while ((pal = Window->NewColors(FirstColor, LastColor)) != NULL)
- Spu->Cmd(OSD_SetPalette, FirstColor, LastColor, 0, 0, 0, pal);
- // commit modified data:
- Spu->Cmd(OSD_SetBlock, Window->Width(), x1, y1, x2, y2,
- Window->Data(x1, y1));
- }
- }
-}
-
-// ==================================
-void cDxr3Osd::ShowWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_MoveWindow, 0, X0() + Window->X0(), Y0() + Window->Y0());
- }
-}
-
-// ==================================
-void cDxr3Osd::HideWindow(cWindow *Window, bool Hide)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(Hide ? OSD_Hide : OSD_Show, 0);
- }
-}
-
-// ==================================
-void cDxr3Osd::CloseWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_Close);
- }
-}
-
-// ==================================
-void cDxr3Osd::MoveWindow(cWindow *Window, int x, int y)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_MoveWindow, 0, X0() + x, Y0() + y);
- }
-}
-
-#endif /*VDRVERSNUM*/
-
// Local variables:
// mode: c++
// c-file-style: "stroustrup"
diff --git a/dxr3osd.h b/dxr3osd.h
index 4e701ad..53e5d0f 100644
--- a/dxr3osd.h
+++ b/dxr3osd.h
@@ -4,8 +4,6 @@
#include "dxr3vdrincludes.h"
#include "dxr3interface_spu_encoder.h"
-#if VDRVERSNUM >= 10307
-
// ==================================
// osd plugin provider
class cDxr3OsdProvider : public cOsdProvider
@@ -15,30 +13,6 @@ public:
virtual cOsd *CreateOsd(int Left, int Top);
};
-#else /*VDRVERSNUM*/
-
-// ==================================
-// osd interface for =< vdr1,3,7
-class cDxr3Osd : public cOsdBase
-{
-private:
- cSPUEncoder* Spu; ///< interface to cSPUEncoder
-
- bool SetWindow(cWindow*);
-
-public:
- cDxr3Osd(int x, int y);
- ~cDxr3Osd();
-
- virtual bool OpenWindow(cWindow *Window);
- virtual void CommitWindow(cWindow *Window);
- virtual void ShowWindow(cWindow *Window);
- virtual void HideWindow(cWindow *Window, bool Hide);
- virtual void CloseWindow(cWindow *Window);
- virtual void MoveWindow(cWindow *Window, int x, int y);
-};
-
-#endif /*VDRVERSNUM*/
#endif /*_DXR3_OSD_H_*/
// Local variables:
diff --git a/dxr3osd_subpicture.c b/dxr3osd_subpicture.c
index 258d53a..0bb57a9 100644
--- a/dxr3osd_subpicture.c
+++ b/dxr3osd_subpicture.c
@@ -29,8 +29,6 @@ public:
};
#endif
-#if VDRVERSNUM >= 10307
-
#define MAXNUMWINDOWS 7 // OSD windows are counted 1...7
// ==================================
@@ -269,8 +267,6 @@ void cDxr3SubpictureOsd::Flush()
#endif
}
-#endif /*VDRVERSNUM*/
-
// Local variables:
// mode: c++
// c-file-style: "stroustrup"
diff --git a/dxr3osd_subpicture.h b/dxr3osd_subpicture.h
index 1500d60..afc653c 100644
--- a/dxr3osd_subpicture.h
+++ b/dxr3osd_subpicture.h
@@ -4,10 +4,8 @@
#include "dxr3vdrincludes.h"
#include "dxr3interface_spu_encoder.h"
-#if VDRVERSNUM >= 10307
-
// ==================================
-// osd interface for => vdr1,3,7
+// osd interface
class cDxr3SubpictureOsd : public cOsd
{
private:
@@ -31,7 +29,6 @@ public:
void Flush();
};
-#endif /*VDRVERSNUM*/
#endif /*_DXR3OSD_SUBPICTURE_H_*/
// Local variables:
diff --git a/dxr3outputthread.c b/dxr3outputthread.c
index 34fc79c..2a6fc3b 100644
--- a/dxr3outputthread.c
+++ b/dxr3outputthread.c
@@ -70,9 +70,7 @@ cDxr3AudioOutThread::cDxr3AudioOutThread(cDxr3Interface& dxr3Device,
cDxr3SyncBuffer& buffer) :
cDxr3OutputThread(dxr3Device, buffer)
{
-#if VDRVERSNUM >= 10300
SetDescription("DXR3 audio output");
-#endif
}
//! destructor
@@ -165,9 +163,7 @@ cDxr3VideoOutThread::cDxr3VideoOutThread(cDxr3Interface& dxr3Device,
cDxr3SyncBuffer& buffer) :
cDxr3OutputThread(dxr3Device, buffer)
{
-#if VDRVERSNUM >= 10300
SetDescription("DXR3 video output");
-#endif
}
//! destructor
diff --git a/dxr3spudecoder.h b/dxr3spudecoder.h
index e7ea9ab..31753e9 100644
--- a/dxr3spudecoder.h
+++ b/dxr3spudecoder.h
@@ -114,14 +114,12 @@ public:
void processSPU(uint32_t pts, uint8_t * buf);
#endif
-#if VDRVERSNUM >= 10311
void Hide();
void Draw();
bool IsVisible()
{
return osd != NULL;
}
-#endif
private:
cOsd * osd;
diff --git a/dxr3tools.h b/dxr3tools.h
index 0a236b5..c88d94f 100644
--- a/dxr3tools.h
+++ b/dxr3tools.h
@@ -94,11 +94,7 @@ namespace Tools
//! write a string via vdr to OSD
inline void WriteInfoToOsd(std::string x)
{
-#if VDRVERSNUM <= 10306
- Interface->Info(x.c_str());
-#else
Skins.Message(mtInfo, x.c_str());
-#endif
}
}
diff --git a/dxr3vdrincludes.h b/dxr3vdrincludes.h
index 70508e6..0083f23 100644
--- a/dxr3vdrincludes.h
+++ b/dxr3vdrincludes.h
@@ -33,11 +33,7 @@
#endif
// all includes from vdr
-#if VDRVERSNUM >= 10307
#include <vdr/osd.h>
-#else
-#include <vdr/osdbase.h>
-#endif
#include <vdr/config.h>
#include <vdr/thread.h>
#include <vdr/ringbuffer.h>