diff options
author | Andreas Brachold <vdr07@deltab.de> | 2005-08-16 16:05:58 +0000 |
---|---|---|
committer | Andreas Brachold <vdr07@deltab.de> | 2005-08-16 16:05:58 +0000 |
commit | 28818acea3c22032523a4f1975545d4e490e1b01 (patch) | |
tree | 25304d28a3d802c563f6da134bf4d466db134c4b /liboutput/stillimage.c | |
parent | 8c5bda0e344a1389cad91eef9f7e00b069ffa933 (diff) | |
download | vdr-plugin-image-28818acea3c22032523a4f1975545d4e490e1b01.tar.gz vdr-plugin-image-28818acea3c22032523a4f1975545d4e490e1b01.tar.bz2 |
-remove redundant code
- now for compiled are at the least VDR 1.3.28 required
Diffstat (limited to 'liboutput/stillimage.c')
-rw-r--r-- | liboutput/stillimage.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/liboutput/stillimage.c b/liboutput/stillimage.c index 12bd902..a83306d 100644 --- a/liboutput/stillimage.c +++ b/liboutput/stillimage.c @@ -34,7 +34,6 @@ cStillImage::cStillImage(cStillImagePlayer *pl) { - m_bThreadRun=false; m_bEncodeRequired = false; player=pl; } @@ -44,30 +43,20 @@ cStillImage::~cStillImage() } -bool cStillImage::Init() -{ - return Start(); -} - void cStillImage::Stop() { - if (!m_bThreadRun) - return; - m_bThreadRun=false; - Cancel(3); } void cStillImage::Action(void) { - m_bThreadRun=true; bool bMPEGValid = false; bool bQueueEmpty = false; bool bFreeze = true; unsigned int nFrame = 0,nFrameOff=0; int nMircoSekWait; - while (m_bThreadRun) { + while (Running()) { nMircoSekWait = 10000; bQueueEmpty = player->Worker(false); @@ -89,7 +78,7 @@ void cStillImage::Action(void) bMPEGValid = Encode(); Unlock(); - if (!m_bThreadRun) + if (!Running()) break; m_bEncodeRequired = false; nFrame = 0; @@ -145,13 +134,12 @@ void cStillImage::Action(void) nMircoSekWait = (1000000/(GetFrameRate()*4)); // Wait duration off 1/4 frame - if (!m_bThreadRun) + if (!Running()) break; } //Reduce CPU load!!! usleep(max(10000,nMircoSekWait)); } - m_bThreadRun=false; } |