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.
|
||||||
|
23
menu.c
23
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,19 +2229,19 @@ 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)
|
||||||
{
|
{
|
||||||
|
if (marks.Count()) {
|
||||||
int Current, Total;
|
int Current, Total;
|
||||||
if (dvbApi->GetIndex(Current, Total)) {
|
if (dvbApi->GetIndex(Current, Total)) {
|
||||||
cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
|
cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
|
||||||
if (m)
|
if (m)
|
||||||
dvbApi->Goto(m->position, true);
|
dvbApi->Goto(m->position, true);
|
||||||
}
|
}
|
||||||
|
displayFrames = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cReplayControl::MarkMove(bool Forward)
|
void cReplayControl::MarkMove(bool Forward)
|
||||||
@ -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,6 +2322,8 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
|||||||
case kBlue: Hide();
|
case kBlue: Hide();
|
||||||
dvbApi->StopReplay();
|
dvbApi->StopReplay();
|
||||||
return osEnd;
|
return osEnd;
|
||||||
|
default: {
|
||||||
|
switch (Key) {
|
||||||
// Editing:
|
// Editing:
|
||||||
//XXX should we do this only when the ProgressDisplay is on???
|
//XXX should we do this only when the ProgressDisplay is on???
|
||||||
case kMarkToggle: MarkToggle(); break;
|
case kMarkToggle: MarkToggle(); break;
|
||||||
@ -2331,12 +2335,21 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
|||||||
case kMarkMoveForward: MarkMove(true); break;
|
case kMarkMoveForward: MarkMove(true); break;
|
||||||
case kEditCut: EditCut(); break;
|
case kEditCut: EditCut(); break;
|
||||||
case kEditTest: EditTest(); break;
|
case kEditTest: EditTest(); break;
|
||||||
|
default: {
|
||||||
|
displayFrames = DisplayedFrames;
|
||||||
|
switch (Key) {
|
||||||
// Menu control:
|
// Menu control:
|
||||||
case kMenu: Hide(); return osMenu; // allow direct switching to menu
|
case kMenu: Hide(); return osMenu; // allow direct switching to menu
|
||||||
case kOk: visible ? Hide() : Show(); break;
|
case kOk: visible ? Hide() : Show(); break;
|
||||||
case kBack: return osRecordings;
|
case kBack: return osRecordings;
|
||||||
default: return osUnknown;
|
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