summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-02-06 15:42:21 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-02-06 15:42:21 +0100
commitf3e6d393829878980eea821a068ef04a5ac5adf4 (patch)
tree3b1f2a88ba1bf0947aefb53b7f2c590caa8460a0 /menu.c
parent4ffd2d6ccdd4c5e679ded76c879d75377e478325 (diff)
downloadvdr-f3e6d393829878980eea821a068ef04a5ac5adf4.tar.gz
vdr-f3e6d393829878980eea821a068ef04a5ac5adf4.tar.bz2
cDvbPlayer and cReplayControl now use the same list of editing marks
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 6cda42d0..fd18c1bb 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 3.42 2015/02/06 09:53:25 kls Exp $
+ * $Id: menu.c 3.43 2015/02/06 15:20:11 kls Exp $
*/
#include "menu.h"
@@ -5120,6 +5120,7 @@ cReplayControl::cReplayControl(bool PauseLive)
cRecording Recording(fileName);
cStatus::MsgReplaying(this, Recording.Name(), Recording.FileName(), true);
marks.Load(fileName, Recording.FramesPerSecond(), Recording.IsPesRecording());
+ SetMarks(&marks);
adaptiveSkipper.Initialize(&Setup.AdaptiveSkipInitial, Recording.FramesPerSecond());
SetTrackDescriptions(false);
if (Setup.ProgressDisplayTime)
@@ -5389,6 +5390,7 @@ void cReplayControl::MarkToggle(void)
int Current, Total;
if (GetIndex(Current, Total, true)) {
lastCurrent = -1; // triggers redisplay
+ cMutexLock MutexLock(&marks);
if (cMark *m = marks.Get(Current))
marks.Del(m);
else {
@@ -5409,6 +5411,7 @@ void cReplayControl::MarkJump(bool Forward)
{
int Current, Total;
if (GetIndex(Current, Total)) {
+ cMutexLock MutexLock(&marks);
if (marks.Count()) {
if (cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current)) {
if (!Setup.PauseOnMarkJump) {
@@ -5437,6 +5440,7 @@ void cReplayControl::MarkMove(int Frames, bool MarkRequired)
bool Play, Forward;
int Speed;
GetReplayMode(Play, Forward, Speed);
+ cMutexLock MutexLock(&marks);
cMark *m = marks.Get(Current);
if (!Play && m) {
displayFrames = true;
@@ -5472,6 +5476,7 @@ void cReplayControl::EditCut(void)
if (*fileName) {
Hide();
if (!RecordingsHandler.GetUsage(fileName)) {
+ cMutexLock MutexLock(&marks);
if (!marks.Count())
Skins.Message(mtError, tr("No editing marks defined!"));
else if (!marks.GetNumSequences())
@@ -5493,6 +5498,7 @@ void cReplayControl::EditTest(void)
{
int Current, Total;
if (GetIndex(Current, Total)) {
+ cMutexLock MutexLock(&marks);
cMark *m = marks.Get(Current);
if (!m)
m = marks.GetNext(Current);