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