[7497] | 1 | #ifndef DEFAULTS_H |
---|
| 2 | #define DEFAULTS_H |
---|
| 3 | |
---|
| 4 | void setdefaults() |
---|
| 5 | { |
---|
[12226] | 6 | int i = 0; |
---|
| 7 | char* tmpstr = NULL; |
---|
| 8 | |
---|
[8605] | 9 | addconfigdef("vol", "30"); |
---|
[7758] | 10 | addconfigdef("dmxvideobuffersize", "1048576"); |
---|
[9132] | 11 | addconfigdef("dmxaudiobuffersize", "1048576"); |
---|
[8873] | 12 | addconfigdef("dmxepgbuffersize", "524288"); |
---|
[9132] | 13 | addconfigdef("dmxrecordbuffersize", "3145728"); |
---|
[9679] | 14 | addconfigdef("dmxtimeshiftbuffersize", "3145728"); |
---|
| 15 | addconfigdef("dmxstreambuffersize", "3145728"); |
---|
[11317] | 16 | addconfigdef("rec_moviepath", "/media"); |
---|
[8411] | 17 | addconfigdef("rec_path", "/media/hdd/movie"); |
---|
| 18 | addconfigdef("rec_timeshiftpath", "/media/hdd/movie"); |
---|
| 19 | addconfigdef("rec_timerpath", "/media/hdd/movie"); |
---|
[9107] | 20 | addconfigdef("rec_streampath", "/media/hdd/movie"); |
---|
[7497] | 21 | addconfigdef("epg_path", "/media/hdd"); |
---|
| 22 | addconfigdef("epg_days", "14"); |
---|
| 23 | addconfigdef("epg_del", "0"); |
---|
[14063] | 24 | addconfigdef("tracelog", "/media/hdd"); |
---|
[7497] | 25 | addconfigdef("spinnerspeed", "12"); |
---|
[7659] | 26 | addconfigdef("spinnertime", "5"); |
---|
[12249] | 27 | addconfigdef("hangtime", "60"); |
---|
[7497] | 28 | addconfigdef("skinfbwidth", "1280"); |
---|
| 29 | addconfigdef("skinfbheight", "720"); |
---|
[7623] | 30 | addconfigdef("fbleftoffset", "0"); |
---|
| 31 | addconfigdef("fbrightoffset", "0"); |
---|
| 32 | addconfigdef("fbtopoffset", "0"); |
---|
| 33 | addconfigdef("fbbottomoffset", "0"); |
---|
[11476] | 34 | addconfigdef("infobartimeout", "4"); |
---|
| 35 | addconfigdef("infobarsleep", "0"); |
---|
[7975] | 36 | addconfigdef("volbartimeout", "1"); |
---|
[7602] | 37 | addconfigdef("mc_videoplayerpath", "/media"); |
---|
[7798] | 38 | addconfigdef("vfdbrightness", "3"); |
---|
| 39 | addconfigdef("vfdstandbybrightness", "3"); |
---|
[7803] | 40 | addconfigdef("vs_brightness", "128"); |
---|
| 41 | addconfigdef("vs_contrast", "128"); |
---|
| 42 | addconfigdef("vs_tint", "128"); |
---|
| 43 | addconfigdef("vs_saturation", "128"); |
---|
[7968] | 44 | addconfigdef("epgfreespace", "100"); |
---|
[8066] | 45 | addconfigdef("pincode", "0000"); |
---|
[8494] | 46 | addconfigdef("pincodemenu", "0000"); |
---|
[8168] | 47 | addconfigdef("httpdstart", "0"); |
---|
[10699] | 48 | addconfigdef("httpdport", "80"); |
---|
| 49 | addconfigdef("streamport", "22222"); |
---|
[14638] | 50 | addconfigdef("rguidport", "22233"); |
---|
[8191] | 51 | addconfigdef("recordfreespace", "1000"); |
---|
[10720] | 52 | addconfigdef("skip13", "120"); |
---|
| 53 | addconfigdef("skip46", "300"); |
---|
| 54 | addconfigdef("skip79", "900"); |
---|
[11025] | 55 | addconfigdef("gmultiepgzoom", "4"); |
---|
[13347] | 56 | addconfigdef("wakeuptimerdevdiff", "300"); |
---|
[13333] | 57 | addconfigdef("rectimer_timediff", "120"); |
---|
[14260] | 58 | addconfigdef("screenanimspeed", "1"); |
---|
[14804] | 59 | addconfigdef("blindminfrequency", "9500"); |
---|
| 60 | addconfigdef("blindmaxfrequency", "14500"); |
---|
| 61 | addconfigdef("blindstepfrequency", "20"); |
---|
| 62 | addconfigdef("blindminsignalrate", "20000"); |
---|
| 63 | addconfigdef("blindmaxsignalrate", "30000"); |
---|
| 64 | addconfigdef("blindstepsignalrate", "20"); |
---|
[11025] | 65 | |
---|
[11352] | 66 | status.expertmodus = getconfigint("expertmodus", NULL); |
---|
[8892] | 67 | status.pmtmode = getconfigint("pmtmode", NULL); |
---|
[8605] | 68 | status.usedirectfb = getconfigint("usedirectfb", NULL); |
---|
| 69 | status.servicetype = getconfigint("servicetype", NULL); |
---|
[8318] | 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); |
---|
[8520] | 74 | status.fasttextrender = getconfigint("fasttextrender", NULL); |
---|
[8603] | 75 | status.recsplitsize = (off64_t)getconfigint("recsplitsize", NULL) * 1000 * 1000 * 1000; |
---|
[8980] | 76 | status.epglistmode = getconfigint("epg_listmode", NULL); |
---|
[9047] | 77 | status.listboxselecttype = getskinconfigint("listboxselecttype", NULL); |
---|
[9464] | 78 | status.borderradius = getskinconfigint("borderradius", NULL); |
---|
[11186] | 79 | status.httpauth = ostrcat(getconfig("httpauth", NULL), NULL, 0, 0); |
---|
[13802] | 80 | status.showchanneltimeline = getconfigint("showchanneltimeline", NULL); |
---|
[14083] | 81 | status.screenanim = getconfigint("screenanim", NULL); |
---|
[14225] | 82 | status.screenanimspeed = getconfigint("screenanimspeed", NULL); |
---|
[15006] | 83 | status.leftoffset = getconfigint("fbleftoffset", NULL); |
---|
| 84 | status.rightoffset = getconfigint("fbrightoffset", NULL); |
---|
| 85 | status.topoffset = getconfigint("fbtopoffset", NULL); |
---|
| 86 | status.bottomoffset = getconfigint("fbbottomoffset", NULL); |
---|
[15281] | 87 | status.createthumb = getconfigint("createthumb", NULL); |
---|
[15272] | 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); |
---|
[15288] | 102 | addpic(status.bgpic, buf, memfd, width, height, rowbytes, channels, 0, NULL); |
---|
[15272] | 103 | } |
---|
| 104 | } |
---|
[12226] | 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 | } |
---|
[7497] | 112 | } |
---|
| 113 | |
---|
| 114 | #endif |
---|