source: titan/titan/infobar.h @ 26410

Last change on this file since 26410 was 26410, checked in by gost, 9 years ago

[titan] mipsel fix flicker at the pause pic

File size: 20.8 KB
Line 
1#ifndef INFOBAR_H
2#define INFOBAR_H
3
4void screeninfobar()
5{
6        int rcret = 0, ret = 0, infobartimeout = 0, rcwait = 1000, count = 0, first = 1;
7        int playpic = 0;
8        struct skin* playinfobarpic = getscreen("playinfobarpic");
9        struct skin* infobar1 = getscreen("infobar");
10        struct skin* infobar2 = getscreen("infobar2");
11        struct skin* infobar = infobar1;
12        struct skin* infobarm = infobar1;
13        struct skin* standbymenu = NULL;
14        char* tmpstr = NULL; char* tmpnr = NULL;
15        struct skin* pluginnode = NULL;
16        void (*startplugin)(void);
17        time_t lasttime = 0;
18        int mark = 0;
19
20        status.mute = 0;
21        status.infobar = 2;
22
23        addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
24        addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
25        addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL);
26
27        status.infobaraktiv = 1;
28        status.mcaktiv = 0;
29       
30        int playinfobarcount = 0, playinfobarstatus = 0;
31       
32        while(1)
33        {
34                mark = 0;
35
36                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL))
37                        writerc(getrcconfigint("rcvolup", NULL));
38                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL))
39                        writerc(getrcconfigint("rcvoldown", NULL));
40
41                //check if mediadb can freed
42                if(status.mediadbthread == NULL)
43                {
44                        if(status.writemediadb == 1)
45                                writemediadb(getconfig("mediadbfile", NULL), NULL);
46                        freemediadb(0);
47                }
48                //check if picmem times out and must freed
49                if(time(NULL) > status.picmemtimeout + 60)
50                {
51                        checkpictimeout();
52                        status.picmemtimeout = time(NULL);
53                }
54
55                if(status.standby == 1)
56                        screenstandby();
57                if(status.infobar == 1 )
58                {
59                        rcret = waitrc(infobar, 1000, 0);
60                        infobartimeout++;
61                }
62                else if(status.infobar == 0 && status.timeshift == 1)
63                {
64                        rcret = waitrc(infobar, 1000, 0);
65                        if(rcret == RCTIMEOUT)
66                        {
67                                if(playpic == 1) {
68                                        if (checkbox("ATEMIO5000") != 1)
69                                                clearscreen(playinfobarpic);
70                                        drawscreen(playinfobarpic, 0, 0);
71                                }
72                                else
73                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
74                                continue;
75                        }
76                }
77                else if(status.infobar == 2)
78                {
79                        if(getconfigint("infobarsleep", NULL) > 0)
80                                rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0);
81                        else if(first == 1) //only on first start wait a little for epg
82                        {
83                                first = 0;
84                                rcret = waitrc(infobar, 1000, 0);
85                        }
86                        else
87                                rcret = RCTIMEOUT;
88
89                        if(rcret == RCTIMEOUT)
90                        {
91                                status.infobar = 1;
92                                infobar = infobar1;
93                                drawscreen(infobar, 0, 4);
94                                continue;
95                        }
96                        else
97                                status.infobar = 0;
98                }
99                else
100                {
101                        int screensaver_delay = getconfigint("screensaver_delay", NULL);
102                        rcret = 0; count = 0; rcwait = 1000;
103                        if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1)
104                        {
105                                initscreensaver();
106                                if(screensaver != NULL) screensaver->flag = 1;
107                        }
108                        if(screensaver == NULL)
109                        {
110                                if(status.infobarprogram == 1) rcwait = 2000;
111                                else rcwait = 0;
112                        }
113                        while(rcret == 0 || rcret == RCTIMEOUT)
114                        {
115                                rcret = waitrc(infobar, rcwait, 0);
116                                count++;
117                                if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT))
118                                {
119                                        infobartimeout = 99999;
120                                        mark = 1;
121                                        break;
122                                }
123                                if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay)
124                                {
125                                        if(status.aktservice->channel != NULL)
126                                                screensaver->value = ostrcat(status.aktservice->channel->name, NULL, 0, 0);
127                                        else
128                                                screensaver->value = ostrcat("Radio", NULL, 0, 0);
129                                        showscreensaver();
130                                        free(screensaver->value);
131                                        rcwait = screensaver->speed;
132                                }
133                        }
134                        if(screensaver != NULL) screensaver->flag = 0;
135                        deinitscreensaver();
136                        if(mark == 0)
137                        {
138                                drawscreen(skin, 0, 0);
139                                infobartimeout = 0;
140                        }
141                }
142
143                if(rcret == getrcconfigint("rcpause", NULL) || ((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))
144                {
145                        //timeshift
146                        if(playpic == 1) {
147                                clearscreen(playinfobarpic);
148                                playpic = 0;
149                        }
150                        if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0))
151                        {
152                                if(status.timeshifttype == 1 && status.timeshiftpos == 0)
153                                {
154                                        timeshiftpause(0);
155                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
156                                }
157                                else
158                                        timeshiftplay(&playinfobarstatus, &playinfobarcount);
159                        }
160                        else
161                        {
162                                if(status.timeshift == 1)
163                                        playpic = 2;
164                                else
165                                        playpic = 0;
166                                timeshiftpause(0);
167                                timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
168                                if(playpic == 0) {
169                                        drawscreen(playinfobarpic, 0, 0);
170                                        playpic = 1;
171                                }
172                        }
173                       
174                        continue;
175                }
176                if(status.timeshift == 1)
177                {
178                        if(rcret == getrcconfigint("rcstop", NULL))
179                        {
180                                if(playpic == 1) {
181                                        clearscreen(playinfobarpic);
182                                        playpic = 0;
183                                }               
184                                timeshiftstop(0);
185                                continue;
186                        }
187                        if(rcret == getrcconfigint("rcplay", NULL))
188                        {
189                                if(playpic == 1) {
190                                        clearscreen(playinfobarpic);
191                                        playpic = 0;
192                                }               
193                                if(((checkbox("ATEMIO520") != 1 && checkbox("ATEMIO530") != 1) || ostrcmp(getconfig("remotecontrol", NULL), "1") == 1)  && status.timeshifttype == 1)
194                                {
195                                        if(status.playing == 0 || (status.playspeed == 0 && status.slowspeed == 0 && status.pause == 0))
196                                        {
197                                                subtitlepause(1);
198                                                status.infobar = 0;
199                                                status.infobaraktiv = 0;
200                                                clearscreen(infobar);
201                                                screenplay(NULL, NULL, 1, 0);
202                                                status.infobaraktiv = 1;
203                                                status.updatevfd = START;
204                                                drawscreen(skin, 0, 0);
205                                                subtitlepause(0);
206                                                continue;
207                                        }
208                                }
209                                timeshiftplay(&playinfobarstatus, &playinfobarcount);
210                                continue;
211                        }
212                        if(status.timeshifttype == 1 && status.playing == 0)
213                        {
214                                if(rcret == getrcconfigint("rcff", NULL) || (getconfig("timeshiftnumkeys", NULL) == 0 && (rcret == getrcconfigint("rc3", NULL) || rcret == getrcconfigint("rc6", NULL) || rcret == getrcconfigint("rc9", NULL))))
215                                {
216                                        struct service* snode = getservice(RECORDTIMESHIFT, 0);
217                                        if(snode != NULL)
218                                        {
219                                                status.playercan = 0x7FFF;
220                                                playinfobarstatus = 1;
221                                                playinfobarcount = 0;
222                                                screenplayinfobar(snode->recname, NULL, 0, 1, 5);
223                                        }
224                                        continue;
225                                }
226                                if(rcret == getrcconfigint("rcfr", NULL))
227                                {
228                                        timeshiftposplay(&playinfobarstatus, &playinfobarcount);
229                                        if(status.playing == 1)
230                                                playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
231                                        continue;
232                                }
233                                if(getconfig("timeshiftnumkeys", NULL) == 0)
234                                {
235                                        if(rcret == getrcconfigint("rc1", NULL))
236                                        {
237                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
238                                                if(status.playing == 1)
239                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
240                                                continue;
241                                        }
242                                        if(rcret == getrcconfigint("rc4", NULL))
243                                        {
244                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
245                                                if(status.playing == 1)
246                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
247                                                continue;
248                                        }
249                                        if(rcret == getrcconfigint("rc7", NULL))
250                                        {
251                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
252                                                if(status.playing == 1)
253                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
254                                                continue;
255                                        }
256                                }
257                        }
258                        if(status.playing == 1)
259                        {
260                                if(rcret == getrcconfigint("rcff", NULL))
261                                {
262                                        playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
263                                        continue;
264                                }
265                                if(rcret == getrcconfigint("rcfr", NULL))
266                                {
267                                        playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
268                                        continue;
269                                }
270                                if(rcret == getrcconfigint("rc3", NULL))
271                                {
272                                        playrcjumpf(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
273                                        continue;
274                                }
275                                if(rcret == getrcconfigint("rc6", NULL))
276                                {
277                                        playrcjumpf(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
278                                        continue;
279                                }
280                                if(rcret == getrcconfigint("rc9", NULL))
281                                {                               
282                                        playrcjumpf(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
283                                        continue;
284                                }       
285                                if(rcret == getrcconfigint("rc1", NULL))
286                                {
287                                        playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
288                                        continue;
289                                }
290                                if(rcret == getrcconfigint("rc4", NULL))
291                                {
292                                        playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
293                                        continue;
294                                }
295                                if(rcret == getrcconfigint("rc7", NULL))
296                                {
297                                        playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
298                                        continue;
299                                }
300                                if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL))
301                                {
302                                        playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
303                                        continue;       
304                                }
305                        }
306                }
307                if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0)
308                {
309                        subtitlepause(1);
310                        status.infobar = 0;
311                        clearscreen(infobar);
312                        screenrecordstop();
313                        status.updatevfd = START;
314                        drawscreen(skin, 0, 0);
315                        subtitlepause(0);
316                        continue;
317                }
318                if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL)
319                        rcret = getrcconfigint("rctvradio", NULL);
320                if(rcret == getrcconfigint("rcok", NULL) || rcret == getrcconfigint("rctvradio", NULL) || rcret == getrcconfigint("rcfav", 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))))
321                {
322                        int tmpservicetype = status.servicetype;
323                        status.infobaraktiv = 0;
324                        subtitlepause(1);
325                        clearscreen(infobar);
326                        if(rcret == getrcconfigint("rctvradio", NULL))
327                        {
328                                if(status.servicetype == 0)
329                                        status.servicetype = 1;
330                                else
331                                        status.servicetype = 0;
332                        }
333                        drawscreen(skin, 0, 0);
334                        if(rcret == getrcconfigint("rcfav", NULL))     
335                                ret = screenchannellist(NULL, NULL, 2);
336                        else
337                                ret = screenchannellist(NULL, NULL, 0);
338                        if(ret >= 20 || ret < 0)
339                                status.servicetype = tmpservicetype;
340                        drawscreen(skin, 0, 0);
341                        status.infobaraktiv = 1;
342                        status.infobar = 2;
343                        infobartimeout = 0;
344                        continue;
345                }
346                if(rcret == getrcconfigint("rcexit", NULL))
347                {
348                        if(status.timeshift == 1 && status.playing == 1)
349                                screenplayinfobar(NULL, NULL, 1, 1, 4);
350                        subtitlepause(1);
351                        status.infobar = 0;
352                        clearscreen(infobar);
353                        if(infobarm != infobar) {
354                                infobar = infobarm;
355                                clearscreen(infobar);
356                        }
357                        drawscreen(skin, 0, 0);
358                        subtitlepause(0);
359                        continue;
360                }
361                if(rcret == getrcconfigint("rctext", NULL))
362                {
363                        if(status.aktservice->channel != NULL && status.aktservice->channel->txtpid > 0)
364                        {
365                                subtitlepause(1);
366                                status.infobar = 0;
367                                status.sec = 0;
368                                clearscreen(infobar);
369                                tmpstr = ostrcat(getconfig("tuxtxtfile", NULL), " ", 0, 0);
370                                tmpnr = oitoa(status.aktservice->channel->txtpid);
371                                tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
372       
373                                if(status.aktservice->fedev != NULL)
374                                {
375                                        tmpnr = oitoa(status.aktservice->fedev->devnr);
376                                        tmpstr = ostrcat(tmpstr, " ", 1, 0);
377                                        tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
378                                }
379       
380                                drawscreen(skin, 0, 0);
381                                status.tuxtxt = 1;
382                                system(tmpstr);
383                                status.tuxtxt = 0;
384                                free(tmpstr); tmpstr = NULL; tmpnr = NULL;
385                                drawscreen(skin, 0, 0);
386                                subtitlepause(0);
387                        }
388                        continue;
389                }
390                if(rcret == getrcconfigint("rcrecord", NULL))
391                {
392                        subtitlepause(1);
393                        status.infobar = 0;
394                        clearscreen(infobar);
395                        screenrecorddirect();
396                        status.updatevfd = START;
397                        drawscreen(skin, 0, 0);
398                        subtitlepause(0);
399                        continue;
400                }
401                if((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL))
402                {
403                        subtitlepause(1);
404                        status.infobar = 0;
405                        status.infobaraktiv = 0;
406                        clearscreen(infobar);
407                        screenplay(NULL, NULL, 1, 0);
408                        status.infobaraktiv = 1;
409                        status.updatevfd = START;
410                        drawscreen(skin, 0, 0);
411                        subtitlepause(0);
412                        continue;
413                }
414                if(rcret == getrcconfigint("rcshoot", NULL))
415                {
416                        subtitlepause(1);
417                        status.infobar = 0;
418                        status.infobaraktiv = 0;
419                        clearscreen(infobar);
420                        screenshoot(0);
421                        status.infobaraktiv = 1;
422                        status.updatevfd = START;
423                        drawscreen(skin, 0, 0);
424                        subtitlepause(0);
425                        continue;
426                }
427
428                if(rcret == getrcconfigint("rcplugin", NULL))
429                {
430                        subtitlepause(1);
431                        status.infobar = 0;
432                        status.infobaraktiv = 0;
433                        clearscreen(infobar);
434                        screenkeyactions(2, 0);
435                        status.infobaraktiv = 1;
436                        status.updatevfd = START;
437                        drawscreen(skin, 0, 0);
438                        subtitlepause(0);
439                        continue;
440                }
441                if(rcret == getrcconfigint("rcred", NULL))
442                {
443                        subtitlepause(1);
444                        status.infobar = 0;
445                        status.infobaraktiv = 0;
446                        clearscreen(infobar);
447                        screenkeyactions(1, 0);
448                        status.infobaraktiv = 1;
449                        status.updatevfd = START;
450                        drawscreen(skin, 0, 0);
451                        subtitlepause(0);
452                        continue;
453                }
454                if(rcret == getrcconfigint("rcgreen", NULL))
455                {
456                        subtitlepause(1);
457                        status.infobar = 0;
458                        clearscreen(infobar);
459                        screenvideomode(0);
460                        drawscreen(skin, 0, 0);
461                        subtitlepause(0);
462                        continue;
463                }
464                if(rcret == getrcconfigint("rcsubchannel", NULL))
465                {
466                        subtitlepause(1);
467                        status.infobar = 0;
468                        clearscreen(infobar);
469                        screenlinkedchannel();
470                        drawscreen(skin, 0, 0);
471                        subtitlepause(0);
472                        continue;
473                }
474                if(rcret == getrcconfigint("rcsleep", NULL))
475                {
476                        subtitlepause(1);
477                        status.infobar = 0;
478                        clearscreen(infobar);
479                        screenpowerofftimer();
480                        drawscreen(skin, 0, 0);
481                        subtitlepause(0);
482                        continue;
483                }
484                if(rcret == getrcconfigint("rcsubtitel", NULL))
485                {
486                        subtitlepause(1);
487                        status.infobar = 0;
488                        clearscreen(infobar);
489                        screensubtitle();
490                        drawscreen(skin, 0, 0);
491                        subtitlepause(0);
492                        continue;
493                }
494                if(rcret == getrcconfigint("rcyellow", NULL))
495                {
496                        subtitlepause(1);
497                        status.infobar = 0;
498                        clearscreen(infobar);
499                        screenaudiotrack();
500                        drawscreen(skin, 0, 0);
501                        subtitlepause(0);
502                        continue;
503                }
504                if(rcret == getrcconfigint("rcblue", NULL))
505                {
506                        subtitlepause(1);
507                        status.infobar = 0;
508                        clearscreen(infobar);
509                        screenkeyactions(0, 0);
510                        status.updatevfd = START;
511                        drawscreen(skin, 0, 0);
512                        subtitlepause(0);
513                        continue;
514                }
515                if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL)
516                {
517                        subtitlepause(1);
518                        status.infobar = 0;
519                        clearscreen(infobar);
520
521                        pluginnode = getplugin("hbbtv Browser");
522                        if(pluginnode != NULL)
523                        {
524                                startplugin = dlsym(pluginnode->pluginhandle, "starturl");
525                                if(startplugin != NULL)
526                                        startplugin();
527                        }
528
529                        status.updatevfd = START;
530                        drawscreen(skin, 0, 0);
531                        subtitlepause(0);
532                        continue;
533                }
534                if(rcret == getrcconfigint("rcmedia", NULL))
535                {
536                        struct skin* pluginnode = getplugin("Media Center");
537                        void (*startplugin)(void);
538                        status.infobaraktiv = 0;
539                        subtitlepause(1);
540                        status.infobar = 0;
541                        clearscreen(infobar);
542                        if(pluginnode != NULL)
543                        {
544                                startplugin = dlsym(pluginnode->pluginhandle, "start");
545                                if(startplugin != NULL)
546                                startplugin();
547                        }
548                        status.infobaraktiv = 1;
549                        drawscreen(skin, 0, 0);
550                        subtitlepause(0);
551                        continue;
552                }
553                if(rcret == getrcconfigint("rcmenu", NULL))
554                {
555                        subtitlepause(1);
556                        status.infobar = 0;
557                        status.infobaraktiv = 0;
558                        clearscreen(infobar);
559                        menu(getscreen("mainmenu"), 1);
560                        status.menurelease = 0;
561                        status.updatevfd = START;
562                        status.infobaraktiv = 1;
563                        drawscreen(skin, 0, 0);
564                        subtitlepause(0);
565                        continue;
566                }
567                if(rcret == getrcconfigint("rcepg", NULL))
568                {
569                        subtitlepause(1);
570                        status.infobar = 0;
571                        status.infobaraktiv = 0;
572                        clearscreen(infobar);
573                        epgchoice(NULL);
574                        drawscreen(skin, 0, 0);
575                        status.infobaraktiv = 1;
576                        subtitlepause(0);
577                        continue;
578                }
579                if(rcret == getrcconfigint("rcresolution", NULL))
580                {
581                        subtitlepause(1);
582                        status.infobar = 0;
583                        clearscreen(infobar);
584                        switchvideomode();
585                        drawscreen(skin, 0, 0);
586                        subtitlepause(0);
587                        continue;
588                }
589                if(rcret == getrcconfigint("rcinfo", NULL))
590                {
591                        if(status.infobar == 1)
592                        {
593                                if(getconfigint("secondinfobar", NULL) == 2)
594                                {
595                                        clearscreen(infobar);
596                                        epgchoice(NULL);
597                                        status.infobar = 0;
598                                        drawscreen(skin, 0, 0);
599                                        subtitlepause(0);
600                                }
601                                else if(getconfigint("secondinfobar", NULL) == 3)
602                                {
603                                        clearscreen(infobar);
604                                        screenepg(NULL, NULL, 0);
605                                        status.infobar = 0;
606                                        drawscreen(skin, 0, 0);
607                                        subtitlepause(0);
608                                }
609                                else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2)
610                                {
611                                        if(infobarm != infobar) {
612                                                clearscreen(infobar);
613                                                infobar = infobarm;
614                                        }
615                                        clearscreen(infobar);
616                                        status.infobar = 0;
617                                        drawscreen(skin, 0, 0);
618                                        subtitlepause(0);
619                                }
620                                else
621                                {
622                                        infobar = infobar2;
623                                        drawscreen(infobar, 0, 0);
624                                }
625                        }
626                        else
627                        {
628                                subtitlepause(1);
629                                status.infobar = 1;
630                                infobar = infobar1;
631                                drawscreen(infobar, 0, 4);
632                        }
633                        continue;
634                }
635                if(rcret == getrcconfigint("rcpower", NULL))
636                {
637                        subtitlepause(1);
638                        status.infobar = 0;
639                        status.infobaraktiv = 0;
640                        clearscreen(infobar);
641                        drawscreen(skin, 0, 0);
642                        switch(getconfigint("poweraktion", NULL))
643                        {
644                                case 1: //power off
645                                        oshutdown(1, 1);
646                                        break;
647                                case 2: //standby
648                                        status.standby = 1;
649                                        break;
650                                case 3: //restart
651                                        oshutdown(2, 1);
652                                        break;
653                                case 4: //Gui restart
654                                        oshutdown(3, 1);
655                                        break;
656                                default:
657                                        standbymenu = getscreen("standbymenu");
658                                        menu(standbymenu, 1);
659                                        break;
660                        }
661                        status.updatevfd = START;
662                        drawscreen(skin, 0, 0);
663                        status.infobaraktiv = 1;
664                        subtitlepause(0);
665                        continue;
666                }
667                if(rcret == getrcconfigint("rcrecall", NULL))
668                {
669                        subtitlepause(1);
670                        clearscreen(infobar);
671                        drawscreen(skin, 0, 0);
672                        screenchannelhistory();
673                        infobartimeout = 0;
674                        infobar = infobar1;
675                        if(status.infobar == 0)
676                                drawscreen(infobar, 0, 4);
677                        else
678                                drawscreen(infobar, 0, 0);
679                        status.infobar = 1;
680                        continue;
681                }
682                if(rcret == getrcconfigint("rc0", NULL))
683                {
684                        subtitlepause(1);
685                        clearscreen(infobar);
686                        drawscreen(skin, 0, 0);
687                        if(status.lastservice->channel != NULL)
688                        {
689                                tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
690                                servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
691                                free(tmpstr); tmpstr = NULL;
692                        }
693                        infobartimeout = 0;
694                        infobar = infobar1;
695                        if(status.infobar == 0)
696                                drawscreen(infobar, 0, 4);
697                        else
698                                drawscreen(infobar, 0, 0);
699                        status.infobar = 1;
700                        continue;
701                }
702                if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL)))
703                {
704                        subtitlepause(1);
705                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL))
706                        {
707                                status.virtualzap = status.crosscontrol - 1;
708                                zapup();
709                                status.virtualzap = 0;
710                        }
711                        else
712                                zapup();
713                        clearscreen(infobar);
714                        drawscreen(skin, 0, 0);
715                        infobartimeout = 0;
716                        status.infobar = 2;
717                        continue;
718                }
719                if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL)))
720                {
721                        subtitlepause(1);
722                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL))
723                        {
724                                status.virtualzap = status.crosscontrol - 1;
725                                zapdown();
726                                status.virtualzap = 0;
727                        }
728                        else
729                                zapdown();
730                        clearscreen(infobar);
731                        drawscreen(skin, 0, 0);
732                        infobartimeout = 0;
733                        status.infobar = 2;
734                        continue;
735                }
736                if(rcret == rcnumber(rcret))
737                {
738                        subtitlepause(1);
739                        clearscreen(infobar);
740                        screenchannelbynr(rcret);
741                        status.infobar = 2;
742                        continue;
743                }
744                //show infobar on program switch (only tv)
745                if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0)
746                {
747                        time_t akttime = time(NULL);
748                        //show infobar only all 60 sec
749                        if(lasttime < akttime)
750                        {
751                                struct epg* tmpepg = getepgakt(status.aktservice->channel);
752                                if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime)
753                                {
754                                        lasttime = akttime + 10;
755                                        infobartimeout = 0;
756                                        subtitlepause(1);
757                                        status.infobar = 1;
758                                        infobar = infobar1;
759                                        drawscreen(infobar, 0, 4);
760                                        continue;
761                                }
762                        }
763                }
764    /*
765                if(rcret == getrcconfigint("rcpip", NULL))
766                {
767                        struct channel* tmp = getchannel(12003, 66625); //for test RTL Television
768                        pipstart(tmp, NULL, 0);
769                }
770    */
771                if(rcret == RCTIMEOUT && mark == 0)
772                {
773                        if(getconfigint("infobartimeout", NULL) > infobartimeout)
774                        {
775                                //clearscreen(infobar);
776                                drawscreen(infobar, 0, 0);
777                        }
778                        else
779                        {
780                                clearscreen(infobar);
781                                if(infobarm != infobar) {
782                                        infobar = infobarm;
783                                        clearscreen(infobar);
784                                }
785                                status.infobar = 0;
786                                drawscreen(skin, 0, 0);
787                                subtitlepause(0);
788                        }
789                }
790        }
791}
792
793#endif
Note: See TracBrowser for help on using the repository browser.