From 66fea5c9f1aea3f84c9e301a0e09ac017b5dbe31 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 13 Oct 2024 09:47:18 +0200 Subject: [PATCH] Removed all DEPRECATED_* code --- HISTORY | 4 ++++ epg.c | 14 +------------- epg.h | 6 +----- filter.c | 31 +------------------------------ filter.h | 8 +------- player.c | 13 ++----------- player.h | 11 +---------- 7 files changed, 11 insertions(+), 76 deletions(-) diff --git a/HISTORY b/HISTORY index c9e85247..807f1325 100644 --- a/HISTORY +++ b/HISTORY @@ -10033,3 +10033,7 @@ Video Disk Recorder Revision History - The Channel+/- keys can now be used to jump between errors while replaying a recording (suggested by Stefan Hofmann). - Added vdrrootdir and incdir to vdr.pc (thanks to Stefan Hofmann). + +2024-10-13: + +- Removed all DEPRECATED_* code. diff --git a/epg.c b/epg.c index 3056a825..7615ac35 100644 --- a/epg.c +++ b/epg.c @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.c 5.11 2024/09/26 19:25:41 kls Exp $ + * $Id: epg.c 5.12 2024/10/13 09:47:18 kls Exp $ */ #include "epg.h" @@ -1030,18 +1030,6 @@ const cEvent *cSchedule::GetFollowingEvent(void) const return p; } -#if DEPRECATED_SCHEDULE_GET_EVENT -const cEvent *cSchedule::GetEvent(tEventID EventID, time_t StartTime) const -{ - // Returns the event info with the given StartTime or, if no actual StartTime - // is given, the one with the given EventID. - if (StartTime > 0) // 'StartTime < 0' is apparently used with NVOD channels - return eventsHashStartTime.Get(StartTime); - else - return eventsHashID.Get(EventID); -} -#endif - const cEvent *cSchedule::GetEventById(tEventID EventID) const { return eventsHashID.Get(EventID); diff --git a/epg.h b/epg.h index 0d274bb8..5d295381 100644 --- a/epg.h +++ b/epg.h @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.h 5.7 2024/10/08 08:09:48 kls Exp $ + * $Id: epg.h 5.8 2024/10/13 09:47:18 kls Exp $ */ #ifndef __EPG_H @@ -186,10 +186,6 @@ public: const cList *Events(void) const { return &events; } const cEvent *GetPresentEvent(void) const; const cEvent *GetFollowingEvent(void) const; -#if DEPRECATED_SCHEDULE_GET_EVENT - [[deprecated("see HISTORY, version 2.5.2")]] - const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const; -#endif const cEvent *GetEventById(tEventID EventID) const; const cEvent *GetEventByTime(time_t StartTime) const; const cEvent *GetEventAround(time_t Time) const; diff --git a/filter.c b/filter.c index e1abd574..e561f85e 100644 --- a/filter.c +++ b/filter.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: filter.c 5.1 2021/03/16 15:10:54 kls Exp $ + * $Id: filter.c 5.2 2024/10/13 09:47:18 kls Exp $ */ #include "filter.h" @@ -73,35 +73,6 @@ bool cSectionSyncer::Processed(int SectionNumber, int LastSectionNumber, int Seg return complete; } -#if DEPRECATED_SECTIONSYNCER_SYNC_REPEAT -void cSectionSyncer::Repeat(void) -{ - SetSectionFlag(currentSection, false); - synced = false; - complete = false; -} - -bool cSectionSyncer::Sync(uchar Version, int Number, int LastNumber) -{ - if (Version != currentVersion) { - Reset(); - currentVersion = Version; - } - if (!synced) { - if (Number != 0) - return false; - else - synced = true; - } - currentSection = Number; - bool Result = !GetSectionFlag(Number); - SetSectionFlag(Number, true); - if (Number == LastNumber) - complete = true; - return Result; -} -#endif - // --- cFilterData ----------------------------------------------------------- cFilterData::cFilterData(void) diff --git a/filter.h b/filter.h index 1a25e796..127a913b 100644 --- a/filter.h +++ b/filter.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: filter.h 5.4 2024/10/08 08:09:48 kls Exp $ + * $Id: filter.h 5.5 2024/10/13 09:47:18 kls Exp $ */ #ifndef __FILTER_H @@ -47,12 +47,6 @@ public: ///< Returns true if all sections have been processed. bool Complete(void) { return complete; } ///< Returns true if all sections have been processed. -#if DEPRECATED_SECTIONSYNCER_SYNC_REPEAT - [[deprecated("see HISTORY, version 2.5.2")]] - void Repeat(void); - [[deprecated("see HISTORY, version 2.5.2")]] - bool Sync(uchar Version, int Number, int LastNumber); -#endif }; class cSectionSyncerRandom : public cSectionSyncer { diff --git a/player.c b/player.c index 447f684a..9c276402 100644 --- a/player.c +++ b/player.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: player.c 5.1 2024/07/16 12:33:27 kls Exp $ + * $Id: player.c 5.2 2024/10/13 09:47:18 kls Exp $ */ #include "player.h" @@ -70,14 +70,6 @@ cString cControl::GetHeader(void) return ""; } -#if DEPRECATED_CCONTROL -cControl *cControl::Control(bool Hidden) -{ - cMutexLock MutexLock(&mutex); - return (control && (!control->hidden || Hidden)) ? control : NULL; -} -#endif - cControl *cControl::Control(cMutexLock &MutexLock, bool Hidden) { MutexLock.Lock(&mutex); @@ -87,9 +79,8 @@ cControl *cControl::Control(cMutexLock &MutexLock, bool Hidden) void cControl::Launch(cControl *Control) { cMutexLock MutexLock(&mutex); - cControl *c = control; // keeps control from pointing to uninitialized memory TODO obsolete once DEPRECATED_CCONTROL is gone + delete control; control = Control; - delete c; } void cControl::Attach(void) diff --git a/player.h b/player.h index 882da7c7..ea8ee004 100644 --- a/player.h +++ b/player.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: player.h 5.5 2024/10/08 08:09:48 kls Exp $ + * $Id: player.h 5.6 2024/10/13 09:47:18 kls Exp $ */ #ifndef __PLAYER_H @@ -117,15 +117,6 @@ public: static void Launch(cControl *Control); static void Attach(void); static void Shutdown(void); -#if DEPRECATED_CCONTROL - [[deprecated("see HISTORY, version 2.4.2")]] - static cControl *Control(bool Hidden = false); - ///< Old version of this function, for backwards compatibility with plugins. - ///< Plugins should be changed to use the new version below, which does - ///< proper locking. - ///< Use of this function may result in program crashes in case replay is - ///< stopped immediately after starting it. -#endif static cControl *Control(cMutexLock &MutexLock, bool Hidden = false); ///< Returns the current replay control (if any) in case it is currently ///< visible. If Hidden is true, the control will be returned even if it is