diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-01-29 14:09:59 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-01-29 14:09:59 +0100 |
commit | 5ae8d1a7a30139d714334ecbed81b936885f75ce (patch) | |
tree | c83fd869470b7993713f64fe9691392f36ff41cb | |
parent | 0055eeeeb8df2b4e0c6f90338529200a0b3dfa22 (diff) | |
download | vdr-5ae8d1a7a30139d714334ecbed81b936885f75ce.tar.gz vdr-5ae8d1a7a30139d714334ecbed81b936885f75ce.tar.bz2 |
Implemented cStatus::MarksModified()
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 5 | ||||
-rw-r--r-- | menu.c | 13 | ||||
-rw-r--r-- | status.c | 8 | ||||
-rw-r--r-- | status.h | 8 |
5 files changed, 30 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 07cb746a..0f3cc72f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2628,6 +2628,7 @@ Jörg Wendel <vdr-ml@jwendel.de> for suggesting to change tEventID back to u_int32_t for adding the 'aux' member to cEvent for reporting a possible deadlock when quickly zapping through encrypted channels + for a patch that was used to implement cStatus::MarksModified() Peter Pinnau <vdr@unterbrecher.de> for reporting that 'uint32_t' requires including stdint.h in font.h on some systems @@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History a subdirectory. - SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details). -2018-01-28: Version 2.3.9 +2018-01-29: Version 2.3.9 - Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). @@ -9247,3 +9247,6 @@ Video Disk Recorder Revision History cMenuPathEdit::ApplyChanges() and cReplayControl::Stop() (reported by Matthias Senzel). - Fixed a possible deadlock when quickly zapping through encrypted channels (reported by Jörg Wendel). +- The new function cStatus::MarksModified() can be implemented by plugins to get + informed about any modifications to the editing marks of the currently played + recording (based on a patch from Jörg Wendel). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.55 2018/01/26 14:34:31 kls Exp $ + * $Id: menu.c 4.56 2018/01/29 13:59:58 kls Exp $ */ #include "menu.h" @@ -2694,8 +2694,15 @@ eOSState cMenuRecordingEdit::RemoveName(void) eOSState cMenuRecordingEdit::DeleteMarks(void) { if (buttonDeleteMarks && Interface->Confirm(tr("Delete editing marks for this recording?"))) { - if (cMarks::DeleteMarksFile(recording)) + if (cMarks::DeleteMarksFile(recording)) { SetHelpKeys(); + if (cControl *Control = cControl::Control(true)) { + if (const cRecording *Recording = Control->GetRecording()) { + if (strcmp(recording->FileName(), Recording->FileName()) == 0) + cStatus::MsgMarksModified(NULL); + } + } + } else Skins.Message(mtError, tr("Error while deleting editing marks!")); } @@ -5811,6 +5818,7 @@ void cReplayControl::MarkToggle(void) StateKey.Remove(); ShowTimed(2); marksModified = true; + cStatus::MsgMarksModified(&marks); } } @@ -5870,6 +5878,7 @@ void cReplayControl::MarkMove(int Frames, bool MarkRequired) m->SetPosition(p); Goto(m->Position(), true); marksModified = true; + cStatus::MsgMarksModified(&marks); } else if (!MarkRequired) Goto(SkipFrames(Frames), !Play); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: status.c 3.1 2014/01/25 10:47:39 kls Exp $ + * $Id: status.c 4.1 2018/01/29 13:36:53 kls Exp $ */ #include "status.h" @@ -53,6 +53,12 @@ void cStatus::MsgReplaying(const cControl *Control, const char *Name, const char sm->Replaying(Control, Name, FileName, On); } +void cStatus::MsgMarksModified(const cMarks* Marks) +{ + for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + sm->MarksModified(Marks); +} + void cStatus::MsgSetVolume(int Volume, bool Absolute) { for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: status.h 4.3 2017/06/23 09:08:24 kls Exp $ + * $Id: status.h 4.4 2018/01/29 13:42:17 kls Exp $ */ #ifndef __STATUS_H @@ -59,6 +59,11 @@ protected: // a name, Name can be a string that identifies the player type (like, e.g., "DVD"). // The full file name of the recording is given in FileName, which may be NULL in case there is no // actual file involved. If On is false, Name may be NULL. + virtual void MarksModified(const cMarks *Marks) {} + // If the editing marks of the recording that is currently being played + // are modified in any way, this function is called with the list of + // Marks. If Marks is NULL, the editing marks for the currently played + // recording have been deleted entirely. virtual void SetVolume(int Volume, bool Absolute) {} // The volume has been set to the given value, either // absolutely or relative to the current volume. @@ -103,6 +108,7 @@ public: static void MsgChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On); static void MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On); + static void MsgMarksModified(const cMarks* Marks); static void MsgSetVolume(int Volume, bool Absolute); static void MsgSetAudioTrack(int Index, const char * const *Tracks); static void MsgSetAudioChannel(int AudioChannel); |