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

Fixed handling editing marks in the replay progress display, in case the marks are deleted via the Info/Edit menu of the currently played recording

This commit is contained in:
Klaus Schmidinger 2018-02-01 16:08:15 +01:00
parent 5ae8d1a7a3
commit c71c3115cc
4 changed files with 24 additions and 5 deletions

View File

@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
a subdirectory. a subdirectory.
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details). - SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
2018-01-29: Version 2.3.9 2018-02-01: Version 2.3.9
- Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Italian OSD texts (thanks to Diego Pierotto).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
@ -9250,3 +9250,6 @@ Video Disk Recorder Revision History
- The new function cStatus::MarksModified() can be implemented by plugins to get - The new function cStatus::MarksModified() can be implemented by plugins to get
informed about any modifications to the editing marks of the currently played informed about any modifications to the editing marks of the currently played
recording (based on a patch from Jörg Wendel). recording (based on a patch from Jörg Wendel).
- Fixed handling editing marks in the replay progress display, in case the marks are
deleted via the Info/Edit menu of the currently played recording (the progress
display still displayed them).

14
menu.c
View File

@ -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 4.56 2018/01/29 13:59:58 kls Exp $ * $Id: menu.c 4.57 2018/02/01 15:48:54 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -2699,7 +2699,7 @@ eOSState cMenuRecordingEdit::DeleteMarks(void)
if (cControl *Control = cControl::Control(true)) { if (cControl *Control = cControl::Control(true)) {
if (const cRecording *Recording = Control->GetRecording()) { if (const cRecording *Recording = Control->GetRecording()) {
if (strcmp(recording->FileName(), Recording->FileName()) == 0) if (strcmp(recording->FileName(), Recording->FileName()) == 0)
cStatus::MsgMarksModified(NULL); Control->ClearEditingMarks();
} }
} }
} }
@ -5578,6 +5578,16 @@ void cReplayControl::Stop(void)
cMenuRecordings::SetRecording(NULL); // make sure opening the Recordings menu navigates to the last replayed recording cMenuRecordings::SetRecording(NULL); // make sure opening the Recordings menu navigates to the last replayed recording
} }
void cReplayControl::ClearEditingMarks(void)
{
cStateKey StateKey;
marks.Lock(StateKey);
while (cMark *m = marks.First())
marks.Del(m);
StateKey.Remove();
cStatus::MsgMarksModified(NULL);
}
void cReplayControl::SetRecording(const char *FileName) void cReplayControl::SetRecording(const char *FileName)
{ {
fileName = FileName; fileName = FileName;

3
menu.h
View File

@ -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.h 4.5 2016/12/22 10:55:36 kls Exp $ * $Id: menu.h 4.6 2018/02/01 15:35:48 kls Exp $
*/ */
#ifndef __MENU_H #ifndef __MENU_H
@ -326,6 +326,7 @@ public:
virtual void Show(void); virtual void Show(void);
virtual void Hide(void); virtual void Hide(void);
bool Visible(void) { return visible; } bool Visible(void) { return visible; }
virtual void ClearEditingMarks(void);
static void SetRecording(const char *FileName); static void SetRecording(const char *FileName);
static const char *NowReplaying(void); static const char *NowReplaying(void);
static const char *LastReplayed(void); static const char *LastReplayed(void);

View File

@ -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: player.h 4.3 2017/11/26 14:29:12 kls Exp $ * $Id: player.h 4.4 2018/02/01 15:34:51 kls Exp $
*/ */
#ifndef __PLAYER_H #ifndef __PLAYER_H
@ -102,6 +102,11 @@ public:
///< skins as a last resort, in case they want to display the state of the ///< skins as a last resort, in case they want to display the state of the
///< current player. The return value is expected to be a short, single line ///< current player. The return value is expected to be a short, single line
///< string. The default implementation returns an empty string. ///< string. The default implementation returns an empty string.
virtual void ClearEditingMarks(void) {}
///< Clears any editing marks this player might be showing.
///< Deletion of the marks themselves is handled separately, calling
///< this function merely tells the player to no longer display the
///< marks, if it has any.
double FramesPerSecond(void) const { return player ? player->FramesPerSecond() : DEFAULTFRAMESPERSECOND; } double FramesPerSecond(void) const { return player ? player->FramesPerSecond() : DEFAULTFRAMESPERSECOND; }
bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) const { return player ? player->GetIndex(Current, Total, SnapToIFrame) : false; } bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) const { return player ? player->GetIndex(Current, Total, SnapToIFrame) : false; }
bool GetFrameNumber(int &Current, int &Total) const { return player ? player->GetFrameNumber(Current, Total) : false; } bool GetFrameNumber(int &Current, int &Total) const { return player ? player->GetFrameNumber(Current, Total) : false; }