summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2009-01-26 09:02:08 +0000
committerphintuka <phintuka>2009-01-26 09:02:08 +0000
commit976555e242ac254ef17f98bdbd7f0356e22b7646 (patch)
treedd27f53b7be7cb34fc1f249a5ce3957786ef562f
parent3f4abcf65877dbaf9b75d896afd29b568c0dc5ba (diff)
downloadxineliboutput-976555e242ac254ef17f98bdbd7f0356e22b7646.tar.gz
xineliboutput-976555e242ac254ef17f98bdbd7f0356e22b7646.tar.bz2
Added TimeoutMs to PlayFile()
-rw-r--r--device.c13
-rw-r--r--device.h5
-rw-r--r--frontend.c7
-rw-r--r--frontend.h5
4 files changed, 17 insertions, 13 deletions
diff --git a/device.c b/device.c
index bca0168e..b0d243ba 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.64 2009-01-08 11:58:33 rofafor Exp $
+ * $Id: device.c,v 1.65 2009-01-26 09:02:08 phintuka Exp $
*
*/
@@ -872,7 +872,8 @@ bool cXinelibDevice::EndOfStreamReached(void)
}
bool cXinelibDevice::PlayFile(const char *FileName, int Position,
- bool LoopPlay, ePlayMode PlayMode)
+ bool LoopPlay, ePlayMode PlayMode,
+ int TimeoutMs)
{
TRACEF("cXinelibDevice::PlayFile");
TRACE("cXinelibDevice::PlayFile(\"" << FileName << "\")");
@@ -888,14 +889,14 @@ bool cXinelibDevice::PlayFile(const char *FileName, int Position,
for(int i = 0; i < mi_Count; i++)
m_MetaInfo[i][0] = 0;
if(m_server)
- result = m_server->PlayFile(FileName, Position, LoopPlay, PlayMode);
+ result = m_server->PlayFile(FileName, Position, LoopPlay, PlayMode, TimeoutMs);
if(m_local)
- result = m_local->PlayFile(FileName, Position, LoopPlay, PlayMode);
+ result = m_local->PlayFile(FileName, Position, LoopPlay, PlayMode, TimeoutMs);
} else if(/*!FileName &&*/m_PlayingFile != pmNone) {
if(m_server)
- result = m_server->PlayFile(NULL, 0);
+ result = m_server->PlayFile(NULL, 0, 0, pmNone, TimeoutMs);
if(m_local)
- result = m_local->PlayFile(NULL, 0);
+ result = m_local->PlayFile(NULL, 0, 0, pmNone, TimeoutMs);
if(!m_liveMode)
SetReplayMode();
else
diff --git a/device.h b/device.h
index 26c8050f..5046347f 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h,v 1.39 2009-01-08 11:58:33 rofafor Exp $
+ * $Id: device.h,v 1.40 2009-01-26 09:02:08 phintuka Exp $
*
*/
@@ -216,7 +216,8 @@ class cXinelibDevice : public cDevice
public:
bool PlayFile(const char *Filename, int Position=0,
- bool LoopPlay=false, ePlayMode PlayMode=pmAudioVideo);
+ bool LoopPlay=false, ePlayMode PlayMode=pmAudioVideo,
+ int TimeoutMs = -1);
int PlayFileCtrl(const char *Cmd, int TimeoutMs=-1);
bool EndOfStreamReached(void);
diff --git a/frontend.c b/frontend.c
index 690e2f66..7f5e794c 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.66 2009-01-08 11:58:33 rofafor Exp $
+ * $Id: frontend.c,v 1.67 2009-01-26 08:58:52 phintuka Exp $
*
*/
@@ -689,7 +689,8 @@ int cXinelibThread::Xine_Control(const char *cmd, const char *p1)
}
bool cXinelibThread::PlayFile(const char *FileName, int Position,
- bool LoopPlay, ePlayMode PlayMode)
+ bool LoopPlay, ePlayMode PlayMode,
+ int TimeoutMs)
{
TRACEF("cXinelibThread::PlayFile");
@@ -738,7 +739,7 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position,
Unlock();
}
- int result = PlayFileCtrl(buf);
+ int result = PlayFileCtrl(buf, TimeoutMs);
if(!FileName || result != 0) {
Lock();
diff --git a/frontend.h b/frontend.h
index 08702e92..0dfb3f5f 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.26 2009-01-08 11:58:33 rofafor Exp $
+ * $Id: frontend.h,v 1.27 2009-01-26 08:58:52 phintuka Exp $
*
*/
@@ -93,7 +93,8 @@ class cXinelibThread : public cThread, public cListObject
// Playback files
virtual bool PlayFile(const char *FileName, int Position,
- bool LoopPlay = false, ePlayMode PlayMode = pmAudioVideo);
+ bool LoopPlay = false, ePlayMode PlayMode = pmAudioVideo,
+ int TimeoutMs = -1);
virtual int PlayFileCtrl(const char *Cmd, int TimeoutMs=-1) { return Xine_Control(Cmd); }
virtual bool EndOfStreamReached(void);