summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-01-24 01:05:34 +0000
committerphintuka <phintuka>2007-01-24 01:05:34 +0000
commitea0e483808a1583ccd4e2698e24aca5106c4bac8 (patch)
tree701949e772c894fc61ab520d38edd54e49e8f671
parent96eecd3c9d4c2a770670476ddaf7b2c3429b8c1b (diff)
downloadxineliboutput-ea0e483808a1583ccd4e2698e24aca5106c4bac8.tar.gz
xineliboutput-ea0e483808a1583ccd4e2698e24aca5106c4bac8.tar.bz2
Poll returns number of free buffers instead of boolean
-rw-r--r--frontend.c9
-rw-r--r--frontend.h4
2 files changed, 5 insertions, 8 deletions
diff --git a/frontend.c b/frontend.c
index c2f03c08..74cff5fc 100644
--- a/frontend.c
+++ b/frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.c,v 1.28 2007-01-20 18:22:33 phintuka Exp $
+ * $Id: frontend.c,v 1.29 2007-01-24 01:05:34 phintuka Exp $
*
*/
@@ -347,16 +347,13 @@ bool cXinelibThread::Flush(int TimeoutMs)
return Xine_Control("FLUSH", TimeoutMs) <= 0;
}
-bool cXinelibThread::Poll(cPoller& Poller, int TimeoutMs)
+int cXinelibThread::Poll(cPoller& Poller, int TimeoutMs)
{
TRACEF("cXinelibThread::Poll");
int n = Xine_Control("POLL", TimeoutMs);
- if(n>0)
- return true;
-
- return false; // Poller.Poll(TimeoutMs);
+ return min(n, 0);
}
//
diff --git a/frontend.h b/frontend.h
index 1d968eb6..9bc0e683 100644
--- a/frontend.h
+++ b/frontend.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.h,v 1.12 2007-01-06 04:32:27 phintuka Exp $
+ * $Id: frontend.h,v 1.13 2007-01-24 01:05:34 phintuka Exp $
*
*/
@@ -68,7 +68,7 @@ class cXinelibThread : public cThread, public cListObject
//
public:
- virtual bool Poll(cPoller &Poller, int TimeoutMs);
+ virtual int Poll(cPoller &Poller, int TimeoutMs);
virtual bool Flush(int TimeoutMs);
virtual void Clear(void);
virtual int Play_PES(const uchar *buf, int len);