summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--dxr3outputthread.c28
-rw-r--r--dxr3outputthread.h3
3 files changed, 3 insertions, 29 deletions
diff --git a/HISTORY b/HISTORY
index aa05560..6186f78 100644
--- a/HISTORY
+++ b/HISTORY
@@ -314,3 +314,4 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- add Czech i18n placeholders (Ville Skyttä)
- be less noisy about audio mode (non-)changes (Ville Skyttä)
- add work-in-progress AC3 patch to patches/ (Agneau Egare, Ville Skyttä)
+- use VDR's thread activity control features instead of our own (Luca Olivetti)
diff --git a/dxr3outputthread.c b/dxr3outputthread.c
index 5bfc7ac..b934d58 100644
--- a/dxr3outputthread.c
+++ b/dxr3outputthread.c
@@ -36,33 +36,11 @@ cDxr3OutputThread::cDxr3OutputThread(cDxr3Interface& dxr3Device,
cThread(),
m_dxr3Device(dxr3Device),
m_buffer(buffer),
- m_bStopThread(false),
m_bNeedResync(false)
{
}
// ==================================
-//! send stop signal
-void cDxr3OutputThread::SetStopSignal()
-{
- Lock();
- m_bStopThread = true;
- Unlock();
-}
-
-// ==================================
-//! was stop signal send?
-bool cDxr3OutputThread::GetStopSignal()
-{
- bool ret = false;
- Lock();
- ret = m_bStopThread;
- Unlock();
-
- return ret;
-}
-
-// ==================================
//! constr.
cDxr3AudioOutThread::cDxr3AudioOutThread(cDxr3Interface& dxr3Device,
cDxr3SyncBuffer& buffer) :
@@ -75,7 +53,6 @@ cDxr3AudioOutThread::cDxr3AudioOutThread(cDxr3Interface& dxr3Device,
cDxr3AudioOutThread::~cDxr3AudioOutThread()
{
m_buffer.Stop();
- SetStopSignal();
Cancel(3);
}
@@ -86,7 +63,7 @@ void cDxr3AudioOutThread::Action()
bool resync = false;
uint32_t pts = 0;
- while (!GetStopSignal())
+ while (Running())
{
pts = 0;
cFixedLengthFrame* pNext = m_buffer.Get();
@@ -158,7 +135,6 @@ cDxr3VideoOutThread::cDxr3VideoOutThread(cDxr3Interface& dxr3Device,
cDxr3VideoOutThread::~cDxr3VideoOutThread()
{
m_buffer.Stop();
- SetStopSignal();
Cancel(3);
}
@@ -169,7 +145,7 @@ void cDxr3VideoOutThread::Action()
uint32_t pts = 0;
static uint32_t lastPts = 0;
- while (!GetStopSignal())
+ while (Running())
{
cFixedLengthFrame* pNext = m_buffer.Get();
if (pNext)
diff --git a/dxr3outputthread.h b/dxr3outputthread.h
index 6b9982b..3d08156 100644
--- a/dxr3outputthread.h
+++ b/dxr3outputthread.h
@@ -41,7 +41,6 @@ public:
cThread::Start();
};
*/
- void SetStopSignal(); // can be removed when only VDR >= 1.3.29 supported
bool NeedResync()
{
return m_bNeedResync;
@@ -53,11 +52,9 @@ public:
protected:
virtual void Action() = 0;
- bool GetStopSignal(); // can be replaced by Running() in VDR >= 1.3.29
cDxr3Interface& m_dxr3Device;
cDxr3SyncBuffer& m_buffer;
- bool m_bStopThread; // can be removed when only VDR >= 1.3.29 supported
bool m_bNeedResync;
private: