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