source: titan/titan/struct.h @ 32089

Last change on this file since 32089 was 32072, checked in by obi, 9 years ago

optimize

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