1 |
commit: 07bbe67ca417fd6c9938158ad9afc78ce9547509 |
2 |
Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 1 19:00:42 2020 +0000 |
4 |
Commit: Jörg Bornkessel <hd_brummy <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 1 19:00:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07bbe67c |
7 |
|
8 |
media-plugins/vdr-ttxtsubs: compile for >media-tv/vdr-2.4 fixed |
9 |
|
10 |
Package-Manager: Portage-2.3.90, Repoman-2.3.20 |
11 |
Signed-off-by: Joerg Bornkessel <hd_brummy <AT> gentoo.org> |
12 |
|
13 |
.../files/vdr-ttxtsubs-0.3.0_vdr-2.4.0.patch | 109 +++++++++++++++++++++ |
14 |
....3.0-r1.ebuild => vdr-ttxtsubs-0.3.0-r2.ebuild} | 4 + |
15 |
2 files changed, 113 insertions(+) |
16 |
|
17 |
diff --git a/media-plugins/vdr-ttxtsubs/files/vdr-ttxtsubs-0.3.0_vdr-2.4.0.patch b/media-plugins/vdr-ttxtsubs/files/vdr-ttxtsubs-0.3.0_vdr-2.4.0.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..4b6bf2c05fd |
20 |
--- /dev/null |
21 |
+++ b/media-plugins/vdr-ttxtsubs/files/vdr-ttxtsubs-0.3.0_vdr-2.4.0.patch |
22 |
@@ -0,0 +1,109 @@ |
23 |
+diff --git a/ttxtsubs.c b/ttxtsubs.c |
24 |
+index f9b7bbc..5307c44 100644 |
25 |
+--- a/ttxtsubs.c |
26 |
++++ b/ttxtsubs.c |
27 |
+@@ -275,7 +275,8 @@ void cPluginTtxtsubs::Housekeeping(void) |
28 |
+ |
29 |
+ const char *cPluginTtxtsubs::MainMenuEntry(void) |
30 |
+ { |
31 |
+- bool haveChannel = Channels.GetByNumber(cDevice::ActualDevice()->CurrentChannel()) != NULL; |
32 |
++ LOCK_CHANNELS_READ; |
33 |
++ bool haveChannel = Channels->GetByNumber(cDevice::ActualDevice()->CurrentChannel()) != NULL; |
34 |
+ switch(globals.mMainMenuEntry) { |
35 |
+ case 1: |
36 |
+ if(globals.mRealDoDisplay) |
37 |
+@@ -349,7 +350,8 @@ void cPluginTtxtsubs::ChannelSwitch(const cDevice *Device, int ChannelNumber |
38 |
+ DELETENULL(mLiveReceiver); |
39 |
+ if (!Device->Replaying() && !Device->Transferring()) |
40 |
+ { |
41 |
+- cChannel* channel = Channels.GetByNumber(ChannelNumber); |
42 |
++ LOCK_CHANNELS_READ; |
43 |
++ const cChannel* channel = Channels->GetByNumber(ChannelNumber); |
44 |
+ if (channel && channel->Tpid()) |
45 |
+ { |
46 |
+ mLiveReceiver = new cTtxtSubsLiveReceiver(channel, this); |
47 |
+diff --git a/ttxtsubschannelsettings.c b/ttxtsubschannelsettings.c |
48 |
+index b543a36..7f9d326 100644 |
49 |
+--- a/ttxtsubschannelsettings.c |
50 |
++++ b/ttxtsubschannelsettings.c |
51 |
+@@ -48,8 +48,9 @@ bool cTtxtSubsChannelSetting::Parse(const char *s) |
52 |
+ } |
53 |
+ else { // parse old format |
54 |
+ int sid; |
55 |
++ LOCK_CHANNELS_READ; |
56 |
+ if (1 == sscanf(buffer, "%d", &sid)) { |
57 |
+- for (cChannel *ch = Channels.First(); ch; ch = Channels.Next(ch)) { |
58 |
++ for (const cChannel *ch = Channels->First(); ch; ch = Channels->Next(ch)) { |
59 |
+ if (!ch->GroupSep() && ch->Sid() == sid) { |
60 |
+ channelid=ch->GetChannelID(); |
61 |
+ pagemode=PageMode; |
62 |
+diff --git a/ttxtsubslivereceiver.c b/ttxtsubslivereceiver.c |
63 |
+index 9f60fdd..586d5af 100644 |
64 |
+--- a/ttxtsubslivereceiver.c |
65 |
++++ b/ttxtsubslivereceiver.c |
66 |
+@@ -22,7 +22,7 @@ |
67 |
+ #include <vdr/remux.h> |
68 |
+ #include "ttxtsubslivereceiver.h" |
69 |
+ |
70 |
+-cTtxtSubsLiveReceiver::cTtxtSubsLiveReceiver(cChannel* channel, cVDRTtxtsubsHookListener* hook) |
71 |
++cTtxtSubsLiveReceiver::cTtxtSubsLiveReceiver(const cChannel* channel, cVDRTtxtsubsHookListener* hook) |
72 |
+ : |
73 |
+ _channel(channel), |
74 |
+ _hook(hook) |
75 |
+@@ -35,7 +35,7 @@ cTtxtSubsLiveReceiver::~cTtxtSubsLiveReceiver() |
76 |
+ cReceiver::Detach(); |
77 |
+ } |
78 |
+ |
79 |
+-void cTtxtSubsLiveReceiver::Receive(uchar *Data, int Length) |
80 |
++void cTtxtSubsLiveReceiver::Receive(const uchar *Data, int Length) |
81 |
+ { |
82 |
+ if (Data == NULL) |
83 |
+ { |
84 |
+diff --git a/ttxtsubslivereceiver.h b/ttxtsubslivereceiver.h |
85 |
+index d361c7b..0aba89b 100644 |
86 |
+--- a/ttxtsubslivereceiver.h |
87 |
++++ b/ttxtsubslivereceiver.h |
88 |
+@@ -29,12 +29,12 @@ class cTtxtSubsLiveReceiver : public cReceiver |
89 |
+ { |
90 |
+ private: |
91 |
+ cTsToPes tsToPesTeletext; |
92 |
+- cChannel* _channel; |
93 |
++ const cChannel* _channel; |
94 |
+ cVDRTtxtsubsHookListener* _hook; |
95 |
+ protected: |
96 |
+- virtual void Receive(uchar *Data, int Length); |
97 |
++ virtual void Receive(const uchar *Data, int Length); |
98 |
+ public: |
99 |
+- cTtxtSubsLiveReceiver(cChannel* channel, cVDRTtxtsubsHookListener* hook); |
100 |
++ cTtxtSubsLiveReceiver(const cChannel* channel, cVDRTtxtsubsHookListener* hook); |
101 |
+ virtual ~cTtxtSubsLiveReceiver(); |
102 |
+ }; |
103 |
+ |
104 |
+diff --git a/ttxtsubspagemenu.c b/ttxtsubspagemenu.c |
105 |
+index cd7b6d0..b03949c 100644 |
106 |
+--- a/ttxtsubspagemenu.c |
107 |
++++ b/ttxtsubspagemenu.c |
108 |
+@@ -35,8 +35,9 @@ cTtxtsubsPageMenu::~cTtxtsubsPageMenu() |
109 |
+ cTtxtsubsPageMenu::cTtxtsubsPageMenu() |
110 |
+ :cOsdMenu(tr("Subtitle Page Settings"), 30) |
111 |
+ { |
112 |
++ LOCK_CHANNELS_READ; |
113 |
+ cDevice *device = cDevice::ActualDevice(); |
114 |
+- channel = Channels.GetByNumber(device->CurrentChannel()); |
115 |
++ channel = Channels->GetByNumber(device->CurrentChannel()); |
116 |
+ setting = TtxtSubsChannelSettings.Get(channel); |
117 |
+ if (setting) { |
118 |
+ origPageMode = mPageMode = setting->PageMode(); |
119 |
+diff --git a/ttxtsubspagemenu.h b/ttxtsubspagemenu.h |
120 |
+index ad4bd48..ffe82d9 100644 |
121 |
+--- a/ttxtsubspagemenu.h |
122 |
++++ b/ttxtsubspagemenu.h |
123 |
+@@ -29,7 +29,7 @@ |
124 |
+ class cTtxtsubsPageMenu : public cOsdMenu |
125 |
+ { |
126 |
+ private: |
127 |
+- cChannel *channel; |
128 |
++ const cChannel *channel; |
129 |
+ cTtxtSubsChannelSetting *setting; |
130 |
+ int mPageNumber; |
131 |
+ int mPageMode; |
132 |
|
133 |
diff --git a/media-plugins/vdr-ttxtsubs/vdr-ttxtsubs-0.3.0-r1.ebuild b/media-plugins/vdr-ttxtsubs/vdr-ttxtsubs-0.3.0-r2.ebuild |
134 |
similarity index 86% |
135 |
rename from media-plugins/vdr-ttxtsubs/vdr-ttxtsubs-0.3.0-r1.ebuild |
136 |
rename to media-plugins/vdr-ttxtsubs/vdr-ttxtsubs-0.3.0-r2.ebuild |
137 |
index 9fe2f3ec6aa..5243d459cc0 100644 |
138 |
--- a/media-plugins/vdr-ttxtsubs/vdr-ttxtsubs-0.3.0-r1.ebuild |
139 |
+++ b/media-plugins/vdr-ttxtsubs/vdr-ttxtsubs-0.3.0-r2.ebuild |
140 |
@@ -23,4 +23,8 @@ src_prepare() { |
141 |
vdr-plugin-2_src_prepare |
142 |
|
143 |
eapply "${FILESDIR}/${P}_teletext-chars.patch" |
144 |
+ |
145 |
+ if has_version ">=media-video/vdr-2.4"; then |
146 |
+ eapply "${FILESDIR}/${P}_vdr-2.4.0.patch" |
147 |
+ fi |
148 |
} |