summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2009-06-30 13:05:57 +0000
committerphintuka <phintuka>2009-06-30 13:05:57 +0000
commit1bbd8487432cf3de45b847d56b989df1d451884e (patch)
tree6b5569b708c9dbf544b2f379fd5b1b8a0675aeda
parent39b29f7dffea2366871128a5d0d07be04a0a869a (diff)
downloadxineliboutput-1bbd8487432cf3de45b847d56b989df1d451884e.tar.gz
xineliboutput-1bbd8487432cf3de45b847d56b989df1d451884e.tar.bz2
Replaced m_Running with cThread::Running()
-rw-r--r--tools/udp_pes_scheduler.c14
-rw-r--r--tools/udp_pes_scheduler.h3
2 files changed, 7 insertions, 10 deletions
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index c2f19182..7c9ca73b 100644
--- a/tools/udp_pes_scheduler.c
+++ b/tools/udp_pes_scheduler.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: udp_pes_scheduler.c,v 1.39 2009-06-01 14:33:11 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.40 2009-06-30 13:05:57 phintuka Exp $
*
*/
@@ -109,8 +109,6 @@ cUdpScheduler::cUdpScheduler()
// Thread
- m_Running = 1;
-
Start();
}
@@ -118,7 +116,7 @@ cUdpScheduler::~cUdpScheduler()
{
m_Lock.Lock();
- m_Running = 0;
+ Cancel(-1);
m_Cond.Broadcast();
m_Lock.Unlock();
@@ -332,7 +330,7 @@ int cUdpScheduler::Poll(int TimeoutMs, bool Master)
WaitEnd += (uint64_t)TimeoutMs;
while(cTimeMs::Now() < WaitEnd &&
- m_Running &&
+ Running() &&
m_QueuePending >= limit)
m_Cond.TimedWait(m_Lock, 5);
}
@@ -353,7 +351,7 @@ bool cUdpScheduler::Flush(int TimeoutMs)
WaitEnd += (uint64_t)TimeoutMs;
while(cTimeMs::Now() < WaitEnd &&
- m_Running &&
+ Running() &&
m_QueuePending > 0)
m_Cond.TimedWait(m_Lock, 5);
}
@@ -693,7 +691,7 @@ void cUdpScheduler::Action(void)
m_Lock.Lock();
- while(m_Running) {
+ while (Running()) {
if(m_Handles[0] < 0) {
m_Cond.TimedWait(m_Lock, 5000);
@@ -718,7 +716,7 @@ void cUdpScheduler::Action(void)
m_BackLog->MakeFrame(0, padding, 8);
m_QueuePending++;
}
- continue; // to check m_Running
+ continue; // to check Running()
}
// Take next frame from queue
diff --git a/tools/udp_pes_scheduler.h b/tools/udp_pes_scheduler.h
index 7638f1e3..d53cc562 100644
--- a/tools/udp_pes_scheduler.h
+++ b/tools/udp_pes_scheduler.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: udp_pes_scheduler.h,v 1.14 2009-03-24 19:00:27 phintuka Exp $
+ * $Id: udp_pes_scheduler.h,v 1.15 2009-06-30 13:05:57 phintuka Exp $
*
*/
@@ -95,7 +95,6 @@ class cUdpScheduler : public cThread
int calc_elapsed_vtime(int64_t pts, bool Audio);
void Schedule(const uchar *Data, int Length);
- bool m_Running;
virtual void Action(void);
void Send_RTCP(void);