source: titan/titan/struct.h @ 30716

Last change on this file since 30716 was 30716, checked in by gost, 9 years ago

schubs

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