summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-04-24 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-04-24 18:00:00 +0200
commit85b8e41e8bb16e4e66561768026456ec5f0ee276 (patch)
treedd52f93f8db69b395ed2170d641a3e9d574ed039 /recording.c
parent37250a0568d5b1d689d5c59f983e9be228ed49c2 (diff)
downloadvdr-patch-lnbsharing-85b8e41e8bb16e4e66561768026456ec5f0ee276.tar.gz
vdr-patch-lnbsharing-85b8e41e8bb16e4e66561768026456ec5f0ee276.tar.bz2
Version 0.04vdr-0.04
- Changed name from 'osm' to 'vdr' to avoid mixups with the 'oms' program that appears to be in use with DVD replay. - Implemented a channel display in the top menu line. - Implemented replay progress display (press "Ok" when replaying to bring it up). - Implemented direct channel selecting by pressing the numeric keys. - Added several 'const' keywords to please stricter compilers. - The repeat function for the remote control no longer adapts dynamically to the timing of the RCU (this sometimes caused the repeat function to kick in too early). - Channel selection is now blocked when recording or replaying. - Improved process handling.
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/recording.c b/recording.c
index 15c7163..46fe53f 100644
--- a/recording.c
+++ b/recording.c
@@ -1,10 +1,10 @@
/*
* recording.h: Recording file handling
*
- * See the main source file 'osm.c' for copyright information and
+ * See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.2 2000/04/15 13:29:02 kls Exp $
+ * $Id: recording.c 1.6 2000/04/24 09:45:13 kls Exp $
*/
#define _GNU_SOURCE
@@ -104,6 +104,7 @@ void AssertFreeDiskSpace(void)
cRecording::cRecording(const char *Name, time_t Start, int Priority, int LifeTime)
{
+ titleBuffer = NULL;
fileName = NULL;
name = strdup(Name);
start = Start;
@@ -113,6 +114,7 @@ cRecording::cRecording(const char *Name, time_t Start, int Priority, int LifeTim
cRecording::cRecording(cTimer *Timer)
{
+ titleBuffer = NULL;
fileName = NULL;
name = strdup(Timer->file);
start = Timer->StartTime();
@@ -122,6 +124,7 @@ cRecording::cRecording(cTimer *Timer)
cRecording::cRecording(const char *FileName)
{
+ titleBuffer = NULL;
fileName = strdup(FileName);
FileName += strlen(BaseDir) + 1;
char *p = strrchr(FileName, '/');
@@ -144,6 +147,7 @@ cRecording::cRecording(const char *FileName)
cRecording::~cRecording()
{
+ delete titleBuffer;
delete fileName;
delete name;
}
@@ -157,6 +161,23 @@ const char *cRecording::FileName(void)
return fileName;
}
+const char *cRecording::Title(char Delimiter)
+{
+ delete titleBuffer;
+ titleBuffer = NULL;
+ struct tm *t = localtime(&start);
+ asprintf(&titleBuffer, "%02d.%02d.%04d%c%02d:%02d%c%s",
+ t->tm_mday,
+ t->tm_mon + 1,
+ t->tm_year + 1900,
+ Delimiter,
+ t->tm_hour,
+ t->tm_min,
+ Delimiter,
+ name);
+ return titleBuffer;
+}
+
bool cRecording::Delete(void)
{
bool result = true;
@@ -180,21 +201,6 @@ bool cRecording::Remove(void)
return RemoveFileOrDir(FileName());
}
-bool cRecording::Record(void)
-{
- return DvbApi.StartRecord(FileName());
-}
-
-bool cRecording::Play(void)
-{
- return DvbApi.StartReplay(FileName());
-}
-
-void cRecording::Stop(void)
-{
- DvbApi.StopRecord();
-}
-
// --- cRecordings -----------------------------------------------------------
bool cRecordings::Load(bool Deleted)