diff options
author | phintuka <phintuka> | 2007-09-30 09:19:11 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-09-30 09:19:11 +0000 |
commit | 60e8d0dbf9661cca9b33e36968d1d5b20984d65a (patch) | |
tree | 2a20569f9133ad9ce4bd3a3875ac72d05286f8f9 | |
parent | d5f3603b7496a5450ef123125ab69fb26ea94b0b (diff) | |
download | xineliboutput-60e8d0dbf9661cca9b33e36968d1d5b20984d65a.tar.gz xineliboutput-60e8d0dbf9661cca9b33e36968d1d5b20984d65a.tar.bz2 |
Increase local frontend initialization timeout (Thanks to Mikko Vartiainen)
Start local frontend and remote server in paraller
-rw-r--r-- | device.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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.40 2007-09-17 23:29:22 phintuka Exp $ + * $Id: device.c,v 1.41 2007-09-30 09:19:11 phintuka Exp $ * */ @@ -41,6 +41,8 @@ #include "device.h" #define STILLPICTURE_REPEAT_COUNT 3 +#define LOCAL_INIT_TIMEOUT 20 // seconds +#define SERVER_INIT_TIMEOUT 5 // seconds //---------------------------- status monitor ------------------------------- @@ -240,17 +242,21 @@ bool cXinelibDevice::StartDevice() { TRACEF("cXinelibDevice::StartDevice"); + if(m_local) + m_local->Start(); + if(m_server) + m_server->Start(); + // if(dynamic_cast<cXinelibLocal*>(it)) if(m_local) { int timer = 0; - m_local->Start(); while(!m_local->IsReady()) { cCondWait::SleepMs(100); if(m_local->IsFinished()) { LOGMSG("cXinelibDevice::Start(): Local frontend init failed"); return false; } - if(++timer >= 7*10) { + if(++timer >= LOCAL_INIT_TIMEOUT*10) { LOGMSG("cXinelibDevice::Start(): Local frontend init timeout"); return false; } @@ -261,14 +267,13 @@ bool cXinelibDevice::StartDevice() if(m_server) { int timer = 0; - m_server->Start(); while(!m_server->IsReady()) { cCondWait::SleepMs(100); if(m_server->IsFinished()) { LOGMSG("cXinelibDevice::Start(): Server init failed"); return false; } - if(++timer >= 5*10) { + if(++timer >= SERVER_INIT_TIMEOUT*10) { LOGMSG("cXinelibDevice::Start(): Server init timeout"); return false; } |