summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2016-03-22 16:55:46 +0100
committerlouis <louis.braun@gmx.de>2016-03-22 16:55:46 +0100
commit65b5d74b7af6d2ee85b193a64f87ba057f02b1f0 (patch)
treed5ea3c32b59b157a94074783502015ad2fdd6bfe
parent842fc1a254ec13a5de2c2bd47fa20e4bd9746ab6 (diff)
downloadvdr-plugin-skindesigner-65b5d74b7af6d2ee85b193a64f87ba057f02b1f0.tar.gz
vdr-plugin-skindesigner-65b5d74b7af6d2ee85b193a64f87ba057f02b1f0.tar.bz2
fixed bug that onpause view potentially starts during setting cutting marks
-rw-r--r--coreengine/animation.c15
-rw-r--r--coreengine/animation.h2
-rw-r--r--coreengine/viewdisplayreplay.c8
-rw-r--r--coreengine/viewdisplayreplay.h1
-rw-r--r--coreengine/viewelementsdisplayreplay.c13
-rw-r--r--coreengine/viewelementsdisplayreplay.h4
-rw-r--r--displayreplay.c1
-rw-r--r--skins/metrixhd/xmlfiles/displayreplay.xml4
8 files changed, 44 insertions, 4 deletions
diff --git a/coreengine/animation.c b/coreengine/animation.c
index 863527c..735d309 100644
--- a/coreengine/animation.c
+++ b/coreengine/animation.c
@@ -11,6 +11,7 @@ cAnimation::cAnimation(cScrollable *scrollable) : cThread("scroller") {
this->shiftable = NULL;
this->blinkable = NULL;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = false;
blinkFunc = -1;
@@ -23,6 +24,7 @@ cAnimation::cAnimation(cDetachable *detachable, bool wait, bool animation) : cTh
this->shiftable = NULL;
this->blinkable = NULL;
waitOnWakeup = wait;
+ keepSleeping = false;
doAnimation = animation;
modeIn = false;
blinkFunc = -1;
@@ -35,6 +37,7 @@ cAnimation::cAnimation(cFadable *fadable, bool fadein) : cThread("fadable") {
this->shiftable = NULL;
this->blinkable = NULL;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = fadein;
blinkFunc = -1;
@@ -47,6 +50,7 @@ cAnimation::cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool s
this->shiftable = shiftable;
this->blinkable = NULL;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = shiftin;
shiftstart = start;
@@ -61,6 +65,7 @@ cAnimation::cAnimation(cBlinkable *blinkable, int func) : cThread("blinking") {
this->shiftable = NULL;
this->blinkable = blinkable;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = false;
blinkFunc = func;
@@ -75,6 +80,11 @@ void cAnimation::WakeUp(void) {
sleepWait.Signal();
}
+void cAnimation::ResetSleep(void) {
+ keepSleeping = true;
+ sleepWait.Signal();
+}
+
void cAnimation::Stop(bool deletePixmaps) {
sleepWait.Signal();
Cancel(2);
@@ -100,7 +110,10 @@ void cAnimation::Sleep(int duration) {
//sleep should wake up itself, so no infinit wait allowed
if (duration <= 0)
return;
- sleepWait.Wait(duration);
+ do {
+ keepSleeping = false;
+ sleepWait.Wait(duration);
+ } while (keepSleeping);
}
void cAnimation::Wait(void) {
diff --git a/coreengine/animation.h b/coreengine/animation.h
index c4ed792..6a4b733 100644
--- a/coreengine/animation.h
+++ b/coreengine/animation.h
@@ -98,6 +98,7 @@ private:
cShiftable *shiftable;
cBlinkable *blinkable;
bool waitOnWakeup;
+ bool keepSleeping;
bool doAnimation;
bool modeIn;
int blinkFunc;
@@ -118,6 +119,7 @@ public:
cAnimation(cBlinkable *blinkable, int func);
~cAnimation(void);
void WakeUp(void);
+ void ResetSleep(void);
void Fade(void);
void Shift(void);
void Stop(bool deletePixmaps);
diff --git a/coreengine/viewdisplayreplay.c b/coreengine/viewdisplayreplay.c
index fa27014..247e3ff 100644
--- a/coreengine/viewdisplayreplay.c
+++ b/coreengine/viewdisplayreplay.c
@@ -268,6 +268,12 @@ void cViewReplay::ClearOnPause(void) {
onPause->Close();
}
+void cViewReplay::DelayOnPause(void) {
+ if (!veOnPause->Started())
+ return;
+ veOnPause->ResetSleep();
+}
+
void cViewReplay::Flush(void) {
if (init) {
sdOsd.LockFlush();
@@ -284,7 +290,7 @@ void cViewReplay::Flush(void) {
}
time_t now = time(0);
- if (now != lastFlush) {
+ if (!modeOnly && (now != lastFlush)) {
Render((int)eVeDisplayReplay::datetime);
Render((int)eVeDisplayReplay::time);
Render((int)eVeDisplayChannel::customtokens);
diff --git a/coreengine/viewdisplayreplay.h b/coreengine/viewdisplayreplay.h
index 20f4f92..5b739ad 100644
--- a/coreengine/viewdisplayreplay.h
+++ b/coreengine/viewdisplayreplay.h
@@ -52,6 +52,7 @@ public:
void SetMessage(eMessageType type, const char *text);
void StartOnPause(const char *recfilename);
void ClearOnPause(void);
+ void DelayOnPause(void);
void Flush(void);
};
diff --git a/coreengine/viewelementsdisplayreplay.c b/coreengine/viewelementsdisplayreplay.c
index cbdba6b..0a30dfb 100644
--- a/coreengine/viewelementsdisplayreplay.c
+++ b/coreengine/viewelementsdisplayreplay.c
@@ -601,6 +601,7 @@ bool cVeDrJump::Parse(bool force) {
* cVeDrOnPause
******************************************************************/
cVeDrOnPause::cVeDrOnPause(void) {
+ started = false;
actorsIndex = -1;
recfilename = NULL;
}
@@ -609,6 +610,11 @@ cVeDrOnPause::~cVeDrOnPause(void) {
free(recfilename);
}
+void cVeDrOnPause::Close(void) {
+ started = false;
+ cViewElement::Close();
+}
+
void cVeDrOnPause::SetTokenContainer(void) {
tokenContainer = new skindesignerapi::cTokenContainer();
tokenContainer->DefineStringToken("{name}", (int)eDROnpauseST::name);
@@ -716,6 +722,7 @@ void cVeDrOnPause::Set(const char *recfilename) {
return;
free(this->recfilename);
this->recfilename = strdup(recfilename);
+ started = true;
}
bool cVeDrOnPause::Parse(bool force) {
@@ -774,6 +781,12 @@ bool cVeDrOnPause::Parse(bool force) {
return true;
}
+void cVeDrOnPause::ResetSleep(void) {
+ if (!detacher)
+ return;
+ detacher->ResetSleep();
+}
+
/******************************************************************
* cVeDrScraperContent
******************************************************************/
diff --git a/coreengine/viewelementsdisplayreplay.h b/coreengine/viewelementsdisplayreplay.h
index 1543fe6..7e5d156 100644
--- a/coreengine/viewelementsdisplayreplay.h
+++ b/coreengine/viewelementsdisplayreplay.h
@@ -178,15 +178,19 @@ public:
******************************************************************/
class cVeDrOnPause : public cViewElement, public cScrapManager {
private:
+ bool started;
int actorsIndex;
char *recfilename;
public:
cVeDrOnPause(void);
virtual ~cVeDrOnPause(void);
+ void Close(void);
int Delay(void) { return attribs->Delay() * 1000; };
void SetTokenContainer(void);
void Set(const char *recfilename);
bool Parse(bool forced = false);
+ bool Started(void) { return started; };
+ void ResetSleep(void);
};
/******************************************************************
diff --git a/displayreplay.c b/displayreplay.c
index 2150fe4..8ba887b 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -51,6 +51,7 @@ void cSDDisplayReplay::SetProgress(int Current, int Total) {
view->SetProgressbar(Current, Total);
view->SetMarks(marks, Current, Total);
view->SetEndTime(Current, Total);
+ view->DelayOnPause();
}
}
diff --git a/skins/metrixhd/xmlfiles/displayreplay.xml b/skins/metrixhd/xmlfiles/displayreplay.xml
index 4842c39..4328b5f 100644
--- a/skins/metrixhd/xmlfiles/displayreplay.xml
+++ b/skins/metrixhd/xmlfiles/displayreplay.xml
@@ -189,10 +189,10 @@
</onpause>
<onpausemodeonly delay="20" fadetime="{fadetime}">
- <area x="0" y="0" width="100%" height="100%" layer="7">
+ <area x="0" y="0" width="100%" height="100%" layer="6">
<fill color="{clrSemiTransBlack}" />
</area>
- <area x="0" y="0" width="100%" height="100%" layer="6">
+ <area x="0" y="0" width="100%" height="100%" layer="7">
<drawtext align="center" valign="center" font="{semibold}" fontsize="25%" color="{clrWhite}" text="{tr(pause)}" />
<drawimage condition="{isseries}" imagetype="image" path="{seriesbanner1path}" align="center" y="10" width="{areawidth}*0.5" height="{areawidth} * 0.5 * {seriesbanner1height} / {seriesbanner1width}"/>
<drawimage condition="{ismovie}" imagetype="image" path="{posterpath}" x="10" y="10" width="{areaheight} * 0.4 * {posterwidth} / {posterheight}" height="{areaheight} * 0.4"/>