1 | #ifndef INFOBAR_H |
---|
2 | #define INFOBAR_H |
---|
3 | |
---|
4 | void screeninfobar() |
---|
5 | { |
---|
6 | int rcret = 0, ret = 0, infobartimeout = 0, rcwait = 1000, count = 0, first = 1; |
---|
7 | int playpic = 0; |
---|
8 | struct skin* playinfobarpic = getscreen("playinfobarpic"); |
---|
9 | struct skin* infobar1 = getscreen("infobar"); |
---|
10 | struct skin* infobar2 = getscreen("infobar2"); |
---|
11 | struct skin* infobar = infobar1; |
---|
12 | struct skin* standbymenu = NULL; |
---|
13 | char* tmpstr = NULL; char* tmpnr = NULL; |
---|
14 | struct skin* pluginnode = NULL; |
---|
15 | void (*startplugin)(void); |
---|
16 | time_t lasttime = 0; |
---|
17 | int mark = 0; |
---|
18 | |
---|
19 | status.mute = 0; |
---|
20 | status.infobar = 2; |
---|
21 | |
---|
22 | addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); |
---|
23 | addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); |
---|
24 | addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL); |
---|
25 | |
---|
26 | status.infobaraktiv = 1; |
---|
27 | status.mcaktiv = 0; |
---|
28 | |
---|
29 | int playinfobarcount = 0, playinfobarstatus = 0; |
---|
30 | |
---|
31 | while(1) |
---|
32 | { |
---|
33 | mark = 0; |
---|
34 | |
---|
35 | if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL)) |
---|
36 | writerc(getrcconfigint("rcvolup", NULL)); |
---|
37 | if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL)) |
---|
38 | writerc(getrcconfigint("rcvoldown", NULL)); |
---|
39 | |
---|
40 | //check if mediadb can freed |
---|
41 | if(status.mediadbthread == NULL) |
---|
42 | { |
---|
43 | if(status.writemediadb == 1) |
---|
44 | writemediadb(getconfig("mediadbfile", NULL), NULL); |
---|
45 | freemediadb(0); |
---|
46 | } |
---|
47 | //check if picmem times out and must freed |
---|
48 | if(time(NULL) > status.picmemtimeout + 60) |
---|
49 | { |
---|
50 | checkpictimeout(); |
---|
51 | status.picmemtimeout = time(NULL); |
---|
52 | } |
---|
53 | |
---|
54 | if(status.standby == 1) |
---|
55 | screenstandby(); |
---|
56 | if(status.infobar == 1 ) |
---|
57 | { |
---|
58 | rcret = waitrc(infobar, 1000, 0); |
---|
59 | infobartimeout++; |
---|
60 | } |
---|
61 | else if(status.infobar == 0 && status.timeshift == 1) |
---|
62 | { |
---|
63 | rcret = waitrc(infobar, 1000, 0); |
---|
64 | if(rcret == RCTIMEOUT) |
---|
65 | { |
---|
66 | if(playpic == 1) { |
---|
67 | clearscreen(playinfobarpic); |
---|
68 | drawscreen(playinfobarpic, 0, 0); |
---|
69 | } |
---|
70 | else |
---|
71 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
72 | continue; |
---|
73 | } |
---|
74 | } |
---|
75 | else if(status.infobar == 2) |
---|
76 | { |
---|
77 | if(getconfigint("infobarsleep", NULL) > 0) |
---|
78 | rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0); |
---|
79 | else if(first == 1) //only on first start wait a little for epg |
---|
80 | { |
---|
81 | first = 0; |
---|
82 | rcret = waitrc(infobar, 1000, 0); |
---|
83 | } |
---|
84 | else |
---|
85 | rcret = RCTIMEOUT; |
---|
86 | |
---|
87 | if(rcret == RCTIMEOUT) |
---|
88 | { |
---|
89 | status.infobar = 1; |
---|
90 | infobar = infobar1; |
---|
91 | drawscreen(infobar, 0, 4); |
---|
92 | continue; |
---|
93 | } |
---|
94 | else |
---|
95 | status.infobar = 0; |
---|
96 | } |
---|
97 | else |
---|
98 | { |
---|
99 | int screensaver_delay = getconfigint("screensaver_delay", NULL); |
---|
100 | rcret = 0; count = 0; rcwait = 1000; |
---|
101 | if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1) |
---|
102 | { |
---|
103 | initscreensaver(); |
---|
104 | if(screensaver != NULL) screensaver->flag = 1; |
---|
105 | } |
---|
106 | if(screensaver == NULL) |
---|
107 | { |
---|
108 | if(status.infobarprogram == 1) rcwait = 2000; |
---|
109 | else rcwait = 0; |
---|
110 | } |
---|
111 | while(rcret == 0 || rcret == RCTIMEOUT) |
---|
112 | { |
---|
113 | rcret = waitrc(infobar, rcwait, 0); |
---|
114 | count++; |
---|
115 | if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT)) |
---|
116 | { |
---|
117 | infobartimeout = 99999; |
---|
118 | mark = 1; |
---|
119 | break; |
---|
120 | } |
---|
121 | if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay) |
---|
122 | { |
---|
123 | if(status.aktservice->channel != NULL) |
---|
124 | screensaver->value = ostrcat(status.aktservice->channel->name, NULL, 0, 0); |
---|
125 | else |
---|
126 | screensaver->value = ostrcat("Radio", NULL, 0, 0); |
---|
127 | showscreensaver(); |
---|
128 | free(screensaver->value); |
---|
129 | rcwait = screensaver->speed; |
---|
130 | } |
---|
131 | } |
---|
132 | if(screensaver != NULL) screensaver->flag = 0; |
---|
133 | deinitscreensaver(); |
---|
134 | if(mark == 0) |
---|
135 | { |
---|
136 | drawscreen(skin, 0, 0); |
---|
137 | infobartimeout = 0; |
---|
138 | } |
---|
139 | } |
---|
140 | |
---|
141 | if(rcret == getrcconfigint("rcpause", NULL) || ((checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1) && rcret == getrcconfigint("rcplay", NULL) && status.pause == 0 && status.slowspeed == 0 && status.playspeed == 0 && ostrcmp(getconfig("remotecontrol", NULL), "0") == 0)) |
---|
142 | { |
---|
143 | //timeshift |
---|
144 | if(playpic == 1) { |
---|
145 | clearscreen(playinfobarpic); |
---|
146 | playpic = 0; |
---|
147 | } |
---|
148 | if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0)) |
---|
149 | { |
---|
150 | if(status.timeshifttype == 1 && status.timeshiftpos == 0) |
---|
151 | { |
---|
152 | timeshiftpause(0); |
---|
153 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
154 | } |
---|
155 | else |
---|
156 | timeshiftplay(&playinfobarstatus, &playinfobarcount); |
---|
157 | } |
---|
158 | else |
---|
159 | { |
---|
160 | if(status.timeshift == 1) |
---|
161 | playpic = 2; |
---|
162 | else |
---|
163 | playpic = 0; |
---|
164 | timeshiftpause(0); |
---|
165 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
166 | if(playpic == 0) { |
---|
167 | drawscreen(playinfobarpic, 0, 0); |
---|
168 | playpic = 1; |
---|
169 | } |
---|
170 | } |
---|
171 | |
---|
172 | continue; |
---|
173 | } |
---|
174 | if(status.timeshift == 1) |
---|
175 | { |
---|
176 | if(rcret == getrcconfigint("rcstop", NULL)) |
---|
177 | { |
---|
178 | if(playpic == 1) { |
---|
179 | clearscreen(playinfobarpic); |
---|
180 | playpic = 0; |
---|
181 | } |
---|
182 | timeshiftstop(0); |
---|
183 | continue; |
---|
184 | } |
---|
185 | if(rcret == getrcconfigint("rcplay", NULL)) |
---|
186 | { |
---|
187 | if(playpic == 1) { |
---|
188 | clearscreen(playinfobarpic); |
---|
189 | playpic = 0; |
---|
190 | } |
---|
191 | if(((checkbox("ATEMIO520") != 1 && checkbox("ATEMIO530") != 1) || ostrcmp(getconfig("remotecontrol", NULL), "1") == 1) && status.timeshifttype == 1) |
---|
192 | { |
---|
193 | if(status.playing == 0 || (status.playspeed == 0 && status.slowspeed == 0 && status.pause == 0)) |
---|
194 | { |
---|
195 | subtitlepause(1); |
---|
196 | status.infobar = 0; |
---|
197 | status.infobaraktiv = 0; |
---|
198 | clearscreen(infobar); |
---|
199 | screenplay(NULL, NULL, 1, 0); |
---|
200 | status.infobaraktiv = 1; |
---|
201 | status.updatevfd = START; |
---|
202 | drawscreen(skin, 0, 0); |
---|
203 | subtitlepause(0); |
---|
204 | continue; |
---|
205 | } |
---|
206 | } |
---|
207 | timeshiftplay(&playinfobarstatus, &playinfobarcount); |
---|
208 | continue; |
---|
209 | } |
---|
210 | if(status.timeshifttype == 1 && status.playing == 0) |
---|
211 | { |
---|
212 | if(rcret == getrcconfigint("rcff", NULL) || (getconfig("timeshiftnumkeys", NULL) == 0 && (rcret == getrcconfigint("rc3", NULL) || rcret == getrcconfigint("rc6", NULL) || rcret == getrcconfigint("rc9", NULL)))) |
---|
213 | { |
---|
214 | struct service* snode = getservice(RECORDTIMESHIFT, 0); |
---|
215 | if(snode != NULL) |
---|
216 | { |
---|
217 | status.playercan = 0x7FFF; |
---|
218 | playinfobarstatus = 1; |
---|
219 | playinfobarcount = 0; |
---|
220 | screenplayinfobar(snode->recname, NULL, 0, 1, 5); |
---|
221 | } |
---|
222 | continue; |
---|
223 | } |
---|
224 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
225 | { |
---|
226 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
227 | if(status.playing == 1) |
---|
228 | playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
229 | continue; |
---|
230 | } |
---|
231 | if(getconfig("timeshiftnumkeys", NULL) == 0) |
---|
232 | { |
---|
233 | if(rcret == getrcconfigint("rc1", NULL)) |
---|
234 | { |
---|
235 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
236 | if(status.playing == 1) |
---|
237 | playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
238 | continue; |
---|
239 | } |
---|
240 | if(rcret == getrcconfigint("rc4", NULL)) |
---|
241 | { |
---|
242 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
243 | if(status.playing == 1) |
---|
244 | playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
245 | continue; |
---|
246 | } |
---|
247 | if(rcret == getrcconfigint("rc7", NULL)) |
---|
248 | { |
---|
249 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
250 | if(status.playing == 1) |
---|
251 | playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
252 | continue; |
---|
253 | } |
---|
254 | } |
---|
255 | } |
---|
256 | if(status.playing == 1) |
---|
257 | { |
---|
258 | if(rcret == getrcconfigint("rcff", NULL)) |
---|
259 | { |
---|
260 | playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
261 | continue; |
---|
262 | } |
---|
263 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
264 | { |
---|
265 | playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
266 | continue; |
---|
267 | } |
---|
268 | if(rcret == getrcconfigint("rc3", NULL)) |
---|
269 | { |
---|
270 | playrcjumpf(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
271 | continue; |
---|
272 | } |
---|
273 | if(rcret == getrcconfigint("rc6", NULL)) |
---|
274 | { |
---|
275 | playrcjumpf(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
276 | continue; |
---|
277 | } |
---|
278 | if(rcret == getrcconfigint("rc9", NULL)) |
---|
279 | { |
---|
280 | playrcjumpf(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
281 | continue; |
---|
282 | } |
---|
283 | if(rcret == getrcconfigint("rc1", NULL)) |
---|
284 | { |
---|
285 | playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
286 | continue; |
---|
287 | } |
---|
288 | if(rcret == getrcconfigint("rc4", NULL)) |
---|
289 | { |
---|
290 | playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
291 | continue; |
---|
292 | } |
---|
293 | if(rcret == getrcconfigint("rc7", NULL)) |
---|
294 | { |
---|
295 | playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
296 | continue; |
---|
297 | } |
---|
298 | if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL)) |
---|
299 | { |
---|
300 | playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
301 | continue; |
---|
302 | } |
---|
303 | } |
---|
304 | } |
---|
305 | if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0) |
---|
306 | { |
---|
307 | subtitlepause(1); |
---|
308 | status.infobar = 0; |
---|
309 | clearscreen(infobar); |
---|
310 | screenrecordstop(); |
---|
311 | status.updatevfd = START; |
---|
312 | drawscreen(skin, 0, 0); |
---|
313 | subtitlepause(0); |
---|
314 | continue; |
---|
315 | } |
---|
316 | if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL) |
---|
317 | rcret = getrcconfigint("rctvradio", NULL); |
---|
318 | if(rcret == getrcconfigint("rcok", NULL) || rcret == getrcconfigint("rctvradio", NULL) || rcret == getrcconfigint("rcfav", NULL) || (status.crosscontrol == 0 && status.play == 0 && status.pause == 0 && (rcret == getrcconfigint("rcup", NULL) || rcret == getrcconfigint("rcdown", NULL) || rcret == getrcconfigint("rcleft", NULL) || rcret == getrcconfigint("rcright", NULL)))) |
---|
319 | { |
---|
320 | int tmpservicetype = status.servicetype; |
---|
321 | status.infobaraktiv = 0; |
---|
322 | subtitlepause(1); |
---|
323 | clearscreen(infobar); |
---|
324 | if(rcret == getrcconfigint("rctvradio", NULL)) |
---|
325 | { |
---|
326 | if(status.servicetype == 0) |
---|
327 | status.servicetype = 1; |
---|
328 | else |
---|
329 | status.servicetype = 0; |
---|
330 | } |
---|
331 | drawscreen(skin, 0, 0); |
---|
332 | if(rcret == getrcconfigint("rcfav", NULL)) |
---|
333 | ret = screenchannellist(NULL, NULL, 2); |
---|
334 | else |
---|
335 | ret = screenchannellist(NULL, NULL, 0); |
---|
336 | if(ret >= 20 || ret < 0) |
---|
337 | status.servicetype = tmpservicetype; |
---|
338 | drawscreen(skin, 0, 0); |
---|
339 | status.infobaraktiv = 1; |
---|
340 | status.infobar = 2; |
---|
341 | infobartimeout = 0; |
---|
342 | continue; |
---|
343 | } |
---|
344 | if(rcret == getrcconfigint("rcexit", NULL)) |
---|
345 | { |
---|
346 | if(status.timeshift == 1 && status.playing == 1) |
---|
347 | screenplayinfobar(NULL, NULL, 1, 1, 4); |
---|
348 | subtitlepause(1); |
---|
349 | status.infobar = 0; |
---|
350 | clearscreen(infobar); |
---|
351 | drawscreen(skin, 0, 0); |
---|
352 | subtitlepause(0); |
---|
353 | continue; |
---|
354 | } |
---|
355 | if(rcret == getrcconfigint("rctext", NULL)) |
---|
356 | { |
---|
357 | if(status.aktservice->channel != NULL && status.aktservice->channel->txtpid > 0) |
---|
358 | { |
---|
359 | subtitlepause(1); |
---|
360 | status.infobar = 0; |
---|
361 | status.sec = 0; |
---|
362 | clearscreen(infobar); |
---|
363 | tmpstr = ostrcat(getconfig("tuxtxtfile", NULL), " ", 0, 0); |
---|
364 | tmpnr = oitoa(status.aktservice->channel->txtpid); |
---|
365 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
366 | |
---|
367 | if(status.aktservice->fedev != NULL) |
---|
368 | { |
---|
369 | tmpnr = oitoa(status.aktservice->fedev->devnr); |
---|
370 | tmpstr = ostrcat(tmpstr, " ", 1, 0); |
---|
371 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
372 | } |
---|
373 | |
---|
374 | drawscreen(skin, 0, 0); |
---|
375 | status.tuxtxt = 1; |
---|
376 | system(tmpstr); |
---|
377 | status.tuxtxt = 0; |
---|
378 | free(tmpstr); tmpstr = NULL; tmpnr = NULL; |
---|
379 | drawscreen(skin, 0, 0); |
---|
380 | subtitlepause(0); |
---|
381 | } |
---|
382 | continue; |
---|
383 | } |
---|
384 | if(rcret == getrcconfigint("rcrecord", NULL)) |
---|
385 | { |
---|
386 | subtitlepause(1); |
---|
387 | status.infobar = 0; |
---|
388 | clearscreen(infobar); |
---|
389 | screenrecorddirect(); |
---|
390 | status.updatevfd = START; |
---|
391 | drawscreen(skin, 0, 0); |
---|
392 | subtitlepause(0); |
---|
393 | continue; |
---|
394 | } |
---|
395 | if((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL)) |
---|
396 | { |
---|
397 | subtitlepause(1); |
---|
398 | status.infobar = 0; |
---|
399 | status.infobaraktiv = 0; |
---|
400 | clearscreen(infobar); |
---|
401 | screenplay(NULL, NULL, 1, 0); |
---|
402 | status.infobaraktiv = 1; |
---|
403 | status.updatevfd = START; |
---|
404 | drawscreen(skin, 0, 0); |
---|
405 | subtitlepause(0); |
---|
406 | continue; |
---|
407 | } |
---|
408 | if(rcret == getrcconfigint("rcshoot", NULL)) |
---|
409 | { |
---|
410 | subtitlepause(1); |
---|
411 | status.infobar = 0; |
---|
412 | status.infobaraktiv = 0; |
---|
413 | clearscreen(infobar); |
---|
414 | screenshoot(0); |
---|
415 | status.infobaraktiv = 1; |
---|
416 | status.updatevfd = START; |
---|
417 | drawscreen(skin, 0, 0); |
---|
418 | subtitlepause(0); |
---|
419 | continue; |
---|
420 | } |
---|
421 | |
---|
422 | if(rcret == getrcconfigint("rcplugin", NULL)) |
---|
423 | { |
---|
424 | subtitlepause(1); |
---|
425 | status.infobar = 0; |
---|
426 | status.infobaraktiv = 0; |
---|
427 | clearscreen(infobar); |
---|
428 | screenkeyactions(2, 0); |
---|
429 | status.infobaraktiv = 1; |
---|
430 | status.updatevfd = START; |
---|
431 | drawscreen(skin, 0, 0); |
---|
432 | subtitlepause(0); |
---|
433 | continue; |
---|
434 | } |
---|
435 | if(rcret == getrcconfigint("rcred", NULL)) |
---|
436 | { |
---|
437 | subtitlepause(1); |
---|
438 | status.infobar = 0; |
---|
439 | status.infobaraktiv = 0; |
---|
440 | clearscreen(infobar); |
---|
441 | screenkeyactions(1, 0); |
---|
442 | status.infobaraktiv = 1; |
---|
443 | status.updatevfd = START; |
---|
444 | drawscreen(skin, 0, 0); |
---|
445 | subtitlepause(0); |
---|
446 | continue; |
---|
447 | } |
---|
448 | if(rcret == getrcconfigint("rcgreen", NULL)) |
---|
449 | { |
---|
450 | subtitlepause(1); |
---|
451 | status.infobar = 0; |
---|
452 | clearscreen(infobar); |
---|
453 | screenvideomode(0); |
---|
454 | drawscreen(skin, 0, 0); |
---|
455 | subtitlepause(0); |
---|
456 | continue; |
---|
457 | } |
---|
458 | if(rcret == getrcconfigint("rcsubchannel", NULL)) |
---|
459 | { |
---|
460 | subtitlepause(1); |
---|
461 | status.infobar = 0; |
---|
462 | clearscreen(infobar); |
---|
463 | screenlinkedchannel(); |
---|
464 | drawscreen(skin, 0, 0); |
---|
465 | subtitlepause(0); |
---|
466 | continue; |
---|
467 | } |
---|
468 | if(rcret == getrcconfigint("rcsleep", NULL)) |
---|
469 | { |
---|
470 | subtitlepause(1); |
---|
471 | status.infobar = 0; |
---|
472 | clearscreen(infobar); |
---|
473 | screenpowerofftimer(); |
---|
474 | drawscreen(skin, 0, 0); |
---|
475 | subtitlepause(0); |
---|
476 | continue; |
---|
477 | } |
---|
478 | if(rcret == getrcconfigint("rcsubtitel", NULL)) |
---|
479 | { |
---|
480 | subtitlepause(1); |
---|
481 | status.infobar = 0; |
---|
482 | clearscreen(infobar); |
---|
483 | screensubtitle(); |
---|
484 | drawscreen(skin, 0, 0); |
---|
485 | subtitlepause(0); |
---|
486 | continue; |
---|
487 | } |
---|
488 | if(rcret == getrcconfigint("rcyellow", NULL)) |
---|
489 | { |
---|
490 | subtitlepause(1); |
---|
491 | status.infobar = 0; |
---|
492 | clearscreen(infobar); |
---|
493 | screenaudiotrack(); |
---|
494 | drawscreen(skin, 0, 0); |
---|
495 | subtitlepause(0); |
---|
496 | continue; |
---|
497 | } |
---|
498 | if(rcret == getrcconfigint("rcblue", NULL)) |
---|
499 | { |
---|
500 | subtitlepause(1); |
---|
501 | status.infobar = 0; |
---|
502 | clearscreen(infobar); |
---|
503 | screenkeyactions(0, 0); |
---|
504 | status.updatevfd = START; |
---|
505 | drawscreen(skin, 0, 0); |
---|
506 | subtitlepause(0); |
---|
507 | continue; |
---|
508 | } |
---|
509 | if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL) |
---|
510 | { |
---|
511 | subtitlepause(1); |
---|
512 | status.infobar = 0; |
---|
513 | clearscreen(infobar); |
---|
514 | |
---|
515 | pluginnode = getplugin("hbbtv Browser"); |
---|
516 | if(pluginnode != NULL) |
---|
517 | { |
---|
518 | startplugin = dlsym(pluginnode->pluginhandle, "starturl"); |
---|
519 | if(startplugin != NULL) |
---|
520 | startplugin(); |
---|
521 | } |
---|
522 | |
---|
523 | status.updatevfd = START; |
---|
524 | drawscreen(skin, 0, 0); |
---|
525 | subtitlepause(0); |
---|
526 | continue; |
---|
527 | } |
---|
528 | if(rcret == getrcconfigint("rcmedia", NULL)) |
---|
529 | { |
---|
530 | struct skin* pluginnode = getplugin("Media Center"); |
---|
531 | void (*startplugin)(void); |
---|
532 | status.infobaraktiv = 0; |
---|
533 | subtitlepause(1); |
---|
534 | status.infobar = 0; |
---|
535 | clearscreen(infobar); |
---|
536 | if(pluginnode != NULL) |
---|
537 | { |
---|
538 | startplugin = dlsym(pluginnode->pluginhandle, "start"); |
---|
539 | if(startplugin != NULL) |
---|
540 | startplugin(); |
---|
541 | } |
---|
542 | status.infobaraktiv = 1; |
---|
543 | drawscreen(skin, 0, 0); |
---|
544 | subtitlepause(0); |
---|
545 | continue; |
---|
546 | } |
---|
547 | if(rcret == getrcconfigint("rcmenu", NULL)) |
---|
548 | { |
---|
549 | subtitlepause(1); |
---|
550 | status.infobar = 0; |
---|
551 | status.infobaraktiv = 0; |
---|
552 | clearscreen(infobar); |
---|
553 | menu(getscreen("mainmenu"), 1); |
---|
554 | status.menurelease = 0; |
---|
555 | status.updatevfd = START; |
---|
556 | status.infobaraktiv = 1; |
---|
557 | drawscreen(skin, 0, 0); |
---|
558 | subtitlepause(0); |
---|
559 | continue; |
---|
560 | } |
---|
561 | if(rcret == getrcconfigint("rcepg", NULL)) |
---|
562 | { |
---|
563 | subtitlepause(1); |
---|
564 | status.infobar = 0; |
---|
565 | status.infobaraktiv = 0; |
---|
566 | clearscreen(infobar); |
---|
567 | epgchoice(NULL); |
---|
568 | drawscreen(skin, 0, 0); |
---|
569 | status.infobaraktiv = 1; |
---|
570 | subtitlepause(0); |
---|
571 | continue; |
---|
572 | } |
---|
573 | if(rcret == getrcconfigint("rcresolution", NULL)) |
---|
574 | { |
---|
575 | subtitlepause(1); |
---|
576 | status.infobar = 0; |
---|
577 | clearscreen(infobar); |
---|
578 | switchvideomode(); |
---|
579 | drawscreen(skin, 0, 0); |
---|
580 | subtitlepause(0); |
---|
581 | continue; |
---|
582 | } |
---|
583 | if(rcret == getrcconfigint("rcinfo", NULL)) |
---|
584 | { |
---|
585 | if(status.infobar == 1) |
---|
586 | { |
---|
587 | if(getconfigint("secondinfobar", NULL) == 2) |
---|
588 | { |
---|
589 | clearscreen(infobar); |
---|
590 | epgchoice(NULL); |
---|
591 | status.infobar = 0; |
---|
592 | drawscreen(skin, 0, 0); |
---|
593 | subtitlepause(0); |
---|
594 | } |
---|
595 | else if(getconfigint("secondinfobar", NULL) == 3) |
---|
596 | { |
---|
597 | clearscreen(infobar); |
---|
598 | screenepg(NULL, NULL, 0); |
---|
599 | status.infobar = 0; |
---|
600 | drawscreen(skin, 0, 0); |
---|
601 | subtitlepause(0); |
---|
602 | } |
---|
603 | else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2) |
---|
604 | { |
---|
605 | status.infobar = 0; |
---|
606 | drawscreen(skin, 0, 0); |
---|
607 | subtitlepause(0); |
---|
608 | } |
---|
609 | else |
---|
610 | { |
---|
611 | infobar = infobar2; |
---|
612 | drawscreen(infobar, 0, 0); |
---|
613 | } |
---|
614 | } |
---|
615 | else |
---|
616 | { |
---|
617 | subtitlepause(1); |
---|
618 | status.infobar = 1; |
---|
619 | infobar = infobar1; |
---|
620 | drawscreen(infobar, 0, 4); |
---|
621 | } |
---|
622 | continue; |
---|
623 | } |
---|
624 | if(rcret == getrcconfigint("rcpower", NULL)) |
---|
625 | { |
---|
626 | subtitlepause(1); |
---|
627 | status.infobar = 0; |
---|
628 | status.infobaraktiv = 0; |
---|
629 | clearscreen(infobar); |
---|
630 | drawscreen(skin, 0, 0); |
---|
631 | switch(getconfigint("poweraktion", NULL)) |
---|
632 | { |
---|
633 | case 1: //power off |
---|
634 | oshutdown(1, 1); |
---|
635 | break; |
---|
636 | case 2: //standby |
---|
637 | status.standby = 1; |
---|
638 | break; |
---|
639 | case 3: //restart |
---|
640 | oshutdown(2, 1); |
---|
641 | break; |
---|
642 | case 4: //Gui restart |
---|
643 | oshutdown(3, 1); |
---|
644 | break; |
---|
645 | default: |
---|
646 | standbymenu = getscreen("standbymenu"); |
---|
647 | menu(standbymenu, 1); |
---|
648 | break; |
---|
649 | } |
---|
650 | status.updatevfd = START; |
---|
651 | drawscreen(skin, 0, 0); |
---|
652 | status.infobaraktiv = 1; |
---|
653 | subtitlepause(0); |
---|
654 | continue; |
---|
655 | } |
---|
656 | if(rcret == getrcconfigint("rcrecall", NULL)) |
---|
657 | { |
---|
658 | subtitlepause(1); |
---|
659 | clearscreen(infobar); |
---|
660 | drawscreen(skin, 0, 0); |
---|
661 | screenchannelhistory(); |
---|
662 | infobartimeout = 0; |
---|
663 | infobar = infobar1; |
---|
664 | if(status.infobar == 0) |
---|
665 | drawscreen(infobar, 0, 4); |
---|
666 | else |
---|
667 | drawscreen(infobar, 0, 0); |
---|
668 | status.infobar = 1; |
---|
669 | continue; |
---|
670 | } |
---|
671 | if(rcret == getrcconfigint("rc0", NULL)) |
---|
672 | { |
---|
673 | subtitlepause(1); |
---|
674 | clearscreen(infobar); |
---|
675 | drawscreen(skin, 0, 0); |
---|
676 | if(status.lastservice->channel != NULL) |
---|
677 | { |
---|
678 | tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0); |
---|
679 | servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0); |
---|
680 | free(tmpstr); tmpstr = NULL; |
---|
681 | } |
---|
682 | infobartimeout = 0; |
---|
683 | infobar = infobar1; |
---|
684 | if(status.infobar == 0) |
---|
685 | drawscreen(infobar, 0, 4); |
---|
686 | else |
---|
687 | drawscreen(infobar, 0, 0); |
---|
688 | status.infobar = 1; |
---|
689 | continue; |
---|
690 | } |
---|
691 | if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL))) |
---|
692 | { |
---|
693 | subtitlepause(1); |
---|
694 | if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL)) |
---|
695 | { |
---|
696 | status.virtualzap = status.crosscontrol - 1; |
---|
697 | zapup(); |
---|
698 | status.virtualzap = 0; |
---|
699 | } |
---|
700 | else |
---|
701 | zapup(); |
---|
702 | clearscreen(infobar); |
---|
703 | drawscreen(skin, 0, 0); |
---|
704 | infobartimeout = 0; |
---|
705 | status.infobar = 2; |
---|
706 | continue; |
---|
707 | } |
---|
708 | if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL))) |
---|
709 | { |
---|
710 | subtitlepause(1); |
---|
711 | if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL)) |
---|
712 | { |
---|
713 | status.virtualzap = status.crosscontrol - 1; |
---|
714 | zapdown(); |
---|
715 | status.virtualzap = 0; |
---|
716 | } |
---|
717 | else |
---|
718 | zapdown(); |
---|
719 | clearscreen(infobar); |
---|
720 | drawscreen(skin, 0, 0); |
---|
721 | infobartimeout = 0; |
---|
722 | status.infobar = 2; |
---|
723 | continue; |
---|
724 | } |
---|
725 | if(rcret == rcnumber(rcret)) |
---|
726 | { |
---|
727 | subtitlepause(1); |
---|
728 | clearscreen(infobar); |
---|
729 | screenchannelbynr(rcret); |
---|
730 | status.infobar = 2; |
---|
731 | continue; |
---|
732 | } |
---|
733 | //show infobar on program switch (only tv) |
---|
734 | if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0) |
---|
735 | { |
---|
736 | time_t akttime = time(NULL); |
---|
737 | //show infobar only all 60 sec |
---|
738 | if(lasttime < akttime) |
---|
739 | { |
---|
740 | struct epg* tmpepg = getepgakt(status.aktservice->channel); |
---|
741 | if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime) |
---|
742 | { |
---|
743 | lasttime = akttime + 10; |
---|
744 | infobartimeout = 0; |
---|
745 | subtitlepause(1); |
---|
746 | status.infobar = 1; |
---|
747 | infobar = infobar1; |
---|
748 | drawscreen(infobar, 0, 4); |
---|
749 | continue; |
---|
750 | } |
---|
751 | } |
---|
752 | } |
---|
753 | /* |
---|
754 | if(rcret == getrcconfigint("rcpip", NULL)) |
---|
755 | { |
---|
756 | struct channel* tmp = getchannel(12003, 66625); //for test RTL Television |
---|
757 | pipstart(tmp, NULL, 0); |
---|
758 | } |
---|
759 | */ |
---|
760 | if(rcret == RCTIMEOUT && mark == 0) |
---|
761 | { |
---|
762 | if(getconfigint("infobartimeout", NULL) > infobartimeout) |
---|
763 | { |
---|
764 | //clearscreen(infobar); |
---|
765 | drawscreen(infobar, 0, 0); |
---|
766 | } |
---|
767 | else |
---|
768 | { |
---|
769 | clearscreen(infobar); |
---|
770 | status.infobar = 0; |
---|
771 | drawscreen(skin, 0, 0); |
---|
772 | subtitlepause(0); |
---|
773 | } |
---|
774 | } |
---|
775 | } |
---|
776 | } |
---|
777 | |
---|
778 | #endif |
---|