Gentoo Archives: gentoo-commits

From: Joerg Bornkessel <hd_brummy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-plugins/vdr-zappilot/, media-plugins/vdr-zappilot/files/
Date: Sun, 25 Oct 2015 18:58:13
Message-Id: 1445799456.d03ebc3e360c945960c21513506f1bc102ee140d.hd_brummy@gentoo
1 commit: d03ebc3e360c945960c21513506f1bc102ee140d
2 Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 25 18:57:36 2015 +0000
4 Commit: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 25 18:57:36 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d03ebc3e
7
8 compilefix >=vdr-2.3.1
9
10 Package-Manager: portage-2.2.23
11
12 .../files/vdr-zappilot-0.0.5_vdr-2.3.1.patch | 281 +++++++++++++++++++++
13 .../vdr-zappilot/vdr-zappilot-0.0.5-r1.ebuild | 29 +++
14 2 files changed, 310 insertions(+)
15
16 diff --git a/media-plugins/vdr-zappilot/files/vdr-zappilot-0.0.5_vdr-2.3.1.patch b/media-plugins/vdr-zappilot/files/vdr-zappilot-0.0.5_vdr-2.3.1.patch
17 new file mode 100644
18 index 0000000..4a6c4e2
19 --- /dev/null
20 +++ b/media-plugins/vdr-zappilot/files/vdr-zappilot-0.0.5_vdr-2.3.1.patch
21 @@ -0,0 +1,281 @@
22 +compile fix >=vdr-2.3.1
23 +http://www.vdr-portal.de/board1-news/board2-vdr-news/p1254875-announce-vdr-developer-version-2-3-1/#post1254875
24 +Signed-of-by: Joerg Bornkessel <hd_brummy@g.o> (25 Okt 2015)
25 +
26 +diff -rupN b/zappilotosd.c a/zappilotosd.c
27 +--- b/zappilotosd.c 2015-06-24 14:32:15.000000000 +0200
28 ++++ a/zappilotosd.c 2015-10-22 18:39:36.000000000 +0200
29 +@@ -69,7 +69,7 @@ cZappilotOsd::~cZappilotOsd(void)
30 +
31 + void cZappilotOsd::DisplayChannel(const cChannel *Channel)
32 + {
33 +- int BufSize = 255;
34 ++ int BufSize = 1020;
35 + if (Channel)
36 + {
37 + if (Channel->GroupSep())
38 +@@ -172,11 +172,11 @@ void cZappilotOsd::UpdateEPGInfo(int Now
39 + titleFollowingInfo = NULL;
40 + subtitlePresentInfo = NULL;
41 + subtitleFollowingInfo = NULL;
42 +- cSchedulesLock SchedulesLock;
43 +- const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock);
44 ++ LOCK_SCHEDULES_READ;
45 ++ LOCK_CHANNELS_READ;
46 + if (Schedules)
47 + {
48 +- const cSchedule *Schedule = Schedules->GetSchedule(Channels.GetByNumber(PilotChannelNumber)->GetChannelID());
49 ++ const cSchedule *Schedule = Schedules->GetSchedule(Channels->GetByNumber(PilotChannelNumber)->GetChannelID());
50 + if (Schedule)
51 + {
52 + // Get Present event
53 +@@ -267,9 +267,9 @@ void cZappilotOsd::UpdateEPGInfo(int Now
54 + void cZappilotOsd::Show()
55 + {
56 + // find the actual current
57 +- cChannel *Channel = Channels.GetByNumber(cDevice::PrimaryDevice()->CurrentChannel());
58 +- currentChannel = Channels.GetByNumber(cDevice::PrimaryDevice()->CurrentChannel());
59 +-
60 ++ LOCK_CHANNELS_READ;
61 ++ const cChannel *Channel = Channels->GetByNumber(cDevice::PrimaryDevice()->CurrentChannel());
62 ++ currentChannel = Channel;
63 + if (Channel)
64 + {
65 + PilotChannelNumber = Channel->Number();
66 +@@ -333,13 +333,14 @@ eOSState cZappilotOsd::ProcessKey(eKeys
67 + case k1 ... k9:
68 + if (number >= 0)
69 + {
70 +- if (number > Channels.MaxNumber())
71 ++ LOCK_CHANNELS_READ;
72 ++ if (number > Channels->MaxNumber())
73 + number = Key - k0;
74 + else
75 + number = number * 10 + Key - k0;
76 + if (number > 0)
77 + {
78 +- cChannel *channel = Channels.GetByNumber(number);
79 ++ const cChannel *channel = Channels->GetByNumber(number);
80 + if (channel)
81 + {
82 + PilotChannelNumber = channel->Number();
83 +@@ -363,7 +364,8 @@ eOSState cZappilotOsd::ProcessKey(eKeys
84 + if (config.fastbrowse)
85 + {
86 + CursorDown();
87 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
88 ++ LOCK_CHANNELS_READ;
89 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
90 + if (channel)
91 + group = channel->Index()-1;
92 + break;
93 +@@ -380,7 +382,8 @@ eOSState cZappilotOsd::ProcessKey(eKeys
94 + if (config.fastbrowse)
95 + {
96 + CursorUp();
97 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
98 ++ LOCK_CHANNELS_READ;
99 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
100 + if (channel)
101 + group = channel->Index()-1;
102 + break;
103 +@@ -396,7 +399,8 @@ eOSState cZappilotOsd::ProcessKey(eKeys
104 + {
105 + if (group < 0)
106 + {
107 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
108 ++ LOCK_CHANNELS_READ;
109 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
110 + if (channel)
111 + group = channel->Index();
112 + }
113 +@@ -405,15 +409,18 @@ eOSState cZappilotOsd::ProcessKey(eKeys
114 + int SaveGroup = group;
115 + if (NORMALKEY(Key) == kRight)
116 + {
117 +- group = Channels.GetNextGroup(group);
118 ++ LOCK_CHANNELS_READ;
119 ++ group = Channels->GetNextGroup(group);
120 + }
121 + else
122 + {
123 +- group = Channels.GetPrevGroup(group < 1 ? 1 : group);
124 ++ LOCK_CHANNELS_READ;
125 ++ group = Channels->GetPrevGroup(group < 1 ? 1 : group);
126 + }
127 + if (group < 0)
128 + group = SaveGroup;
129 +- cChannel *channel = Channels.Get(group);
130 ++ LOCK_CHANNELS_READ;
131 ++ const cChannel *channel = Channels->Get(group);
132 + if (channel)
133 + {
134 + //DisplayChannel(channel);
135 +@@ -449,7 +456,8 @@ eOSState cZappilotOsd::ProcessKey(eKeys
136 + else
137 + {
138 + CursorUp();
139 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
140 ++ LOCK_CHANNELS_READ;
141 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
142 + if (channel)
143 + group = channel->Index()-1;
144 + break;
145 +@@ -466,20 +474,22 @@ eOSState cZappilotOsd::ProcessKey(eKeys
146 + else
147 + {
148 + CursorDown();
149 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
150 ++ LOCK_CHANNELS_READ;
151 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
152 + if (channel)
153 +- group = channel->Index()-1;
154 ++ group = channel->Index()-1;
155 + break;
156 + }
157 + case kNone:
158 + if (number && (int)cTimeMs::Now() - lastTime > 1000)
159 + {
160 +- if (Channels.GetByNumber(number))
161 ++ LOCK_CHANNELS_READ;
162 ++ if (Channels->GetByNumber(number))
163 + {
164 + PilotChannelNumber = number;
165 + lastTime = cTimeMs::Now();
166 + number = 0;
167 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
168 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
169 + if (channel)
170 + group = channel->Index()-1;
171 + }
172 +@@ -553,7 +563,8 @@ eOSState cZappilotOsd::ProcessKey(eKeys
173 + {
174 + if (group < 0)
175 + {
176 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
177 ++ LOCK_CHANNELS_READ;
178 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
179 + if (channel)
180 + group = channel->Index();
181 + }
182 +@@ -562,15 +573,18 @@ eOSState cZappilotOsd::ProcessKey(eKeys
183 + int SaveGroup = group;
184 + if (NORMALKEY(Key) == kBlue)
185 + {
186 +- group = Channels.GetNextGroup(group);
187 ++ LOCK_CHANNELS_READ;
188 ++ group = Channels->GetNextGroup(group);
189 + }
190 + else
191 + {
192 +- group = Channels.GetPrevGroup(group < 1 ? 1 : group);
193 ++ LOCK_CHANNELS_READ;
194 ++ group = Channels->GetPrevGroup(group < 1 ? 1 : group);
195 + }
196 + if (group < 0)
197 + group = SaveGroup;
198 +- cChannel *channel = Channels.Get(group);
199 ++ LOCK_CHANNELS_READ;
200 ++ const cChannel *channel = Channels->Get(group);
201 + if (channel)
202 + {
203 + //DisplayChannel(channel);
204 +@@ -663,8 +677,8 @@ eOSState cZappilotOsd::ProcessKey(eKeys
205 + void cZappilotOsd::CursorUp()
206 + {
207 + int n = PilotChannelNumber + 1;
208 +- cChannel *channel;
209 +- channel = Channels.GetByNumber(n, 1);
210 ++ LOCK_CHANNELS_READ;
211 ++ const cChannel *channel = Channels->GetByNumber(n, 1);
212 + if (channel)
213 + {
214 + n = channel->Number();
215 +@@ -678,8 +692,8 @@ void cZappilotOsd::CursorUp()
216 + void cZappilotOsd::CursorDown()
217 + {
218 + int n = PilotChannelNumber - 1;
219 +- cChannel *channel;
220 +- channel = Channels.GetByNumber(n, -1);
221 ++ LOCK_CHANNELS_READ;
222 ++ const cChannel *channel = Channels->GetByNumber(n, -1);
223 + if (channel)
224 + {
225 + n = channel->Number();
226 +@@ -693,9 +707,13 @@ void cZappilotOsd::CursorDown()
227 + void cZappilotOsd::CursorOK()
228 + {
229 + DrawMenu(0,2);
230 +- if (currentChannel != Channels.GetByNumber(PilotChannelNumber))
231 ++ LOCK_CHANNELS_READ;
232 ++ const cChannel* chan = Channels->GetByNumber(PilotChannelNumber);
233 ++
234 ++ if (currentChannel != chan)
235 + {
236 +- cChannel *Channel = Channels.GetByNumber(PilotChannelNumber);
237 ++ LOCK_CHANNELS_READ;
238 ++ const cChannel *Channel = Channels->GetByNumber(PilotChannelNumber);
239 + if (Channel)
240 + {
241 + cDevice::PrimaryDevice()->SwitchChannel(Channel, true);
242 +@@ -750,7 +768,8 @@ void cZappilotOsd::DisplayInfo(int delta
243 + displayTimer = NULL;
244 + displayChannel = Skins.Current()->DisplayChannel(true);
245 + }
246 +- cChannel *channel = Channels.GetByNumber(PilotChannelNumber);
247 ++ LOCK_CHANNELS_READ;
248 ++ const cChannel *channel = Channels->GetByNumber(PilotChannelNumber);
249 +
250 + if (!isempty(titlePresentInfo))
251 + {
252 +@@ -778,14 +797,17 @@ void cZappilotOsd::DisplayExtraInfo()
253 + displayEvent = NULL;
254 + }
255 +
256 +- displayEvent = new cMenuEvent(Present,false,true);
257 ++
258 ++ LOCK_TIMERS_READ;
259 ++ LOCK_CHANNELS_READ;
260 ++ displayEvent = new cMenuEvent(Timers, Channels, Present,false,true);
261 + displayEvent->Display();
262 + }
263 +
264 +
265 + void cZappilotOsd::DisplayTimer()
266 + {
267 +-
268 ++
269 + if (displayChannel)
270 + {
271 + delete displayChannel;
272 +@@ -797,13 +819,17 @@ void cZappilotOsd::DisplayTimer()
273 + displayEvent = NULL;
274 + }
275 +
276 ++ LOCK_TIMERS_WRITE;
277 ++
278 + cTimer *timer = new cTimer(Present);
279 +- cTimer *t = Timers.GetTimer(timer);
280 ++ cTimer *t = Timers->GetMatch(Present);
281 ++
282 + if (t)
283 + {
284 + delete timer;
285 + timer = t;
286 + }
287 ++
288 + displayTimer=new cMenuEditTimer(timer, !t);
289 + displayTimer->Display();
290 + }
291 +diff -rupN b/zappilotosd.h a/zappilotosd.h
292 +--- b/zappilotosd.h 2015-06-24 14:32:15.000000000 +0200
293 ++++ a/zappilotosd.h 2015-10-22 18:40:02.000000000 +0200
294 +@@ -39,7 +39,7 @@ class cZappilotOsd : public cOsdObject
295 + int offset;
296 + int lines;
297 + int type;
298 +- cChannel* currentChannel;
299 ++ const cChannel* currentChannel;
300 +
301 + public:
302 + cZappilotOsd(void);
303
304 diff --git a/media-plugins/vdr-zappilot/vdr-zappilot-0.0.5-r1.ebuild b/media-plugins/vdr-zappilot/vdr-zappilot-0.0.5-r1.ebuild
305 new file mode 100644
306 index 0000000..3101904
307 --- /dev/null
308 +++ b/media-plugins/vdr-zappilot/vdr-zappilot-0.0.5-r1.ebuild
309 @@ -0,0 +1,29 @@
310 +# Copyright 1999-2014 Gentoo Foundation
311 +# Distributed under the terms of the GNU General Public License v2
312 +# $Id$
313 +
314 +EAPI=5
315 +
316 +inherit vdr-plugin-2
317 +
318 +VERSION="1318" # every bump new version
319 +
320 +DESCRIPTION="VDR Plugin: browse fast the EPG information without being forced to switch to a channel"
321 +HOMEPAGE="http://projects.vdr-developer.org/projects/show/plg-zappilot"
322 +SRC_URI="mirror://vdr-developerorg/${VERSION}/${P}.tgz"
323 +
324 +KEYWORDS="~amd64 ~x86"
325 +SLOT="0"
326 +LICENSE="GPL-2"
327 +IUSE=""
328 +
329 +DEPEND=">=media-video/vdr-1.7.34"
330 +RDEPEND="${DEPEND}"
331 +
332 +src_prepare() {
333 + vdr-plugin-2_src_prepare
334 +
335 + if has_version ">=media-video/vdr-2.3.1"; then
336 + epatch "${FILESDIR}/${P}_vdr-2.3.1.patch"
337 + fi
338 +}