diff options
author | Martin Prochnow <nordlicht@martins-kabuff.de> | 2006-04-11 19:12:01 +0200 |
---|---|---|
committer | Andreas Mair <andreas@vdr-developer.org> | 2006-04-11 19:12:01 +0200 |
commit | 82bfd4c15949019ede37b2b04be79659c5c65dbe (patch) | |
tree | 5deb5bf0d98cbee6c5ee17bb9323d0748ed567a7 /myreplaycontrol.c | |
parent | c849f2898257df19fddb97ac99c392c410f120d1 (diff) | |
download | vdr-plugin-extrecmenu-82bfd4c15949019ede37b2b04be79659c5c65dbe.tar.gz vdr-plugin-extrecmenu-82bfd4c15949019ede37b2b04be79659c5c65dbe.tar.bz2 |
Version 0.9v0.9
- removed myDvbPlayer, use VDR's cDvbPlayer instead
- made adjustments to work with BigPatch-VDRs (JumpPlay-patch)
- added option for sort recordings
- moved editing of priority and lifetime to its own submenu
- removed option to select alternative dvd marker, the icon is now default
- added default values for setup options
- moved content of patches/ and tools/ to contrib/ and added a small README
- new version of 'dvdarchive.sh'; thanks to vejoun from vdr-portal.de
- fixed problem with archive dvd recordings at the base dir; thanks to Mase from vdr-portal.de for reporting
Diffstat (limited to 'myreplaycontrol.c')
-rw-r--r-- | myreplaycontrol.c | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/myreplaycontrol.c b/myreplaycontrol.c index fe5f2b6..fb7f50f 100644 --- a/myreplaycontrol.c +++ b/myreplaycontrol.c @@ -1,7 +1,8 @@ /* * See the README file for copyright information and how to reach the author. * - * This code is directly taken from VDR with some changes by me to work with this plugin + * This code is directly taken from VDR with some changes by me to work with this plugin. + * Also to JumpPlay-Patch is integrated using #ifdef's. */ #include <vdr/interface.h> @@ -13,7 +14,12 @@ char *myReplayControl::fileName = NULL; char *myReplayControl::title = NULL; myReplayControl::myReplayControl(void) -:myDvbPlayerControl(fileName) +#ifdef BIGPATCHVERSION +:cDvbPlayerControl(fileName,&marks) +#endif +#ifndef BIGPATCHVERSION +:cDvbPlayerControl(fileName) +#endif { displayReplay = NULL; visible = modeOnly = shown = displayFrames = false; @@ -23,6 +29,9 @@ myReplayControl::myReplayControl(void) timeoutShow = 0; timeSearchActive = false; marks.Load(fileName); +#ifdef BIGPACKVERSION + lastLoadMarks = time(NULL); +#endif cRecording Recording(fileName); cStatus::MsgReplaying(this, Recording.Name(), Recording.FileName(), true); } @@ -244,8 +253,16 @@ void myReplayControl::MarkToggle(void) ShowTimed(2); bool Play, Forward; int Speed; +#ifndef BIGPACKVERSION if (GetReplayMode(Play, Forward, Speed) && !Play) Goto(Current, true); +#endif +#ifdef BIGBACKVERSION + if (GetReplayMode(Play, Forward, Speed) && !Play) { + Goto(Current, true); + displayFrames = true; + } +#endif } marks.Save(); @@ -259,8 +276,23 @@ void myReplayControl::MarkJump(bool Forward) if (GetIndex(Current, Total)) { cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current); if (m) { +#ifndef BIGPACKVERSION Goto(m->position, true); displayFrames = true; +#endif +#ifdef BIGPACKVERSION + bool Play2, Forward2; + int Speed; + if (Setup.JumpPlay && GetReplayMode(Play2, Forward2, Speed) && + Play2 && Forward && m->position < Total - SecondsToFrames(3)) { + Goto(m->position); + Play(); + } + else { + Goto(m->position, true); + displayFrames = true; + } +#endif } } } @@ -315,7 +347,12 @@ void myReplayControl::EditTest(void) if (!m) m = marks.GetNext(Current); if (m) { +#ifndef BIGPACKVERSION if ((m->Index() & 0x01) != 0) +#endif +#ifdef BIGPACKVERSION + if ((m->Index() & 0x01) != 0 && !Setup.PlayJump) +#endif m = marks.Next(m); if (m) { Goto(m->position - SecondsToFrames(3)); @@ -337,6 +374,13 @@ eOSState myReplayControl::ProcessKey(eKeys Key) { if (!Active()) return osEnd; +#ifdef BIGPACKVERSION + if (Setup.LoadMarksInterval && + time(NULL) >= lastLoadMarks + Setup.LoadMarksInterval) { + marks.Load(fileName, true); + lastLoadMarks = time(NULL); + } +#endif if (visible) { if (timeoutShow && time(NULL) > timeoutShow) { Hide(); |