Optimized OSD thread termination.

This commit is contained in:
Rolf Ahrenberg 2008-09-17 18:51:38 +03:00
parent 1570cf80f8
commit f40d9b699b
3 changed files with 4 additions and 2 deletions

View File

@ -302,4 +302,4 @@ VDR Plugin 'femon' Revision History
2008-xx-xx: Version 1.6.2 2008-xx-xx: Version 1.6.2
- Converted HISTORY and fi_FI.po to UTF-8. - Converted HISTORY and fi_FI.po to UTF-8.
- Optimized receiver thread termination. - Optimized receiver and OSD thread termination.

View File

@ -128,6 +128,7 @@ cFemonOsd::cFemonOsd()
cFemonOsd::~cFemonOsd(void) cFemonOsd::~cFemonOsd(void)
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
m_Sleep.Signal();
if (Running()) if (Running())
Cancel(3); Cancel(3);
if (m_SvdrpConnection.handle >= 0) { if (m_SvdrpConnection.handle >= 0) {
@ -557,7 +558,7 @@ void cFemonOsd::Action(void)
DrawInfoWindow(); DrawInfoWindow();
DrawStatusWindow(); DrawStatusWindow();
} }
cCondWait::SleepMs(100 * femonConfig.updateinterval - t.Elapsed()); m_Sleep.Wait(max((int)(100 * femonConfig.updateinterval - t.Elapsed()), 3));
} }
} }

View File

@ -46,6 +46,7 @@ private:
int m_DisplayMode; int m_DisplayMode;
const cFont *m_Font; const cFont *m_Font;
cTimeMs m_InputTime; cTimeMs m_InputTime;
cCondWait m_Sleep;
cMutex* m_Mutex; cMutex* m_Mutex;
static cBitmap bmStereo, bmMonoLeft, bmMonoRight, bmDD, bmDD20, bmDD51; static cBitmap bmStereo, bmMonoLeft, bmMonoRight, bmDD, bmDD20, bmDD51;
static cBitmap bmNumbers[MAX_BMNUMBERS]; static cBitmap bmNumbers[MAX_BMNUMBERS];