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

Copying summary info when cutting a recording

This commit is contained in:
Klaus Schmidinger 2001-09-01 13:38:09 +02:00
parent ba409a203a
commit 7fd56f7d6f
4 changed files with 20 additions and 4 deletions

View File

@ -687,3 +687,5 @@ Video Disk Recorder Revision History
- Fixed code for the default "Ok" button on the PC keyboard (was 0x162 on
the "good old" keyboards (with the F-keys at the left side), while it changed
to 0x15E on the newer keyboards).
- When a recording is edited, the summary information (if present) is now
also copied.

View File

@ -7,7 +7,7 @@
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
* based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>
*
* $Id: dvbapi.c 1.110 2001/08/25 13:52:38 kls Exp $
* $Id: dvbapi.c 1.111 2001/09/01 13:27:52 kls Exp $
*/
//#define DVDDEBUG 1
@ -2256,8 +2256,10 @@ cCuttingBuffer *cVideoCutter::cuttingBuffer = NULL;
bool cVideoCutter::Start(const char *FileName)
{
if (!cuttingBuffer) {
const char *EditedVersionName = PrefixVideoFileName(FileName, '%');
cRecording Recording(FileName);
const char *EditedVersionName = Recording.PrefixFileName('%');
if (EditedVersionName && RemoveVideoFile(EditedVersionName) && MakeDirs(EditedVersionName, true)) {
Recording.WriteSummary();
cuttingBuffer = new cCuttingBuffer(FileName, EditedVersionName);
return true;
}

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.33 2001/08/12 15:09:59 kls Exp $
* $Id: recording.c 1.34 2001/09/01 13:05:56 kls Exp $
*/
#define _GNU_SOURCE
@ -311,6 +311,17 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator)
return titleBuffer;
}
const char *cRecording::PrefixFileName(char Prefix)
{
const char *p = PrefixVideoFileName(FileName(), Prefix);
if (p) {
delete fileName;
fileName = strdup(p);
return fileName;
}
return NULL;
}
bool cRecording::WriteSummary(void)
{
if (summary) {

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.14 2001/06/02 10:00:25 kls Exp $
* $Id: recording.h 1.15 2001/09/01 12:58:02 kls Exp $
*/
#ifndef __RECORDING_H
@ -45,6 +45,7 @@ public:
const char *FileName(void);
const char *Title(char Delimiter = ' ', bool NewIndicator = false);
const char *Summary(void) { return summary; }
const char *PrefixFileName(char Prefix);
bool WriteSummary(void);
bool Delete(void);
// Changes the file name so that it will no longer be visible in the "Recordings" menu