source: titan/titan/infobar.h @ 37106

Last change on this file since 37106 was 37106, checked in by gost, 8 years ago

[titan] atmio6200 aktivate pip for test

File size: 30.9 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
[7862]32        struct skin* standbymenu = NULL;
33        char* tmpstr = NULL; char* tmpnr = NULL;
[15986]34        struct skin* pluginnode = NULL;
35        void (*startplugin)(void);
[19425]36        time_t lasttime = 0;
[19433]37        int mark = 0;
[28828]38        int playstop = 1;
[7862]39
40        status.mute = 0;
41        status.infobar = 2;
42
43        addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
44        addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
45        addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL);
46
[13963]47        status.infobaraktiv = 1;
[13983]48        status.mcaktiv = 0;
[13963]49       
[20413]50        int playinfobarcount = 0, playinfobarstatus = 0;
[17572]51       
[37074]52        if(file_exist("/etc/.mipsel") || ((checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1 || checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 1) && ostrcmp(getconfig("remotecontrol", NULL), "1") != 1))
[28828]53                playstop = 0;
54        else
55                playstop = 1;
56       
[7975]57        while(1)
58        {
[19433]59                mark = 0;
[19560]60
[23789]61                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL))
[19571]62                        writerc(getrcconfigint("rcvolup", NULL));
[23789]63                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL))
[19571]64                        writerc(getrcconfigint("rcvoldown", NULL));
65
[19014]66                //check if mediadb can freed
67                if(status.mediadbthread == NULL)
68                {
69                        if(status.writemediadb == 1)
[19016]70                                writemediadb(getconfig("mediadbfile", NULL), NULL);
[19014]71                        freemediadb(0);
72                }
[17486]73                //check if picmem times out and must freed
74                if(time(NULL) > status.picmemtimeout + 60)
75                {
76                        checkpictimeout();
77                        status.picmemtimeout = time(NULL);
78                }
79
[7862]80                if(status.standby == 1)
81                        screenstandby();
[17572]82                if(status.infobar == 1 )
[10030]83                {
84                        rcret = waitrc(infobar, 1000, 0);
85                        infobartimeout++;
86                }
[17572]87                else if(status.infobar == 0 && status.timeshift == 1)
88                {
89                        rcret = waitrc(infobar, 1000, 0);
90                        if(rcret == RCTIMEOUT)
[17576]91                        {
[30923]92                                if(status.playpic == 1)
93                                {
94                                        clearscreen(playinfobarpic);
[25623]95                                        drawscreen(playinfobarpic, 0, 0);
96                                }
97                                else
98                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
[17572]99                                continue;
[17576]100                        }
[17572]101                }
[7862]102                else if(status.infobar == 2)
103                {
104                        if(getconfigint("infobarsleep", NULL) > 0)
[8399]105                                rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0);
[16537]106                        else if(first == 1) //only on first start wait a little for epg
107                        {
108                                first = 0;
109                                rcret = waitrc(infobar, 1000, 0);
110                        }
[7862]111                        else
112                                rcret = RCTIMEOUT;
[16537]113
[7862]114                        if(rcret == RCTIMEOUT)
115                        {
116                                status.infobar = 1;
[9312]117                                infobar = infobar1;
[16511]118                                drawscreen(infobar, 0, 4);
[7862]119                                continue;
120                        }
121                        else
122                                status.infobar = 0;
123                }
124                else
[10030]125                {
[11923]126                        int screensaver_delay = getconfigint("screensaver_delay", NULL);
127                        rcret = 0; count = 0; rcwait = 1000;
[11918]128                        if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1)
[13879]129                        {
[11918]130                                initscreensaver();
[13879]131                                if(screensaver != NULL) screensaver->flag = 1;
132                        }
[19429]133                        if(screensaver == NULL)
134                        {
135                                if(status.infobarprogram == 1) rcwait = 2000;
136                                else rcwait = 0;
137                        }
[11918]138                        while(rcret == 0 || rcret == RCTIMEOUT)
139                        {
140                                rcret = waitrc(infobar, rcwait, 0);
141                                count++;
[19429]142                                if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT))
143                                {
144                                        infobartimeout = 99999;
145                                        mark = 1;
146                                        break;
147                                }
[11923]148                                if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay)
[11918]149                                {
[11981]150                                        if(status.aktservice->channel != NULL)
151                                                screensaver->value = ostrcat(status.aktservice->channel->name, NULL, 0, 0);
152                                        else
153                                                screensaver->value = ostrcat("Radio", NULL, 0, 0);
[11918]154                                        showscreensaver();
[11981]155                                        free(screensaver->value);
[11918]156                                        rcwait = screensaver->speed;
157                                }
158                        }
[13879]159                        if(screensaver != NULL) screensaver->flag = 0;
[11918]160                        deinitscreensaver();
[19429]161                        if(mark == 0)
162                        {
163                                drawscreen(skin, 0, 0);
164                                infobartimeout = 0;
165                        }
[10030]166                }
[7862]167
[31222]168                if(status.pipservice->videodev != NULL)
169                {
170                        if(rcret == getrcconfigint("rcpip", NULL))
171                        {
172                                if(getconfigint("pip_screen", NULL) == 1)
173                                {
174                                        pipstop(status.pipservice, 0);
175                                        continue;
176                                }
177                                else
178                                {
179                                        pipmenu();
180                                        drawscreen(skin, 0, 0);
181                                        clearscreen(infobar);
182                                        continue;
183                                }
184                        }
185                        if(rcret == getrcconfigint("rc0", NULL))
186                        {
187                                if(getconfigint("pip_swap", NULL) == 1)
188                                {
189                                        pipswap(status.pipservice);
190                                        continue;
191                                }
192                        }
193                }
[34462]194                //Plugin von aussen aufrufen
[34494]195                //if(rcret == RCTIMEOUT && status.extplugin != NULL)
196                if(status.extplugin != NULL)
[34462]197                {
198                        subtitlepause(1);
199                        status.infobar = 0;
200                        clearscreen(infobar);
201
202                        pluginnode = getplugin(status.extplugin);
203                        free(status.extplugin); status.extplugin = NULL;
204                        if(pluginnode != NULL)
205                        {
206                                startplugin = dlsym(pluginnode->pluginhandle, "start");
207                                if(startplugin != NULL)
208                                        startplugin();
209                        }
210                        status.updatevfd = START;
211                        drawscreen(skin, 0, 0);
212                        subtitlepause(0);
213                        continue;
214                }
215                       
216               
[37074]217                if(status.pvr == 1 && (rcret == getrcconfigint("rcpause", NULL) || ((checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 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]218                {
219                        //timeshift
[30921]220                        if(status.playpic == 1)
221                        {
[25623]222                                clearscreen(playinfobarpic);
[30921]223                                status.playpic = 0;
[25623]224                        }
[22246]225                        if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0))
[22248]226                        {
227                                if(status.timeshifttype == 1 && status.timeshiftpos == 0)
[24911]228                                {
[22248]229                                        timeshiftpause(0);
[24911]230                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
[30921]231                                        if(status.playpic == 0)
232                                        {
233                                                drawscreen(playinfobarpic, 0, 0);
234                                                status.playpic = 1;
235                                        }
[24911]236                                }
[22248]237                                else
238                                        timeshiftplay(&playinfobarstatus, &playinfobarcount);
239                        }
[22246]240                        else
[24911]241                        {
[25623]242                                if(status.timeshift == 1)
[30921]243                                        status.playpic = 2;
[25623]244                                else
[30921]245                                        status.playpic = 0;
246
[22246]247                                timeshiftpause(0);
[24911]248                                timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
[30921]249                                if(status.playpic == 0)
250                                {
[25623]251                                        drawscreen(playinfobarpic, 0, 0);
[30921]252                                        status.playpic = 1;
[25623]253                                }
[24911]254                        }
[30921]255
[10030]256                        continue;
[9988]257                }
258                if(status.timeshift == 1)
259                {
[20477]260                        if(rcret == getrcconfigint("rcstop", NULL))
[9988]261                        {
[30921]262                                if(status.playpic == 1)
263                                {
[25623]264                                        clearscreen(playinfobarpic);
[30921]265                                        status.playpic = 0;
[25623]266                                }               
[9988]267                                timeshiftstop(0);
268                                continue;
269                        }
270                        if(rcret == getrcconfigint("rcplay", NULL))
271                        {
[30921]272                                if(status.playpic == 1)
273                                {
[25623]274                                        clearscreen(playinfobarpic);
[30921]275                                        status.playpic = 0;
[25623]276                                }               
[28828]277                                if(playstop == 1 && status.timeshifttype == 1)
[22989]278                                {
[23018]279                                        if(status.playing == 0 || (status.playspeed == 0 && status.slowspeed == 0 && status.pause == 0))
280                                        {
281                                                subtitlepause(1);
282                                                status.infobar = 0;
283                                                status.infobaraktiv = 0;
284                                                clearscreen(infobar);
285                                                screenplay(NULL, NULL, 1, 0);
286                                                status.infobaraktiv = 1;
287                                                status.updatevfd = START;
288                                                drawscreen(skin, 0, 0);
289                                                subtitlepause(0);
290                                                continue;
291                                        }
[22989]292                                }
[20477]293                                timeshiftplay(&playinfobarstatus, &playinfobarcount);
[9988]294                                continue;
295                        }
[20413]296                        if(status.timeshifttype == 1 && status.playing == 0)
[9988]297                        {
[30893]298                                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]299                                {
300                                        struct service* snode = getservice(RECORDTIMESHIFT, 0);
301                                        if(snode != NULL)
302                                        {
303                                                status.playercan = 0x7FFF;
304                                                playinfobarstatus = 1;
305                                                playinfobarcount = 0;
306                                                screenplayinfobar(snode->recname, NULL, 0, 1, 5);
307                                        }
308                                        continue;
309                                }
[20413]310                                if(rcret == getrcconfigint("rcfr", NULL))
311                                {
[20542]312                                        timeshiftposplay(&playinfobarstatus, &playinfobarcount);
[20413]313                                        if(status.playing == 1)
314                                                playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
315                                        continue;
[12387]316                                }
[20708]317                                if(getconfig("timeshiftnumkeys", NULL) == 0)
[20413]318                                {
[30893]319                                        if(rcret == getrcconfigint("rcleft", NULL))
320                                        {
321                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
322                                                if(status.playing == 1)
323                                                        playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
324                                                continue;
325                                        }
326                                        if(rcret == getrcconfigint("rcdown", NULL))
327                                        {
328                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
329                                                if(status.playing == 1)
330                                                        playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
331                                                continue;
332                                        }
[20708]333                                        if(rcret == getrcconfigint("rc1", NULL))
334                                        {
335                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
336                                                if(status.playing == 1)
337                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
338                                                continue;
339                                        }
340                                        if(rcret == getrcconfigint("rc4", NULL))
341                                        {
342                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
343                                                if(status.playing == 1)
344                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
345                                                continue;
346                                        }
347                                        if(rcret == getrcconfigint("rc7", NULL))
348                                        {
349                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
350                                                if(status.playing == 1)
351                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
352                                                continue;
353                                        }
[20413]354                                }
[9988]355                        }
[20413]356                        if(status.playing == 1)
[9988]357                        {
[20413]358                                if(rcret == getrcconfigint("rcff", NULL))
359                                {
360                                        playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
361                                        continue;
[12387]362                                }
[20413]363                                if(rcret == getrcconfigint("rcfr", NULL))
364                                {
365                                        playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
366                                        continue;
367                                }
368                                if(rcret == getrcconfigint("rc3", NULL))
369                                {
370                                        playrcjumpf(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
371                                        continue;
372                                }
373                                if(rcret == getrcconfigint("rc6", NULL))
374                                {
375                                        playrcjumpf(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
376                                        continue;
377                                }
378                                if(rcret == getrcconfigint("rc9", NULL))
379                                {                               
380                                        playrcjumpf(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
381                                        continue;
[30893]382                                }
383                                if(rcret == getrcconfigint("rcdown", NULL))
384                                {
385                                        playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
386                                        continue;
387                                }
388                                if(rcret == getrcconfigint("rcup", NULL))
389                                {
[30914]390                                        playrcjumpf(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
[30921]391#ifdef MIPSEL
392// workaround fixes image flicker when jumping over the border also
393                                        playrcjumpr(status.playfile, NULL, 10, &playinfobarstatus, &playinfobarcount, 1, 4);
394#endif
[30893]395                                        continue;
396                                }
397                                if(rcret == getrcconfigint("rcleft", NULL))
398                                {
399                                        playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
400                                        continue;
401                                }
[30914]402                                if(rcret == getrcconfigint("rcright", NULL))
403                                {
404                                        playrcjumpf(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
[30921]405#ifdef MIPSEL
406// workaround fixes image flicker when jumping over the border also
407                                        playrcjumpr(status.playfile, NULL, 10, &playinfobarstatus, &playinfobarcount, 1, 4);
408#endif
[30914]409                                        continue;
410                                }
[20413]411                                if(rcret == getrcconfigint("rc1", NULL))
412                                {
413                                        playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
414                                        continue;
415                                }
416                                if(rcret == getrcconfigint("rc4", NULL))
417                                {
418                                        playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
419                                        continue;
420                                }
421                                if(rcret == getrcconfigint("rc7", NULL))
422                                {
423                                        playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
424                                        continue;
425                                }
[30893]426                                if(rcret == getrcconfigint("rc2", NULL))
427                                {
428                                        playrcjumpto(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
429                                        continue;
430                                }
431                                if(rcret == getrcconfigint("rc0", NULL))
432                                {
433                                        setmarker();
434                                        continue;
435                                }
436                                if(rcret == getrcconfigint("rc5", NULL))
437                                {
438                                        screenmarker(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
439                                        continue;
440                                }       
[30895]441                                if(rcret == getrcconfigint("rc8", NULL))
442                                {
443                                        continue;
444                                }
[20415]445                                if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL))
[20413]446                                {
447                                        playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
448                                        continue;       
449                                }
[9988]450                        }
451                }
[20404]452                if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0)
[12890]453                {
454                        subtitlepause(1);
455                        status.infobar = 0;
456                        clearscreen(infobar);
457                        screenrecordstop();
458                        status.updatevfd = START;
[16511]459                        drawscreen(skin, 0, 0);
[12890]460                        subtitlepause(0);
461                        continue;
462                }
[27988]463                if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL)
[37078]464                {
465                        if(checkbox("DM7020HD") == 0 && checkbox("DM7020HDV2") == 0)
466                                rcret = getrcconfigint("rctvradio", NULL);
467                        else
468                                rcret = getrcconfigint("rcepg", NULL);
469                }
[27988]470                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]471                {
[8378]472                        int tmpservicetype = status.servicetype;
[14734]473                        status.infobaraktiv = 0;
[7862]474                        subtitlepause(1);
475                        clearscreen(infobar);
[8378]476                        if(rcret == getrcconfigint("rctvradio", NULL))
477                        {
478                                if(status.servicetype == 0)
479                                        status.servicetype = 1;
480                                else
481                                        status.servicetype = 0;
482                        }
[27981]483
484                        if(rcret == getrcconfigint("rctv", NULL))
[34837]485                        {
486#ifdef MIPSEL
487                                if(checkchipset("BCM7424") == 1 && status.servicetype == 0)
488                                {
489                                        if(status.aktservice->type == CHANNEL)
490                                                servicefullHDMIin_start();
491                                        else if(status.aktservice->type == HDMIIN)
492                                        {
493                                                if(status.lastservice->channel != NULL)
494                                                {
495                                                        tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
496                                                        servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
497                                                        free(tmpstr); tmpstr = NULL;
498                                                }
499                                        }
500                                        infobartimeout = 0;
501                                        infobar = infobar1;
502                                        if(status.infobar == 0)
503                                                drawscreen(infobar, 0, 4);
504                                        else
505                                                drawscreen(infobar, 0, 0);
506                                        status.infobar = 1;
507                                        continue;
508                                }
509#endif                         
[28094]510                                status.servicetype = 0;
[34837]511                        }
[28094]512                        if(rcret == getrcconfigint("rcradio", NULL))
[27987]513                                status.servicetype = 1;
[27981]514
[16511]515                        drawscreen(skin, 0, 0);
[10685]516                        if(rcret == getrcconfigint("rcfav", NULL))     
517                                ret = screenchannellist(NULL, NULL, 2);
518                        else
519                                ret = screenchannellist(NULL, NULL, 0);
[8378]520                        if(ret >= 20 || ret < 0)
521                                status.servicetype = tmpservicetype;
[16511]522                        drawscreen(skin, 0, 0);
[14734]523                        status.infobaraktiv = 1;
[7862]524                        status.infobar = 2;
[17486]525                        infobartimeout = 0;
[7862]526                        continue;
527                }
528                if(rcret == getrcconfigint("rcexit", NULL))
529                {
[20413]530                        if(status.timeshift == 1 && status.playing == 1)
531                                screenplayinfobar(NULL, NULL, 1, 1, 4);
[7862]532                        subtitlepause(1);
533                        status.infobar = 0;
534                        clearscreen(infobar);
[26403]535                        if(infobarm != infobar) {
536                                infobar = infobarm;
537                                clearscreen(infobar);
538                        }
[16511]539                        drawscreen(skin, 0, 0);
[7862]540                        subtitlepause(0);
[10030]541                        continue;
[7862]542                }
543                if(rcret == getrcconfigint("rctext", NULL))
544                {
545                        if(status.aktservice->channel != NULL && status.aktservice->channel->txtpid > 0)
546                        {
547                                subtitlepause(1);
548                                status.infobar = 0;
549                                status.sec = 0;
550                                clearscreen(infobar);
551                                tmpstr = ostrcat(getconfig("tuxtxtfile", NULL), " ", 0, 0);
552                                tmpnr = oitoa(status.aktservice->channel->txtpid);
553                                tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
[20141]554       
555                                if(status.aktservice->fedev != NULL)
556                                {
557                                        tmpnr = oitoa(status.aktservice->fedev->devnr);
558                                        tmpstr = ostrcat(tmpstr, " ", 1, 0);
559                                        tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
560                                }
561       
[16511]562                                drawscreen(skin, 0, 0);
[20784]563                                status.tuxtxt = 1;
[28102]564#ifdef MIPSEL
[28037]565                                disablemanualblit();
566                                int tmprcret = -1;
[28708]567                                delrc(getrcconfigint("rcvolup", NULL), NULL, NULL);
568                                delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL);
569
[28037]570                                tmpstr = ostrcat(tmpstr, " &", 1, 0);
[7862]571                                system(tmpstr);
[28037]572
573                                while(1)
574                                {
575                                        rcret = waitrc(infobar, 0, 0);
576                                        if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00;
577                                        else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01;
578                                        else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02;
579                                        else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03;
580                                        else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04;
581                                        else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05;
582                                        else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06;
583                                        else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07;
584                                        else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08;
585                                        else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; 
586                                        else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A;
587                                        else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B;
588                                        else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C;
589                                        else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D;
590                                        else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E;
591                                        else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F;       
592                                        else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10;
593                                        else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11;
594                                        else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12;
595                                        else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13;               
596                                        else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14;
597                                        else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15;
598                                        else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16;
599                                        else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17;
600                                        //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18;
601                                        else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F;
602                                        else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F;
603                                       
604                                        sendtuxtxt(tmprcret);
605                                       
606                                        if(rcret == getrcconfigint("rcexit", NULL)) break;
607                                        if(rcret == getrcconfigint("rctext", NULL)) break;
608                                }
609                               
[28708]610                                addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
611                                addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
612
[28037]613                                if(status.fdrctxt != -1)
614                                {
615                                        close(status.fdrctxt);
616                                        status.fdrctxt = -1;
617                                }
[28102]618                                enablemanualblit();
[28037]619#else
620                                system(tmpstr);
621#endif                         
[20784]622                                status.tuxtxt = 0;
[7862]623                                free(tmpstr); tmpstr = NULL; tmpnr = NULL;
[16511]624                                drawscreen(skin, 0, 0);
[7862]625                                subtitlepause(0);
626                        }
[10030]627                        continue;
[7862]628                }
[34816]629//      if(rcret == getrcconfigint("rcrecord", NULL))
[34811]630                if(rcret == getrcconfigint("rcrecord", NULL) && status.pvr == 1)
[8142]631                {
632                        subtitlepause(1);
633                        status.infobar = 0;
634                        clearscreen(infobar);
635                        screenrecorddirect();
636                        status.updatevfd = START;
[16511]637                        drawscreen(skin, 0, 0);
[8142]638                        subtitlepause(0);
[10030]639                        continue;
[8142]640                }
[34844]641                if((status.pvr == 1 && ((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL))))
[8267]642                {
643                        subtitlepause(1);
644                        status.infobar = 0;
[13963]645                        status.infobaraktiv = 0;
[8267]646                        clearscreen(infobar);
[19953]647                        screenplay(NULL, NULL, 1, 0);
[13963]648                        status.infobaraktiv = 1;
[8267]649                        status.updatevfd = START;
[16511]650                        drawscreen(skin, 0, 0);
[8267]651                        subtitlepause(0);
[10030]652                        continue;
[8267]653                }
[25838]654                if(rcret == getrcconfigint("rcshoot", NULL))
655                {
656                        subtitlepause(1);
657                        status.infobar = 0;
658                        status.infobaraktiv = 0;
659                        clearscreen(infobar);
660                        screenshoot(0);
661                        status.infobaraktiv = 1;
662                        status.updatevfd = START;
663                        drawscreen(skin, 0, 0);
664                        subtitlepause(0);
[27664]665                        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]666                        continue;
667                }
668
669                if(rcret == getrcconfigint("rcplugin", NULL))
670                {
671                        subtitlepause(1);
672                        status.infobar = 0;
673                        clearscreen(infobar);
[32180]674                        status.updatevfd = PAUSE;
[27657]675                        screenkeyactions(2, 0);
[25838]676                        status.updatevfd = START;
677                        drawscreen(skin, 0, 0);
678                        subtitlepause(0);
679                        continue;
680                }
[7862]681                if(rcret == getrcconfigint("rcred", NULL))
682                {
683                        subtitlepause(1);
684                        status.infobar = 0;
[14005]685                        status.infobaraktiv = 0;
[7862]686                        clearscreen(infobar);
[32174]687                        status.updatevfd = PAUSE;
[11969]688                        screenkeyactions(1, 0);
[14005]689                        status.infobaraktiv = 1;
[7945]690                        status.updatevfd = START;
[16511]691                        drawscreen(skin, 0, 0);
[7862]692                        subtitlepause(0);
[10030]693                        continue;
[7862]694                }
695                if(rcret == getrcconfigint("rcgreen", NULL))
696                {
697                        subtitlepause(1);
698                        status.infobar = 0;
699                        clearscreen(infobar);
[14962]700                        screenvideomode(0);
[16511]701                        drawscreen(skin, 0, 0);
[7862]702                        subtitlepause(0);
[10030]703                        continue;
[7862]704                }
[11804]705                if(rcret == getrcconfigint("rcsubchannel", NULL))
706                {
707                        subtitlepause(1);
708                        status.infobar = 0;
709                        clearscreen(infobar);
710                        screenlinkedchannel();
[16511]711                        drawscreen(skin, 0, 0);
[11804]712                        subtitlepause(0);
713                        continue;
714                }
[12756]715                if(rcret == getrcconfigint("rcsleep", NULL))
716                {
717                        subtitlepause(1);
718                        status.infobar = 0;
719                        clearscreen(infobar);
720                        screenpowerofftimer();
[16511]721                        drawscreen(skin, 0, 0);
[12756]722                        subtitlepause(0);
723                        continue;
724                }
[11477]725                if(rcret == getrcconfigint("rcsubtitel", NULL))
726                {
727                        subtitlepause(1);
728                        status.infobar = 0;
729                        clearscreen(infobar);
730                        screensubtitle();
[16511]731                        drawscreen(skin, 0, 0);
[11477]732                        subtitlepause(0);
733                        continue;
734                }
[27983]735                if(rcret == getrcconfigint("rcyellow", NULL) || rcret == getrcconfigint("rcaudio", NULL))
[7862]736                {
737                        subtitlepause(1);
738                        status.infobar = 0;
739                        clearscreen(infobar);
740                        screenaudiotrack();
[16511]741                        drawscreen(skin, 0, 0);
[7862]742                        subtitlepause(0);
[10030]743                        continue;
[7862]744                }
745                if(rcret == getrcconfigint("rcblue", NULL))
746                {
747                        subtitlepause(1);
748                        status.infobar = 0;
749                        clearscreen(infobar);
[11969]750                        screenkeyactions(0, 0);
[8040]751                        status.updatevfd = START;
[16511]752                        drawscreen(skin, 0, 0);
[7862]753                        subtitlepause(0);
[10030]754                        continue;
[7862]755                }
[15986]756                if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL)
757                {
758                        subtitlepause(1);
759                        status.infobar = 0;
760                        clearscreen(infobar);
761
762                        pluginnode = getplugin("hbbtv Browser");
763                        if(pluginnode != NULL)
764                        {
[16145]765                                startplugin = dlsym(pluginnode->pluginhandle, "starturl");
[15986]766                                if(startplugin != NULL)
767                                        startplugin();
768                        }
769
770                        status.updatevfd = START;
[16511]771                        drawscreen(skin, 0, 0);
[15986]772                        subtitlepause(0);
773                        continue;
774                }
[27657]775                if(rcret == getrcconfigint("rcwww", NULL))
776                {
777                        subtitlepause(1);
778                        status.infobar = 0;
779                        clearscreen(infobar);
780                       
781                        pluginnode = getplugin("Internet Browser");
782                        if(pluginnode != NULL)
783                        {
784                                startplugin = dlsym(pluginnode->pluginhandle, "screenbrowser");
785                                if(startplugin != NULL)
786                                        startplugin();
787                        }
788                        else
789                                textbox(_("Message"), _("Internet Browser Plugin not installed !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
790                }
[19511]791                if(rcret == getrcconfigint("rcmedia", NULL))
[7978]792                {
[27994]793/*
[8096]794                        struct skin* pluginnode = getplugin("Media Center");
[8014]795                        void (*startplugin)(void);
[14005]796                        status.infobaraktiv = 0;
[7978]797                        subtitlepause(1);
798                        status.infobar = 0;
799                        clearscreen(infobar);
[8000]800                        if(pluginnode != NULL)
801                        {
[8014]802                                startplugin = dlsym(pluginnode->pluginhandle, "start");
803                                if(startplugin != NULL)
804                                startplugin();
[8000]805                        }
[14005]806                        status.infobaraktiv = 1;
[16511]807                        drawscreen(skin, 0, 0);
[7978]808                        subtitlepause(0);
[10030]809                        continue;
[27994]810*/
811                        subtitlepause(1);
812                        status.infobar = 0;
813                        clearscreen(infobar);
[32138]814                        status.updatevfd = PAUSE;
[27994]815                        screenkeyactions(3, 0);
816                        status.updatevfd = START;
817                        drawscreen(skin, 0, 0);
818                        subtitlepause(0);
[30921]819                        resettvpic();
[27994]820                        continue;
[7978]821                }
[7862]822                if(rcret == getrcconfigint("rcmenu", NULL))
823                {
824                        subtitlepause(1);
825                        status.infobar = 0;
[14005]826                        status.infobaraktiv = 0;
[7862]827                        clearscreen(infobar);
[14093]828                        menu(getscreen("mainmenu"), 1);
[8466]829                        status.menurelease = 0;
[7862]830                        status.updatevfd = START;
[14005]831                        status.infobaraktiv = 1;
[16511]832                        drawscreen(skin, 0, 0);
[7862]833                        subtitlepause(0);
[10030]834                        continue;
[7862]835                }
[27981]836                if(rcret == getrcconfigint("rctimer", NULL))
837                {
838                        subtitlepause(1);
839                        status.infobar = 0;
840                        status.infobaraktiv = 0;
841                        clearscreen(infobar);
842                        screenrectimer();
843                        drawscreen(skin, 0, 0);
844                        status.infobaraktiv = 1;
845                        subtitlepause(0);
[30921]846                        resettvpic();
[27981]847                        continue;
848                }
[7862]849                if(rcret == getrcconfigint("rcepg", NULL))
850                {
851                        subtitlepause(1);
852                        status.infobar = 0;
[14734]853                        status.infobaraktiv = 0;
[7862]854                        clearscreen(infobar);
[10039]855                        epgchoice(NULL);
[16511]856                        drawscreen(skin, 0, 0);
[14734]857                        status.infobaraktiv = 1;
[7862]858                        subtitlepause(0);
[10030]859                        continue;
[7862]860                }
[27678]861                if(rcret == getrcconfigint("rcresolution", NULL) || rcret == getrcconfigint("rcresolution1", NULL))
[12154]862                {
863                        subtitlepause(1);
864                        status.infobar = 0;
865                        clearscreen(infobar);
866                        switchvideomode();
[16511]867                        drawscreen(skin, 0, 0);
[12154]868                        subtitlepause(0);
869                        continue;
870                }
[7862]871                if(rcret == getrcconfigint("rcinfo", NULL))
872                {
[10698]873                        if(status.infobar == 1)
[7862]874                        {
[9480]875                                if(getconfigint("secondinfobar", NULL) == 2)
[9312]876                                {
[9480]877                                        clearscreen(infobar);
[10039]878                                        epgchoice(NULL);
[9312]879                                        status.infobar = 0;
[16511]880                                        drawscreen(skin, 0, 0);
[9312]881                                        subtitlepause(0);
882                                }
[20502]883                                else if(getconfigint("secondinfobar", NULL) == 3)
884                                {
885                                        clearscreen(infobar);
886                                        screenepg(NULL, NULL, 0);
887                                        status.infobar = 0;
888                                        drawscreen(skin, 0, 0);
889                                        subtitlepause(0);
890                                }
[9480]891                                else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2)
892                                {
[26409]893                                        if(infobarm != infobar) {
894                                                clearscreen(infobar);
895                                                infobar = infobarm;
896                                        }
897                                        clearscreen(infobar);
[9480]898                                        status.infobar = 0;
[16511]899                                        drawscreen(skin, 0, 0);
[9480]900                                        subtitlepause(0);
901                                }
[9312]902                                else
903                                {
[26409]904                                        infobar = infobar2;
905                                        drawscreen(infobar, 0, 0);
[9312]906                                }
[7862]907                        }
908                        else
909                        {
910                                subtitlepause(1);
[10698]911                                status.infobar = 1;
[9312]912                                infobar = infobar1;
[16511]913                                drawscreen(infobar, 0, 4);
[7862]914                        }
[10030]915                        continue;
[7862]916                }
917                if(rcret == getrcconfigint("rcpower", NULL))
918                {
919                        subtitlepause(1);
920                        status.infobar = 0;
[14734]921                        status.infobaraktiv = 0;
[7862]922                        clearscreen(infobar);
[16511]923                        drawscreen(skin, 0, 0);
[7862]924                        switch(getconfigint("poweraktion", NULL))
925                        {
926                                case 1: //power off
927                                        oshutdown(1, 1);
928                                        break;
929                                case 2: //standby
930                                        status.standby = 1;
931                                        break;
932                                case 3: //restart
933                                        oshutdown(2, 1);
934                                        break;
935                                case 4: //Gui restart
936                                        oshutdown(3, 1);
937                                        break;
938                                default:
939                                        standbymenu = getscreen("standbymenu");
[14093]940                                        menu(standbymenu, 1);
[7862]941                                        break;
942                        }
943                        status.updatevfd = START;
[16511]944                        drawscreen(skin, 0, 0);
[14734]945                        status.infobaraktiv = 1;
[7862]946                        subtitlepause(0);
[10030]947                        continue;
[7862]948                }
[31846]949                if(rcret == getrcconfigint("rcfrontpower", NULL))
950                {
951                        subtitlepause(1);
952                        status.infobar = 0;
953                        status.infobaraktiv = 0;
954                        clearscreen(infobar);
955                        drawscreen(skin, 0, 0);
956                        switch(getconfigint("frontpoweraktion", NULL))
957                        {
958                                case 1: //power off
959                                        oshutdown(1, 1);
960                                        break;
961                                case 2: //standby
962                                        status.standby = 1;
963                                        break;
964                                case 3: //restart
965                                        oshutdown(2, 1);
966                                        break;
967                                case 4: //Gui restart
968                                        oshutdown(3, 1);
969                                        break;
970                                default:
971                                        status.standby = 1;
972                                        break;
973                        }
974                        status.updatevfd = START;
975                        drawscreen(skin, 0, 0);
976                        status.infobaraktiv = 1;
977                        subtitlepause(0);
978                        continue;
979                }
[14910]980                if(rcret == getrcconfigint("rcrecall", NULL))
[7862]981                {
982                        subtitlepause(1);
983                        clearscreen(infobar);
[16511]984                        drawscreen(skin, 0, 0);
[14910]985                        screenchannelhistory();
986                        infobartimeout = 0;
987                        infobar = infobar1;
988                        if(status.infobar == 0)
[16511]989                                drawscreen(infobar, 0, 4);
[14910]990                        else
[16511]991                                drawscreen(infobar, 0, 0);
[14910]992                        status.infobar = 1;
993                        continue;
994                }
995                if(rcret == getrcconfigint("rc0", NULL))
996                {
997                        subtitlepause(1);
998                        clearscreen(infobar);
[16511]999                        drawscreen(skin, 0, 0);
[7862]1000                        if(status.lastservice->channel != NULL)
[9115]1001                        {
[10849]1002                                tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
1003                                servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
[30985]1004                                free(tmpstr); tmpstr = NULL;
[9115]1005                        }
[10241]1006                        infobartimeout = 0;
[14092]1007                        infobar = infobar1;
1008                        if(status.infobar == 0)
[16511]1009                                drawscreen(infobar, 0, 4);
[14092]1010                        else
[16511]1011                                drawscreen(infobar, 0, 0);
[7862]1012                        status.infobar = 1;
[8020]1013                        continue;
[7862]1014                }
[33792]1015                if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL)))
[7862]1016                {
1017                        subtitlepause(1);
[33792]1018                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL))
[23781]1019                        {
1020                                status.virtualzap = status.crosscontrol - 1;
1021                                zapup();
1022                                status.virtualzap = 0;
1023                        }
1024                        else
1025                                zapup();
[7862]1026                        clearscreen(infobar);
[16511]1027                        drawscreen(skin, 0, 0);
[31033]1028                        if(status.pipzap == 0)
1029                        {       
1030                                infobartimeout = 0;
1031                                status.infobar = 2;
1032                        }
[7862]1033                        continue;
1034                }
[33792]1035                if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL)))
[7862]1036                {
1037                        subtitlepause(1);
[33792]1038                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL))
[23781]1039                        {
1040                                status.virtualzap = status.crosscontrol - 1;
1041                                zapdown();
1042                                status.virtualzap = 0;
1043                        }
1044                        else
1045                                zapdown();
[7862]1046                        clearscreen(infobar);
[16511]1047                        drawscreen(skin, 0, 0);
[31033]1048                        if(status.pipzap == 0)
1049                        {       
1050                                infobartimeout = 0;
1051                                status.infobar = 2;
1052                        }
[7862]1053                        continue;
1054                }
1055                if(rcret == rcnumber(rcret))
1056                {
1057                        subtitlepause(1);
1058                        clearscreen(infobar);
1059                        screenchannelbynr(rcret);
1060                        status.infobar = 2;
1061                        continue;
1062                }
[19425]1063                //show infobar on program switch (only tv)
[19426]1064                if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0)
[19425]1065                {
1066                        time_t akttime = time(NULL);
1067                        //show infobar only all 60 sec
1068                        if(lasttime < akttime)
1069                        {
1070                                struct epg* tmpepg = getepgakt(status.aktservice->channel);
[19429]1071                                if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime)
[19425]1072                                {
[19429]1073                                        lasttime = akttime + 10;
1074                                        infobartimeout = 0;
[19425]1075                                        subtitlepause(1);
1076                                        status.infobar = 1;
1077                                        infobar = infobar1;
1078                                        drawscreen(infobar, 0, 4);
1079                                        continue;
1080                                }
1081                        }
1082                }
[33626]1083                // pip atemio7600 ??
[37106]1084                if(rcret == getrcconfigint("rcpip", NULL) && (checkchipset("BCM7424") == 1 || checkbox("ATEMIO6200") == 1 || checkbox("UFS922") == 1 || checkbox("UFS913") == 1))
[20871]1085                {
[29597]1086                        if(status.pipservice->videodev == NULL)
1087                        {
1088                                pipchannel = status.aktservice->channel;
[29600]1089                                printf("++++ RC: %i\n",pipstart(pipchannel, NULL, 0));
[31029]1090                                pipchannel = NULL;
[29597]1091                        }
[20871]1092                }
[29597]1093       
[19433]1094                if(rcret == RCTIMEOUT && mark == 0)
[7862]1095                {
[10030]1096                        if(getconfigint("infobartimeout", NULL) > infobartimeout)
1097                        {
[26401]1098                                //clearscreen(infobar);
[16511]1099                                drawscreen(infobar, 0, 0);
[10030]1100                        }
1101                        else
1102                        {
[26401]1103                                clearscreen(infobar);
[26402]1104                                if(infobarm != infobar) {
1105                                        infobar = infobarm;
1106                                        clearscreen(infobar);
1107                                }
[10030]1108                                status.infobar = 0;
[16511]1109                                drawscreen(skin, 0, 0);
[10030]1110                                subtitlepause(0);
1111                        }
[7862]1112                }
[7975]1113        }
[7862]1114}
1115
1116#endif
Note: See TracBrowser for help on using the repository browser.