summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-02-06 10:25:25 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-02-06 10:25:25 +0100
commit1b2a62623c2e3c8f0d37b8d586ce185d68d190e1 (patch)
tree0f1d1622e527159d6d50e4353708cf46af030980 /menu.c
parentad45f801d5af3aeb3f22c34e656b3562be96c432 (diff)
downloadvdr-1b2a62623c2e3c8f0d37b8d586ce185d68d190e1.tar.gz
vdr-1b2a62623c2e3c8f0d37b8d586ce185d68d190e1.tar.bz2
Changed the naming of "binary skip mode" to "adaptive skip mode"
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/menu.c b/menu.c
index b0a511a3..6cda42d0 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 3.41 2015/02/04 12:18:27 kls Exp $
+ * $Id: menu.c 3.42 2015/02/06 09:53:25 kls Exp $
*/
#include "menu.h"
@@ -3721,9 +3721,9 @@ cMenuSetupReplay::cMenuSetupReplay(void)
Add(new cMenuEditBoolItem(tr("Setup.Replay$Pause replay when jumping to a mark"), &data.PauseOnMarkJump));
Add(new cMenuEditBoolItem(tr("Setup.Replay$Skip edited parts"), &data.SkipEdited));
Add(new cMenuEditBoolItem(tr("Setup.Replay$Pause replay at last mark"), &data.PauseAtLastMark));
- Add(new cMenuEditIntItem( tr("Setup.Replay$Binary skip initial value (s)"), &data.BinarySkipInitial, 10, 600));
- Add(new cMenuEditIntItem( tr("Setup.Replay$Binary skip timeout (s)"), &data.BinarySkipTimeout, 0, 10));
- Add(new cMenuEditBoolItem(tr("Setup.Replay$Binary skip strict"), &data.BinarySkipStrict));
+ Add(new cMenuEditIntItem( tr("Setup.Replay$Initial duration for adaptive skipping (s)"), &data.AdaptiveSkipInitial, 10, 600));
+ Add(new cMenuEditIntItem( tr("Setup.Replay$Reset timeout for adaptive skipping (s)"), &data.AdaptiveSkipTimeout, 0, 10));
+ Add(new cMenuEditBoolItem(tr("Setup.Replay$Alternate behavior for adaptive skipping"), &data.AdaptiveSkipAlternate));
Add(new cMenuEditIntItem(tr("Setup.Replay$Resume ID"), &data.ResumeID, 0, 99));
}
@@ -5063,9 +5063,9 @@ bool cRecordControls::StateChanged(int &State)
return Result;
}
-// --- cBinarySkipper --------------------------------------------------------
+// --- cAdaptiveSkipper ------------------------------------------------------
-cBinarySkipper::cBinarySkipper(void)
+cAdaptiveSkipper::cAdaptiveSkipper(void)
{
initialValue = NULL;
currentValue = 0;
@@ -5073,14 +5073,14 @@ cBinarySkipper::cBinarySkipper(void)
lastKey = kNone;
}
-void cBinarySkipper::Initialize(int *InitialValue, double FramesPerSecond)
+void cAdaptiveSkipper::Initialize(int *InitialValue, double FramesPerSecond)
{
initialValue = InitialValue;
framesPerSecond = FramesPerSecond;
currentValue = 0;
}
-int cBinarySkipper::GetValue(eKeys Key)
+int cAdaptiveSkipper::GetValue(eKeys Key)
{
if (!initialValue)
return 0;
@@ -5090,12 +5090,12 @@ int cBinarySkipper::GetValue(eKeys Key)
}
else if (Key != lastKey) {
currentValue /= 2;
- if (Setup.BinarySkipStrict)
- lastKey = kNone; // once the direction has changed, every further call halves the value
- else
+ if (Setup.AdaptiveSkipAlternate)
lastKey = Key; // only halve the value when the direction is changed
+ else
+ lastKey = kNone; // once the direction has changed, every further call halves the value
}
- timeout.Set(Setup.BinarySkipTimeout * 1000);
+ timeout.Set(Setup.AdaptiveSkipTimeout * 1000);
return max(currentValue, 1);
}
@@ -5120,7 +5120,7 @@ cReplayControl::cReplayControl(bool PauseLive)
cRecording Recording(fileName);
cStatus::MsgReplaying(this, Recording.Name(), Recording.FileName(), true);
marks.Load(fileName, Recording.FramesPerSecond(), Recording.IsPesRecording());
- binarySkipper.Initialize(&Setup.BinarySkipInitial, Recording.FramesPerSecond());
+ adaptiveSkipper.Initialize(&Setup.AdaptiveSkipInitial, Recording.FramesPerSecond());
SetTrackDescriptions(false);
if (Setup.ProgressDisplayTime)
ShowTimed(Setup.ProgressDisplayTime);
@@ -5596,9 +5596,9 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
case kMarkMoveForward|k_Repeat:
case kMarkMoveForward: MarkMove(+1, true); break;
case kMarkSkipBack|k_Repeat:
- case kMarkSkipBack: MarkMove(-binarySkipper.GetValue(RAWKEY(Key)), false); break;
+ case kMarkSkipBack: MarkMove(-adaptiveSkipper.GetValue(RAWKEY(Key)), false); break;
case kMarkSkipForward|k_Repeat:
- case kMarkSkipForward: MarkMove(+binarySkipper.GetValue(RAWKEY(Key)), false); break;
+ case kMarkSkipForward: MarkMove(+adaptiveSkipper.GetValue(RAWKEY(Key)), false); break;
case kEditCut: EditCut(); break;
case kEditTest: EditTest(); break;
default: {