summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--dxr3demuxdevice.c4
-rw-r--r--dxr3device.c3
-rw-r--r--dxr3interface.c2
-rw-r--r--dxr3interface.h1
-rw-r--r--dxr3outputthread.c5
-rw-r--r--dxr3syncbuffer.c5
7 files changed, 7 insertions, 14 deletions
diff --git a/HISTORY b/HISTORY
index 36fcb7b..5856f08 100644
--- a/HISTORY
+++ b/HISTORY
@@ -320,3 +320,4 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- add Polish translation (Mikolaj Tutak)
- sync "make install" with VDR 1.4.2-2 (Ville Skyttä)
+- use cCondWait::SleepMs() instead of usleep (Ville Skyttä)
diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c
index d80316d..bed1a11 100644
--- a/dxr3demuxdevice.c
+++ b/dxr3demuxdevice.c
@@ -22,9 +22,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
-#include <unistd.h>
-#include "dxr3demuxdevice.h"
#include <linux/em8300.h>
+#include "dxr3demuxdevice.h"
#include "dxr3pesframe.h"
#include "dxr3configdata.h"
@@ -348,7 +347,6 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts)
bPlaySuc = true;
//if (bPlayedFrame) return length;
bPlayedFrame = true;
- //usleep(30000); // otherwise there is problem with audio (driver bug?)
m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize());
m_dxr3Device.SetVerticalSize(pesFrame.GetVerticalSize());
m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), m_ReUseFrame);
diff --git a/dxr3device.c b/dxr3device.c
index f2e9160..9508f0d 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -234,8 +234,6 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length)
m_DemuxDevice.GetTrickState() == DXR3_FREEZE) ||
cDxr3Interface::Instance().IsExternalReleased())
{
- // Why is here so a huge time waster?
- //usleep(1000000);
return -1;
}
@@ -288,7 +286,6 @@ int cDxr3Device::PlayAudio(const uchar *Data, int Length, uchar Id)
m_DemuxDevice.GetTrickState() == DXR3_FREEZE) ||
cDxr3Interface::Instance().IsExternalReleased())
{
- //usleep(1000000);
return 0;
}
diff --git a/dxr3interface.c b/dxr3interface.c
index 07291a9..951dac7 100644
--- a/dxr3interface.c
+++ b/dxr3interface.c
@@ -874,7 +874,7 @@ void cDxr3Interface::ReOpenAudio()
{
int bufsize = 0;
ioctl(m_fdAudio, SNDCTL_DSP_GETODELAY, &bufsize);
- usleep(bufsize / 192 * 1000);
+ cCondWait::SleepMs(bufsize / 192);
delete m_pClock;
close(m_fdAudio);
diff --git a/dxr3interface.h b/dxr3interface.h
index dfac31d..29c32d4 100644
--- a/dxr3interface.h
+++ b/dxr3interface.h
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <stdint.h>
-#include <unistd.h>
#include <linux/em8300.h>
#include <sys/ioctl.h>
diff --git a/dxr3outputthread.c b/dxr3outputthread.c
index b934d58..81c6a3d 100644
--- a/dxr3outputthread.c
+++ b/dxr3outputthread.c
@@ -20,7 +20,6 @@
*/
#include <stdio.h>
-#include <unistd.h>
#include <time.h>
#include "dxr3outputthread.h"
@@ -117,7 +116,7 @@ void cDxr3AudioOutThread::Action()
if ((pts > SCR && abs((int)pts - (int)SCR) > AUDIO_OFFSET))
{
- usleep(10000);
+ cCondWait::SleepMs(10);
}
}
}
@@ -199,7 +198,7 @@ void cDxr3VideoOutThread::Action()
if ((pts > SCR && abs((int)pts - (int)SCR) > 7500 ))
{
- usleep(10000);
+ cCondWait::SleepMs(10);
}
}
}
diff --git a/dxr3syncbuffer.c b/dxr3syncbuffer.c
index e930744..275a801 100644
--- a/dxr3syncbuffer.c
+++ b/dxr3syncbuffer.c
@@ -25,7 +25,6 @@
sufficient control algorithm is implemented
*/
-#include <unistd.h>
#include <sys/time.h>
#include "dxr3syncbuffer.h"
@@ -376,7 +375,7 @@ void cDxr3SyncBuffer::WaitForSysClock(uint32_t pts, uint32_t delta)
}
else
{
- usleep(1); //* (pts - pSysClock->GetSysClock()));
+ cCondWait::SleepMs(3); //* (pts - pSysClock->GetSysClock()));
}
}
@@ -391,7 +390,7 @@ void cDxr3SyncBuffer::WaitForNextPut(void)
}
else
{
- usleep(1);
+ cCondWait::SleepMs(3);
}
}