diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:43:13 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:43:13 +0100 |
commit | 7254a6752808830d5fc133e5362da6c47f3f84ff (patch) | |
tree | 673cc17f88ba80f8a67debb54f85ea100cde9ae5 /server/suspend.c | |
parent | 31df0eaf8e49bc1cfea755bd88f3dd795c8f1ace (diff) | |
download | vdr-plugin-streamdev-7254a6752808830d5fc133e5362da6c47f3f84ff.tar.gz vdr-plugin-streamdev-7254a6752808830d5fc133e5362da6c47f3f84ff.tar.bz2 |
Snapshot 2009-06-11
Diffstat (limited to 'server/suspend.c')
-rw-r--r-- | server/suspend.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/server/suspend.c b/server/suspend.c index 9ac9ac5..b6e1382 100644 --- a/server/suspend.c +++ b/server/suspend.c @@ -1,5 +1,5 @@ /* - * $Id: suspend.c,v 1.1.1.1 2004/12/30 22:44:21 lordjaxom Exp $ + * $Id: suspend.c,v 1.3 2008/10/22 11:59:32 schmirl Exp $ */ #include "server/suspend.h" @@ -7,13 +7,12 @@ #include "common.h" cSuspendLive::cSuspendLive(void) -#if VDRVERSNUM >= 10300 : cThread("Streamdev: server suspend") -#endif { } cSuspendLive::~cSuspendLive() { + Stop(); Detach(); } @@ -26,26 +25,15 @@ void cSuspendLive::Activate(bool On) { } void cSuspendLive::Stop(void) { - if (m_Active) { - m_Active = false; + if (Running()) Cancel(3); - } } void cSuspendLive::Action(void) { -#if VDRVERSNUM < 10300 - isyslog("Streamdev: Suspend Live thread started (pid = %d)", getpid()); -#endif - - m_Active = true; - while (m_Active) { + while (Running()) { DeviceStillPicture(suspend_mpg, sizeof(suspend_mpg)); - usleep(100000); + cCondWait::SleepMs(100); } - -#if VDRVERSNUM < 10300 - isyslog("Streamdev: Suspend Live thread stopped"); -#endif } bool cSuspendCtl::m_Active = false; @@ -61,7 +49,7 @@ cSuspendCtl::~cSuspendCtl() { } eOSState cSuspendCtl::ProcessKey(eKeys Key) { - if (!m_Suspend->IsActive() || Key == kBack) { + if (!m_Suspend->Active() || Key == kBack) { DELETENULL(m_Suspend); return osEnd; } |