mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Modified function of 'Up' key in replay mode
This commit is contained in:
parent
f8b7403366
commit
d409fea3ab
4
HISTORY
4
HISTORY
@ -112,3 +112,7 @@ Video Disk Recorder Revision History
|
|||||||
- New command line option '-l' to set the log level.
|
- New command line option '-l' to set the log level.
|
||||||
- Times in timers.conf are now always printed with 4 digits (leading '0').
|
- Times in timers.conf are now always printed with 4 digits (leading '0').
|
||||||
- Slow forward/back mode (thanks to Guido Fiala!).
|
- Slow forward/back mode (thanks to Guido Fiala!).
|
||||||
|
- The "Up" key in replay mode no longer restarts replay at the very beginning,
|
||||||
|
but rather resumes normal replay mode after a "pause", "forward" or "backward"
|
||||||
|
operation. Use the "Skip -60s" function repeatedly to go back to the beginning
|
||||||
|
of the recording.
|
||||||
|
6
MANUAL
6
MANUAL
@ -10,7 +10,7 @@ Video Disk Recorder User's Manual
|
|||||||
|
|
||||||
Key Normal Main Channels Timer Edit/New Recordings Replay
|
Key Normal Main Channels Timer Edit/New Recordings Replay
|
||||||
|
|
||||||
Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Begin
|
Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Play
|
||||||
Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause
|
Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause
|
||||||
Left - - - Disable Decrement - Search back
|
Left - - - Disable Decrement - Search back
|
||||||
Right - - - Enable Increment - Search forward
|
Right - - - Enable Increment - Search forward
|
||||||
@ -93,8 +93,8 @@ Video Disk Recorder User's Manual
|
|||||||
|
|
||||||
The following keys have the listed meaning in Replay mode:
|
The following keys have the listed meaning in Replay mode:
|
||||||
|
|
||||||
- Up Positions to beginning of the recording and starts playback
|
- Up Resumes normal replay from any "pause", "forward" or "backward"
|
||||||
from there.
|
mode.
|
||||||
- Down Halts playback at the current position. Press again to continue
|
- Down Halts playback at the current position. Press again to continue
|
||||||
playback.
|
playback.
|
||||||
- Blue Stops playback and stores the current position, so that
|
- Blue Stops playback and stores the current position, so that
|
||||||
|
48
dvbapi.c
48
dvbapi.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: dvbapi.c 1.18 2000/07/30 14:34:07 kls Exp $
|
* $Id: dvbapi.c 1.19 2000/07/30 16:14:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbapi.h"
|
#include "dvbapi.h"
|
||||||
@ -1105,7 +1105,7 @@ cDvbApi::~cDvbApi()
|
|||||||
{
|
{
|
||||||
if (videoDev >= 0) {
|
if (videoDev >= 0) {
|
||||||
Close();
|
Close();
|
||||||
StopReplay();
|
Stop();
|
||||||
StopRecord();
|
StopRecord();
|
||||||
close(videoDev);
|
close(videoDev);
|
||||||
}
|
}
|
||||||
@ -1403,7 +1403,7 @@ bool cDvbApi::StartRecord(const char *FileName)
|
|||||||
}
|
}
|
||||||
if (videoDev >= 0) {
|
if (videoDev >= 0) {
|
||||||
|
|
||||||
StopReplay(); // TODO: remove this if the driver is able to do record and replay at the same time
|
Stop(); // TODO: remove this if the driver is able to do record and replay at the same time
|
||||||
|
|
||||||
// Check FileName:
|
// Check FileName:
|
||||||
|
|
||||||
@ -1525,7 +1525,7 @@ bool cDvbApi::StartReplay(const char *FileName, const char *Title)
|
|||||||
esyslog(LOG_ERR, "ERROR: StartReplay() called while recording - ignored!");
|
esyslog(LOG_ERR, "ERROR: StartReplay() called while recording - ignored!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
StopReplay();
|
Stop();
|
||||||
if (videoDev >= 0) {
|
if (videoDev >= 0) {
|
||||||
|
|
||||||
lastProgress = lastTotal = -1;
|
lastProgress = lastTotal = -1;
|
||||||
@ -1597,8 +1597,9 @@ bool cDvbApi::StartReplay(const char *FileName, const char *Title)
|
|||||||
if (FD_ISSET(fromMain, &setIn)) {
|
if (FD_ISSET(fromMain, &setIn)) {
|
||||||
switch (readchar(fromMain)) {
|
switch (readchar(fromMain)) {
|
||||||
case dvbStop: SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
case dvbStop: SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
||||||
Buffer->Stop(); break;
|
Buffer->Stop();
|
||||||
case dvbPauseReplay: SetReplayMode(Paused ? VID_PLAY_NORMAL : VID_PLAY_PAUSE);
|
break;
|
||||||
|
case dvbPause: SetReplayMode(Paused ? VID_PLAY_NORMAL : VID_PLAY_PAUSE);
|
||||||
Paused = !Paused;
|
Paused = !Paused;
|
||||||
if (FastForward || FastRewind) {
|
if (FastForward || FastRewind) {
|
||||||
SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
||||||
@ -1607,30 +1608,33 @@ bool cDvbApi::StartReplay(const char *FileName, const char *Title)
|
|||||||
FastForward = FastRewind = false;
|
FastForward = FastRewind = false;
|
||||||
Buffer->SetMode(rmPlay);
|
Buffer->SetMode(rmPlay);
|
||||||
break;
|
break;
|
||||||
case dvbFastForward: SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
case dvbPlay: if (FastForward || FastRewind || Paused) {
|
||||||
|
SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
||||||
|
SetReplayMode(VID_PLAY_NORMAL);
|
||||||
|
FastForward = FastRewind = Paused = false;
|
||||||
|
Buffer->SetMode(rmPlay);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case dvbForward: SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
||||||
Buffer->Clear();
|
Buffer->Clear();
|
||||||
FastForward = !FastForward;
|
FastForward = !FastForward;
|
||||||
FastRewind = false;
|
FastRewind = false;
|
||||||
if (Paused) {
|
if (Paused) {
|
||||||
Buffer->SetMode(rmPlay);
|
Buffer->SetMode(rmPlay);
|
||||||
Buffer->Read();
|
|
||||||
SetReplayMode(FastForward ? VID_PLAY_SLOW_MOTION : VID_PLAY_PAUSE);
|
SetReplayMode(FastForward ? VID_PLAY_SLOW_MOTION : VID_PLAY_PAUSE);
|
||||||
Buffer->Write();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SetReplayMode(VID_PLAY_NORMAL);
|
SetReplayMode(VID_PLAY_NORMAL);
|
||||||
Buffer->SetMode(FastForward ? rmFastForward : rmPlay);
|
Buffer->SetMode(FastForward ? rmFastForward : rmPlay);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case dvbFastRewind: SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
case dvbBackward: SetReplayMode(VID_PLAY_CLEAR_BUFFER);
|
||||||
Buffer->Clear();
|
Buffer->Clear();
|
||||||
FastRewind = !FastRewind;
|
FastRewind = !FastRewind;
|
||||||
FastForward = false;
|
FastForward = false;
|
||||||
if (Paused) {
|
if (Paused) {
|
||||||
Buffer->SetMode(FastRewind ? rmSlowRewind : rmPlay);
|
Buffer->SetMode(FastRewind ? rmSlowRewind : rmPlay);
|
||||||
Buffer->Read();
|
|
||||||
SetReplayMode(FastRewind ? VID_PLAY_NORMAL : VID_PLAY_PAUSE);
|
SetReplayMode(FastRewind ? VID_PLAY_NORMAL : VID_PLAY_PAUSE);
|
||||||
Buffer->Write();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SetReplayMode(VID_PLAY_NORMAL);
|
SetReplayMode(VID_PLAY_NORMAL);
|
||||||
@ -1680,7 +1684,7 @@ bool cDvbApi::StartReplay(const char *FileName, const char *Title)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbApi::StopReplay(void)
|
void cDvbApi::Stop(void)
|
||||||
{
|
{
|
||||||
if (pidReplay) {
|
if (pidReplay) {
|
||||||
writechar(toReplay, dvbStop);
|
writechar(toReplay, dvbStop);
|
||||||
@ -1693,22 +1697,28 @@ void cDvbApi::StopReplay(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbApi::PauseReplay(void)
|
void cDvbApi::Pause(void)
|
||||||
{
|
{
|
||||||
if (pidReplay)
|
if (pidReplay)
|
||||||
writechar(toReplay, dvbPauseReplay);
|
writechar(toReplay, dvbPause);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbApi::FastForward(void)
|
void cDvbApi::Play(void)
|
||||||
{
|
{
|
||||||
if (pidReplay)
|
if (pidReplay)
|
||||||
writechar(toReplay, dvbFastForward);
|
writechar(toReplay, dvbPlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbApi::FastRewind(void)
|
void cDvbApi::Forward(void)
|
||||||
{
|
{
|
||||||
if (pidReplay)
|
if (pidReplay)
|
||||||
writechar(toReplay, dvbFastRewind);
|
writechar(toReplay, dvbForward);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cDvbApi::Backward(void)
|
||||||
|
{
|
||||||
|
if (pidReplay)
|
||||||
|
writechar(toReplay, dvbBackward);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbApi::Skip(int Seconds)
|
void cDvbApi::Skip(int Seconds)
|
||||||
|
19
dvbapi.h
19
dvbapi.h
@ -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: dvbapi.h 1.11 2000/06/24 14:03:57 kls Exp $
|
* $Id: dvbapi.h 1.12 2000/07/30 15:01:01 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBAPI_H
|
#ifndef __DVBAPI_H
|
||||||
@ -104,9 +104,10 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
enum { dvbStop = 1, // let's not have 0 as a command
|
enum { dvbStop = 1, // let's not have 0 as a command
|
||||||
dvbPauseReplay,
|
dvbPause,
|
||||||
dvbFastForward,
|
dvbPlay,
|
||||||
dvbFastRewind,
|
dvbForward,
|
||||||
|
dvbBackward,
|
||||||
dvbSkip,
|
dvbSkip,
|
||||||
dvbGetIndex,
|
dvbGetIndex,
|
||||||
};
|
};
|
||||||
@ -136,13 +137,15 @@ public:
|
|||||||
// If there is already a replay session active, it will be stopped
|
// If there is already a replay session active, it will be stopped
|
||||||
// and the new file will be played back.
|
// and the new file will be played back.
|
||||||
// If provided Title will be used in the progress display.
|
// If provided Title will be used in the progress display.
|
||||||
void StopReplay(void);
|
void Stop(void);
|
||||||
// Stops the current replay session (if any).
|
// Stops the current replay session (if any).
|
||||||
void PauseReplay(void);
|
void Pause(void);
|
||||||
// Pauses the current replay session, or resumes a paused session.
|
// Pauses the current replay session, or resumes a paused session.
|
||||||
void FastForward(void);
|
void Play(void);
|
||||||
|
// Resumes normal replay mode.
|
||||||
|
void Forward(void);
|
||||||
// Runs the current replay session forward at a higher speed.
|
// Runs the current replay session forward at a higher speed.
|
||||||
void FastRewind(void);
|
void Backward(void);
|
||||||
// Runs the current replay session backwards at a higher speed.
|
// Runs the current replay session backwards at a higher speed.
|
||||||
void Skip(int Seconds);
|
void Skip(int Seconds);
|
||||||
// Skips the given number of seconds in the current replay session.
|
// Skips the given number of seconds in the current replay session.
|
||||||
|
14
menu.c
14
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.20 2000/07/24 16:25:53 kls Exp $
|
* $Id: menu.c 1.21 2000/07/30 15:04:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -1243,7 +1243,7 @@ cReplayControl::cReplayControl(void)
|
|||||||
cReplayControl::~cReplayControl()
|
cReplayControl::~cReplayControl()
|
||||||
{
|
{
|
||||||
Hide();
|
Hide();
|
||||||
dvbApi->StopReplay();
|
dvbApi->Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cReplayControl::SetRecording(const char *FileName, const char *Title)
|
void cReplayControl::SetRecording(const char *FileName, const char *Title)
|
||||||
@ -1278,13 +1278,13 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
|||||||
if (visible)
|
if (visible)
|
||||||
shown = dvbApi->ShowProgress(!shown) || shown;
|
shown = dvbApi->ShowProgress(!shown) || shown;
|
||||||
switch (Key) {
|
switch (Key) {
|
||||||
case kUp: dvbApi->Skip(-INT_MAX); break;
|
case kUp: dvbApi->Play(); break;
|
||||||
case kDown: dvbApi->PauseReplay(); break;
|
case kDown: dvbApi->Pause(); break;
|
||||||
case kBlue: Hide();
|
case kBlue: Hide();
|
||||||
dvbApi->StopReplay();
|
dvbApi->Stop();
|
||||||
return osEnd;
|
return osEnd;
|
||||||
case kLeft: dvbApi->FastRewind(); break;
|
case kLeft: dvbApi->Backward(); break;
|
||||||
case kRight: dvbApi->FastForward(); break;
|
case kRight: dvbApi->Forward(); break;
|
||||||
case kGreen: dvbApi->Skip(-60); break;
|
case kGreen: dvbApi->Skip(-60); break;
|
||||||
case kYellow: dvbApi->Skip(60); break;
|
case kYellow: dvbApi->Skip(60); break;
|
||||||
case kMenu: Hide(); return osMenu; // allow direct switching to menu
|
case kMenu: Hide(); return osMenu; // allow direct switching to menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user