source: titan/titan/defaults.h @ 15463

Last change on this file since 15463 was 15463, checked in by nit, 12 years ago

[titan] first step add timeout to picmem

File size: 4.3 KB
Line 
1#ifndef DEFAULTS_H
2#define DEFAULTS_H
3
4void setdefaults()
5{
6        int i = 0;
7        char* tmpstr = NULL;
8
9        addconfigdef("vol", "30");
10        addconfigdef("dmxvideobuffersize", "1048576");
11        addconfigdef("dmxaudiobuffersize", "1048576");
12        addconfigdef("dmxepgbuffersize", "524288");
13        addconfigdef("dmxrecordbuffersize", "3145728");
14        addconfigdef("dmxtimeshiftbuffersize", "3145728");
15        addconfigdef("dmxstreambuffersize", "3145728");
16        addconfigdef("rec_moviepath", "/media");
17        addconfigdef("rec_path", "/media/hdd/movie");
18        addconfigdef("rec_timeshiftpath", "/media/hdd/movie");
19        addconfigdef("rec_timerpath", "/media/hdd/movie");
20        addconfigdef("rec_streampath", "/media/hdd/movie");
21        addconfigdef("epg_path", "/media/hdd");
22        addconfigdef("epg_days", "14");
23        addconfigdef("epg_del", "0");
24        addconfigdef("tracelog", "/media/hdd");
25        addconfigdef("spinnerspeed", "12");
26        addconfigdef("spinnertime", "5");
27        addconfigdef("hangtime", "60");
28        addconfigdef("skinfbwidth", "1280");
29        addconfigdef("skinfbheight", "720");
30        addconfigdef("fbleftoffset", "0");
31        addconfigdef("fbrightoffset", "0");
32        addconfigdef("fbtopoffset", "0");
33        addconfigdef("fbbottomoffset", "0");
34        addconfigdef("infobartimeout", "4");
35        addconfigdef("infobarsleep", "0");
36        addconfigdef("volbartimeout", "1");
37        addconfigdef("mc_videoplayerpath", "/media");
38        addconfigdef("vfdbrightness", "3");
39        addconfigdef("vfdstandbybrightness", "3");
40        addconfigdef("vs_brightness", "128");
41        addconfigdef("vs_contrast", "128");
42        addconfigdef("vs_tint", "128");
43        addconfigdef("vs_saturation", "128");
44        addconfigdef("epgfreespace", "100");
45        addconfigdef("pincode", "0000");
46        addconfigdef("pincodemenu", "0000");
47        addconfigdef("httpdstart", "0");
48        addconfigdef("httpdport", "80");
49        addconfigdef("streamport", "22222");
50        addconfigdef("rguidport", "22233");
51        addconfigdef("recordfreespace", "1000");
52        addconfigdef("skip13", "120");
53        addconfigdef("skip46", "300");
54        addconfigdef("skip79", "900");
55        addconfigdef("gmultiepgzoom", "4");
56        addconfigdef("wakeuptimerdevdiff", "300");
57        addconfigdef("rectimer_timediff", "120");
58        addconfigdef("screenanimspeed", "1");
59        addconfigdef("blindminfrequency", "9500");
60        addconfigdef("blindmaxfrequency", "14500");
61        addconfigdef("blindstepfrequency", "20");
62        addconfigdef("blindminsignalrate", "20000");
63        addconfigdef("blindmaxsignalrate", "30000");
64        addconfigdef("blindstepsignalrate", "20");
65       
66        status.expertmodus = getconfigint("expertmodus", NULL);
67        status.pmtmode = getconfigint("pmtmode", NULL);
68        status.usedirectfb = getconfigint("usedirectfb", NULL);
69        status.servicetype = getconfigint("servicetype", NULL);
70        status.spinnertime = getconfigint("spinnertime", NULL);
71        status.spinnerspeed = getconfigint("spinnerspeed", NULL);
72        status.hangtime = getconfigint("hangtime", NULL);
73        status.epgdays = getconfigint("epg_days", NULL);
74        status.fasttextrender = getconfigint("fasttextrender", NULL);
75        status.recsplitsize = (off64_t)getconfigint("recsplitsize", NULL) * 1000 * 1000 * 1000;
76        status.epglistmode = getconfigint("epg_listmode", NULL);
77        status.listboxselecttype = getskinconfigint("listboxselecttype", NULL);
78        status.borderradius = getskinconfigint("borderradius", NULL);
79        status.httpauth = ostrcat(getconfig("httpauth", NULL), NULL, 0, 0);
80        status.showchanneltimeline = getconfigint("showchanneltimeline", NULL);
81        status.screenanim = getconfigint("screenanim", NULL);
82        status.screenanimspeed = getconfigint("screenanimspeed", NULL);
83        status.leftoffset = getconfigint("fbleftoffset", NULL);
84        status.rightoffset = getconfigint("fbrightoffset", NULL);
85        status.topoffset = getconfigint("fbtopoffset", NULL);
86        status.bottomoffset = getconfigint("fbbottomoffset", NULL);
87        status.createthumb = getconfigint("createthumb", NULL);
88       
89        status.bgpic = getskinconfig("bgpic", NULL);
90        if(status.bgpic != NULL)
91        {
92                unsigned long width = 0, height = 0, rowbytes = 0;
93                int channels = 0, memfd = -1, length = 0;
94                unsigned char* buf = NULL;
95               
96                status.bgpic = changepicpath(status.bgpic);
97               
98                length = strlen(status.bgpic);
99                if(status.bgpic[length - 1] == 'g' && status.bgpic[length - 2] == 'n' && status.bgpic[length - 3] == 'p')
100                {
101                        buf = readpng(status.bgpic, &width, &height, &rowbytes, &channels, 0, 0, 0, 0, 0, 0);
102                        addpic(status.bgpic, buf, memfd, width, height, rowbytes, channels, 0, 0, NULL);
103                }
104        }
105
106        for(i = 0; i < MAXLONGKEY; i++)
107        {
108                tmpstr = ostrcat("longkey", oitoa(i), 0, 1);
109                status.longkeycode[i] = getrcconfigint(tmpstr, NULL);
110                free(tmpstr); tmpstr = NULL;
111        }
112}
113
114#endif
Note: See TracBrowser for help on using the repository browser.