diff options
author | phintuka <phintuka> | 2007-01-24 01:05:34 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-01-24 01:05:34 +0000 |
commit | ea0e483808a1583ccd4e2698e24aca5106c4bac8 (patch) | |
tree | 701949e772c894fc61ab520d38edd54e49e8f671 | |
parent | 96eecd3c9d4c2a770670476ddaf7b2c3429b8c1b (diff) | |
download | xineliboutput-ea0e483808a1583ccd4e2698e24aca5106c4bac8.tar.gz xineliboutput-ea0e483808a1583ccd4e2698e24aca5106c4bac8.tar.bz2 |
Poll returns number of free buffers instead of boolean
-rw-r--r-- | frontend.c | 9 | ||||
-rw-r--r-- | frontend.h | 4 |
2 files changed, 5 insertions, 8 deletions
@@ -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); } // @@ -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); |