source: titan/titan/infobar.h @ 45011

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

change debug#

File size: 37.8 KB
RevLine 
[7862]1#ifndef INFOBAR_H
2#define INFOBAR_H
3
4void screeninfobar()
5{
[16537]6        int rcret = 0, ret = 0, infobartimeout = 0, rcwait = 1000, count = 0, first = 1;
[29597]7        struct channel* pipchannel = NULL;
[25623]8        struct skin* playinfobarpic = getscreen("playinfobarpic");
[32303]9
[32313]10        char* infobar_sel = getskinconfig("infobar_selection", NULL);
11        char* infobar2_sel = getskinconfig("infobar2_selection", NULL);
[32315]12        debug(10, "get initial infobar1=%s", infobar_sel);
13        debug(10, "get initial infobar2=%s", infobar2_sel);
[32303]14
[32314]15        if(infobar_sel == NULL) {
[32486]16                infobar_sel = ostrcat(infobar_sel, "infobar", 1, 0); // fallback to default
[32315]17                debug(10, "fallback to default, set infobar1=%s", infobar_sel);
[32309]18        }
[32308]19
[32314]20        if(infobar2_sel == NULL) {
[32486]21                infobar2_sel = ostrcat(infobar2_sel, "infobar2", 1, 0); // fallback to default
[32315]22                debug(10, "fallback to default, set infobar2=%s", infobar2_sel);
[32309]23        }
[32308]24
[32303]25        struct skin* infobar1 = getscreen(infobar_sel);
[32321]26        debug(10, "final infobar1=%s", infobar_sel);
[32303]27        struct skin* infobar2 = getscreen(infobar2_sel);
[32321]28        debug(10, "final infobar2=%s", infobar2_sel);
[9312]29        struct skin* infobar = infobar1;
[26402]30        struct skin* infobarm = infobar1;
[32303]31
[38592]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
[7862]55        struct skin* standbymenu = NULL;
56        char* tmpstr = NULL; char* tmpnr = NULL;
[15986]57        struct skin* pluginnode = NULL;
58        void (*startplugin)(void);
[19425]59        time_t lasttime = 0;
[19433]60        int mark = 0;
[28828]61        int playstop = 1;
[7862]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
[13963]70        status.infobaraktiv = 1;
[13983]71        status.mcaktiv = 0;
[13963]72       
[20413]73        int playinfobarcount = 0, playinfobarstatus = 0;
[17572]74       
[41783]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))
[28828]76                playstop = 0;
77        else
78                playstop = 1;
79       
[7975]80        while(1)
81        {
[19433]82                mark = 0;
[19560]83
[23789]84                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL))
[19571]85                        writerc(getrcconfigint("rcvolup", NULL));
[23789]86                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL))
[19571]87                        writerc(getrcconfigint("rcvoldown", NULL));
88
[19014]89                //check if mediadb can freed
90                if(status.mediadbthread == NULL)
91                {
92                        if(status.writemediadb == 1)
[19016]93                                writemediadb(getconfig("mediadbfile", NULL), NULL);
[19014]94                        freemediadb(0);
95                }
[17486]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
[7862]103                if(status.standby == 1)
104                        screenstandby();
[17572]105                if(status.infobar == 1 )
[10030]106                {
107                        rcret = waitrc(infobar, 1000, 0);
108                        infobartimeout++;
109                }
[17572]110                else if(status.infobar == 0 && status.timeshift == 1)
111                {
112                        rcret = waitrc(infobar, 1000, 0);
113                        if(rcret == RCTIMEOUT)
[17576]114                        {
[30923]115                                if(status.playpic == 1)
116                                {
117                                        clearscreen(playinfobarpic);
[25623]118                                        drawscreen(playinfobarpic, 0, 0);
119                                }
120                                else
121                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
[17572]122                                continue;
[17576]123                        }
[17572]124                }
[7862]125                else if(status.infobar == 2)
126                {
127                        if(getconfigint("infobarsleep", NULL) > 0)
[8399]128                                rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0);
[16537]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                        }
[7862]134                        else
135                                rcret = RCTIMEOUT;
[16537]136
[7862]137                        if(rcret == RCTIMEOUT)
138                        {
139                                status.infobar = 1;
[9312]140                                infobar = infobar1;
[16511]141                                drawscreen(infobar, 0, 4);
[7862]142                                continue;
143                        }
144                        else
145                                status.infobar = 0;
146                }
147                else
[10030]148                {
[11923]149                        int screensaver_delay = getconfigint("screensaver_delay", NULL);
150                        rcret = 0; count = 0; rcwait = 1000;
[11918]151                        if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1)
[13879]152                        {
[11918]153                                initscreensaver();
[13879]154                                if(screensaver != NULL) screensaver->flag = 1;
155                        }
[19429]156                        if(screensaver == NULL)
157                        {
158                                if(status.infobarprogram == 1) rcwait = 2000;
159                                else rcwait = 0;
160                        }
[11918]161                        while(rcret == 0 || rcret == RCTIMEOUT)
162                        {
163                                rcret = waitrc(infobar, rcwait, 0);
164                                count++;
[19429]165                                if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT))
166                                {
167                                        infobartimeout = 99999;
168                                        mark = 1;
169                                        break;
170                                }
[11923]171                                if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay)
[11918]172                                {
[11981]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);
[11918]177                                        showscreensaver();
[11981]178                                        free(screensaver->value);
[11918]179                                        rcwait = screensaver->speed;
180                                }
181                        }
[13879]182                        if(screensaver != NULL) screensaver->flag = 0;
[11918]183                        deinitscreensaver();
[19429]184                        if(mark == 0)
185                        {
186                                drawscreen(skin, 0, 0);
187                                infobartimeout = 0;
188                        }
[10030]189                }
[7862]190
[31222]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                        }
[41543]216                        if(rcret == getrcconfigint("rcpiprec", NULL))
217                        {
218                                        pipstop(status.pipservice, 0);
219                                        continue;
220                        }                               
[31222]221                }
[34462]222                //Plugin von aussen aufrufen
[34494]223                //if(rcret == RCTIMEOUT && status.extplugin != NULL)
224                if(status.extplugin != NULL)
[34462]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               
[44642]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)))
[9988]246                {
[44708]247                        // currently works only 1 rec or timeshift
[44717]248//                      if(checkbox("VUSOLO2") == 1 && status.recording > 0)
249//                              continue;
[44708]250
[9988]251                        //timeshift
[30921]252                        if(status.playpic == 1)
253                        {
[25623]254                                clearscreen(playinfobarpic);
[30921]255                                status.playpic = 0;
[25623]256                        }
[22246]257                        if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0))
[22248]258                        {
259                                if(status.timeshifttype == 1 && status.timeshiftpos == 0)
[24911]260                                {
[22248]261                                        timeshiftpause(0);
[24911]262                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
[30921]263                                        if(status.playpic == 0)
264                                        {
265                                                drawscreen(playinfobarpic, 0, 0);
266                                                status.playpic = 1;
267                                        }
[24911]268                                }
[22248]269                                else
270                                        timeshiftplay(&playinfobarstatus, &playinfobarcount);
271                        }
[22246]272                        else
[24911]273                        {
[25623]274                                if(status.timeshift == 1)
[30921]275                                        status.playpic = 2;
[25623]276                                else
[30921]277                                        status.playpic = 0;
278
[22246]279                                timeshiftpause(0);
[24911]280                                timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
[30921]281                                if(status.playpic == 0)
282                                {
[25623]283                                        drawscreen(playinfobarpic, 0, 0);
[30921]284                                        status.playpic = 1;
[25623]285                                }
[24911]286                        }
[30921]287
[10030]288                        continue;
[9988]289                }
290                if(status.timeshift == 1)
291                {
[20477]292                        if(rcret == getrcconfigint("rcstop", NULL))
[9988]293                        {
[30921]294                                if(status.playpic == 1)
295                                {
[25623]296                                        clearscreen(playinfobarpic);
[30921]297                                        status.playpic = 0;
[25623]298                                }               
[9988]299                                timeshiftstop(0);
300                                continue;
301                        }
302                        if(rcret == getrcconfigint("rcplay", NULL))
303                        {
[30921]304                                if(status.playpic == 1)
305                                {
[25623]306                                        clearscreen(playinfobarpic);
[30921]307                                        status.playpic = 0;
[25623]308                                }               
[28828]309                                if(playstop == 1 && status.timeshifttype == 1)
[22989]310                                {
[23018]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                                        }
[22989]324                                }
[20477]325                                timeshiftplay(&playinfobarstatus, &playinfobarcount);
[9988]326                                continue;
327                        }
[20413]328                        if(status.timeshifttype == 1 && status.playing == 0)
[9988]329                        {
[30893]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))))
[20542]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                                }
[20413]342                                if(rcret == getrcconfigint("rcfr", NULL))
343                                {
[20542]344                                        timeshiftposplay(&playinfobarstatus, &playinfobarcount);
[20413]345                                        if(status.playing == 1)
346                                                playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
347                                        continue;
[12387]348                                }
[20708]349                                if(getconfig("timeshiftnumkeys", NULL) == 0)
[20413]350                                {
[30893]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                                        }
[20708]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                                        }
[20413]386                                }
[9988]387                        }
[20413]388                        if(status.playing == 1)
[9988]389                        {
[20413]390                                if(rcret == getrcconfigint("rcff", NULL))
391                                {
392                                        playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
393                                        continue;
[12387]394                                }
[20413]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;
[30893]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                                {
[30914]422                                        playrcjumpf(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
[30921]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
[30893]427                                        continue;
428                                }
429                                if(rcret == getrcconfigint("rcleft", NULL))
430                                {
431                                        playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
432                                        continue;
433                                }
[30914]434                                if(rcret == getrcconfigint("rcright", NULL))
435                                {
436                                        playrcjumpf(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
[30921]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
[30914]441                                        continue;
442                                }
[20413]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                                }
[30893]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                                }       
[30895]473                                if(rcret == getrcconfigint("rc8", NULL))
474                                {
475                                        continue;
476                                }
[20415]477                                if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL))
[20413]478                                {
479                                        playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
480                                        continue;       
481                                }
[9988]482                        }
483                }
[20404]484                if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0)
[12890]485                {
486                        subtitlepause(1);
487                        status.infobar = 0;
488                        clearscreen(infobar);
489                        screenrecordstop();
490                        status.updatevfd = START;
[16511]491                        drawscreen(skin, 0, 0);
[12890]492                        subtitlepause(0);
493                        continue;
494                }
[27988]495                if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL)
[37078]496                {
[41783]497                        if(checkbox("DM7020HD") == 0 && checkbox("DM7020HDV2") == 0 && checkbox("DM900") == 0 && checkbox("DM920") == 0 && checkbox("DM520") == 0 && checkbox("DM525") == 0)
[37078]498                                rcret = getrcconfigint("rctvradio", NULL);
499                        else
500                                rcret = getrcconfigint("rcepg", NULL);
501                }
[27988]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))))
[7862]503                {
[8378]504                        int tmpservicetype = status.servicetype;
[14734]505                        status.infobaraktiv = 0;
[7862]506                        subtitlepause(1);
507                        clearscreen(infobar);
[8378]508                        if(rcret == getrcconfigint("rctvradio", NULL))
509                        {
510                                if(status.servicetype == 0)
511                                        status.servicetype = 1;
512                                else
513                                        status.servicetype = 0;
514                        }
[27981]515
516                        if(rcret == getrcconfigint("rctv", NULL))
[34837]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                         
[28094]542                                status.servicetype = 0;
[34837]543                        }
[28094]544                        if(rcret == getrcconfigint("rcradio", NULL))
[27987]545                                status.servicetype = 1;
[27981]546
[16511]547                        drawscreen(skin, 0, 0);
[10685]548                        if(rcret == getrcconfigint("rcfav", NULL))     
549                                ret = screenchannellist(NULL, NULL, 2);
550                        else
551                                ret = screenchannellist(NULL, NULL, 0);
[8378]552                        if(ret >= 20 || ret < 0)
553                                status.servicetype = tmpservicetype;
[16511]554                        drawscreen(skin, 0, 0);
[14734]555                        status.infobaraktiv = 1;
[7862]556                        status.infobar = 2;
[17486]557                        infobartimeout = 0;
[7862]558                        continue;
559                }
[38809]560                if(rcret == getrcconfigint("rcexit", NULL) && status.infobar == 1)
[7862]561                {
[20413]562                        if(status.timeshift == 1 && status.playing == 1)
563                                screenplayinfobar(NULL, NULL, 1, 1, 4);
[7862]564                        subtitlepause(1);
565                        status.infobar = 0;
566                        clearscreen(infobar);
[26403]567                        if(infobarm != infobar) {
568                                infobar = infobarm;
569                                clearscreen(infobar);
570                        }
[16511]571                        drawscreen(skin, 0, 0);
[7862]572                        subtitlepause(0);
[10030]573                        continue;
[7862]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);
[20141]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                                }
[43671]593#ifdef OEBUILD         
594        saveframebuffer();
595#endif
[16511]596                                drawscreen(skin, 0, 0);
[20784]597                                status.tuxtxt = 1;
[28102]598#ifdef MIPSEL
[28037]599                                disablemanualblit();
600                                int tmprcret = -1;
[28708]601                                delrc(getrcconfigint("rcvolup", NULL), NULL, NULL);
602                                delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL);
603
[28037]604                                tmpstr = ostrcat(tmpstr, " &", 1, 0);
[7862]605                                system(tmpstr);
[28037]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                               
[28708]644                                addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
645                                addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
646
[28037]647                                if(status.fdrctxt != -1)
648                                {
649                                        close(status.fdrctxt);
650                                        status.fdrctxt = -1;
651                                }
[43675]652#ifndef OEBUILD
[37988]653                                system("resetfb.sh");
[43675]654#endif
[28102]655                                enablemanualblit();
[28037]656#else
657                                system(tmpstr);
[38001]658#endif
659#ifdef MIPSEL
660
[37988]661                                if(status.aktservice != NULL)
662                                        resetvmpeg(status.aktservice->videodev);
[38001]663#endif
[43671]664#ifdef OEBUILD
665                                restoreframebuffer();
666#endif
[20784]667                                status.tuxtxt = 0;
[7862]668                                free(tmpstr); tmpstr = NULL; tmpnr = NULL;
[16511]669                                drawscreen(skin, 0, 0);
[7862]670                                subtitlepause(0);
671                        }
[10030]672                        continue;
[7862]673                }
[34816]674//      if(rcret == getrcconfigint("rcrecord", NULL))
[34811]675                if(rcret == getrcconfigint("rcrecord", NULL) && status.pvr == 1)
[8142]676                {
[44708]677                        // currently works only 1 rec or timeshift
[44717]678//                      if(checkbox("VUSOLO2") == 1 && status.timeshift == 1)
679//                              continue;
[8142]680                        subtitlepause(1);
681                        status.infobar = 0;
682                        clearscreen(infobar);
683                        screenrecorddirect();
684                        status.updatevfd = START;
[16511]685                        drawscreen(skin, 0, 0);
[8142]686                        subtitlepause(0);
[10030]687                        continue;
[8142]688                }
[34844]689                if((status.pvr == 1 && ((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL))))
[8267]690                {
691                        subtitlepause(1);
692                        status.infobar = 0;
[13963]693                        status.infobaraktiv = 0;
[8267]694                        clearscreen(infobar);
[19953]695                        screenplay(NULL, NULL, 1, 0);
[13963]696                        status.infobaraktiv = 1;
[8267]697                        status.updatevfd = START;
[16511]698                        drawscreen(skin, 0, 0);
[8267]699                        subtitlepause(0);
[10030]700                        continue;
[8267]701                }
[25838]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);
[27664]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);
[25838]714                        continue;
715                }
716
717                if(rcret == getrcconfigint("rcplugin", NULL))
718                {
719                        subtitlepause(1);
720                        status.infobar = 0;
721                        clearscreen(infobar);
[32180]722                        status.updatevfd = PAUSE;
[27657]723                        screenkeyactions(2, 0);
[25838]724                        status.updatevfd = START;
725                        drawscreen(skin, 0, 0);
726                        subtitlepause(0);
727                        continue;
728                }
[7862]729                if(rcret == getrcconfigint("rcred", NULL))
730                {
731                        subtitlepause(1);
732                        status.infobar = 0;
[14005]733                        status.infobaraktiv = 0;
[7862]734                        clearscreen(infobar);
[32174]735                        status.updatevfd = PAUSE;
[11969]736                        screenkeyactions(1, 0);
[14005]737                        status.infobaraktiv = 1;
[7945]738                        status.updatevfd = START;
[16511]739                        drawscreen(skin, 0, 0);
[7862]740                        subtitlepause(0);
[10030]741                        continue;
[7862]742                }
[44180]743                if(rcret == getrcconfigint("rcgreen", NULL) || rcret ==  getrcconfigint("rcvmode", NULL))
[7862]744                {
745                        subtitlepause(1);
746                        status.infobar = 0;
747                        clearscreen(infobar);
[14962]748                        screenvideomode(0);
[16511]749                        drawscreen(skin, 0, 0);
[7862]750                        subtitlepause(0);
[10030]751                        continue;
[7862]752                }
[11804]753                if(rcret == getrcconfigint("rcsubchannel", NULL))
754                {
755                        subtitlepause(1);
756                        status.infobar = 0;
757                        clearscreen(infobar);
758                        screenlinkedchannel();
[16511]759                        drawscreen(skin, 0, 0);
[11804]760                        subtitlepause(0);
761                        continue;
762                }
[12756]763                if(rcret == getrcconfigint("rcsleep", NULL))
764                {
765                        subtitlepause(1);
766                        status.infobar = 0;
767                        clearscreen(infobar);
768                        screenpowerofftimer();
[16511]769                        drawscreen(skin, 0, 0);
[12756]770                        subtitlepause(0);
771                        continue;
772                }
[11477]773                if(rcret == getrcconfigint("rcsubtitel", NULL))
774                {
775                        subtitlepause(1);
776                        status.infobar = 0;
777                        clearscreen(infobar);
778                        screensubtitle();
[16511]779                        drawscreen(skin, 0, 0);
[11477]780                        subtitlepause(0);
781                        continue;
782                }
[27983]783                if(rcret == getrcconfigint("rcyellow", NULL) || rcret == getrcconfigint("rcaudio", NULL))
[7862]784                {
785                        subtitlepause(1);
786                        status.infobar = 0;
787                        clearscreen(infobar);
788                        screenaudiotrack();
[16511]789                        drawscreen(skin, 0, 0);
[7862]790                        subtitlepause(0);
[10030]791                        continue;
[7862]792                }
793                if(rcret == getrcconfigint("rcblue", NULL))
794                {
795                        subtitlepause(1);
796                        status.infobar = 0;
797                        clearscreen(infobar);
[11969]798                        screenkeyactions(0, 0);
[8040]799                        status.updatevfd = START;
[16511]800                        drawscreen(skin, 0, 0);
[7862]801                        subtitlepause(0);
[10030]802                        continue;
[7862]803                }
[45001]804                if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL && file_exist("/usr/bin/browser"))
[15986]805                {
[45001]806#ifdef OEBUILD
807//oebuild hbbtv start
[15986]808                        subtitlepause(1);
809                        status.infobar = 0;
[45001]810                        status.sec = 0;
[15986]811                        clearscreen(infobar);
[45001]812#ifdef OEBUILD
813                saveframebuffer();
814#endif
815                        drawscreen(skin, 0, 0);
816                        status.tuxtxt = 1;
[15986]817
[45001]818                        char* res = NULL;
[45011]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));
[45001]823                        if(res == NULL)
824                        {
[45011]825                                debug(10, "set default res: %s", res);
[45001]826                                res = ostrcat("1280 720", NULL, 0, 0);
827                        }
[45011]828                        tmpstr = ostrcat("run.sh restart ", res, 0, 0);
[45001]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
[45011]839                        debug(10, "cmd=%s", tmpstr);
[45001]840                        system(tmpstr);
841                        free(tmpstr), tmpstr = NULL;
[45011]842                        free(res), res = NULL;
843                        free(cmd), cmd = NULL;
[45001]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
[45011]896                        debug(10, "cmd=%s", tmpstr);
[45001]897                        system(tmpstr);
898                        free(tmpstr), tmpstr = NULL;
[45011]899                        free(res), res = NULL;
900                        free(cmd), cmd = NULL;
901
[45001]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
[15986]922                        pluginnode = getplugin("hbbtv Browser");
923                        if(pluginnode != NULL)
924                        {
[16145]925                                startplugin = dlsym(pluginnode->pluginhandle, "starturl");
[15986]926                                if(startplugin != NULL)
927                                        startplugin();
928                        }
929
930                        status.updatevfd = START;
[16511]931                        drawscreen(skin, 0, 0);
[15986]932                        subtitlepause(0);
[45001]933#endif
[15986]934                        continue;
935                }
[27657]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                }
[19511]952                if(rcret == getrcconfigint("rcmedia", NULL))
[7978]953                {
[27994]954/*
[8096]955                        struct skin* pluginnode = getplugin("Media Center");
[8014]956                        void (*startplugin)(void);
[14005]957                        status.infobaraktiv = 0;
[7978]958                        subtitlepause(1);
959                        status.infobar = 0;
960                        clearscreen(infobar);
[8000]961                        if(pluginnode != NULL)
962                        {
[8014]963                                startplugin = dlsym(pluginnode->pluginhandle, "start");
964                                if(startplugin != NULL)
965                                startplugin();
[8000]966                        }
[14005]967                        status.infobaraktiv = 1;
[16511]968                        drawscreen(skin, 0, 0);
[7978]969                        subtitlepause(0);
[10030]970                        continue;
[27994]971*/
972                        subtitlepause(1);
973                        status.infobar = 0;
974                        clearscreen(infobar);
[32138]975                        status.updatevfd = PAUSE;
[27994]976                        screenkeyactions(3, 0);
977                        status.updatevfd = START;
978                        drawscreen(skin, 0, 0);
979                        subtitlepause(0);
[30921]980                        resettvpic();
[27994]981                        continue;
[7978]982                }
[7862]983                if(rcret == getrcconfigint("rcmenu", NULL))
984                {
985                        subtitlepause(1);
986                        status.infobar = 0;
[14005]987                        status.infobaraktiv = 0;
[7862]988                        clearscreen(infobar);
[14093]989                        menu(getscreen("mainmenu"), 1);
[8466]990                        status.menurelease = 0;
[7862]991                        status.updatevfd = START;
[14005]992                        status.infobaraktiv = 1;
[16511]993                        drawscreen(skin, 0, 0);
[7862]994                        subtitlepause(0);
[10030]995                        continue;
[7862]996                }
[27981]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);
[30921]1007                        resettvpic();
[27981]1008                        continue;
1009                }
[7862]1010                if(rcret == getrcconfigint("rcepg", NULL))
1011                {
1012                        subtitlepause(1);
1013                        status.infobar = 0;
[14734]1014                        status.infobaraktiv = 0;
[7862]1015                        clearscreen(infobar);
[10039]1016                        epgchoice(NULL);
[16511]1017                        drawscreen(skin, 0, 0);
[14734]1018                        status.infobaraktiv = 1;
[7862]1019                        subtitlepause(0);
[10030]1020                        continue;
[7862]1021                }
[27678]1022                if(rcret == getrcconfigint("rcresolution", NULL) || rcret == getrcconfigint("rcresolution1", NULL))
[12154]1023                {
1024                        subtitlepause(1);
1025                        status.infobar = 0;
1026                        clearscreen(infobar);
1027                        switchvideomode();
[16511]1028                        drawscreen(skin, 0, 0);
[12154]1029                        subtitlepause(0);
1030                        continue;
1031                }
[7862]1032                if(rcret == getrcconfigint("rcinfo", NULL))
1033                {
[10698]1034                        if(status.infobar == 1)
[7862]1035                        {
[9480]1036                                if(getconfigint("secondinfobar", NULL) == 2)
[9312]1037                                {
[9480]1038                                        clearscreen(infobar);
[10039]1039                                        epgchoice(NULL);
[9312]1040                                        status.infobar = 0;
[16511]1041                                        drawscreen(skin, 0, 0);
[9312]1042                                        subtitlepause(0);
1043                                }
[20502]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                                }
[9480]1052                                else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2)
1053                                {
[26409]1054                                        if(infobarm != infobar) {
1055                                                clearscreen(infobar);
1056                                                infobar = infobarm;
1057                                        }
1058                                        clearscreen(infobar);
[9480]1059                                        status.infobar = 0;
[16511]1060                                        drawscreen(skin, 0, 0);
[9480]1061                                        subtitlepause(0);
1062                                }
[9312]1063                                else
1064                                {
[26409]1065                                        infobar = infobar2;
1066                                        drawscreen(infobar, 0, 0);
[9312]1067                                }
[7862]1068                        }
1069                        else
1070                        {
1071                                subtitlepause(1);
[10698]1072                                status.infobar = 1;
[9312]1073                                infobar = infobar1;
[16511]1074                                drawscreen(infobar, 0, 4);
[7862]1075                        }
[10030]1076                        continue;
[7862]1077                }
1078                if(rcret == getrcconfigint("rcpower", NULL))
1079                {
1080                        subtitlepause(1);
1081                        status.infobar = 0;
[14734]1082                        status.infobaraktiv = 0;
[7862]1083                        clearscreen(infobar);
[16511]1084                        drawscreen(skin, 0, 0);
[7862]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");
[14093]1101                                        menu(standbymenu, 1);
[7862]1102                                        break;
1103                        }
1104                        status.updatevfd = START;
[16511]1105                        drawscreen(skin, 0, 0);
[14734]1106                        status.infobaraktiv = 1;
[7862]1107                        subtitlepause(0);
[10030]1108                        continue;
[7862]1109                }
[31846]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                }
[38809]1141                if(rcret == getrcconfigint("rcrecall", NULL) || rcret == getrcconfigint("rcexit", NULL))
[7862]1142                {
1143                        subtitlepause(1);
1144                        clearscreen(infobar);
[16511]1145                        drawscreen(skin, 0, 0);
[14910]1146                        screenchannelhistory();
1147                        infobartimeout = 0;
1148                        infobar = infobar1;
1149                        if(status.infobar == 0)
[16511]1150                                drawscreen(infobar, 0, 4);
[14910]1151                        else
[16511]1152                                drawscreen(infobar, 0, 0);
[14910]1153                        status.infobar = 1;
1154                        continue;
1155                }
1156                if(rcret == getrcconfigint("rc0", NULL))
1157                {
1158                        subtitlepause(1);
1159                        clearscreen(infobar);
[16511]1160                        drawscreen(skin, 0, 0);
[7862]1161                        if(status.lastservice->channel != NULL)
[9115]1162                        {
[10849]1163                                tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
1164                                servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
[30985]1165                                free(tmpstr); tmpstr = NULL;
[9115]1166                        }
[10241]1167                        infobartimeout = 0;
[14092]1168                        infobar = infobar1;
1169                        if(status.infobar == 0)
[16511]1170                                drawscreen(infobar, 0, 4);
[14092]1171                        else
[16511]1172                                drawscreen(infobar, 0, 0);
[7862]1173                        status.infobar = 1;
[8020]1174                        continue;
[7862]1175                }
[33792]1176                if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL)))
[7862]1177                {
1178                        subtitlepause(1);
[33792]1179                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL))
[23781]1180                        {
1181                                status.virtualzap = status.crosscontrol - 1;
1182                                zapup();
1183                                status.virtualzap = 0;
1184                        }
1185                        else
1186                                zapup();
[7862]1187                        clearscreen(infobar);
[16511]1188                        drawscreen(skin, 0, 0);
[31033]1189                        if(status.pipzap == 0)
1190                        {       
1191                                infobartimeout = 0;
1192                                status.infobar = 2;
1193                        }
[7862]1194                        continue;
1195                }
[33792]1196                if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL)))
[7862]1197                {
1198                        subtitlepause(1);
[33792]1199                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL))
[23781]1200                        {
1201                                status.virtualzap = status.crosscontrol - 1;
1202                                zapdown();
1203                                status.virtualzap = 0;
1204                        }
1205                        else
1206                                zapdown();
[7862]1207                        clearscreen(infobar);
[16511]1208                        drawscreen(skin, 0, 0);
[31033]1209                        if(status.pipzap == 0)
1210                        {       
1211                                infobartimeout = 0;
1212                                status.infobar = 2;
1213                        }
[7862]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                }
[19425]1224                //show infobar on program switch (only tv)
[19426]1225                if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0)
[19425]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);
[19429]1232                                if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime)
[19425]1233                                {
[19429]1234                                        lasttime = akttime + 10;
1235                                        infobartimeout = 0;
[19425]1236                                        subtitlepause(1);
1237                                        status.infobar = 1;
1238                                        infobar = infobar1;
1239                                        drawscreen(infobar, 0, 4);
1240                                        continue;
1241                                }
1242                        }
1243                }
[40575]1244                // pip atemio7600 ??
[40739]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)       
[20871]1247                {
[29597]1248                        if(status.pipservice->videodev == NULL)
1249                        {
[39797]1250                                printf("---------> %i\n",rcret);
1251                                if(status.recording > 0 && rcret == getrcconfigint("rcpiprec", NULL))
[39803]1252                                {
[39869]1253                                        int i;
1254                                        for(i = 0; i < 9; i++)
[39803]1255                                        {
1256                                                if(status.recchnode[i] != NULL)
1257                                                {
1258                                                        pipchannel = status.recchnode[i];
1259                                                        break;
1260                                                }
1261                                        }
1262                                }
[39797]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;
[29600]1267                                printf("++++ RC: %i\n",pipstart(pipchannel, NULL, 0));
[31029]1268                                pipchannel = NULL;
[29597]1269                        }
[20871]1270                }
[29597]1271       
[40079]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                        {
[40127]1278                                if(ostrstr(value, "off") != NULL)
[40079]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                        }
[40127]1291                        free(value); value=NULL;
[40079]1292                }
1293               
[19433]1294                if(rcret == RCTIMEOUT && mark == 0)
[7862]1295                {
[10030]1296                        if(getconfigint("infobartimeout", NULL) > infobartimeout)
1297                        {
[26401]1298                                //clearscreen(infobar);
[16511]1299                                drawscreen(infobar, 0, 0);
[10030]1300                        }
1301                        else
1302                        {
[26401]1303                                clearscreen(infobar);
[26402]1304                                if(infobarm != infobar) {
1305                                        infobar = infobarm;
1306                                        clearscreen(infobar);
1307                                }
[10030]1308                                status.infobar = 0;
[16511]1309                                drawscreen(skin, 0, 0);
[10030]1310                                subtitlepause(0);
1311                        }
[7862]1312                }
[7975]1313        }
[7862]1314}
1315
1316#endif
Note: See TracBrowser for help on using the repository browser.