source: titan/titan/infobar.h @ 45009

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

test

File size: 37.6 KB
Line 
1#ifndef INFOBAR_H
2#define INFOBAR_H
3
4void screeninfobar()
5{
6        int rcret = 0, ret = 0, infobartimeout = 0, rcwait = 1000, count = 0, first = 1;
7        struct channel* pipchannel = NULL;
8        struct skin* playinfobarpic = getscreen("playinfobarpic");
9
10        char* infobar_sel = getskinconfig("infobar_selection", NULL);
11        char* infobar2_sel = getskinconfig("infobar2_selection", NULL);
12        debug(10, "get initial infobar1=%s", infobar_sel);
13        debug(10, "get initial infobar2=%s", infobar2_sel);
14
15        if(infobar_sel == NULL) {
16                infobar_sel = ostrcat(infobar_sel, "infobar", 1, 0); // fallback to default
17                debug(10, "fallback to default, set infobar1=%s", infobar_sel);
18        }
19
20        if(infobar2_sel == NULL) {
21                infobar2_sel = ostrcat(infobar2_sel, "infobar2", 1, 0); // fallback to default
22                debug(10, "fallback to default, set infobar2=%s", infobar2_sel);
23        }
24
25        struct skin* infobar1 = getscreen(infobar_sel);
26        debug(10, "final infobar1=%s", infobar_sel);
27        struct skin* infobar2 = getscreen(infobar2_sel);
28        debug(10, "final infobar2=%s", infobar2_sel);
29        struct skin* infobar = infobar1;
30        struct skin* infobarm = infobar1;
31
32// dynamic default skin infobar start
33        struct skin* infobar1_bottombar = getscreennode(infobar1, "bottombar");
34        status.getepgaktstart = 0;
35        status.getepgaktend = 0;
36        status.getepgakttitle = 0;
37        status.getepgakttimeremaining = 0;
38        status.getepgnextstart = 0;
39        status.getepgnextend = 0;
40        status.getepgnexttitle = 0;
41        status.getepgnexttimeremaining = 0;
42
43        if(status.fontsizeadjust > 0)
44        {
45                infobar1->height += (status.fontsizeadjust * 2);
46                infobar1->posy -= (status.fontsizeadjust * 2);
47                infobar1_bottombar->posy += (status.fontsizeadjust * 2);
48
49//              infobar2->height += (status.fontsizeadjust * 2);
50//              infobar2->posy -= (status.fontsizeadjust * 4);
51                infobar2->posy -= (status.fontsizeadjust * 2);
52        }
53// dynamic default skin infobar end
54
55        struct skin* standbymenu = NULL;
56        char* tmpstr = NULL; char* tmpnr = NULL;
57        struct skin* pluginnode = NULL;
58        void (*startplugin)(void);
59        time_t lasttime = 0;
60        int mark = 0;
61        int playstop = 1;
62
63        status.mute = 0;
64        status.infobar = 2;
65
66        addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
67        addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
68        addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL);
69
70        status.infobaraktiv = 1;
71        status.mcaktiv = 0;
72       
73        int playinfobarcount = 0, playinfobarstatus = 0;
74       
75        if(file_exist("/etc/.mipsel") || ((checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1 || checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 1 || checkbox("DM900") == 1 || checkbox("DM920") == 1 || checkbox("DM520") == 1 || checkbox("DM525") == 1) && ostrcmp(getconfig("remotecontrol", NULL), "1") != 1))
76                playstop = 0;
77        else
78                playstop = 1;
79       
80        while(1)
81        {
82                mark = 0;
83
84                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcright", NULL))
85                        writerc(getrcconfigint("rcvolup", NULL));
86                if(status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcleft", NULL))
87                        writerc(getrcconfigint("rcvoldown", NULL));
88
89                //check if mediadb can freed
90                if(status.mediadbthread == NULL)
91                {
92                        if(status.writemediadb == 1)
93                                writemediadb(getconfig("mediadbfile", NULL), NULL);
94                        freemediadb(0);
95                }
96                //check if picmem times out and must freed
97                if(time(NULL) > status.picmemtimeout + 60)
98                {
99                        checkpictimeout();
100                        status.picmemtimeout = time(NULL);
101                }
102
103                if(status.standby == 1)
104                        screenstandby();
105                if(status.infobar == 1 )
106                {
107                        rcret = waitrc(infobar, 1000, 0);
108                        infobartimeout++;
109                }
110                else if(status.infobar == 0 && status.timeshift == 1)
111                {
112                        rcret = waitrc(infobar, 1000, 0);
113                        if(rcret == RCTIMEOUT)
114                        {
115                                if(status.playpic == 1)
116                                {
117                                        clearscreen(playinfobarpic);
118                                        drawscreen(playinfobarpic, 0, 0);
119                                }
120                                else
121                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
122                                continue;
123                        }
124                }
125                else if(status.infobar == 2)
126                {
127                        if(getconfigint("infobarsleep", NULL) > 0)
128                                rcret = waitrc(infobar, getconfigint("infobarsleep", NULL) * 1000, 0);
129                        else if(first == 1) //only on first start wait a little for epg
130                        {
131                                first = 0;
132                                rcret = waitrc(infobar, 1000, 0);
133                        }
134                        else
135                                rcret = RCTIMEOUT;
136
137                        if(rcret == RCTIMEOUT)
138                        {
139                                status.infobar = 1;
140                                infobar = infobar1;
141                                drawscreen(infobar, 0, 4);
142                                continue;
143                        }
144                        else
145                                status.infobar = 0;
146                }
147                else
148                {
149                        int screensaver_delay = getconfigint("screensaver_delay", NULL);
150                        rcret = 0; count = 0; rcwait = 1000;
151                        if(status.servicetype == 1 && getconfigint("screensaver", NULL) == 1)
152                        {
153                                initscreensaver();
154                                if(screensaver != NULL) screensaver->flag = 1;
155                        }
156                        if(screensaver == NULL)
157                        {
158                                if(status.infobarprogram == 1) rcwait = 2000;
159                                else rcwait = 0;
160                        }
161                        while(rcret == 0 || rcret == RCTIMEOUT)
162                        {
163                                rcret = waitrc(infobar, rcwait, 0);
164                                count++;
165                                if(screensaver == NULL && status.infobarprogram == 1 && (rcret == 0 || rcret == RCTIMEOUT))
166                                {
167                                        infobartimeout = 99999;
168                                        mark = 1;
169                                        break;
170                                }
171                                if(rcret == RCTIMEOUT && screensaver != NULL && count > screensaver_delay)
172                                {
173                                        if(status.aktservice->channel != NULL)
174                                                screensaver->value = ostrcat(status.aktservice->channel->name, NULL, 0, 0);
175                                        else
176                                                screensaver->value = ostrcat("Radio", NULL, 0, 0);
177                                        showscreensaver();
178                                        free(screensaver->value);
179                                        rcwait = screensaver->speed;
180                                }
181                        }
182                        if(screensaver != NULL) screensaver->flag = 0;
183                        deinitscreensaver();
184                        if(mark == 0)
185                        {
186                                drawscreen(skin, 0, 0);
187                                infobartimeout = 0;
188                        }
189                }
190
191                if(status.pipservice->videodev != NULL)
192                {
193                        if(rcret == getrcconfigint("rcpip", NULL))
194                        {
195                                if(getconfigint("pip_screen", NULL) == 1)
196                                {
197                                        pipstop(status.pipservice, 0);
198                                        continue;
199                                }
200                                else
201                                {
202                                        pipmenu();
203                                        drawscreen(skin, 0, 0);
204                                        clearscreen(infobar);
205                                        continue;
206                                }
207                        }
208                        if(rcret == getrcconfigint("rc0", NULL))
209                        {
210                                if(getconfigint("pip_swap", NULL) == 1)
211                                {
212                                        pipswap(status.pipservice);
213                                        continue;
214                                }
215                        }
216                        if(rcret == getrcconfigint("rcpiprec", NULL))
217                        {
218                                        pipstop(status.pipservice, 0);
219                                        continue;
220                        }                               
221                }
222                //Plugin von aussen aufrufen
223                //if(rcret == RCTIMEOUT && status.extplugin != NULL)
224                if(status.extplugin != NULL)
225                {
226                        subtitlepause(1);
227                        status.infobar = 0;
228                        clearscreen(infobar);
229
230                        pluginnode = getplugin(status.extplugin);
231                        free(status.extplugin); status.extplugin = NULL;
232                        if(pluginnode != NULL)
233                        {
234                                startplugin = dlsym(pluginnode->pluginhandle, "start");
235                                if(startplugin != NULL)
236                                        startplugin();
237                        }
238                        status.updatevfd = START;
239                        drawscreen(skin, 0, 0);
240                        subtitlepause(0);
241                        continue;
242                }
243                       
244               
245                if(status.pvr == 1 && (rcret == getrcconfigint("rcpause", NULL) || ((checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 1 || checkbox("DM900") == 1 || checkbox("DM920") == 1 || checkbox("DM520") == 1 || checkbox("DM525") == 1 || checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1) && rcret == getrcconfigint("rcplay", NULL) && status.pause == 0 && status.slowspeed == 0 && status.playspeed == 0 && ostrcmp(getconfig("remotecontrol", NULL), "0") == 0)))
246                {
247                        // currently works only 1 rec or timeshift
248//                      if(checkbox("VUSOLO2") == 1 && status.recording > 0)
249//                              continue;
250
251                        //timeshift
252                        if(status.playpic == 1)
253                        {
254                                clearscreen(playinfobarpic);
255                                status.playpic = 0;
256                        }
257                        if(status.timeshift == 1 && (status.playing == 0 || status.slowspeed != 0 || status.playspeed != 0 || status.pause != 0))
258                        {
259                                if(status.timeshifttype == 1 && status.timeshiftpos == 0)
260                                {
261                                        timeshiftpause(0);
262                                        timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
263                                        if(status.playpic == 0)
264                                        {
265                                                drawscreen(playinfobarpic, 0, 0);
266                                                status.playpic = 1;
267                                        }
268                                }
269                                else
270                                        timeshiftplay(&playinfobarstatus, &playinfobarcount);
271                        }
272                        else
273                        {
274                                if(status.timeshift == 1)
275                                        status.playpic = 2;
276                                else
277                                        status.playpic = 0;
278
279                                timeshiftpause(0);
280                                timeshiftinfobar(&playinfobarstatus, &playinfobarcount);
281                                if(status.playpic == 0)
282                                {
283                                        drawscreen(playinfobarpic, 0, 0);
284                                        status.playpic = 1;
285                                }
286                        }
287
288                        continue;
289                }
290                if(status.timeshift == 1)
291                {
292                        if(rcret == getrcconfigint("rcstop", NULL))
293                        {
294                                if(status.playpic == 1)
295                                {
296                                        clearscreen(playinfobarpic);
297                                        status.playpic = 0;
298                                }               
299                                timeshiftstop(0);
300                                continue;
301                        }
302                        if(rcret == getrcconfigint("rcplay", NULL))
303                        {
304                                if(status.playpic == 1)
305                                {
306                                        clearscreen(playinfobarpic);
307                                        status.playpic = 0;
308                                }               
309                                if(playstop == 1 && status.timeshifttype == 1)
310                                {
311                                        if(status.playing == 0 || (status.playspeed == 0 && status.slowspeed == 0 && status.pause == 0))
312                                        {
313                                                subtitlepause(1);
314                                                status.infobar = 0;
315                                                status.infobaraktiv = 0;
316                                                clearscreen(infobar);
317                                                screenplay(NULL, NULL, 1, 0);
318                                                status.infobaraktiv = 1;
319                                                status.updatevfd = START;
320                                                drawscreen(skin, 0, 0);
321                                                subtitlepause(0);
322                                                continue;
323                                        }
324                                }
325                                timeshiftplay(&playinfobarstatus, &playinfobarcount);
326                                continue;
327                        }
328                        if(status.timeshifttype == 1 && status.playing == 0)
329                        {
330                                if(rcret == getrcconfigint("rcff", NULL) || (getconfig("timeshiftnumkeys", NULL) == 0 && (rcret == getrcconfigint("rc3", NULL) || rcret == getrcconfigint("rc6", NULL) || rcret == getrcconfigint("rc9", NULL) || rcret == getrcconfigint("rcright", NULL) || rcret == getrcconfigint("rcup", NULL) || rcret == getrcconfigint("rc2", NULL))))
331                                {
332                                        struct service* snode = getservice(RECORDTIMESHIFT, 0);
333                                        if(snode != NULL)
334                                        {
335                                                status.playercan = 0x7FFF;
336                                                playinfobarstatus = 1;
337                                                playinfobarcount = 0;
338                                                screenplayinfobar(snode->recname, NULL, 0, 1, 5);
339                                        }
340                                        continue;
341                                }
342                                if(rcret == getrcconfigint("rcfr", NULL))
343                                {
344                                        timeshiftposplay(&playinfobarstatus, &playinfobarcount);
345                                        if(status.playing == 1)
346                                                playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
347                                        continue;
348                                }
349                                if(getconfig("timeshiftnumkeys", NULL) == 0)
350                                {
351                                        if(rcret == getrcconfigint("rcleft", NULL))
352                                        {
353                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
354                                                if(status.playing == 1)
355                                                        playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
356                                                continue;
357                                        }
358                                        if(rcret == getrcconfigint("rcdown", NULL))
359                                        {
360                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
361                                                if(status.playing == 1)
362                                                        playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
363                                                continue;
364                                        }
365                                        if(rcret == getrcconfigint("rc1", NULL))
366                                        {
367                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
368                                                if(status.playing == 1)
369                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
370                                                continue;
371                                        }
372                                        if(rcret == getrcconfigint("rc4", NULL))
373                                        {
374                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
375                                                if(status.playing == 1)
376                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
377                                                continue;
378                                        }
379                                        if(rcret == getrcconfigint("rc7", NULL))
380                                        {
381                                                timeshiftposplay(&playinfobarstatus, &playinfobarcount);
382                                                if(status.playing == 1)
383                                                        playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
384                                                continue;
385                                        }
386                                }
387                        }
388                        if(status.playing == 1)
389                        {
390                                if(rcret == getrcconfigint("rcff", NULL))
391                                {
392                                        playrcff(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
393                                        continue;
394                                }
395                                if(rcret == getrcconfigint("rcfr", NULL))
396                                {
397                                        playrcfr(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
398                                        continue;
399                                }
400                                if(rcret == getrcconfigint("rc3", NULL))
401                                {
402                                        playrcjumpf(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
403                                        continue;
404                                }
405                                if(rcret == getrcconfigint("rc6", NULL))
406                                {
407                                        playrcjumpf(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
408                                        continue;
409                                }
410                                if(rcret == getrcconfigint("rc9", NULL))
411                                {                               
412                                        playrcjumpf(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
413                                        continue;
414                                }
415                                if(rcret == getrcconfigint("rcdown", NULL))
416                                {
417                                        playrcjumpr(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
418                                        continue;
419                                }
420                                if(rcret == getrcconfigint("rcup", NULL))
421                                {
422                                        playrcjumpf(status.playfile, NULL, 300, &playinfobarstatus, &playinfobarcount, 1, 4);
423#ifdef MIPSEL
424// workaround fixes image flicker when jumping over the border also
425                                        playrcjumpr(status.playfile, NULL, 10, &playinfobarstatus, &playinfobarcount, 1, 4);
426#endif
427                                        continue;
428                                }
429                                if(rcret == getrcconfigint("rcleft", NULL))
430                                {
431                                        playrcjumpr(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
432                                        continue;
433                                }
434                                if(rcret == getrcconfigint("rcright", NULL))
435                                {
436                                        playrcjumpf(status.playfile, NULL, 60, &playinfobarstatus, &playinfobarcount, 1, 4);
437#ifdef MIPSEL
438// workaround fixes image flicker when jumping over the border also
439                                        playrcjumpr(status.playfile, NULL, 10, &playinfobarstatus, &playinfobarcount, 1, 4);
440#endif
441                                        continue;
442                                }
443                                if(rcret == getrcconfigint("rc1", NULL))
444                                {
445                                        playrcjumpr(status.playfile, NULL, getconfigint("skip13", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
446                                        continue;
447                                }
448                                if(rcret == getrcconfigint("rc4", NULL))
449                                {
450                                        playrcjumpr(status.playfile, NULL, getconfigint("skip46", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
451                                        continue;
452                                }
453                                if(rcret == getrcconfigint("rc7", NULL))
454                                {
455                                        playrcjumpr(status.playfile, NULL, getconfigint("skip79", NULL), &playinfobarstatus, &playinfobarcount, 1, 4);
456                                        continue;
457                                }
458                                if(rcret == getrcconfigint("rc2", NULL))
459                                {
460                                        playrcjumpto(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
461                                        continue;
462                                }
463                                if(rcret == getrcconfigint("rc0", NULL))
464                                {
465                                        setmarker();
466                                        continue;
467                                }
468                                if(rcret == getrcconfigint("rc5", NULL))
469                                {
470                                        screenmarker(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
471                                        continue;
472                                }       
473                                if(rcret == getrcconfigint("rc8", NULL))
474                                {
475                                        continue;
476                                }
477                                if(status.timeshifttype == 0 && rcret == getrcconfigint("rcinfo", NULL))
478                                {
479                                        playrcinfo(status.playfile, NULL, &playinfobarstatus, &playinfobarcount, 1, 4);
480                                        continue;       
481                                }
482                        }
483                }
484                if(rcret == getrcconfigint("rcstop", NULL) && status.recording > 0)
485                {
486                        subtitlepause(1);
487                        status.infobar = 0;
488                        clearscreen(infobar);
489                        screenrecordstop();
490                        status.updatevfd = START;
491                        drawscreen(skin, 0, 0);
492                        subtitlepause(0);
493                        continue;
494                }
495                if(rcret == getrcconfigint("rcblue", NULL) && getconfig("bluekey", NULL) == NULL)
496                {
497                        if(checkbox("DM7020HD") == 0 && checkbox("DM7020HDV2") == 0 && checkbox("DM900") == 0 && checkbox("DM920") == 0 && checkbox("DM520") == 0 && checkbox("DM525") == 0)
498                                rcret = getrcconfigint("rctvradio", NULL);
499                        else
500                                rcret = getrcconfigint("rcepg", NULL);
501                }
502                if(rcret == getrcconfigint("rcok", NULL) || rcret == getrcconfigint("rctvradio", NULL) || rcret == getrcconfigint("rcfav", NULL) || rcret == getrcconfigint("rctv", NULL) || rcret == getrcconfigint("rcradio", NULL) || (status.crosscontrol == 0 && status.play == 0 && status.pause == 0 && (rcret == getrcconfigint("rcup", NULL) || rcret == getrcconfigint("rcdown", NULL) || rcret == getrcconfigint("rcleft", NULL) || rcret == getrcconfigint("rcright", NULL))))
503                {
504                        int tmpservicetype = status.servicetype;
505                        status.infobaraktiv = 0;
506                        subtitlepause(1);
507                        clearscreen(infobar);
508                        if(rcret == getrcconfigint("rctvradio", NULL))
509                        {
510                                if(status.servicetype == 0)
511                                        status.servicetype = 1;
512                                else
513                                        status.servicetype = 0;
514                        }
515
516                        if(rcret == getrcconfigint("rctv", NULL))
517                        {
518#ifdef MIPSEL
519                                if(checkchipset("BCM7424") == 1 && status.servicetype == 0)
520                                {
521                                        if(status.aktservice->type == CHANNEL)
522                                                servicefullHDMIin_start();
523                                        else if(status.aktservice->type == HDMIIN)
524                                        {
525                                                if(status.lastservice->channel != NULL)
526                                                {
527                                                        tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
528                                                        servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
529                                                        free(tmpstr); tmpstr = NULL;
530                                                }
531                                        }
532                                        infobartimeout = 0;
533                                        infobar = infobar1;
534                                        if(status.infobar == 0)
535                                                drawscreen(infobar, 0, 4);
536                                        else
537                                                drawscreen(infobar, 0, 0);
538                                        status.infobar = 1;
539                                        continue;
540                                }
541#endif                         
542                                status.servicetype = 0;
543                        }
544                        if(rcret == getrcconfigint("rcradio", NULL))
545                                status.servicetype = 1;
546
547                        drawscreen(skin, 0, 0);
548                        if(rcret == getrcconfigint("rcfav", NULL))     
549                                ret = screenchannellist(NULL, NULL, 2);
550                        else
551                                ret = screenchannellist(NULL, NULL, 0);
552                        if(ret >= 20 || ret < 0)
553                                status.servicetype = tmpservicetype;
554                        drawscreen(skin, 0, 0);
555                        status.infobaraktiv = 1;
556                        status.infobar = 2;
557                        infobartimeout = 0;
558                        continue;
559                }
560                if(rcret == getrcconfigint("rcexit", NULL) && status.infobar == 1)
561                {
562                        if(status.timeshift == 1 && status.playing == 1)
563                                screenplayinfobar(NULL, NULL, 1, 1, 4);
564                        subtitlepause(1);
565                        status.infobar = 0;
566                        clearscreen(infobar);
567                        if(infobarm != infobar) {
568                                infobar = infobarm;
569                                clearscreen(infobar);
570                        }
571                        drawscreen(skin, 0, 0);
572                        subtitlepause(0);
573                        continue;
574                }
575                if(rcret == getrcconfigint("rctext", NULL))
576                {
577                        if(status.aktservice->channel != NULL && status.aktservice->channel->txtpid > 0)
578                        {
579                                subtitlepause(1);
580                                status.infobar = 0;
581                                status.sec = 0;
582                                clearscreen(infobar);
583                                tmpstr = ostrcat(getconfig("tuxtxtfile", NULL), " ", 0, 0);
584                                tmpnr = oitoa(status.aktservice->channel->txtpid);
585                                tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
586       
587                                if(status.aktservice->fedev != NULL)
588                                {
589                                        tmpnr = oitoa(status.aktservice->fedev->devnr);
590                                        tmpstr = ostrcat(tmpstr, " ", 1, 0);
591                                        tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
592                                }
593#ifdef OEBUILD         
594        saveframebuffer();
595#endif
596                                drawscreen(skin, 0, 0);
597                                status.tuxtxt = 1;
598#ifdef MIPSEL
599                                disablemanualblit();
600                                int tmprcret = -1;
601                                delrc(getrcconfigint("rcvolup", NULL), NULL, NULL);
602                                delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL);
603
604                                tmpstr = ostrcat(tmpstr, " &", 1, 0);
605                                system(tmpstr);
606
607                                while(1)
608                                {
609                                        rcret = waitrc(infobar, 0, 0);
610                                        if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00;
611                                        else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01;
612                                        else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02;
613                                        else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03;
614                                        else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04;
615                                        else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05;
616                                        else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06;
617                                        else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07;
618                                        else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08;
619                                        else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; 
620                                        else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A;
621                                        else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B;
622                                        else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C;
623                                        else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D;
624                                        else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E;
625                                        else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F;       
626                                        else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10;
627                                        else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11;
628                                        else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12;
629                                        else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13;               
630                                        else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14;
631                                        else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15;
632                                        else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16;
633                                        else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17;
634                                        //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18;
635                                        else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F;
636                                        else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F;
637                                       
638                                        sendtuxtxt(tmprcret);
639                                       
640                                        if(rcret == getrcconfigint("rcexit", NULL)) break;
641                                        if(rcret == getrcconfigint("rctext", NULL)) break;
642                                }
643                               
644                                addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
645                                addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
646
647                                if(status.fdrctxt != -1)
648                                {
649                                        close(status.fdrctxt);
650                                        status.fdrctxt = -1;
651                                }
652#ifndef OEBUILD
653                                system("resetfb.sh");
654#endif
655                                enablemanualblit();
656#else
657                                system(tmpstr);
658#endif
659#ifdef MIPSEL
660
661                                if(status.aktservice != NULL)
662                                        resetvmpeg(status.aktservice->videodev);
663#endif
664#ifdef OEBUILD
665                                restoreframebuffer();
666#endif
667                                status.tuxtxt = 0;
668                                free(tmpstr); tmpstr = NULL; tmpnr = NULL;
669                                drawscreen(skin, 0, 0);
670                                subtitlepause(0);
671                        }
672                        continue;
673                }
674//      if(rcret == getrcconfigint("rcrecord", NULL))
675                if(rcret == getrcconfigint("rcrecord", NULL) && status.pvr == 1)
676                {
677                        // currently works only 1 rec or timeshift
678//                      if(checkbox("VUSOLO2") == 1 && status.timeshift == 1)
679//                              continue;
680                        subtitlepause(1);
681                        status.infobar = 0;
682                        clearscreen(infobar);
683                        screenrecorddirect();
684                        status.updatevfd = START;
685                        drawscreen(skin, 0, 0);
686                        subtitlepause(0);
687                        continue;
688                }
689                if((status.pvr == 1 && ((status.timeshift == 0 && rcret == getrcconfigint("rcplay", NULL)) || rcret == getrcconfigint("rcarchive", NULL) || rcret == getrcconfigint("rcwebplay", NULL))))
690                {
691                        subtitlepause(1);
692                        status.infobar = 0;
693                        status.infobaraktiv = 0;
694                        clearscreen(infobar);
695                        screenplay(NULL, NULL, 1, 0);
696                        status.infobaraktiv = 1;
697                        status.updatevfd = START;
698                        drawscreen(skin, 0, 0);
699                        subtitlepause(0);
700                        continue;
701                }
702                if(rcret == getrcconfigint("rcshoot", NULL))
703                {
704                        subtitlepause(1);
705                        status.infobar = 0;
706                        status.infobaraktiv = 0;
707                        clearscreen(infobar);
708                        screenshoot(0);
709                        status.infobaraktiv = 1;
710                        status.updatevfd = START;
711                        drawscreen(skin, 0, 0);
712                        subtitlepause(0);
713                        textbox(_("Message"), _("Shooting Background done !\nSave Screenshoot Path: /tmp/screenshot.jpg"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0);
714                        continue;
715                }
716
717                if(rcret == getrcconfigint("rcplugin", NULL))
718                {
719                        subtitlepause(1);
720                        status.infobar = 0;
721                        clearscreen(infobar);
722                        status.updatevfd = PAUSE;
723                        screenkeyactions(2, 0);
724                        status.updatevfd = START;
725                        drawscreen(skin, 0, 0);
726                        subtitlepause(0);
727                        continue;
728                }
729                if(rcret == getrcconfigint("rcred", NULL))
730                {
731                        subtitlepause(1);
732                        status.infobar = 0;
733                        status.infobaraktiv = 0;
734                        clearscreen(infobar);
735                        status.updatevfd = PAUSE;
736                        screenkeyactions(1, 0);
737                        status.infobaraktiv = 1;
738                        status.updatevfd = START;
739                        drawscreen(skin, 0, 0);
740                        subtitlepause(0);
741                        continue;
742                }
743                if(rcret == getrcconfigint("rcgreen", NULL) || rcret ==  getrcconfigint("rcvmode", NULL))
744                {
745                        subtitlepause(1);
746                        status.infobar = 0;
747                        clearscreen(infobar);
748                        screenvideomode(0);
749                        drawscreen(skin, 0, 0);
750                        subtitlepause(0);
751                        continue;
752                }
753                if(rcret == getrcconfigint("rcsubchannel", NULL))
754                {
755                        subtitlepause(1);
756                        status.infobar = 0;
757                        clearscreen(infobar);
758                        screenlinkedchannel();
759                        drawscreen(skin, 0, 0);
760                        subtitlepause(0);
761                        continue;
762                }
763                if(rcret == getrcconfigint("rcsleep", NULL))
764                {
765                        subtitlepause(1);
766                        status.infobar = 0;
767                        clearscreen(infobar);
768                        screenpowerofftimer();
769                        drawscreen(skin, 0, 0);
770                        subtitlepause(0);
771                        continue;
772                }
773                if(rcret == getrcconfigint("rcsubtitel", NULL))
774                {
775                        subtitlepause(1);
776                        status.infobar = 0;
777                        clearscreen(infobar);
778                        screensubtitle();
779                        drawscreen(skin, 0, 0);
780                        subtitlepause(0);
781                        continue;
782                }
783                if(rcret == getrcconfigint("rcyellow", NULL) || rcret == getrcconfigint("rcaudio", NULL))
784                {
785                        subtitlepause(1);
786                        status.infobar = 0;
787                        clearscreen(infobar);
788                        screenaudiotrack();
789                        drawscreen(skin, 0, 0);
790                        subtitlepause(0);
791                        continue;
792                }
793                if(rcret == getrcconfigint("rcblue", NULL))
794                {
795                        subtitlepause(1);
796                        status.infobar = 0;
797                        clearscreen(infobar);
798                        screenkeyactions(0, 0);
799                        status.updatevfd = START;
800                        drawscreen(skin, 0, 0);
801                        subtitlepause(0);
802                        continue;
803                }
804                if(rcret == getrcconfigint("rchbbtv", NULL) && status.aktservice->channel != NULL && status.aktservice->channel->hbbtvurl != NULL && file_exist("/usr/bin/browser"))
805                {
806#ifdef OEBUILD
807//oebuild hbbtv start
808                        subtitlepause(1);
809                        status.infobar = 0;
810                        status.sec = 0;
811                        clearscreen(infobar);
812#ifdef OEBUILD
813                saveframebuffer();
814#endif
815                        drawscreen(skin, 0, 0);
816                        status.tuxtxt = 1;
817
818                        char* res = NULL;
819                        res = string_newline(command("fbset | sed -nr 's/.*mode.*\\"([^\\"]+)-.*/\\\1/p' | tr 'x' ' '"));
820
821                        if(res == NULL)
822                        {
823                                printf("set default res\n");
824                                res = ostrcat("1280 720", NULL, 0, 0);
825                        }
826                        tmpstr = ostrcat("run.sh restart ", res, 0, 1);
827                        tmpstr = ostrcat(tmpstr, " ", 1, 0);
828                        tmpstr = ostrcat(tmpstr, status.aktservice->channel->hbbtvurl, 1, 0);
829                        tmpstr = ostrcat(tmpstr, " &", 1, 0);
830#ifdef MIPSEL
831                        disablemanualblit();
832                        int tmprcret = -1;
833
834                        delrc(getrcconfigint("rcvolup", NULL), NULL, NULL);
835                        delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL);
836
837                        printf("cmd1: %s\n", tmpstr);
838                        system(tmpstr);
839                        free(tmpstr), tmpstr = NULL;
840
841                        while(1)
842                        {
843                                rcret = waitrc(infobar, 0, 0);
844                                if(rcret == getrcconfigint("rc0", NULL)) tmprcret = 0x00;
845                                else if(rcret == getrcconfigint("rc1", NULL)) tmprcret = 0x01;
846                                else if(rcret == getrcconfigint("rc2", NULL)) tmprcret = 0x02;
847                                else if(rcret == getrcconfigint("rc3", NULL)) tmprcret = 0x03;
848                                else if(rcret == getrcconfigint("rc4", NULL)) tmprcret = 0x04;
849                                else if(rcret == getrcconfigint("rc5", NULL)) tmprcret = 0x05;
850                                else if(rcret == getrcconfigint("rc6", NULL)) tmprcret = 0x06;
851                                else if(rcret == getrcconfigint("rc7", NULL)) tmprcret = 0x07;
852                                else if(rcret == getrcconfigint("rc8", NULL)) tmprcret = 0x08;
853                                else if(rcret == getrcconfigint("rc9", NULL)) tmprcret = 0x09; 
854                                else if(rcret == getrcconfigint("rcright", NULL)) tmprcret = 0x0A;
855                                else if(rcret == getrcconfigint("rcleft", NULL)) tmprcret = 0x0B;
856                                else if(rcret == getrcconfigint("rcup", NULL)) tmprcret = 0x0C;
857                                else if(rcret == getrcconfigint("rcdown", NULL)) tmprcret = 0x0D;
858                                else if(rcret == getrcconfigint("rcok", NULL)) tmprcret = 0x0E;
859                                else if(rcret == getrcconfigint("rcmute", NULL)) tmprcret = 0x0F;       
860                                else if(rcret == getrcconfigint("rcpower", NULL)) tmprcret = 0x10;
861                                else if(rcret == getrcconfigint("rcgreen", NULL)) tmprcret = 0x11;
862                                else if(rcret == getrcconfigint("rcyellow", NULL)) tmprcret = 0x12;
863                                else if(rcret == getrcconfigint("rcred", NULL)) tmprcret = 0x13;               
864                                else if(rcret == getrcconfigint("rcblue", NULL)) tmprcret = 0x14;
865                                else if(rcret == getrcconfigint("rcchup", NULL)) tmprcret = 0x15;
866                                else if(rcret == getrcconfigint("rcchdown", NULL)) tmprcret = 0x16;
867                                else if(rcret == getrcconfigint("rchelp", NULL)) tmprcret = 0x17;
868                                //else if(rcret == getrcconfigint("rcdbox", NULL)) tmprcret = 0x18;
869                                else if(rcret == getrcconfigint("rctext", NULL)) tmprcret = 0x1F;
870                                else if(rcret == getrcconfigint("rcexit", NULL)) tmprcret = 0x1F;
871                               
872                                sendtuxtxt(tmprcret);
873                               
874                                if(rcret == getrcconfigint("rcexit", NULL)) break;
875                                if(rcret == getrcconfigint("rctext", NULL)) break;
876                        }
877                       
878                        addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL);
879                        addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL);
880
881                        if(status.fdrctxt != -1)
882                        {
883                                close(status.fdrctxt);
884                                status.fdrctxt = -1;
885                        }
886                        system("killall -9 run.sh browser");
887#ifndef OEBUILD
888                        system("resetfb.sh");
889#endif
890                        enablemanualblit();
891#else
892                        printf("cmd2: %s\n", tmpstr);
893                        system(tmpstr);
894                        free(tmpstr), tmpstr = NULL;
895#endif
896
897#ifdef MIPSEL
898
899                        if(status.aktservice != NULL)
900                                resetvmpeg(status.aktservice->videodev);
901#endif
902#ifdef OEBUILD
903                        restoreframebuffer();
904#endif
905                        status.tuxtxt = 0;
906                        free(tmpstr); tmpstr = NULL; tmpnr = NULL;
907                        drawscreen(skin, 0, 0);
908                        subtitlepause(0);
909//oebuild hbbtv end
910#else
911                        subtitlepause(1);
912                        status.infobar = 0;
913                        clearscreen(infobar);
914
915                        pluginnode = getplugin("hbbtv Browser");
916                        if(pluginnode != NULL)
917                        {
918                                startplugin = dlsym(pluginnode->pluginhandle, "starturl");
919                                if(startplugin != NULL)
920                                        startplugin();
921                        }
922
923                        status.updatevfd = START;
924                        drawscreen(skin, 0, 0);
925                        subtitlepause(0);
926#endif
927                        continue;
928                }
929                if(rcret == getrcconfigint("rcwww", NULL))
930                {
931                        subtitlepause(1);
932                        status.infobar = 0;
933                        clearscreen(infobar);
934                       
935                        pluginnode = getplugin("Internet Browser");
936                        if(pluginnode != NULL)
937                        {
938                                startplugin = dlsym(pluginnode->pluginhandle, "screenbrowser");
939                                if(startplugin != NULL)
940                                        startplugin();
941                        }
942                        else
943                                textbox(_("Message"), _("Internet Browser Plugin not installed !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
944                }
945                if(rcret == getrcconfigint("rcmedia", NULL))
946                {
947/*
948                        struct skin* pluginnode = getplugin("Media Center");
949                        void (*startplugin)(void);
950                        status.infobaraktiv = 0;
951                        subtitlepause(1);
952                        status.infobar = 0;
953                        clearscreen(infobar);
954                        if(pluginnode != NULL)
955                        {
956                                startplugin = dlsym(pluginnode->pluginhandle, "start");
957                                if(startplugin != NULL)
958                                startplugin();
959                        }
960                        status.infobaraktiv = 1;
961                        drawscreen(skin, 0, 0);
962                        subtitlepause(0);
963                        continue;
964*/
965                        subtitlepause(1);
966                        status.infobar = 0;
967                        clearscreen(infobar);
968                        status.updatevfd = PAUSE;
969                        screenkeyactions(3, 0);
970                        status.updatevfd = START;
971                        drawscreen(skin, 0, 0);
972                        subtitlepause(0);
973                        resettvpic();
974                        continue;
975                }
976                if(rcret == getrcconfigint("rcmenu", NULL))
977                {
978                        subtitlepause(1);
979                        status.infobar = 0;
980                        status.infobaraktiv = 0;
981                        clearscreen(infobar);
982                        menu(getscreen("mainmenu"), 1);
983                        status.menurelease = 0;
984                        status.updatevfd = START;
985                        status.infobaraktiv = 1;
986                        drawscreen(skin, 0, 0);
987                        subtitlepause(0);
988                        continue;
989                }
990                if(rcret == getrcconfigint("rctimer", NULL))
991                {
992                        subtitlepause(1);
993                        status.infobar = 0;
994                        status.infobaraktiv = 0;
995                        clearscreen(infobar);
996                        screenrectimer();
997                        drawscreen(skin, 0, 0);
998                        status.infobaraktiv = 1;
999                        subtitlepause(0);
1000                        resettvpic();
1001                        continue;
1002                }
1003                if(rcret == getrcconfigint("rcepg", NULL))
1004                {
1005                        subtitlepause(1);
1006                        status.infobar = 0;
1007                        status.infobaraktiv = 0;
1008                        clearscreen(infobar);
1009                        epgchoice(NULL);
1010                        drawscreen(skin, 0, 0);
1011                        status.infobaraktiv = 1;
1012                        subtitlepause(0);
1013                        continue;
1014                }
1015                if(rcret == getrcconfigint("rcresolution", NULL) || rcret == getrcconfigint("rcresolution1", NULL))
1016                {
1017                        subtitlepause(1);
1018                        status.infobar = 0;
1019                        clearscreen(infobar);
1020                        switchvideomode();
1021                        drawscreen(skin, 0, 0);
1022                        subtitlepause(0);
1023                        continue;
1024                }
1025                if(rcret == getrcconfigint("rcinfo", NULL))
1026                {
1027                        if(status.infobar == 1)
1028                        {
1029                                if(getconfigint("secondinfobar", NULL) == 2)
1030                                {
1031                                        clearscreen(infobar);
1032                                        epgchoice(NULL);
1033                                        status.infobar = 0;
1034                                        drawscreen(skin, 0, 0);
1035                                        subtitlepause(0);
1036                                }
1037                                else if(getconfigint("secondinfobar", NULL) == 3)
1038                                {
1039                                        clearscreen(infobar);
1040                                        screenepg(NULL, NULL, 0);
1041                                        status.infobar = 0;
1042                                        drawscreen(skin, 0, 0);
1043                                        subtitlepause(0);
1044                                }
1045                                else if(getconfigint("secondinfobar", NULL) == 0 || infobar2 == status.skinerr || infobar == infobar2)
1046                                {
1047                                        if(infobarm != infobar) {
1048                                                clearscreen(infobar);
1049                                                infobar = infobarm;
1050                                        }
1051                                        clearscreen(infobar);
1052                                        status.infobar = 0;
1053                                        drawscreen(skin, 0, 0);
1054                                        subtitlepause(0);
1055                                }
1056                                else
1057                                {
1058                                        infobar = infobar2;
1059                                        drawscreen(infobar, 0, 0);
1060                                }
1061                        }
1062                        else
1063                        {
1064                                subtitlepause(1);
1065                                status.infobar = 1;
1066                                infobar = infobar1;
1067                                drawscreen(infobar, 0, 4);
1068                        }
1069                        continue;
1070                }
1071                if(rcret == getrcconfigint("rcpower", NULL))
1072                {
1073                        subtitlepause(1);
1074                        status.infobar = 0;
1075                        status.infobaraktiv = 0;
1076                        clearscreen(infobar);
1077                        drawscreen(skin, 0, 0);
1078                        switch(getconfigint("poweraktion", NULL))
1079                        {
1080                                case 1: //power off
1081                                        oshutdown(1, 1);
1082                                        break;
1083                                case 2: //standby
1084                                        status.standby = 1;
1085                                        break;
1086                                case 3: //restart
1087                                        oshutdown(2, 1);
1088                                        break;
1089                                case 4: //Gui restart
1090                                        oshutdown(3, 1);
1091                                        break;
1092                                default:
1093                                        standbymenu = getscreen("standbymenu");
1094                                        menu(standbymenu, 1);
1095                                        break;
1096                        }
1097                        status.updatevfd = START;
1098                        drawscreen(skin, 0, 0);
1099                        status.infobaraktiv = 1;
1100                        subtitlepause(0);
1101                        continue;
1102                }
1103                if(rcret == getrcconfigint("rcfrontpower", NULL))
1104                {
1105                        subtitlepause(1);
1106                        status.infobar = 0;
1107                        status.infobaraktiv = 0;
1108                        clearscreen(infobar);
1109                        drawscreen(skin, 0, 0);
1110                        switch(getconfigint("frontpoweraktion", NULL))
1111                        {
1112                                case 1: //power off
1113                                        oshutdown(1, 1);
1114                                        break;
1115                                case 2: //standby
1116                                        status.standby = 1;
1117                                        break;
1118                                case 3: //restart
1119                                        oshutdown(2, 1);
1120                                        break;
1121                                case 4: //Gui restart
1122                                        oshutdown(3, 1);
1123                                        break;
1124                                default:
1125                                        status.standby = 1;
1126                                        break;
1127                        }
1128                        status.updatevfd = START;
1129                        drawscreen(skin, 0, 0);
1130                        status.infobaraktiv = 1;
1131                        subtitlepause(0);
1132                        continue;
1133                }
1134                if(rcret == getrcconfigint("rcrecall", NULL) || rcret == getrcconfigint("rcexit", NULL))
1135                {
1136                        subtitlepause(1);
1137                        clearscreen(infobar);
1138                        drawscreen(skin, 0, 0);
1139                        screenchannelhistory();
1140                        infobartimeout = 0;
1141                        infobar = infobar1;
1142                        if(status.infobar == 0)
1143                                drawscreen(infobar, 0, 4);
1144                        else
1145                                drawscreen(infobar, 0, 0);
1146                        status.infobar = 1;
1147                        continue;
1148                }
1149                if(rcret == getrcconfigint("rc0", NULL))
1150                {
1151                        subtitlepause(1);
1152                        clearscreen(infobar);
1153                        drawscreen(skin, 0, 0);
1154                        if(status.lastservice->channel != NULL)
1155                        {
1156                                tmpstr = ostrcat(status.lastservice->channellist, NULL, 0, 0);
1157                                servicecheckret(servicestart(status.lastservice->channel, tmpstr, NULL, 0), 0);
1158                                free(tmpstr); tmpstr = NULL;
1159                        }
1160                        infobartimeout = 0;
1161                        infobar = infobar1;
1162                        if(status.infobar == 0)
1163                                drawscreen(infobar, 0, 4);
1164                        else
1165                                drawscreen(infobar, 0, 0);
1166                        status.infobar = 1;
1167                        continue;
1168                }
1169                if(rcret == getrcconfigint("rcchup", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcdown", NULL)))
1170                {
1171                        subtitlepause(1);
1172                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcdown", NULL))
1173                        {
1174                                status.virtualzap = status.crosscontrol - 1;
1175                                zapup();
1176                                status.virtualzap = 0;
1177                        }
1178                        else
1179                                zapup();
1180                        clearscreen(infobar);
1181                        drawscreen(skin, 0, 0);
1182                        if(status.pipzap == 0)
1183                        {       
1184                                infobartimeout = 0;
1185                                status.infobar = 2;
1186                        }
1187                        continue;
1188                }
1189                if(rcret == getrcconfigint("rcchdown", NULL) || (status.crosscontrol > 0 && status.play == 0 && status.pause == 0 && rcret == getrcconfigint("rcup", NULL)))
1190                {
1191                        subtitlepause(1);
1192                        if(status.crosscontrol > 1 && status.virtualzap == 0 && rcret == getrcconfigint("rcup", NULL))
1193                        {
1194                                status.virtualzap = status.crosscontrol - 1;
1195                                zapdown();
1196                                status.virtualzap = 0;
1197                        }
1198                        else
1199                                zapdown();
1200                        clearscreen(infobar);
1201                        drawscreen(skin, 0, 0);
1202                        if(status.pipzap == 0)
1203                        {       
1204                                infobartimeout = 0;
1205                                status.infobar = 2;
1206                        }
1207                        continue;
1208                }
1209                if(rcret == rcnumber(rcret))
1210                {
1211                        subtitlepause(1);
1212                        clearscreen(infobar);
1213                        screenchannelbynr(rcret);
1214                        status.infobar = 2;
1215                        continue;
1216                }
1217                //show infobar on program switch (only tv)
1218                if(status.infobarprogram == 1 && status.infobar == 0 && status.servicetype == 0)
1219                {
1220                        time_t akttime = time(NULL);
1221                        //show infobar only all 60 sec
1222                        if(lasttime < akttime)
1223                        {
1224                                struct epg* tmpepg = getepgakt(status.aktservice->channel);
1225                                if(tmpepg != NULL && akttime - 1 <= tmpepg->starttime && akttime + 1 >= tmpepg->starttime)
1226                                {
1227                                        lasttime = akttime + 10;
1228                                        infobartimeout = 0;
1229                                        subtitlepause(1);
1230                                        status.infobar = 1;
1231                                        infobar = infobar1;
1232                                        drawscreen(infobar, 0, 4);
1233                                        continue;
1234                                }
1235                        }
1236                }
1237                // pip atemio7600 ??
1238                //if((rcret == getrcconfigint("rcpip", NULL) || rcret == getrcconfigint("rcpiprec", NULL)) && (checkchipset("BCM7424") == 1 || checkbox("ATEMIO6200") == 1 || checkbox("UFS922") == 1 || checkbox("UFS913") == 1 || checkbox("DM900") == 1 || checkbox("DM520") == 1 || checkbox("DM525") == 1))
1239                if((rcret == getrcconfigint("rcpip", NULL) || rcret == getrcconfigint("rcpiprec", NULL)) && status.videodevs > 1)       
1240                {
1241                        if(status.pipservice->videodev == NULL)
1242                        {
1243                                printf("---------> %i\n",rcret);
1244                                if(status.recording > 0 && rcret == getrcconfigint("rcpiprec", NULL))
1245                                {
1246                                        int i;
1247                                        for(i = 0; i < 9; i++)
1248                                        {
1249                                                if(status.recchnode[i] != NULL)
1250                                                {
1251                                                        pipchannel = status.recchnode[i];
1252                                                        break;
1253                                                }
1254                                        }
1255                                }
1256                                else if(rcret == getrcconfigint("rcpiprec", NULL))
1257                                        textbox(_("Message"), _("no record channel found"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0);
1258                                else   
1259                                        pipchannel = status.aktservice->channel;
1260                                printf("++++ RC: %i\n",pipstart(pipchannel, NULL, 0));
1261                                pipchannel = NULL;
1262                        }
1263                }
1264       
1265                if(rcret == getrcconfigint("rchdmi", NULL))
1266                {
1267                        char *value = NULL;
1268                        value = readsys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", 1);
1269                        if(value != NULL)
1270                        {
1271                                if(ostrstr(value, "off") != NULL)
1272                                {
1273                                        writesys("/proc/stb/video/videomode", "720p", 1);
1274                                        writesys("/proc/stb/audio/hdmi_rx_monitor", "on", 1);
1275                                        writesys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", "on", 1);
1276                                }
1277                                else
1278                                {
1279                                        writesys("/proc/stb/audio/hdmi_rx_monitor", "off", 1);
1280                                        writesys("/proc/stb/hdmi-rx/0/hdmi_rx_monitor", "off", 1);
1281                                        setvideomode(getconfig("av_videomode", NULL), 0);
1282                                }
1283                        }
1284                        free(value); value=NULL;
1285                }
1286               
1287                if(rcret == RCTIMEOUT && mark == 0)
1288                {
1289                        if(getconfigint("infobartimeout", NULL) > infobartimeout)
1290                        {
1291                                //clearscreen(infobar);
1292                                drawscreen(infobar, 0, 0);
1293                        }
1294                        else
1295                        {
1296                                clearscreen(infobar);
1297                                if(infobarm != infobar) {
1298                                        infobar = infobarm;
1299                                        clearscreen(infobar);
1300                                }
1301                                status.infobar = 0;
1302                                drawscreen(skin, 0, 0);
1303                                subtitlepause(0);
1304                        }
1305                }
1306        }
1307}
1308
1309#endif
Note: See TracBrowser for help on using the repository browser.