Changeset 32164


Ignore:
Timestamp:
01/07/15 14:24:43 (8 years ago)
Author:
wonderdoc
Message:

[skinfunc] add new skinfunctions getchannelresolution and getchannelaspect, change function getdhd

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/skin.h

    r32106 r32164  
    9292                return &getresolution;
    9393        }
     94        if(ostrcmp("getchannelresolution", value) == 0)
     95        {
     96                *rettype = FUNCPIC;
     97                return &getchannelresolution;
     98        }
    9499        if(ostrcmp("getsdhd", value) == 0)
    95100        {
     
    101106                *rettype = FUNCPIC;
    102107                return &getaspectmode;
     108        }
     109        if(ostrcmp("getchannelaspect", value) == 0)
     110        {
     111                *rettype = FUNCPIC;
     112                return &getchannelaspect;
    103113        }
    104114        if(ostrcmp("getreccount", value) == 0)
  • titan/titan/skinfunc.h

    r32106 r32164  
    260260        if(getaktvideosize() == 0) //videosize is ok
    261261        {
    262                 if(status.videosize.w == 720)
     262                if(status.videosize.h == 576)
    263263                        tmpstr = ostrcat("sd.png", NULL, 0, 0);
    264                 else if(status.videosize.w == 1280)
     264                else if(status.videosize.h == 720)
    265265                        tmpstr = ostrcat("hdready.png", NULL, 0, 0);
    266                 else if(status.videosize.w == 1920)
     266                else if(status.videosize.h == 1080)
    267267                        tmpstr = ostrcat("hd.png", NULL, 0, 0);
    268268        }
     
    292292        tmpstr = ostrcat(path, tmpstr, 0, 1);
    293293       
     294        return tmpstr;
     295}
     296
     297char* getchannelresolution(struct skin* node, char* path)
     298{
     299        char* tmpstr = NULL;
     300
     301        videoreadqwidth(status.aktservice->videodev);
     302
     303//      if(getaktvideosize() == 0) //videosize is ok
     304//      {
     305                if(status.videosize.h == 576)
     306                        tmpstr = ostrcat("576.png", NULL, 0, 0);
     307                else if(status.videosize.h == 720)
     308                        tmpstr = ostrcat("720.png", NULL, 0, 0);
     309                else if(status.videosize.h == 1080)
     310                        tmpstr = ostrcat("1080.png", NULL, 0, 0);
     311//      }
     312       
     313        if(tmpstr == NULL) tmpstr = ostrcat("novideo.png", NULL, 0, 0);
     314
     315        if(path != NULL)
     316                tmpstr = ostrcat("/", tmpstr, 0, 1);
     317        tmpstr = ostrcat(path, tmpstr, 0, 1);
     318
     319        return tmpstr;
     320}
     321
     322char* getchannelaspect(struct skin* node, char* path)
     323{
     324        char* tmpstr = NULL;
     325       
     326        videoreadqwidth(status.aktservice->videodev);
     327
     328//      if(getaktvideosize() == 0) //videosize is ok
     329//      {
     330                if(status.videosize.aspect_ratio == 0)
     331                        tmpstr = ostrcat("4_3.png", NULL, 0, 0);
     332                else if(status.videosize.aspect_ratio == 1)
     333                        tmpstr = ostrcat("16_9.png", NULL, 0, 0);
     334//      }
     335       
     336        if(tmpstr == NULL) tmpstr = ostrcat("novideo.png", NULL, 0, 0);
     337
     338        if(path != NULL)
     339                tmpstr = ostrcat("/", tmpstr, 0, 1);
     340        tmpstr = ostrcat(path, tmpstr, 0, 1);
     341
    294342        return tmpstr;
    295343}
Note: See TracChangeset for help on using the changeset viewer.