1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Changed the behaviour when hitting the end of a recording in fast forward mode

This commit is contained in:
Klaus Schmidinger 2006-04-09 13:57:39 +02:00
parent 765f8267a5
commit a452010760
5 changed files with 21 additions and 4 deletions

View File

@ -1076,6 +1076,7 @@ Reinhard Nissl <rnissl@gmx.de>
for fixing replaying recordings of radio channels with many audio tracks
for speeding up cRemux::ScanVideoPacket()
for implementing cDevice::ForceTransferMode()
for changing the behaviour when hitting the end of a recording in fast forward mode
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the

View File

@ -4492,3 +4492,6 @@ Video Disk Recorder Revision History
respectively.
- The initial channel and volume can now be defined in the "Setup/Miscellaneous"
menu (based on a patch from Thomas Keil).
- When hitting the end of a recording in fast forward mode, VDR no longer switches
back to normal speed if the recording is already finished (thanks to Reinhard
Nissl).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 1.43 2006/02/19 14:20:15 kls Exp $
* $Id: dvbplayer.c 1.44 2006/04/09 13:47:11 kls Exp $
*/
#include "dvbplayer.h"
@ -399,12 +399,19 @@ void cDvbPlayer::Action(void)
if (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
uchar FileNumber;
int FileOffset;
int Index = index->GetNextIFrame(readIndex, playDir == pdForward, &FileNumber, &FileOffset, &Length, true);
bool TimeShiftMode = index->IsStillRecording();
int Index = index->GetNextIFrame(readIndex, playDir == pdForward, &FileNumber, &FileOffset, &Length, TimeShiftMode);
if (Index >= 0) {
if (!NextFile(FileNumber, FileOffset))
continue;
}
else {
if (!TimeShiftMode && playDir == pdForward) {
// hit end of recording: signal end of file but don't change playMode
readIndex = -1;
eof = true;
continue;
}
// hit begin of recording: wait for device buffers to drain
// before changing play mode:
if (!DeviceFlush(100))

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.143 2006/03/26 09:11:00 kls Exp $
* $Id: recording.c 1.144 2006/04/09 13:49:51 kls Exp $
*/
#include "recording.h"
@ -1368,6 +1368,11 @@ int cIndexFile::Get(uchar FileNumber, int FileOffset)
return -1;
}
bool cIndexFile::IsStillRecording()
{
return f >= 0;
}
// --- cFileName -------------------------------------------------------------
#include <errno.h>

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.h 1.53 2006/02/25 12:24:46 kls Exp $
* $Id: recording.h 1.54 2006/04/09 13:47:11 kls Exp $
*/
#ifndef __RECORDING_H
@ -210,6 +210,7 @@ public:
int Last(void) { CatchUp(); return last; }
int GetResume(void) { return resumeFile.Read(); }
bool StoreResume(int Index) { return resumeFile.Save(Index); }
bool IsStillRecording(void);
};
class cFileName {