summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscop <scop>2006-04-18 21:33:18 +0000
committerscop <scop>2006-04-18 21:33:18 +0000
commit9cde1b0fdd1a9e0607dcdd3367c324fd2d5b8d68 (patch)
treede0096c64729f3ee0e8106bdc47d532439c03d8d
parent93ed3dd4f77d9e0448d4dd0060584ca9cdcf496a (diff)
downloadvdr-plugin-dxr3-9cde1b0fdd1a9e0607dcdd3367c324fd2d5b8d68.tar.gz
vdr-plugin-dxr3-9cde1b0fdd1a9e0607dcdd3367c324fd2d5b8d68.tar.bz2
Clean up pre-VDR-1.3.47 compat stuff.
-rw-r--r--INSTALL2
-rw-r--r--dxr3.c6
-rw-r--r--dxr3device.c20
-rw-r--r--dxr3device.h8
-rw-r--r--dxr3i18n.c132
-rw-r--r--dxr3osd_subpicture.c12
-rw-r--r--dxr3osd_subpicture.h4
-rw-r--r--dxr3spudecoder.c6
-rw-r--r--dxr3spudecoder.h4
-rw-r--r--dxr3syncbuffer.c46
10 files changed, 5 insertions, 235 deletions
diff --git a/INSTALL b/INSTALL
index 011d8a1..60b5394 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,7 +2,7 @@ Prerequisites:
- Get the DXR3 drivers from http://sourceforge.net/projects/dxr3 ,
install, configure, test and verify the installation.
-- Install the (latest) VDR developer version, or at least >= 1.3.11.
+- Install the (latest) VDR developer version, or at least >= 1.3.47.
- The plugin needs the libavcodec library from http://ffmpeg.sourceforge.net/
Installation:
diff --git a/dxr3.c b/dxr3.c
index 81bc7e6..03973e5 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.22 2006/01/08 18:03:28 scop Exp $
+ * $Id: dxr3.c,v 1.1.2.23 2006/04/18 21:33:18 scop Exp $
*
*/
@@ -19,8 +19,8 @@ static const char *VERSION = "0.2.6-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"
+#if VDRVERSNUM && VDRVERSNUM < 10347
+#error "This version of the DXR3 plugin needs VDR version >= 1.3.47"
#endif
#define DXR3_MAX_CARDS 4
diff --git a/dxr3device.c b/dxr3device.c
index 394c11b..daacdc3 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -217,11 +217,7 @@ bool cDxr3Device::Poll(cPoller &Poller, int TimeoutMs)
m_DemuxDevice.GetTrickState() == DXR3_FREEZE) ||
cDxr3Interface::Instance().IsExternalReleased())
{
-#if VDRVERSNUM >= 10314
cCondWait::SleepMs(TimeoutMs);
-#else
- usleep(TimeoutMs * 1000);
-#endif
return false;
}
return m_DemuxDevice.Poll(TimeoutMs); // Poller.Poll(TimeoutMs);
@@ -281,20 +277,10 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length)
// ==================================
// plays additional audio streams, like Dolby Digital
-#if VDRVERSNUM >= 10318
-#if VDRVERSNUM >= 10342
int cDxr3Device::PlayAudio(const uchar *Data, int Length, uchar Id)
-#else
-int cDxr3Device::PlayAudio(const uchar *Data, int Length)
-#endif
-#else
-void cDxr3Device::PlayAudio(const uchar *Data, int Length)
-#endif
{
int retLength = 0;
-#if VDRVERSNUM >= 10318
int origLength = Length;
-#endif
m_AC3Present = true;
@@ -303,11 +289,7 @@ void cDxr3Device::PlayAudio(const uchar *Data, int Length)
cDxr3Interface::Instance().IsExternalReleased())
{
//usleep(1000000);
-#if VDRVERSNUM >= 10318
return 0;
-#else
- return;
-#endif
}
if (m_strBuf.length())
@@ -340,9 +322,7 @@ void cDxr3Device::PlayAudio(const uchar *Data, int Length)
m_strBuf.append((const char*)(Data + retLength), Length);
}
-#if VDRVERSNUM >= 10318
return origLength;
-#endif
}
// addition functions
diff --git a/dxr3device.h b/dxr3device.h
index 8963af4..8edc934 100644
--- a/dxr3device.h
+++ b/dxr3device.h
@@ -56,15 +56,7 @@ public:
virtual void StillPicture(const uchar *Data, int Length);
virtual bool Poll(cPoller &Poller, int TimeoutMs = 0);
virtual int PlayVideo(const uchar *Data, int Length);
-#if VDRVERSNUM >= 10318
-#if VDRVERSNUM >= 10342
virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
-#else
- virtual int PlayAudio(const uchar *Data, int Length);
-#endif
-#else
- virtual void PlayAudio(const uchar *Data, int Length);
-#endif
// addition functions
virtual void SetVideoFormat(bool VideoFormat16_9);
diff --git a/dxr3i18n.c b/dxr3i18n.c
index 8e2c8b2..c61e936 100644
--- a/dxr3i18n.c
+++ b/dxr3i18n.c
@@ -43,15 +43,9 @@ const tI18nPhrase Phrases[] = {
"DXR3",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Hardware MPEG decoder",
@@ -72,15 +66,9 @@ const tI18nPhrase Phrases[] = {
"Descodificador MPEG Hardware",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"DXR3 Adjustment",
@@ -101,15 +89,9 @@ const tI18nPhrase Phrases[] = {
"Opcions DXR3",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Digital audio output",
@@ -130,15 +112,9 @@ const tI18nPhrase Phrases[] = {
"Sortida àudio digital",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Card number",
@@ -159,15 +135,9 @@ const tI18nPhrase Phrases[] = {
"Targeta",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Video mode",
@@ -188,15 +158,9 @@ const tI18nPhrase Phrases[] = {
"Modalitat vídeo",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"PAL",
@@ -217,15 +181,9 @@ const tI18nPhrase Phrases[] = {
"PAL",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"PAL60",
@@ -246,15 +204,9 @@ const tI18nPhrase Phrases[] = {
"PAL60",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"NTSC",
@@ -275,15 +227,9 @@ const tI18nPhrase Phrases[] = {
"NTSC",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Reset DXR3 hardware",
@@ -304,15 +250,9 @@ const tI18nPhrase Phrases[] = {
"Reset hardware DXR3",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Toggle force letterbox",
@@ -333,15 +273,9 @@ const tI18nPhrase Phrases[] = {
"Commuta modalitat letterbox forçada",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Switch to analog audio output",
@@ -362,15 +296,9 @@ const tI18nPhrase Phrases[] = {
"Selecciona sortida àudio analògica",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"AC3 output on",
@@ -391,15 +319,9 @@ const tI18nPhrase Phrases[] = {
"Activa sortida AC3",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"AC3 output off",
@@ -420,15 +342,9 @@ const tI18nPhrase Phrases[] = {
"Desactiva sortida AC3",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Switch to digital audio output",
@@ -449,15 +365,9 @@ const tI18nPhrase Phrases[] = {
"Selecciona sortida àudio digital",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"DXR3: releasing devices",
@@ -478,15 +388,9 @@ const tI18nPhrase Phrases[] = {
"DXR3: alliberant dispositiu",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Color settings",
@@ -507,15 +411,9 @@ const tI18nPhrase Phrases[] = {
"Ajustaments color",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Brightness",
@@ -536,15 +434,9 @@ const tI18nPhrase Phrases[] = {
"Lluminositat",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Contrast",
@@ -565,15 +457,9 @@ const tI18nPhrase Phrases[] = {
"Contrast",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Saturation",
@@ -594,15 +480,9 @@ const tI18nPhrase Phrases[] = {
"Saturació",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"Hide main menu entry",
@@ -623,15 +503,9 @@ const tI18nPhrase Phrases[] = {
"Amaga entrada menú",
"ÁÚàëâì ÚÞÜÐÝÔã Ò ÓÛÐÒÝÞÜ ÜÕÝî",
"", // Hrvatski
-#if VDRVERSNUM > 10312
"Peida valik peamenüüs",
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{
"OSD flush rate (ms)",
@@ -652,15 +526,9 @@ const tI18nPhrase Phrases[] = {
"Temps mínim refresc OSD (ms)",
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski
-#if VDRVERSNUM > 10312
"", // Eesti
-#if VDRVERSNUM > 10315
"", // Dansk
-#if VDRVERSNUM > 10341
"", // Czech
-#endif
-#endif
-#endif
},
{ NULL }
};
diff --git a/dxr3osd_subpicture.c b/dxr3osd_subpicture.c
index 65f20c3..77eed30 100644
--- a/dxr3osd_subpicture.c
+++ b/dxr3osd_subpicture.c
@@ -37,12 +37,8 @@ cDxr3SubpictureOsd::cDxr3SubpictureOsd(int Left, int Top) : cOsd(Left, Top)
{
shown = false;
Palette = new cPalette(4);
-#if VDRVERSNUM >= 10318
last = new cTimeMs();
last->Set(-cDxr3ConfigData::Instance().GetOsdFlushRate());
-#else
- last = time_ms() - cDxr3ConfigData::Instance().GetOsdFlushRate();
-#endif
Spu = &cSPUEncoder::Instance();
//Clears the OSD screen image
@@ -55,9 +51,7 @@ cDxr3SubpictureOsd::~cDxr3SubpictureOsd()
//Remove the OSD from the screen
Spu->StopSpu();
delete Palette;
-#if VDRVERSNUM >= 10318
delete last;
-#endif
}
// ==================================
@@ -94,15 +88,9 @@ eOsdError cDxr3SubpictureOsd::CanHandleAreas(const tArea *Areas, int NumAreas)
// ==================================
void cDxr3SubpictureOsd::Flush()
{
-#if VDRVERSNUM >= 10318
if (last->Elapsed() < cDxr3ConfigData::Instance().GetOsdFlushRate())
return;
last->Set();
-#else
- if (time_ms() - last < cDxr3ConfigData::Instance().GetOsdFlushRate())
- return;
- last = time_ms();
-#endif
#ifdef timingdebug
cTime t;
diff --git a/dxr3osd_subpicture.h b/dxr3osd_subpicture.h
index 33a5a81..7ff36bb 100644
--- a/dxr3osd_subpicture.h
+++ b/dxr3osd_subpicture.h
@@ -12,11 +12,7 @@ private:
cSPUEncoder* Spu; ///< interface to cSPUEncoder
bool shown; ///< is the osd shown?
cPalette* Palette; ///< global palette (needed by all bitmaps)
-#if VDRVERSNUM >= 10318
cTimeMs *last;
-#else
- int last;
-#endif
public:
cDxr3SubpictureOsd(int Left, int Top/*, int SpuDev*/);
diff --git a/dxr3spudecoder.c b/dxr3spudecoder.c
index 1013216..9fbd4e6 100644
--- a/dxr3spudecoder.c
+++ b/dxr3spudecoder.c
@@ -274,11 +274,7 @@ cDxr3SpuDecoder::~cDxr3SpuDecoder()
// ==================================
// ! send spu data to dxr3
-#if VDRVERSNUM >= 10318
void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow)
-#else
-void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf)
-#endif
{
setTime(pts);
dsyslog("dxr3: spudec push: pts=%d", pts);
@@ -293,9 +289,7 @@ void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf)
prev_DCSQ_offset = 0;
clean = true;
-#if VDRVERSNUM >= 10318
allowedShow = AllowedShow;
-#endif
}
// ==================================
diff --git a/dxr3spudecoder.h b/dxr3spudecoder.h
index 9f5adb1..4c617fc 100644
--- a/dxr3spudecoder.h
+++ b/dxr3spudecoder.h
@@ -108,11 +108,7 @@ public:
uint32_t palette);
void clearHighlight();
void Empty();
-#if VDRVERSNUM >= 10318
void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow);
-#else
- void processSPU(uint32_t pts, uint8_t * buf);
-#endif
void Hide();
void Draw();
diff --git a/dxr3syncbuffer.c b/dxr3syncbuffer.c
index 66be71b..e930744 100644
--- a/dxr3syncbuffer.c
+++ b/dxr3syncbuffer.c
@@ -162,15 +162,7 @@ cDxr3SyncBuffer::~cDxr3SyncBuffer()
// ==================================
int cDxr3SyncBuffer::Available(void)
{
- int ret = 0;
-#if VDRVERSNUM < 10313
- Lock();
-#endif
- ret = m_count;
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
- return ret;
+ return m_count;
}
// ==================================
@@ -251,9 +243,6 @@ cFixedLengthFrame* cDxr3SyncBuffer::Push(const uint8_t* pStart, int length, uint
}
}
-#if VDRVERSNUM < 10313
- Lock();
-#endif
if (pts == m_lastPts)
{
pts = 0;
@@ -293,9 +282,6 @@ cFixedLengthFrame* cDxr3SyncBuffer::Push(const uint8_t* pStart, int length, uint
m_bWaitPts = false;
}
}
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
break;
}
@@ -305,9 +291,6 @@ cFixedLengthFrame* cDxr3SyncBuffer::Push(const uint8_t* pStart, int length, uint
// ==================================
void cDxr3SyncBuffer::Pop(void)
{
-#if VDRVERSNUM < 10313
- Lock();
-#endif
if (m_count)
{
uint32_t nextPts = 0;
@@ -331,9 +314,6 @@ void cDxr3SyncBuffer::Pop(void)
}
}
EnablePut();
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
}
// ==================================
@@ -350,16 +330,10 @@ cFixedLengthFrame* cDxr3SyncBuffer::Get(void)
WaitForGet();
}
-#if VDRVERSNUM < 10313
- Lock();
-#endif
if (m_nextFree != m_next)
{
pRet = &m_pBuffer[m_next];
}
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
}
else
{
@@ -372,9 +346,6 @@ cFixedLengthFrame* cDxr3SyncBuffer::Get(void)
// ==================================
void cDxr3SyncBuffer::Clear(void)
{
-#if VDRVERSNUM < 10313
- Lock();
-#endif
m_next = 0;
m_nextFree = 0;
m_count = 0;
@@ -389,9 +360,6 @@ void cDxr3SyncBuffer::Clear(void)
}
cFixedLengthFrame::Clear();
cDxr3NextPts::Instance().Clear();
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
}
// ==================================
@@ -401,13 +369,7 @@ void cDxr3SyncBuffer::WaitForSysClock(uint32_t pts, uint32_t delta)
m_waitDelta = delta;
if (!m_bPutBlock)
{
-#if VDRVERSNUM < 10313
- Lock();
-#endif
m_bWaitPts = true;
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
m_bGetBlock = true;
ReceiverStopped();
WaitForGet();
@@ -447,9 +409,6 @@ void cDxr3SyncBuffer::Start(void)
// ==================================
void cDxr3SyncBuffer::WakeUp(void)
{
-#if VDRVERSNUM < 10313
- Lock();
-#endif
if (m_bStartReceiver == true)
{
if (!m_bWaitPts)
@@ -466,9 +425,6 @@ void cDxr3SyncBuffer::WakeUp(void)
}
}
}
-#if VDRVERSNUM < 10313
- Unlock();
-#endif
}
// ==================================