diff --git a/HISTORY b/HISTORY index 43671d1..da375a2 100644 --- a/HISTORY +++ b/HISTORY @@ -309,3 +309,4 @@ Version 0.4.3 Version 0.4.4 - feature: possibility to move viewelements when starting view +- expanded shifting features diff --git a/config.c b/config.c index 0797991..b870cec 100644 --- a/config.c +++ b/config.c @@ -20,6 +20,8 @@ cDesignerConfig::cDesignerConfig() { //menu display style, display menu items //one after each other or in one step blockFlush = 1; + //frames per second for fading and shifting + framesPerSecond = 40; //remember current skin and theme, osd size and osd fonts SetSkin(); SetOSDSize(); @@ -398,6 +400,7 @@ bool cDesignerConfig::SetupParse(const char *Name, const char *Value) { else if (!strcasecmp(Name, "RerunDistance")) rerunDistance = atoi(Value); else if (!strcasecmp(Name, "RerunMaxChannel")) rerunMaxChannel = atoi(Value); else if (!strcasecmp(Name, "BlockFlush")) blockFlush = atoi(Value); + else if (!strcasecmp(Name, "FramesPerSecond")) framesPerSecond = atoi(Value); else pluginSetupParam = false; if (!pluginSetupParam) { diff --git a/config.h b/config.h index d7f5a21..6b3a037 100644 --- a/config.h +++ b/config.h @@ -97,6 +97,7 @@ public: int rerunDistance; int rerunMaxChannel; int blockFlush; + int framesPerSecond; //TemplateReload on Setup Close bool setupCloseDoReload; }; diff --git a/displaychannel.c b/displaychannel.c index 05c12d3..4d67fab 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -214,4 +214,4 @@ void cSDDisplayChannel::Flush(void) { initial = false; channelChange = false; channelView->Flush(); -} \ No newline at end of file +} diff --git a/displaymenu.c b/displaymenu.c index b38ab7a..c533032 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -286,7 +286,6 @@ bool cSDDisplayMenu::SetPluginText(map *stringTokens, mapStart(); diff --git a/displayreplay.c b/displayreplay.c index 9a68761..baea3b8 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -5,6 +5,7 @@ cSDDisplayReplay::cSDDisplayReplay(cTemplate *replayTemplate, bool ModeOnly) { doOutput = true; initial = true; + initialModeSet = false; modeOnly = ModeOnly; replayView = NULL; if (!replayTemplate) { @@ -57,6 +58,7 @@ void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { replayView->ClearOnPause(); } replayView->DrawControlIcons(Play, Forward, Speed, modeOnly); + initialModeSet = true; } void cSDDisplayReplay::SetProgress(int Current, int Total) { @@ -100,7 +102,7 @@ void cSDDisplayReplay::Flush(void) { replayView->DrawTime(); } - if (initial) { + if (initial && initialModeSet) { replayView->DrawBackground(modeOnly); replayView->DrawCustomTokens(); replayView->DoFadeIn(); diff --git a/displayreplay.h b/displayreplay.h index 836febb..9d83850 100644 --- a/displayreplay.h +++ b/displayreplay.h @@ -11,6 +11,7 @@ class cSDDisplayReplay : public cSkinDisplayReplay { private: cDisplayReplayView *replayView; bool initial; + bool initialModeSet; bool doOutput; bool modeOnly; public: diff --git a/dtd/displayaudiotracks.dtd b/dtd/displayaudiotracks.dtd index 3d54644..0ebdf80 100644 --- a/dtd/displayaudiotracks.dtd +++ b/dtd/displayaudiotracks.dtd @@ -9,6 +9,11 @@ width CDATA #REQUIRED height CDATA #REQUIRED fadetime CDATA #IMPLIED + shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED + startx CDATA #IMPLIED + starty CDATA #IMPLIED scaletvx CDATA #IMPLIED scaletvy CDATA #IMPLIED scaletvwidth CDATA #IMPLIED diff --git a/dtd/displaychannel.dtd b/dtd/displaychannel.dtd index 94b736d..e0f718b 100644 --- a/dtd/displaychannel.dtd +++ b/dtd/displaychannel.dtd @@ -12,6 +12,11 @@ width CDATA #REQUIRED height CDATA #REQUIRED fadetime CDATA #IMPLIED + shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED + startx CDATA #IMPLIED + starty CDATA #IMPLIED scaletvx CDATA #IMPLIED scaletvy CDATA #IMPLIED scaletvwidth CDATA #IMPLIED @@ -97,6 +102,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -110,6 +117,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -122,6 +131,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -134,6 +145,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -146,6 +159,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -164,6 +179,7 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED diff --git a/dtd/displaymenu.dtd b/dtd/displaymenu.dtd index 8626689..3f1747a 100644 --- a/dtd/displaymenu.dtd +++ b/dtd/displaymenu.dtd @@ -24,18 +24,42 @@ @@ -64,6 +88,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -76,6 +102,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -88,6 +116,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -101,6 +131,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -113,6 +145,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -125,6 +159,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -137,6 +173,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -149,6 +187,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -161,6 +201,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED @@ -173,6 +215,8 @@ delay CDATA #IMPLIED fadetime CDATA #IMPLIED shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED startx CDATA #IMPLIED starty CDATA #IMPLIED debug CDATA #IMPLIED diff --git a/dtd/displaymessage.dtd b/dtd/displaymessage.dtd index b9849bd..1b85442 100644 --- a/dtd/displaymessage.dtd +++ b/dtd/displaymessage.dtd @@ -9,6 +9,11 @@ width CDATA #REQUIRED height CDATA #REQUIRED fadetime CDATA #IMPLIED + shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED + startx CDATA #IMPLIED + starty CDATA #IMPLIED scaletvx CDATA #IMPLIED scaletvy CDATA #IMPLIED scaletvwidth CDATA #IMPLIED diff --git a/dtd/displayplugin.dtd b/dtd/displayplugin.dtd index 8bc0c47..2e436d9 100644 --- a/dtd/displayplugin.dtd +++ b/dtd/displayplugin.dtd @@ -9,6 +9,11 @@ width CDATA #REQUIRED height CDATA #REQUIRED fadetime CDATA #IMPLIED + shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED + startx CDATA #IMPLIED + starty CDATA #IMPLIED scaletvx CDATA #IMPLIED scaletvy CDATA #IMPLIED scaletvwidth CDATA #IMPLIED diff --git a/dtd/displayreplay.dtd b/dtd/displayreplay.dtd index d5f7ff8..d5d47fc 100644 --- a/dtd/displayreplay.dtd +++ b/dtd/displayreplay.dtd @@ -13,6 +13,11 @@ width CDATA #REQUIRED height CDATA #REQUIRED fadetime CDATA #IMPLIED + shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED + startx CDATA #IMPLIED + starty CDATA #IMPLIED scaletvx CDATA #IMPLIED scaletvy CDATA #IMPLIED scaletvwidth CDATA #IMPLIED @@ -44,6 +49,14 @@ diff --git a/dtd/displayvolume.dtd b/dtd/displayvolume.dtd index 278346f..63613a0 100644 --- a/dtd/displayvolume.dtd +++ b/dtd/displayvolume.dtd @@ -9,6 +9,11 @@ width CDATA #REQUIRED height CDATA #REQUIRED fadetime CDATA #IMPLIED + shifttime CDATA #IMPLIED + shifttype CDATA #IMPLIED + shiftmode CDATA #IMPLIED + startx CDATA #IMPLIED + starty CDATA #IMPLIED scaletvx CDATA #IMPLIED scaletvy CDATA #IMPLIED scaletvwidth CDATA #IMPLIED diff --git a/libcore/pixmapcontainer.c b/libcore/pixmapcontainer.c index 2f498e0..cab356e 100644 --- a/libcore/pixmapcontainer.c +++ b/libcore/pixmapcontainer.c @@ -1,4 +1,5 @@ #define __STL_CONFIG_H +#include #include "pixmapcontainer.h" #include "../config.h" @@ -21,6 +22,8 @@ cPixmapContainer::cPixmapContainer(int numPixmaps) { checkRunning = false; fadeTime = 0; shiftTime = 0; + shiftType = stNone; + shiftMode = smLinear; deleteOsdOnExit = false; } @@ -349,8 +352,10 @@ void cPixmapContainer::FadeIn(void) { } return; } + int frames = fadeTime * config.framesPerSecond / 1000; + if (frames <= 0) frames = 1; + int frameTime = fadeTime / frames; uint64_t Start = cTimeMs::Now(); - int FadeFrameTime = fadeTime / 10; while (Running()) { uint64_t Now = cTimeMs::Now(); double t = min(double(Now - Start) / fadeTime, 1.0); @@ -367,18 +372,20 @@ void cPixmapContainer::FadeIn(void) { } DoFlush(); int Delta = cTimeMs::Now() - Now; - if (Running() && (Delta < FadeFrameTime)) - cCondWait::SleepMs(FadeFrameTime - Delta); + if (Running() && (Delta < frameTime)) + cCondWait::SleepMs(frameTime - Delta); if ((int)(Now - Start) > fadeTime) break; } } void cPixmapContainer::FadeOut(void) { - if (!fadeTime) + if (!fadeTime || IsAnimated()) return; + int frames = fadeTime * config.framesPerSecond / 1000; + if (frames <= 0) frames = 1; + int frameTime = fadeTime / frames; uint64_t Start = cTimeMs::Now(); - int FadeFrameTime = fadeTime / 10; while (true) { uint64_t Now = cTimeMs::Now(); double t = min(double(Now - Start) / fadeTime, 1.0); @@ -395,8 +402,8 @@ void cPixmapContainer::FadeOut(void) { } DoFlush(); int Delta = cTimeMs::Now() - Now; - if (Delta < FadeFrameTime) - cCondWait::SleepMs(FadeFrameTime - Delta); + if (Delta < frameTime) + cCondWait::SleepMs(frameTime - Delta); if ((int)(Now - Start) > fadeTime) break; } @@ -405,6 +412,137 @@ void cPixmapContainer::FadeOut(void) { void cPixmapContainer::ShiftIn(void) { if (shiftTime < 1) return; + + int frames = shiftTime * config.framesPerSecond / 1000; + if (frames <= 0) frames = 1; + int frameTime = shiftTime / frames; + + if (shiftType > stNone) { + ShiftInFromBorder(frames, frameTime); + } else { + ShiftInFromPoint(frames, frameTime); + } +} + +void cPixmapContainer::ShiftInFromBorder(int frames, int frameTime) { + //calculating union rectangle of all pixmaps viewports + cRect unionArea; + bool isNew = true; + for (int i = 0; i < numPixmaps; i++) { + if (!PixmapExists(i)) + continue; + if (isNew) { + unionArea = ViewPort(i); + isNew = false; + } else { + unionArea.Combine(ViewPort(i)); + } + } + //shifthing all pixmaps to dedicated start positions + cPoint startPositions[numPixmaps]; + int osdWidth = osd->Width(); + int osdHeight = osd->Height(); + int xStart = 0; + int yStart = 0; + for (int i = 0; i < numPixmaps; i++) { + if (!PixmapExists(i)) + continue; + cPoint pos; + Pos(i, pos); + switch (shiftType) { + case stLeft: + xStart = pos.X() - (unionArea.X() + unionArea.Width()); + pos.SetX(xStart); + break; + case stRight: + xStart = osdWidth + (pos.X() - unionArea.X()); + pos.SetX(xStart); + break; + case stTop: + yStart = pos.Y() - (unionArea.Y() + unionArea.Height()); + pos.SetY(yStart); + break; + case stBottom: + yStart = osdHeight + (pos.Y() - unionArea.Y()); + pos.SetY(yStart); + break; + default: + break; + } + startPositions[i] = pos; + cRect r = ViewPort(i); + r.SetPoint(pos.X(), pos.Y()); + SetViewPort(i, r); + SetAlpha(i, ALPHA_OPAQUE); + } + DoFlush(); + //Calculating total shifting distance + int shiftTotal = 0; + switch (shiftType) { + case stLeft: + shiftTotal = unionArea.X() + unionArea.Width(); + break; + case stRight: + shiftTotal = unionArea.Width() + (osdWidth - (unionArea.X() + unionArea.Width())); + break; + case stTop: + shiftTotal = unionArea.Y() + unionArea.Height(); + break; + case stBottom: + shiftTotal = unionArea.Height() + (osdHeight - (unionArea.Y() + unionArea.Height())); + break; + default: + break; + } + //Moving In + uint64_t Start = cTimeMs::Now(); + while (Running()) { + uint64_t Now = cTimeMs::Now(); + double t = min(double(Now - Start) / shiftTime, 1.0); + if (shiftMode == smSlowedDown) { + //using f(x) = -(x-1)^2 + 1 as mapping function + t = (-1)*pow(t - 1, 2) + 1; + } + int xNew = 0; + int yNew = 0; + for (int i = 0; i < numPixmaps; i++) { + if (!PixmapExists(i)) + continue; + cRect r = ViewPort(i); + switch (shiftType) { + case stLeft: + xNew = startPositions[i].X() + t * shiftTotal; + r.SetPoint(xNew, r.Y()); + break; + case stRight: + xNew = startPositions[i].X() - t * shiftTotal; + r.SetPoint(xNew, r.Y()); + break; + case stTop: + yNew = startPositions[i].Y() + t * shiftTotal; + r.SetPoint(r.X(), yNew); + break; + case stBottom: + yNew = startPositions[i].Y() - t * shiftTotal; + r.SetPoint(r.X(), yNew); + break; + default: + break; + } + SetViewPort(i, r); + } + DoFlush(); + int Delta = cTimeMs::Now() - Now; + if (Running() && (Delta < frameTime)) { + cCondWait::SleepMs(frameTime - Delta); + } + if ((int)(Now - Start) > shiftTime) + break; + } +} + +void cPixmapContainer::ShiftInFromPoint(int frames, int frameTime) { + //store original positions of pixmaps and move to StartPosition cPoint destPos[numPixmaps]; for (int i = 0; i < numPixmaps; i++) { if (!PixmapExists(i)) @@ -418,12 +556,9 @@ void cPixmapContainer::ShiftIn(void) { SetAlpha(i, ALPHA_OPAQUE); } DoFlush(); - - int frames = shiftTime / 20; - if (frames <= 0) frames = 1; + //Move In uint64_t Start = cTimeMs::Now(); - int frameTime = shiftTime / frames; - while (true) { + while (Running()) { uint64_t Now = cTimeMs::Now(); double t = min(double(Now - Start) / shiftTime, 1.0); for (int i = 0; i < numPixmaps; i++) { @@ -437,14 +572,14 @@ void cPixmapContainer::ShiftIn(void) { } DoFlush(); int Delta = cTimeMs::Now() - Now; - if (Delta < frameTime) + if (Running() && (Delta < frameTime)) cCondWait::SleepMs(frameTime - Delta); if ((int)(Now - Start) > shiftTime) break; } - } + /***************************************** * scrollSpeed: 1 slow * 2 medium diff --git a/libcore/pixmapcontainer.h b/libcore/pixmapcontainer.h index d17753c..e924126 100644 --- a/libcore/pixmapcontainer.h +++ b/libcore/pixmapcontainer.h @@ -24,8 +24,12 @@ private: bool checkRunning; int fadeTime; int shiftTime; + int shiftType; + int shiftMode; cPoint startPos; bool deleteOsdOnExit; + void ShiftInFromBorder(int frames, int frameTime); + void ShiftInFromPoint(int frames, int frameTime); protected: void SetInitFinished(void) { pixContainerInit = false; }; bool CreateOsd(int Left, int Top, int Width, int Height); @@ -61,6 +65,8 @@ protected: //HELPERS -- do not access the pixmaps array directly, use wrapper functions void SetFadeTime(int fade) { fadeTime = fade; }; void SetShiftTime(int shift) { shiftTime = shift; }; + void SetShiftType(int type) { shiftType = type; }; + void SetShiftMode(int mode) { shiftMode = mode; }; void SetStartPos(int posX, int posY) { startPos.SetX(posX); startPos.SetY(posY); }; bool IsAnimated(void) { return (shiftTime > 0); }; void FadeIn(void); diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 9855066..246db23 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -75,6 +75,10 @@ void cTemplateFunction::SetParameters(vector > params) { p.first = ptFadeTime; } else if (!name.compare("shifttime")) { p.first = ptShiftTime; + } else if (!name.compare("shifttype")) { + p.first = ptShiftType; + } else if (!name.compare("shiftmode")) { + p.first = ptShiftMode; } else if (!name.compare("startx")) { p.first = ptStartX; } else if (!name.compare("starty")) { @@ -304,6 +308,12 @@ bool cTemplateFunction::CalculateParameters(void) { case ptAnimType: paramValid = SetAnimType(value); break; + case ptShiftType: + paramValid = SetShiftType(value); + break; + case ptShiftMode: + paramValid = SetShiftMode(value); + break; default: paramValid = true; break; @@ -442,6 +452,8 @@ int cTemplateFunction::GetNumericParameter(eParamType type) { return 0; else if (type == ptFadeTime) return 0; + else if (type == ptShiftTime) + return 0; else if (type == ptMenuItemWidth) return 0; else if (type == ptHideRoot) @@ -454,6 +466,15 @@ int cTemplateFunction::GetNumericParameter(eParamType type) { return 0; else if (type == ptDirection) return diBottomUp; + else if (type == ptStartX) + return 0; + else if (type == ptStartY) + return 0; + else if (type == ptShiftType) + return stNone; + else if (type == ptShiftMode) + return smLinear; + //default default ;) return -1; } return hit->second; @@ -1164,6 +1185,28 @@ bool cTemplateFunction::SetAnimType(string value) { return true; } +bool cTemplateFunction::SetShiftType(string value) { + int shiftType = stNone; + if (!value.compare("left")) + shiftType = stLeft; + else if (!value.compare("right")) + shiftType = stRight; + else if (!value.compare("top")) + shiftType = stTop; + else if (!value.compare("bottom")) + shiftType = stBottom; + numericParameters.insert(pair(ptShiftType, shiftType)); + return true; +} + +bool cTemplateFunction::SetShiftMode(string value) { + int shiftMode = smLinear; + if (!value.compare("slowed")) + shiftMode = smSlowedDown; + numericParameters.insert(pair(ptShiftMode, shiftMode)); + return true; +} + void cTemplateFunction::SetDebugGrid(string value) { int numGridsX = 0; int numGridsY = 0; @@ -1605,6 +1648,12 @@ string cTemplateFunction::GetParamName(eParamType pt) { case ptShiftTime: name = "Shift Time"; break; + case ptShiftType: + name = "Shift Type"; + break; + case ptShiftMode: + name = "Shift Mode"; + break; case ptStartX: name = "Startpos X"; break; diff --git a/libtemplate/templatefunction.h b/libtemplate/templatefunction.h index 508615d..43cb106 100644 --- a/libtemplate/templatefunction.h +++ b/libtemplate/templatefunction.h @@ -52,6 +52,8 @@ enum eParamType { ptDetached, ptFadeTime, ptShiftTime, + ptShiftType, + ptShiftMode, ptStartX, ptStartY, ptDelay, @@ -103,6 +105,19 @@ enum eImageType { itImage }; +enum eShiftType { + stNone, + stLeft, + stRight, + stTop, + stBottom +}; + +enum eShiftMode { + smLinear, + smSlowedDown +}; + enum eAnimType { atNone, atBlink, @@ -180,6 +195,8 @@ protected: bool SetBackground(string value); bool SetDirection(string value); bool SetAnimType(string value); + bool SetShiftType(string value); + bool SetShiftMode(string value); void SetDebugGrid(string value); void ParseStringParameters(void); void ParseNumericalParameters(void); diff --git a/libtemplate/templateview.c b/libtemplate/templateview.c index 2e7782b..3fcdd86 100644 --- a/libtemplate/templateview.c +++ b/libtemplate/templateview.c @@ -668,6 +668,8 @@ void cTemplateView::SetFunctionDefinitions(void) { attributes.insert("delay"); attributes.insert("fadetime"); attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); attributes.insert("startx"); attributes.insert("starty"); attributes.insert("name"); @@ -875,6 +877,11 @@ cTemplateViewChannel::cTemplateViewChannel(void) { attributes.insert("width"); attributes.insert("height"); attributes.insert("fadetime"); + attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); + attributes.insert("startx"); + attributes.insert("starty"); attributes.insert("scaletvx"); attributes.insert("scaletvy"); attributes.insert("scaletvwidth"); @@ -1581,6 +1588,11 @@ cTemplateViewMessage::cTemplateViewMessage(void) { attributes.insert("width"); attributes.insert("height"); attributes.insert("fadetime"); + attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); + attributes.insert("startx"); + attributes.insert("starty"); attributes.insert("scaletvx"); attributes.insert("scaletvy"); attributes.insert("scaletvwidth"); @@ -1656,6 +1668,11 @@ cTemplateViewReplay::cTemplateViewReplay(void) { attributes.insert("width"); attributes.insert("height"); attributes.insert("fadetime"); + attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); + attributes.insert("startx"); + attributes.insert("starty"); attributes.insert("scaletvx"); attributes.insert("scaletvy"); attributes.insert("scaletvwidth"); @@ -1839,6 +1856,11 @@ cTemplateViewVolume::cTemplateViewVolume(void) { attributes.insert("width"); attributes.insert("height"); attributes.insert("fadetime"); + attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); + attributes.insert("startx"); + attributes.insert("starty"); attributes.insert("scaletvx"); attributes.insert("scaletvy"); attributes.insert("scaletvwidth"); @@ -1914,6 +1936,11 @@ cTemplateViewAudioTracks::cTemplateViewAudioTracks(void) { attributes.insert("width"); attributes.insert("height"); attributes.insert("fadetime"); + attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); + attributes.insert("startx"); + attributes.insert("starty"); attributes.insert("scaletvx"); attributes.insert("scaletvy"); attributes.insert("scaletvwidth"); @@ -2036,6 +2063,11 @@ cTemplateViewPlugin::cTemplateViewPlugin(string pluginName, int viewID) { attributes.insert("width"); attributes.insert("height"); attributes.insert("fadetime"); + attributes.insert("shifttime"); + attributes.insert("shifttype"); + attributes.insert("shiftmode"); + attributes.insert("startx"); + attributes.insert("starty"); attributes.insert("scaletvx"); attributes.insert("scaletvy"); attributes.insert("scaletvwidth"); diff --git a/po/de_DE.po b/po/de_DE.po index d3bc9d2..850370f 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skindesigner 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-19 17:09+0100\n" +"POT-Creation-Date: 2015-05-09 10:38+0200\n" "PO-Revision-Date: 2014-09-27 11:02+0200\n" "Last-Translator: Louis Braun \n" "Language-Team: \n" @@ -30,6 +30,9 @@ msgstr "" msgid "Menu Item display method" msgstr "Art der Ausgabe der Menüelemente" +msgid "Frames per Second (fading and shifting)" +msgstr "Frames pro Sekunde (fading und shifting)" + msgid "Reruns" msgstr "Wiederholungen" diff --git a/po/fi_FI.po b/po/fi_FI.po index 93872ef..8baebda 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skindesigner 0.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-25 01:25+0200\n" +"POT-Creation-Date: 2015-05-09 10:38+0200\n" "PO-Revision-Date: 2015-01-25 01:25+0200\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: Finnish\n" @@ -30,6 +30,9 @@ msgstr "Yleiset" msgid "Menu Item display method" msgstr "Valikkorivien esitystapa" +msgid "Frames per Second (fading and shifting)" +msgstr "" + msgid "Reruns" msgstr "Uusinnat" diff --git a/setup.c b/setup.c index 7fefc7b..07a7cce 100644 --- a/setup.c +++ b/setup.c @@ -9,6 +9,7 @@ cSkinDesignerSetup::cSkinDesignerSetup() { rerunDistance = config.rerunDistance; rerunMaxChannel = config.rerunMaxChannel; blockFlush = config.blockFlush; + framesPerSecond = config.framesPerSecond; menuDisplayStyle[0] = tr("after one another"); menuDisplayStyle[1] = tr("at one go"); Setup(); @@ -65,6 +66,7 @@ void cSkinDesignerSetup::Store(void) { config.rerunDistance = rerunDistance; config.rerunMaxChannel = rerunMaxChannel; config.blockFlush = blockFlush; + config.framesPerSecond = framesPerSecond; config.InitSetupIterator(); cSkinSetup *skinSetup = NULL; @@ -88,6 +90,7 @@ void cSkinDesignerSetup::Store(void) { SetupStore("RerunDistance", rerunDistance); SetupStore("RerunMaxChannel", rerunMaxChannel); SetupStore("BlockFlush", blockFlush); + SetupStore("FramesPerSecond", framesPerSecond); } cOsdItem *cSkinDesignerSetup::InfoItem(const char *label) { @@ -101,6 +104,7 @@ void cSkinDesignerSetup::PluginSetup(void) { Add(InfoItem(tr("Plugin Setup"))); Add(new cMenuEditStraItem(tr("Menu Item display method"), &blockFlush, 2, menuDisplayStyle)); + Add(new cMenuEditIntItem(tr("Frames per Second (fading and shifting)"), &framesPerSecond, 10, 100)); Add(InfoItem(tr("Reruns"))); Add(new cMenuEditIntItem(tr("Maximum number of reruns to display"), &rerunAmount, 1, 100)); diff --git a/setup.h b/setup.h index c06a5cf..22c66d5 100644 --- a/setup.h +++ b/setup.h @@ -15,6 +15,7 @@ private: int rerunDistance; int rerunMaxChannel; int blockFlush; + int framesPerSecond; const char *menuDisplayStyle[2]; void Setup(void); diff --git a/skins/blackhole/setup.xml b/skins/blackhole/setup.xml index e590344..0383788 100644 --- a/skins/blackhole/setup.xml +++ b/skins/blackhole/setup.xml @@ -7,6 +7,11 @@ 1 1 300 + 0 + 0 + 0 + 0 + 0 10 10 16 @@ -30,10 +35,30 @@ Näytä ikonit päävalikossa - Fade time in ms - Einblendzeit in ms + Fade time [ms] + Einblendzeit [ms] Häivytyksen kesto [ms] + + Shift time for Channel Display [ms] + Einfahrzeit für Channel Display [ms] + + + Shift time for Volume Display [ms] + Einfahrzeit für Volume Display [ms] + + + Shift time for Replay Display [ms] + Einfahrzeit für Replay Display [ms] + + + Shift time for Message Display [ms] + Einfahrzeit für Message Display [ms] + + + Shift time for Clock in Menu [ms] + Einfahrzeit für Uhr im Menü [ms] + Items in main menu Elemente im Hauptmenü diff --git a/skins/blackhole/xmlfiles/displaychannel.xml b/skins/blackhole/xmlfiles/displaychannel.xml index 9ee79e6..0b86fef 100644 --- a/skins/blackhole/xmlfiles/displaychannel.xml +++ b/skins/blackhole/xmlfiles/displaychannel.xml @@ -1,7 +1,7 @@ - + diff --git a/skins/blackhole/xmlfiles/displaymenu.xml b/skins/blackhole/xmlfiles/displaymenu.xml index 22e80a5..a96521e 100644 --- a/skins/blackhole/xmlfiles/displaymenu.xml +++ b/skins/blackhole/xmlfiles/displaymenu.xml @@ -25,12 +25,6 @@ - - - - - - - - - @@ -75,7 +66,16 @@ {hour} current hours {hmins} current "hourminutes" to display an hour hand --> -