source: titan/titan/struct.h @ 23288

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

[titan] update tpk for variable path install

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