mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
The Channel+/- keys can now be used to jump between errors while replaying a recording
This commit is contained in:
parent
5a626fef9f
commit
b4c538cff7
@ -3368,6 +3368,7 @@ Stefan Hofmann <stefan.hofmann@t-online.de>
|
||||
for suggesting to implement support for remote controls that only have a combined
|
||||
"Play/Pause" key instead of separate keys for "Play" and "Pause"
|
||||
for a fix for compilers that don't like non-constant format strings
|
||||
for suggesting to implement jumping between errors while replaying a recording
|
||||
|
||||
Stefan Blochberger <Stefan.Blochberger@gmx.de>
|
||||
for suggesting to automatically display the progress display whenever replay of a
|
||||
|
2
HISTORY
2
HISTORY
@ -10030,3 +10030,5 @@ Video Disk Recorder Revision History
|
||||
(reported by Markus Ehrnsperger, fix suggested by Winfried Köhler).
|
||||
- Fixed expiring of one-time VPS timers in case there is more than one event with the
|
||||
same VPS time (suggested by Markus Ehrnsperger).
|
||||
- The Channel+/- keys can now be used to jump between errors while replaying a recording
|
||||
(suggested by Stefan Hofmann).
|
||||
|
4
MANUAL
4
MANUAL
@ -50,8 +50,8 @@ Version 2.7
|
||||
Next Next/previous channel group (in live tv mode)
|
||||
Prev or next/previous editing mark (in replay mode)
|
||||
|
||||
Channel+ channel up
|
||||
Channel- channel down
|
||||
Channel+ channel up (live view), next error (replay)
|
||||
Channel- channel down (live view), previous error (replay)
|
||||
PrevChannel previous channel
|
||||
|
||||
Power shutdown
|
||||
|
47
menu.c
47
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 5.17 2024/09/19 09:49:02 kls Exp $
|
||||
* $Id: menu.c 5.18 2024/10/11 14:10:50 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -6097,6 +6097,47 @@ void cReplayControl::MarkMove(int Frames, bool MarkRequired)
|
||||
}
|
||||
}
|
||||
|
||||
void cReplayControl::ErrorJump(bool Forward)
|
||||
{
|
||||
const cErrors *Errors = GetErrors();
|
||||
int NumErrors = Errors ? Errors->Size() : 0;
|
||||
if (NumErrors > 0) {
|
||||
int Current, Total;
|
||||
if (GetIndex(Current, Total)) {
|
||||
if (Forward) {
|
||||
int Offset = 0;
|
||||
for (int i = 0; i < NumErrors; i++) {
|
||||
int Position = Errors->At(i);
|
||||
if (Position > Current + Offset) {
|
||||
int NextIFrame = SkipFrames(Position - Current) + Offset; // this takes us to the I-frame at or right after Position
|
||||
if (NextIFrame > Position) {
|
||||
if (SkipFrames(Offset + 1) == NextIFrame) { // means Current is the I-frame right before Position
|
||||
Offset = NextIFrame - Current;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Goto(Position, true); // this takes us to the I-frame at or right before Position
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Current < Total)
|
||||
Goto(Total, true);
|
||||
}
|
||||
else {
|
||||
for (int i = NumErrors - 1; i >= 0; i--) {
|
||||
if (Errors->At(i) < Current) {
|
||||
int Position = Errors->At(i);
|
||||
Goto(Position, true); // this takes us to the I-frame at or right before Position
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Current > 0)
|
||||
Goto(0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cReplayControl::EditCut(void)
|
||||
{
|
||||
if (*fileName) {
|
||||
@ -6241,6 +6282,10 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
||||
case kMarkSkipBack: MarkMove(-adaptiveSkipper.GetValue(RAWKEY(Key)), false); break;
|
||||
case kMarkSkipForward|k_Repeat:
|
||||
case kMarkSkipForward: MarkMove(+adaptiveSkipper.GetValue(RAWKEY(Key)), false); break;
|
||||
case kChanUp|k_Repeat:
|
||||
case kChanUp: ErrorJump(true); break;
|
||||
case kChanDn|k_Repeat:
|
||||
case kChanDn: ErrorJump(false); break;
|
||||
case kEditCut: EditCut(); break;
|
||||
case kEditTest: EditTest(); break;
|
||||
default: {
|
||||
|
3
menu.h
3
menu.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.h 5.4 2024/09/19 09:49:02 kls Exp $
|
||||
* $Id: menu.h 5.5 2024/10/11 14:10:50 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __MENU_H
|
||||
@ -316,6 +316,7 @@ private:
|
||||
void MarkToggle(void);
|
||||
void MarkJump(bool Forward);
|
||||
void MarkMove(int Frames, bool MarkRequired);
|
||||
void ErrorJump(bool Forward);
|
||||
void EditCut(void);
|
||||
void EditTest(void);
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user