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