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