source: titan/titan/struct.h @ 23983

Last change on this file since 23983 was 23983, checked in by nit, 11 years ago

[titan] optimize

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