summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-03-17 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-03-17 18:00:00 +0100
commit217fcb26808f74c9de81b4c653757f75ba13852f (patch)
treeaf479bc0ed80611549280dcdc8ed324ace38b32e /recording.c
parenta001a4bf97715d62b387d1da9fd1e48382508428 (diff)
downloadvdr-patch-lnbsharing-217fcb26808f74c9de81b4c653757f75ba13852f.tar.gz
vdr-patch-lnbsharing-217fcb26808f74c9de81b4c653757f75ba13852f.tar.bz2
Version 1.0.0pre4vdr-1.0.0pre4
- Added 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf' (thanks to Bernd Schweikert). - Fixed avoiding the primary DVB interface in case Setup.PrimaryLimit is 0. - Fixed handling CICAM settings if the first one of a DVB card was FTA. - Fixed reacting on changes in CICAM settings (needed to restart VDR before). - The "Blue" button in the "Main" menu now works as "Stop" button if a recording is currently being replayed. - New command line option '-m' to mute audio of the primary DVB device at startup (suggested by Mirko Günther). - The new SVDRP command VOLU can be used to control the audio volume (suggested by Mirko Günther). - Fixed resetting 'mute' state when setting the volume to a non-zero value. - Added log messages when deleting recordings in case the disk runs full while recording. - Fixed closing a pipe (used for replaying Dolby Digital audio), which sometimes left 'zombie' processes behind (thanks to Werner Fink for helping to debug this one). - Now starting the Dolby Digital output thread only if the recording actually contains Dolby Digital audio data (thanks to Werner Fink). - Implemented OSD for Volume and Mute (works only if there is no other OSD activity, but this should be no problem for normal use). - Changed the MANUAL description of the "Conditional Access" setup parameters to reflect the actual "CICAM DVBn m" notation in the "Setup" menu. - The new Setup parameter "Use time from transponder" can be used to define which transponder shall be used to set the system time (see MANUAL for details). If you have been using the SetSystemTime option previously, you now MUST select a channel that you trust to have a reliable time base. - Grouped the Setup parameters into several sub-menus, so that each group of parameters fits on a single screen - unless the height of the OSD has been set to a small value (based on code from Markus Lang). - Changed the title of the "Main" menu to "VDR". - Fixed displaying a system message while the replay mode is being shown. - Physically removing a deleted recording if one with the same name shall be deleted again. - The "Left" and "Right" keys are now used to page up and down in text displays (like the EPG descriptions or the results of commands executed from the "Commands" menu). - Fixed high CPU usage in transfer mode. - Replaced 'killproc' with 'killall' in 'runvdr', since apparently 'killproc' is not available by default on some Linux distributions, whereas 'killall' is. Please check if your system provides 'killall' - if it doesn't, please change this back in 'runvdr' and report this (thanks to Achim Lange). - The "Commands" menu now automatically assigns number keys as hotkeys to the commands. If you have preceeded your commands with digits you may want to remove these from your 'commands.conf' file. - The new Setup item "Restart" can be used to force a complete restart of VDR, including reloading the driver. Note that this can only work if VDR and the driver are wrapped into a mechanism that actually performs this action if VDR exits. The 'runvdr' script can be used for this purpose. - Refined texts of the "Setup" menu.
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/recording.c b/recording.c
index 4d07434..56ea056 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.54 2002/02/24 11:21:42 kls Exp $
+ * $Id: recording.c 1.57 2002/03/16 12:17:44 kls Exp $
*/
#include "recording.h"
@@ -86,6 +86,7 @@ void AssertFreeDiskSpace(int Priority)
if (!LockFile.Lock())
return;
// Remove the oldest file that has been "deleted":
+ isyslog(LOG_INFO, "low disk space while recording, trying to remove a deleted recording...");
cRecordings Recordings;
if (Recordings.Load(true)) {
cRecording *r = Recordings.First();
@@ -101,12 +102,13 @@ void AssertFreeDiskSpace(int Priority)
}
}
// No "deleted" files to remove, so let's see if we can delete a recording:
+ isyslog(LOG_INFO, "...no deleted recording found, trying to delete an old recording...");
if (Recordings.Load(false)) {
cRecording *r = Recordings.First();
cRecording *r0 = NULL;
while (r) {
if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever
- if ((r->lifetime == 0 && Priority > r->priority) || // the recording has guaranteed lifetime and the new recording has higher priority
+ if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority
(time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
if (r0) {
if (r->priority < r0->priority || (r->priority == r0->priority && r->start < r0->start))
@@ -122,6 +124,7 @@ void AssertFreeDiskSpace(int Priority)
return;
}
// Unable to free disk space, but there's nothing we can do about that...
+ isyslog(LOG_INFO, "...no old recording found, giving up");
Interface->Confirm(tr("Low disk space!"), 30);
}
LastFreeDiskCheck = time(NULL);
@@ -551,6 +554,11 @@ bool cRecording::Delete(void)
char *ext = strrchr(NewName, '.');
if (strcmp(ext, RECEXT) == 0) {
strncpy(ext, DELEXT, strlen(ext));
+ if (access(NewName, F_OK) == 0) {
+ // the new name already exists, so let's remove that one first:
+ isyslog(LOG_INFO, "removing recording %s", NewName);
+ RemoveVideoFile(NewName);
+ }
isyslog(LOG_INFO, "deleting recording %s", FileName());
result = RenameVideoFile(FileName(), NewName);
}