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 channel* pipchannel = NULL; |
---|
8 | struct skin* playinfobarpic = getscreen("playinfobarpic"); |
---|
9 | |
---|
10 | char* infobar_sel = getskinconfig("infobar_selection", NULL); |
---|
11 | char* infobar2_sel = getskinconfig("infobar2_selection", NULL); |
---|
12 | debug(10, "get initial infobar1=%s", infobar_sel); |
---|
13 | debug(10, "get initial infobar2=%s", infobar2_sel); |
---|
14 | |
---|
15 | if(infobar_sel == NULL) { |
---|
16 | infobar_sel = ostrcat(infobar_sel, "infobar", 1, 0); // fallback to default |
---|
17 | debug(10, "fallback to default, set infobar1=%s", infobar_sel); |
---|
18 | } |
---|
19 | |
---|
20 | if(infobar2_sel == NULL) { |
---|
21 | infobar2_sel = ostrcat(infobar2_sel, "infobar2", 1, 0); // fallback to default |
---|
22 | debug(10, "fallback to default, set infobar2=%s", infobar2_sel); |
---|
23 | } |
---|
24 | |
---|
25 | struct skin* infobar1 = getscreen(infobar_sel); |
---|
26 | debug(10, "final infobar1=%s", infobar_sel); |
---|
27 | struct skin* infobar2 = getscreen(infobar2_sel); |
---|
28 | debug(10, "final infobar2=%s", infobar2_sel); |
---|
29 | struct skin* infobar = infobar1; |
---|
30 | struct skin* infobarm = infobar1; |
---|
31 | |
---|
32 | // dynamic default skin infobar start |
---|
33 | struct skin* infobar1_bottombar = getscreennode(infobar1, "bottombar"); |
---|
34 | status.getepgaktstart = 0; |
---|
35 | status.getepgaktend = 0; |
---|
36 | status.getepgakttitle = 0; |
---|
37 | status.getepgakttimeremaining = 0; |
---|
38 | status.getepgnextstart = 0; |
---|
39 | status.getepgnextend = 0; |
---|
40 | status.getepgnexttitle = 0; |
---|
41 | status.getepgnexttimeremaining = 0; |
---|
42 | |
---|
43 | if(status.fontsizeadjust > 0) |
---|
44 | { |
---|
45 | infobar1->height += (status.fontsizeadjust * 2); |
---|
46 | infobar1->posy -= (status.fontsizeadjust * 2); |
---|
47 | infobar1_bottombar->posy += (status.fontsizeadjust * 2); |
---|
48 | |
---|
49 | // infobar2->height += (status.fontsizeadjust * 2); |
---|
50 | // infobar2->posy -= (status.fontsizeadjust * 4); |
---|
51 | infobar2->posy -= (status.fontsizeadjust * 2); |
---|
52 | } |
---|
53 | // dynamic default skin infobar end |
---|
54 | |
---|
55 | struct skin* standbymenu = NULL; |
---|
56 | char* tmpstr = NULL; char* tmpnr = NULL; |
---|
57 | struct skin* pluginnode = NULL; |
---|
58 | void (*startplugin)(void); |
---|
59 | time_t lasttime = 0; |
---|
60 | int mark = 0; |
---|
61 | int playstop = 1; |
---|
62 | |
---|
63 | status.mute = 0; |
---|
64 | status.infobar = 2; |
---|
65 | |
---|
66 | addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); |
---|
67 | addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); |
---|
68 | addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL); |
---|
69 | |
---|
70 | status.infobaraktiv = 1; |
---|
71 | status.mcaktiv = 0; |
---|
72 | |
---|
73 | int playinfobarcount = 0, playinfobarstatus = 0; |
---|
74 | |
---|
75 | if(file_exist("/etc/.mipsel") || ((checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1 || checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 1 || checkbox("DM900") == 1 || checkbox("DM920") == 1 || checkbox("DM520") == 1 || checkbox("DM525") == 1) && ostrcmp(getconfig("remotecontrol", NULL), "1") != 1)) |
---|
76 | playstop = 0; |
---|
77 | else |
---|
78 | playstop = 1; |
---|
79 | |
---|
80 | while(1) |
---|
81 | { |
---|
82 | mark = 0; |
---|
83 | |
---|
84 | if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL)) |
---|
85 | writerc(getrcconfigint("rcvolup", NULL)); |
---|
86 | if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL)) |
---|
87 | writerc(getrcconfigint("rcvoldown", NULL)); |
---|
88 | |
---|
89 | //check if mediadb can freed |
---|
90 | if(status.mediadbthread == NULL) |
---|
91 | { |
---|
92 | if(status.writemediadb == 1) |
---|
93 | writemediadb(getconfig("mediadbfile", NULL), NULL); |
---|
94 | freemediadb(0); |
---|
95 | } |
---|
96 | //check if picmem times out and must freed |
---|
97 | if(time(NULL) > status.picmemtimeout + 60) |
---|
98 | { |
---|
99 | checkpictimeout(); |
---|
100 | status.picmemtimeout = time(NULL); |
---|
101 | } |
---|
102 | |
---|
103 | if(status.standby == 1) |
---|
104 | screenstandby(); |
---|
105 | if(status.infobar == 1 ) |
---|
106 | { |
---|
107 | rcret = waitrc(infobar, 1000, 0); |
---|
108 | infobartimeout++; |
---|
109 | } |
---|
110 | else if(status.infobar == 0 && status.timeshift == 1) |
---|
111 | { |
---|
112 | rcret = waitrc(infobar, 1000, 0); |
---|
113 | if(rcret == RCTIMEOUT) |
---|
114 | { |
---|
115 | if(status.playpic == 1) |
---|
116 | { |
---|
117 | clearscreen(playinfobarpic); |
---|
118 | drawscreen(playinfobarpic, 0, 0); |
---|
119 | } |
---|
120 | else |
---|
121 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
122 | continue; |
---|
123 | } |
---|
124 | } |
---|
125 | else if(status.infobar == 2) |
---|
126 | { |
---|
127 | if(getconfigint("infobarsleep", NULL) > 0) |
---|
128 | rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0); |
---|
129 | else if(first == 1) //only on first start wait a little for epg |
---|
130 | { |
---|
131 | first = 0; |
---|
132 | rcret = waitrc(infobar, 1000, 0); |
---|
133 | } |
---|
134 | else |
---|
135 | rcret = RCTIMEOUT; |
---|
136 | |
---|
137 | if(rcret == RCTIMEOUT) |
---|
138 | { |
---|
139 | status.infobar = 1; |
---|
140 | infobar = infobar1; |
---|
141 | drawscreen(infobar, 0, 4); |
---|
142 | continue; |
---|
143 | } |
---|
144 | else |
---|
145 | status.infobar = 0; |
---|
146 | } |
---|
147 | else |
---|
148 | { |
---|
149 | int screensaver_delay = getconfigint("screensaver_delay", NULL); |
---|
150 | rcret = 0; count = 0; rcwait = 1000; |
---|
151 | if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1) |
---|
152 | { |
---|
153 | initscreensaver(); |
---|
154 | if(screensaver != NULL) screensaver->flag = 1; |
---|
155 | } |
---|
156 | if(screensaver == NULL) |
---|
157 | { |
---|
158 | if(status.infobarprogram == 1) rcwait = 2000; |
---|
159 | else rcwait = 0; |
---|
160 | } |
---|
161 | while(rcret == 0 || rcret == RCTIMEOUT) |
---|
162 | { |
---|
163 | rcret = waitrc(infobar, rcwait, 0); |
---|
164 | count++; |
---|
165 | if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT)) |
---|
166 | { |
---|
167 | infobartimeout = 99999; |
---|
168 | mark = 1; |
---|
169 | break; |
---|
170 | } |
---|
171 | if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay) |
---|
172 | { |
---|
173 | if(status.aktservice->channel != NULL) |
---|
174 | screensaver->value = ostrcat(status.aktservice->channel->name, NULL, 0, 0); |
---|
175 | else |
---|
176 | screensaver->value = ostrcat("Radio", NULL, 0, 0); |
---|
177 | showscreensaver(); |
---|
178 | free(screensaver->value); |
---|
179 | rcwait = screensaver->speed; |
---|
180 | } |
---|
181 | } |
---|
182 | if(screensaver != NULL) screensaver->flag = 0; |
---|
183 | deinitscreensaver(); |
---|
184 | if(mark == 0) |
---|
185 | { |
---|
186 | drawscreen(skin, 0, 0); |
---|
187 | infobartimeout = 0; |
---|
188 | } |
---|
189 | } |
---|
190 | |
---|
191 | if(status.pipservice->videodev != NULL) |
---|
192 | { |
---|
193 | if(rcret == getrcconfigint("rcpip", NULL)) |
---|
194 | { |
---|
195 | if(getconfigint("pip_screen", NULL) == 1) |
---|
196 | { |
---|
197 | pipstop(status.pipservice, 0); |
---|
198 | continue; |
---|
199 | } |
---|
200 | else |
---|
201 | { |
---|
202 | pipmenu(); |
---|
203 | drawscreen(skin, 0, 0); |
---|
204 | clearscreen(infobar); |
---|
205 | continue; |
---|
206 | } |
---|
207 | } |
---|
208 | if(rcret == getrcconfigint("rc0", NULL)) |
---|
209 | { |
---|
210 | if(getconfigint("pip_swap", NULL) == 1) |
---|
211 | { |
---|
212 | pipswap(status.pipservice); |
---|
213 | continue; |
---|
214 | } |
---|
215 | } |
---|
216 | if(rcret == getrcconfigint("rcpiprec", NULL)) |
---|
217 | { |
---|
218 | pipstop(status.pipservice, 0); |
---|
219 | continue; |
---|
220 | } |
---|
221 | } |
---|
222 | //Plugin von aussen aufrufen |
---|
223 | //if(rcret == RCTIMEOUT && status.extplugin != NULL) |
---|
224 | if(status.extplugin != NULL) |
---|
225 | { |
---|
226 | subtitlepause(1); |
---|
227 | status.infobar = 0; |
---|
228 | clearscreen(infobar); |
---|
229 | |
---|
230 | pluginnode = getplugin(status.extplugin); |
---|
231 | free(status.extplugin); status.extplugin = NULL; |
---|
232 | if(pluginnode != NULL) |
---|
233 | { |
---|
234 | startplugin = dlsym(pluginnode->pluginhandle, "start"); |
---|
235 | if(startplugin != NULL) |
---|
236 | startplugin(); |
---|
237 | } |
---|
238 | status.updatevfd = START; |
---|
239 | drawscreen(skin, 0, 0); |
---|
240 | subtitlepause(0); |
---|
241 | continue; |
---|
242 | } |
---|
243 | |
---|
244 | |
---|
245 | if(status.pvr == 1 && (rcret == getrcconfigint("rcpause", NULL) || ((checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 1 || checkbox("DM900") == 1 || checkbox("DM920") == 1 || checkbox("DM520") == 1 || checkbox("DM525") == 1 || 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))) |
---|
246 | { |
---|
247 | // currently works only 1 rec or timeshift |
---|
248 | // if(checkbox("VUSOLO2") == 1 && status.recording > 0) |
---|
249 | // continue; |
---|
250 | |
---|
251 | //timeshift |
---|
252 | if(status.playpic == 1) |
---|
253 | { |
---|
254 | clearscreen(playinfobarpic); |
---|
255 | status.playpic = 0; |
---|
256 | } |
---|
257 | if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0)) |
---|
258 | { |
---|
259 | if(status.timeshifttype == 1 && status.timeshiftpos == 0) |
---|
260 | { |
---|
261 | timeshiftpause(0); |
---|
262 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
263 | if(status.playpic == 0) |
---|
264 | { |
---|
265 | drawscreen(playinfobarpic, 0, 0); |
---|
266 | status.playpic = 1; |
---|
267 | } |
---|
268 | } |
---|
269 | else |
---|
270 | timeshiftplay(&playinfobarstatus, &playinfobarcount); |
---|
271 | } |
---|
272 | else |
---|
273 | { |
---|
274 | if(status.timeshift == 1) |
---|
275 | status.playpic = 2; |
---|
276 | else |
---|
277 | status.playpic = 0; |
---|
278 | |
---|
279 | timeshiftpause(0); |
---|
280 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
281 | if(status.playpic == 0) |
---|
282 | { |
---|
283 | drawscreen(playinfobarpic, 0, 0); |
---|
284 | status.playpic = 1; |
---|
285 | } |
---|
286 | } |
---|
287 | |
---|
288 | continue; |
---|
289 | } |
---|
290 | if(status.timeshift == 1) |
---|
291 | { |
---|
292 | if(rcret == getrcconfigint("rcstop", NULL)) |
---|
293 | { |
---|
294 | if(status.playpic == 1) |
---|
295 | { |
---|
296 | clearscreen(playinfobarpic); |
---|
297 | status.playpic = 0; |
---|
298 | } |
---|
299 | timeshiftstop(0); |
---|
300 | continue; |
---|
301 | } |
---|
302 | if(rcret == getrcconfigint("rcplay", NULL)) |
---|
303 | { |
---|
304 | if(status.playpic == 1) |
---|
305 | { |
---|
306 | clearscreen(playinfobarpic); |
---|
307 | status.playpic = 0; |
---|
308 | } |
---|
309 | if(playstop == 1 && status.timeshifttype == 1) |
---|
310 | { |
---|
311 | if(status.playing == 0 || (status.playspeed == 0 && status.slowspeed == 0 && status.pause == 0)) |
---|
312 | { |
---|
313 | subtitlepause(1); |
---|
314 | status.infobar = 0; |
---|
315 | status.infobaraktiv = 0; |
---|
316 | clearscreen(infobar); |
---|
317 | screenplay(NULL, NULL, 1, 0); |
---|
318 | status.infobaraktiv = 1; |
---|
319 | status.updatevfd = START; |
---|
320 | drawscreen(skin, 0, 0); |
---|
321 | subtitlepause(0); |
---|
322 | continue; |
---|
323 | } |
---|
324 | } |
---|
325 | timeshiftplay(&playinfobarstatus, &playinfobarcount); |
---|
326 | continue; |
---|
327 | } |
---|
328 | if(status.timeshifttype == 1 && status.playing == 0) |
---|
329 | { |
---|
330 | if(rcret == getrcconfigint("rcff", NULL) || (getconfig("timeshiftnumkeys", NULL) == 0 && (rcret == getrcconfigint("rc3", NULL) || rcret == getrcconfigint("rc6", NULL) || rcret == getrcconfigint("rc9", NULL) || rcret == getrcconfigint("rcright", NULL) || rcret == getrcconfigint("rcup", NULL) || rcret == getrcconfigint("rc2", NULL)))) |
---|
331 | { |
---|
332 | struct service* snode = getservice(RECORDTIMESHIFT, 0); |
---|
333 | if(snode != NULL) |
---|
334 | { |
---|
335 | status.playercan = 0x7FFF; |
---|
336 | playinfobarstatus = 1; |
---|
337 | playinfobarcount = 0; |
---|
338 | screenplayinfobar(snode->recname, NULL, 0, 1, 5); |
---|
339 | } |
---|
340 | continue; |
---|
341 | } |
---|
342 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
343 | { |
---|
344 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
345 | if(status.playing == 1) |
---|
346 | playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
347 | continue; |
---|
348 | } |
---|
349 | if(getconfig("timeshiftnumkeys", NULL) == 0) |
---|
350 | { |
---|
351 | if(rcret == getrcconfigint("rcleft", NULL)) |
---|
352 | { |
---|
353 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
354 | if(status.playing == 1) |
---|
355 | playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
356 | continue; |
---|
357 | } |
---|
358 | if(rcret == getrcconfigint("rcdown", NULL)) |
---|
359 | { |
---|
360 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
361 | if(status.playing == 1) |
---|
362 | playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
363 | continue; |
---|
364 | } |
---|
365 | if(rcret == getrcconfigint("rc1", NULL)) |
---|
366 | { |
---|
367 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
368 | if(status.playing == 1) |
---|
369 | playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
370 | continue; |
---|
371 | } |
---|
372 | if(rcret == getrcconfigint("rc4", NULL)) |
---|
373 | { |
---|
374 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
375 | if(status.playing == 1) |
---|
376 | playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
377 | continue; |
---|
378 | } |
---|
379 | if(rcret == getrcconfigint("rc7", NULL)) |
---|
380 | { |
---|
381 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
382 | if(status.playing == 1) |
---|
383 | playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
384 | continue; |
---|
385 | } |
---|
386 | } |
---|
387 | } |
---|
388 | if(status.playing == 1) |
---|
389 | { |
---|
390 | if(rcret == getrcconfigint("rcff", NULL)) |
---|
391 | { |
---|
392 | playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
393 | continue; |
---|
394 | } |
---|
395 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
396 | { |
---|
397 | playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
398 | continue; |
---|
399 | } |
---|
400 | if(rcret == getrcconfigint("rc3", NULL)) |
---|
401 | { |
---|
402 | playrcjumpf(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
403 | continue; |
---|
404 | } |
---|
405 | if(rcret == getrcconfigint("rc6", NULL)) |
---|
406 | { |
---|
407 | playrcjumpf(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
408 | continue; |
---|
409 | } |
---|
410 | if(rcret == getrcconfigint("rc9", NULL)) |
---|
411 | { |
---|
412 | playrcjumpf(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
413 | continue; |
---|
414 | } |
---|
415 | if(rcret == getrcconfigint("rcdown", NULL)) |
---|
416 | { |
---|
417 | playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
418 | continue; |
---|
419 | } |
---|
420 | if(rcret == getrcconfigint("rcup", NULL)) |
---|
421 | { |
---|
422 | playrcjumpf(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
423 | #ifdef MIPSEL |
---|
424 | // workaround fixes image flicker when jumping over the border also |
---|
425 | playrcjumpr(status.playfile, NULL, 10, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
426 | #endif |
---|
427 | continue; |
---|
428 | } |
---|
429 | if(rcret == getrcconfigint("rcleft", NULL)) |
---|
430 | { |
---|
431 | playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
432 | continue; |
---|
433 | } |
---|
434 | if(rcret == getrcconfigint("rcright", NULL)) |
---|
435 | { |
---|
436 | playrcjumpf(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
437 | #ifdef MIPSEL |
---|
438 | // workaround fixes image flicker when jumping over the border also |
---|
439 | playrcjumpr(status.playfile, NULL, 10, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
440 | #endif |
---|
441 | continue; |
---|
442 | } |
---|
443 | if(rcret == getrcconfigint("rc1", NULL)) |
---|
444 | { |
---|
445 | playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
446 | continue; |
---|
447 | } |
---|
448 | if(rcret == getrcconfigint("rc4", NULL)) |
---|
449 | { |
---|
450 | playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
451 | continue; |
---|
452 | } |
---|
453 | if(rcret == getrcconfigint("rc7", NULL)) |
---|
454 | { |
---|
455 | playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
456 | continue; |
---|
457 | } |
---|
458 | if(rcret == getrcconfigint("rc2", NULL)) |
---|
459 | { |
---|
460 | playrcjumpto(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
461 | continue; |
---|
462 | } |
---|
463 | if(rcret == getrcconfigint("rc0", NULL)) |
---|
464 | { |
---|
465 | setmarker(); |
---|
466 | continue; |
---|
467 | } |
---|
468 | if(rcret == getrcconfigint("rc5", NULL)) |
---|
469 | { |
---|
470 | screenmarker(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
471 | continue; |
---|
472 | } |
---|
473 | if(rcret == getrcconfigint("rc8", NULL)) |
---|
474 | { |
---|
475 | continue; |
---|
476 | } |
---|
477 | if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL)) |
---|
478 | { |
---|
479 | playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
480 | continue; |
---|
481 | } |
---|
482 | } |
---|
483 | } |
---|
484 | if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0) |
---|
485 | { |
---|
486 | subtitlepause(1); |
---|
487 | status.infobar = 0; |
---|
488 | clearscreen(infobar); |
---|
489 | screenrecordstop(); |
---|
490 | status.updatevfd = START; |
---|
491 | drawscreen(skin, 0, 0); |
---|
492 | subtitlepause(0); |
---|
493 | continue; |
---|
494 | } |
---|
495 | if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL) |
---|
496 | { |
---|
497 | if(checkbox("DM7020HD") == 0 && checkbox("DM7020HDV2") == 0 && checkbox("DM900") == 0 && checkbox("DM920") == 0 && checkbox("DM520") == 0 && checkbox("DM525") == 0) |
---|
498 | rcret = getrcconfigint("rctvradio", NULL); |
---|
499 | else |
---|
500 | rcret = getrcconfigint("rcepg", NULL); |
---|
501 | } |
---|
502 | if(rcret == getrcconfigint("rcok", NULL) || rcret == getrcconfigint("rctvradio", NULL) || rcret == getrcconfigint("rcfav", NULL) || rcret == getrcconfigint("rctv", NULL) || rcret == getrcconfigint("rcradio", 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)))) |
---|
503 | { |
---|
504 | int tmpservicetype = status.servicetype; |
---|
505 | status.infobaraktiv = 0; |
---|
506 | subtitlepause(1); |
---|
507 | clearscreen(infobar); |
---|
508 | if(rcret == getrcconfigint("rctvradio", NULL)) |
---|
509 | { |
---|
510 | if(status.servicetype == 0) |
---|
511 | status.servicetype = 1; |
---|
512 | else |
---|
513 | status.servicetype = 0; |
---|
514 | } |
---|
515 | |
---|
516 | if(rcret == getrcconfigint("rctv", NULL)) |
---|
517 | { |
---|
518 | #ifdef MIPSEL |
---|
519 | if(checkchipset("BCM7424") == 1 && status.servicetype == 0) |
---|
520 | { |
---|
521 | if(status.aktservice->type == CHANNEL) |
---|
522 | servicefullHDMIin_start(); |
---|
523 | else if(status.aktservice->type == HDMIIN) |
---|
524 | { |
---|
525 | if(status.lastservice->channel != NULL) |
---|
526 | { |
---|
527 | tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0); |
---|
528 | servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0); |
---|
529 | free(tmpstr); tmpstr = NULL; |
---|
530 | } |
---|
531 | } |
---|
532 | infobartimeout = 0; |
---|
533 | infobar = infobar1; |
---|
534 | if(status.infobar == 0) |
---|
535 | drawscreen(infobar, 0, 4); |
---|
536 | else |
---|
537 | drawscreen(infobar, 0, 0); |
---|
538 | status.infobar = 1; |
---|
539 | continue; |
---|
540 | } |
---|
541 | #endif |
---|
542 | status.servicetype = 0; |
---|
543 | } |
---|
544 | if(rcret == getrcconfigint("rcradio", NULL)) |
---|
545 | status.servicetype = 1; |
---|
546 | |
---|
547 | drawscreen(skin, 0, 0); |
---|
548 | if(rcret == getrcconfigint("rcfav", NULL)) |
---|
549 | ret = screenchannellist(NULL, NULL, 2); |
---|
550 | else |
---|
551 | ret = screenchannellist(NULL, NULL, 0); |
---|
552 | if(ret >= 20 || ret < 0) |
---|
553 | status.servicetype = tmpservicetype; |
---|
554 | drawscreen(skin, 0, 0); |
---|
555 | status.infobaraktiv = 1; |
---|
556 | status.infobar = 2; |
---|
557 | infobartimeout = 0; |
---|
558 | continue; |
---|
559 | } |
---|
560 | if(rcret == getrcconfigint("rcexit", NULL) && status.infobar == 1) |
---|
561 | { |
---|
562 | if(status.timeshift == 1 && status.playing == 1) |
---|
563 | screenplayinfobar(NULL, NULL, 1, 1, 4); |
---|
564 | subtitlepause(1); |
---|
565 | status.infobar = 0; |
---|
566 | clearscreen(infobar); |
---|
567 | if(infobarm != infobar) { |
---|
568 | infobar = infobarm; |
---|
569 | clearscreen(infobar); |
---|
570 | } |
---|
571 | drawscreen(skin, 0, 0); |
---|
572 | subtitlepause(0); |
---|
573 | continue; |
---|
574 | } |
---|
575 | if(rcret == getrcconfigint("rctext", NULL)) |
---|
576 | { |
---|
577 | if(status.aktservice->channel != NULL && status.aktservice->channel->txtpid > 0) |
---|
578 | { |
---|
579 | subtitlepause(1); |
---|
580 | status.infobar = 0; |
---|
581 | status.sec = 0; |
---|
582 | clearscreen(infobar); |
---|
583 | tmpstr = ostrcat(getconfig("tuxtxtfile", NULL), " ", 0, 0); |
---|
584 | tmpnr = oitoa(status.aktservice->channel->txtpid); |
---|
585 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
586 | |
---|
587 | if(status.aktservice->fedev != NULL) |
---|
588 | { |
---|
589 | tmpnr = oitoa(status.aktservice->fedev->devnr); |
---|
590 | tmpstr = ostrcat(tmpstr, " ", 1, 0); |
---|
591 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
592 | } |
---|
593 | #ifdef OEBUILD |
---|
594 | saveframebuffer(); |
---|
595 | #endif |
---|
596 | drawscreen(skin, 0, 0); |
---|
597 | status.tuxtxt = 1; |
---|
598 | #ifdef MIPSEL |
---|
599 | disablemanualblit(); |
---|
600 | int tmprcret = -1; |
---|
601 | delrc(getrcconfigint("rcvolup", NULL), NULL, NULL); |
---|
602 | delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL); |
---|
603 | |
---|
604 | tmpstr = ostrcat(tmpstr, " &", 1, 0); |
---|
605 | system(tmpstr); |
---|
606 | |
---|
607 | while(1) |
---|
608 | { |
---|
609 | rcret = waitrc(infobar, 0, 0); |
---|
610 | if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00; |
---|
611 | else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01; |
---|
612 | else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02; |
---|
613 | else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03; |
---|
614 | else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04; |
---|
615 | else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05; |
---|
616 | else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06; |
---|
617 | else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07; |
---|
618 | else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08; |
---|
619 | else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; |
---|
620 | else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A; |
---|
621 | else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B; |
---|
622 | else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C; |
---|
623 | else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D; |
---|
624 | else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E; |
---|
625 | else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F; |
---|
626 | else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10; |
---|
627 | else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11; |
---|
628 | else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12; |
---|
629 | else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13; |
---|
630 | else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14; |
---|
631 | else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15; |
---|
632 | else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16; |
---|
633 | else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17; |
---|
634 | //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18; |
---|
635 | else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F; |
---|
636 | else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F; |
---|
637 | |
---|
638 | sendtuxtxt(tmprcret); |
---|
639 | |
---|
640 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
641 | if(rcret == getrcconfigint("rctext", NULL)) break; |
---|
642 | } |
---|
643 | |
---|
644 | addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); |
---|
645 | addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); |
---|
646 | |
---|
647 | if(status.fdrctxt != -1) |
---|
648 | { |
---|
649 | close(status.fdrctxt); |
---|
650 | status.fdrctxt = -1; |
---|
651 | } |
---|
652 | #ifndef OEBUILD |
---|
653 | system("resetfb.sh"); |
---|
654 | #endif |
---|
655 | enablemanualblit(); |
---|
656 | #else |
---|
657 | system(tmpstr); |
---|
658 | #endif |
---|
659 | #ifdef MIPSEL |
---|
660 | |
---|
661 | if(status.aktservice != NULL) |
---|
662 | resetvmpeg(status.aktservice->videodev); |
---|
663 | #endif |
---|
664 | #ifdef OEBUILD |
---|
665 | restoreframebuffer(); |
---|
666 | #endif |
---|
667 | status.tuxtxt = 0; |
---|
668 | free(tmpstr); tmpstr = NULL; tmpnr = NULL; |
---|
669 | drawscreen(skin, 0, 0); |
---|
670 | subtitlepause(0); |
---|
671 | } |
---|
672 | continue; |
---|
673 | } |
---|
674 | // if(rcret == getrcconfigint("rcrecord", NULL)) |
---|
675 | if(rcret == getrcconfigint("rcrecord", NULL) && status.pvr == 1) |
---|
676 | { |
---|
677 | // currently works only 1 rec or timeshift |
---|
678 | // if(checkbox("VUSOLO2") == 1 && status.timeshift == 1) |
---|
679 | // continue; |
---|
680 | subtitlepause(1); |
---|
681 | status.infobar = 0; |
---|
682 | clearscreen(infobar); |
---|
683 | screenrecorddirect(); |
---|
684 | status.updatevfd = START; |
---|
685 | drawscreen(skin, 0, 0); |
---|
686 | subtitlepause(0); |
---|
687 | continue; |
---|
688 | } |
---|
689 | if((status.pvr == 1 && ((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL)))) |
---|
690 | { |
---|
691 | subtitlepause(1); |
---|
692 | status.infobar = 0; |
---|
693 | status.infobaraktiv = 0; |
---|
694 | clearscreen(infobar); |
---|
695 | screenplay(NULL, NULL, 1, 0); |
---|
696 | status.infobaraktiv = 1; |
---|
697 | status.updatevfd = START; |
---|
698 | drawscreen(skin, 0, 0); |
---|
699 | subtitlepause(0); |
---|
700 | continue; |
---|
701 | } |
---|
702 | if(rcret == getrcconfigint("rcshoot", NULL)) |
---|
703 | { |
---|
704 | subtitlepause(1); |
---|
705 | status.infobar = 0; |
---|
706 | status.infobaraktiv = 0; |
---|
707 | clearscreen(infobar); |
---|
708 | screenshoot(0); |
---|
709 | status.infobaraktiv = 1; |
---|
710 | status.updatevfd = START; |
---|
711 | drawscreen(skin, 0, 0); |
---|
712 | subtitlepause(0); |
---|
713 | textbox(_("Message"), _("Shooting Background done !\nSave Screenshoot Path: /tmp/screenshot.jpg"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0); |
---|
714 | continue; |
---|
715 | } |
---|
716 | |
---|
717 | if(rcret == getrcconfigint("rcplugin", NULL)) |
---|
718 | { |
---|
719 | subtitlepause(1); |
---|
720 | status.infobar = 0; |
---|
721 | clearscreen(infobar); |
---|
722 | status.updatevfd = PAUSE; |
---|
723 | screenkeyactions(2, 0); |
---|
724 | status.updatevfd = START; |
---|
725 | drawscreen(skin, 0, 0); |
---|
726 | subtitlepause(0); |
---|
727 | continue; |
---|
728 | } |
---|
729 | if(rcret == getrcconfigint("rcred", NULL)) |
---|
730 | { |
---|
731 | subtitlepause(1); |
---|
732 | status.infobar = 0; |
---|
733 | status.infobaraktiv = 0; |
---|
734 | clearscreen(infobar); |
---|
735 | status.updatevfd = PAUSE; |
---|
736 | screenkeyactions(1, 0); |
---|
737 | status.infobaraktiv = 1; |
---|
738 | status.updatevfd = START; |
---|
739 | drawscreen(skin, 0, 0); |
---|
740 | subtitlepause(0); |
---|
741 | continue; |
---|
742 | } |
---|
743 | if(rcret == getrcconfigint("rcgreen", NULL) || rcret == getrcconfigint("rcvmode", NULL)) |
---|
744 | { |
---|
745 | subtitlepause(1); |
---|
746 | status.infobar = 0; |
---|
747 | clearscreen(infobar); |
---|
748 | screenvideomode(0); |
---|
749 | drawscreen(skin, 0, 0); |
---|
750 | subtitlepause(0); |
---|
751 | continue; |
---|
752 | } |
---|
753 | if(rcret == getrcconfigint("rcsubchannel", NULL)) |
---|
754 | { |
---|
755 | subtitlepause(1); |
---|
756 | status.infobar = 0; |
---|
757 | clearscreen(infobar); |
---|
758 | screenlinkedchannel(); |
---|
759 | drawscreen(skin, 0, 0); |
---|
760 | subtitlepause(0); |
---|
761 | continue; |
---|
762 | } |
---|
763 | if(rcret == getrcconfigint("rcsleep", NULL)) |
---|
764 | { |
---|
765 | subtitlepause(1); |
---|
766 | status.infobar = 0; |
---|
767 | clearscreen(infobar); |
---|
768 | screenpowerofftimer(); |
---|
769 | drawscreen(skin, 0, 0); |
---|
770 | subtitlepause(0); |
---|
771 | continue; |
---|
772 | } |
---|
773 | if(rcret == getrcconfigint("rcsubtitel", NULL)) |
---|
774 | { |
---|
775 | subtitlepause(1); |
---|
776 | status.infobar = 0; |
---|
777 | clearscreen(infobar); |
---|
778 | screensubtitle(); |
---|
779 | drawscreen(skin, 0, 0); |
---|
780 | subtitlepause(0); |
---|
781 | continue; |
---|
782 | } |
---|
783 | if(rcret == getrcconfigint("rcyellow", NULL) || rcret == getrcconfigint("rcaudio", NULL)) |
---|
784 | { |
---|
785 | subtitlepause(1); |
---|
786 | status.infobar = 0; |
---|
787 | clearscreen(infobar); |
---|
788 | screenaudiotrack(); |
---|
789 | drawscreen(skin, 0, 0); |
---|
790 | subtitlepause(0); |
---|
791 | continue; |
---|
792 | } |
---|
793 | if(rcret == getrcconfigint("rcblue", NULL)) |
---|
794 | { |
---|
795 | subtitlepause(1); |
---|
796 | status.infobar = 0; |
---|
797 | clearscreen(infobar); |
---|
798 | screenkeyactions(0, 0); |
---|
799 | status.updatevfd = START; |
---|
800 | drawscreen(skin, 0, 0); |
---|
801 | subtitlepause(0); |
---|
802 | continue; |
---|
803 | } |
---|
804 | if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL && file_exist("/usr/bin/browser")) |
---|
805 | { |
---|
806 | #ifdef OEBUILD |
---|
807 | //oebuild hbbtv start |
---|
808 | subtitlepause(1); |
---|
809 | status.infobar = 0; |
---|
810 | status.sec = 0; |
---|
811 | clearscreen(infobar); |
---|
812 | #ifdef OEBUILD |
---|
813 | saveframebuffer(); |
---|
814 | #endif |
---|
815 | drawscreen(skin, 0, 0); |
---|
816 | status.tuxtxt = 1; |
---|
817 | |
---|
818 | char* res = NULL; |
---|
819 | res = string_newline(command("fbset | sed -nr 's/.*mode.*\"([^\"]+)-.*/\\1/p' | tr 'x' ' '")); |
---|
820 | if(res == NULL) |
---|
821 | { |
---|
822 | printf("set default res\n"); |
---|
823 | res = ostrcat("1280 720", NULL, 0, 0); |
---|
824 | } |
---|
825 | tmpstr = ostrcat("run.sh restart ", res, 0, 1); |
---|
826 | tmpstr = ostrcat(tmpstr, " ", 1, 0); |
---|
827 | tmpstr = ostrcat(tmpstr, status.aktservice->channel->hbbtvurl, 1, 0); |
---|
828 | tmpstr = ostrcat(tmpstr, " &", 1, 0); |
---|
829 | #ifdef MIPSEL |
---|
830 | disablemanualblit(); |
---|
831 | int tmprcret = -1; |
---|
832 | |
---|
833 | delrc(getrcconfigint("rcvolup", NULL), NULL, NULL); |
---|
834 | delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL); |
---|
835 | |
---|
836 | printf("cmd1: %s\n", tmpstr); |
---|
837 | system(tmpstr); |
---|
838 | free(tmpstr), tmpstr = NULL; |
---|
839 | |
---|
840 | while(1) |
---|
841 | { |
---|
842 | rcret = waitrc(infobar, 0, 0); |
---|
843 | if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00; |
---|
844 | else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01; |
---|
845 | else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02; |
---|
846 | else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03; |
---|
847 | else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04; |
---|
848 | else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05; |
---|
849 | else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06; |
---|
850 | else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07; |
---|
851 | else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08; |
---|
852 | else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; |
---|
853 | else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A; |
---|
854 | else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B; |
---|
855 | else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C; |
---|
856 | else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D; |
---|
857 | else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E; |
---|
858 | else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F; |
---|
859 | else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10; |
---|
860 | else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11; |
---|
861 | else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12; |
---|
862 | else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13; |
---|
863 | else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14; |
---|
864 | else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15; |
---|
865 | else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16; |
---|
866 | else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17; |
---|
867 | //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18; |
---|
868 | else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F; |
---|
869 | else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F; |
---|
870 | |
---|
871 | sendtuxtxt(tmprcret); |
---|
872 | |
---|
873 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
874 | if(rcret == getrcconfigint("rctext", NULL)) break; |
---|
875 | } |
---|
876 | |
---|
877 | addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); |
---|
878 | addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); |
---|
879 | |
---|
880 | if(status.fdrctxt != -1) |
---|
881 | { |
---|
882 | close(status.fdrctxt); |
---|
883 | status.fdrctxt = -1; |
---|
884 | } |
---|
885 | system("killall -9 run.sh browser"); |
---|
886 | #ifndef OEBUILD |
---|
887 | system("resetfb.sh"); |
---|
888 | #endif |
---|
889 | enablemanualblit(); |
---|
890 | #else |
---|
891 | printf("cmd2: %s\n", tmpstr); |
---|
892 | system(tmpstr); |
---|
893 | free(tmpstr), tmpstr = NULL; |
---|
894 | #endif |
---|
895 | |
---|
896 | #ifdef MIPSEL |
---|
897 | |
---|
898 | if(status.aktservice != NULL) |
---|
899 | resetvmpeg(status.aktservice->videodev); |
---|
900 | #endif |
---|
901 | #ifdef OEBUILD |
---|
902 | restoreframebuffer(); |
---|
903 | #endif |
---|
904 | status.tuxtxt = 0; |
---|
905 | free(tmpstr); tmpstr = NULL; tmpnr = NULL; |
---|
906 | drawscreen(skin, 0, 0); |
---|
907 | subtitlepause(0); |
---|
908 | //oebuild hbbtv end |
---|
909 | #else |
---|
910 | subtitlepause(1); |
---|
911 | status.infobar = 0; |
---|
912 | clearscreen(infobar); |
---|
913 | |
---|
914 | pluginnode = getplugin("hbbtv Browser"); |
---|
915 | if(pluginnode != NULL) |
---|
916 | { |
---|
917 | startplugin = dlsym(pluginnode->pluginhandle, "starturl"); |
---|
918 | if(startplugin != NULL) |
---|
919 | startplugin(); |
---|
920 | } |
---|
921 | |
---|
922 | status.updatevfd = START; |
---|
923 | drawscreen(skin, 0, 0); |
---|
924 | subtitlepause(0); |
---|
925 | #endif |
---|
926 | continue; |
---|
927 | } |
---|
928 | if(rcret == getrcconfigint("rcwww", NULL)) |
---|
929 | { |
---|
930 | subtitlepause(1); |
---|
931 | status.infobar = 0; |
---|
932 | clearscreen(infobar); |
---|
933 | |
---|
934 | pluginnode = getplugin("Internet Browser"); |
---|
935 | if(pluginnode != NULL) |
---|
936 | { |
---|
937 | startplugin = dlsym(pluginnode->pluginhandle, "screenbrowser"); |
---|
938 | if(startplugin != NULL) |
---|
939 | startplugin(); |
---|
940 | } |
---|
941 | else |
---|
942 | textbox(_("Message"), _("Internet Browser Plugin not installed !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0); |
---|
943 | } |
---|
944 | if(rcret == getrcconfigint("rcmedia", NULL)) |
---|
945 | { |
---|
946 | /* |
---|
947 | struct skin* pluginnode = getplugin("Media Center"); |
---|
948 | void (*startplugin)(void); |
---|
949 | status.infobaraktiv = 0; |
---|
950 | subtitlepause(1); |
---|
951 | status.infobar = 0; |
---|
952 | clearscreen(infobar); |
---|
953 | if(pluginnode != NULL) |
---|
954 | { |
---|
955 | startplugin = dlsym(pluginnode->pluginhandle, "start"); |
---|
956 | if(startplugin != NULL) |
---|
957 | startplugin(); |
---|
958 | } |
---|
959 | status.infobaraktiv = 1; |
---|
960 | drawscreen(skin, 0, 0); |
---|
961 | subtitlepause(0); |
---|
962 | continue; |
---|
963 | */ |
---|
964 | subtitlepause(1); |
---|
965 | status.infobar = 0; |
---|
966 | clearscreen(infobar); |
---|
967 | status.updatevfd = PAUSE; |
---|
968 | screenkeyactions(3, 0); |
---|
969 | status.updatevfd = START; |
---|
970 | drawscreen(skin, 0, 0); |
---|
971 | subtitlepause(0); |
---|
972 | resettvpic(); |
---|
973 | continue; |
---|
974 | } |
---|
975 | if(rcret == getrcconfigint("rcmenu", NULL)) |
---|
976 | { |
---|
977 | subtitlepause(1); |
---|
978 | status.infobar = 0; |
---|
979 | status.infobaraktiv = 0; |
---|
980 | clearscreen(infobar); |
---|
981 | menu(getscreen("mainmenu"), 1); |
---|
982 | status.menurelease = 0; |
---|
983 | status.updatevfd = START; |
---|
984 | status.infobaraktiv = 1; |
---|
985 | drawscreen(skin, 0, 0); |
---|
986 | subtitlepause(0); |
---|
987 | continue; |
---|
988 | } |
---|
989 | if(rcret == getrcconfigint("rctimer", NULL)) |
---|
990 | { |
---|
991 | subtitlepause(1); |
---|
992 | status.infobar = 0; |
---|
993 | status.infobaraktiv = 0; |
---|
994 | clearscreen(infobar); |
---|
995 | screenrectimer(); |
---|
996 | drawscreen(skin, 0, 0); |
---|
997 | status.infobaraktiv = 1; |
---|
998 | subtitlepause(0); |
---|
999 | resettvpic(); |
---|
1000 | continue; |
---|
1001 | } |
---|
1002 | if(rcret == getrcconfigint("rcepg", NULL)) |
---|
1003 | { |
---|
1004 | subtitlepause(1); |
---|
1005 | status.infobar = 0; |
---|
1006 | status.infobaraktiv = 0; |
---|
1007 | clearscreen(infobar); |
---|
1008 | epgchoice(NULL); |
---|
1009 | drawscreen(skin, 0, 0); |
---|
1010 | status.infobaraktiv = 1; |
---|
1011 | subtitlepause(0); |
---|
1012 | continue; |
---|
1013 | } |
---|
1014 | if(rcret == getrcconfigint("rcresolution", NULL) || rcret == getrcconfigint("rcresolution1", NULL)) |
---|
1015 | { |
---|
1016 | subtitlepause(1); |
---|
1017 | status.infobar = 0; |
---|
1018 | clearscreen(infobar); |
---|
1019 | switchvideomode(); |
---|
1020 | drawscreen(skin, 0, 0); |
---|
1021 | subtitlepause(0); |
---|
1022 | continue; |
---|
1023 | } |
---|
1024 | if(rcret == getrcconfigint("rcinfo", NULL)) |
---|
1025 | { |
---|
1026 | if(status.infobar == 1) |
---|
1027 | { |
---|
1028 | if(getconfigint("secondinfobar", NULL) == 2) |
---|
1029 | { |
---|
1030 | clearscreen(infobar); |
---|
1031 | epgchoice(NULL); |
---|
1032 | status.infobar = 0; |
---|
1033 | drawscreen(skin, 0, 0); |
---|
1034 | subtitlepause(0); |
---|
1035 | } |
---|
1036 | else if(getconfigint("secondinfobar", NULL) == 3) |
---|
1037 | { |
---|
1038 | clearscreen(infobar); |
---|
1039 | screenepg(NULL, NULL, 0); |
---|
1040 | status.infobar = 0; |
---|
1041 | drawscreen(skin, 0, 0); |
---|
1042 | subtitlepause(0); |
---|
1043 | } |
---|
1044 | else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2) |
---|
1045 | { |
---|
1046 | if(infobarm != infobar) { |
---|
1047 | clearscreen(infobar); |
---|
1048 | infobar = infobarm; |
---|
1049 | } |
---|
1050 | clearscreen(infobar); |
---|
1051 | status.infobar = 0; |
---|
1052 | drawscreen(skin, 0, 0); |
---|
1053 | subtitlepause(0); |
---|
1054 | } |
---|
1055 | else |
---|
1056 | { |
---|
1057 | infobar = infobar2; |
---|
1058 | drawscreen(infobar, 0, 0); |
---|
1059 | } |
---|
1060 | } |
---|
1061 | else |
---|
1062 | { |
---|
1063 | subtitlepause(1); |
---|
1064 | status.infobar = 1; |
---|
1065 | infobar = infobar1; |
---|
1066 | drawscreen(infobar, 0, 4); |
---|
1067 | } |
---|
1068 | continue; |
---|
1069 | } |
---|
1070 | if(rcret == getrcconfigint("rcpower", NULL)) |
---|
1071 | { |
---|
1072 | subtitlepause(1); |
---|
1073 | status.infobar = 0; |
---|
1074 | status.infobaraktiv = 0; |
---|
1075 | clearscreen(infobar); |
---|
1076 | drawscreen(skin, 0, 0); |
---|
1077 | switch(getconfigint("poweraktion", NULL)) |
---|
1078 | { |
---|
1079 | case 1: //power off |
---|
1080 | oshutdown(1, 1); |
---|
1081 | break; |
---|
1082 | case 2: //standby |
---|
1083 | status.standby = 1; |
---|
1084 | break; |
---|
1085 | case 3: //restart |
---|
1086 | oshutdown(2, 1); |
---|
1087 | break; |
---|
1088 | case 4: //Gui restart |
---|
1089 | oshutdown(3, 1); |
---|
1090 | break; |
---|
1091 | default: |
---|
1092 | standbymenu = getscreen("standbymenu"); |
---|
1093 | menu(standbymenu, 1); |
---|
1094 | break; |
---|
1095 | } |
---|
1096 | status.updatevfd = START; |
---|
1097 | drawscreen(skin, 0, 0); |
---|
1098 | status.infobaraktiv = 1; |
---|
1099 | subtitlepause(0); |
---|
1100 | continue; |
---|
1101 | } |
---|
1102 | if(rcret == getrcconfigint("rcfrontpower", NULL)) |
---|
1103 | { |
---|
1104 | subtitlepause(1); |
---|
1105 | status.infobar = 0; |
---|
1106 | status.infobaraktiv = 0; |
---|
1107 | clearscreen(infobar); |
---|
1108 | drawscreen(skin, 0, 0); |
---|
1109 | switch(getconfigint("frontpoweraktion", NULL)) |
---|
1110 | { |
---|
1111 | case 1: //power off |
---|
1112 | oshutdown(1, 1); |
---|
1113 | break; |
---|
1114 | case 2: //standby |
---|
1115 | status.standby = 1; |
---|
1116 | break; |
---|
1117 | case 3: //restart |
---|
1118 | oshutdown(2, 1); |
---|
1119 | break; |
---|
1120 | case 4: //Gui restart |
---|
1121 | oshutdown(3, 1); |
---|
1122 | break; |
---|
1123 | default: |
---|
1124 | status.standby = 1; |
---|
1125 | break; |
---|
1126 | } |
---|
1127 | status.updatevfd = START; |
---|
1128 | drawscreen(skin, 0, 0); |
---|
1129 | status.infobaraktiv = 1; |
---|
1130 | subtitlepause(0); |
---|
1131 | continue; |
---|
1132 | } |
---|
1133 | if(rcret == getrcconfigint("rcrecall", NULL) || rcret == getrcconfigint("rcexit", NULL)) |
---|
1134 | { |
---|
1135 | subtitlepause(1); |
---|
1136 | clearscreen(infobar); |
---|
1137 | drawscreen(skin, 0, 0); |
---|
1138 | screenchannelhistory(); |
---|
1139 | infobartimeout = 0; |
---|
1140 | infobar = infobar1; |
---|
1141 | if(status.infobar == 0) |
---|
1142 | drawscreen(infobar, 0, 4); |
---|
1143 | else |
---|
1144 | drawscreen(infobar, 0, 0); |
---|
1145 | status.infobar = 1; |
---|
1146 | continue; |
---|
1147 | } |
---|
1148 | if(rcret == getrcconfigint("rc0", NULL)) |
---|
1149 | { |
---|
1150 | subtitlepause(1); |
---|
1151 | clearscreen(infobar); |
---|
1152 | drawscreen(skin, 0, 0); |
---|
1153 | if(status.lastservice->channel != NULL) |
---|
1154 | { |
---|
1155 | tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0); |
---|
1156 | servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0); |
---|
1157 | free(tmpstr); tmpstr = NULL; |
---|
1158 | } |
---|
1159 | infobartimeout = 0; |
---|
1160 | infobar = infobar1; |
---|
1161 | if(status.infobar == 0) |
---|
1162 | drawscreen(infobar, 0, 4); |
---|
1163 | else |
---|
1164 | drawscreen(infobar, 0, 0); |
---|
1165 | status.infobar = 1; |
---|
1166 | continue; |
---|
1167 | } |
---|
1168 | if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL))) |
---|
1169 | { |
---|
1170 | subtitlepause(1); |
---|
1171 | if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL)) |
---|
1172 | { |
---|
1173 | status.virtualzap = status.crosscontrol - 1; |
---|
1174 | zapup(); |
---|
1175 | status.virtualzap = 0; |
---|
1176 | } |
---|
1177 | else |
---|
1178 | zapup(); |
---|
1179 | clearscreen(infobar); |
---|
1180 | drawscreen(skin, 0, 0); |
---|
1181 | if(status.pipzap == 0) |
---|
1182 | { |
---|
1183 | infobartimeout = 0; |
---|
1184 | status.infobar = 2; |
---|
1185 | } |
---|
1186 | continue; |
---|
1187 | } |
---|
1188 | if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL))) |
---|
1189 | { |
---|
1190 | subtitlepause(1); |
---|
1191 | if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL)) |
---|
1192 | { |
---|
1193 | status.virtualzap = status.crosscontrol - 1; |
---|
1194 | zapdown(); |
---|
1195 | status.virtualzap = 0; |
---|
1196 | } |
---|
1197 | else |
---|
1198 | zapdown(); |
---|
1199 | clearscreen(infobar); |
---|
1200 | drawscreen(skin, 0, 0); |
---|
1201 | if(status.pipzap == 0) |
---|
1202 | { |
---|
1203 | infobartimeout = 0; |
---|
1204 | status.infobar = 2; |
---|
1205 | } |
---|
1206 | continue; |
---|
1207 | } |
---|
1208 | if(rcret == rcnumber(rcret)) |
---|
1209 | { |
---|
1210 | subtitlepause(1); |
---|
1211 | clearscreen(infobar); |
---|
1212 | screenchannelbynr(rcret); |
---|
1213 | status.infobar = 2; |
---|
1214 | continue; |
---|
1215 | } |
---|
1216 | //show infobar on program switch (only tv) |
---|
1217 | if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0) |
---|
1218 | { |
---|
1219 | time_t akttime = time(NULL); |
---|
1220 | //show infobar only all 60 sec |
---|
1221 | if(lasttime < akttime) |
---|
1222 | { |
---|
1223 | struct epg* tmpepg = getepgakt(status.aktservice->channel); |
---|
1224 | if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime) |
---|
1225 | { |
---|
1226 | lasttime = akttime + 10; |
---|
1227 | infobartimeout = 0; |
---|
1228 | subtitlepause(1); |
---|
1229 | status.infobar = 1; |
---|
1230 | infobar = infobar1; |
---|
1231 | drawscreen(infobar, 0, 4); |
---|
1232 | continue; |
---|
1233 | } |
---|
1234 | } |
---|
1235 | } |
---|
1236 | // pip atemio7600 ?? |
---|
1237 | //if((rcret == getrcconfigint("rcpip", NULL) || rcret == getrcconfigint("rcpiprec", NULL)) && (checkchipset("BCM7424") == 1 || checkbox("ATEMIO6200") == 1 || checkbox("UFS922") == 1 || checkbox("UFS913") == 1 || checkbox("DM900") == 1 || checkbox("DM520") == 1 || checkbox("DM525") == 1)) |
---|
1238 | if((rcret == getrcconfigint("rcpip", NULL) || rcret == getrcconfigint("rcpiprec", NULL)) && status.videodevs > 1) |
---|
1239 | { |
---|
1240 | if(status.pipservice->videodev == NULL) |
---|
1241 | { |
---|
1242 | printf("---------> %i\n",rcret); |
---|
1243 | if(status.recording > 0 && rcret == getrcconfigint("rcpiprec", NULL)) |
---|
1244 | { |
---|
1245 | int i; |
---|
1246 | for(i = 0; i < 9; i++) |
---|
1247 | { |
---|
1248 | if(status.recchnode[i] != NULL) |
---|
1249 | { |
---|
1250 | pipchannel = status.recchnode[i]; |
---|
1251 | break; |
---|
1252 | } |
---|
1253 | } |
---|
1254 | } |
---|
1255 | else if(rcret == getrcconfigint("rcpiprec", NULL)) |
---|
1256 | textbox(_("Message"), _("no record channel found"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0); |
---|
1257 | else |
---|
1258 | pipchannel = status.aktservice->channel; |
---|
1259 | printf("++++ RC: %i\n",pipstart(pipchannel, NULL, 0)); |
---|
1260 | pipchannel = NULL; |
---|
1261 | } |
---|
1262 | } |
---|
1263 | |
---|
1264 | if(rcret == getrcconfigint("rchdmi", NULL)) |
---|
1265 | { |
---|
1266 | char *value = NULL; |
---|
1267 | value = readsys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", 1); |
---|
1268 | if(value != NULL) |
---|
1269 | { |
---|
1270 | if(ostrstr(value, "off") != NULL) |
---|
1271 | { |
---|
1272 | writesys("/proc/stb/video/videomode", "720p", 1); |
---|
1273 | writesys("/proc/stb/audio/hdmi_rx_monitor", "on", 1); |
---|
1274 | writesys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", "on", 1); |
---|
1275 | } |
---|
1276 | else |
---|
1277 | { |
---|
1278 | writesys("/proc/stb/audio/hdmi_rx_monitor", "off", 1); |
---|
1279 | writesys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", "off", 1); |
---|
1280 | setvideomode(getconfig("av_videomode", NULL), 0); |
---|
1281 | } |
---|
1282 | } |
---|
1283 | free(value); value=NULL; |
---|
1284 | } |
---|
1285 | |
---|
1286 | if(rcret == RCTIMEOUT && mark == 0) |
---|
1287 | { |
---|
1288 | if(getconfigint("infobartimeout", NULL) > infobartimeout) |
---|
1289 | { |
---|
1290 | //clearscreen(infobar); |
---|
1291 | drawscreen(infobar, 0, 0); |
---|
1292 | } |
---|
1293 | else |
---|
1294 | { |
---|
1295 | clearscreen(infobar); |
---|
1296 | if(infobarm != infobar) { |
---|
1297 | infobar = infobarm; |
---|
1298 | clearscreen(infobar); |
---|
1299 | } |
---|
1300 | status.infobar = 0; |
---|
1301 | drawscreen(skin, 0, 0); |
---|
1302 | subtitlepause(0); |
---|
1303 | } |
---|
1304 | } |
---|
1305 | } |
---|
1306 | } |
---|
1307 | |
---|
1308 | #endif |
---|