mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
While replaying, the editing marks are now updated every 10 seconds
This commit is contained in:
parent
cd3c26b815
commit
61c6b36bbc
@ -2575,6 +2575,8 @@ Manuel Reimer <Manuel.Reimer@gmx.de>
|
|||||||
for fixing saving terminal settings when running in background
|
for fixing saving terminal settings when running in background
|
||||||
for making the SVDRP port open only for the local host if svdrphosts.conf
|
for making the SVDRP port open only for the local host if svdrphosts.conf
|
||||||
contains only the address of the local host
|
contains only the address of the local host
|
||||||
|
for a patch that was used as a base for making editing marks be updated every 10
|
||||||
|
seconds during replay
|
||||||
|
|
||||||
Rene van den Braken <rene@vandenbraken.name>
|
Rene van den Braken <rene@vandenbraken.name>
|
||||||
for reporting a bug in writing the PCR pid into the PMT in
|
for reporting a bug in writing the PCR pid into the PMT in
|
||||||
|
2
HISTORY
2
HISTORY
@ -6545,3 +6545,5 @@ Video Disk Recorder Revision History
|
|||||||
(thanks to Anssi Hannula).
|
(thanks to Anssi Hannula).
|
||||||
- Changed the compiler optimization flag to -O3, which gives quite a performance
|
- Changed the compiler optimization flag to -O3, which gives quite a performance
|
||||||
boost in the AlphaBlend() function.
|
boost in the AlphaBlend() function.
|
||||||
|
- While replaying, the editing marks are now updated every 10 seconds (based on a
|
||||||
|
patch from Manuel Reimer).
|
||||||
|
4
menu.c
4
menu.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: menu.c 2.27 2011/02/26 15:28:32 kls Exp $
|
* $Id: menu.c 2.28 2011/02/27 12:37:48 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -4742,6 +4742,8 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
|
|||||||
{
|
{
|
||||||
if (!Active())
|
if (!Active())
|
||||||
return osEnd;
|
return osEnd;
|
||||||
|
if (Key == kNone)
|
||||||
|
marks.Update();
|
||||||
if (visible) {
|
if (visible) {
|
||||||
if (timeoutShow && time(NULL) > timeoutShow) {
|
if (timeoutShow && time(NULL) > timeoutShow) {
|
||||||
Hide();
|
Hide();
|
||||||
|
23
recording.c
23
recording.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.25 2011/02/25 14:35:19 kls Exp $
|
* $Id: recording.c 2.26 2011/02/27 13:35:20 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -57,6 +57,7 @@
|
|||||||
#define DELETEDLIFETIME 300 // seconds after which a deleted recording will be actually removed
|
#define DELETEDLIFETIME 300 // seconds after which a deleted recording will be actually removed
|
||||||
#define DISKCHECKDELTA 100 // seconds between checks for free disk space
|
#define DISKCHECKDELTA 100 // seconds between checks for free disk space
|
||||||
#define REMOVELATENCY 10 // seconds to wait until next check after removing a file
|
#define REMOVELATENCY 10 // seconds to wait until next check after removing a file
|
||||||
|
#define MARKSUPDATEDELTA 10 // seconds between checks for updating editing marks
|
||||||
|
|
||||||
#define MAX_SUBTITLE_LENGTH 40
|
#define MAX_SUBTITLE_LENGTH 40
|
||||||
|
|
||||||
@ -1267,13 +1268,29 @@ bool cMark::Save(FILE *f)
|
|||||||
|
|
||||||
bool cMarks::Load(const char *RecordingFileName, double FramesPerSecond, bool IsPesRecording)
|
bool cMarks::Load(const char *RecordingFileName, double FramesPerSecond, bool IsPesRecording)
|
||||||
{
|
{
|
||||||
cMutexLock MutexLock(&MutexMarkFramesPerSecond);
|
fileName = AddDirectory(RecordingFileName, IsPesRecording ? MARKSFILESUFFIX ".vdr" : MARKSFILESUFFIX);
|
||||||
framesPerSecond = FramesPerSecond;
|
framesPerSecond = FramesPerSecond;
|
||||||
|
lastUpdate = 0;
|
||||||
|
lastFileTime = -1; // the first call to Load() must take place!
|
||||||
|
return Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cMarks::Update(void)
|
||||||
|
{
|
||||||
|
time_t t = time(NULL);
|
||||||
|
if (t - lastUpdate > MARKSUPDATEDELTA) {
|
||||||
|
lastUpdate = t;
|
||||||
|
t = LastModifiedTime(fileName);
|
||||||
|
if (t > lastFileTime) {
|
||||||
|
lastFileTime = t;
|
||||||
|
cMutexLock MutexLock(&MutexMarkFramesPerSecond);
|
||||||
MarkFramesPerSecond = framesPerSecond;
|
MarkFramesPerSecond = framesPerSecond;
|
||||||
if (cConfig<cMark>::Load(AddDirectory(RecordingFileName, IsPesRecording ? MARKSFILESUFFIX ".vdr" : MARKSFILESUFFIX))) {
|
if (cConfig<cMark>::Load(fileName)) {
|
||||||
Sort();
|
Sort();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.15 2010/12/27 10:48:21 kls Exp $
|
* $Id: recording.h 2.16 2011/02/27 12:48:21 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECORDING_H
|
#ifndef __RECORDING_H
|
||||||
@ -190,9 +190,13 @@ public:
|
|||||||
|
|
||||||
class cMarks : public cConfig<cMark> {
|
class cMarks : public cConfig<cMark> {
|
||||||
private:
|
private:
|
||||||
|
cString fileName;
|
||||||
double framesPerSecond;
|
double framesPerSecond;
|
||||||
|
time_t lastUpdate;
|
||||||
|
time_t lastFileTime;
|
||||||
public:
|
public:
|
||||||
bool Load(const char *RecordingFileName, double FramesPerSecond = DEFAULTFRAMESPERSECOND, bool IsPesRecording = false);
|
bool Load(const char *RecordingFileName, double FramesPerSecond = DEFAULTFRAMESPERSECOND, bool IsPesRecording = false);
|
||||||
|
bool Update(void);
|
||||||
void Sort(void);
|
void Sort(void);
|
||||||
cMark *Add(int Position);
|
cMark *Add(int Position);
|
||||||
cMark *Get(int Position);
|
cMark *Get(int Position);
|
||||||
|
Loading…
Reference in New Issue
Block a user