diff options
author | schmirl <schmirl> | 2008-10-22 11:59:35 +0000 |
---|---|---|
committer | schmirl <schmirl> | 2008-10-22 11:59:35 +0000 |
commit | 84f994384a4273d71531001167822fce04e3bb7e (patch) | |
tree | 60c39a9d167be9d9a29d3b409cd4b84a408f471b /server/suspend.c | |
parent | 5c24a1307599c13f918a50284ebc89b92f597854 (diff) | |
download | vdr-plugin-streamdev-84f994384a4273d71531001167822fce04e3bb7e.tar.gz vdr-plugin-streamdev-84f994384a4273d71531001167822fce04e3bb7e.tar.bz2 |
- use cThread::Running()/Active() instead of private members
- replaced the last usleep by cCondWait
thanks to Rolf Ahrenberg (#383)
Modified Files:
Tag: v0_4
CONTRIBUTORS HISTORY server/server.c server/server.h
server/streamer.c server/streamer.h server/suspend.c
server/suspend.h
Diffstat (limited to 'server/suspend.c')
-rw-r--r-- | server/suspend.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/server/suspend.c b/server/suspend.c index 541131c..4ee86d4 100644 --- a/server/suspend.c +++ b/server/suspend.c @@ -1,5 +1,5 @@ /* - * $Id: suspend.c,v 1.2 2008/04/07 14:27:31 schmirl Exp $ + * $Id: suspend.c,v 1.2.2.1 2008/10/22 11:59:37 schmirl Exp $ */ #include "server/suspend.h" @@ -12,6 +12,7 @@ cSuspendLive::cSuspendLive(void) } cSuspendLive::~cSuspendLive() { + Stop(); Detach(); } @@ -24,17 +25,14 @@ void cSuspendLive::Activate(bool On) { } void cSuspendLive::Stop(void) { - if (m_Active) { - m_Active = false; + if (Running()) Cancel(3); - } } void cSuspendLive::Action(void) { - m_Active = true; - while (m_Active) { + while (Running()) { DeviceStillPicture(suspend_mpg, sizeof(suspend_mpg)); - usleep(100000); + cCondWait::SleepMs(100); } } @@ -51,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; } |