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