source: titan/titan/struct.h @ 28435

Last change on this file since 28435 was 28435, checked in by obi, 10 years ago

[titan] upgrade skin stuff for faster gui step 1

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