summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/udp_pes_scheduler.c8
-rw-r--r--tools/udp_pes_scheduler.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index 81b2bf11..c43d4736 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.23 2007-01-20 18:23:28 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.24 2007-01-24 01:04:08 phintuka Exp $
*
*/
@@ -285,7 +285,7 @@ bool cUdpScheduler::Poll(int TimeoutMs, bool Master)
if(m_Handles[0] < 0) {
// no clients, so we can eat all data we are given ...
- return true;
+ return 1;
}
int limit = m_Master ? MAX_QUEUE_SIZE : MAX_LIVE_QUEUE_SIZE;
@@ -300,7 +300,7 @@ bool cUdpScheduler::Poll(int TimeoutMs, bool Master)
m_Cond.TimedWait(m_Lock, 5);
}
- return m_QueuePending < limit;
+ return min(limit - m_QueuePending, 0);
}
bool cUdpScheduler::Flush(int TimeoutMs)
@@ -565,6 +565,8 @@ void cUdpScheduler::Schedule(const uchar *Data, int Length)
MasterClock.Set(current_audio_vtime + INITIAL_BURST_TIME);
}
}
+#warning yle audio pts once in 8 pes ... -> 220ms?
+#warning how to detect audio pes time ?
else if(Video && m_TrickSpeed) {
if(now > current_video_vtime && (now - current_video_vtime)>JUMP_LIMIT_TIME) {
diff --git a/tools/udp_pes_scheduler.h b/tools/udp_pes_scheduler.h
index 47422d4c..20f69295 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.10 2007-01-06 04:02:25 phintuka Exp $
+ * $Id: udp_pes_scheduler.h,v 1.11 2007-01-24 01:04:09 phintuka Exp $
*
*/
@@ -39,7 +39,7 @@ class cUdpScheduler : public cThread
void RemoveHandle(cxSocket& s) { RemoveHandle(s.handle()); }
bool Clients(void) { return m_Handles[0] >= 0; }
- bool Poll(int TimeoutMs, bool Master);
+ int Poll(int TimeoutMs, bool Master);
bool Queue(uint64_t StreamPos, const uchar *Data, int Length);
void ReSend(int fd, uint64_t Pos, int Seq1, int Seq2);