mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Removing deleted recordings faster than normal when cutting
This commit is contained in:
parent
b65687ebcf
commit
12d5d01faa
@ -763,3 +763,7 @@ Reinhard Nissl <rnissl@gmx.de>
|
||||
Richard Robson <richard_robson@beeb.net>
|
||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||
device used by the timer, and the timer needs a different transponder
|
||||
|
||||
Manfred Schmidt-Voigt <manfred.schmidt-voigt@mannitec.de>
|
||||
for reporting a problem with runnign out of disk space while cutting in case
|
||||
there are still deleted recordings to remove
|
||||
|
4
HISTORY
4
HISTORY
@ -2283,7 +2283,7 @@ Video Disk Recorder Revision History
|
||||
or Makefile.config as defaults (thanks to Steffen Barszus).
|
||||
- Added the usual menu timeout to the CAM menus.
|
||||
|
||||
2003-08-16: Version 1.2.3
|
||||
2003-08-17: Version 1.2.3
|
||||
|
||||
- Fixed the TS to PES repacker so that it works with MPEG1 streams (thanks to
|
||||
Andreas Kool).
|
||||
@ -2312,3 +2312,5 @@ Video Disk Recorder Revision History
|
||||
- Made the "Zap timeout" (the time until a channel counts as "previous" for
|
||||
switching with '0') a setup variable, available in "Setup/Miscellaneous"
|
||||
(suggested by Helmut Auer).
|
||||
- Removing deleted recordings faster than normal when cutting, to avoid running
|
||||
out of disk space (thanks to Manfred Schmidt-Voigt for reporting this one).
|
||||
|
4
cutter.c
4
cutter.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: cutter.c 1.4 2003/05/24 11:59:33 kls Exp $
|
||||
* $Id: cutter.c 1.5 2003/08/17 09:04:04 kls Exp $
|
||||
*/
|
||||
|
||||
#include "cutter.h"
|
||||
@ -86,7 +86,7 @@ void cCuttingThread::Action(void)
|
||||
|
||||
// Make sure there is enough disk space:
|
||||
|
||||
AssertFreeDiskSpace();
|
||||
AssertFreeDiskSpace(-1);
|
||||
|
||||
// Read one frame:
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.c 1.81 2003/08/15 15:23:10 kls Exp $
|
||||
* $Id: recording.c 1.82 2003/08/17 09:10:46 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -95,7 +95,8 @@ void AssertFreeDiskSpace(int Priority)
|
||||
// a file, or mark a file for removal ("delete" it), so that
|
||||
// it will get removed during the next call.
|
||||
static time_t LastFreeDiskCheck = 0;
|
||||
if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA) {
|
||||
int Factor = (Priority == -1) ? 10 : 1;
|
||||
if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA / Factor) {
|
||||
if (!VideoFileSpaceAvailable(MINDISKSPACE)) {
|
||||
// Make sure only one instance of VDR does this:
|
||||
cLockFile LockFile(VideoDirectory);
|
||||
@ -113,7 +114,7 @@ void AssertFreeDiskSpace(int Priority)
|
||||
r = Recordings.Next(r);
|
||||
}
|
||||
if (r0 && r0->Remove()) {
|
||||
LastFreeDiskCheck += REMOVELATENCY;
|
||||
LastFreeDiskCheck += REMOVELATENCY / Factor;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.h 1.25 2002/10/19 15:48:52 kls Exp $
|
||||
* $Id: recording.h 1.26 2003/08/17 09:03:46 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __RECORDING_H
|
||||
@ -17,6 +17,8 @@
|
||||
|
||||
void RemoveDeletedRecordings(void);
|
||||
void AssertFreeDiskSpace(int Priority = 0);
|
||||
///< The special Priority value -1 means that we shall get rid of any
|
||||
///< deleted recordings faster than normal (because we're cutting).
|
||||
|
||||
class cResumeFile {
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user