mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Displaying the frame counter in the replay progress display only when editing a mark
This commit is contained in:
parent
c14d8d1da1
commit
693033f390
2
HISTORY
2
HISTORY
@ -559,3 +559,5 @@ Video Disk Recorder Revision History
|
|||||||
memory, allow a larger OSD window and be faster. The group separators in the
|
memory, allow a larger OSD window and be faster. The group separators in the
|
||||||
"Channels" menu had to be given a different color.
|
"Channels" menu had to be given a different color.
|
||||||
- Moved the channel display to the bottom of the screen.
|
- Moved the channel display to the bottom of the screen.
|
||||||
|
- Displaying the frame counter in the replay progress display only when editing
|
||||||
|
a mark.
|
||||||
|
65
menu.c
65
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.78 2001/07/22 12:27:51 kls Exp $
|
* $Id: menu.c 1.79 2001/07/22 13:46:07 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -2199,7 +2199,6 @@ bool cReplayControl::ShowProgress(bool Initial)
|
|||||||
Interface->Clear();
|
Interface->Clear();
|
||||||
if (title)
|
if (title)
|
||||||
Interface->Write(0, 0, title);
|
Interface->Write(0, 0, title);
|
||||||
displayFrames = marks.Count() > 0;
|
|
||||||
}
|
}
|
||||||
Interface->Write(-7, 2, IndexToHMSF(Total));
|
Interface->Write(-7, 2, IndexToHMSF(Total));
|
||||||
Interface->Flush();
|
Interface->Flush();
|
||||||
@ -2230,18 +2229,18 @@ void cReplayControl::MarkToggle(void)
|
|||||||
marks.Add(Current);
|
marks.Add(Current);
|
||||||
marks.Save();
|
marks.Save();
|
||||||
}
|
}
|
||||||
displayFrames = marks.Count() > 0;
|
|
||||||
if (!displayFrames)
|
|
||||||
Interface->Fill(0, 2, Width() / 2, 1, clrBackground);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cReplayControl::MarkJump(bool Forward)
|
void cReplayControl::MarkJump(bool Forward)
|
||||||
{
|
{
|
||||||
int Current, Total;
|
if (marks.Count()) {
|
||||||
if (dvbApi->GetIndex(Current, Total)) {
|
int Current, Total;
|
||||||
cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
|
if (dvbApi->GetIndex(Current, Total)) {
|
||||||
if (m)
|
cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
|
||||||
dvbApi->Goto(m->position, true);
|
if (m)
|
||||||
|
dvbApi->Goto(m->position, true);
|
||||||
|
}
|
||||||
|
displayFrames = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2251,6 +2250,7 @@ void cReplayControl::MarkMove(bool Forward)
|
|||||||
if (dvbApi->GetIndex(Current, Total)) {
|
if (dvbApi->GetIndex(Current, Total)) {
|
||||||
cMark *m = marks.Get(Current);
|
cMark *m = marks.Get(Current);
|
||||||
if (m) {
|
if (m) {
|
||||||
|
displayFrames = true;
|
||||||
int p = dvbApi->SkipFrames(Forward ? 1 : -1);
|
int p = dvbApi->SkipFrames(Forward ? 1 : -1);
|
||||||
cMark *m2;
|
cMark *m2;
|
||||||
if (Forward) {
|
if (Forward) {
|
||||||
@ -2304,6 +2304,8 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
|||||||
return osEnd;
|
return osEnd;
|
||||||
if (visible)
|
if (visible)
|
||||||
shown = ShowProgress(!shown) || shown;
|
shown = ShowProgress(!shown) || shown;
|
||||||
|
bool DisplayedFrames = displayFrames;
|
||||||
|
displayFrames = false;
|
||||||
switch (Key) {
|
switch (Key) {
|
||||||
// Positioning:
|
// Positioning:
|
||||||
case kUp: dvbApi->Play(); break;
|
case kUp: dvbApi->Play(); break;
|
||||||
@ -2320,23 +2322,34 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
|||||||
case kBlue: Hide();
|
case kBlue: Hide();
|
||||||
dvbApi->StopReplay();
|
dvbApi->StopReplay();
|
||||||
return osEnd;
|
return osEnd;
|
||||||
// Editing:
|
default: {
|
||||||
//XXX should we do this only when the ProgressDisplay is on???
|
switch (Key) {
|
||||||
case kMarkToggle: MarkToggle(); break;
|
// Editing:
|
||||||
case kMarkJumpBack: MarkJump(false); break;
|
//XXX should we do this only when the ProgressDisplay is on???
|
||||||
case kMarkJumpForward: MarkJump(true); break;
|
case kMarkToggle: MarkToggle(); break;
|
||||||
case kMarkMoveBack|k_Repeat:
|
case kMarkJumpBack: MarkJump(false); break;
|
||||||
case kMarkMoveBack: MarkMove(false); break;
|
case kMarkJumpForward: MarkJump(true); break;
|
||||||
case kMarkMoveForward|k_Repeat:
|
case kMarkMoveBack|k_Repeat:
|
||||||
case kMarkMoveForward: MarkMove(true); break;
|
case kMarkMoveBack: MarkMove(false); break;
|
||||||
case kEditCut: EditCut(); break;
|
case kMarkMoveForward|k_Repeat:
|
||||||
case kEditTest: EditTest(); break;
|
case kMarkMoveForward: MarkMove(true); break;
|
||||||
// Menu control:
|
case kEditCut: EditCut(); break;
|
||||||
case kMenu: Hide(); return osMenu; // allow direct switching to menu
|
case kEditTest: EditTest(); break;
|
||||||
case kOk: visible ? Hide() : Show(); break;
|
default: {
|
||||||
case kBack: return osRecordings;
|
displayFrames = DisplayedFrames;
|
||||||
default: return osUnknown;
|
switch (Key) {
|
||||||
|
// Menu control:
|
||||||
|
case kMenu: Hide(); return osMenu; // allow direct switching to menu
|
||||||
|
case kOk: visible ? Hide() : Show(); break;
|
||||||
|
case kBack: return osRecordings;
|
||||||
|
default: return osUnknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (DisplayedFrames && !displayFrames)
|
||||||
|
Interface->Fill(0, 2, Width() / 2, 1, clrBackground);
|
||||||
return osContinue;
|
return osContinue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user