source: titan/titan/struct.h @ 36588

Last change on this file since 36588 was 36588, checked in by obi, 8 years ago

fix struct

File size: 40.2 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#define DRIVER "20150113"
90#define OVERSION "1.70"
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,FUNCPICOLED};
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 tpdel;
543        int tvcount;
544        int newtvcount;
545        int radiocount;
546        int newradiocount;
547        int datacount;
548        int newdatacount;
549        int blindcount;
550        int newblindcount;
551        int changename;
552        int cleartransponder;
553        unsigned int blindmax;
554} scaninfo;
555
556struct screensaver
557{
558        int type;
559        int speed;
560        int newposx;
561        int newposy;
562        int flag;
563        struct skin* screen;
564        struct skin* screennode;
565        struct skin* filelist;
566        struct skin* aktnode;
567        struct pic* pic;
568        char* value;
569        char* path;
570};
571
572struct playlist
573{
574        char* file;
575        struct playlist* prev;
576        struct playlist* next;
577};
578
579struct mainplaylist
580{
581        char* name;
582        char* filename;
583        struct playlist* playlist;
584        struct mainplaylist* prev;
585        struct mainplaylist* next;
586};
587
588struct epgrecord
589{
590        time_t begin;
591        time_t end;
592        int posx;
593        int size;
594        struct epgrecord* prev;
595        struct epgrecord* next;
596};
597
598struct download
599{
600        char* host;
601        char* page;
602        int port;
603        char* filename;
604        char* auth;
605        int connfd;
606        int proz;
607        unsigned int maxkb;
608        unsigned int aktkb;
609        int ret;
610        int timeout;
611        int flag;
612};
613
614struct copyfile
615{
616        char* from;
617        char* to;
618        int proz;
619        int filecount;
620        int maxfilecount;
621        off64_t maxkb;
622        off64_t aktkb;
623        int stop;
624        int ret;
625        int flag;
626};
627
628struct epgscanlist
629{
630        int serviceid;
631        uint64_t transponderid;
632        time_t scantime;
633        struct epgscanlist* prev;
634        struct epgscanlist* next;
635        char* name;
636};
637
638struct rgba
639{
640        char r;
641        char g;
642        char b;
643        char a;
644};
645
646struct subclutentry
647{
648        unsigned char Y, Cr, Cb, T;
649        unsigned char valid;
650};
651
652struct subclut
653{
654        unsigned char clutid;
655        unsigned char clutversionnumber;
656        struct subclutentry entries2bit[4];
657        struct subclutentry entries4bit[16];
658        struct subclutentry entries8bit[256];
659        struct subclut *next;
660};
661
662struct subpagereg
663{
664        int regid;
665        int reghorizontaladdress;
666        int regverticaladdress;
667        int scaleposx, scaleposy;
668        struct subpagereg *next;
669};
670
671struct subregobj
672{
673        int objid;
674        int objtype;
675        int objproviderflag;
676        int objhorizontalpos;
677        int objverticalpos;
678        // not supported right now...
679        int foregroundpixel;
680        int backgroundpixel;
681        struct subregobj *next;
682};
683
684struct subreg
685{
686        int regid;
687        int versionnumber;
688        int height, width;
689        int scaleheight, scalewidth;
690        int depth;
691        unsigned char *buf;
692        struct rgba *palette;
693        int clutid;
694        int committed;
695        struct subregobj *objects;
696        struct subreg *next;
697};
698
699struct subpage
700{
701        int pageid;
702        time_t pagetimeout;
703        int pageversionnumber;
704        int state;
705        int pcssize;
706        struct subpagereg *pageregions;
707        struct subreg *regions;
708        struct subclut *cluts;
709        struct subpage *next;
710};
711
712struct bitstream
713{
714        unsigned char *data;
715        int size;
716        int avail;
717        int consumed;
718};
719
720//there are a copyrectimer function
721//if you change the struct you must change this funktion
722struct rectimer
723{
724        char* name;
725        char* timestamp;
726        time_t begin;
727        time_t end;
728        int repeate;
729        int afterevent;
730        char* pincode;
731        int disabled;
732        int justplay;
733        char* recpath;
734        int servicetype;
735        char* channellist;
736        int serviceid;
737        //0 = nothing
738        //1 = running
739        //2 = end
740        //3 = error
741        //4 = epgscan timer activ
742        //5 = epgscan timer not activ
743        int status;
744        char* errstr;
745        struct service* servicenode;
746        uint64_t transponderid;
747        struct rectimer *prev;
748        struct rectimer *next;
749};
750
751struct inetwork
752{
753        char* device;
754        char* ip;
755        char* netmask;
756        char* mac;
757        char* broadcast;
758        //0 = static
759        //1 = dhcp
760        //2 = off
761        int type;
762        int found;
763        //flag 1 = used in titan
764        int flag;
765        struct inetwork *prev;
766        struct inetwork *next;
767};
768
769struct rcmap
770{
771        char* name;
772        int key;
773        int newkey;
774        struct rcmap* next;
775};
776
777struct splitstr
778{
779        char* part;
780};
781
782struct channelcache
783{
784        int serviceid;
785        uint64_t transponderid;
786        struct channel* chnode;
787        struct channelcache* next;
788};
789
790struct transpondercache
791{
792        uint64_t transponderid;
793        struct transponder* tpnode;
794        struct transpondercache* next;
795};
796
797struct filelist
798{
799        int type;
800        int view;
801        off64_t size;
802        time_t date;
803};
804
805struct skin
806{
807        char* name;
808        unsigned int type;
809        uint8_t wrap;
810        uint8_t bordersize;
811        uint8_t scrollbar;
812        uint16_t halign;
813        uint16_t valign;
814        int16_t posx;
815        int16_t posy;
816        int16_t width;
817        int16_t height;
818        long bordercol;
819        long deaktivcol;
820        long shadowcol;
821        uint8_t shadowsize;
822        uint8_t shadowpos;
823        uint8_t fontsize;
824        uint8_t fontsize2;
825        long fontcol;
826        long fontcol2;
827        char* font;
828        int16_t zorder;
829        int16_t titlealign;
830        char* title;
831        char* text;
832        char* text2;
833        long bgcol;
834        long bgcol2;
835        long titlebgcol;
836        long titlebgcol2;
837        long progresscol;
838        char* selectpic;
839        char* pic;
840        int16_t picwidth;
841        int16_t picheight;
842        uint16_t hspace;
843        uint16_t vspace;
844        char* (*skinfunc)(struct skin*, void*, void*);
845        char* param1;
846        char* param2;
847        char* parent;
848        char* input;
849        char* mask;
850        uint16_t textposx;
851        uint16_t textposx2;
852        int16_t gradient;
853        int16_t titlegradient;
854        uint8_t transparent;
855        uint8_t hidden;
856        uint8_t funcrettype;
857        int8_t charspace;
858        int8_t bordertype;
859        int16_t borderradius;
860        uint16_t bgspace;
861        uint8_t picquality;
862
863        uint8_t titlesize;
864        struct filelist* filelist;
865        struct skin* parentpointer;
866        char* ret;
867        char* choiceboxvalue;
868        unsigned int linecount;
869        unsigned int pagecount;
870        unsigned int poscount;
871        unsigned int gridcol;
872        int aktpage;
873        int aktline;
874        uint8_t scrollbarbordersize;
875        uint8_t prozposx;
876        uint8_t prozposy;
877        uint8_t prozwidth;
878        uint8_t prozheight;
879        uint8_t picprozwidth;
880        uint8_t del;
881        uint8_t picprozheight;
882        int16_t scrollbarheight;
883        int16_t progresssize;
884        int16_t scrollbarwidth;
885        int16_t scrollbarpos;
886        int16_t rposx;
887        int16_t rposy;
888        int16_t rwidth;
889        int16_t rheight;
890        int16_t rpicwidth;
891        int16_t rpicheight;
892        int16_t iposx;
893        int16_t iposy;
894        int16_t iwidth;
895        int16_t iheight;
896        char* handle;
897        char* handle1;
898        struct epgrecord* epgrecord;
899        char* pluginhandle;
900        uint8_t locked;
901        uint8_t picmem;
902        //bit 0: 1 = node is drawed
903        //bit 1: 1 = node is changed
904        uint8_t flag;
905        int hash;
906        struct skin *select;
907        struct skin *child;
908        struct skin *prev;
909        struct skin *next;
910        struct skin *drawnext;
911        // usesavebg=0 disable
912        // usesavebg=1 save always
913        // usesavebg=2 save one times then free
914        // usesavebg=3 dummy for filelist
915        int usesavebg;
916        // savebg is saved date
917        char* savebg;
918        // fuer blinken
919        int nodestyle;
920};
921
922struct style
923{
924        char* name;
925        int16_t posx;
926        int16_t posy;
927        int16_t width;
928        int16_t height;
929        int16_t picwidth;
930        int16_t picheight;
931        uint16_t textposx;
932        uint16_t textposx2;
933        uint16_t halign;
934        uint16_t valign;
935        uint16_t hspace;
936        uint16_t vspace;
937        uint16_t bgspace;
938        int16_t borderradius;
939        int16_t titlealign;
940        int16_t zorder;
941        int16_t gradient;
942        int16_t titlegradient;
943        uint8_t picquality;
944        uint8_t hidden;
945        uint8_t wrap;
946        uint8_t scrollbar;
947        uint8_t bordersize;
948        int8_t bordertype;
949        uint8_t shadowsize;
950        uint8_t shadowpos;
951        uint8_t fontsize;
952        uint8_t fontsize2;
953        int8_t charspace;
954        uint8_t transparent;
955        uint8_t prozposx;
956        uint8_t prozposy;
957        uint8_t prozwidth;
958        uint8_t prozheight;
959        uint8_t picprozwidth;
960        uint8_t picprozheight;
961        uint8_t funcrettype;
962        uint8_t picmem;
963        long bordercol;
964        long deaktivcol;
965        long progresscol;
966        long shadowcol;
967        long fontcol;
968        long fontcol2;
969        long titlebgcol;
970        long titlebgcol2;
971        long bgcol;
972        long bgcol2;
973        char* font;
974        char* pic;
975        char* param1;
976        char* param2;
977        char* input;
978        char* mask;
979        char* (*skinfunc)(struct skin*, void*, void*);
980        struct style* next;
981};
982
983struct epg
984{
985        int eventid;
986        int version;
987        time_t starttime;
988        time_t endtime;
989        char* title;
990        char* subtitle;
991        char* desc;
992        int desclen;
993        int desccomplen;
994        int parentalrating;
995        struct epg* prev;
996        struct epg* next;
997};
998
999struct shutdowntimer
1000{
1001        int active,type; //type: 0=DeepStandby, 1=Standby
1002        long long shutdown_time;
1003};
1004
1005struct dvbdev
1006{
1007        char* dev;
1008        int fd;
1009        uint8_t type;
1010        uint8_t adapter;
1011        uint8_t devnr;
1012        uint8_t felock;
1013        uint8_t deactive;
1014        uint8_t decoder;
1015        struct transponder* felasttransponder;
1016        struct transponder* feakttransponder;
1017        int feunicable;
1018        unsigned int feloffrequency;
1019        int feaktband;
1020        int feaktpolarization;
1021        fe_sec_voltage_t feaktvolt;
1022        fe_sec_tone_mode_t feakttone;
1023        int fedmxsource;
1024        char* feaktnr;
1025        char* feshortname;
1026        char* fehyprid;
1027        struct dvb_frontend_info* feinfo;
1028        struct caslot* caslot;
1029        struct dvbdev *next;
1030};
1031
1032//there are a copytransponder and createtransponder function
1033//if you change this struct you must change the function
1034struct transponder
1035{
1036        uint64_t id;
1037        uint8_t fetype;
1038        uint8_t polarization;
1039        uint8_t modulation;
1040        uint8_t fec;
1041        uint8_t pilot;
1042        uint8_t rolloff;
1043        uint8_t inversion;
1044        uint8_t system;
1045        uint8_t flag;
1046        // 0 = unknown
1047        // 1 = tunable
1048        // 2 = not tunable
1049        uint8_t tunablestatus;
1050        int orbitalpos;
1051        unsigned int frequency;
1052        unsigned int symbolrate;
1053        int encoding;
1054        time_t lastepg;
1055        struct transponder *next;
1056};
1057
1058struct provider
1059{
1060        int providerid;
1061        char* name;
1062        int flag;
1063        struct provider *prev;
1064        struct provider *next;
1065};
1066
1067struct subtitle
1068{
1069        char* name;
1070        int16_t subtype;
1071        int16_t pid;
1072        int16_t type;
1073        int16_t id1;
1074        int16_t id2;
1075        struct subtitle* next;
1076};
1077
1078struct esinfo
1079{
1080        int streamtype;
1081        int pid;
1082        struct esinfo* next;
1083};
1084
1085struct cadesc
1086{
1087        int pid;
1088        int len;
1089        int systemid;
1090        int reserved;
1091        int capid;
1092        char* privat;
1093        struct cadesc* next;
1094};
1095
1096struct pmt
1097{
1098        int programnumber;
1099        int versionnumber;
1100        int currentnextindicator;
1101};
1102
1103struct audiotrack
1104{
1105        char* name;
1106        uint8_t audiocodec;
1107        int16_t audiopid;
1108        int16_t rdspid;
1109        struct audiotrack* next;
1110};
1111
1112struct linkedchannel
1113{
1114        uint64_t transponderid;
1115        int serviceid;
1116        time_t starttime;
1117        time_t endtime;
1118        struct linkedchannel* next;
1119};
1120
1121//there are a createchannel function
1122//if you change this struct you must change the function
1123struct channel
1124{
1125        char* name;
1126        uint64_t transponderid;
1127        int providerid;
1128        int serviceid;
1129        int servicetype;
1130        uint8_t flag;
1131        uint8_t crypt;
1132        int8_t videocodec;
1133        int8_t audiocodec;
1134        int16_t videopid;
1135        int16_t audiopid;
1136        int16_t ac3audiopid;
1137        int16_t txtpid;
1138        int16_t pcrpid;
1139        int16_t pmtpid;
1140        int16_t aitpid;
1141        uint8_t protect;
1142        char* hbbtvurl;
1143        struct transponder *transponder;
1144        struct provider *provider;
1145        struct audiotrack *audiotrack;
1146        struct subtitle *subtitle;
1147        struct linkedchannel *linkedchannel;
1148        struct pmt *pmt;
1149        struct cadesc *cadesc;
1150        struct esinfo *esinfo;
1151        struct epg *epg;
1152        struct channel *prev;
1153        struct channel *next;
1154};
1155
1156struct sat
1157{
1158        char* name;
1159        int orbitalpos;
1160        int flag;
1161        int fetype;
1162        int scan;
1163        struct sat *prev;
1164        struct sat *next;
1165};
1166
1167struct service
1168{
1169        int type;
1170        char* channellist;
1171        struct dvbdev *fedev;
1172        struct dvbdev *dmxaudiodev;
1173        struct dvbdev *dmxvideodev;
1174        struct dvbdev *dmxpcrdev;
1175        struct dvbdev *dmxsubtitledev;
1176        struct dvbdev *audiodev;
1177        struct dvbdev *videodev;
1178        struct dvbdev *encoderdev;
1179        struct transponder *transponder;
1180        struct channel *channel;
1181        unsigned char *pmtbuf;
1182        int pmtlen;
1183        int recdmxstart;
1184        int recdstfd;
1185        int recsrcfd;
1186        time_t recendtime;
1187        char* rectimestamp;
1188        size_t reclastsync;
1189        off64_t rectotal;
1190        int reccount;
1191        int tssize;
1192        char* recname;
1193        unsigned long long lenpts;
1194        unsigned long long startpts;
1195        unsigned long long endpts;
1196        unsigned long long bitrate;
1197        off64_t endoffile;
1198        struct service *next;
1199};
1200
1201struct caservice
1202{
1203        struct service* service;
1204        struct channel* channel;
1205        int count;
1206        int camsockfd;
1207        struct caslot* caslot;
1208        int camanager;
1209        char* capmt;
1210        int capmtlen;
1211        int cmdpos;
1212};
1213
1214struct stimerthread
1215{
1216        int delay;
1217        int count;
1218        int notfirst;
1219        pthread_attr_t attr;
1220        pthread_t thread;
1221        int status;
1222        int aktion;
1223        //bit 0: 1 = stop allwas on titan end
1224        int flag;
1225        void* param1;
1226        void* param2;
1227        void* (*func)(struct stimerthread*, void*, void*);
1228        struct stimerthread* next;
1229};
1230
1231struct hddparm
1232{
1233        char* device;
1234        int read;
1235        int write;
1236        int sleeptime;
1237        int notchanged;
1238};
1239
1240struct marker
1241{
1242        off64_t pos;
1243        off64_t time;
1244        char* timetext;
1245        struct marker* prev;
1246        struct marker* next;
1247};
1248
1249struct status
1250{
1251        int longkeycode[MAXLONGKEY];
1252        //aktivate extra featers
1253        int expertmodus;
1254        //http user:passwd
1255        char* httpauth;
1256        //set to 1 if channellist or channelnr open
1257        int channelswitch;
1258        //deaktivates child protect if greater then akttime
1259        time_t protecttime;
1260        char* boxtype;
1261        char* realboxtype;
1262        pthread_t mainthread;
1263        //videosize from stream
1264        video_size_t videosize;
1265        time_t videosizevalid;
1266        //radius for rounded border
1267        int borderradius;
1268        int picbordersize;
1269        int titlelinesize;
1270        //0 border
1271        //1 fullbar
1272        int listboxselecttype;
1273        //0 camd.socket
1274        //1 pmt.tmp
1275        int pmtmode;
1276        //timer for del old epg entrys
1277        time_t deloldepg;
1278        //write epg periodic to medium
1279        time_t writeperiodicepg;
1280        //0 dektiv
1281        //1 only scan
1282        //2 only whitlist
1283        //3 scan and whitelist
1284        int epglistmode;
1285        // 1 manual
1286        // 2 from standby
1287        int startmode;
1288        jmp_buf longjumpbuf;
1289        pthread_mutex_t drawingmutex;
1290        pthread_mutex_t rectimermutex;
1291        pthread_mutex_t servicemutex;
1292        pthread_mutex_t epgmutex;
1293        pthread_mutex_t channelmutex;
1294        pthread_mutex_t timerthreadmutex;
1295        pthread_mutex_t audiotrackmutex;
1296        pthread_mutex_t subtitlemutex;
1297        pthread_mutex_t linkedchannelmutex;
1298        pthread_mutex_t dmxdevmutex;
1299        pthread_mutex_t rcmutex;
1300        pthread_mutex_t queuemutex;
1301        pthread_mutex_t clistmutex;
1302        pthread_mutex_t hddmutex;
1303        pthread_mutex_t tsseekmutex;
1304        pthread_mutex_t accelfbmutex;
1305        pthread_mutex_t mediadbmutex;
1306        pthread_mutex_t oldentrymutex;
1307        pthread_mutex_t newslettermutex;
1308        pthread_mutex_t tithekmutex;
1309        pthread_mutex_t inetworkmutex;
1310        pthread_mutex_t textboxmutex;
1311        pthread_mutex_t setaktresmutex;
1312        pthread_mutex_t waitrcmutex;
1313        // mutex for VFD handling
1314        pthread_mutex_t vfdmutex;
1315        // mutex for OLED handling
1316        pthread_mutex_t oledmutex;
1317        off64_t recsplitsize;
1318        char* gateway;
1319        char* dnsserver1;
1320        char* dnsserver2;
1321        int fasttextrender;
1322        // 1 release all menus
1323        int menurelease;
1324        int play;
1325        int pause;
1326        int playspeed;
1327        int slowspeed;
1328        int prefillbuffer;
1329        int playpic;
1330#ifdef EPLAYER4
1331        int bufferpercent;
1332        int cleaninfobar;
1333//      gint avgInRate;
1334//      gint avgOutRate;
1335//      gint64 bufferingLeft;
1336        gint64 pts;
1337#endif
1338        int random;
1339        int repeat;
1340        int epgdays;
1341        int spinnertime;
1342        int spinnerspeed;
1343        int hangtime;
1344        int timeupdatecount;
1345        int markmodus;
1346        // 1 from main prog
1347        // 2 from a thread
1348        int standby;
1349        char* tmp;
1350        // rc filedescriptor
1351        int fdrc;
1352        // rc filedescriptor for tuxtxt
1353        int fdrctxt;
1354        int writeconfig;
1355        int writeownconfig;
1356        int writercconfig;
1357        int writeskinconfig;
1358        int writechannel;
1359        int writetransponder;
1360        int writeprovider;
1361        int writemainbouquet;
1362        int writebouquet;
1363        int writemainplaylist;
1364        int writeplaylist;
1365        int writesat;
1366        int writerectimer;
1367        int writeepgscanlist;
1368        int writemostzap;
1369        int writemediadb;
1370        int writelastsubtitle;
1371        int writechannelslot;
1372        // 1 mute is aktiv
1373        int mute;
1374        // 1 spinner is aktiv
1375        int spinner;
1376        // 1 infobar is aktiv
1377        // 2 infobar is aktiv (with wait befor show)
1378        // 3 infobar is aktiv (no autohide)
1379        int infobar;
1380        // with infobar to display
1381        int infobarnr;
1382        // 0 is for mute screen
1383        struct skin *drawallways[1];
1384        char* drawallwaysbg[1];
1385        int usedirectfb;
1386        // count how long last rcwait (shows spinner if to long)
1387        time_t sec;
1388        // if set to a value != 0, rcwait returns this number
1389        int rckey;
1390        struct skin* skinerr;
1391        pthread_attr_t timerthreadattr;
1392        pthread_t timerthread;
1393        int timerthreadstatus;
1394        int timerthreadaktion;
1395        pthread_attr_t subthreadattr;
1396        pthread_t subthread;
1397        int subthreadstatus;
1398        int subthreadaktion;
1399        int subthreadpid;
1400        int subthreadid1;
1401        int subthreadid2;
1402        // epg thread pointer
1403        struct stimerthread* epgthread;
1404        // epgscanlist thread pointer
1405        struct stimerthread* epgscanlistthread;
1406        // httpd thread pointer
1407        struct stimerthread* httpthread;
1408        // rguid thread pointer
1409        struct stimerthread* rguithread;
1410        // mediadb thread pointer
1411        struct stimerthread* mediadbthread;
1412        // newsletter thread pointer
1413        struct stimerthread* newsletterthread;
1414        // thumb thread pointer
1415        struct stimerthread* thumbthread;
1416        // rectimer thread
1417        struct stimerthread* rectimerthread;
1418        // rguid sock filedescriptor for rguid
1419        int rguidfd;
1420        struct service* aktservice;
1421        struct service* lastservice;
1422        struct service* pipservice;
1423        struct channel* markedchannel;
1424        //if we are in a epg screen, this is the showen channel
1425        struct channel* epgchannel;
1426        char* configfile;
1427        // for bouquet channel numbering
1428        int bouquetnr[MAXSERVICETYPE];
1429        int servicetype;
1430        struct shutdowntimer *sd_timer;
1431        // akt pos in channel cache
1432        int channelcachepos;
1433        // aktivate/deaktivate auto updatevfd
1434        int updatevfd;
1435        // count for recording
1436        int recording;
1437        // count for streaming
1438        int streaming;
1439        // pvr allowed = 1, disable = 0
1440        int pvr;
1441        // timeshift running = 1, ending = 2
1442        int timeshift;
1443        // 0 = normal, 1 = permanent timeshift
1444        int timeshifttype;
1445        // position in timeshiftfile to seek
1446        off64_t timeshiftpos;
1447        // ask if timeshift is running and switch channel
1448        int asktimeshift;
1449        // ts playing running = 1
1450        int playing;
1451        // if set to a skin (screenpointer) only this screen has rc
1452        struct skin* rcowner;
1453        struct skin* rcstandby;
1454        // timerstuktur fuer autores
1455        struct stimerthread* restimer;
1456        // spindown USB/HDD
1457        struct hddparm hdd[3];
1458        struct stimerthread* addhddall;
1459        // save old rotor position
1460        int rotoroldorbitalpos;
1461        // security check
1462        int security;
1463        // set to 1 if tvpic size is changed
1464        int tvpic;
1465        // timestamp for rc action
1466        time_t lastrcaction;
1467        // show timeline in channellist for each channel
1468        int showchanneltimeline;
1469        // see player.h for details
1470        int playercan;
1471                //Code von infobar.h aktiv = 1
1472        int infobaraktiv;
1473        //Name der Datei die abgespielt wird
1474        char* playfile;
1475        //Code MC aktiv = 1
1476        int mcaktiv;
1477        //greater 0 aktivate screen animation
1478        int screenanim;
1479        int screenanimspeed;
1480        //for auto increase audio vol
1481        int volautochange;
1482        int volautochangevalue;
1483        //for powerofftimer
1484        time_t fixpowerofftime;
1485        //for write FB in File
1486        int write_png;
1487        int write_jpg;
1488        //holds oversize value for blitter
1489        int leftoffset;
1490        int rightoffset;
1491        int topoffset;
1492        int bottomoffset;
1493        //background picture for all screens
1494        char* bgpic;
1495        //time for next picmem timeout check
1496        time_t picmemtimeout;
1497        time_t defpicmemtimeout;
1498        //show not tunable channel hidden (0)) or deaktive (1) in channellist
1499        int channellistview;
1500        //for blockmove in channellist
1501        int moveblockcount;
1502        //name ob file who played from webig
1503        char* webplayfile;
1504        //status of mediadbthread
1505        int mediadbthreadstatus;
1506        //for save mediadb in scan
1507        time_t mediadbsavetime;
1508        //colors / pic for selection
1509        long markcol;
1510        long filelistselectcol;
1511        long listboxselectcol;
1512        char* selectpic;
1513        //check if cam can decrypt channel
1514        int checkcamdecrypt;
1515        //don't send privat part of cadescriptor in capmt
1516        int caskipprivat;
1517        //send all caids or only caids cam can
1518        int casendallcaids;
1519        //show hidden files in filelist
1520        int showhiddenfiles;
1521        //mediadb
1522        int mediadbfiles;
1523        //show infobar on program change
1524        int infobarprogram;
1525        //for auto increase audio vol (mute)
1526        int volmute;
1527        int secondzap;
1528        //pointer to marker for recordings
1529        struct marker* playmarker;
1530        int autosubtitle;
1531        //save timeshift start time
1532        time_t timeshiftstart;
1533        int crosscontrol;
1534        int autochangechannelname;
1535        //tuxtext is running
1536        int tuxtxt;
1537        //on some fat32 hdd it takes very long to get free size
1538        int showrecfreesize;
1539        int firstunicablewait;
1540        //path for imdbfolder
1541        char* imdbfolderpath;
1542        int virtualzap;
1543        int fontsizeadjust;
1544        //count for drawing screen
1545        unsigned int drawscreencount;
1546        int autoseek;
1547        //skip all rc input events older than this value in millisec
1548        int rcskipms;
1549        //Workaround da ansonsten DVR4 nicht funktioniert (Treiberproblem)
1550        int setdvr0;
1551#ifdef MIPSEL
1552        //cec mipsel
1553        int cec_fixedAddress;
1554        int hdmiFd;
1555        int webencode;
1556#endif
1557        //pip Einstellungen
1558        int pipzap;
1559        // guest
1560        int whilecount;
1561        int sleepcount;
1562        int stats;
1563        char* url;
1564        //externer plugin Aufruf
1565        char* extplugin;
1566        //node oled blinken
1567        int skinblink;
1568        //BCM accel interface
1569        int bcm;
1570} status;
1571
1572struct fb
1573{
1574        int dev;
1575        char *name;
1576        int fd;
1577        unsigned char *fb;
1578        unsigned long *fblong;
1579        int width;
1580        int height;
1581        int pitch;
1582        unsigned long fixfbsize;
1583        unsigned long varfbsize;
1584        int colbytes;
1585        unsigned long data_phys;
1586        struct fb *next;
1587};
1588
1589struct rc
1590{
1591        int key;
1592        void (*rcfunc)(struct skin*, struct skin*, int screencalc, int filelistview, int flag);
1593        struct skin *screen;
1594        struct skin *screennode;
1595        struct skin *owner;
1596        struct rc *next;
1597};
1598
1599struct clist
1600{
1601        char *key;
1602        char *value;
1603        char *def;
1604        char *tmp;
1605        struct clist *next;
1606};
1607
1608struct bouquet
1609{
1610        int nr;
1611        int serviceid;
1612        uint64_t transponderid;
1613        struct channel *channel;
1614        struct bouquet *prev;
1615        struct bouquet *next;
1616};
1617
1618struct channelslot
1619{
1620        int slot;
1621        int serviceid;
1622        uint64_t transponderid;
1623        struct channelslot *next;
1624};
1625
1626struct mainbouquet
1627{
1628        char *name;
1629        int type;
1630        char *filename;
1631        struct bouquet *bouquet;
1632        struct mainbouquet *prev;
1633        struct mainbouquet *next;
1634};
1635
1636struct pic
1637{
1638        char* name;
1639        unsigned char* picbuf;
1640        // < 0 when picbuf is normal mem (hw jpg)
1641        int memfd;
1642        unsigned long width;
1643        unsigned long height;
1644        unsigned long rowbytes;
1645        int channels;
1646  int timeout;
1647  time_t lastaccess;
1648        int del;
1649        struct pic* next;
1650};
1651
1652struct font
1653{
1654        char *name;
1655        FT_Error error;
1656        FTC_Manager manager;
1657        FTC_SBitCache cache;
1658        FTC_ImageTypeRec desc;
1659        FT_Face face;
1660        FT_UInt prev_glyphindex;
1661        FT_Bool use_kerning;
1662        struct font *next;
1663};
1664
1665//structure for write fb to File
1666struct writeFBfile
1667{
1668        unsigned char* ActBuf;
1669        unsigned char* buf1;
1670        unsigned char* buf2;
1671} writeFBfile;
1672
1673struct eit
1674{
1675        u_char table_id                               /*:8*/;
1676        u_char section_length_hi                      :4;
1677        u_char                                        :3;
1678        u_char section_syntax_indicator               :1;
1679        u_char section_length_lo                      /*:8*/;
1680        u_char service_id_hi                          /*:8*/;
1681        u_char service_id_lo                          /*:8*/;
1682        u_char current_next_indicator                 :1;
1683        u_char version_number                         :5;
1684        u_char                                        :2;
1685        u_char section_number                         /*:8*/;
1686        u_char last_section_number                    /*:8*/;
1687        u_char transport_stream_id_hi                 /*:8*/;
1688        u_char transport_stream_id_lo                 /*:8*/;
1689        u_char original_network_id_hi                 /*:8*/;
1690        u_char original_network_id_lo                 /*:8*/;
1691        u_char segment_last_section_number            /*:8*/;
1692        u_char segment_last_table_id                  /*:8*/;
1693        u_char data[]; /* struct eitevent */
1694};
1695#define EITLEN sizeof(struct eit)
1696#define GETEITSECLEN(x) HILO(((struct eit*)(x))->section_length)
1697
1698struct eitevent
1699{
1700        u_char event_id_hi                            /*:8*/;
1701        u_char event_id_lo                            /*:8*/;
1702        u_char mjd_hi                                 /*:8*/;
1703        u_char mjd_lo                                 /*:8*/;
1704        u_char start_time_h                           /*:8*/;
1705        u_char start_time_m                           /*:8*/;
1706        u_char start_time_s                           /*:8*/;
1707        u_char duration_h                             /*:8*/;
1708        u_char duration_m                             /*:8*/;
1709        u_char duration_s                             /*:8*/;
1710        u_char descriptors_loop_length_hi             :4;
1711        u_char free_ca_mode                           :1;
1712        u_char running_status                         :3;
1713        u_char descriptors_loop_length_lo             /*:8*/;
1714        u_char data[];
1715};
1716#define EITEVENTLEN sizeof(struct eitevent)
1717#define GETEITDESCLEN(x) HILO(((struct eitevent *)x)->descriptors_loop_length)
1718
1719struct eitshortevent
1720{
1721        u_char descriptor_tag                         /*:8*/;
1722        u_char descriptor_length                      /*:8*/;
1723        u_char lang_code1                             /*:8*/;
1724        u_char lang_code2                             /*:8*/;
1725        u_char lang_code3                             /*:8*/;
1726        u_char event_name_length                      /*:8*/;
1727        u_char data[];
1728};
1729#define EITSHORTEVENTLEN sizeof(struct eitshortevent)
1730
1731struct eitlongevent
1732{
1733        u_char descriptor_tag                         /*:8*/;
1734        u_char descriptor_length                      /*:8*/;
1735        u_char last_descriptor_number                 :4;
1736        u_char descriptor_number                      :4;
1737        u_char lang_code1                             /*:8*/;
1738        u_char lang_code2                             /*:8*/;
1739        u_char lang_code3                             /*:8*/;
1740        u_char length_of_items                        /*:8*/;
1741        u_char data[]; /* struct eitlongeventitem */
1742};
1743#define EITLONGEVENTLEN sizeof(struct eitlongevent)
1744
1745struct eitlongeventitem
1746{
1747        u_char item_description_length               /*:8*/;
1748        u_char data[];
1749};
1750#define EITLONGEVENTITEMLEN sizeof(struct eitlongeventitem)
1751
1752struct eitlinkage
1753{
1754        u_char descriptor_tag                 /*:8*/;
1755        u_char descriptor_length              /*:8*/;
1756        u_char transport_stream_id_hi         /*:8*/;
1757        u_char transport_stream_id_lo         /*:8*/;
1758        u_char original_network_id_hi         /*:8*/;
1759        u_char original_network_id_lo         /*:8*/;
1760        u_char service_id_hi                  /*:8*/;
1761        u_char service_id_lo                  /*:8*/;
1762        u_char linkage_type                   /*:8*/;
1763};
1764#define EITLLINKAGELEN sizeof(struct eitlinkage)
1765
1766struct parentalrating
1767{
1768        u_char descriptor_tag                 /*:8*/;
1769        u_char descriptor_length              /*:8*/;
1770        u_char data[]; //struct parental_rating_item
1771};
1772#define PARENTALRATINGLEN sizeof(struct parentalrating)
1773
1774struct parentalratingitem
1775{
1776        u_char lang_code1                    /*:8*/;
1777        u_char lang_code2                    /*:8*/;
1778        u_char lang_code3                    /*:8*/;
1779        u_char rating                        /*:8*/;
1780};
1781#define PARENTALRATINGITEMLEN sizeof(struct parentalratingitem)
1782
1783struct rst //table id 0x71
1784{
1785        u_char table_id                     /*:8*/;
1786        u_char section_syntax_indicator         :1;
1787        u_char reserved_1                       :1;
1788        u_char reserved_2                       :2;
1789        u_int section_length                   :12;
1790};
1791#define RSTLEN sizeof(struct rst)
1792
1793struct rstitem
1794{
1795        u_char transponder_stream_id_hi     /*:8*/;
1796        u_char transponder_stream_id_lo     /*:8*/;
1797        u_char original_network_id_hi       /*:8*/;
1798        u_char original_network_id_lo       /*:8*/;
1799        u_char service_id_hi                /*:8*/;
1800        u_char service_id_lo                /*:8*/;
1801        u_char event_id_hi                  /*:8*/;
1802        u_char event_id_lo                  /*:8*/;
1803        u_char reserved_1                       :5;
1804        u_char running_status                   :3;
1805};
1806#define RSTITEMLEN sizeof(struct rstitem)
1807
1808struct mhwchannel
1809{
1810        u_char  network_id_hi;
1811        u_char  network_id_lo;
1812        u_char  transponder_id_hi;
1813        u_char  transponder_id_lo;
1814        u_char  channel_id_hi;
1815        u_char  channel_id_lo;
1816        u_char  name[16];
1817};
1818#define MHWCHANNELLEN sizeof(struct mhwchannel)
1819
1820struct mhwtitle
1821{
1822        u_char table_id                       :8;
1823        u_char section_length_hi              :4;
1824        u_char                                :2;
1825        u_char dummy                          :1;
1826        u_char section_syntax_indicator       :1;
1827        u_char section_length_lo              :8;
1828        u_char channel_id                     :8;
1829        u_char theme_id                       :8;
1830        u_char hours                                  :5;
1831        u_char day                            :3;
1832        u_char summary_available              :1;
1833        u_char                                      :1;
1834        u_char minutes                        :6;
1835        u_char                                :8;
1836        u_char                                :8;
1837        u_char duration_hi                    :8;
1838        u_char duration_lo                    :8;
1839        u_char title                          [23];
1840        u_char ppv_id_hi                      :8;
1841        u_char ppv_id_mh                      :8;
1842        u_char ppv_id_ml                      :8;
1843        u_char ppv_id_lo                      :8;
1844        u_char program_id_hi                  :8;
1845        u_char program_id_mh                  :8;
1846        u_char program_id_ml                  :8;
1847        u_char program_id_lo                  :8;
1848        u_char                                :8;
1849        u_char                                :8;
1850        u_char                                :8;
1851        u_char                                :8;
1852};
1853#define MHWTITLELEN sizeof(struct mhwtitle)
1854
1855struct mhwsummary
1856{
1857        u_char table_id                       :8;
1858        u_char section_length_hi              :4;
1859        u_char                                :2;
1860        u_char dummy                          :1;
1861        u_char section_syntax_indicator       :1;
1862        u_char section_length_lo              :8;
1863        u_char program_id_hi                  :8;
1864        u_char program_id_mh                  :8;
1865        u_char program_id_ml                  :8;
1866        u_char program_id_lo                  :8;
1867        u_char                                :8;
1868        u_char                                :8;
1869        u_char                                :8;
1870        u_char nb_replays                     :8;
1871};
1872#define MHWSUMMARYLEN sizeof(struct mhwsummary)
1873
1874struct mhw2channel
1875{
1876        u_char network_id_hi;
1877        u_char network_id_lo;
1878        u_char transponder_id_hi;
1879        u_char transponder_id_lo;
1880        u_char channel_id_hi;
1881        u_char channel_id_lo;
1882        u_char                                :8;
1883        u_char                                :8;
1884};
1885
1886struct extepgcache
1887{
1888        long id;
1889        struct epg* epgnode;
1890        struct extepgcache* next;
1891};
1892
1893struct extepgchannel
1894{
1895        long id;
1896        int serviceid;
1897        uint64_t transponderid;
1898        struct extepgchannel* next;
1899};
1900
1901struct extepgconfig
1902{
1903        uint64_t transponderid;
1904        int type;
1905        char* file;
1906        int channelpid;
1907        int titlepid[8];
1908        int summarypid[8];
1909        struct extepgconfig* next;
1910};
1911
1912struct blacklist
1913{
1914  char* file;
1915  struct splitstr* splitstr;
1916  int count;
1917};
1918
1919typedef struct sci_modes
1920{
1921        int emv2000;
1922        int dma;
1923        int man_act;
1924        int rw_mode;
1925} scimodes;
1926
1927typedef struct sci_parameters
1928{
1929        u_char T;
1930        unsigned long fs;
1931        unsigned long ETU;
1932        unsigned long WWT;
1933        unsigned long CWT;
1934        unsigned long BWT;
1935        unsigned long EGT;
1936        unsigned long clock_stop_polarity;
1937        u_char check;
1938        u_char P;
1939        u_char I;
1940        u_char U;
1941} sciparameters;
1942
1943struct update
1944{
1945        char* auth;
1946        char* type;
1947        char* skinname;
1948        char* filemask;
1949        char* filepath;
1950        int imgtype;
1951};
1952
1953#ifdef EPLAYER4
1954typedef enum { stUnknown, stPlainText, stSSA, stASS, stSRT, stVOB, stPGS } subtype_t;
1955typedef enum {atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC, atWMA} audiotype_t;
1956typedef struct _CustomData {
1957//typedef struct CustomData {
1958  GstElement *playbin2;   /* Our one and only element */
1959   
1960  gint n_video;          /* Number of embedded video streams */
1961  gint n_audio;          /* Number of embedded audio streams */
1962  gint n_text;           /* Number of embedded subtitle streams */
1963   
1964  gint current_video;    /* Currently playing video stream */
1965  gint current_audio;    /* Currently playing audio stream */
1966  gint current_text;     /* Currently playing subtitle stream */
1967
1968  gboolean is_live;
1969  GstElement *pipeline;
1970  GMainLoop *loop;
1971} CustomData;
1972
1973typedef enum {
1974        GST_PLAY_FLAG_VIDEO = (1 << 0),
1975        GST_PLAY_FLAG_AUDIO = (1 << 1),
1976        GST_PLAY_FLAG_TEXT = (1 << 2),
1977        GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 3)
1978} GstPlayFlags;
1979#endif
1980
1981#ifdef MIPSEL
1982//fuer cec Mipsel
1983struct cec_message
1984{
1985unsigned char address;
1986unsigned char length;
1987unsigned char data[256];
1988}__attribute__((packed));
1989
1990unsigned char cec_physicalAddress[2];
1991unsigned char cec_logicalAddress;
1992unsigned char cec_deviceType;
1993
1994#endif
1995
1996#endif
Note: See TracBrowser for help on using the repository browser.