diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-08-21 08:56:49 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-08-21 08:56:49 +0200 |
commit | 6de23d7d96720f89cbc864bbf504fe466e224497 (patch) | |
tree | e0fa92f9f0d7816cfd0eef3507f069758d053300 /device.c | |
parent | ba3437f7ccbc86f67b8cbfc5a88cc6c3b4fd6ed9 (diff) | |
download | vdr-6de23d7d96720f89cbc864bbf504fe466e224497.tar.gz vdr-6de23d7d96720f89cbc864bbf504fe466e224497.tar.bz2 |
Now waiting at startup until all DVB devices are ready
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.105 2005/08/14 10:52:08 kls Exp $ + * $Id: device.c 1.106 2005/08/21 08:56:49 kls Exp $ */ #include "device.h" @@ -195,6 +195,20 @@ cDevice::~cDevice() delete pesAssembler; } +bool cDevice::WaitForAllDevicesReady(int Timeout) +{ + for (time_t t0 = time(NULL); time(NULL) - t0 < Timeout; ) { + bool ready = true; + for (int i = 0; i < numDevices; i++) { + if (device[i] && !device[i]->Ready()) + ready = false; + } + if (ready) + return true; + } + return false; +} + void cDevice::SetUseDevice(int n) { if (n < MAXDEVICES) @@ -1103,6 +1117,11 @@ int cDevice::CanShift(int Ca, int Priority, int UsedCards) const XXX*/ } +bool cDevice::Ready(void) +{ + return true; +} + int cDevice::ProvidesCa(const cChannel *Channel) const { int Ca = Channel->Ca(); |