source: titan/titan/infobar.h @ 45011

Last change on this file since 45011 was 45011, checked in by obi, 2 years ago

change debug#

File size: 37.8 KB
Line 
1#ifndef INFOBAR_H
2#define INFOBAR_H
3
4void 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                        char* cmd = NULL;
820                        cmd = ostrcat("fbset | sed -nr 's/.*mode.*\\"([^\\"]+)-.*/\\1/p' | tr 'x' ' '", NULL, 0, 0);
821                        debug(10, "cmd=%s", cmd);
822                        res = string_newline(command(cmd));
823                        if(res == NULL)
824                        {
825                                debug(10, "set default res: %s", res);
826                                res = ostrcat("1280 720", NULL, 0, 0);
827                        }
828                        tmpstr = ostrcat("run.sh restart ", res, 0, 0);
829                        tmpstr = ostrcat(tmpstr, " ", 1, 0);
830                        tmpstr = ostrcat(tmpstr, status.aktservice->channel->hbbtvurl, 1, 0);
831                        tmpstr = ostrcat(tmpstr, " &", 1, 0);
832#ifdef MIPSEL
833                        disablemanualblit();
834                        int tmprcret = -1;
835
836                        delrc(getrcconfigint("rcvolup", NULL), NULL, NULL);
837                        delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL);
838
839                        debug(10, "cmd=%s", tmpstr);
840                        system(tmpstr);
841                        free(tmpstr), tmpstr = NULL;
842                        free(res), res = NULL;
843                        free(cmd), cmd = NULL;
844
845                        while(1)
846                        {
847                                rcret = waitrc(infobar, 0, 0);
848                                if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00;
849                                else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01;
850                                else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02;
851                                else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03;
852                                else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04;
853                                else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05;
854                                else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06;
855                                else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07;
856                                else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08;
857                                else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; 
858                                else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A;
859                                else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B;
860                                else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C;
861                                else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D;
862                                else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E;
863                                else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F;       
864                                else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10;
865                                else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11;
866                                else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12;
867                                else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13;               
868                                else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14;
869                                else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15;
870                                else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16;
871                                else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17;
872                                //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18;
873                                else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F;
874                                else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F;
875                               
876                                sendtuxtxt(tmprcret);
877                               
878                                if(rcret == getrcconfigint("rcexit", NULL)) break;
879                                if(rcret == getrcconfigint("rctext", NULL)) break;
880                        }
881                       
882                        addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
883                        addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
884
885                        if(status.fdrctxt != -1)
886                        {
887                                close(status.fdrctxt);
888                                status.fdrctxt = -1;
889                        }
890                        system("killall -9 run.sh browser");
891#ifndef OEBUILD
892                        system("resetfb.sh");
893#endif
894                        enablemanualblit();
895#else
896                        debug(10, "cmd=%s", tmpstr);
897                        system(tmpstr);
898                        free(tmpstr), tmpstr = NULL;
899                        free(res), res = NULL;
900                        free(cmd), cmd = NULL;
901
902#endif
903
904#ifdef MIPSEL
905
906                        if(status.aktservice != NULL)
907                                resetvmpeg(status.aktservice->videodev);
908#endif
909#ifdef OEBUILD
910                        restoreframebuffer();
911#endif
912                        status.tuxtxt = 0;
913                        free(tmpstr); tmpstr = NULL; tmpnr = NULL;
914                        drawscreen(skin, 0, 0);
915                        subtitlepause(0);
916//oebuild hbbtv end
917#else
918                        subtitlepause(1);
919                        status.infobar = 0;
920                        clearscreen(infobar);
921
922                        pluginnode = getplugin("hbbtv Browser");
923                        if(pluginnode != NULL)
924                        {
925                                startplugin = dlsym(pluginnode->pluginhandle, "starturl");
926                                if(startplugin != NULL)
927                                        startplugin();
928                        }
929
930                        status.updatevfd = START;
931                        drawscreen(skin, 0, 0);
932                        subtitlepause(0);
933#endif
934                        continue;
935                }
936                if(rcret == getrcconfigint("rcwww", NULL))
937                {
938                        subtitlepause(1);
939                        status.infobar = 0;
940                        clearscreen(infobar);
941                       
942                        pluginnode = getplugin("Internet Browser");
943                        if(pluginnode != NULL)
944                        {
945                                startplugin = dlsym(pluginnode->pluginhandle, "screenbrowser");
946                                if(startplugin != NULL)
947                                        startplugin();
948                        }
949                        else
950                                textbox(_("Message"), _("Internet Browser Plugin not installed !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
951                }
952                if(rcret == getrcconfigint("rcmedia", NULL))
953                {
954/*
955                        struct skin* pluginnode = getplugin("Media Center");
956                        void (*startplugin)(void);
957                        status.infobaraktiv = 0;
958                        subtitlepause(1);
959                        status.infobar = 0;
960                        clearscreen(infobar);
961                        if(pluginnode != NULL)
962                        {
963                                startplugin = dlsym(pluginnode->pluginhandle, "start");
964                                if(startplugin != NULL)
965                                startplugin();
966                        }
967                        status.infobaraktiv = 1;
968                        drawscreen(skin, 0, 0);
969                        subtitlepause(0);
970                        continue;
971*/
972                        subtitlepause(1);
973                        status.infobar = 0;
974                        clearscreen(infobar);
975                        status.updatevfd = PAUSE;
976                        screenkeyactions(3, 0);
977                        status.updatevfd = START;
978                        drawscreen(skin, 0, 0);
979                        subtitlepause(0);
980                        resettvpic();
981                        continue;
982                }
983                if(rcret == getrcconfigint("rcmenu", NULL))
984                {
985                        subtitlepause(1);
986                        status.infobar = 0;
987                        status.infobaraktiv = 0;
988                        clearscreen(infobar);
989                        menu(getscreen("mainmenu"), 1);
990                        status.menurelease = 0;
991                        status.updatevfd = START;
992                        status.infobaraktiv = 1;
993                        drawscreen(skin, 0, 0);
994                        subtitlepause(0);
995                        continue;
996                }
997                if(rcret == getrcconfigint("rctimer", NULL))
998                {
999                        subtitlepause(1);
1000                        status.infobar = 0;
1001                        status.infobaraktiv = 0;
1002                        clearscreen(infobar);
1003                        screenrectimer();
1004                        drawscreen(skin, 0, 0);
1005                        status.infobaraktiv = 1;
1006                        subtitlepause(0);
1007                        resettvpic();
1008                        continue;
1009                }
1010                if(rcret == getrcconfigint("rcepg", NULL))
1011                {
1012                        subtitlepause(1);
1013                        status.infobar = 0;
1014                        status.infobaraktiv = 0;
1015                        clearscreen(infobar);
1016                        epgchoice(NULL);
1017                        drawscreen(skin, 0, 0);
1018                        status.infobaraktiv = 1;
1019                        subtitlepause(0);
1020                        continue;
1021                }
1022                if(rcret == getrcconfigint("rcresolution", NULL) || rcret == getrcconfigint("rcresolution1", NULL))
1023                {
1024                        subtitlepause(1);
1025                        status.infobar = 0;
1026                        clearscreen(infobar);
1027                        switchvideomode();
1028                        drawscreen(skin, 0, 0);
1029                        subtitlepause(0);
1030                        continue;
1031                }
1032                if(rcret == getrcconfigint("rcinfo", NULL))
1033                {
1034                        if(status.infobar == 1)
1035                        {
1036                                if(getconfigint("secondinfobar", NULL) == 2)
1037                                {
1038                                        clearscreen(infobar);
1039                                        epgchoice(NULL);
1040                                        status.infobar = 0;
1041                                        drawscreen(skin, 0, 0);
1042                                        subtitlepause(0);
1043                                }
1044                                else if(getconfigint("secondinfobar", NULL) == 3)
1045                                {
1046                                        clearscreen(infobar);
1047                                        screenepg(NULL, NULL, 0);
1048                                        status.infobar = 0;
1049                                        drawscreen(skin, 0, 0);
1050                                        subtitlepause(0);
1051                                }
1052                                else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2)
1053                                {
1054                                        if(infobarm != infobar) {
1055                                                clearscreen(infobar);
1056                                                infobar = infobarm;
1057                                        }
1058                                        clearscreen(infobar);
1059                                        status.infobar = 0;
1060                                        drawscreen(skin, 0, 0);
1061                                        subtitlepause(0);
1062                                }
1063                                else
1064                                {
1065                                        infobar = infobar2;
1066                                        drawscreen(infobar, 0, 0);
1067                                }
1068                        }
1069                        else
1070                        {
1071                                subtitlepause(1);
1072                                status.infobar = 1;
1073                                infobar = infobar1;
1074                                drawscreen(infobar, 0, 4);
1075                        }
1076                        continue;
1077                }
1078                if(rcret == getrcconfigint("rcpower", NULL))
1079                {
1080                        subtitlepause(1);
1081                        status.infobar = 0;
1082                        status.infobaraktiv = 0;
1083                        clearscreen(infobar);
1084                        drawscreen(skin, 0, 0);
1085                        switch(getconfigint("poweraktion", NULL))
1086                        {
1087                                case 1: //power off
1088                                        oshutdown(1, 1);
1089                                        break;
1090                                case 2: //standby
1091                                        status.standby = 1;
1092                                        break;
1093                                case 3: //restart
1094                                        oshutdown(2, 1);
1095                                        break;
1096                                case 4: //Gui restart
1097                                        oshutdown(3, 1);
1098                                        break;
1099                                default:
1100                                        standbymenu = getscreen("standbymenu");
1101                                        menu(standbymenu, 1);
1102                                        break;
1103                        }
1104                        status.updatevfd = START;
1105                        drawscreen(skin, 0, 0);
1106                        status.infobaraktiv = 1;
1107                        subtitlepause(0);
1108                        continue;
1109                }
1110                if(rcret == getrcconfigint("rcfrontpower", NULL))
1111                {
1112                        subtitlepause(1);
1113                        status.infobar = 0;
1114                        status.infobaraktiv = 0;
1115                        clearscreen(infobar);
1116                        drawscreen(skin, 0, 0);
1117                        switch(getconfigint("frontpoweraktion", NULL))
1118                        {
1119                                case 1: //power off
1120                                        oshutdown(1, 1);
1121                                        break;
1122                                case 2: //standby
1123                                        status.standby = 1;
1124                                        break;
1125                                case 3: //restart
1126                                        oshutdown(2, 1);
1127                                        break;
1128                                case 4: //Gui restart
1129                                        oshutdown(3, 1);
1130                                        break;
1131                                default:
1132                                        status.standby = 1;
1133                                        break;
1134                        }
1135                        status.updatevfd = START;
1136                        drawscreen(skin, 0, 0);
1137                        status.infobaraktiv = 1;
1138                        subtitlepause(0);
1139                        continue;
1140                }
1141                if(rcret == getrcconfigint("rcrecall", NULL) || rcret == getrcconfigint("rcexit", NULL))
1142                {
1143                        subtitlepause(1);
1144                        clearscreen(infobar);
1145                        drawscreen(skin, 0, 0);
1146                        screenchannelhistory();
1147                        infobartimeout = 0;
1148                        infobar = infobar1;
1149                        if(status.infobar == 0)
1150                                drawscreen(infobar, 0, 4);
1151                        else
1152                                drawscreen(infobar, 0, 0);
1153                        status.infobar = 1;
1154                        continue;
1155                }
1156                if(rcret == getrcconfigint("rc0", NULL))
1157                {
1158                        subtitlepause(1);
1159                        clearscreen(infobar);
1160                        drawscreen(skin, 0, 0);
1161                        if(status.lastservice->channel != NULL)
1162                        {
1163                                tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
1164                                servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
1165                                free(tmpstr); tmpstr = NULL;
1166                        }
1167                        infobartimeout = 0;
1168                        infobar = infobar1;
1169                        if(status.infobar == 0)
1170                                drawscreen(infobar, 0, 4);
1171                        else
1172                                drawscreen(infobar, 0, 0);
1173                        status.infobar = 1;
1174                        continue;
1175                }
1176                if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL)))
1177                {
1178                        subtitlepause(1);
1179                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL))
1180                        {
1181                                status.virtualzap = status.crosscontrol - 1;
1182                                zapup();
1183                                status.virtualzap = 0;
1184                        }
1185                        else
1186                                zapup();
1187                        clearscreen(infobar);
1188                        drawscreen(skin, 0, 0);
1189                        if(status.pipzap == 0)
1190                        {       
1191                                infobartimeout = 0;
1192                                status.infobar = 2;
1193                        }
1194                        continue;
1195                }
1196                if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL)))
1197                {
1198                        subtitlepause(1);
1199                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL))
1200                        {
1201                                status.virtualzap = status.crosscontrol - 1;
1202                                zapdown();
1203                                status.virtualzap = 0;
1204                        }
1205                        else
1206                                zapdown();
1207                        clearscreen(infobar);
1208                        drawscreen(skin, 0, 0);
1209                        if(status.pipzap == 0)
1210                        {       
1211                                infobartimeout = 0;
1212                                status.infobar = 2;
1213                        }
1214                        continue;
1215                }
1216                if(rcret == rcnumber(rcret))
1217                {
1218                        subtitlepause(1);
1219                        clearscreen(infobar);
1220                        screenchannelbynr(rcret);
1221                        status.infobar = 2;
1222                        continue;
1223                }
1224                //show infobar on program switch (only tv)
1225                if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0)
1226                {
1227                        time_t akttime = time(NULL);
1228                        //show infobar only all 60 sec
1229                        if(lasttime < akttime)
1230                        {
1231                                struct epg* tmpepg = getepgakt(status.aktservice->channel);
1232                                if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime)
1233                                {
1234                                        lasttime = akttime + 10;
1235                                        infobartimeout = 0;
1236                                        subtitlepause(1);
1237                                        status.infobar = 1;
1238                                        infobar = infobar1;
1239                                        drawscreen(infobar, 0, 4);
1240                                        continue;
1241                                }
1242                        }
1243                }
1244                // pip atemio7600 ??
1245                //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))
1246                if((rcret == getrcconfigint("rcpip", NULL) || rcret == getrcconfigint("rcpiprec", NULL)) && status.videodevs > 1)       
1247                {
1248                        if(status.pipservice->videodev == NULL)
1249                        {
1250                                printf("---------> %i\n",rcret);
1251                                if(status.recording > 0 && rcret == getrcconfigint("rcpiprec", NULL))
1252                                {
1253                                        int i;
1254                                        for(i = 0; i < 9; i++)
1255                                        {
1256                                                if(status.recchnode[i] != NULL)
1257                                                {
1258                                                        pipchannel = status.recchnode[i];
1259                                                        break;
1260                                                }
1261                                        }
1262                                }
1263                                else if(rcret == getrcconfigint("rcpiprec", NULL))
1264                                        textbox(_("Message"), _("no record channel found"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0);
1265                                else   
1266                                        pipchannel = status.aktservice->channel;
1267                                printf("++++ RC: %i\n",pipstart(pipchannel, NULL, 0));
1268                                pipchannel = NULL;
1269                        }
1270                }
1271       
1272                if(rcret == getrcconfigint("rchdmi", NULL))
1273                {
1274                        char *value = NULL;
1275                        value = readsys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", 1);
1276                        if(value != NULL)
1277                        {
1278                                if(ostrstr(value, "off") != NULL)
1279                                {
1280                                        writesys("/proc/stb/video/videomode", "720p", 1);
1281                                        writesys("/proc/stb/audio/hdmi_rx_monitor", "on", 1);
1282                                        writesys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", "on", 1);
1283                                }
1284                                else
1285                                {
1286                                        writesys("/proc/stb/audio/hdmi_rx_monitor", "off", 1);
1287                                        writesys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", "off", 1);
1288                                        setvideomode(getconfig("av_videomode", NULL), 0);
1289                                }
1290                        }
1291                        free(value); value=NULL;
1292                }
1293               
1294                if(rcret == RCTIMEOUT && mark == 0)
1295                {
1296                        if(getconfigint("infobartimeout", NULL) > infobartimeout)
1297                        {
1298                                //clearscreen(infobar);
1299                                drawscreen(infobar, 0, 0);
1300                        }
1301                        else
1302                        {
1303                                clearscreen(infobar);
1304                                if(infobarm != infobar) {
1305                                        infobar = infobarm;
1306                                        clearscreen(infobar);
1307                                }
1308                                status.infobar = 0;
1309                                drawscreen(skin, 0, 0);
1310                                subtitlepause(0);
1311                        }
1312                }
1313        }
1314}
1315
1316#endif
Note: See TracBrowser for help on using the repository browser.