1 | #ifndef INFOBAR_H |
---|
2 | #define INFOBAR_H |
---|
3 | |
---|
4 | void screeninfobar() |
---|
5 | { |
---|
6 | int rcret = 0, ret = 0, infobartimeout = 0, rcwait = 1000, count = 0, first = 1; |
---|
7 | int playpic = 0; |
---|
8 | struct channel* pipchannel = NULL; |
---|
9 | struct skin* playinfobarpic = getscreen("playinfobarpic"); |
---|
10 | struct skin* infobar1 = getscreen("infobar"); |
---|
11 | struct skin* infobar2 = getscreen("infobar2"); |
---|
12 | struct skin* infobar = infobar1; |
---|
13 | struct skin* infobarm = infobar1; |
---|
14 | struct skin* standbymenu = NULL; |
---|
15 | char* tmpstr = NULL; char* tmpnr = NULL; |
---|
16 | struct skin* pluginnode = NULL; |
---|
17 | void (*startplugin)(void); |
---|
18 | time_t lasttime = 0; |
---|
19 | int mark = 0; |
---|
20 | int playstop = 1; |
---|
21 | |
---|
22 | status.mute = 0; |
---|
23 | status.infobar = 2; |
---|
24 | |
---|
25 | addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); |
---|
26 | addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); |
---|
27 | addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL); |
---|
28 | |
---|
29 | status.infobaraktiv = 1; |
---|
30 | status.mcaktiv = 0; |
---|
31 | |
---|
32 | int playinfobarcount = 0, playinfobarstatus = 0; |
---|
33 | |
---|
34 | if(checkbox("ATEMIO-NEMESIS") == 1 || checkbox("ATEMIO5200") == 1 || checkbox("ATEMIO6000") == 1 || checkbox("ATEMIO6100") == 1 || checkbox("ATEMIO6200") == 1 || (checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1) && ostrcmp(getconfig("remotecontrol", NULL), "1") != 1) |
---|
35 | playstop = 0; |
---|
36 | else |
---|
37 | playstop = 1; |
---|
38 | |
---|
39 | while(1) |
---|
40 | { |
---|
41 | mark = 0; |
---|
42 | |
---|
43 | if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL)) |
---|
44 | writerc(getrcconfigint("rcvolup", NULL)); |
---|
45 | if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL)) |
---|
46 | writerc(getrcconfigint("rcvoldown", NULL)); |
---|
47 | |
---|
48 | //check if mediadb can freed |
---|
49 | if(status.mediadbthread == NULL) |
---|
50 | { |
---|
51 | if(status.writemediadb == 1) |
---|
52 | writemediadb(getconfig("mediadbfile", NULL), NULL); |
---|
53 | freemediadb(0); |
---|
54 | } |
---|
55 | //check if picmem times out and must freed |
---|
56 | if(time(NULL) > status.picmemtimeout + 60) |
---|
57 | { |
---|
58 | checkpictimeout(); |
---|
59 | status.picmemtimeout = time(NULL); |
---|
60 | } |
---|
61 | |
---|
62 | if(status.standby == 1) |
---|
63 | screenstandby(); |
---|
64 | if(status.infobar == 1 ) |
---|
65 | { |
---|
66 | rcret = waitrc(infobar, 1000, 0); |
---|
67 | infobartimeout++; |
---|
68 | } |
---|
69 | else if(status.infobar == 0 && status.timeshift == 1) |
---|
70 | { |
---|
71 | rcret = waitrc(infobar, 1000, 0); |
---|
72 | if(rcret == RCTIMEOUT) |
---|
73 | { |
---|
74 | if(playpic == 1) { |
---|
75 | //it anymore needed |
---|
76 | // if (checkbox("ATEMIO-NEMESIS") != 1) |
---|
77 | clearscreen(playinfobarpic); |
---|
78 | drawscreen(playinfobarpic, 0, 0); |
---|
79 | } |
---|
80 | else |
---|
81 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
82 | continue; |
---|
83 | } |
---|
84 | } |
---|
85 | else if(status.infobar == 2) |
---|
86 | { |
---|
87 | if(getconfigint("infobarsleep", NULL) > 0) |
---|
88 | rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0); |
---|
89 | else if(first == 1) //only on first start wait a little for epg |
---|
90 | { |
---|
91 | first = 0; |
---|
92 | rcret = waitrc(infobar, 1000, 0); |
---|
93 | } |
---|
94 | else |
---|
95 | rcret = RCTIMEOUT; |
---|
96 | |
---|
97 | if(rcret == RCTIMEOUT) |
---|
98 | { |
---|
99 | status.infobar = 1; |
---|
100 | infobar = infobar1; |
---|
101 | drawscreen(infobar, 0, 4); |
---|
102 | continue; |
---|
103 | } |
---|
104 | else |
---|
105 | status.infobar = 0; |
---|
106 | } |
---|
107 | else |
---|
108 | { |
---|
109 | int screensaver_delay = getconfigint("screensaver_delay", NULL); |
---|
110 | rcret = 0; count = 0; rcwait = 1000; |
---|
111 | if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1) |
---|
112 | { |
---|
113 | initscreensaver(); |
---|
114 | if(screensaver != NULL) screensaver->flag = 1; |
---|
115 | } |
---|
116 | if(screensaver == NULL) |
---|
117 | { |
---|
118 | if(status.infobarprogram == 1) rcwait = 2000; |
---|
119 | else rcwait = 0; |
---|
120 | } |
---|
121 | while(rcret == 0 || rcret == RCTIMEOUT) |
---|
122 | { |
---|
123 | rcret = waitrc(infobar, rcwait, 0); |
---|
124 | count++; |
---|
125 | if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT)) |
---|
126 | { |
---|
127 | infobartimeout = 99999; |
---|
128 | mark = 1; |
---|
129 | break; |
---|
130 | } |
---|
131 | if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay) |
---|
132 | { |
---|
133 | if(status.aktservice->channel != NULL) |
---|
134 | screensaver->value = ostrcat(status.aktservice->channel->name, NULL, 0, 0); |
---|
135 | else |
---|
136 | screensaver->value = ostrcat("Radio", NULL, 0, 0); |
---|
137 | showscreensaver(); |
---|
138 | free(screensaver->value); |
---|
139 | rcwait = screensaver->speed; |
---|
140 | } |
---|
141 | } |
---|
142 | if(screensaver != NULL) screensaver->flag = 0; |
---|
143 | deinitscreensaver(); |
---|
144 | if(mark == 0) |
---|
145 | { |
---|
146 | drawscreen(skin, 0, 0); |
---|
147 | infobartimeout = 0; |
---|
148 | } |
---|
149 | } |
---|
150 | |
---|
151 | if(rcret == getrcconfigint("rcpause", NULL) || /*checkbox("ATEMIO-NEMESIS") == 1 || checkbox("ATEMIO5200") == 1 || checkbox("ATEMIO6000") == 1 || checkbox("ATEMIO6100") == 1 || checkbox("ATEMIO6200") == 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)) |
---|
152 | { |
---|
153 | //timeshift |
---|
154 | if(playpic == 1) { |
---|
155 | clearscreen(playinfobarpic); |
---|
156 | playpic = 0; |
---|
157 | } |
---|
158 | if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0)) |
---|
159 | { |
---|
160 | if(status.timeshifttype == 1 && status.timeshiftpos == 0) |
---|
161 | { |
---|
162 | timeshiftpause(0); |
---|
163 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
164 | } |
---|
165 | else |
---|
166 | timeshiftplay(&playinfobarstatus, &playinfobarcount); |
---|
167 | } |
---|
168 | else |
---|
169 | { |
---|
170 | if(status.timeshift == 1) |
---|
171 | playpic = 2; |
---|
172 | else |
---|
173 | playpic = 0; |
---|
174 | timeshiftpause(0); |
---|
175 | timeshiftinfobar(&playinfobarstatus, &playinfobarcount); |
---|
176 | if(playpic == 0) { |
---|
177 | drawscreen(playinfobarpic, 0, 0); |
---|
178 | playpic = 1; |
---|
179 | } |
---|
180 | } |
---|
181 | |
---|
182 | continue; |
---|
183 | } |
---|
184 | if(status.timeshift == 1) |
---|
185 | { |
---|
186 | if(rcret == getrcconfigint("rcstop", NULL)) |
---|
187 | { |
---|
188 | if(playpic == 1) { |
---|
189 | clearscreen(playinfobarpic); |
---|
190 | playpic = 0; |
---|
191 | } |
---|
192 | timeshiftstop(0); |
---|
193 | continue; |
---|
194 | } |
---|
195 | if(rcret == getrcconfigint("rcplay", NULL)) |
---|
196 | { |
---|
197 | if(playpic == 1) { |
---|
198 | clearscreen(playinfobarpic); |
---|
199 | playpic = 0; |
---|
200 | } |
---|
201 | if(playstop == 1 && status.timeshifttype == 1) |
---|
202 | { |
---|
203 | if(status.playing == 0 || (status.playspeed == 0 && status.slowspeed == 0 && status.pause == 0)) |
---|
204 | { |
---|
205 | subtitlepause(1); |
---|
206 | status.infobar = 0; |
---|
207 | status.infobaraktiv = 0; |
---|
208 | clearscreen(infobar); |
---|
209 | screenplay(NULL, NULL, 1, 0); |
---|
210 | status.infobaraktiv = 1; |
---|
211 | status.updatevfd = START; |
---|
212 | drawscreen(skin, 0, 0); |
---|
213 | subtitlepause(0); |
---|
214 | continue; |
---|
215 | } |
---|
216 | } |
---|
217 | timeshiftplay(&playinfobarstatus, &playinfobarcount); |
---|
218 | continue; |
---|
219 | } |
---|
220 | if(status.timeshifttype == 1 && status.playing == 0) |
---|
221 | { |
---|
222 | 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)))) |
---|
223 | { |
---|
224 | struct service* snode = getservice(RECORDTIMESHIFT, 0); |
---|
225 | if(snode != NULL) |
---|
226 | { |
---|
227 | status.playercan = 0x7FFF; |
---|
228 | playinfobarstatus = 1; |
---|
229 | playinfobarcount = 0; |
---|
230 | screenplayinfobar(snode->recname, NULL, 0, 1, 5); |
---|
231 | } |
---|
232 | continue; |
---|
233 | } |
---|
234 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
235 | { |
---|
236 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
237 | if(status.playing == 1) |
---|
238 | playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
239 | continue; |
---|
240 | } |
---|
241 | if(getconfig("timeshiftnumkeys", NULL) == 0) |
---|
242 | { |
---|
243 | if(rcret == getrcconfigint("rcleft", NULL)) |
---|
244 | { |
---|
245 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
246 | if(status.playing == 1) |
---|
247 | playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
248 | continue; |
---|
249 | } |
---|
250 | if(rcret == getrcconfigint("rcdown", NULL)) |
---|
251 | { |
---|
252 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
253 | if(status.playing == 1) |
---|
254 | playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
255 | continue; |
---|
256 | } |
---|
257 | if(rcret == getrcconfigint("rc1", NULL)) |
---|
258 | { |
---|
259 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
260 | if(status.playing == 1) |
---|
261 | playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
262 | continue; |
---|
263 | } |
---|
264 | if(rcret == getrcconfigint("rc4", NULL)) |
---|
265 | { |
---|
266 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
267 | if(status.playing == 1) |
---|
268 | playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
269 | continue; |
---|
270 | } |
---|
271 | if(rcret == getrcconfigint("rc7", NULL)) |
---|
272 | { |
---|
273 | timeshiftposplay(&playinfobarstatus, &playinfobarcount); |
---|
274 | if(status.playing == 1) |
---|
275 | playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
276 | continue; |
---|
277 | } |
---|
278 | } |
---|
279 | } |
---|
280 | if(status.playing == 1) |
---|
281 | { |
---|
282 | if(rcret == getrcconfigint("rcff", NULL)) |
---|
283 | { |
---|
284 | playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
285 | continue; |
---|
286 | } |
---|
287 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
288 | { |
---|
289 | playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
290 | continue; |
---|
291 | } |
---|
292 | if(rcret == getrcconfigint("rc3", NULL)) |
---|
293 | { |
---|
294 | playrcjumpf(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
295 | continue; |
---|
296 | } |
---|
297 | if(rcret == getrcconfigint("rc6", NULL)) |
---|
298 | { |
---|
299 | playrcjumpf(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
300 | continue; |
---|
301 | } |
---|
302 | if(rcret == getrcconfigint("rc9", NULL)) |
---|
303 | { |
---|
304 | playrcjumpf(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
305 | continue; |
---|
306 | } |
---|
307 | if(rcret == getrcconfigint("rcdown", NULL)) |
---|
308 | { |
---|
309 | playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
310 | continue; |
---|
311 | } |
---|
312 | if(rcret == getrcconfigint("rcup", NULL)) |
---|
313 | { |
---|
314 | playrcjumpf(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
315 | continue; |
---|
316 | } |
---|
317 | if(rcret == getrcconfigint("rcleft", NULL)) |
---|
318 | { |
---|
319 | playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
320 | continue; |
---|
321 | } |
---|
322 | if(rcret == getrcconfigint("rcright", NULL)) |
---|
323 | { |
---|
324 | playrcjumpf(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
325 | continue; |
---|
326 | } |
---|
327 | if(rcret == getrcconfigint("rc1", NULL)) |
---|
328 | { |
---|
329 | playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
330 | continue; |
---|
331 | } |
---|
332 | if(rcret == getrcconfigint("rc4", NULL)) |
---|
333 | { |
---|
334 | playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
335 | continue; |
---|
336 | } |
---|
337 | if(rcret == getrcconfigint("rc7", NULL)) |
---|
338 | { |
---|
339 | playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
340 | continue; |
---|
341 | } |
---|
342 | if(rcret == getrcconfigint("rc2", NULL)) |
---|
343 | { |
---|
344 | playrcjumpto(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
345 | continue; |
---|
346 | } |
---|
347 | if(rcret == getrcconfigint("rc0", NULL)) |
---|
348 | { |
---|
349 | setmarker(); |
---|
350 | continue; |
---|
351 | } |
---|
352 | if(rcret == getrcconfigint("rc5", NULL)) |
---|
353 | { |
---|
354 | screenmarker(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
355 | continue; |
---|
356 | } |
---|
357 | if(rcret == getrcconfigint("rc8", NULL)) |
---|
358 | { |
---|
359 | continue; |
---|
360 | } |
---|
361 | if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL)) |
---|
362 | { |
---|
363 | playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4); |
---|
364 | continue; |
---|
365 | } |
---|
366 | } |
---|
367 | } |
---|
368 | if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0) |
---|
369 | { |
---|
370 | subtitlepause(1); |
---|
371 | status.infobar = 0; |
---|
372 | clearscreen(infobar); |
---|
373 | screenrecordstop(); |
---|
374 | status.updatevfd = START; |
---|
375 | drawscreen(skin, 0, 0); |
---|
376 | subtitlepause(0); |
---|
377 | continue; |
---|
378 | } |
---|
379 | if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL) |
---|
380 | rcret = getrcconfigint("rctvradio", NULL); |
---|
381 | 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)))) |
---|
382 | { |
---|
383 | printf("status.servicetype: %d\n",status.servicetype); |
---|
384 | int tmpservicetype = status.servicetype; |
---|
385 | status.infobaraktiv = 0; |
---|
386 | subtitlepause(1); |
---|
387 | clearscreen(infobar); |
---|
388 | if(rcret == getrcconfigint("rctvradio", NULL)) |
---|
389 | { |
---|
390 | if(status.servicetype == 0) |
---|
391 | status.servicetype = 1; |
---|
392 | else |
---|
393 | status.servicetype = 0; |
---|
394 | } |
---|
395 | |
---|
396 | if(rcret == getrcconfigint("rctv", NULL)) |
---|
397 | status.servicetype = 0; |
---|
398 | if(rcret == getrcconfigint("rcradio", NULL)) |
---|
399 | status.servicetype = 1; |
---|
400 | |
---|
401 | drawscreen(skin, 0, 0); |
---|
402 | if(rcret == getrcconfigint("rcfav", NULL)) |
---|
403 | ret = screenchannellist(NULL, NULL, 2); |
---|
404 | else |
---|
405 | ret = screenchannellist(NULL, NULL, 0); |
---|
406 | if(ret >= 20 || ret < 0) |
---|
407 | status.servicetype = tmpservicetype; |
---|
408 | drawscreen(skin, 0, 0); |
---|
409 | status.infobaraktiv = 1; |
---|
410 | status.infobar = 2; |
---|
411 | infobartimeout = 0; |
---|
412 | continue; |
---|
413 | } |
---|
414 | if(rcret == getrcconfigint("rcexit", NULL)) |
---|
415 | { |
---|
416 | if(status.timeshift == 1 && status.playing == 1) |
---|
417 | screenplayinfobar(NULL, NULL, 1, 1, 4); |
---|
418 | subtitlepause(1); |
---|
419 | status.infobar = 0; |
---|
420 | clearscreen(infobar); |
---|
421 | if(infobarm != infobar) { |
---|
422 | infobar = infobarm; |
---|
423 | clearscreen(infobar); |
---|
424 | } |
---|
425 | drawscreen(skin, 0, 0); |
---|
426 | subtitlepause(0); |
---|
427 | continue; |
---|
428 | } |
---|
429 | if(rcret == getrcconfigint("rctext", NULL)) |
---|
430 | { |
---|
431 | if(status.aktservice->channel != NULL && status.aktservice->channel->txtpid > 0) |
---|
432 | { |
---|
433 | subtitlepause(1); |
---|
434 | status.infobar = 0; |
---|
435 | status.sec = 0; |
---|
436 | clearscreen(infobar); |
---|
437 | tmpstr = ostrcat(getconfig("tuxtxtfile", NULL), " ", 0, 0); |
---|
438 | tmpnr = oitoa(status.aktservice->channel->txtpid); |
---|
439 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
440 | |
---|
441 | if(status.aktservice->fedev != NULL) |
---|
442 | { |
---|
443 | tmpnr = oitoa(status.aktservice->fedev->devnr); |
---|
444 | tmpstr = ostrcat(tmpstr, " ", 1, 0); |
---|
445 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
446 | } |
---|
447 | |
---|
448 | drawscreen(skin, 0, 0); |
---|
449 | status.tuxtxt = 1; |
---|
450 | #ifdef MIPSEL |
---|
451 | disablemanualblit(); |
---|
452 | int tmprcret = -1; |
---|
453 | delrc(getrcconfigint("rcvolup", NULL), NULL, NULL); |
---|
454 | delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL); |
---|
455 | |
---|
456 | tmpstr = ostrcat(tmpstr, " &", 1, 0); |
---|
457 | system(tmpstr); |
---|
458 | |
---|
459 | while(1) |
---|
460 | { |
---|
461 | rcret = waitrc(infobar, 0, 0); |
---|
462 | if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00; |
---|
463 | else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01; |
---|
464 | else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02; |
---|
465 | else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03; |
---|
466 | else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04; |
---|
467 | else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05; |
---|
468 | else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06; |
---|
469 | else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07; |
---|
470 | else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08; |
---|
471 | else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; |
---|
472 | else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A; |
---|
473 | else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B; |
---|
474 | else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C; |
---|
475 | else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D; |
---|
476 | else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E; |
---|
477 | else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F; |
---|
478 | else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10; |
---|
479 | else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11; |
---|
480 | else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12; |
---|
481 | else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13; |
---|
482 | else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14; |
---|
483 | else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15; |
---|
484 | else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16; |
---|
485 | else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17; |
---|
486 | //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18; |
---|
487 | else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F; |
---|
488 | else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F; |
---|
489 | |
---|
490 | sendtuxtxt(tmprcret); |
---|
491 | |
---|
492 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
493 | if(rcret == getrcconfigint("rctext", NULL)) break; |
---|
494 | } |
---|
495 | |
---|
496 | addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); |
---|
497 | addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); |
---|
498 | |
---|
499 | if(status.fdrctxt != -1) |
---|
500 | { |
---|
501 | close(status.fdrctxt); |
---|
502 | status.fdrctxt = -1; |
---|
503 | } |
---|
504 | enablemanualblit(); |
---|
505 | #else |
---|
506 | system(tmpstr); |
---|
507 | #endif |
---|
508 | status.tuxtxt = 0; |
---|
509 | free(tmpstr); tmpstr = NULL; tmpnr = NULL; |
---|
510 | drawscreen(skin, 0, 0); |
---|
511 | subtitlepause(0); |
---|
512 | } |
---|
513 | continue; |
---|
514 | } |
---|
515 | if(rcret == getrcconfigint("rcrecord", NULL)) |
---|
516 | { |
---|
517 | subtitlepause(1); |
---|
518 | status.infobar = 0; |
---|
519 | clearscreen(infobar); |
---|
520 | screenrecorddirect(); |
---|
521 | status.updatevfd = START; |
---|
522 | drawscreen(skin, 0, 0); |
---|
523 | subtitlepause(0); |
---|
524 | continue; |
---|
525 | } |
---|
526 | if((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL)) |
---|
527 | { |
---|
528 | subtitlepause(1); |
---|
529 | status.infobar = 0; |
---|
530 | status.infobaraktiv = 0; |
---|
531 | clearscreen(infobar); |
---|
532 | screenplay(NULL, NULL, 1, 0); |
---|
533 | status.infobaraktiv = 1; |
---|
534 | status.updatevfd = START; |
---|
535 | drawscreen(skin, 0, 0); |
---|
536 | subtitlepause(0); |
---|
537 | continue; |
---|
538 | } |
---|
539 | if(rcret == getrcconfigint("rcshoot", NULL)) |
---|
540 | { |
---|
541 | subtitlepause(1); |
---|
542 | status.infobar = 0; |
---|
543 | status.infobaraktiv = 0; |
---|
544 | clearscreen(infobar); |
---|
545 | screenshoot(0); |
---|
546 | status.infobaraktiv = 1; |
---|
547 | status.updatevfd = START; |
---|
548 | drawscreen(skin, 0, 0); |
---|
549 | subtitlepause(0); |
---|
550 | 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); |
---|
551 | continue; |
---|
552 | } |
---|
553 | |
---|
554 | if(rcret == getrcconfigint("rcplugin", NULL)) |
---|
555 | { |
---|
556 | subtitlepause(1); |
---|
557 | status.infobar = 0; |
---|
558 | clearscreen(infobar); |
---|
559 | screenkeyactions(2, 0); |
---|
560 | status.updatevfd = START; |
---|
561 | drawscreen(skin, 0, 0); |
---|
562 | subtitlepause(0); |
---|
563 | continue; |
---|
564 | } |
---|
565 | if(rcret == getrcconfigint("rcred", NULL)) |
---|
566 | { |
---|
567 | subtitlepause(1); |
---|
568 | status.infobar = 0; |
---|
569 | status.infobaraktiv = 0; |
---|
570 | clearscreen(infobar); |
---|
571 | screenkeyactions(1, 0); |
---|
572 | status.infobaraktiv = 1; |
---|
573 | status.updatevfd = START; |
---|
574 | drawscreen(skin, 0, 0); |
---|
575 | subtitlepause(0); |
---|
576 | continue; |
---|
577 | } |
---|
578 | if(rcret == getrcconfigint("rcgreen", NULL)) |
---|
579 | { |
---|
580 | subtitlepause(1); |
---|
581 | status.infobar = 0; |
---|
582 | clearscreen(infobar); |
---|
583 | screenvideomode(0); |
---|
584 | drawscreen(skin, 0, 0); |
---|
585 | subtitlepause(0); |
---|
586 | continue; |
---|
587 | } |
---|
588 | if(rcret == getrcconfigint("rcsubchannel", NULL)) |
---|
589 | { |
---|
590 | subtitlepause(1); |
---|
591 | status.infobar = 0; |
---|
592 | clearscreen(infobar); |
---|
593 | screenlinkedchannel(); |
---|
594 | drawscreen(skin, 0, 0); |
---|
595 | subtitlepause(0); |
---|
596 | continue; |
---|
597 | } |
---|
598 | if(rcret == getrcconfigint("rcsleep", NULL)) |
---|
599 | { |
---|
600 | subtitlepause(1); |
---|
601 | status.infobar = 0; |
---|
602 | clearscreen(infobar); |
---|
603 | screenpowerofftimer(); |
---|
604 | drawscreen(skin, 0, 0); |
---|
605 | subtitlepause(0); |
---|
606 | continue; |
---|
607 | } |
---|
608 | if(rcret == getrcconfigint("rcsubtitel", NULL)) |
---|
609 | { |
---|
610 | subtitlepause(1); |
---|
611 | status.infobar = 0; |
---|
612 | clearscreen(infobar); |
---|
613 | screensubtitle(); |
---|
614 | drawscreen(skin, 0, 0); |
---|
615 | subtitlepause(0); |
---|
616 | continue; |
---|
617 | } |
---|
618 | if(rcret == getrcconfigint("rcyellow", NULL) || rcret == getrcconfigint("rcaudio", NULL)) |
---|
619 | { |
---|
620 | subtitlepause(1); |
---|
621 | status.infobar = 0; |
---|
622 | clearscreen(infobar); |
---|
623 | screenaudiotrack(); |
---|
624 | drawscreen(skin, 0, 0); |
---|
625 | subtitlepause(0); |
---|
626 | continue; |
---|
627 | } |
---|
628 | if(rcret == getrcconfigint("rcblue", NULL)) |
---|
629 | { |
---|
630 | subtitlepause(1); |
---|
631 | status.infobar = 0; |
---|
632 | clearscreen(infobar); |
---|
633 | screenkeyactions(0, 0); |
---|
634 | status.updatevfd = START; |
---|
635 | drawscreen(skin, 0, 0); |
---|
636 | subtitlepause(0); |
---|
637 | continue; |
---|
638 | } |
---|
639 | if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL) |
---|
640 | { |
---|
641 | subtitlepause(1); |
---|
642 | status.infobar = 0; |
---|
643 | clearscreen(infobar); |
---|
644 | |
---|
645 | pluginnode = getplugin("hbbtv Browser"); |
---|
646 | if(pluginnode != NULL) |
---|
647 | { |
---|
648 | startplugin = dlsym(pluginnode->pluginhandle, "starturl"); |
---|
649 | if(startplugin != NULL) |
---|
650 | startplugin(); |
---|
651 | } |
---|
652 | |
---|
653 | status.updatevfd = START; |
---|
654 | drawscreen(skin, 0, 0); |
---|
655 | subtitlepause(0); |
---|
656 | continue; |
---|
657 | } |
---|
658 | if(rcret == getrcconfigint("rcwww", NULL)) |
---|
659 | { |
---|
660 | subtitlepause(1); |
---|
661 | status.infobar = 0; |
---|
662 | clearscreen(infobar); |
---|
663 | |
---|
664 | pluginnode = getplugin("Internet Browser"); |
---|
665 | if(pluginnode != NULL) |
---|
666 | { |
---|
667 | startplugin = dlsym(pluginnode->pluginhandle, "screenbrowser"); |
---|
668 | if(startplugin != NULL) |
---|
669 | startplugin(); |
---|
670 | } |
---|
671 | else |
---|
672 | textbox(_("Message"), _("Internet Browser Plugin not installed !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0); |
---|
673 | } |
---|
674 | if(rcret == getrcconfigint("rcmedia", NULL)) |
---|
675 | { |
---|
676 | /* |
---|
677 | struct skin* pluginnode = getplugin("Media Center"); |
---|
678 | void (*startplugin)(void); |
---|
679 | status.infobaraktiv = 0; |
---|
680 | subtitlepause(1); |
---|
681 | status.infobar = 0; |
---|
682 | clearscreen(infobar); |
---|
683 | if(pluginnode != NULL) |
---|
684 | { |
---|
685 | startplugin = dlsym(pluginnode->pluginhandle, "start"); |
---|
686 | if(startplugin != NULL) |
---|
687 | startplugin(); |
---|
688 | } |
---|
689 | status.infobaraktiv = 1; |
---|
690 | drawscreen(skin, 0, 0); |
---|
691 | subtitlepause(0); |
---|
692 | continue; |
---|
693 | */ |
---|
694 | subtitlepause(1); |
---|
695 | status.infobar = 0; |
---|
696 | clearscreen(infobar); |
---|
697 | screenkeyactions(3, 0); |
---|
698 | status.updatevfd = START; |
---|
699 | drawscreen(skin, 0, 0); |
---|
700 | subtitlepause(0); |
---|
701 | continue; |
---|
702 | } |
---|
703 | if(rcret == getrcconfigint("rcmenu", NULL)) |
---|
704 | { |
---|
705 | subtitlepause(1); |
---|
706 | status.infobar = 0; |
---|
707 | status.infobaraktiv = 0; |
---|
708 | clearscreen(infobar); |
---|
709 | menu(getscreen("mainmenu"), 1); |
---|
710 | status.menurelease = 0; |
---|
711 | status.updatevfd = START; |
---|
712 | status.infobaraktiv = 1; |
---|
713 | drawscreen(skin, 0, 0); |
---|
714 | subtitlepause(0); |
---|
715 | continue; |
---|
716 | } |
---|
717 | if(rcret == getrcconfigint("rctimer", NULL)) |
---|
718 | { |
---|
719 | subtitlepause(1); |
---|
720 | status.infobar = 0; |
---|
721 | status.infobaraktiv = 0; |
---|
722 | clearscreen(infobar); |
---|
723 | screenrectimer(); |
---|
724 | drawscreen(skin, 0, 0); |
---|
725 | status.infobaraktiv = 1; |
---|
726 | subtitlepause(0); |
---|
727 | continue; |
---|
728 | } |
---|
729 | if(rcret == getrcconfigint("rcepg", NULL)) |
---|
730 | { |
---|
731 | subtitlepause(1); |
---|
732 | status.infobar = 0; |
---|
733 | status.infobaraktiv = 0; |
---|
734 | clearscreen(infobar); |
---|
735 | epgchoice(NULL); |
---|
736 | drawscreen(skin, 0, 0); |
---|
737 | status.infobaraktiv = 1; |
---|
738 | subtitlepause(0); |
---|
739 | continue; |
---|
740 | } |
---|
741 | if(rcret == getrcconfigint("rcresolution", NULL) || rcret == getrcconfigint("rcresolution1", NULL)) |
---|
742 | { |
---|
743 | subtitlepause(1); |
---|
744 | status.infobar = 0; |
---|
745 | clearscreen(infobar); |
---|
746 | switchvideomode(); |
---|
747 | drawscreen(skin, 0, 0); |
---|
748 | subtitlepause(0); |
---|
749 | continue; |
---|
750 | } |
---|
751 | if(rcret == getrcconfigint("rcinfo", NULL)) |
---|
752 | { |
---|
753 | if(status.infobar == 1) |
---|
754 | { |
---|
755 | if(getconfigint("secondinfobar", NULL) == 2) |
---|
756 | { |
---|
757 | clearscreen(infobar); |
---|
758 | epgchoice(NULL); |
---|
759 | status.infobar = 0; |
---|
760 | drawscreen(skin, 0, 0); |
---|
761 | subtitlepause(0); |
---|
762 | } |
---|
763 | else if(getconfigint("secondinfobar", NULL) == 3) |
---|
764 | { |
---|
765 | clearscreen(infobar); |
---|
766 | screenepg(NULL, NULL, 0); |
---|
767 | status.infobar = 0; |
---|
768 | drawscreen(skin, 0, 0); |
---|
769 | subtitlepause(0); |
---|
770 | } |
---|
771 | else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2) |
---|
772 | { |
---|
773 | if(infobarm != infobar) { |
---|
774 | clearscreen(infobar); |
---|
775 | infobar = infobarm; |
---|
776 | } |
---|
777 | clearscreen(infobar); |
---|
778 | status.infobar = 0; |
---|
779 | drawscreen(skin, 0, 0); |
---|
780 | subtitlepause(0); |
---|
781 | } |
---|
782 | else |
---|
783 | { |
---|
784 | infobar = infobar2; |
---|
785 | drawscreen(infobar, 0, 0); |
---|
786 | } |
---|
787 | } |
---|
788 | else |
---|
789 | { |
---|
790 | subtitlepause(1); |
---|
791 | status.infobar = 1; |
---|
792 | infobar = infobar1; |
---|
793 | drawscreen(infobar, 0, 4); |
---|
794 | } |
---|
795 | continue; |
---|
796 | } |
---|
797 | if(rcret == getrcconfigint("rcpower", NULL)) |
---|
798 | { |
---|
799 | subtitlepause(1); |
---|
800 | status.infobar = 0; |
---|
801 | status.infobaraktiv = 0; |
---|
802 | clearscreen(infobar); |
---|
803 | drawscreen(skin, 0, 0); |
---|
804 | switch(getconfigint("poweraktion", NULL)) |
---|
805 | { |
---|
806 | case 1: //power off |
---|
807 | oshutdown(1, 1); |
---|
808 | break; |
---|
809 | case 2: //standby |
---|
810 | status.standby = 1; |
---|
811 | break; |
---|
812 | case 3: //restart |
---|
813 | oshutdown(2, 1); |
---|
814 | break; |
---|
815 | case 4: //Gui restart |
---|
816 | oshutdown(3, 1); |
---|
817 | break; |
---|
818 | default: |
---|
819 | standbymenu = getscreen("standbymenu"); |
---|
820 | menu(standbymenu, 1); |
---|
821 | break; |
---|
822 | } |
---|
823 | status.updatevfd = START; |
---|
824 | drawscreen(skin, 0, 0); |
---|
825 | status.infobaraktiv = 1; |
---|
826 | subtitlepause(0); |
---|
827 | continue; |
---|
828 | } |
---|
829 | if(rcret == getrcconfigint("rcrecall", NULL)) |
---|
830 | { |
---|
831 | subtitlepause(1); |
---|
832 | clearscreen(infobar); |
---|
833 | drawscreen(skin, 0, 0); |
---|
834 | screenchannelhistory(); |
---|
835 | infobartimeout = 0; |
---|
836 | infobar = infobar1; |
---|
837 | if(status.infobar == 0) |
---|
838 | drawscreen(infobar, 0, 4); |
---|
839 | else |
---|
840 | drawscreen(infobar, 0, 0); |
---|
841 | status.infobar = 1; |
---|
842 | continue; |
---|
843 | } |
---|
844 | if(rcret == getrcconfigint("rc0", NULL)) |
---|
845 | { |
---|
846 | subtitlepause(1); |
---|
847 | clearscreen(infobar); |
---|
848 | drawscreen(skin, 0, 0); |
---|
849 | if(status.lastservice->channel != NULL) |
---|
850 | { |
---|
851 | tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0); |
---|
852 | servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0); |
---|
853 | free(tmpstr); tmpstr = NULL; |
---|
854 | } |
---|
855 | infobartimeout = 0; |
---|
856 | infobar = infobar1; |
---|
857 | if(status.infobar == 0) |
---|
858 | drawscreen(infobar, 0, 4); |
---|
859 | else |
---|
860 | drawscreen(infobar, 0, 0); |
---|
861 | status.infobar = 1; |
---|
862 | continue; |
---|
863 | } |
---|
864 | if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL))) |
---|
865 | { |
---|
866 | subtitlepause(1); |
---|
867 | if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL)) |
---|
868 | { |
---|
869 | status.virtualzap = status.crosscontrol - 1; |
---|
870 | zapup(); |
---|
871 | status.virtualzap = 0; |
---|
872 | } |
---|
873 | else |
---|
874 | zapup(); |
---|
875 | clearscreen(infobar); |
---|
876 | drawscreen(skin, 0, 0); |
---|
877 | infobartimeout = 0; |
---|
878 | status.infobar = 2; |
---|
879 | continue; |
---|
880 | } |
---|
881 | if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL))) |
---|
882 | { |
---|
883 | subtitlepause(1); |
---|
884 | if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL)) |
---|
885 | { |
---|
886 | status.virtualzap = status.crosscontrol - 1; |
---|
887 | zapdown(); |
---|
888 | status.virtualzap = 0; |
---|
889 | } |
---|
890 | else |
---|
891 | zapdown(); |
---|
892 | clearscreen(infobar); |
---|
893 | drawscreen(skin, 0, 0); |
---|
894 | infobartimeout = 0; |
---|
895 | status.infobar = 2; |
---|
896 | continue; |
---|
897 | } |
---|
898 | if(rcret == rcnumber(rcret)) |
---|
899 | { |
---|
900 | subtitlepause(1); |
---|
901 | clearscreen(infobar); |
---|
902 | screenchannelbynr(rcret); |
---|
903 | status.infobar = 2; |
---|
904 | continue; |
---|
905 | } |
---|
906 | //show infobar on program switch (only tv) |
---|
907 | if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0) |
---|
908 | { |
---|
909 | time_t akttime = time(NULL); |
---|
910 | //show infobar only all 60 sec |
---|
911 | if(lasttime < akttime) |
---|
912 | { |
---|
913 | struct epg* tmpepg = getepgakt(status.aktservice->channel); |
---|
914 | if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime) |
---|
915 | { |
---|
916 | lasttime = akttime + 10; |
---|
917 | infobartimeout = 0; |
---|
918 | subtitlepause(1); |
---|
919 | status.infobar = 1; |
---|
920 | infobar = infobar1; |
---|
921 | drawscreen(infobar, 0, 4); |
---|
922 | continue; |
---|
923 | } |
---|
924 | } |
---|
925 | } |
---|
926 | //if(rcret == getrcconfigint("rcpip", NULL) && checkbox("ATEMIO-NEMESIS") == 1) |
---|
927 | if(rcret == getrcconfigint("rcpip", NULL) && checkbox("ATEMIO5200") != 1) // ATEMIO6200 ??? |
---|
928 | { |
---|
929 | if(status.pipservice->videodev == NULL) |
---|
930 | { |
---|
931 | pipchannel = status.aktservice->channel; |
---|
932 | printf("++++ RC: %i\n",pipstart(pipchannel, NULL, 0)); |
---|
933 | } |
---|
934 | else |
---|
935 | { |
---|
936 | pipstop(status.pipservice, 0); |
---|
937 | pipchannel = NULL; |
---|
938 | } |
---|
939 | } |
---|
940 | |
---|
941 | if(rcret == RCTIMEOUT && mark == 0) |
---|
942 | { |
---|
943 | if(getconfigint("infobartimeout", NULL) > infobartimeout) |
---|
944 | { |
---|
945 | //clearscreen(infobar); |
---|
946 | drawscreen(infobar, 0, 0); |
---|
947 | } |
---|
948 | else |
---|
949 | { |
---|
950 | clearscreen(infobar); |
---|
951 | if(infobarm != infobar) { |
---|
952 | infobar = infobarm; |
---|
953 | clearscreen(infobar); |
---|
954 | } |
---|
955 | status.infobar = 0; |
---|
956 | drawscreen(skin, 0, 0); |
---|
957 | subtitlepause(0); |
---|
958 | } |
---|
959 | } |
---|
960 | } |
---|
961 | } |
---|
962 | |
---|
963 | #endif |
---|