source: titan/titan/struct.h @ 34489

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

titan switch v1.66

File size: 40.0 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#ifndef SH4
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.66"
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        char* realboxtype;
1258        pthread_t mainthread;
1259        //videosize from stream
1260        video_size_t videosize;
1261        time_t videosizevalid;
1262        //radius for rounded border
1263        int borderradius;
1264        int picbordersize;
1265        int titlelinesize;
1266        //0 border
1267        //1 fullbar
1268        int listboxselecttype;
1269        //0 camd.socket
1270        //1 pmt.tmp
1271        int pmtmode;
1272        //timer for del old epg entrys
1273        time_t deloldepg;
1274        //write epg periodic to medium
1275        time_t writeperiodicepg;
1276        //0 dektiv
1277        //1 only scan
1278        //2 only whitlist
1279        //3 scan and whitelist
1280        int epglistmode;
1281        // 1 manual
1282        // 2 from standby
1283        int startmode;
1284        jmp_buf longjumpbuf;
1285        pthread_mutex_t drawingmutex;
1286        pthread_mutex_t rectimermutex;
1287        pthread_mutex_t servicemutex;
1288        pthread_mutex_t epgmutex;
1289        pthread_mutex_t channelmutex;
1290        pthread_mutex_t timerthreadmutex;
1291        pthread_mutex_t audiotrackmutex;
1292        pthread_mutex_t subtitlemutex;
1293        pthread_mutex_t linkedchannelmutex;
1294        pthread_mutex_t dmxdevmutex;
1295        pthread_mutex_t rcmutex;
1296        pthread_mutex_t queuemutex;
1297        pthread_mutex_t clistmutex;
1298        pthread_mutex_t hddmutex;
1299        pthread_mutex_t tsseekmutex;
1300        pthread_mutex_t accelfbmutex;
1301        pthread_mutex_t mediadbmutex;
1302        pthread_mutex_t oldentrymutex;
1303        pthread_mutex_t newslettermutex;
1304        pthread_mutex_t tithekmutex;
1305        pthread_mutex_t inetworkmutex;
1306        pthread_mutex_t textboxmutex;
1307        pthread_mutex_t setaktresmutex;
1308        pthread_mutex_t waitrcmutex;
1309        // mutex for VFD handling
1310        pthread_mutex_t vfdmutex;
1311        // mutex for OLED handling
1312        pthread_mutex_t oledmutex;
1313        off64_t recsplitsize;
1314        char* gateway;
1315        char* dnsserver1;
1316        char* dnsserver2;
1317        int fasttextrender;
1318        // 1 release all menus
1319        int menurelease;
1320        int play;
1321        int pause;
1322        int playspeed;
1323        int slowspeed;
1324        int prefillbuffer;
1325        int playpic;
1326#ifdef EPLAYER4
1327        int bufferpercent;
1328        int cleaninfobar;
1329//      gint avgInRate;
1330//      gint avgOutRate;
1331//      gint64 bufferingLeft;
1332        gint64 pts;
1333#endif
1334        int random;
1335        int repeat;
1336        int epgdays;
1337        int spinnertime;
1338        int spinnerspeed;
1339        int hangtime;
1340        int timeupdatecount;
1341        int markmodus;
1342        // 1 from main prog
1343        // 2 from a thread
1344        int standby;
1345        char* tmp;
1346        // rc filedescriptor
1347        int fdrc;
1348        // rc filedescriptor for tuxtxt
1349        int fdrctxt;
1350        int writeconfig;
1351        int writeownconfig;
1352        int writercconfig;
1353        int writeskinconfig;
1354        int writechannel;
1355        int writetransponder;
1356        int writeprovider;
1357        int writemainbouquet;
1358        int writebouquet;
1359        int writemainplaylist;
1360        int writeplaylist;
1361        int writesat;
1362        int writerectimer;
1363        int writeepgscanlist;
1364        int writemostzap;
1365        int writemediadb;
1366        int writelastsubtitle;
1367        int writechannelslot;
1368        // 1 mute is aktiv
1369        int mute;
1370        // 1 spinner is aktiv
1371        int spinner;
1372        // 1 infobar is aktiv
1373        // 2 infobar is aktiv (with wait befor show)
1374        // 3 infobar is aktiv (no autohide)
1375        int infobar;
1376        // with infobar to display
1377        int infobarnr;
1378        // 0 is for mute screen
1379        struct skin *drawallways[1];
1380        char* drawallwaysbg[1];
1381        int usedirectfb;
1382        // count how long last rcwait (shows spinner if to long)
1383        time_t sec;
1384        // if set to a value != 0, rcwait returns this number
1385        int rckey;
1386        struct skin* skinerr;
1387        pthread_attr_t timerthreadattr;
1388        pthread_t timerthread;
1389        int timerthreadstatus;
1390        int timerthreadaktion;
1391        pthread_attr_t subthreadattr;
1392        pthread_t subthread;
1393        int subthreadstatus;
1394        int subthreadaktion;
1395        int subthreadpid;
1396        int subthreadid1;
1397        int subthreadid2;
1398        // epg thread pointer
1399        struct stimerthread* epgthread;
1400        // epgscanlist thread pointer
1401        struct stimerthread* epgscanlistthread;
1402        // httpd thread pointer
1403        struct stimerthread* httpthread;
1404        // rguid thread pointer
1405        struct stimerthread* rguithread;
1406        // mediadb thread pointer
1407        struct stimerthread* mediadbthread;
1408        // newsletter thread pointer
1409        struct stimerthread* newsletterthread;
1410        // thumb thread pointer
1411        struct stimerthread* thumbthread;
1412        // rectimer thread
1413        struct stimerthread* rectimerthread;
1414        // rguid sock filedescriptor for rguid
1415        int rguidfd;
1416        struct service* aktservice;
1417        struct service* lastservice;
1418        struct service* pipservice;
1419        struct channel* markedchannel;
1420        //if we are in a epg screen, this is the showen channel
1421        struct channel* epgchannel;
1422        char* configfile;
1423        // for bouquet channel numbering
1424        int bouquetnr[MAXSERVICETYPE];
1425        int servicetype;
1426        struct shutdowntimer *sd_timer;
1427        // akt pos in channel cache
1428        int channelcachepos;
1429        // aktivate/deaktivate auto updatevfd
1430        int updatevfd;
1431        // count for recording
1432        int recording;
1433        // count for streaming
1434        int streaming;
1435        // timeshift running = 1, ending = 2
1436        int timeshift;
1437        // 0 = normal, 1 = permanent timeshift
1438        int timeshifttype;
1439        // position in timeshiftfile to seek
1440        off64_t timeshiftpos;
1441        // ask if timeshift is running and switch channel
1442        int asktimeshift;
1443        // ts playing running = 1
1444        int playing;
1445        // if set to a skin (screenpointer) only this screen has rc
1446        struct skin* rcowner;
1447        struct skin* rcstandby;
1448        // timerstuktur fuer autores
1449        struct stimerthread* restimer;
1450        // spindown USB/HDD
1451        struct hddparm hdd[3];
1452        struct stimerthread* addhddall;
1453        // save old rotor position
1454        int rotoroldorbitalpos;
1455        // security check
1456        int security;
1457        // set to 1 if tvpic size is changed
1458        int tvpic;
1459        // timestamp for rc action
1460        time_t lastrcaction;
1461        // show timeline in channellist for each channel
1462        int showchanneltimeline;
1463        // see player.h for details
1464        int playercan;
1465                //Code von infobar.h aktiv = 1
1466        int infobaraktiv;
1467        //Name der Datei die abgespielt wird
1468        char* playfile;
1469        //Code MC aktiv = 1
1470        int mcaktiv;
1471        //greater 0 aktivate screen animation
1472        int screenanim;
1473        int screenanimspeed;
1474        //for auto increase audio vol
1475        int volautochange;
1476        int volautochangevalue;
1477        //for powerofftimer
1478        time_t fixpowerofftime;
1479        //for write FB in File
1480        int write_png;
1481        int write_jpg;
1482        //holds oversize value for blitter
1483        int leftoffset;
1484        int rightoffset;
1485        int topoffset;
1486        int bottomoffset;
1487        //background picture for all screens
1488        char* bgpic;
1489        //time for next picmem timeout check
1490        time_t picmemtimeout;
1491        time_t defpicmemtimeout;
1492        //show not tunable channel hidden (0)) or deaktive (1) in channellist
1493        int channellistview;
1494        //for blockmove in channellist
1495        int moveblockcount;
1496        //name ob file who played from webig
1497        char* webplayfile;
1498        //status of mediadbthread
1499        int mediadbthreadstatus;
1500        //for save mediadb in scan
1501        time_t mediadbsavetime;
1502        //colors / pic for selection
1503        long markcol;
1504        long filelistselectcol;
1505        long listboxselectcol;
1506        char* selectpic;
1507        //check if cam can decrypt channel
1508        int checkcamdecrypt;
1509        //don't send privat part of cadescriptor in capmt
1510        int caskipprivat;
1511        //send all caids or only caids cam can
1512        int casendallcaids;
1513        //show hidden files in filelist
1514        int showhiddenfiles;
1515        //mediadb
1516        int mediadbfiles;
1517        //show infobar on program change
1518        int infobarprogram;
1519        //for auto increase audio vol (mute)
1520        int volmute;
1521        int secondzap;
1522        //pointer to marker for recordings
1523        struct marker* playmarker;
1524        int autosubtitle;
1525        //save timeshift start time
1526        time_t timeshiftstart;
1527        int crosscontrol;
1528        int autochangechannelname;
1529        //tuxtext is running
1530        int tuxtxt;
1531        //on some fat32 hdd it takes very long to get free size
1532        int showrecfreesize;
1533        int firstunicablewait;
1534        //path for imdbfolder
1535        char* imdbfolderpath;
1536        int virtualzap;
1537        int fontsizeadjust;
1538        //count for drawing screen
1539        unsigned int drawscreencount;
1540        int autoseek;
1541        //skip all rc input events older than this value in millisec
1542        int rcskipms;
1543        //Workaround da ansonsten DVR4 nicht funktioniert (Treiberproblem)
1544        int setdvr0;
1545#ifdef MIPSEL
1546        //cec mipsel
1547        int cec_fixedAddress;
1548        int hdmiFd;
1549        int webencode;
1550#endif
1551        //pip Einstellungen
1552        int pipzap;
1553        // guest
1554        int whilecount;
1555        int sleepcount;
1556        int stats;
1557        char* url;
1558        //externer plugin Aufruf
1559        char* extplugin;
1560} status;
1561
1562struct fb
1563{
1564        int dev;
1565        char *name;
1566        int fd;
1567        unsigned char *fb;
1568        unsigned long *fblong;
1569        int width;
1570        int height;
1571        int pitch;
1572        unsigned long fixfbsize;
1573        unsigned long varfbsize;
1574        int colbytes;
1575        struct fb *next;
1576};
1577
1578struct rc
1579{
1580        int key;
1581        void (*rcfunc)(struct skin*, struct skin*, int screencalc, int filelistview, int flag);
1582        struct skin *screen;
1583        struct skin *screennode;
1584        struct skin *owner;
1585        struct rc *next;
1586};
1587
1588struct clist
1589{
1590        char *key;
1591        char *value;
1592        char *def;
1593        char *tmp;
1594        struct clist *next;
1595};
1596
1597struct bouquet
1598{
1599        int nr;
1600        int serviceid;
1601        uint64_t transponderid;
1602        struct channel *channel;
1603        struct bouquet *prev;
1604        struct bouquet *next;
1605};
1606
1607struct channelslot
1608{
1609        int slot;
1610        int serviceid;
1611        uint64_t transponderid;
1612        struct channelslot *next;
1613};
1614
1615struct mainbouquet
1616{
1617        char *name;
1618        int type;
1619        char *filename;
1620        struct bouquet *bouquet;
1621        struct mainbouquet *prev;
1622        struct mainbouquet *next;
1623};
1624
1625struct pic
1626{
1627        char* name;
1628        unsigned char* picbuf;
1629        // < 0 when picbuf is normal mem (hw jpg)
1630        int memfd;
1631        unsigned long width;
1632        unsigned long height;
1633        unsigned long rowbytes;
1634        int channels;
1635  int timeout;
1636  time_t lastaccess;
1637        int del;
1638        struct pic* next;
1639};
1640
1641struct font
1642{
1643        char *name;
1644        FT_Error error;
1645        FTC_Manager manager;
1646        FTC_SBitCache cache;
1647        FTC_ImageTypeRec desc;
1648        FT_Face face;
1649        FT_UInt prev_glyphindex;
1650        FT_Bool use_kerning;
1651        struct font *next;
1652};
1653
1654//structure for write fb to File
1655struct writeFBfile
1656{
1657        unsigned char* ActBuf;
1658        unsigned char* buf1;
1659        unsigned char* buf2;
1660} writeFBfile;
1661
1662struct eit
1663{
1664        u_char table_id                               /*:8*/;
1665        u_char section_length_hi                      :4;
1666        u_char                                        :3;
1667        u_char section_syntax_indicator               :1;
1668        u_char section_length_lo                      /*:8*/;
1669        u_char service_id_hi                          /*:8*/;
1670        u_char service_id_lo                          /*:8*/;
1671        u_char current_next_indicator                 :1;
1672        u_char version_number                         :5;
1673        u_char                                        :2;
1674        u_char section_number                         /*:8*/;
1675        u_char last_section_number                    /*:8*/;
1676        u_char transport_stream_id_hi                 /*:8*/;
1677        u_char transport_stream_id_lo                 /*:8*/;
1678        u_char original_network_id_hi                 /*:8*/;
1679        u_char original_network_id_lo                 /*:8*/;
1680        u_char segment_last_section_number            /*:8*/;
1681        u_char segment_last_table_id                  /*:8*/;
1682        u_char data[]; /* struct eitevent */
1683};
1684#define EITLEN sizeof(struct eit)
1685#define GETEITSECLEN(x) HILO(((struct eit*)(x))->section_length)
1686
1687struct eitevent
1688{
1689        u_char event_id_hi                            /*:8*/;
1690        u_char event_id_lo                            /*:8*/;
1691        u_char mjd_hi                                 /*:8*/;
1692        u_char mjd_lo                                 /*:8*/;
1693        u_char start_time_h                           /*:8*/;
1694        u_char start_time_m                           /*:8*/;
1695        u_char start_time_s                           /*:8*/;
1696        u_char duration_h                             /*:8*/;
1697        u_char duration_m                             /*:8*/;
1698        u_char duration_s                             /*:8*/;
1699        u_char descriptors_loop_length_hi             :4;
1700        u_char free_ca_mode                           :1;
1701        u_char running_status                         :3;
1702        u_char descriptors_loop_length_lo             /*:8*/;
1703        u_char data[];
1704};
1705#define EITEVENTLEN sizeof(struct eitevent)
1706#define GETEITDESCLEN(x) HILO(((struct eitevent *)x)->descriptors_loop_length)
1707
1708struct eitshortevent
1709{
1710        u_char descriptor_tag                         /*:8*/;
1711        u_char descriptor_length                      /*:8*/;
1712        u_char lang_code1                             /*:8*/;
1713        u_char lang_code2                             /*:8*/;
1714        u_char lang_code3                             /*:8*/;
1715        u_char event_name_length                      /*:8*/;
1716        u_char data[];
1717};
1718#define EITSHORTEVENTLEN sizeof(struct eitshortevent)
1719
1720struct eitlongevent
1721{
1722        u_char descriptor_tag                         /*:8*/;
1723        u_char descriptor_length                      /*:8*/;
1724        u_char last_descriptor_number                 :4;
1725        u_char descriptor_number                      :4;
1726        u_char lang_code1                             /*:8*/;
1727        u_char lang_code2                             /*:8*/;
1728        u_char lang_code3                             /*:8*/;
1729        u_char length_of_items                        /*:8*/;
1730        u_char data[]; /* struct eitlongeventitem */
1731};
1732#define EITLONGEVENTLEN sizeof(struct eitlongevent)
1733
1734struct eitlongeventitem
1735{
1736        u_char item_description_length               /*:8*/;
1737        u_char data[];
1738};
1739#define EITLONGEVENTITEMLEN sizeof(struct eitlongeventitem)
1740
1741struct eitlinkage
1742{
1743        u_char descriptor_tag                 /*:8*/;
1744        u_char descriptor_length              /*:8*/;
1745        u_char transport_stream_id_hi         /*:8*/;
1746        u_char transport_stream_id_lo         /*:8*/;
1747        u_char original_network_id_hi         /*:8*/;
1748        u_char original_network_id_lo         /*:8*/;
1749        u_char service_id_hi                  /*:8*/;
1750        u_char service_id_lo                  /*:8*/;
1751        u_char linkage_type                   /*:8*/;
1752};
1753#define EITLLINKAGELEN sizeof(struct eitlinkage)
1754
1755struct parentalrating
1756{
1757        u_char descriptor_tag                 /*:8*/;
1758        u_char descriptor_length              /*:8*/;
1759        u_char data[]; //struct parental_rating_item
1760};
1761#define PARENTALRATINGLEN sizeof(struct parentalrating)
1762
1763struct parentalratingitem
1764{
1765        u_char lang_code1                    /*:8*/;
1766        u_char lang_code2                    /*:8*/;
1767        u_char lang_code3                    /*:8*/;
1768        u_char rating                        /*:8*/;
1769};
1770#define PARENTALRATINGITEMLEN sizeof(struct parentalratingitem)
1771
1772struct rst //table id 0x71
1773{
1774        u_char table_id                     /*:8*/;
1775        u_char section_syntax_indicator         :1;
1776        u_char reserved_1                       :1;
1777        u_char reserved_2                       :2;
1778        u_int section_length                   :12;
1779};
1780#define RSTLEN sizeof(struct rst)
1781
1782struct rstitem
1783{
1784        u_char transponder_stream_id_hi     /*:8*/;
1785        u_char transponder_stream_id_lo     /*:8*/;
1786        u_char original_network_id_hi       /*:8*/;
1787        u_char original_network_id_lo       /*:8*/;
1788        u_char service_id_hi                /*:8*/;
1789        u_char service_id_lo                /*:8*/;
1790        u_char event_id_hi                  /*:8*/;
1791        u_char event_id_lo                  /*:8*/;
1792        u_char reserved_1                       :5;
1793        u_char running_status                   :3;
1794};
1795#define RSTITEMLEN sizeof(struct rstitem)
1796
1797struct mhwchannel
1798{
1799        u_char  network_id_hi;
1800        u_char  network_id_lo;
1801        u_char  transponder_id_hi;
1802        u_char  transponder_id_lo;
1803        u_char  channel_id_hi;
1804        u_char  channel_id_lo;
1805        u_char  name[16];
1806};
1807#define MHWCHANNELLEN sizeof(struct mhwchannel)
1808
1809struct mhwtitle
1810{
1811        u_char table_id                       :8;
1812        u_char section_length_hi              :4;
1813        u_char                                :2;
1814        u_char dummy                          :1;
1815        u_char section_syntax_indicator       :1;
1816        u_char section_length_lo              :8;
1817        u_char channel_id                     :8;
1818        u_char theme_id                       :8;
1819        u_char hours                                  :5;
1820        u_char day                            :3;
1821        u_char summary_available              :1;
1822        u_char                                      :1;
1823        u_char minutes                        :6;
1824        u_char                                :8;
1825        u_char                                :8;
1826        u_char duration_hi                    :8;
1827        u_char duration_lo                    :8;
1828        u_char title                          [23];
1829        u_char ppv_id_hi                      :8;
1830        u_char ppv_id_mh                      :8;
1831        u_char ppv_id_ml                      :8;
1832        u_char ppv_id_lo                      :8;
1833        u_char program_id_hi                  :8;
1834        u_char program_id_mh                  :8;
1835        u_char program_id_ml                  :8;
1836        u_char program_id_lo                  :8;
1837        u_char                                :8;
1838        u_char                                :8;
1839        u_char                                :8;
1840        u_char                                :8;
1841};
1842#define MHWTITLELEN sizeof(struct mhwtitle)
1843
1844struct mhwsummary
1845{
1846        u_char table_id                       :8;
1847        u_char section_length_hi              :4;
1848        u_char                                :2;
1849        u_char dummy                          :1;
1850        u_char section_syntax_indicator       :1;
1851        u_char section_length_lo              :8;
1852        u_char program_id_hi                  :8;
1853        u_char program_id_mh                  :8;
1854        u_char program_id_ml                  :8;
1855        u_char program_id_lo                  :8;
1856        u_char                                :8;
1857        u_char                                :8;
1858        u_char                                :8;
1859        u_char nb_replays                     :8;
1860};
1861#define MHWSUMMARYLEN sizeof(struct mhwsummary)
1862
1863struct mhw2channel
1864{
1865        u_char network_id_hi;
1866        u_char network_id_lo;
1867        u_char transponder_id_hi;
1868        u_char transponder_id_lo;
1869        u_char channel_id_hi;
1870        u_char channel_id_lo;
1871        u_char                                :8;
1872        u_char                                :8;
1873};
1874
1875struct extepgcache
1876{
1877        long id;
1878        struct epg* epgnode;
1879        struct extepgcache* next;
1880};
1881
1882struct extepgchannel
1883{
1884        long id;
1885        int serviceid;
1886        uint64_t transponderid;
1887        struct extepgchannel* next;
1888};
1889
1890struct extepgconfig
1891{
1892        uint64_t transponderid;
1893        int type;
1894        char* file;
1895        int channelpid;
1896        int titlepid[8];
1897        int summarypid[8];
1898        struct extepgconfig* next;
1899};
1900
1901struct blacklist
1902{
1903  char* file;
1904  struct splitstr* splitstr;
1905  int count;
1906};
1907
1908typedef struct sci_modes
1909{
1910        int emv2000;
1911        int dma;
1912        int man_act;
1913        int rw_mode;
1914} scimodes;
1915
1916typedef struct sci_parameters
1917{
1918        u_char T;
1919        unsigned long fs;
1920        unsigned long ETU;
1921        unsigned long WWT;
1922        unsigned long CWT;
1923        unsigned long BWT;
1924        unsigned long EGT;
1925        unsigned long clock_stop_polarity;
1926        u_char check;
1927        u_char P;
1928        u_char I;
1929        u_char U;
1930} sciparameters;
1931
1932struct update
1933{
1934        char* auth;
1935        char* type;
1936        char* skinname;
1937        char* filemask;
1938        char* filepath;
1939        int imgtype;
1940};
1941
1942#ifdef EPLAYER4
1943typedef enum { stUnknown, stPlainText, stSSA, stASS, stSRT, stVOB, stPGS } subtype_t;
1944typedef enum {atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC, atWMA} audiotype_t;
1945typedef struct _CustomData {
1946//typedef struct CustomData {
1947  GstElement *playbin2;   /* Our one and only element */
1948   
1949  gint n_video;          /* Number of embedded video streams */
1950  gint n_audio;          /* Number of embedded audio streams */
1951  gint n_text;           /* Number of embedded subtitle streams */
1952   
1953  gint current_video;    /* Currently playing video stream */
1954  gint current_audio;    /* Currently playing audio stream */
1955  gint current_text;     /* Currently playing subtitle stream */
1956
1957  gboolean is_live;
1958  GstElement *pipeline;
1959  GMainLoop *loop;
1960} CustomData;
1961
1962typedef enum {
1963        GST_PLAY_FLAG_VIDEO = (1 << 0),
1964        GST_PLAY_FLAG_AUDIO = (1 << 1),
1965        GST_PLAY_FLAG_TEXT = (1 << 2),
1966        GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 3)
1967} GstPlayFlags;
1968#endif
1969
1970#ifdef MIPSEL
1971//fuer cec Mipsel
1972struct cec_message
1973{
1974unsigned char address;
1975unsigned char length;
1976unsigned char data[256];
1977}__attribute__((packed));
1978
1979unsigned char cec_physicalAddress[2];
1980unsigned char cec_logicalAddress;
1981unsigned char cec_deviceType;
1982
1983#endif
1984
1985#endif
Note: See TracBrowser for help on using the repository browser.