1 | /*****************************************************/ |
---|
2 | /* this file is part of the tiTan / tiTanNIT Project */ |
---|
3 | /* and allowed only for use with this. */ |
---|
4 | /* */ |
---|
5 | /* copyright by NIT */ |
---|
6 | /*****************************************************/ |
---|
7 | |
---|
8 | #ifndef STRUCT_H |
---|
9 | #define STRUCT_H |
---|
10 | |
---|
11 | #ifndef _GNU_SOURCE |
---|
12 | #define _GNU_SOURCE |
---|
13 | #endif |
---|
14 | |
---|
15 | #ifdef SIMULATE |
---|
16 | #include <mcheck.h> |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <stdio.h> |
---|
20 | #include <stdlib.h> |
---|
21 | #include <stdint.h> |
---|
22 | #include <string.h> |
---|
23 | #include <libgen.h> |
---|
24 | #include <fcntl.h> |
---|
25 | #include <ctype.h> |
---|
26 | #include <linux/fb.h> |
---|
27 | #include <sys/ioctl.h> |
---|
28 | #include <sys/mman.h> |
---|
29 | #include <sys/sysmacros.h> |
---|
30 | #include <png.h> |
---|
31 | #include <jpeglib.h> |
---|
32 | #include <libintl.h> |
---|
33 | #include <locale.h> |
---|
34 | #include <math.h> |
---|
35 | #include <linux/input.h> |
---|
36 | #include <sys/wait.h> |
---|
37 | #include <time.h> |
---|
38 | #include <dirent.h> |
---|
39 | #include <fnmatch.h> |
---|
40 | #include <dlfcn.h> |
---|
41 | #include <pthread.h> |
---|
42 | #include <linux/dvb/frontend.h> |
---|
43 | #include <linux/dvb/dmx.h> |
---|
44 | #include <linux/dvb/audio.h> |
---|
45 | #include <linux/dvb/video.h> |
---|
46 | #include <sys/vfs.h> |
---|
47 | #include <inttypes.h> |
---|
48 | #include <sys/socket.h> |
---|
49 | #include <sys/un.h> |
---|
50 | #include <unistd.h> |
---|
51 | #include <zlib.h> |
---|
52 | #include <net/if.h> |
---|
53 | #include <netinet/in.h> |
---|
54 | #include <arpa/inet.h> |
---|
55 | #include <netdb.h> |
---|
56 | #include <errno.h> |
---|
57 | #include <linux/dvb/version.h> |
---|
58 | #include <setjmp.h> |
---|
59 | #include <sys/mount.h> |
---|
60 | #include <execinfo.h> |
---|
61 | #include <ifaddrs.h> |
---|
62 | #include <linux/dvb/ca.h> |
---|
63 | #include <poll.h> |
---|
64 | #include <sys/utsname.h> |
---|
65 | #include <regex.h> |
---|
66 | #include <mntent.h> |
---|
67 | #include <termios.h> |
---|
68 | //#ifndef SH4 |
---|
69 | #include <sys/stat.h> |
---|
70 | //#endif |
---|
71 | #include <openssl/aes.h> |
---|
72 | #include <openssl/dh.h> |
---|
73 | #include <openssl/rsa.h> |
---|
74 | #include <openssl/sha.h> |
---|
75 | #include <stdio.h> |
---|
76 | #include <unistd.h> |
---|
77 | #include <fcntl.h> |
---|
78 | #include <sys/ioctl.h> |
---|
79 | #include <stdint.h> |
---|
80 | #include <inttypes.h> |
---|
81 | #include <arpa/inet.h> |
---|
82 | #include <time.h> |
---|
83 | #include <linux/dvb/ca.h> |
---|
84 | #include <sys/types.h> |
---|
85 | |
---|
86 | //#include <fcntl.h> |
---|
87 | //#include <stdint.h> |
---|
88 | //#include <stdio.h> |
---|
89 | //#include <stdlib.h> |
---|
90 | #include <string.h> |
---|
91 | //#include <sys/types.h> |
---|
92 | //#include <sys/stat.h> |
---|
93 | //#include <unistd.h> |
---|
94 | //#include <time.h> |
---|
95 | |
---|
96 | #ifdef SH4 |
---|
97 | #include <linux/types.h> |
---|
98 | #endif |
---|
99 | |
---|
100 | #include <openssl/pem.h> |
---|
101 | #include <openssl/x509.h> |
---|
102 | #include <openssl/x509v3.h> |
---|
103 | #include <openssl/sha.h> |
---|
104 | #include <openssl/aes.h> |
---|
105 | |
---|
106 | //for freetype |
---|
107 | #include <ft2build.h> |
---|
108 | #include FT_FREETYPE_H |
---|
109 | #include FT_CACHE_H |
---|
110 | |
---|
111 | //for eplayer |
---|
112 | #ifdef EPLAYER3 |
---|
113 | #include <common.h> |
---|
114 | //#ifndef BETA |
---|
115 | //#include <subtitle.h> |
---|
116 | //#endif |
---|
117 | #endif |
---|
118 | |
---|
119 | #ifdef EPLAYER4 |
---|
120 | #include <gst/gst.h> |
---|
121 | #include <gst/pbutils/missing-plugins.h> |
---|
122 | #endif |
---|
123 | |
---|
124 | #ifdef DVDPLAYER |
---|
125 | #include <ddvdlib.h> |
---|
126 | #endif |
---|
127 | |
---|
128 | #define DRIVER "" |
---|
129 | #define OVERSION "2.02" |
---|
130 | #define PROGNAME "titan" |
---|
131 | #define COPYRIGHT "NIT" |
---|
132 | #define CRONTRIBUT "obi, gost" |
---|
133 | #define PLUGINVERSION 1 |
---|
134 | |
---|
135 | #define _(x) gettext(x) |
---|
136 | #define MINMALLOC 4096 |
---|
137 | #define SCROLLBARWIDTH 15 |
---|
138 | #define SCROLLBARBORDERSIZE 1 |
---|
139 | #define FONTPOSYOFFSET -3 |
---|
140 | #define FB "fb0" |
---|
141 | #define FB1 "fb1" |
---|
142 | #define SKINFB "skinfb" |
---|
143 | #define ACCELFB "accelfb" |
---|
144 | #define CONFIGFILE PROGNAME".cfg" |
---|
145 | #define KILLPROG "killall -9 "PROGNAME |
---|
146 | #define REBOOT "init 6" |
---|
147 | #define FILELISTDELMARK 255 |
---|
148 | #define PLUGINDELMARK 254 |
---|
149 | #define MAXDVBADAPTER 1 |
---|
150 | #ifndef MIPSEL |
---|
151 | #define MAXFRONTENDDEV 4 |
---|
152 | #else |
---|
153 | #define MAXFRONTENDDEV 10 |
---|
154 | #endif |
---|
155 | #define MAXDEMUXDEVOPEN 10 |
---|
156 | #define MAXAUDIODEV 4 |
---|
157 | #define MAXVIDEODEV 4 |
---|
158 | #define MAXCIDEV 4 |
---|
159 | #define MAXCADEV 8 |
---|
160 | #ifndef MIPSEL |
---|
161 | #define MAXDVRDEV 4 |
---|
162 | #define MAXDEMUXDEV 4 |
---|
163 | #else |
---|
164 | #define MAXDVRDEV 9 |
---|
165 | #define MAXDEMUXDEV 9 |
---|
166 | #define MAXENCODERDEV 2 |
---|
167 | //#define DVB_API_VERSION 5 |
---|
168 | #endif |
---|
169 | #define MAXSCDEV 2 |
---|
170 | #define RCTIMEOUT 999999 |
---|
171 | #define RCTHREADSTANDBY 999998 |
---|
172 | #define MAXSERVICETYPE 10 |
---|
173 | #define CHANNELCACHEMAX 1000 |
---|
174 | #define MEDIADBCACHEMAX 1000 |
---|
175 | #define TRANSPONDERCACHEMAX 500 |
---|
176 | #define MAXHTTPDCONN 20 |
---|
177 | #define MAXHTMLLINE 300 |
---|
178 | #define MAXRGUIDCONN 1 |
---|
179 | #define LISTHASHSIZE 27 |
---|
180 | #define MAXCASESSION 16 |
---|
181 | #define MAXCASERVICE 20 |
---|
182 | #define MAXLONGKEY 10 |
---|
183 | #define MAXSAT 64 |
---|
184 | #define MAXBGDOWNLOAD 10 |
---|
185 | #ifdef MIPSEL |
---|
186 | #define EPGSCANLOG "/mnt/logs/epgscan.log" |
---|
187 | #else |
---|
188 | #define EPGSCANLOG "/tmp/epgscan.log" |
---|
189 | #endif |
---|
190 | #define MAXCHANNELHISTORY 6 |
---|
191 | #define HILO(x) (x##_hi << 8 | x##_lo) |
---|
192 | #define HILO32(x) (x##_hi << 24 | x##_mh << 16 | x##_ml << 8 | x##_lo) |
---|
193 | #define SERIALDEV "/dev/ttyAS0" |
---|
194 | #define MAXTOKENS 256 |
---|
195 | #define MAXSTACKTRACE 30 |
---|
196 | #define MAXSTACKTRACEFUNC 20 |
---|
197 | |
---|
198 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 |
---|
199 | #define EXT2_SUPER_MAGIC 0xEF53 |
---|
200 | #define EXT3_SUPER_MAGIC 0xEF53 |
---|
201 | #define SMB_SUPER_MAGIC 0x517B |
---|
202 | #define NFS_SUPER_MAGIC 0x6969 |
---|
203 | #define MSDOS_SUPER_MAGIC 0x4d44 |
---|
204 | |
---|
205 | #ifndef VIDEO_SOURCE_HDMI |
---|
206 | #define VIDEO_SOURCE_HDMI 2 |
---|
207 | #endif |
---|
208 | #ifndef AUDIO_SOURCE_HDMI |
---|
209 | #define AUDIO_SOURCE_HDMI 2 |
---|
210 | #endif |
---|
211 | |
---|
212 | //cacc cert check |
---|
213 | #define ROOT_CERT "/mnt/swapextensions/etc/pem/root.pem" |
---|
214 | #define CUSTOMER_CERT "/mnt/swapextensions/etc/pem/customer.pem" |
---|
215 | #define DEVICE_CERT "/mnt/swapextensions/etc/pem/device.pem" |
---|
216 | #define MAX_ELEMENTS 33 |
---|
217 | #ifdef MIPSEL |
---|
218 | #define CA_SET_DESCR_DATA_DREAM _IOW('o', 137, struct ca_descr_data) |
---|
219 | #define CA_SET_DESCR_DATA _IOW('o', 10, struct ca_descr_data) |
---|
220 | #endif |
---|
221 | #ifdef SH4NEW |
---|
222 | #define CA_SET_DESCR_DATA _IOW('o', 137, struct ca_descr_data) |
---|
223 | #endif |
---|
224 | #ifdef SIMULATE |
---|
225 | #define CA_SET_DESCR_DATA _IOW('o', 137, struct ca_descr_data) |
---|
226 | #endif |
---|
227 | |
---|
228 | //Start Function Entry Point |
---|
229 | #define STARTFUNC |
---|
230 | |
---|
231 | //CA Defines |
---|
232 | #define T_SB 0x80 //sb (h<--m) |
---|
233 | #define T_RCV 0x81 //receive (h-->m) |
---|
234 | #define T_CREATE_T_C 0x82 //create transport connection (h-->m) |
---|
235 | #define T_C_T_C_REPLY 0x83 //ctc reply (h<--m) |
---|
236 | #define T_DELETE_T_C 0x84 //delete tc (h<->m) |
---|
237 | #define T_D_T_C_REPLY 0x85 //dtc reply (h<->m) |
---|
238 | #define T_REQUEST_T_C 0x86 //request transport connection (h<--m) |
---|
239 | #define T_NEW_T_C 0x87 //new tc - reply to t_request (h-->m) |
---|
240 | #define T_T_C_ERROR 0x77 //error creating tc (h-->m) |
---|
241 | #define T_DATA_LAST 0xA0 //convey data from higher (h<->m) |
---|
242 | #define T_DATA_MORE 0xA1 //convey data from higher (h<->m) |
---|
243 | |
---|
244 | //Alarm Signal used as timeout |
---|
245 | #define ALARMTIMEOUT 1 |
---|
246 | #define ALARMSTARTTIME(x) if(ALARMTIMEOUT == 1) {alarm(x);} |
---|
247 | #define ALARMSTOPTIME if(ALARMTIMEOUT == 1) {alarm(0);} |
---|
248 | |
---|
249 | // VFD icons supported (more or less) on all boxes: |
---|
250 | #if defined(BOXMODEL_HS8200) |
---|
251 | typedef enum |
---|
252 | { |
---|
253 | VFD_USB = 0x06, |
---|
254 | VFD_HD = 0x05, |
---|
255 | VFD_HDD = 0x00, |
---|
256 | VFD_LOCK = 0x07, |
---|
257 | VFD_BT = 0x00, |
---|
258 | VFD_MP3 = 0x12, |
---|
259 | VFD_MUSIC = 0x16, |
---|
260 | VFD_DD = 0x08, |
---|
261 | VFD_MAIL = 0x00, |
---|
262 | VFD_MUTE = 0x09, |
---|
263 | VFD_PLAY = 0x0E, |
---|
264 | VFD_PAUSE = 0x10, |
---|
265 | VFD_FF = 0x12, |
---|
266 | VFD_FR = 0x11, |
---|
267 | VFD_REC = 0x02, |
---|
268 | VFD_CLOCK = 0x04 |
---|
269 | } vfdicons; |
---|
270 | #else |
---|
271 | typedef enum { VFD_USB = 0x10, VFD_HD, VFD_HDD, VFD_LOCK, VFD_BT, VFD_MP3, VFD_MUSIC, VFD_DD, VFD_MAIL, VFD_MUTE, VFD_PLAY, VFD_PAUSE, VFD_FF, VFD_FR, VFD_REC, VFD_CLOCK } vfdicons; |
---|
272 | #endif |
---|
273 | |
---|
274 | #define OMIN(a,b) (a < b ? a : b) |
---|
275 | #define OMAX(a,b) (a > b ? a : b) |
---|
276 | |
---|
277 | #define bcdtoint(i) ((((i & 0xf0) >> 4) * 10) + (i & 0x0f)) |
---|
278 | |
---|
279 | #define alpha_composite(composite, fg, alpha, ralpha, bg) { (composite) = ((fg)*(alpha) + (bg)*(ralpha)) >> 8; } |
---|
280 | |
---|
281 | enum {LEFT=20000, CENTER, RIGHT, TEXTCENTER, TEXTRIGHT}; |
---|
282 | enum {TOP=20000, MIDDLE, BOTTOM, TEXTMIDDLE, TEXTBOTTOM}; |
---|
283 | enum {BOTTOMLEFT, BOTTOMRIGHT, TOPLEFT, TOPRIGHT}; |
---|
284 | enum {LEFTRIGHT=1, TOPBOTTOM, LEFTMIDDLE, TOPMIDDLE}; |
---|
285 | enum {NO, YES, AUTONO, AUTOYES}; |
---|
286 | enum {UNDEF=0, LISTBOX=1, TEXTBOX=2, CHOICEBOX=4, INPUTBOX=8, INPUTBOXNUM=16, FILELIST=32, PROGRESSBAR=64, MENU=128, MULTIPROGRESSBAR=256, GRID=512, GRIDBR=1024, PASSWORD=2048}; |
---|
287 | enum {FRONTENDDEV, DEMUXDEV, VIDEODEV, AUDIODEV, CADEV, CIDEV, FRONTENDDEVDUMMY, DVRDEV, SCDEV, ENCODERDEV}; |
---|
288 | enum {TV, RADIO}; |
---|
289 | enum {RECDIRECT, RECTIMER, RECTIMESHIFT, RECSTREAM, RECPLAY, RECSTREAMENC}; |
---|
290 | #ifdef DREAMBOX |
---|
291 | enum {MPEGV = 0, MPEG4V = 4, H264 = 1, VC1 = 10, H265 = 22}; |
---|
292 | enum {AC3 = 0, MPEGA = 1, DTS = 2, LPCM = 6, AAC = 8, AACHE = 9, DTSHD = 16, DDP = 7}; |
---|
293 | #else |
---|
294 | enum {AC3 = 0, MPEGA = 1, DTS = 2, LPCM = 6, AAC = 8, AACHE = 9, DTSHD = 16, DDP = 34}; |
---|
295 | enum {MPEGV = 0, MPEG4V = 4, H264 = 1, VC1 = 10, H265 = 7}; |
---|
296 | #endif |
---|
297 | enum {ALLCHANNEL, SATCHANNEL, PROVIDERCHANNEL, AZCHANNEL, BOUQUETCHANNEL, SATLIST, PROVIDERLIST, AZLIST, MAINBOUQUETLIST}; |
---|
298 | enum {NOMODE, MVMODE, RMMODE, CPMODE, PROTECTMODE, EDITMODE, STREAMMODE}; |
---|
299 | enum {NOTHING, CHANNEL, STILLPIC, RECORDDIRECT, RECORDTIMER, RECORDTIMESHIFT, RECORDSTREAM, TMPOTHER, RECORDPLAY, HDMIIN, RECSTREMDIR}; |
---|
300 | enum {START, PAUSE, STOP}; |
---|
301 | enum {DEACTIVE, ACTIVE, INPAUSE, ERROR}; |
---|
302 | enum {FUNCTEXT, FUNCPIC, FUNCPROGRESS,FUNCPICOLED}; |
---|
303 | enum {CASESSIONCREATE, CASESSIONBUSY, CASESSIONDEL, CASESSIONSTART, CASESSIONFINAL, CARESFIRSTENQUIRY, CARESCHANGE, CARESENQUIRY, CADATETIMESEND, CAMMIIDLE, CAMMIDISPLAYREPLAY, CAMMIFAKEOK}; |
---|
304 | enum {feSatellite, feCable, feTerrestrial, feATSC}; |
---|
305 | |
---|
306 | #ifdef BETA |
---|
307 | struct stacktrace |
---|
308 | { |
---|
309 | int pos; |
---|
310 | pthread_t thread; |
---|
311 | void* func[MAXSTACKTRACEFUNC]; |
---|
312 | }; |
---|
313 | struct stacktrace stacktrace[MAXSTACKTRACE]; |
---|
314 | #endif |
---|
315 | |
---|
316 | struct lastsubtitle |
---|
317 | { |
---|
318 | uint64_t transponderid; |
---|
319 | int serviceid; |
---|
320 | int16_t subtitlepid; |
---|
321 | int16_t subtitleid1; |
---|
322 | int16_t subtitleid2; |
---|
323 | struct lastsubtitle* next; |
---|
324 | }; |
---|
325 | |
---|
326 | struct newsletter |
---|
327 | { |
---|
328 | unsigned long nr; |
---|
329 | char* date; |
---|
330 | char* title; |
---|
331 | char* text; |
---|
332 | struct newsletter* next; |
---|
333 | }; |
---|
334 | |
---|
335 | struct oldentry |
---|
336 | { |
---|
337 | void* entry; |
---|
338 | //0 = epg |
---|
339 | int type; |
---|
340 | time_t del; |
---|
341 | struct oldentry* next; |
---|
342 | }; |
---|
343 | |
---|
344 | struct unicable |
---|
345 | { |
---|
346 | char* manufacturer; |
---|
347 | char* product; |
---|
348 | int scr1; |
---|
349 | int scr2; |
---|
350 | int scr3; |
---|
351 | int scr4; |
---|
352 | int scr5; |
---|
353 | int scr6; |
---|
354 | int scr7; |
---|
355 | int scr8; |
---|
356 | int scr9; |
---|
357 | int scr10; |
---|
358 | int scr11; |
---|
359 | int scr12; |
---|
360 | int scr13; |
---|
361 | int scr14; |
---|
362 | int scr15; |
---|
363 | int scr16; |
---|
364 | int scr17; |
---|
365 | int scr18; |
---|
366 | int scr19; |
---|
367 | int scr20; |
---|
368 | int scr21; |
---|
369 | int scr22; |
---|
370 | int scr23; |
---|
371 | int scr24; |
---|
372 | int scr25; |
---|
373 | int scr26; |
---|
374 | int scr27; |
---|
375 | int scr28; |
---|
376 | int scr29; |
---|
377 | int scr30; |
---|
378 | int scr31; |
---|
379 | int scr32; |
---|
380 | int lofl; |
---|
381 | int lofh; |
---|
382 | struct unicable* next; |
---|
383 | struct unicable* prev; |
---|
384 | }; |
---|
385 | |
---|
386 | struct id3tag |
---|
387 | { |
---|
388 | int version; |
---|
389 | char* title; |
---|
390 | char* artist; |
---|
391 | char* album; |
---|
392 | char* year; |
---|
393 | char* comment; |
---|
394 | char* genrecode; |
---|
395 | char* genretext; |
---|
396 | char* poster; |
---|
397 | int track; |
---|
398 | int len; |
---|
399 | int picturetype; |
---|
400 | unsigned int picturepos; |
---|
401 | unsigned int picturelen; |
---|
402 | }; |
---|
403 | |
---|
404 | struct id3genre |
---|
405 | { |
---|
406 | int code; |
---|
407 | char text[30]; |
---|
408 | }; |
---|
409 | |
---|
410 | struct regex |
---|
411 | { |
---|
412 | char* match1; |
---|
413 | char* match2; |
---|
414 | char* match3; |
---|
415 | char* match4; |
---|
416 | char* match5; |
---|
417 | char* match6; |
---|
418 | char* match7; |
---|
419 | char* match8; |
---|
420 | char* match9; |
---|
421 | char* match10; |
---|
422 | }; |
---|
423 | |
---|
424 | struct imdb |
---|
425 | { |
---|
426 | char* title; |
---|
427 | char* year; |
---|
428 | char* rated; |
---|
429 | char* released; |
---|
430 | char* genre; |
---|
431 | char* director; |
---|
432 | char* writer; |
---|
433 | char* actors; |
---|
434 | char* plot; |
---|
435 | char* poster; |
---|
436 | char* runtime; |
---|
437 | char* rating; |
---|
438 | char* votes; |
---|
439 | char* id; |
---|
440 | char* thumb; |
---|
441 | }; |
---|
442 | |
---|
443 | struct imdbapi |
---|
444 | { |
---|
445 | char* title; |
---|
446 | char* year; |
---|
447 | char* rated; |
---|
448 | char* released; |
---|
449 | char* genre; |
---|
450 | char* director; |
---|
451 | char* writer; |
---|
452 | char* actors; |
---|
453 | char* plot; |
---|
454 | char* poster; |
---|
455 | char* runtime; |
---|
456 | char* rating; |
---|
457 | char* votes; |
---|
458 | char* id; |
---|
459 | }; |
---|
460 | |
---|
461 | struct tmdb |
---|
462 | { |
---|
463 | char* title; |
---|
464 | char* year; |
---|
465 | char* rated; |
---|
466 | char* released; |
---|
467 | char* genre; |
---|
468 | char* runtime; |
---|
469 | char* plot; |
---|
470 | char* postermid; |
---|
471 | char* rating; |
---|
472 | char* votes; |
---|
473 | char* id; |
---|
474 | char* backdrop; |
---|
475 | char* imdbid; |
---|
476 | char* orgname; |
---|
477 | char* language; |
---|
478 | char* type; |
---|
479 | char* score; |
---|
480 | char* cover; |
---|
481 | char* thumb; |
---|
482 | char* mvi; |
---|
483 | struct tmdb* prev; |
---|
484 | struct tmdb* next; |
---|
485 | }; |
---|
486 | |
---|
487 | struct mediadbfilter |
---|
488 | { |
---|
489 | struct mediadb* node; |
---|
490 | int count; |
---|
491 | struct mediadbfilter* prev; |
---|
492 | struct mediadbfilter* next; |
---|
493 | }; |
---|
494 | |
---|
495 | struct mediadbcategory |
---|
496 | { |
---|
497 | int type; |
---|
498 | char* name; |
---|
499 | struct mediadbcategory* prev; |
---|
500 | struct mediadbcategory* next; |
---|
501 | }; |
---|
502 | |
---|
503 | struct mediadb |
---|
504 | { |
---|
505 | char* id; |
---|
506 | int type; |
---|
507 | char* title; |
---|
508 | int year; |
---|
509 | char* released; |
---|
510 | char* runtime; |
---|
511 | char* genre; |
---|
512 | char* director; |
---|
513 | char* writer; |
---|
514 | char* actors; |
---|
515 | char* plot; |
---|
516 | char* poster; |
---|
517 | int rating; |
---|
518 | int votes; |
---|
519 | char* path; |
---|
520 | char* file; |
---|
521 | char* shortname; |
---|
522 | char* fileinfo; |
---|
523 | time_t timestamp; |
---|
524 | //bit 31: manual change |
---|
525 | int flag; |
---|
526 | int backdropcount; |
---|
527 | struct mediadb* prev; |
---|
528 | struct mediadb* next; |
---|
529 | }; |
---|
530 | |
---|
531 | struct mediadbcache |
---|
532 | { |
---|
533 | char* path; |
---|
534 | char* file; |
---|
535 | struct mediadb* mediadbnode; |
---|
536 | struct mediadbcache* next; |
---|
537 | }; |
---|
538 | |
---|
539 | struct mostzap |
---|
540 | { |
---|
541 | int serviceid; |
---|
542 | uint64_t transponderid; |
---|
543 | int count; |
---|
544 | struct mostzap* prev; |
---|
545 | struct mostzap* next; |
---|
546 | }; |
---|
547 | |
---|
548 | struct menulist |
---|
549 | { |
---|
550 | char* name; |
---|
551 | char* text; |
---|
552 | char* pic; |
---|
553 | char* param; |
---|
554 | char* param1; |
---|
555 | char* param2; |
---|
556 | char* param3; |
---|
557 | int deaktiv; |
---|
558 | int defaultentry; |
---|
559 | struct menulist* next; |
---|
560 | }; |
---|
561 | |
---|
562 | struct channelhistory |
---|
563 | { |
---|
564 | struct channel* chnode; |
---|
565 | char* channellist; |
---|
566 | }; |
---|
567 | |
---|
568 | struct queue |
---|
569 | { |
---|
570 | //0-99 for ca module |
---|
571 | //101 for thumb thread |
---|
572 | int type; |
---|
573 | int flag; |
---|
574 | int len; |
---|
575 | void* data; |
---|
576 | void* data1; |
---|
577 | struct queue* prev; |
---|
578 | struct queue* next; |
---|
579 | }; |
---|
580 | |
---|
581 | struct casession |
---|
582 | { |
---|
583 | int inuse; |
---|
584 | int sessionnr; |
---|
585 | int action; |
---|
586 | int state; |
---|
587 | int mmimanager; |
---|
588 | int camanager; |
---|
589 | int datetimemanager; |
---|
590 | int appmanager; |
---|
591 | int resmanager; |
---|
592 | int ccmanager; |
---|
593 | #ifdef MIPSEL |
---|
594 | int hostmanager; |
---|
595 | int mmiappmanager; |
---|
596 | int hostlacmanager; |
---|
597 | int upgrademanager; |
---|
598 | #endif |
---|
599 | char* mmititle; |
---|
600 | char* mmisubtitle; |
---|
601 | char* mmitext; |
---|
602 | char* mmibottom; |
---|
603 | }; |
---|
604 | |
---|
605 | struct caslot |
---|
606 | { |
---|
607 | struct casession casession[MAXCASESSION]; |
---|
608 | int connid; |
---|
609 | int poll; |
---|
610 | int status; |
---|
611 | int rlen; |
---|
612 | unsigned char* rbuf; |
---|
613 | char* name; |
---|
614 | int fastrun; |
---|
615 | char* caids; |
---|
616 | // cacc |
---|
617 | unsigned char lastKey[32]; |
---|
618 | uint8_t lastParity; |
---|
619 | // unsigned char scrambled; |
---|
620 | int scrambled; |
---|
621 | void *private_data; |
---|
622 | int ccmgr_ready; |
---|
623 | // not in used currently |
---|
624 | int inuse; |
---|
625 | int sidblacklisted; |
---|
626 | }; |
---|
627 | |
---|
628 | struct hdd |
---|
629 | { |
---|
630 | char* device; |
---|
631 | int partition; |
---|
632 | unsigned long long size; |
---|
633 | char* filesystem; |
---|
634 | char* label; |
---|
635 | char* uuid; |
---|
636 | char* vendor; |
---|
637 | char* model; |
---|
638 | int removable; |
---|
639 | int read; |
---|
640 | int write; |
---|
641 | int sleeptime; |
---|
642 | int notchanged; |
---|
643 | struct hdd* prev; |
---|
644 | struct hdd* next; |
---|
645 | }; |
---|
646 | |
---|
647 | struct scaninfo |
---|
648 | { |
---|
649 | struct dvbdev* fenode; |
---|
650 | struct transponder* tpnode; |
---|
651 | struct skin* scanscreen; |
---|
652 | struct skin* listbox; |
---|
653 | int threadend; |
---|
654 | int scantype; |
---|
655 | int fetype; |
---|
656 | int orbitalpos; |
---|
657 | int timeout; |
---|
658 | int onlyfree; |
---|
659 | int networkscan; |
---|
660 | int clear; |
---|
661 | int blindscan; |
---|
662 | char* satname; |
---|
663 | int tpcount; |
---|
664 | int tpmax; |
---|
665 | int tpnew; |
---|
666 | int tpdel; |
---|
667 | int tvcount; |
---|
668 | int newtvcount; |
---|
669 | int radiocount; |
---|
670 | int newradiocount; |
---|
671 | int datacount; |
---|
672 | int newdatacount; |
---|
673 | int blindcount; |
---|
674 | int newblindcount; |
---|
675 | int changename; |
---|
676 | int cleartransponder; |
---|
677 | unsigned int blindmax; |
---|
678 | } scaninfo; |
---|
679 | |
---|
680 | struct screensaver |
---|
681 | { |
---|
682 | int type; |
---|
683 | int speed; |
---|
684 | int newposx; |
---|
685 | int newposy; |
---|
686 | int flag; |
---|
687 | struct skin* screen; |
---|
688 | struct skin* screennode; |
---|
689 | struct skin* filelist; |
---|
690 | struct skin* aktnode; |
---|
691 | struct pic* pic; |
---|
692 | char* value; |
---|
693 | char* path; |
---|
694 | }; |
---|
695 | |
---|
696 | struct playlist |
---|
697 | { |
---|
698 | char* file; |
---|
699 | struct playlist* prev; |
---|
700 | struct playlist* next; |
---|
701 | }; |
---|
702 | |
---|
703 | struct mainplaylist |
---|
704 | { |
---|
705 | char* name; |
---|
706 | char* filename; |
---|
707 | struct playlist* playlist; |
---|
708 | struct mainplaylist* prev; |
---|
709 | struct mainplaylist* next; |
---|
710 | }; |
---|
711 | |
---|
712 | struct epgrecord |
---|
713 | { |
---|
714 | time_t begin; |
---|
715 | time_t end; |
---|
716 | int posx; |
---|
717 | int size; |
---|
718 | struct epgrecord* prev; |
---|
719 | struct epgrecord* next; |
---|
720 | }; |
---|
721 | |
---|
722 | struct download |
---|
723 | { |
---|
724 | char* link; |
---|
725 | char* cmd; |
---|
726 | char* host; |
---|
727 | char* page; |
---|
728 | int port; |
---|
729 | char* filename; |
---|
730 | char* auth; |
---|
731 | char* user; |
---|
732 | char* pass; |
---|
733 | int connfd; |
---|
734 | int proz; |
---|
735 | unsigned int maxkb; |
---|
736 | unsigned int aktkb; |
---|
737 | int ret; |
---|
738 | int timeout; |
---|
739 | int flag; |
---|
740 | }; |
---|
741 | |
---|
742 | struct copyfile |
---|
743 | { |
---|
744 | char* from; |
---|
745 | char* to; |
---|
746 | int proz; |
---|
747 | int filecount; |
---|
748 | int maxfilecount; |
---|
749 | off64_t maxkb; |
---|
750 | off64_t aktkb; |
---|
751 | int stop; |
---|
752 | int ret; |
---|
753 | int flag; |
---|
754 | }; |
---|
755 | |
---|
756 | struct epgscanlist |
---|
757 | { |
---|
758 | int serviceid; |
---|
759 | uint64_t transponderid; |
---|
760 | time_t scantime; |
---|
761 | struct epgscanlist* prev; |
---|
762 | struct epgscanlist* next; |
---|
763 | char* name; |
---|
764 | }; |
---|
765 | |
---|
766 | struct rgba |
---|
767 | { |
---|
768 | char r; |
---|
769 | char g; |
---|
770 | char b; |
---|
771 | char a; |
---|
772 | }; |
---|
773 | |
---|
774 | struct subclutentry |
---|
775 | { |
---|
776 | unsigned char Y, Cr, Cb, T; |
---|
777 | unsigned char valid; |
---|
778 | }; |
---|
779 | |
---|
780 | struct subclut |
---|
781 | { |
---|
782 | unsigned char clutid; |
---|
783 | unsigned char clutversionnumber; |
---|
784 | struct subclutentry entries2bit[4]; |
---|
785 | struct subclutentry entries4bit[16]; |
---|
786 | struct subclutentry entries8bit[256]; |
---|
787 | struct subclut *next; |
---|
788 | }; |
---|
789 | |
---|
790 | struct subpagereg |
---|
791 | { |
---|
792 | int regid; |
---|
793 | int reghorizontaladdress; |
---|
794 | int regverticaladdress; |
---|
795 | int scaleposx, scaleposy; |
---|
796 | struct subpagereg *next; |
---|
797 | }; |
---|
798 | |
---|
799 | struct subregobj |
---|
800 | { |
---|
801 | int objid; |
---|
802 | int objtype; |
---|
803 | int objproviderflag; |
---|
804 | int objhorizontalpos; |
---|
805 | int objverticalpos; |
---|
806 | // not supported right now... |
---|
807 | int foregroundpixel; |
---|
808 | int backgroundpixel; |
---|
809 | struct subregobj *next; |
---|
810 | }; |
---|
811 | |
---|
812 | struct subreg |
---|
813 | { |
---|
814 | int regid; |
---|
815 | int versionnumber; |
---|
816 | int height, width; |
---|
817 | int scaleheight, scalewidth; |
---|
818 | int depth; |
---|
819 | unsigned char *buf; |
---|
820 | struct rgba *palette; |
---|
821 | int clutid; |
---|
822 | int committed; |
---|
823 | struct subregobj *objects; |
---|
824 | struct subreg *next; |
---|
825 | }; |
---|
826 | |
---|
827 | struct subpage |
---|
828 | { |
---|
829 | int pageid; |
---|
830 | time_t pagetimeout; |
---|
831 | int pageversionnumber; |
---|
832 | int state; |
---|
833 | int pcssize; |
---|
834 | struct subpagereg *pageregions; |
---|
835 | struct subreg *regions; |
---|
836 | struct subclut *cluts; |
---|
837 | struct subpage *next; |
---|
838 | }; |
---|
839 | |
---|
840 | struct bitstream |
---|
841 | { |
---|
842 | unsigned char *data; |
---|
843 | int size; |
---|
844 | int avail; |
---|
845 | int consumed; |
---|
846 | }; |
---|
847 | |
---|
848 | //there are a copyrectimer function |
---|
849 | //if you change the struct you must change this funktion |
---|
850 | struct rectimer |
---|
851 | { |
---|
852 | char* name; |
---|
853 | char* timestamp; |
---|
854 | time_t begin; |
---|
855 | time_t end; |
---|
856 | int repeate; |
---|
857 | int afterevent; |
---|
858 | char* pincode; |
---|
859 | int disabled; |
---|
860 | int justplay; |
---|
861 | char* recpath; |
---|
862 | int servicetype; |
---|
863 | char* channellist; |
---|
864 | int serviceid; |
---|
865 | //0 = nothing |
---|
866 | //1 = running |
---|
867 | //2 = end |
---|
868 | //3 = error |
---|
869 | //4 = epgscan timer activ |
---|
870 | //5 = epgscan timer not activ |
---|
871 | int status; |
---|
872 | char* errstr; |
---|
873 | struct service* servicenode; |
---|
874 | uint64_t transponderid; |
---|
875 | struct rectimer *prev; |
---|
876 | struct rectimer *next; |
---|
877 | }; |
---|
878 | |
---|
879 | struct inetwork |
---|
880 | { |
---|
881 | char* device; |
---|
882 | char* ip; |
---|
883 | char* netmask; |
---|
884 | char* mac; |
---|
885 | char* broadcast; |
---|
886 | //0 = static |
---|
887 | //1 = dhcp |
---|
888 | //2 = off |
---|
889 | int type; |
---|
890 | int found; |
---|
891 | //flag 1 = used in titan |
---|
892 | int flag; |
---|
893 | struct inetwork *prev; |
---|
894 | struct inetwork *next; |
---|
895 | }; |
---|
896 | |
---|
897 | struct rcmap |
---|
898 | { |
---|
899 | char* name; |
---|
900 | int key; |
---|
901 | int newkey; |
---|
902 | struct rcmap* next; |
---|
903 | }; |
---|
904 | |
---|
905 | struct splitstr |
---|
906 | { |
---|
907 | char* part; |
---|
908 | }; |
---|
909 | |
---|
910 | struct channelcache |
---|
911 | { |
---|
912 | int serviceid; |
---|
913 | uint64_t transponderid; |
---|
914 | struct channel* chnode; |
---|
915 | struct channelcache* next; |
---|
916 | }; |
---|
917 | |
---|
918 | struct transpondercache |
---|
919 | { |
---|
920 | uint64_t transponderid; |
---|
921 | struct transponder* tpnode; |
---|
922 | struct transpondercache* next; |
---|
923 | }; |
---|
924 | |
---|
925 | struct filelist |
---|
926 | { |
---|
927 | int type; |
---|
928 | int view; |
---|
929 | off64_t size; |
---|
930 | time_t date; |
---|
931 | }; |
---|
932 | |
---|
933 | struct skin |
---|
934 | { |
---|
935 | char* name; |
---|
936 | unsigned int type; |
---|
937 | uint8_t wrap; |
---|
938 | uint8_t bordersize; |
---|
939 | uint8_t scrollbar; |
---|
940 | uint16_t halign; |
---|
941 | uint16_t valign; |
---|
942 | int16_t posx; |
---|
943 | int16_t posy; |
---|
944 | int16_t width; |
---|
945 | int16_t height; |
---|
946 | long bordercol; |
---|
947 | long deaktivcol; |
---|
948 | long shadowcol; |
---|
949 | uint8_t shadowsize; |
---|
950 | uint8_t shadowpos; |
---|
951 | uint8_t fontsize; |
---|
952 | uint8_t fontsize2; |
---|
953 | long fontcol; |
---|
954 | long fontcol2; |
---|
955 | char* font; |
---|
956 | int16_t zorder; |
---|
957 | int16_t titlealign; |
---|
958 | char* title; |
---|
959 | char* text; |
---|
960 | char* text2; |
---|
961 | long bgcol; |
---|
962 | long bgcol2; |
---|
963 | long titlebgcol; |
---|
964 | long titlebgcol2; |
---|
965 | long progresscol; |
---|
966 | char* selectpic; |
---|
967 | char* pic; |
---|
968 | int16_t picwidth; |
---|
969 | int16_t picheight; |
---|
970 | uint16_t hspace; |
---|
971 | uint16_t vspace; |
---|
972 | char* (*skinfunc)(struct skin*, void*, void*); |
---|
973 | char* param1; |
---|
974 | char* param2; |
---|
975 | char* parent; |
---|
976 | char* input; |
---|
977 | char* mask; |
---|
978 | uint16_t textposx; |
---|
979 | uint16_t textposx2; |
---|
980 | int16_t gradient; |
---|
981 | int16_t titlegradient; |
---|
982 | uint8_t transparent; |
---|
983 | uint8_t hidden; |
---|
984 | uint8_t funcrettype; |
---|
985 | int8_t charspace; |
---|
986 | int8_t bordertype; |
---|
987 | int16_t borderradius; |
---|
988 | uint16_t bgspace; |
---|
989 | uint8_t picquality; |
---|
990 | |
---|
991 | uint8_t titlesize; |
---|
992 | struct filelist* filelist; |
---|
993 | struct skin* parentpointer; |
---|
994 | char* ret; |
---|
995 | char* choiceboxvalue; |
---|
996 | unsigned int linecount; |
---|
997 | unsigned int pagecount; |
---|
998 | unsigned int poscount; |
---|
999 | unsigned int gridcol; |
---|
1000 | int aktpage; |
---|
1001 | int aktline; |
---|
1002 | uint8_t scrollbarbordersize; |
---|
1003 | uint8_t prozposx; |
---|
1004 | uint8_t prozposy; |
---|
1005 | uint8_t prozwidth; |
---|
1006 | uint8_t prozheight; |
---|
1007 | uint8_t picprozwidth; |
---|
1008 | uint8_t del; |
---|
1009 | uint8_t picprozheight; |
---|
1010 | int16_t scrollbarheight; |
---|
1011 | int16_t progresssize; |
---|
1012 | int16_t scrollbarwidth; |
---|
1013 | int16_t scrollbarpos; |
---|
1014 | int16_t rposx; |
---|
1015 | int16_t rposy; |
---|
1016 | int16_t rwidth; |
---|
1017 | int16_t rheight; |
---|
1018 | int16_t rpicwidth; |
---|
1019 | int16_t rpicheight; |
---|
1020 | int16_t iposx; |
---|
1021 | int16_t iposy; |
---|
1022 | int16_t iwidth; |
---|
1023 | int16_t iheight; |
---|
1024 | char* handle; |
---|
1025 | char* handle1; |
---|
1026 | struct epgrecord* epgrecord; |
---|
1027 | char* pluginhandle; |
---|
1028 | uint8_t locked; |
---|
1029 | uint8_t picmem; |
---|
1030 | //bit 0: 1 = node is drawed |
---|
1031 | //bit 1: 1 = node is changed |
---|
1032 | uint8_t flag; |
---|
1033 | int hash; |
---|
1034 | struct skin *select; |
---|
1035 | struct skin *child; |
---|
1036 | struct skin *prev; |
---|
1037 | struct skin *next; |
---|
1038 | struct skin *drawnext; |
---|
1039 | // usesavebg=0 disable |
---|
1040 | // usesavebg=1 save always |
---|
1041 | // usesavebg=2 save one times then free |
---|
1042 | // usesavebg=3 dummy for filelist |
---|
1043 | int usesavebg; |
---|
1044 | // savebg is saved date |
---|
1045 | char* savebg; |
---|
1046 | // fuer blinken |
---|
1047 | int nodestyle; |
---|
1048 | }; |
---|
1049 | |
---|
1050 | struct style |
---|
1051 | { |
---|
1052 | char* name; |
---|
1053 | int16_t posx; |
---|
1054 | int16_t posy; |
---|
1055 | int16_t width; |
---|
1056 | int16_t height; |
---|
1057 | int16_t picwidth; |
---|
1058 | int16_t picheight; |
---|
1059 | uint16_t textposx; |
---|
1060 | uint16_t textposx2; |
---|
1061 | uint16_t halign; |
---|
1062 | uint16_t valign; |
---|
1063 | uint16_t hspace; |
---|
1064 | uint16_t vspace; |
---|
1065 | uint16_t bgspace; |
---|
1066 | int16_t borderradius; |
---|
1067 | int16_t titlealign; |
---|
1068 | int16_t zorder; |
---|
1069 | int16_t gradient; |
---|
1070 | int16_t titlegradient; |
---|
1071 | uint8_t picquality; |
---|
1072 | uint8_t hidden; |
---|
1073 | uint8_t wrap; |
---|
1074 | uint8_t scrollbar; |
---|
1075 | uint8_t bordersize; |
---|
1076 | int8_t bordertype; |
---|
1077 | uint8_t shadowsize; |
---|
1078 | uint8_t shadowpos; |
---|
1079 | uint8_t fontsize; |
---|
1080 | uint8_t fontsize2; |
---|
1081 | int8_t charspace; |
---|
1082 | uint8_t transparent; |
---|
1083 | uint8_t prozposx; |
---|
1084 | uint8_t prozposy; |
---|
1085 | uint8_t prozwidth; |
---|
1086 | uint8_t prozheight; |
---|
1087 | uint8_t picprozwidth; |
---|
1088 | uint8_t picprozheight; |
---|
1089 | uint8_t funcrettype; |
---|
1090 | uint8_t picmem; |
---|
1091 | long bordercol; |
---|
1092 | long deaktivcol; |
---|
1093 | long progresscol; |
---|
1094 | long shadowcol; |
---|
1095 | long fontcol; |
---|
1096 | long fontcol2; |
---|
1097 | long titlebgcol; |
---|
1098 | long titlebgcol2; |
---|
1099 | long bgcol; |
---|
1100 | long bgcol2; |
---|
1101 | char* font; |
---|
1102 | char* pic; |
---|
1103 | char* param1; |
---|
1104 | char* param2; |
---|
1105 | char* input; |
---|
1106 | char* mask; |
---|
1107 | char* (*skinfunc)(struct skin*, void*, void*); |
---|
1108 | struct style* next; |
---|
1109 | }; |
---|
1110 | |
---|
1111 | struct epg |
---|
1112 | { |
---|
1113 | int eventid; |
---|
1114 | int version; |
---|
1115 | time_t starttime; |
---|
1116 | time_t endtime; |
---|
1117 | char* title; |
---|
1118 | char* subtitle; |
---|
1119 | char* desc; |
---|
1120 | int desclen; |
---|
1121 | int desccomplen; |
---|
1122 | int parentalrating; |
---|
1123 | struct epg* prev; |
---|
1124 | struct epg* next; |
---|
1125 | }; |
---|
1126 | |
---|
1127 | struct shutdowntimer |
---|
1128 | { |
---|
1129 | int active,type; //type: 0=DeepStandby, 1=Standby |
---|
1130 | long long shutdown_time; |
---|
1131 | }; |
---|
1132 | |
---|
1133 | struct dvbdev |
---|
1134 | { |
---|
1135 | char* dev; |
---|
1136 | int fd; |
---|
1137 | uint8_t type; |
---|
1138 | uint8_t adapter; |
---|
1139 | uint8_t devnr; |
---|
1140 | uint8_t felock; |
---|
1141 | uint8_t deactive; |
---|
1142 | uint8_t decoder; |
---|
1143 | struct transponder* felasttransponder; |
---|
1144 | struct transponder* feakttransponder; |
---|
1145 | int feunicable; |
---|
1146 | unsigned int feloffrequency; |
---|
1147 | unsigned int feloffrequency_uni; |
---|
1148 | int feaktband; |
---|
1149 | int feaktpolarization; |
---|
1150 | fe_sec_voltage_t feaktvolt; |
---|
1151 | fe_sec_tone_mode_t feakttone; |
---|
1152 | int fedmxsource; |
---|
1153 | char* feaktnr; |
---|
1154 | char* feshortname; |
---|
1155 | char* fehyprid; |
---|
1156 | struct dvb_frontend_info* feinfo; |
---|
1157 | struct caslot* caslot; |
---|
1158 | struct dvbdev *next; |
---|
1159 | }; |
---|
1160 | |
---|
1161 | //there are a copytransponder and createtransponder function |
---|
1162 | //if you change this struct you must change the function |
---|
1163 | struct transponder |
---|
1164 | { |
---|
1165 | uint64_t id; |
---|
1166 | uint8_t fetype; |
---|
1167 | uint8_t polarization; |
---|
1168 | uint8_t modulation; |
---|
1169 | uint8_t fec; |
---|
1170 | uint8_t pilot; |
---|
1171 | uint8_t rolloff; |
---|
1172 | uint8_t inversion; |
---|
1173 | uint8_t system; |
---|
1174 | uint8_t flag; |
---|
1175 | // 0 = unknown |
---|
1176 | // 1 = tunable |
---|
1177 | // 2 = not tunable |
---|
1178 | uint8_t tunablestatus; |
---|
1179 | int orbitalpos; |
---|
1180 | unsigned int frequency; |
---|
1181 | unsigned int symbolrate; |
---|
1182 | int encoding; |
---|
1183 | time_t lastepg; |
---|
1184 | struct transponder *next; |
---|
1185 | }; |
---|
1186 | |
---|
1187 | struct provider |
---|
1188 | { |
---|
1189 | int providerid; |
---|
1190 | char* name; |
---|
1191 | int flag; |
---|
1192 | struct provider *prev; |
---|
1193 | struct provider *next; |
---|
1194 | }; |
---|
1195 | |
---|
1196 | struct playersubtitle |
---|
1197 | { |
---|
1198 | char* subtext; |
---|
1199 | |
---|
1200 | #ifdef EPLAYER4 |
---|
1201 | uint32_t buf_pos_ms; |
---|
1202 | uint32_t duration_ms; |
---|
1203 | gint64 duration_ns; |
---|
1204 | gint64 buf_pos; |
---|
1205 | #endif |
---|
1206 | |
---|
1207 | #ifdef EXTEPLAYER3 |
---|
1208 | uint32_t sub_duration_ms; |
---|
1209 | uint32_t sub_pts_ms; |
---|
1210 | int64_t sub_pts_int64; |
---|
1211 | |
---|
1212 | int sub_pts_sec; |
---|
1213 | int sub_duration_sec; |
---|
1214 | #endif |
---|
1215 | struct playersubtitle* next; |
---|
1216 | }; |
---|
1217 | |
---|
1218 | struct subtitle |
---|
1219 | { |
---|
1220 | char* name; |
---|
1221 | int16_t subtype; |
---|
1222 | int16_t pid; |
---|
1223 | int16_t type; |
---|
1224 | int16_t id1; |
---|
1225 | int16_t id2; |
---|
1226 | struct subtitle* next; |
---|
1227 | }; |
---|
1228 | |
---|
1229 | struct esinfo |
---|
1230 | { |
---|
1231 | int streamtype; |
---|
1232 | int pid; |
---|
1233 | struct esinfo* next; |
---|
1234 | }; |
---|
1235 | |
---|
1236 | struct cadesc |
---|
1237 | { |
---|
1238 | int pid; |
---|
1239 | int len; |
---|
1240 | int systemid; |
---|
1241 | int reserved; |
---|
1242 | int capid; |
---|
1243 | char* privat; |
---|
1244 | struct cadesc* next; |
---|
1245 | }; |
---|
1246 | |
---|
1247 | struct pmt |
---|
1248 | { |
---|
1249 | int programnumber; |
---|
1250 | int versionnumber; |
---|
1251 | int currentnextindicator; |
---|
1252 | }; |
---|
1253 | |
---|
1254 | struct audiotrack |
---|
1255 | { |
---|
1256 | char* name; |
---|
1257 | uint8_t audiocodec; |
---|
1258 | int16_t audiopid; |
---|
1259 | int16_t rdspid; |
---|
1260 | struct audiotrack* next; |
---|
1261 | }; |
---|
1262 | |
---|
1263 | struct linkedchannel |
---|
1264 | { |
---|
1265 | uint64_t transponderid; |
---|
1266 | int serviceid; |
---|
1267 | time_t starttime; |
---|
1268 | time_t endtime; |
---|
1269 | struct linkedchannel* next; |
---|
1270 | }; |
---|
1271 | |
---|
1272 | //there are a createchannel function |
---|
1273 | //if you change this struct you must change the function |
---|
1274 | struct channel |
---|
1275 | { |
---|
1276 | char* name; |
---|
1277 | uint64_t transponderid; |
---|
1278 | int providerid; |
---|
1279 | int serviceid; |
---|
1280 | int servicetype; |
---|
1281 | uint8_t flag; |
---|
1282 | uint8_t crypt; |
---|
1283 | int8_t videocodec; |
---|
1284 | int8_t audiocodec; |
---|
1285 | int16_t videopid; |
---|
1286 | int16_t audiopid; |
---|
1287 | int16_t ac3audiopid; |
---|
1288 | int16_t txtpid; |
---|
1289 | int16_t pcrpid; |
---|
1290 | int16_t pmtpid; |
---|
1291 | int16_t aitpid; |
---|
1292 | uint8_t protect; |
---|
1293 | char* hbbtvurl; |
---|
1294 | char* streamurl; |
---|
1295 | char* epgurl; |
---|
1296 | struct transponder *transponder; |
---|
1297 | struct provider *provider; |
---|
1298 | struct audiotrack *audiotrack; |
---|
1299 | struct subtitle *subtitle; |
---|
1300 | struct linkedchannel *linkedchannel; |
---|
1301 | struct pmt *pmt; |
---|
1302 | struct cadesc *cadesc; |
---|
1303 | struct esinfo *esinfo; |
---|
1304 | struct epg *epg; |
---|
1305 | struct channel *prev; |
---|
1306 | struct channel *next; |
---|
1307 | }; |
---|
1308 | |
---|
1309 | struct sat |
---|
1310 | { |
---|
1311 | char* name; |
---|
1312 | int orbitalpos; |
---|
1313 | int flag; |
---|
1314 | int fetype; |
---|
1315 | int scan; |
---|
1316 | struct sat *prev; |
---|
1317 | struct sat *next; |
---|
1318 | }; |
---|
1319 | |
---|
1320 | struct service |
---|
1321 | { |
---|
1322 | int type; |
---|
1323 | char* channellist; |
---|
1324 | struct dvbdev *fedev; |
---|
1325 | struct dvbdev *dmxaudiodev; |
---|
1326 | struct dvbdev *dmxvideodev; |
---|
1327 | struct dvbdev *dmxpcrdev; |
---|
1328 | struct dvbdev *dmxsubtitledev; |
---|
1329 | struct dvbdev *audiodev; |
---|
1330 | struct dvbdev *videodev; |
---|
1331 | struct dvbdev *encoderdev; |
---|
1332 | struct transponder *transponder; |
---|
1333 | struct channel *channel; |
---|
1334 | unsigned char *pmtbuf; |
---|
1335 | int pmtlen; |
---|
1336 | int recdmxstart; |
---|
1337 | int recdstfd; |
---|
1338 | int recsrcfd; |
---|
1339 | time_t recendtime; |
---|
1340 | char* rectimestamp; |
---|
1341 | size_t reclastsync; |
---|
1342 | off64_t rectotal; |
---|
1343 | int reccount; |
---|
1344 | int tssize; |
---|
1345 | char* recname; |
---|
1346 | unsigned long long lenpts; |
---|
1347 | unsigned long long startpts; |
---|
1348 | unsigned long long endpts; |
---|
1349 | unsigned long long bitrate; |
---|
1350 | off64_t endoffile; |
---|
1351 | struct service *next; |
---|
1352 | }; |
---|
1353 | |
---|
1354 | struct caservice |
---|
1355 | { |
---|
1356 | struct service* service; |
---|
1357 | struct channel* channel; |
---|
1358 | int count; |
---|
1359 | int camsockfd; |
---|
1360 | struct caslot* caslot; |
---|
1361 | int camanager; |
---|
1362 | char* capmt; |
---|
1363 | int capmtlen; |
---|
1364 | int cmdpos; |
---|
1365 | }; |
---|
1366 | |
---|
1367 | struct stimerthread |
---|
1368 | { |
---|
1369 | int delay; |
---|
1370 | int count; |
---|
1371 | int notfirst; |
---|
1372 | pthread_attr_t attr; |
---|
1373 | pthread_t thread; |
---|
1374 | int status; |
---|
1375 | int aktion; |
---|
1376 | //bit 0: 1 = stop allwas on titan end |
---|
1377 | int flag; |
---|
1378 | void* param1; |
---|
1379 | void* param2; |
---|
1380 | void* (*func)(struct stimerthread*, void*, void*); |
---|
1381 | struct stimerthread* next; |
---|
1382 | }; |
---|
1383 | |
---|
1384 | struct hddparm |
---|
1385 | { |
---|
1386 | char* device; |
---|
1387 | int read; |
---|
1388 | int write; |
---|
1389 | int sleeptime; |
---|
1390 | int notchanged; |
---|
1391 | }; |
---|
1392 | |
---|
1393 | struct marker |
---|
1394 | { |
---|
1395 | off64_t pos; |
---|
1396 | off64_t time; |
---|
1397 | char* timetext; |
---|
1398 | struct marker* prev; |
---|
1399 | struct marker* next; |
---|
1400 | }; |
---|
1401 | |
---|
1402 | struct status |
---|
1403 | { |
---|
1404 | int longkeycode[MAXLONGKEY]; |
---|
1405 | //aktivate extra featers |
---|
1406 | int expertmodus; |
---|
1407 | //http user:passwd |
---|
1408 | char* httpauth; |
---|
1409 | //set to 1 if channellist or channelnr open |
---|
1410 | int channelswitch; |
---|
1411 | //deaktivates child protect if greater then akttime |
---|
1412 | time_t protecttime; |
---|
1413 | char* boxtype; |
---|
1414 | char* realboxtype; |
---|
1415 | char* chipset; |
---|
1416 | pthread_t mainthread; |
---|
1417 | //videosize from stream |
---|
1418 | video_size_t videosize; |
---|
1419 | time_t videosizevalid; |
---|
1420 | //radius for rounded border |
---|
1421 | int borderradius; |
---|
1422 | int picbordersize; |
---|
1423 | int titlelinesize; |
---|
1424 | //0 border |
---|
1425 | //1 fullbar |
---|
1426 | int listboxselecttype; |
---|
1427 | //0 camd.socket |
---|
1428 | //1 pmt.tmp |
---|
1429 | int pmtmode; |
---|
1430 | //timer for del old epg entrys |
---|
1431 | time_t deloldepg; |
---|
1432 | //write epg periodic to medium |
---|
1433 | time_t writeperiodicepg; |
---|
1434 | //0 dektiv |
---|
1435 | //1 only scan |
---|
1436 | //2 only whitlist |
---|
1437 | //3 scan and whitelist |
---|
1438 | int epglistmode; |
---|
1439 | // 1 manual |
---|
1440 | // 2 from standby |
---|
1441 | int startmode; |
---|
1442 | jmp_buf longjumpbuf; |
---|
1443 | pthread_mutex_t drawingmutex; |
---|
1444 | pthread_mutex_t rectimermutex; |
---|
1445 | pthread_mutex_t servicemutex; |
---|
1446 | pthread_mutex_t epgmutex; |
---|
1447 | pthread_mutex_t channelmutex; |
---|
1448 | pthread_mutex_t timerthreadmutex; |
---|
1449 | pthread_mutex_t audiotrackmutex; |
---|
1450 | pthread_mutex_t subtitlemutex; |
---|
1451 | pthread_mutex_t linkedchannelmutex; |
---|
1452 | pthread_mutex_t dmxdevmutex; |
---|
1453 | pthread_mutex_t rcmutex; |
---|
1454 | pthread_mutex_t queuemutex; |
---|
1455 | pthread_mutex_t clistmutex; |
---|
1456 | pthread_mutex_t hddmutex; |
---|
1457 | pthread_mutex_t tsseekmutex; |
---|
1458 | pthread_mutex_t accelfbmutex; |
---|
1459 | pthread_mutex_t mediadbmutex; |
---|
1460 | pthread_mutex_t oldentrymutex; |
---|
1461 | pthread_mutex_t newslettermutex; |
---|
1462 | pthread_mutex_t tithekmutex; |
---|
1463 | pthread_mutex_t inetworkmutex; |
---|
1464 | pthread_mutex_t textboxmutex; |
---|
1465 | pthread_mutex_t setaktresmutex; |
---|
1466 | pthread_mutex_t waitrcmutex; |
---|
1467 | // mutex for VFD handling |
---|
1468 | pthread_mutex_t vfdmutex; |
---|
1469 | // mutex for OLED handling |
---|
1470 | pthread_mutex_t oledmutex; |
---|
1471 | // mutex for cec handling |
---|
1472 | pthread_mutex_t cecmutex; |
---|
1473 | off64_t recsplitsize; |
---|
1474 | char* gateway; |
---|
1475 | char* dnsserver1; |
---|
1476 | char* dnsserver2; |
---|
1477 | int fasttextrender; |
---|
1478 | // 1 release all menus |
---|
1479 | int menurelease; |
---|
1480 | int play; |
---|
1481 | int pause; |
---|
1482 | int playspeed; |
---|
1483 | int slowspeed; |
---|
1484 | int prefillbuffer; |
---|
1485 | int playpic; |
---|
1486 | int singlepicfd; |
---|
1487 | int singlepicthreadstatus; |
---|
1488 | #ifdef EPLAYER4 |
---|
1489 | int prefillbuffercount; |
---|
1490 | int bufferpercent; |
---|
1491 | int cleaninfobar; |
---|
1492 | // gint avgInRate; |
---|
1493 | // gint avgOutRate; |
---|
1494 | // gint64 bufferingLeft; |
---|
1495 | gint64 pts; |
---|
1496 | #endif |
---|
1497 | int random; |
---|
1498 | int repeat; |
---|
1499 | int epgdays; |
---|
1500 | int spinnertime; |
---|
1501 | int spinnerspeed; |
---|
1502 | int hangtime; |
---|
1503 | int timeupdatecount; |
---|
1504 | int markmodus; |
---|
1505 | // 1 from main prog |
---|
1506 | // 2 from a thread |
---|
1507 | int standby; |
---|
1508 | char* tmp; |
---|
1509 | // rc filedescriptor |
---|
1510 | int fdrc; |
---|
1511 | // rc filedescriptor for tuxtxt |
---|
1512 | int fdrctxt; |
---|
1513 | int writeconfig; |
---|
1514 | int writeownconfig; |
---|
1515 | int writercconfig; |
---|
1516 | int writeskinconfig; |
---|
1517 | int writechannel; |
---|
1518 | int writetransponder; |
---|
1519 | int writeprovider; |
---|
1520 | int writemainbouquet; |
---|
1521 | int writebouquet; |
---|
1522 | int writemainplaylist; |
---|
1523 | int writeplaylist; |
---|
1524 | int writesat; |
---|
1525 | int writerectimer; |
---|
1526 | int writeepgscanlist; |
---|
1527 | int writemostzap; |
---|
1528 | int writemediadb; |
---|
1529 | int writelastsubtitle; |
---|
1530 | int writechannelslot; |
---|
1531 | // 1 mute is aktiv |
---|
1532 | int mute; |
---|
1533 | // 1 spinner is aktiv |
---|
1534 | int spinner; |
---|
1535 | // 1 infobar is aktiv |
---|
1536 | // 2 infobar is aktiv (with wait befor show) |
---|
1537 | // 3 infobar is aktiv (no autohide) |
---|
1538 | int infobar; |
---|
1539 | // with infobar to display |
---|
1540 | int infobarnr; |
---|
1541 | // 0 is for mute screen |
---|
1542 | struct skin *drawallways[1]; |
---|
1543 | char* drawallwaysbg[1]; |
---|
1544 | int usedirectfb; |
---|
1545 | // count how long last rcwait (shows spinner if to long) |
---|
1546 | time_t sec; |
---|
1547 | // if set to a value != 0, rcwait returns this number |
---|
1548 | int rckey; |
---|
1549 | struct skin* skinerr; |
---|
1550 | pthread_attr_t timerthreadattr; |
---|
1551 | pthread_t timerthread; |
---|
1552 | int timerthreadstatus; |
---|
1553 | int timerthreadaktion; |
---|
1554 | pthread_attr_t subthreadattr; |
---|
1555 | pthread_t subthread; |
---|
1556 | int subthreadstatus; |
---|
1557 | int subthreadaktion; |
---|
1558 | int subthreadpid; |
---|
1559 | int subthreadid1; |
---|
1560 | int subthreadid2; |
---|
1561 | // epg thread pointer |
---|
1562 | struct stimerthread* epgthread; |
---|
1563 | // epgscanlist thread pointer |
---|
1564 | struct stimerthread* epgscanlistthread; |
---|
1565 | // httpd thread pointer |
---|
1566 | struct stimerthread* httpthread; |
---|
1567 | // rguid thread pointer |
---|
1568 | struct stimerthread* rguithread; |
---|
1569 | // mediadb thread pointer |
---|
1570 | struct stimerthread* mediadbthread; |
---|
1571 | // newsletter thread pointer |
---|
1572 | struct stimerthread* newsletterthread; |
---|
1573 | // thumb thread pointer |
---|
1574 | struct stimerthread* thumbthread; |
---|
1575 | // rectimer thread |
---|
1576 | struct stimerthread* rectimerthread; |
---|
1577 | // singlepic thread |
---|
1578 | struct stimerthread* singlepicthread; |
---|
1579 | // service thread |
---|
1580 | struct stimerthread* startservicethread; |
---|
1581 | // rguid sock filedescriptor for rguid |
---|
1582 | int rguidfd; |
---|
1583 | struct service* aktservice; |
---|
1584 | struct service* lastservice; |
---|
1585 | struct service* pipservice; |
---|
1586 | struct channel* markedchannel; |
---|
1587 | //if we are in a epg screen, this is the showen channel |
---|
1588 | struct channel* epgchannel; |
---|
1589 | char* configfile; |
---|
1590 | // for bouquet channel numbering |
---|
1591 | int bouquetnr[MAXSERVICETYPE]; |
---|
1592 | int servicetype; |
---|
1593 | struct shutdowntimer *sd_timer; |
---|
1594 | // akt pos in channel cache |
---|
1595 | int channelcachepos; |
---|
1596 | // aktivate/deaktivate auto updatevfd |
---|
1597 | int updatevfd; |
---|
1598 | // count for recording |
---|
1599 | int recording; |
---|
1600 | // count for streaming |
---|
1601 | int streaming; |
---|
1602 | // pvr allowed = 1, disable = 0 |
---|
1603 | int pvr; |
---|
1604 | // timeshift running = 1, ending = 2 |
---|
1605 | int timeshift; |
---|
1606 | // 0 = normal, 1 = permanent timeshift |
---|
1607 | int timeshifttype; |
---|
1608 | // position in timeshiftfile to seek |
---|
1609 | off64_t timeshiftpos; |
---|
1610 | // ask if timeshift is running and switch channel |
---|
1611 | int asktimeshift; |
---|
1612 | // ts playing running = 1 |
---|
1613 | int playing; |
---|
1614 | // if set to a skin (screenpointer) only this screen has rc |
---|
1615 | struct skin* rcowner; |
---|
1616 | struct skin* rcstandby; |
---|
1617 | // timerstuktur fuer autores |
---|
1618 | struct stimerthread* restimer; |
---|
1619 | // spindown USB/HDD |
---|
1620 | struct hddparm hdd[3]; |
---|
1621 | struct stimerthread* addhddall; |
---|
1622 | // save old rotor position |
---|
1623 | int rotoroldorbitalpos; |
---|
1624 | // security check |
---|
1625 | int security; |
---|
1626 | // set to 1 if tvpic size is changed |
---|
1627 | int tvpic; |
---|
1628 | // timestamp for rc action |
---|
1629 | time_t lastrcaction; |
---|
1630 | // show timeline in channellist for each channel |
---|
1631 | int showchanneltimeline; |
---|
1632 | // see player.h for details |
---|
1633 | int playercan; |
---|
1634 | //Code von infobar.h aktiv = 1 |
---|
1635 | int infobaraktiv; |
---|
1636 | //Name der Datei die abgespielt wird |
---|
1637 | char* playfile; |
---|
1638 | //Code MC aktiv = 1 |
---|
1639 | int mcaktiv; |
---|
1640 | //greater 0 aktivate screen animation |
---|
1641 | int screenanim; |
---|
1642 | int screenanimspeed; |
---|
1643 | //for auto increase audio vol |
---|
1644 | int volautochange; |
---|
1645 | int volautochangevalue; |
---|
1646 | //for powerofftimer |
---|
1647 | time_t fixpowerofftime; |
---|
1648 | //for write FB in File |
---|
1649 | int write_png; |
---|
1650 | int write_jpg; |
---|
1651 | //holds oversize value for blitter |
---|
1652 | int leftoffset; |
---|
1653 | int rightoffset; |
---|
1654 | int topoffset; |
---|
1655 | int bottomoffset; |
---|
1656 | //background picture for all screens |
---|
1657 | char* bgpic; |
---|
1658 | //time for next picmem timeout check |
---|
1659 | time_t picmemtimeout; |
---|
1660 | time_t defpicmemtimeout; |
---|
1661 | //show not tunable channel hidden (0)) or deaktive (1) in channellist |
---|
1662 | int channellistview; |
---|
1663 | //for blockmove in channellist |
---|
1664 | int moveblockcount; |
---|
1665 | //name ob file who played from webig |
---|
1666 | char* webplayfile; |
---|
1667 | //status of mediadbthread |
---|
1668 | int mediadbthreadstatus; |
---|
1669 | //for save mediadb in scan |
---|
1670 | time_t mediadbsavetime; |
---|
1671 | //colors / pic for selection |
---|
1672 | long markcol; |
---|
1673 | long filelistselectcol; |
---|
1674 | long listboxselectcol; |
---|
1675 | char* selectpic; |
---|
1676 | //check if cam can decrypt channel |
---|
1677 | int checkcamdecrypt; |
---|
1678 | //don't send privat part of cadescriptor in capmt |
---|
1679 | int caskipprivat; |
---|
1680 | //send all caids or only caids cam can |
---|
1681 | int casendallcaids; |
---|
1682 | //show hidden files in filelist |
---|
1683 | int showhiddenfiles; |
---|
1684 | //mediadb |
---|
1685 | int mediadbfiles; |
---|
1686 | //show infobar on program change |
---|
1687 | int infobarprogram; |
---|
1688 | //for auto increase audio vol (mute) |
---|
1689 | int volmute; |
---|
1690 | int secondzap; |
---|
1691 | //pointer to marker for recordings |
---|
1692 | struct marker* playmarker; |
---|
1693 | int autosubtitle; |
---|
1694 | //save timeshift start time |
---|
1695 | time_t timeshiftstart; |
---|
1696 | int crosscontrol; |
---|
1697 | int autochangechannelname; |
---|
1698 | //tuxtext is running |
---|
1699 | int tuxtxt; |
---|
1700 | //on some fat32 hdd it takes very long to get free size |
---|
1701 | int showrecfreesize; |
---|
1702 | int firstunicablewait; |
---|
1703 | //path for imdbfolder |
---|
1704 | char* imdbfolderpath; |
---|
1705 | int virtualzap; |
---|
1706 | int fontsizeadjust; |
---|
1707 | //count for drawing screen |
---|
1708 | unsigned int drawscreencount; |
---|
1709 | int autoseek; |
---|
1710 | //skip all rc input events older than this value in millisec |
---|
1711 | int rcskipms; |
---|
1712 | //Workaround da ansonsten DVR4 nicht funktioniert (Treiberproblem) |
---|
1713 | int setdvr0; |
---|
1714 | #ifdef MIPSEL |
---|
1715 | //cec mipsel |
---|
1716 | int cec_fixedAddress; |
---|
1717 | int hdmiFd; |
---|
1718 | int webencode; |
---|
1719 | #endif |
---|
1720 | //pip Einstellungen |
---|
1721 | int pipzap; |
---|
1722 | // guest |
---|
1723 | int whilecount; |
---|
1724 | int sleepcount; |
---|
1725 | int stats; |
---|
1726 | char* url; |
---|
1727 | //externer plugin Aufruf |
---|
1728 | char* extplugin; |
---|
1729 | //node oled blinken |
---|
1730 | int skinblink; |
---|
1731 | #ifndef SIMULATE |
---|
1732 | //BCM accel interface |
---|
1733 | int bcm; |
---|
1734 | #endif |
---|
1735 | //Volume |
---|
1736 | int volume; |
---|
1737 | int screenshot; |
---|
1738 | // cacc |
---|
1739 | int certchecked; |
---|
1740 | int certok; |
---|
1741 | int liveslot; |
---|
1742 | // dynamic default skin infobar |
---|
1743 | int getepgaktstart; |
---|
1744 | int getepgaktend; |
---|
1745 | int getepgakttitle; |
---|
1746 | int getepgakttimeremaining; |
---|
1747 | int getepgnextstart; |
---|
1748 | int getepgnextend; |
---|
1749 | int getepgnexttitle; |
---|
1750 | int getepgnexttimeremaining; |
---|
1751 | // downmix switch in audio menu (audiotrack.h) |
---|
1752 | int downmix; |
---|
1753 | // channels for recording |
---|
1754 | struct channel* recchnode[9]; |
---|
1755 | // frontdev filedescriptor |
---|
1756 | int fdrc1; |
---|
1757 | // Anzah VideoDevs |
---|
1758 | int videodevs; |
---|
1759 | char* streamurl; |
---|
1760 | char* actplay; |
---|
1761 | char* actplaypts; |
---|
1762 | int writeplayersub; |
---|
1763 | struct stimerthread* subtitlethread; |
---|
1764 | } status; |
---|
1765 | |
---|
1766 | struct fb |
---|
1767 | { |
---|
1768 | int dev; |
---|
1769 | char *name; |
---|
1770 | int fd; |
---|
1771 | unsigned char *fb; |
---|
1772 | unsigned long *fblong; |
---|
1773 | int width; |
---|
1774 | int height; |
---|
1775 | int pitch; |
---|
1776 | unsigned long fixfbsize; |
---|
1777 | unsigned long varfbsize; |
---|
1778 | int colbytes; |
---|
1779 | unsigned long data_phys; |
---|
1780 | struct fb *next; |
---|
1781 | }; |
---|
1782 | |
---|
1783 | struct rc |
---|
1784 | { |
---|
1785 | int key; |
---|
1786 | void (*rcfunc)(struct skin*, struct skin*, int screencalc, int filelistview, int flag); |
---|
1787 | struct skin *screen; |
---|
1788 | struct skin *screennode; |
---|
1789 | struct skin *owner; |
---|
1790 | struct rc *next; |
---|
1791 | }; |
---|
1792 | |
---|
1793 | struct clist |
---|
1794 | { |
---|
1795 | char *key; |
---|
1796 | char *value; |
---|
1797 | char *def; |
---|
1798 | char *tmp; |
---|
1799 | struct clist *next; |
---|
1800 | }; |
---|
1801 | |
---|
1802 | struct bouquet |
---|
1803 | { |
---|
1804 | int nr; |
---|
1805 | int serviceid; |
---|
1806 | uint64_t transponderid; |
---|
1807 | struct channel *channel; |
---|
1808 | struct bouquet *prev; |
---|
1809 | struct bouquet *next; |
---|
1810 | }; |
---|
1811 | |
---|
1812 | struct channelslot |
---|
1813 | { |
---|
1814 | int slot; |
---|
1815 | int serviceid; |
---|
1816 | uint64_t transponderid; |
---|
1817 | struct channelslot *next; |
---|
1818 | }; |
---|
1819 | |
---|
1820 | struct mainbouquet |
---|
1821 | { |
---|
1822 | char *name; |
---|
1823 | int type; |
---|
1824 | char *filename; |
---|
1825 | struct bouquet *bouquet; |
---|
1826 | struct mainbouquet *prev; |
---|
1827 | struct mainbouquet *next; |
---|
1828 | }; |
---|
1829 | |
---|
1830 | struct pic |
---|
1831 | { |
---|
1832 | char* name; |
---|
1833 | unsigned char* picbuf; |
---|
1834 | // < 0 when picbuf is normal mem (hw jpg) |
---|
1835 | int memfd; |
---|
1836 | unsigned long width; |
---|
1837 | unsigned long height; |
---|
1838 | unsigned long rowbytes; |
---|
1839 | int channels; |
---|
1840 | int timeout; |
---|
1841 | time_t lastaccess; |
---|
1842 | int del; |
---|
1843 | struct pic* next; |
---|
1844 | }; |
---|
1845 | |
---|
1846 | struct font |
---|
1847 | { |
---|
1848 | char *name; |
---|
1849 | FT_Error error; |
---|
1850 | FTC_Manager manager; |
---|
1851 | FTC_SBitCache cache; |
---|
1852 | FTC_ImageTypeRec desc; |
---|
1853 | FT_Face face; |
---|
1854 | FT_UInt prev_glyphindex; |
---|
1855 | FT_Bool use_kerning; |
---|
1856 | struct font *next; |
---|
1857 | }; |
---|
1858 | |
---|
1859 | //structure for write fb to File |
---|
1860 | struct writeFBfile |
---|
1861 | { |
---|
1862 | unsigned char* ActBuf; |
---|
1863 | unsigned char* buf1; |
---|
1864 | unsigned char* buf2; |
---|
1865 | } writeFBfile; |
---|
1866 | |
---|
1867 | struct eit |
---|
1868 | { |
---|
1869 | u_char table_id /*:8*/; |
---|
1870 | u_char section_length_hi :4; |
---|
1871 | u_char :3; |
---|
1872 | u_char section_syntax_indicator :1; |
---|
1873 | u_char section_length_lo /*:8*/; |
---|
1874 | u_char service_id_hi /*:8*/; |
---|
1875 | u_char service_id_lo /*:8*/; |
---|
1876 | u_char current_next_indicator :1; |
---|
1877 | u_char version_number :5; |
---|
1878 | u_char :2; |
---|
1879 | u_char section_number /*:8*/; |
---|
1880 | u_char last_section_number /*:8*/; |
---|
1881 | u_char transport_stream_id_hi /*:8*/; |
---|
1882 | u_char transport_stream_id_lo /*:8*/; |
---|
1883 | u_char original_network_id_hi /*:8*/; |
---|
1884 | u_char original_network_id_lo /*:8*/; |
---|
1885 | u_char segment_last_section_number /*:8*/; |
---|
1886 | u_char segment_last_table_id /*:8*/; |
---|
1887 | u_char data[]; /* struct eitevent */ |
---|
1888 | }; |
---|
1889 | #define EITLEN sizeof(struct eit) |
---|
1890 | #define GETEITSECLEN(x) HILO(((struct eit*)(x))->section_length) |
---|
1891 | |
---|
1892 | struct eitevent |
---|
1893 | { |
---|
1894 | u_char event_id_hi /*:8*/; |
---|
1895 | u_char event_id_lo /*:8*/; |
---|
1896 | u_char mjd_hi /*:8*/; |
---|
1897 | u_char mjd_lo /*:8*/; |
---|
1898 | u_char start_time_h /*:8*/; |
---|
1899 | u_char start_time_m /*:8*/; |
---|
1900 | u_char start_time_s /*:8*/; |
---|
1901 | u_char duration_h /*:8*/; |
---|
1902 | u_char duration_m /*:8*/; |
---|
1903 | u_char duration_s /*:8*/; |
---|
1904 | u_char descriptors_loop_length_hi :4; |
---|
1905 | u_char free_ca_mode :1; |
---|
1906 | u_char running_status :3; |
---|
1907 | u_char descriptors_loop_length_lo /*:8*/; |
---|
1908 | u_char data[]; |
---|
1909 | }; |
---|
1910 | #define EITEVENTLEN sizeof(struct eitevent) |
---|
1911 | #define GETEITDESCLEN(x) HILO(((struct eitevent *)x)->descriptors_loop_length) |
---|
1912 | |
---|
1913 | struct eitshortevent |
---|
1914 | { |
---|
1915 | u_char descriptor_tag /*:8*/; |
---|
1916 | u_char descriptor_length /*:8*/; |
---|
1917 | u_char lang_code1 /*:8*/; |
---|
1918 | u_char lang_code2 /*:8*/; |
---|
1919 | u_char lang_code3 /*:8*/; |
---|
1920 | u_char event_name_length /*:8*/; |
---|
1921 | u_char data[]; |
---|
1922 | }; |
---|
1923 | #define EITSHORTEVENTLEN sizeof(struct eitshortevent) |
---|
1924 | |
---|
1925 | struct eitlongevent |
---|
1926 | { |
---|
1927 | u_char descriptor_tag /*:8*/; |
---|
1928 | u_char descriptor_length /*:8*/; |
---|
1929 | u_char last_descriptor_number :4; |
---|
1930 | u_char descriptor_number :4; |
---|
1931 | u_char lang_code1 /*:8*/; |
---|
1932 | u_char lang_code2 /*:8*/; |
---|
1933 | u_char lang_code3 /*:8*/; |
---|
1934 | u_char length_of_items /*:8*/; |
---|
1935 | u_char data[]; /* struct eitlongeventitem */ |
---|
1936 | }; |
---|
1937 | #define EITLONGEVENTLEN sizeof(struct eitlongevent) |
---|
1938 | |
---|
1939 | struct eitlongeventitem |
---|
1940 | { |
---|
1941 | u_char item_description_length /*:8*/; |
---|
1942 | u_char data[]; |
---|
1943 | }; |
---|
1944 | #define EITLONGEVENTITEMLEN sizeof(struct eitlongeventitem) |
---|
1945 | |
---|
1946 | struct eitlinkage |
---|
1947 | { |
---|
1948 | u_char descriptor_tag /*:8*/; |
---|
1949 | u_char descriptor_length /*:8*/; |
---|
1950 | u_char transport_stream_id_hi /*:8*/; |
---|
1951 | u_char transport_stream_id_lo /*:8*/; |
---|
1952 | u_char original_network_id_hi /*:8*/; |
---|
1953 | u_char original_network_id_lo /*:8*/; |
---|
1954 | u_char service_id_hi /*:8*/; |
---|
1955 | u_char service_id_lo /*:8*/; |
---|
1956 | u_char linkage_type /*:8*/; |
---|
1957 | }; |
---|
1958 | #define EITLLINKAGELEN sizeof(struct eitlinkage) |
---|
1959 | |
---|
1960 | struct parentalrating |
---|
1961 | { |
---|
1962 | u_char descriptor_tag /*:8*/; |
---|
1963 | u_char descriptor_length /*:8*/; |
---|
1964 | u_char data[]; //struct parental_rating_item |
---|
1965 | }; |
---|
1966 | #define PARENTALRATINGLEN sizeof(struct parentalrating) |
---|
1967 | |
---|
1968 | struct parentalratingitem |
---|
1969 | { |
---|
1970 | u_char lang_code1 /*:8*/; |
---|
1971 | u_char lang_code2 /*:8*/; |
---|
1972 | u_char lang_code3 /*:8*/; |
---|
1973 | u_char rating /*:8*/; |
---|
1974 | }; |
---|
1975 | #define PARENTALRATINGITEMLEN sizeof(struct parentalratingitem) |
---|
1976 | |
---|
1977 | struct rst //table id 0x71 |
---|
1978 | { |
---|
1979 | u_char table_id /*:8*/; |
---|
1980 | u_char section_syntax_indicator :1; |
---|
1981 | u_char reserved_1 :1; |
---|
1982 | u_char reserved_2 :2; |
---|
1983 | u_int section_length :12; |
---|
1984 | }; |
---|
1985 | #define RSTLEN sizeof(struct rst) |
---|
1986 | |
---|
1987 | struct rstitem |
---|
1988 | { |
---|
1989 | u_char transponder_stream_id_hi /*:8*/; |
---|
1990 | u_char transponder_stream_id_lo /*:8*/; |
---|
1991 | u_char original_network_id_hi /*:8*/; |
---|
1992 | u_char original_network_id_lo /*:8*/; |
---|
1993 | u_char service_id_hi /*:8*/; |
---|
1994 | u_char service_id_lo /*:8*/; |
---|
1995 | u_char event_id_hi /*:8*/; |
---|
1996 | u_char event_id_lo /*:8*/; |
---|
1997 | u_char reserved_1 :5; |
---|
1998 | u_char running_status :3; |
---|
1999 | }; |
---|
2000 | #define RSTITEMLEN sizeof(struct rstitem) |
---|
2001 | |
---|
2002 | struct mhwchannel |
---|
2003 | { |
---|
2004 | u_char network_id_hi; |
---|
2005 | u_char network_id_lo; |
---|
2006 | u_char transponder_id_hi; |
---|
2007 | u_char transponder_id_lo; |
---|
2008 | u_char channel_id_hi; |
---|
2009 | u_char channel_id_lo; |
---|
2010 | u_char name[16]; |
---|
2011 | }; |
---|
2012 | #define MHWCHANNELLEN sizeof(struct mhwchannel) |
---|
2013 | |
---|
2014 | struct mhwtitle |
---|
2015 | { |
---|
2016 | u_char table_id :8; |
---|
2017 | u_char section_length_hi :4; |
---|
2018 | u_char :2; |
---|
2019 | u_char dummy :1; |
---|
2020 | u_char section_syntax_indicator :1; |
---|
2021 | u_char section_length_lo :8; |
---|
2022 | u_char channel_id :8; |
---|
2023 | u_char theme_id :8; |
---|
2024 | u_char hours :5; |
---|
2025 | u_char day :3; |
---|
2026 | u_char summary_available :1; |
---|
2027 | u_char :1; |
---|
2028 | u_char minutes :6; |
---|
2029 | u_char :8; |
---|
2030 | u_char :8; |
---|
2031 | u_char duration_hi :8; |
---|
2032 | u_char duration_lo :8; |
---|
2033 | u_char title [23]; |
---|
2034 | u_char ppv_id_hi :8; |
---|
2035 | u_char ppv_id_mh :8; |
---|
2036 | u_char ppv_id_ml :8; |
---|
2037 | u_char ppv_id_lo :8; |
---|
2038 | u_char program_id_hi :8; |
---|
2039 | u_char program_id_mh :8; |
---|
2040 | u_char program_id_ml :8; |
---|
2041 | u_char program_id_lo :8; |
---|
2042 | u_char :8; |
---|
2043 | u_char :8; |
---|
2044 | u_char :8; |
---|
2045 | u_char :8; |
---|
2046 | }; |
---|
2047 | #define MHWTITLELEN sizeof(struct mhwtitle) |
---|
2048 | |
---|
2049 | struct mhwsummary |
---|
2050 | { |
---|
2051 | u_char table_id :8; |
---|
2052 | u_char section_length_hi :4; |
---|
2053 | u_char :2; |
---|
2054 | u_char dummy :1; |
---|
2055 | u_char section_syntax_indicator :1; |
---|
2056 | u_char section_length_lo :8; |
---|
2057 | u_char program_id_hi :8; |
---|
2058 | u_char program_id_mh :8; |
---|
2059 | u_char program_id_ml :8; |
---|
2060 | u_char program_id_lo :8; |
---|
2061 | u_char :8; |
---|
2062 | u_char :8; |
---|
2063 | u_char :8; |
---|
2064 | u_char nb_replays :8; |
---|
2065 | }; |
---|
2066 | #define MHWSUMMARYLEN sizeof(struct mhwsummary) |
---|
2067 | |
---|
2068 | struct mhw2channel |
---|
2069 | { |
---|
2070 | u_char network_id_hi; |
---|
2071 | u_char network_id_lo; |
---|
2072 | u_char transponder_id_hi; |
---|
2073 | u_char transponder_id_lo; |
---|
2074 | u_char channel_id_hi; |
---|
2075 | u_char channel_id_lo; |
---|
2076 | u_char :8; |
---|
2077 | u_char :8; |
---|
2078 | }; |
---|
2079 | |
---|
2080 | struct extepgcache |
---|
2081 | { |
---|
2082 | long id; |
---|
2083 | struct epg* epgnode; |
---|
2084 | struct extepgcache* next; |
---|
2085 | }; |
---|
2086 | |
---|
2087 | struct extepgchannel |
---|
2088 | { |
---|
2089 | long id; |
---|
2090 | int serviceid; |
---|
2091 | uint64_t transponderid; |
---|
2092 | struct extepgchannel* next; |
---|
2093 | }; |
---|
2094 | |
---|
2095 | struct extepgconfig |
---|
2096 | { |
---|
2097 | uint64_t transponderid; |
---|
2098 | int type; |
---|
2099 | char* file; |
---|
2100 | int channelpid; |
---|
2101 | int titlepid[8]; |
---|
2102 | int summarypid[8]; |
---|
2103 | struct extepgconfig* next; |
---|
2104 | }; |
---|
2105 | |
---|
2106 | struct blacklist |
---|
2107 | { |
---|
2108 | char* file; |
---|
2109 | struct splitstr* splitstr; |
---|
2110 | int count; |
---|
2111 | }; |
---|
2112 | |
---|
2113 | typedef struct sci_modes |
---|
2114 | { |
---|
2115 | int emv2000; |
---|
2116 | int dma; |
---|
2117 | int man_act; |
---|
2118 | int rw_mode; |
---|
2119 | } scimodes; |
---|
2120 | |
---|
2121 | typedef struct sci_parameters |
---|
2122 | { |
---|
2123 | u_char T; |
---|
2124 | unsigned long fs; |
---|
2125 | unsigned long ETU; |
---|
2126 | unsigned long WWT; |
---|
2127 | unsigned long CWT; |
---|
2128 | unsigned long BWT; |
---|
2129 | unsigned long EGT; |
---|
2130 | unsigned long clock_stop_polarity; |
---|
2131 | u_char check; |
---|
2132 | u_char P; |
---|
2133 | u_char I; |
---|
2134 | u_char U; |
---|
2135 | } sciparameters; |
---|
2136 | |
---|
2137 | struct update |
---|
2138 | { |
---|
2139 | char* auth; |
---|
2140 | char* type; |
---|
2141 | char* skinname; |
---|
2142 | char* filemask; |
---|
2143 | char* filepath; |
---|
2144 | int imgtype; |
---|
2145 | }; |
---|
2146 | |
---|
2147 | struct musicdat |
---|
2148 | { |
---|
2149 | char* dummy; |
---|
2150 | char* thumb; |
---|
2151 | char* title; |
---|
2152 | char* album; |
---|
2153 | char* realname; |
---|
2154 | char* actors; |
---|
2155 | char* genre; |
---|
2156 | char* year; |
---|
2157 | int act; |
---|
2158 | } musicdat; |
---|
2159 | |
---|
2160 | #ifdef EPLAYER4 |
---|
2161 | typedef enum { stUnknown, stPlainText, stSSA, stASS, stSRT, stVOB, stPGS } subtype_t; |
---|
2162 | typedef enum {atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC, atWMA} audiotype_t; |
---|
2163 | typedef struct _CustomData { |
---|
2164 | //typedef struct CustomData { |
---|
2165 | GstElement *playbin2; /* Our one and only element */ |
---|
2166 | |
---|
2167 | gint n_video; /* Number of embedded video streams */ |
---|
2168 | gint n_audio; /* Number of embedded audio streams */ |
---|
2169 | gint n_text; /* Number of embedded subtitle streams */ |
---|
2170 | |
---|
2171 | gint current_video; /* Currently playing video stream */ |
---|
2172 | gint current_audio; /* Currently playing audio stream */ |
---|
2173 | gint current_text; /* Currently playing subtitle stream */ |
---|
2174 | |
---|
2175 | gboolean is_live; |
---|
2176 | GstElement *pipeline; |
---|
2177 | GMainLoop *loop; |
---|
2178 | } CustomData; |
---|
2179 | |
---|
2180 | typedef enum { |
---|
2181 | GST_PLAY_FLAG_VIDEO = (1 << 0), |
---|
2182 | GST_PLAY_FLAG_AUDIO = (1 << 1), |
---|
2183 | GST_PLAY_FLAG_TEXT = (1 << 2), |
---|
2184 | GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 3) |
---|
2185 | } GstPlayFlags; |
---|
2186 | #endif |
---|
2187 | |
---|
2188 | #ifdef MIPSEL |
---|
2189 | //fuer cec Mipsel |
---|
2190 | |
---|
2191 | #ifdef DREAMBOX |
---|
2192 | struct cec_message |
---|
2193 | { |
---|
2194 | unsigned char address; |
---|
2195 | unsigned char data[16]; |
---|
2196 | unsigned char length; |
---|
2197 | unsigned char flag; |
---|
2198 | }__attribute__((packed)); |
---|
2199 | struct cec_rx_message |
---|
2200 | { |
---|
2201 | unsigned char address; |
---|
2202 | unsigned char destination; |
---|
2203 | unsigned char data[16]; |
---|
2204 | unsigned char length; |
---|
2205 | }__attribute__((packed)); |
---|
2206 | |
---|
2207 | |
---|
2208 | #else |
---|
2209 | struct cec_message |
---|
2210 | { |
---|
2211 | unsigned char address; |
---|
2212 | unsigned char length; |
---|
2213 | unsigned char data[256]; |
---|
2214 | }__attribute__((packed)); |
---|
2215 | struct cec_rx_message |
---|
2216 | { |
---|
2217 | unsigned char address; |
---|
2218 | unsigned char destination; |
---|
2219 | unsigned char data[16]; |
---|
2220 | unsigned char length; |
---|
2221 | }__attribute__((packed)); |
---|
2222 | #endif |
---|
2223 | |
---|
2224 | unsigned char cec_physicalAddress[2]; |
---|
2225 | unsigned char cec_logicalAddress; |
---|
2226 | unsigned char cec_deviceType; |
---|
2227 | |
---|
2228 | #endif |
---|
2229 | |
---|
2230 | // cacc |
---|
2231 | /* CI+ certificates */ |
---|
2232 | |
---|
2233 | struct cert_ctx { |
---|
2234 | X509_STORE *store; |
---|
2235 | |
---|
2236 | /* Host */ |
---|
2237 | X509 *cust_cert; |
---|
2238 | X509 *device_cert; |
---|
2239 | |
---|
2240 | /* Module */ |
---|
2241 | X509 *ci_cust_cert; |
---|
2242 | X509 *ci_device_cert; |
---|
2243 | }; |
---|
2244 | |
---|
2245 | #ifdef MIPSEL |
---|
2246 | enum ca_descr_data_type { |
---|
2247 | CA_DATA_IV, |
---|
2248 | CA_DATA_KEY, |
---|
2249 | }; |
---|
2250 | |
---|
2251 | enum ca_descr_parity { |
---|
2252 | CA_PARITY_EVEN, |
---|
2253 | CA_PARITY_ODD, |
---|
2254 | }; |
---|
2255 | |
---|
2256 | struct ca_descr_data { |
---|
2257 | unsigned int index; |
---|
2258 | enum ca_descr_parity parity; |
---|
2259 | enum ca_descr_data_type data_type; |
---|
2260 | unsigned int length; |
---|
2261 | unsigned char *data; |
---|
2262 | }; |
---|
2263 | |
---|
2264 | #endif |
---|
2265 | |
---|
2266 | #ifdef SH4NEW |
---|
2267 | enum ca_descr_data_type { |
---|
2268 | CA_DATA_IV, |
---|
2269 | CA_DATA_KEY, |
---|
2270 | }; |
---|
2271 | |
---|
2272 | enum ca_descr_parity { |
---|
2273 | CA_PARITY_EVEN, |
---|
2274 | CA_PARITY_ODD, |
---|
2275 | }; |
---|
2276 | |
---|
2277 | struct ca_descr_data { |
---|
2278 | unsigned int index; |
---|
2279 | enum ca_descr_parity parity; |
---|
2280 | enum ca_descr_data_type data_type; |
---|
2281 | unsigned int length; |
---|
2282 | unsigned char *data; |
---|
2283 | }; |
---|
2284 | |
---|
2285 | #endif |
---|
2286 | |
---|
2287 | #ifdef SIMULATE |
---|
2288 | enum ca_descr_data_type { |
---|
2289 | CA_DATA_IV, |
---|
2290 | CA_DATA_KEY, |
---|
2291 | }; |
---|
2292 | |
---|
2293 | enum ca_descr_parity { |
---|
2294 | CA_PARITY_EVEN, |
---|
2295 | CA_PARITY_ODD, |
---|
2296 | }; |
---|
2297 | |
---|
2298 | struct ca_descr_data { |
---|
2299 | unsigned int index; |
---|
2300 | enum ca_descr_parity parity; |
---|
2301 | enum ca_descr_data_type data_type; |
---|
2302 | unsigned int length; |
---|
2303 | unsigned char *data; |
---|
2304 | }; |
---|
2305 | |
---|
2306 | #endif |
---|
2307 | |
---|
2308 | struct aes_xcbc_mac_ctx { |
---|
2309 | uint8_t K[3][16]; |
---|
2310 | uint8_t IV[16]; |
---|
2311 | AES_KEY key; |
---|
2312 | int buflen; |
---|
2313 | }; |
---|
2314 | |
---|
2315 | uint32_t datatype_sizes[MAX_ELEMENTS] = { |
---|
2316 | 0, 50, 0, 0, 0, 8, 8, 0, |
---|
2317 | 0, 0, 0, 0, 32, 256, 256, 0, |
---|
2318 | 0, 256, 256, 32, 8, 8, 32, 32, |
---|
2319 | 0, 8, 2, 32, 1, 32, 1, 0, |
---|
2320 | 32 |
---|
2321 | }; |
---|
2322 | |
---|
2323 | struct element { |
---|
2324 | uint8_t *data; |
---|
2325 | uint32_t size; |
---|
2326 | /* buffer valid */ |
---|
2327 | int valid; |
---|
2328 | }; |
---|
2329 | |
---|
2330 | struct cc_ctrl_data { |
---|
2331 | /* parent */ |
---|
2332 | struct caslot* slot; |
---|
2333 | |
---|
2334 | /* ci+ credentials */ |
---|
2335 | struct element elements[MAX_ELEMENTS]; |
---|
2336 | |
---|
2337 | /* DHSK */ |
---|
2338 | uint8_t dhsk[256]; |
---|
2339 | |
---|
2340 | /* KS_host */ |
---|
2341 | uint8_t ks_host[32]; |
---|
2342 | |
---|
2343 | /* derived keys */ |
---|
2344 | uint8_t sek[16]; |
---|
2345 | uint8_t sak[16]; |
---|
2346 | |
---|
2347 | /* AKH checks - module performs 5 tries to get correct AKH */ |
---|
2348 | unsigned int akh_index; |
---|
2349 | |
---|
2350 | /* authentication data */ |
---|
2351 | uint8_t dh_exp[256]; |
---|
2352 | |
---|
2353 | /* certificates */ |
---|
2354 | struct cert_ctx *cert_ctx; |
---|
2355 | |
---|
2356 | /* private key of device-cert */ |
---|
2357 | RSA *rsa_device_key; |
---|
2358 | }; |
---|
2359 | |
---|
2360 | #endif |
---|