diff options
author | lordjaxom <lordjaxom> | 2004-10-27 18:08:03 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-10-27 18:08:03 +0000 |
commit | eb2f2c9600e8f69788232582191b141002bcd522 (patch) | |
tree | 4510197a5afd5e657e42421eb96820134e916c6b | |
parent | 5071a1754f3db0adcf477ecf8e5b2a818d1935bd (diff) | |
download | vdr-plugin-text2skin-eb2f2c9600e8f69788232582191b141002bcd522.tar.gz vdr-plugin-text2skin-eb2f2c9600e8f69788232582191b141002bcd522.tar.bz2 |
- fixed ugly race conditions that appears to occur more often with VDR >= 1.3.14v0.0.8.1
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | display.c | 2 | ||||
-rw-r--r-- | render.c | 10 | ||||
-rw-r--r-- | render.h | 1 | ||||
-rw-r--r-- | screen.c | 1 | ||||
-rw-r--r-- | text2skin.c | 2 |
6 files changed, 19 insertions, 1 deletions
@@ -1,6 +1,10 @@ VDR Plugin 'text2skin' Revision History --------------------------------------- +2004-07-27: Version 0.0.8.1 + +- fixed ugly race conditions that appears to occur more often with VDR >= 1.3.14 + 2004-07-14: Version 0.0.8 - fixed display of scrollbar if there is no text present @@ -53,7 +53,9 @@ void cText2SkinDisplayChannel::SetMessage(eMessageType Type, const char *Text) { void cText2SkinDisplayChannel::Flush(void) { if (mDirty) { + Dprintf("Flushing\n"); mRender->Flush(); + Dprintf("Flushing done\n"); mDirty = false; } } @@ -90,6 +90,7 @@ cText2SkinRender::cText2SkinRender(cText2SkinLoader *Loader, eSkinSection Sectio } } res = mScreen->SetAreas(areas, numAreas); + Dprintf("areas set, res = %d\n", res); if (res != oeOk) { const char *emsg = NULL; @@ -113,7 +114,12 @@ cText2SkinRender::cText2SkinRender(cText2SkinLoader *Loader, eSkinSection Sectio } esyslog("ERROR: text2skin: OSD provider can't handle skin: %s\n", emsg); } + + Lock(); Start(); + mStarted.Wait(mMutex); + Unlock(); + // Make sure this constructor returns when the thread is running } cText2SkinRender::~cText2SkinRender() { @@ -131,9 +137,13 @@ cText2SkinRender::~cText2SkinRender() { void cText2SkinRender::Action(void) { mActive = true; Lock(); + mStarted.Broadcast(); // signal the constructor while (mActive) { + Dprintf("mutex locked? %d\n", mMutex.locked); + int b = time_ms(); if (mUpdateIn) mDoUpdate.TimedWait(mMutex, mUpdateIn); else mDoUpdate.Wait(mMutex); + Dprintf("waited %d\n", time_ms() - b); if (!mActive) break; // fall out if thread to be stopped @@ -91,6 +91,7 @@ private: // update thread bool mActive; cCondVar mDoUpdate; + cCondVar mStarted; cMutex mMutex; int mUpdateIn; @@ -6,6 +6,7 @@ cText2SkinScreen::cText2SkinScreen(int x, int y) { mOsd = cOsdProvider::NewOsd(x, y); + Dprintf("got osd -> %p\n", mOsd); } cText2SkinScreen::~cText2SkinScreen() { diff --git a/text2skin.c b/text2skin.c index 6ef67e3..f014c9e 100644 --- a/text2skin.c +++ b/text2skin.c @@ -11,7 +11,7 @@ #include "i18n.h" #include "loader.h" -const char *cText2SkinPlugin::VERSION = "0.0.8"; +const char *cText2SkinPlugin::VERSION = "0.0.8.1"; const char *cText2SkinPlugin::THEMEVERSION = "0.0.3"; const char *cText2SkinPlugin::DESCRIPTION = "Loader for text-based skins"; |