source: titan/titan/struct.h @ 22550

Last change on this file since 22550 was 22547, checked in by obi, 11 years ago

build v1.31

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