mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The start time of an edited recording is now set to the time of the first editing mark
This commit is contained in:
parent
12f60ee151
commit
e5d2240bbb
@ -1708,6 +1708,8 @@ Udo Richter <udo_richter@gmx.de>
|
|||||||
the marks file has just been written"
|
the marks file has just been written"
|
||||||
for suggesting a fix for a bug in handling DiSEqC codes
|
for suggesting a fix for a bug in handling DiSEqC codes
|
||||||
for fixing handling the channelID in cMenuEditChanItem
|
for fixing handling the channelID in cMenuEditChanItem
|
||||||
|
for a patch that sets the start time of an edited recording to the time of the first
|
||||||
|
editing mark
|
||||||
|
|
||||||
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
||||||
for his help in keeping 'channels.conf.terr' up to date
|
for his help in keeping 'channels.conf.terr' up to date
|
||||||
|
3
HISTORY
3
HISTORY
@ -6705,3 +6705,6 @@ Video Disk Recorder Revision History
|
|||||||
(reported by Derek Kelly).
|
(reported by Derek Kelly).
|
||||||
- Now initializing Setup.InitialChannel to an empty string to avoid problems in
|
- Now initializing Setup.InitialChannel to an empty string to avoid problems in
|
||||||
case there is no setup.conf.
|
case there is no setup.conf.
|
||||||
|
- The start time of an edited recording is now set to the time of the first
|
||||||
|
editing mark (thanks to Udo Richter).
|
||||||
|
This obsoletes the CUTTIME patch.
|
||||||
|
8
cutter.c
8
cutter.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: cutter.c 2.6 2011/03/06 14:54:33 kls Exp $
|
* $Id: cutter.c 2.7 2011/08/20 09:57:27 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cutter.h"
|
#include "cutter.h"
|
||||||
@ -208,6 +208,12 @@ bool cCutter::Start(const char *FileName)
|
|||||||
error = false;
|
error = false;
|
||||||
ended = false;
|
ended = false;
|
||||||
cRecording Recording(FileName);
|
cRecording Recording(FileName);
|
||||||
|
|
||||||
|
cMarks FromMarks;
|
||||||
|
FromMarks.Load(FileName);
|
||||||
|
if (cMark *First = FromMarks.First())
|
||||||
|
Recording.SetStartTime(Recording.start + (int(First->position / Recording.FramesPerSecond() + 30) / 60) * 60);
|
||||||
|
|
||||||
const char *evn = Recording.PrefixFileName('%');
|
const char *evn = Recording.PrefixFileName('%');
|
||||||
if (evn && RemoveVideoFile(evn) && MakeDirs(evn, true)) {
|
if (evn && RemoveVideoFile(evn) && MakeDirs(evn, true)) {
|
||||||
// XXX this can be removed once RenameVideoFile() follows symlinks (see videodir.c)
|
// XXX this can be removed once RenameVideoFile() follows symlinks (see videodir.c)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.c 2.33 2011/08/13 12:37:25 kls Exp $
|
* $Id: recording.c 2.34 2011/08/20 09:53:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -958,6 +958,13 @@ bool cRecording::WriteInfo(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cRecording::SetStartTime(time_t Start)
|
||||||
|
{
|
||||||
|
start = Start;
|
||||||
|
free(fileName);
|
||||||
|
fileName = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool cRecording::Delete(void)
|
bool cRecording::Delete(void)
|
||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
10
recording.h
10
recording.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.h 2.22 2011/08/13 12:51:23 kls Exp $
|
* $Id: recording.h 2.23 2011/08/20 09:52:07 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECORDING_H
|
#ifndef __RECORDING_H
|
||||||
@ -119,6 +119,14 @@ public:
|
|||||||
bool IsPesRecording(void) const { return isPesRecording; }
|
bool IsPesRecording(void) const { return isPesRecording; }
|
||||||
void ReadInfo(void);
|
void ReadInfo(void);
|
||||||
bool WriteInfo(void);
|
bool WriteInfo(void);
|
||||||
|
void SetStartTime(time_t Start);
|
||||||
|
///< Sets the start time of this recording to the given value.
|
||||||
|
///< If a filename has already been set for this recording, it will be
|
||||||
|
///< deleted and a new one will be generated (using the new start time)
|
||||||
|
///< at the next call to FileName().
|
||||||
|
///< Use this function with care - it does not check whether a recording with
|
||||||
|
///< this new name already exists, and if there is one, results may be
|
||||||
|
///< unexpected!
|
||||||
bool Delete(void);
|
bool Delete(void);
|
||||||
///< Changes the file name so that it will no longer be visible in the "Recordings" menu
|
///< Changes the file name so that it will no longer be visible in the "Recordings" menu
|
||||||
///< Returns false in case of error
|
///< Returns false in case of error
|
||||||
|
Loading…
Reference in New Issue
Block a user