summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-08-21 08:56:49 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-08-21 08:56:49 +0200
commit6de23d7d96720f89cbc864bbf504fe466e224497 (patch)
treee0fa92f9f0d7816cfd0eef3507f069758d053300 /device.c
parentba3437f7ccbc86f67b8cbfc5a88cc6c3b4fd6ed9 (diff)
downloadvdr-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.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/device.c b/device.c
index 9fcc420b..2f614988 100644
--- a/device.c
+++ b/device.c
@@ -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();