diff options
Diffstat (limited to 'device.c')
-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; } |