source: titan/titan/struct.h @ 45041

Last change on this file since 45041 was 45041, checked in by obi, 3 years ago

update tithek add useproxy add delservice to settings

File size: 45.5 KB
RevLine 
[15367]1/*****************************************************/
2/* this file is part of the tiTan / tiTanNIT Project */
3/* and allowed only for use with this.               */
4/*                                                   */
5/* copyright by NIT                                  */
6/*****************************************************/
7
[7497]8#ifndef STRUCT_H
9#define STRUCT_H
10
[43367]11#ifndef _GNU_SOURCE
[7934]12#define _GNU_SOURCE
[43367]13#endif
[7934]14
15#ifdef SIMULATE
16#include <mcheck.h>
17#endif
18
19#include <stdio.h>
20#include <stdlib.h>
21#include <stdint.h>
22#include <string.h>
[8411]23#include <libgen.h>
[7934]24#include <fcntl.h>
25#include <ctype.h>
26#include <linux/fb.h>
27#include <sys/ioctl.h>
28#include <sys/mman.h>
[42986]29#include <sys/sysmacros.h>
[7934]30#include <png.h>
[8463]31#include <jpeglib.h>
[7934]32#include <libintl.h>
33#include <locale.h>
34#include <math.h>
35#include <linux/input.h>
36#include <sys/wait.h>
37#include <time.h>
38#include <dirent.h>
39#include <fnmatch.h>
40#include <dlfcn.h>
41#include <pthread.h>
42#include <linux/dvb/frontend.h>
43#include <linux/dvb/dmx.h>
44#include <linux/dvb/audio.h>
45#include <linux/dvb/video.h>
46#include <sys/vfs.h>
47#include <inttypes.h>
48#include <sys/socket.h>
49#include <sys/un.h>
50#include <unistd.h>
51#include <zlib.h>
[8259]52#include <net/if.h>
53#include <netinet/in.h>
54#include <arpa/inet.h>
[8401]55#include <netdb.h>
[8506]56#include <errno.h>
[8513]57#include <linux/dvb/version.h>
[8645]58#include <setjmp.h>
[8690]59#include <sys/mount.h>
[8749]60#include <execinfo.h>
[9918]61#include <ifaddrs.h>
[10366]62#include <linux/dvb/ca.h>
[10496]63#include <poll.h>
[12697]64#include <sys/utsname.h>
[16311]65#include <regex.h>
[16769]66#include <mntent.h>
[22751]67#include <termios.h>
[36419]68//#ifndef SH4
[31051]69#include <sys/stat.h>
[36419]70//#endif
[37719]71#include <openssl/aes.h>
72#include <openssl/dh.h>
73#include <openssl/rsa.h>
74#include <openssl/sha.h>
75#include <stdio.h>
76#include <unistd.h>
77#include <fcntl.h>
78#include <sys/ioctl.h>
79#include <stdint.h>
80#include <inttypes.h>
81#include <arpa/inet.h>
82#include <time.h>
83#include <linux/dvb/ca.h>
84#include <sys/types.h>
[7934]85
[37719]86#include <fcntl.h>
87#include <stdint.h>
88#include <stdio.h>
89#include <stdlib.h>
90#include <string.h>
91#include <sys/types.h>
92#include <sys/stat.h>
93#include <unistd.h>
94#include <time.h>
95
96#include <openssl/pem.h>
97#include <openssl/x509.h>
98#include <openssl/x509v3.h>
99#include <openssl/sha.h>
100#include <openssl/aes.h>
101
[7934]102//for freetype
103#include <ft2build.h>
104#include FT_FREETYPE_H
105#include FT_CACHE_H
106
107//for eplayer
[10626]108#ifdef EPLAYER3
[7934]109#include <common.h>
[39776]110//#ifndef BETA
[39847]111//#include <subtitle.h>
[39776]112//#endif
[7934]113#endif
114
[10626]115#ifdef EPLAYER4
116#include <gst/gst.h>
117#include <gst/pbutils/missing-plugins.h>
118#endif
119
[14721]120#ifdef DVDPLAYER
121#include <ddvdlib.h>
122#endif
123
[41066]124#define DRIVER " -   - "
[45027]125#define OVERSION "1.93"
[12368]126#define PROGNAME "titan"
[7497]127#define COPYRIGHT "NIT"
[31165]128#define CRONTRIBUT "obi, gost"
[41066]129#define PLUGINVERSION 1
[7497]130
131#define _(x) gettext(x)
[7571]132#define MINMALLOC 4096
[7497]133#define SCROLLBARWIDTH 15
134#define SCROLLBARBORDERSIZE 1
135#define FONTPOSYOFFSET -3
[7694]136#define FB "fb0"
137#define FB1 "fb1"
[7497]138#define SKINFB "skinfb"
139#define ACCELFB "accelfb"
140#define CONFIGFILE PROGNAME".cfg"
[7652]141#define KILLPROG "killall -9 "PROGNAME
142#define REBOOT "init 6"
[7791]143#define FILELISTDELMARK 255
[8017]144#define PLUGINDELMARK 254
[21429]145#define MAXDVBADAPTER 1
[41032]146#ifndef MIPSEL
[27237]147#define MAXFRONTENDDEV 4
[41032]148#else
[43121]149#define MAXFRONTENDDEV 10
[41032]150#endif
[7906]151#define MAXDEMUXDEVOPEN 10
[31357]152#define MAXAUDIODEV 4
153#define MAXVIDEODEV 4
[10473]154#define MAXCIDEV 4
[41067]155#define MAXCADEV 8
[26968]156#ifndef MIPSEL
[9713]157#define MAXDVRDEV 4
[26968]158#define MAXDEMUXDEV 4
159#else
[41067]160#define MAXDVRDEV 9
161#define MAXDEMUXDEV 9
[31357]162#define MAXENCODERDEV 2
[41132]163//#define DVB_API_VERSION 5
[26968]164#endif   
[22527]165#define MAXSCDEV 2
[7612]166#define RCTIMEOUT 999999
[7763]167#define RCTHREADSTANDBY 999998
[7670]168#define MAXSERVICETYPE 10
[10287]169#define CHANNELCACHEMAX 1000
[16358]170#define MEDIADBCACHEMAX 1000
[14869]171#define TRANSPONDERCACHEMAX 500
[9220]172#define MAXHTTPDCONN 20
[9295]173#define MAXHTMLLINE 300
[14640]174#define MAXRGUIDCONN 1
[9501]175#define LISTHASHSIZE 27
[10473]176#define MAXCASESSION 16
[11054]177#define MAXCASERVICE 20
[12226]178#define MAXLONGKEY 10
[12521]179#define MAXSAT 64
[32001]180#define MAXBGDOWNLOAD 10
[32027]181#ifdef MIPSEL
[32029]182#define EPGSCANLOG "/mnt/logs/epgscan.log"
[32027]183#else
[14759]184#define EPGSCANLOG "/tmp/epgscan.log"
[32027]185#endif
[14953]186#define MAXCHANNELHISTORY 6
[15365]187#define HILO(x) (x##_hi << 8 | x##_lo)
[19265]188#define HILO32(x) (x##_hi << 24 | x##_mh << 16 | x##_ml << 8 | x##_lo)
[22520]189#define SERIALDEV "/dev/ttyAS0"
[23184]190#define MAXTOKENS 256
[23195]191#define MAXSTACKTRACE 30
192#define MAXSTACKTRACEFUNC 20
[7497]193
[17007]194#define USBDEVICE_SUPER_MAGIC 0x9fa2
195#define EXT2_SUPER_MAGIC 0xEF53
196#define EXT3_SUPER_MAGIC 0xEF53
197#define SMB_SUPER_MAGIC 0x517B
198#define NFS_SUPER_MAGIC 0x6969
199#define MSDOS_SUPER_MAGIC 0x4d44
200
[30944]201#ifndef VIDEO_SOURCE_HDMI
202#define VIDEO_SOURCE_HDMI 2
203#endif
204#ifndef AUDIO_SOURCE_HDMI
205#define AUDIO_SOURCE_HDMI 2
206#endif
207
[37766]208//cacc cert check
[38008]209#define ROOT_CERT     "/mnt/swapextensions/etc/pem/root.pem"
210#define CUSTOMER_CERT "/mnt/swapextensions/etc/pem/customer.pem"
211#define DEVICE_CERT   "/mnt/swapextensions/etc/pem/device.pem"
[37769]212#define MAX_ELEMENTS    33
[39294]213#ifdef MIPSEL
[40595]214#define CA_SET_DESCR_DATA_DREAM _IOW('o', 137, struct ca_descr_data)
215#define CA_SET_DESCR_DATA _IOW('o', 10, struct ca_descr_data)
[37769]216#endif
[39294]217#ifdef SH4NEW
218#define CA_SET_DESCR_DATA _IOW('o', 137, struct ca_descr_data)
219#endif
[42625]220#ifdef SIMULATE
221#define CA_SET_DESCR_DATA _IOW('o', 137, struct ca_descr_data)
222#endif
[37726]223
[23093]224//Start Function Entry Point
225#define STARTFUNC
226
[10473]227//CA Defines
228#define T_SB 0x80               //sb (h<--m)
229#define T_RCV 0x81              //receive (h-->m)
230#define T_CREATE_T_C 0x82       //create transport connection (h-->m)
231#define T_C_T_C_REPLY 0x83      //ctc reply (h<--m)
232#define T_DELETE_T_C 0x84       //delete tc (h<->m)
233#define T_D_T_C_REPLY 0x85      //dtc reply (h<->m)
234#define T_REQUEST_T_C 0x86      //request transport connection (h<--m)
235#define T_NEW_T_C 0x87          //new tc - reply to t_request (h-->m)
236#define T_T_C_ERROR 0x77        //error creating tc (h-->m)
237#define T_DATA_LAST 0xA0        //convey data from higher (h<->m)
238#define T_DATA_MORE 0xA1        //convey data from higher (h<->m)
239
[21758]240//Alarm Signal used as timeout
241#define ALARMTIMEOUT 1
242#define ALARMSTARTTIME(x) if(ALARMTIMEOUT == 1) {alarm(x);}
243#define ALARMSTOPTIME if(ALARMTIMEOUT == 1) {alarm(0);}
244
[7971]245// VFD icons supported (more or less) on all boxes:
246typedef 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;
247
[13591]248#define OMIN(a,b) (a < b ? a : b)
249#define OMAX(a,b) (a > b ? a : b)
[8964]250
[7728]251#define bcdtoint(i) ((((i & 0xf0) >> 4) * 10) + (i & 0x0f))
252
[23816]253#define alpha_composite(composite, fg, alpha, ralpha, bg) { (composite) = ((fg)*(alpha) + (bg)*(ralpha)) >> 8; }
[8520]254
[13930]255enum {LEFT=20000, CENTER, RIGHT, TEXTCENTER, TEXTRIGHT};
256enum {TOP=20000, MIDDLE, BOTTOM, TEXTMIDDLE, TEXTBOTTOM};
[7497]257enum {BOTTOMLEFT, BOTTOMRIGHT, TOPLEFT, TOPRIGHT};
[8985]258enum {LEFTRIGHT=1, TOPBOTTOM, LEFTMIDDLE, TOPMIDDLE};
[7497]259enum {NO, YES, AUTONO, AUTOYES};
[22781]260enum {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};
[31357]261enum {FRONTENDDEV, DEMUXDEV, VIDEODEV, AUDIODEV, CADEV, CIDEV, FRONTENDDEVDUMMY, DVRDEV, SCDEV, ENCODERDEV};
[7571]262enum {TV, RADIO};
[31367]263enum {RECDIRECT, RECTIMER, RECTIMESHIFT, RECSTREAM, RECPLAY, RECSTREAMENC};
[39757]264#ifdef DREAMBOX
265enum {MPEGV = 0, MPEG4V = 4, H264 = 1, VC1 = 10, H265 = 22};
[39899]266enum {AC3 = 0, MPEGA = 1, DTS = 2, LPCM = 6, AAC = 8, AACHE = 9, DTSHD = 16, DDP = 7};
[39757]267#else
[39899]268enum {AC3 = 0, MPEGA = 1, DTS = 2, LPCM = 6, AAC = 8, AACHE = 9, DTSHD = 16, DDP = 34};
[39757]269enum {MPEGV = 0, MPEG4V = 4, H264 = 1, VC1 = 10, H265 = 7};
270#endif
[7659]271enum {ALLCHANNEL, SATCHANNEL, PROVIDERCHANNEL, AZCHANNEL, BOUQUETCHANNEL, SATLIST, PROVIDERLIST, AZLIST, MAINBOUQUETLIST};
[12281]272enum {NOMODE, MVMODE, RMMODE, CPMODE, PROTECTMODE, EDITMODE};
[30944]273enum {NOTHING, CHANNEL, STILLPIC, RECORDDIRECT, RECORDTIMER, RECORDTIMESHIFT, RECORDSTREAM, TMPOTHER, RECORDPLAY, HDMIIN};
[7728]274enum {START, PAUSE, STOP};
[8997]275enum {DEACTIVE, ACTIVE, INPAUSE, ERROR};
[35659]276enum {FUNCTEXT, FUNCPIC, FUNCPROGRESS,FUNCPICOLED};
[10473]277enum {CASESSIONCREATE, CASESSIONBUSY, CASESSIONDEL, CASESSIONSTART, CASESSIONFINAL, CARESFIRSTENQUIRY, CARESCHANGE, CARESENQUIRY, CADATETIMESEND, CAMMIIDLE, CAMMIDISPLAYREPLAY, CAMMIFAKEOK};
[40705]278enum {feSatellite, feCable, feTerrestrial, feATSC};
[7497]279
[23224]280#ifdef BETA
[23187]281struct stacktrace
282{
283        int pos;
284        pthread_t thread;
[23195]285        void* func[MAXSTACKTRACEFUNC];
[23187]286};
287struct stacktrace stacktrace[MAXSTACKTRACE];
[23224]288#endif
[23187]289
[20233]290struct lastsubtitle
291{
292        uint64_t transponderid;
293        int serviceid;
294        int16_t subtitlepid;
[24612]295        int16_t subtitleid1;
[24138]296        int16_t subtitleid2;
[20233]297        struct lastsubtitle* next;
298};
299
[18738]300struct newsletter
301{
302        unsigned long nr;
303        char* date;
304        char* title;
305        char* text;
306        struct newsletter* next;
307};
308
[18571]309struct oldentry
310{
311        void* entry;
312        //0 = epg
313        int type;
314        time_t del;
315        struct oldentry* next;
316};
317
[18302]318struct unicable
319{
320        char* manufacturer;
321        char* product;
322        int scr1;
323        int scr2;
324        int scr3;
325        int scr4;
326        int scr5;
327        int scr6;
328        int scr7;
329        int scr8;
[43621]330        int scr9;
331        int scr10;
332        int scr11;
333        int scr12;
334        int scr13;
335        int scr14;
336        int scr15;
337        int scr16;
338        int scr17;
339        int scr18;
340        int scr19;
341        int scr20;
342        int scr21;
343        int scr22;
344        int scr23;
345        int scr24;
346        int scr25;
347        int scr26;
348        int scr27;
349        int scr28;
350        int scr29;
351        int scr30;
352        int scr31;
353        int scr32;
[18302]354        int lofl;
355        int lofh;
356        struct unicable* next;
357        struct unicable* prev;
358};
359
[16879]360struct id3tag
361{
362        int version;
363        char* title;
364        char* artist;
365        char* album;
366        char* year;
367        char* comment;
368        char* genrecode;
369        char* genretext;
370        char* poster;
371        int track;
372        int len;
373        int picturetype;
374        unsigned int picturepos;
375        unsigned int picturelen;
376};
377
378struct id3genre
379{
380        int code;
381        char text[30];
382};
383
[16314]384struct regex
385{
386        char* match1;
387        char* match2;
388        char* match3;
389        char* match4;
390        char* match5;
391        char* match6;
392        char* match7;
393        char* match8;
394        char* match9;
395        char* match10;
396};
397
[16237]398struct imdb
399{
400        char* title;
401        char* year;
402        char* rated;
403        char* released;
404        char* genre;
405        char* director;
406        char* writer;
407        char* actors;
408        char* plot;
409        char* poster;
410        char* runtime;
411        char* rating;
412        char* votes;
413        char* id;
[16413]414        char* thumb;
[16237]415};
416
[16410]417struct imdbapi
418{
419        char* title;
420        char* year;
421        char* rated;
422        char* released;
423        char* genre;
424        char* director;
425        char* writer;
426        char* actors;
427        char* plot;
428        char* poster;
429        char* runtime;
430        char* rating;
431        char* votes;
432        char* id;
433};
434
[16237]435struct tmdb
436{
437        char* title;
438        char* year;
439        char* rated;
440        char* released;
441        char* genre;
442        char* runtime;
443        char* plot;
[16326]444        char* postermid;
[16237]445        char* rating;
446        char* votes;
447        char* id;
448        char* backdrop;
449        char* imdbid;
450        char* orgname;
451        char* language;
452        char* type;
453        char* score;
454        char* cover;
455        char* thumb;
[16326]456        char* mvi;
[16492]457        struct tmdb* prev;
458        struct tmdb* next;
[16237]459};
460
[16221]461struct mediadbfilter
462{
463        struct mediadb* node;
[16603]464        int count;
[16221]465        struct mediadbfilter* prev;
466        struct mediadbfilter* next;
467};
468
469struct mediadbcategory
470{
471        int type;
472        char* name;
473        struct mediadbcategory* prev;
474        struct mediadbcategory* next;
475};
476
477struct mediadb
478{
479        char* id;
480        int type;
481        char* title;
[16289]482        int year;
[16221]483        char* released;
484        char* runtime;
485        char* genre;
486        char* director;
487        char* writer;
488        char* actors;
489        char* plot;
490        char* poster;
[16289]491        int rating;
492        int votes;
[16769]493        char* path;
[16221]494        char* file;
[18850]495        char* shortname;
496        char* fileinfo;
[16231]497        time_t timestamp;
[16797]498        //bit 31: manual change
[16375]499        int flag;
[18947]500        int backdropcount;
[16221]501        struct mediadb* prev;
502        struct mediadb* next;
503};
504
[16358]505struct mediadbcache
506{
[16769]507        char* path;
[16358]508        char* file;
509        struct mediadb* mediadbnode;
510        struct mediadbcache* next;
511};
512
[15781]513struct mostzap
514{
515        int serviceid;
[18431]516        uint64_t transponderid;
[15781]517        int count;
518        struct mostzap* prev;
519        struct mostzap* next;
520};
521
[15155]522struct menulist
523{
524        char* name;
[15159]525        char* text;
[15155]526        char* pic;
[15182]527        char* param;
[15261]528        char* param1;
[23288]529        char* param2;
[23289]530        char* param3;
[15155]531        int deaktiv;
532        int defaultentry;
533        struct menulist* next;
534};
535
[14910]536struct channelhistory
537{
538        struct channel* chnode;
539        char* channellist;
540};
541
[10502]542struct queue
543{
544        //0-99 for ca module
[15281]545        //101 for thumb thread
[10502]546        int type;
[10718]547        int flag;
[10502]548        int len;
549        void* data;
[15282]550        void* data1;
[10502]551        struct queue* prev;
552        struct queue* next;
553};
554
[10473]555struct casession
556{
557        int inuse;
558        int sessionnr;
559        int action;
560        int state;
[11163]561        int mmimanager;
562        int camanager;
563        int datetimemanager;
564        int appmanager;
565        int resmanager;
[37740]566        int ccmanager;
[40678]567#ifdef MIPSEL
568        int hostmanager;
[40682]569        int mmiappmanager;
[40678]570        int hostlacmanager;
[40679]571        int upgrademanager;
[40678]572#endif
[11108]573        char* mmititle;
574        char* mmisubtitle;
575        char* mmitext;
576        char* mmibottom;
[10473]577};
578
[10366]579struct caslot
580{
[10473]581        struct casession casession[MAXCASESSION];
582        int connid;
[10810]583        int poll;
[10366]584        int status;
585        int rlen;
[10473]586        unsigned char* rbuf;
587        char* name;
[10635]588        int fastrun;
[10865]589        char* caids;
[37766]590        // cacc
[37719]591        unsigned char lastKey[32];
592        uint8_t lastParity;
[37846]593//      unsigned char scrambled;
594        int scrambled;
[37740]595        void *private_data;
[37742]596        int ccmgr_ready;
[37787]597        // not in used currently
[37757]598        int inuse;
599        int sidblacklisted;
[10366]600};
601
[10347]602struct hdd
603{
604        char* device;
605        int partition;
[24773]606        unsigned long long size;
[10347]607        char* filesystem;
608        char* label;
[10701]609        char* uuid;
[10347]610        char* vendor;
611        char* model;
612        int removable;
[11127]613        int read;
614        int write;
615        int sleeptime;
616        int notchanged;
[10347]617        struct hdd* prev;
618        struct hdd* next;
619};
620
[10129]621struct scaninfo
622{
623        struct dvbdev* fenode;
624        struct transponder* tpnode;
625        struct skin* scanscreen;
626        struct skin* listbox;
[10165]627        int threadend;
[10129]628        int scantype;
[10338]629        int fetype;
[10129]630        int orbitalpos;
631        int timeout;
[10165]632        int onlyfree;
[14050]633        int networkscan;
[10326]634        int clear;
[14543]635        int blindscan;
[10338]636        char* satname;
[10129]637        int tpcount;
[14218]638        int tpmax;
[18239]639        int tpnew;
[36358]640        int tpdel;
[10129]641        int tvcount;
642        int newtvcount;
643        int radiocount;
644        int newradiocount;
645        int datacount;
646        int newdatacount;
[14586]647        int blindcount;
648        int newblindcount;
[20631]649        int changename;
[36369]650        int cleartransponder;
[19506]651        unsigned int blindmax;
[10129]652} scaninfo;
653
[9448]654struct screensaver
655{
656        int type;
657        int speed;
658        int newposx;
659        int newposy;
[13879]660        int flag;
[9448]661        struct skin* screen;
[9449]662        struct skin* screennode;
[9448]663        struct skin* filelist;
664        struct skin* aktnode;
665        struct pic* pic;
666        char* value;
[13861]667        char* path;
[9448]668};
669
[9389]670struct playlist
671{
672        char* file;
673        struct playlist* prev;
674        struct playlist* next;
675};
676
677struct mainplaylist
678{
679        char* name;
680        char* filename;
681        struct playlist* playlist;
682        struct mainplaylist* prev;
683        struct mainplaylist* next;
684};
685
[9347]686struct epgrecord
687{
688        time_t begin;
689        time_t end;
690        int posx;
691        int size;
692        struct epgrecord* prev;
693        struct epgrecord* next;
694};
695
[9230]696struct download
697{
[44850]698        char* link;
[42651]699        char* cmd;
[9230]700        char* host;
701        char* page;
702        int port;
703        char* filename;
[12866]704        char* auth;
[45041]705        char* user;
706        char* pass;
[9230]707        int connfd;
708        int proz;
709        unsigned int maxkb;
710        unsigned int aktkb;
711        int ret;
[19884]712        int timeout;
[20855]713        int flag;
[9230]714};
715
[22565]716struct copyfile
717{
718        char* from;
719        char* to;
720        int proz;
[22708]721        int filecount;
[22710]722        int maxfilecount;
[22565]723        off64_t maxkb;
724        off64_t aktkb;
[22566]725        int stop;
[22565]726        int ret;
727        int flag;
728};
729
[8976]730struct epgscanlist
731{
732        int serviceid;
[18431]733        uint64_t transponderid;
[8981]734        time_t scantime;
[8976]735        struct epgscanlist* prev;
736        struct epgscanlist* next;
[20981]737        char* name;
[8976]738};
739
[8964]740struct rgba
741{
742        char r;
743        char g;
744        char b;
745        char a;
746};
747
748struct subclutentry
749{
750        unsigned char Y, Cr, Cb, T;
751        unsigned char valid;
752};
753
754struct subclut
755{
756        unsigned char clutid;
757        unsigned char clutversionnumber;
758        struct subclutentry entries2bit[4];
759        struct subclutentry entries4bit[16];
760        struct subclutentry entries8bit[256];
761        struct subclut *next;
762};
763
764struct subpagereg
765{
766        int regid;
767        int reghorizontaladdress;
768        int regverticaladdress;
769        int scaleposx, scaleposy;
770        struct subpagereg *next;
771};
772
773struct subregobj
774{
775        int objid;
776        int objtype;
777        int objproviderflag;
778        int objhorizontalpos;
779        int objverticalpos;
780        // not supported right now...
781        int foregroundpixel;
782        int backgroundpixel;
783        struct subregobj *next;
784};
785
786struct subreg
787{
788        int regid;
789        int versionnumber;
790        int height, width;
791        int scaleheight, scalewidth;
792        int depth;
793        unsigned char *buf;
794        struct rgba *palette;
795        int clutid;
796        int committed;
797        struct subregobj *objects;
798        struct subreg *next;
799};
800
801struct subpage
802{
803        int pageid;
804        time_t pagetimeout;
805        int pageversionnumber;
806        int state;
807        int pcssize;
808        struct subpagereg *pageregions;
809        struct subreg *regions;
810        struct subclut *cluts;
811        struct subpage *next;
812};
813
814struct bitstream
815{
816        unsigned char *data;
817        int size;
818        int avail;
819        int consumed;
820};
821
[10165]822//there are a copyrectimer function
823//if you change the struct you must change this funktion
[8536]824struct rectimer
825{
826        char* name;
[11985]827        char* timestamp;
[8536]828        time_t begin;
829        time_t end;
830        int repeate;
831        int afterevent;
[10645]832        char* pincode;
[8536]833        int disabled;
834        int justplay;
[8609]835        char* recpath;
836        int servicetype;
837        char* channellist;
838        int serviceid;
[8663]839        //0 = nothing
840        //1 = running
841        //2 = end
[9107]842        //3 = error
[20107]843        //4 = epgscan timer activ
844        //5 = epgscan timer not activ
[8663]845        int status;
[9107]846        char* errstr;
[8663]847        struct service* servicenode;
[18431]848        uint64_t transponderid;
[8536]849        struct rectimer *prev;
850        struct rectimer *next;
851};
852
[8228]853struct inetwork
854{
[8259]855        char* device;
[8228]856        char* ip;
857        char* netmask;
858        char* mac;
859        char* broadcast;
[17210]860        //0 = static
861        //1 = dhcp
862        //2 = off
863        int type;
[14368]864        int found;
[14499]865        //flag 1 = used in titan
866        int flag;
[8259]867        struct inetwork *prev;
868        struct inetwork *next;
869};
[8228]870
[8028]871struct rcmap
872{
873        char* name;
874        int key;
[8228]875        int newkey;
[8028]876        struct rcmap* next;
877};
878
[7763]879struct splitstr
880{
881        char* part;
882};
883
884struct channelcache
885{
886        int serviceid;
[18431]887        uint64_t transponderid;
[7763]888        struct channel* chnode;
[10287]889        struct channelcache* next;
[7763]890};
891
[14869]892struct transpondercache
893{
[18431]894        uint64_t transponderid;
[14869]895        struct transponder* tpnode;
896        struct transpondercache* next;
897};
898
[7751]899struct filelist
900{
901        int type;
[16542]902        int view;
[7751]903        off64_t size;
904        time_t date;
905};
906
[7497]907struct skin
908{
909        char* name;
[14209]910        unsigned int type;
[7791]911        uint8_t wrap;
912        uint8_t bordersize;
913        uint8_t scrollbar;
914        uint16_t halign;
915        uint16_t valign;
[7816]916        int16_t posx;
917        int16_t posy;
[7791]918        int16_t width;
919        int16_t height;
[7546]920        long bordercol;
921        long deaktivcol;
922        long shadowcol;
[7791]923        uint8_t shadowsize;
924        uint8_t shadowpos;
925        uint8_t fontsize;
[7955]926        uint8_t fontsize2;
[7546]927        long fontcol;
[7778]928        long fontcol2;
[7497]929        char* font;
[7816]930        int16_t zorder;
931        int16_t titlealign;
[7497]932        char* title;
933        char* text;
[7778]934        char* text2;
[7546]935        long bgcol;
[8985]936        long bgcol2;
937        long titlebgcol;
938        long titlebgcol2;
[7546]939        long progresscol;
[15152]940        char* selectpic;
[7497]941        char* pic;
[7816]942        int16_t picwidth;
943        int16_t picheight;
[7982]944        uint16_t hspace;
945        uint16_t vspace;
[13802]946        char* (*skinfunc)(struct skin*, void*, void*);
[7497]947        char* param1;
948        char* param2;
949        char* parent;
950        char* input;
951        char* mask;
[7791]952        uint16_t textposx;
[7956]953        uint16_t textposx2;
[8985]954        int16_t gradient;
955        int16_t titlegradient;
[7957]956        uint8_t transparent;
[7982]957        uint8_t hidden;
958        uint8_t funcrettype;
[9437]959        int8_t charspace;
[9487]960        int8_t bordertype;
[9465]961        int16_t borderradius;
[10668]962        uint16_t bgspace;
[18242]963        uint8_t picquality;
[7497]964
[7957]965        uint8_t titlesize;
[7751]966        struct filelist* filelist;
[7497]967        struct skin* parentpointer;
968        char* ret;
969        char* choiceboxvalue;
970        unsigned int linecount;
971        unsigned int pagecount;
972        unsigned int poscount;
[9823]973        unsigned int gridcol;
[7497]974        int aktpage;
975        int aktline;
[7791]976        uint8_t scrollbarbordersize;
977        uint8_t prozposx;
978        uint8_t prozposy;
979        uint8_t prozwidth;
980        uint8_t prozheight;
981        uint8_t picprozwidth;
982        uint8_t del;
983        uint8_t picprozheight;
[7957]984        int16_t scrollbarheight;
985        int16_t progresssize;
986        int16_t scrollbarwidth;
987        int16_t scrollbarpos;
[7816]988        int16_t rposx;
989        int16_t rposy;
990        int16_t rwidth;
991        int16_t rheight;
992        int16_t rpicwidth;
993        int16_t rpicheight;
994        int16_t iposx;
995        int16_t iposy;
996        int16_t iwidth;
997        int16_t iheight;
[7497]998        char* handle;
[7659]999        char* handle1;
[9350]1000        struct epgrecord* epgrecord;
[7497]1001        char* pluginhandle;
[13140]1002        uint8_t locked;
[20891]1003        uint8_t picmem;
[13802]1004        //bit 0: 1 = node is drawed
[26453]1005        //bit 1: 1 = node is changed
[13802]1006        uint8_t flag;
[26453]1007        int hash;
[7497]1008        struct skin *select;
1009        struct skin *child;
[8282]1010        struct skin *prev;
[7497]1011        struct skin *next;
[26453]1012        struct skin *drawnext;
[28437]1013        // usesavebg=0 disable
1014        // usesavebg=1 save always
1015        // usesavebg=2 save one times then free
1016        // usesavebg=3 dummy for filelist
[28436]1017        int usesavebg;
[28437]1018        // savebg is saved date
[28436]1019        char* savebg;
[35094]1020        // fuer blinken
1021        int nodestyle;
[7497]1022};
1023
[20245]1024struct style
1025{
1026        char* name;
1027        int16_t posx;
1028        int16_t posy;
1029        int16_t width;
1030        int16_t height;
1031        int16_t picwidth;
1032        int16_t picheight;
1033        uint16_t textposx;
1034        uint16_t textposx2;
1035        uint16_t halign;
1036        uint16_t valign;
1037        uint16_t hspace;
1038        uint16_t vspace;
1039        uint16_t bgspace;
1040        int16_t borderradius;
1041        int16_t titlealign;
1042        int16_t zorder;
1043        int16_t gradient;
1044        int16_t titlegradient;
1045        uint8_t picquality;
1046        uint8_t hidden;
1047        uint8_t wrap;
1048        uint8_t scrollbar;
1049        uint8_t bordersize;
1050        int8_t bordertype;
1051        uint8_t shadowsize;
1052        uint8_t shadowpos;
1053        uint8_t fontsize;
1054        uint8_t fontsize2;
1055        int8_t charspace;
1056        uint8_t transparent;
1057        uint8_t prozposx;
1058        uint8_t prozposy;
1059        uint8_t prozwidth;
1060        uint8_t prozheight;
1061        uint8_t picprozwidth;
1062        uint8_t picprozheight;
1063        uint8_t funcrettype;
[20903]1064        uint8_t picmem;
[20245]1065        long bordercol;
1066        long deaktivcol;
1067        long progresscol;
1068        long shadowcol;
1069        long fontcol;
1070        long fontcol2;
1071        long titlebgcol;
1072        long titlebgcol2;
1073        long bgcol;
1074        long bgcol2;
1075        char* font;
1076        char* pic;
1077        char* param1;
1078        char* param2;
1079        char* input;
1080        char* mask;
1081        char* (*skinfunc)(struct skin*, void*, void*);
1082        struct style* next;
1083};
1084
[7728]1085struct epg
1086{
1087        int eventid;
[7750]1088        int version;
[7728]1089        time_t starttime;
1090        time_t endtime;
1091        char* title;
1092        char* subtitle;
1093        char* desc;
[7734]1094        int desclen;
[7750]1095        int desccomplen;
[10314]1096        int parentalrating;
[9339]1097        struct epg* prev;
[7728]1098        struct epg* next;
1099};
1100
[7746]1101struct shutdowntimer
1102{
1103        int active,type; //type: 0=DeepStandby, 1=Standby
1104        long long shutdown_time;
1105};
1106
[7497]1107struct dvbdev
1108{
1109        char* dev;
1110        int fd;
[7791]1111        uint8_t type;
1112        uint8_t adapter;
1113        uint8_t devnr;
1114        uint8_t felock;
[20360]1115        uint8_t deactive;
[31357]1116        uint8_t decoder;
[8952]1117        struct transponder* felasttransponder;
1118        struct transponder* feakttransponder;
[11083]1119        int feunicable;
[14784]1120        unsigned int feloffrequency;
[42191]1121        unsigned int feloffrequency_uni;
[7506]1122        int feaktband;
[9111]1123        int feaktpolarization;
[12693]1124        fe_sec_voltage_t feaktvolt;
1125        fe_sec_tone_mode_t feakttone;
[7728]1126        int fedmxsource;
[11394]1127        char* feaktnr;
[7497]1128        char* feshortname;
[28127]1129        char* fehyprid;
[7497]1130        struct dvb_frontend_info* feinfo;
[10366]1131        struct caslot* caslot;
[7497]1132        struct dvbdev *next;
1133};
1134
[10165]1135//there are a copytransponder and createtransponder function
1136//if you change this struct you must change the function
[7497]1137struct transponder
1138{
[18431]1139        uint64_t id;
[7791]1140        uint8_t fetype;
1141        uint8_t polarization;
1142        uint8_t modulation;
1143        uint8_t fec;
1144        uint8_t pilot;
1145        uint8_t rolloff;
1146        uint8_t inversion;
1147        uint8_t system;
1148        uint8_t flag;
[8262]1149        // 0 = unknown
1150        // 1 = tunable
1151        // 2 = not tunable
1152        uint8_t tunablestatus;
[7791]1153        int orbitalpos;
[7728]1154        unsigned int frequency;
[14784]1155        unsigned int symbolrate;
[14824]1156        int encoding;
[18348]1157        time_t lastepg;
[7497]1158        struct transponder *next;
1159};
1160
[7612]1161struct provider
1162{
1163        int providerid;
1164        char* name;
1165        int flag;
[7652]1166        struct provider *prev;
[7612]1167        struct provider *next;
1168};
1169
[7667]1170struct subtitle
[7623]1171{
[7667]1172        char* name;
[24138]1173        int16_t subtype;
[7791]1174        int16_t pid;
1175        int16_t type;
1176        int16_t id1;
1177        int16_t id2;
[7667]1178        struct subtitle* next;
[7623]1179};
1180
[8878]1181struct esinfo
1182{
1183        int streamtype;
1184        int pid;
1185        struct esinfo* next;
1186};
1187
1188struct cadesc
1189{
[17880]1190        int pid;
[8878]1191        int len;
1192        int systemid;
1193        int reserved;
[17880]1194        int capid;
[8878]1195        char* privat;
1196        struct cadesc* next;
1197};
1198
1199struct pmt
1200{
1201        int programnumber;
1202        int versionnumber;
1203        int currentnextindicator;
1204};
1205
[7667]1206struct audiotrack
1207{
1208        char* name;
[7791]1209        uint8_t audiocodec;
1210        int16_t audiopid;
[20944]1211        int16_t rdspid;
[7667]1212        struct audiotrack* next;
1213};
1214
[11675]1215struct linkedchannel
1216{
[18431]1217        uint64_t transponderid;
[11675]1218        int serviceid;
[21072]1219        time_t starttime;
1220        time_t endtime;
[11675]1221        struct linkedchannel* next;
[11682]1222};
[11675]1223
[10165]1224//there are a createchannel function
1225//if you change this struct you must change the function
[7524]1226struct channel
1227{
1228        char* name;
[18431]1229        uint64_t transponderid;
[7612]1230        int providerid;
1231        int serviceid;
1232        int servicetype;
[7791]1233        uint8_t flag;
1234        uint8_t crypt;
1235        int8_t videocodec;
1236        int8_t audiocodec;
1237        int16_t videopid;
1238        int16_t audiopid;
1239        int16_t ac3audiopid;
1240        int16_t txtpid;
1241        int16_t pcrpid;
[9033]1242        int16_t pmtpid;
[15911]1243        int16_t aitpid;
[8076]1244        uint8_t protect;
[18329]1245        char* hbbtvurl;
[7612]1246        struct transponder *transponder;
1247        struct provider *provider;
[7667]1248        struct audiotrack *audiotrack;
1249        struct subtitle *subtitle;
[11675]1250        struct linkedchannel *linkedchannel;
[8878]1251        struct pmt *pmt;
1252        struct cadesc *cadesc;
1253        struct esinfo *esinfo;
[7728]1254        struct epg *epg;
[7652]1255        struct channel *prev;
[7524]1256        struct channel *next;
1257};
1258
[7906]1259struct sat
[7497]1260{
1261        char* name;
1262        int orbitalpos;
1263        int flag;
[8954]1264        int fetype;
[10338]1265        int scan;
[7652]1266        struct sat *prev;
[7497]1267        struct sat *next;
1268};
1269
[7557]1270struct service
1271{
[7667]1272        int type;
[10849]1273        char* channellist;
[7557]1274        struct dvbdev *fedev;
1275        struct dvbdev *dmxaudiodev;
1276        struct dvbdev *dmxvideodev;
[7728]1277        struct dvbdev *dmxpcrdev;
1278        struct dvbdev *dmxsubtitledev;
[7557]1279        struct dvbdev *audiodev;
1280        struct dvbdev *videodev;
[31367]1281        struct dvbdev *encoderdev;
[7571]1282        struct transponder *transponder;
[7583]1283        struct channel *channel;
[9498]1284        unsigned char *pmtbuf;
1285        int pmtlen;
[9134]1286        int recdmxstart;
[9107]1287        int recdstfd;
1288        int recsrcfd;
[8316]1289        time_t recendtime;
[17345]1290        char* rectimestamp;
[8570]1291        size_t reclastsync;
1292        off64_t rectotal;
1293        int reccount;
[14354]1294        int tssize;
[8227]1295        char* recname;
[20276]1296        unsigned long long lenpts;
1297        unsigned long long startpts;
1298        unsigned long long endpts;
1299        unsigned long long bitrate;
1300        off64_t endoffile;
[7557]1301        struct service *next;
1302};
1303
[11054]1304struct caservice
1305{
1306        struct service* service;
1307        struct channel* channel;
1308        int count;
1309        int camsockfd;
[11163]1310        struct caslot* caslot;
1311        int camanager;
[17925]1312        char* capmt;
1313        int capmtlen;
[17928]1314        int cmdpos;
[11054]1315};
1316
[8285]1317struct stimerthread
1318{
1319        int delay;
[8648]1320        int count;
[8976]1321        int notfirst;
[8285]1322        pthread_attr_t attr;
1323        pthread_t thread;
1324        int status;
1325        int aktion;
[14036]1326        //bit 0: 1 = stop allwas on titan end
1327        int flag;
[8648]1328        void* param1;
1329        void* param2;
[8944]1330        void* (*func)(struct stimerthread*, void*, void*);
[8285]1331        struct stimerthread* next;
1332};
1333
[9683]1334struct hddparm
1335{
1336        char* device;
1337        int read;
1338        int write;
1339        int sleeptime;
1340        int notchanged;
1341};
1342
[19651]1343struct marker
1344{
1345        off64_t pos;
[19657]1346        off64_t time;
1347        char* timetext;
[19651]1348        struct marker* prev;
1349        struct marker* next;
1350};
1351
[7497]1352struct status
1353{
[12226]1354        int longkeycode[MAXLONGKEY];
[11352]1355        //aktivate extra featers
1356        int expertmodus;
[11186]1357        //http user:passwd
1358        char* httpauth;
[10840]1359        //set to 1 if channellist or channelnr open
1360        int channelswitch;
[10578]1361        //deaktivates child protect if greater then akttime
1362        time_t protecttime;
[10315]1363        char* boxtype;
[32316]1364        char* realboxtype;
[9630]1365        pthread_t mainthread;
[9490]1366        //videosize from stream
1367        video_size_t videosize;
[9632]1368        time_t videosizevalid;
[9464]1369        //radius for rounded border
1370        int borderradius;
[9554]1371        int picbordersize;
1372        int titlelinesize;
[8983]1373        //0 border
1374        //1 fullbar
1375        int listboxselecttype;
[8892]1376        //0 camd.socket
1377        //1 pmt.tmp
1378        int pmtmode;
[8748]1379        //timer for del old epg entrys
1380        time_t deloldepg;
[18435]1381        //write epg periodic to medium
1382        time_t writeperiodicepg;
[8976]1383        //0 dektiv
1384        //1 only scan
1385        //2 only whitlist
1386        //3 scan and whitelist
1387        int epglistmode;
[8667]1388        // 1 manual
1389        // 2 from standby
1390        int startmode;
[8645]1391        jmp_buf longjumpbuf;
[8626]1392        pthread_mutex_t drawingmutex;
[8750]1393        pthread_mutex_t rectimermutex;
1394        pthread_mutex_t servicemutex;
1395        pthread_mutex_t epgmutex;
[8954]1396        pthread_mutex_t channelmutex;
[8964]1397        pthread_mutex_t timerthreadmutex;
[9012]1398        pthread_mutex_t audiotrackmutex;
1399        pthread_mutex_t subtitlemutex;
[11676]1400        pthread_mutex_t linkedchannelmutex;
[9659]1401        pthread_mutex_t dmxdevmutex;
[10180]1402        pthread_mutex_t rcmutex;
[10502]1403        pthread_mutex_t queuemutex;
1404        pthread_mutex_t clistmutex;
[10519]1405        pthread_mutex_t hddmutex;
[12308]1406        pthread_mutex_t tsseekmutex;
[14700]1407        pthread_mutex_t accelfbmutex;
[16221]1408        pthread_mutex_t mediadbmutex;
[18571]1409        pthread_mutex_t oldentrymutex;
[18738]1410        pthread_mutex_t newslettermutex;
[19839]1411        pthread_mutex_t tithekmutex;
[20366]1412        pthread_mutex_t inetworkmutex;
[20654]1413        pthread_mutex_t textboxmutex;
[20708]1414        pthread_mutex_t setaktresmutex;
[21386]1415        pthread_mutex_t waitrcmutex;
[10473]1416        // mutex for VFD handling
[8750]1417        pthread_mutex_t vfdmutex;
[32063]1418        // mutex for OLED handling
1419        pthread_mutex_t oledmutex;
[40399]1420                // mutex for cec handling
1421        pthread_mutex_t cecmutex;
[8570]1422        off64_t recsplitsize;
[8546]1423        char* gateway;
1424        char* dnsserver1;
1425        char* dnsserver2;
[8520]1426        int fasttextrender;
[8466]1427        // 1 release all menus
1428        int menurelease;
[8375]1429        int play;
1430        int pause;
[9389]1431        int playspeed;
[19762]1432        int slowspeed;
[30623]1433        int prefillbuffer;
[30921]1434        int playpic;
[44115]1435        int singlepicfd;
1436        int singlepicthreadstatus;
[30665]1437#ifdef EPLAYER4
[38153]1438        int prefillbuffercount;
[30593]1439        int bufferpercent;
[31903]1440        int cleaninfobar;
[30933]1441//      gint avgInRate;
1442//      gint avgOutRate;
1443//      gint64 bufferingLeft;
1444        gint64 pts;
[30604]1445#endif
[9384]1446        int random;
[9478]1447        int repeat;
[8318]1448        int epgdays;
1449        int spinnertime;
1450        int spinnerspeed;
1451        int hangtime;
[8285]1452        int timeupdatecount;
[7659]1453        int markmodus;
[7765]1454        // 1 from main prog
1455        // 2 from a thread
[7652]1456        int standby;
[7639]1457        char* tmp;
[8646]1458        // rc filedescriptor
[7532]1459        int fdrc;
[15746]1460        // rc filedescriptor for tuxtxt
1461        int fdrctxt;
[7497]1462        int writeconfig;
1463        int writeownconfig;
1464        int writercconfig;
[9046]1465        int writeskinconfig;
[7497]1466        int writechannel;
1467        int writetransponder;
[7612]1468        int writeprovider;
[7571]1469        int writemainbouquet;
1470        int writebouquet;
[9389]1471        int writemainplaylist;
1472        int writeplaylist;
[7659]1473        int writesat;
[8536]1474        int writerectimer;
[8976]1475        int writeepgscanlist;
[15781]1476        int writemostzap;
[16539]1477        int writemediadb;
[20233]1478        int writelastsubtitle;
[22297]1479        int writechannelslot;
[7765]1480        // 1 mute is aktiv
[7497]1481        int mute;
[7765]1482        // 1 spinner is aktiv
[7497]1483        int spinner;
[7765]1484        // 1 infobar is aktiv
[9313]1485        // 2 infobar is aktiv (with wait befor show)
1486        // 3 infobar is aktiv (no autohide)
[7497]1487        int infobar;
[9339]1488        // with infobar to display
1489        int infobarnr;
[7497]1490        // 0 is for mute screen
[8748]1491        struct skin *drawallways[1];
1492        char* drawallwaysbg[1];
[7497]1493        int usedirectfb;
[7765]1494        // count how long last rcwait (shows spinner if to long)
[7497]1495        time_t sec;
[7765]1496        // if set to a value != 0, rcwait returns this number
[7639]1497        int rckey;
[7497]1498        struct skin* skinerr;
[8285]1499        pthread_attr_t timerthreadattr;
1500        pthread_t timerthread;
1501        int timerthreadstatus;
1502        int timerthreadaktion;
[7670]1503        pthread_attr_t subthreadattr;
1504        pthread_t subthread;
[7694]1505        int subthreadstatus;
[7728]1506        int subthreadaktion;
[7694]1507        int subthreadpid;
[24612]1508        int subthreadid1;
[24138]1509        int subthreadid2;
[8976]1510        // epg thread pointer
1511        struct stimerthread* epgthread;
[9754]1512        // epgscanlist thread pointer
1513        struct stimerthread* epgscanlistthread;
[9174]1514        // httpd thread pointer
1515        struct stimerthread* httpthread;
[14636]1516        // rguid thread pointer
[14642]1517        struct stimerthread* rguithread;
[16221]1518        // mediadb thread pointer
[16223]1519        struct stimerthread* mediadbthread;
[19446]1520        // newsletter thread pointer
1521        struct stimerthread* newsletterthread;
[16998]1522        // thumb thread pointer
[16683]1523        struct stimerthread* thumbthread;
[16998]1524        // rectimer thread
1525        struct stimerthread* rectimerthread;
[44115]1526        // singlepic thread
1527        struct stimerthread* singlepicthread;
[14636]1528        // rguid sock filedescriptor for rguid
1529        int rguidfd;
[7557]1530        struct service* aktservice;
[7606]1531        struct service* lastservice;
[20871]1532        struct service* pipservice;
[7734]1533        struct channel* markedchannel;
[13284]1534        //if we are in a epg screen, this is the showen channel
1535        struct channel* epgchannel;
[7583]1536        char* configfile;
[7765]1537        // for bouquet channel numbering
[7670]1538        int bouquetnr[MAXSERVICETYPE];
1539        int servicetype;
[7746]1540        struct shutdowntimer *sd_timer;
[7765]1541        // akt pos in channel cache
[7763]1542        int channelcachepos;
[7791]1543        // aktivate/deaktivate auto updatevfd
1544        int updatevfd;
[8226]1545        // count for recording
1546        int recording;
[8964]1547        // count for streaming
1548        int streaming;
[34811]1549        // pvr allowed = 1, disable = 0
1550        int pvr;
[20414]1551        // timeshift running = 1, ending = 2
[9630]1552        int timeshift;
[20407]1553        // 0 = normal, 1 = permanent timeshift
1554        int timeshifttype;
[20477]1555        // position in timeshiftfile to seek
1556        off64_t timeshiftpos;
[20505]1557        // ask if timeshift is running and switch channel
1558        int asktimeshift;
[9713]1559        // ts playing running = 1
1560        int playing;
[8247]1561        // if set to a skin (screenpointer) only this screen has rc
1562        struct skin* rcowner;
[22985]1563        struct skin* rcstandby;
[9557]1564        // timerstuktur fuer autores
1565        struct stimerthread* restimer;
[13536]1566        // spindown USB/HDD
[9732]1567        struct hddparm hdd[3];
[11127]1568        struct stimerthread* addhddall;
[13536]1569        // save old rotor position
[12591]1570        int rotoroldorbitalpos;
[13035]1571        // security check
1572        int security;
[13536]1573        // set to 1 if tvpic size is changed
1574        int tvpic;
[13635]1575        // timestamp for rc action
1576        time_t lastrcaction;
[13802]1577        // show timeline in channellist for each channel
1578        int showchanneltimeline;
[13961]1579        // see player.h for details
1580        int playercan;
[13963]1581                //Code von infobar.h aktiv = 1
1582        int infobaraktiv;
1583        //Name der Datei die abgespielt wird
1584        char* playfile;
[13983]1585        //Code MC aktiv = 1
1586        int mcaktiv;
[14083]1587        //greater 0 aktivate screen animation
1588        int screenanim;
[14225]1589        int screenanimspeed;
[14186]1590        //for auto increase audio vol
1591        int volautochange;
1592        int volautochangevalue;
[14263]1593        //for powerofftimer
1594        time_t fixpowerofftime;
[14705]1595        //for write FB in File
1596        int write_png;
1597        int write_jpg;
[15006]1598        //holds oversize value for blitter
1599        int leftoffset;
1600        int rightoffset;
1601        int topoffset;
1602        int bottomoffset;
[15271]1603        //background picture for all screens
1604        char* bgpic;
[15580]1605        //time for next picmem timeout check
1606        time_t picmemtimeout;
[20873]1607        time_t defpicmemtimeout;
[15580]1608        //show not tunable channel hidden (0)) or deaktive (1) in channellist
1609        int channellistview;
[15724]1610        //for blockmove in channellist
1611        int moveblockcount;
[16069]1612        //name ob file who played from webig
1613        char* webplayfile;
[16273]1614        //status of mediadbthread
1615        int mediadbthreadstatus;
[19017]1616        //for save mediadb in scan
[16796]1617        time_t mediadbsavetime;
[17221]1618        //colors / pic for selection
1619        long markcol;
1620        long filelistselectcol;
1621        long listboxselectcol;
1622        char* selectpic;
[17902]1623        //check if cam can decrypt channel
1624        int checkcamdecrypt;
[18509]1625        //don't send privat part of cadescriptor in capmt
1626        int caskipprivat;
[18666]1627        //send all caids or only caids cam can
1628        int casendallcaids;
[18789]1629        //show hidden files in filelist
1630        int showhiddenfiles;
[18973]1631        //mediadb
1632        int mediadbfiles;
[19425]1633        //show infobar on program change
1634        int infobarprogram;
[19482]1635        //for auto increase audio vol (mute)
1636        int volmute;
[19640]1637        int secondzap;
[19651]1638        //pointer to marker for recordings
1639        struct marker* playmarker;
[20233]1640        int autosubtitle;
[20303]1641        //save timeshift start time
1642        time_t timeshiftstart;
[20669]1643        int crosscontrol;
[20708]1644        int autochangechannelname;
[20784]1645        //tuxtext is running
1646        int tuxtxt;
[20822]1647        //on some fat32 hdd it takes very long to get free size
1648        int showrecfreesize;
[22885]1649        int firstunicablewait;
[23779]1650        //path for imdbfolder
1651        char* imdbfolderpath;
[23781]1652        int virtualzap;
[23983]1653        int fontsizeadjust;
[24696]1654        //count for drawing screen
[24697]1655        unsigned int drawscreencount;
[25645]1656        int autoseek;
[28462]1657        //skip all rc input events older than this value in millisec
1658        int rcskipms;
[30557]1659        //Workaround da ansonsten DVR4 nicht funktioniert (Treiberproblem)
1660        int setdvr0;
[30771]1661#ifdef MIPSEL
1662        //cec mipsel
1663        int cec_fixedAddress;
1664        int hdmiFd;
[31857]1665        int webencode;
[31023]1666#endif
[31021]1667        //pip Einstellungen
1668        int pipzap;
[32072]1669        // guest
1670        int whilecount;
1671        int sleepcount;
[32348]1672        int stats;
[32072]1673        char* url;
[34462]1674        //externer plugin Aufruf
1675        char* extplugin;
[35085]1676        //node oled blinken
1677        int skinblink;
[36554]1678        //BCM accel interface
1679        int bcm;
[36614]1680        //Volume
1681        int volume;
[37440]1682        int screenshot;
[37766]1683        // cacc
[37733]1684        int certchecked;
1685        int certok;
[37766]1686        int liveslot;
[38592]1687        // dynamic default skin infobar
1688        int getepgaktstart;
1689        int getepgaktend;
1690        int getepgakttitle;
1691        int getepgakttimeremaining;
1692        int getepgnextstart;
1693        int getepgnextend;
1694        int getepgnexttitle;
1695        int getepgnexttimeremaining;
[39278]1696        // downmix switch in audio menu (audiotrack.h)
1697        int downmix;
[39797]1698        // channels for recording
1699        struct channel* recchnode[9];
[39988]1700        // frontdev filedescriptor
1701        int fdrc1;
[40739]1702        // Anzah VideoDevs
1703        int videodevs;
[7497]1704} status;
1705
1706struct fb
1707{
[7694]1708        int dev;
[7497]1709        char *name;
1710        int fd;
1711        unsigned char *fb;
[9527]1712        unsigned long *fblong;
[7497]1713        int width;
1714        int height;
[8590]1715        int pitch;
[7497]1716        unsigned long fixfbsize;
1717        unsigned long varfbsize;
1718        int colbytes;
[36560]1719        unsigned long data_phys;
[7497]1720        struct fb *next;
1721};
1722
[7906]1723struct rc
[7497]1724{
1725        int key;
[16574]1726        void (*rcfunc)(struct skin*, struct skin*, int screencalc, int filelistview, int flag);
[7497]1727        struct skin *screen;
1728        struct skin *screennode;
1729        struct skin *owner;
1730        struct rc *next;
1731};
1732
[9044]1733struct clist
[7497]1734{
1735        char *key;
1736        char *value;
1737        char *def;
1738        char *tmp;
[9044]1739        struct clist *next;
[7497]1740};
1741
[7571]1742struct bouquet
1743{
[7639]1744        int nr;
[7571]1745        int serviceid;
[18431]1746        uint64_t transponderid;
[7571]1747        struct channel *channel;
[7652]1748        struct bouquet *prev;
[7571]1749        struct bouquet *next;
1750};
1751
[22292]1752struct channelslot
1753{
1754        int slot;
1755        int serviceid;
1756        uint64_t transponderid;
1757        struct channelslot *next;
1758};
1759
[7571]1760struct mainbouquet
1761{
1762        char *name;
1763        int type;
1764        char *filename;
1765        struct bouquet *bouquet;
[7652]1766        struct mainbouquet *prev;
[7571]1767        struct mainbouquet *next;
1768};
1769
[7664]1770struct pic
1771{
1772        char* name;
1773        unsigned char* picbuf;
[9905]1774        // < 0 when picbuf is normal mem (hw jpg)
1775        int memfd;
[7664]1776        unsigned long width;
1777        unsigned long height;
1778        unsigned long rowbytes;
1779        int channels;
[15463]1780  int timeout;
[15464]1781  time_t lastaccess;
[7664]1782        int del;
1783        struct pic* next;
1784};
1785
[7497]1786struct font
1787{
1788        char *name;
1789        FT_Error error;
1790        FTC_Manager manager;
1791        FTC_SBitCache cache;
1792        FTC_ImageTypeRec desc;
1793        FT_Face face;
1794        FT_UInt prev_glyphindex;
1795        FT_Bool use_kerning;
1796        struct font *next;
1797};
1798
[14732]1799//structure for write fb to File
1800struct writeFBfile
1801{
1802        unsigned char* ActBuf;
1803        unsigned char* buf1;
1804        unsigned char* buf2;
1805} writeFBfile;
[7734]1806
[7728]1807struct eit
1808{
1809        u_char table_id                               /*:8*/;
1810        u_char section_length_hi                      :4;
1811        u_char                                        :3;
1812        u_char section_syntax_indicator               :1;
1813        u_char section_length_lo                      /*:8*/;
1814        u_char service_id_hi                          /*:8*/;
1815        u_char service_id_lo                          /*:8*/;
1816        u_char current_next_indicator                 :1;
1817        u_char version_number                         :5;
1818        u_char                                        :2;
1819        u_char section_number                         /*:8*/;
1820        u_char last_section_number                    /*:8*/;
1821        u_char transport_stream_id_hi                 /*:8*/;
1822        u_char transport_stream_id_lo                 /*:8*/;
1823        u_char original_network_id_hi                 /*:8*/;
1824        u_char original_network_id_lo                 /*:8*/;
1825        u_char segment_last_section_number            /*:8*/;
1826        u_char segment_last_table_id                  /*:8*/;
1827        u_char data[]; /* struct eitevent */
1828};
1829#define EITLEN sizeof(struct eit)
[7734]1830#define GETEITSECLEN(x) HILO(((struct eit*)(x))->section_length)
[7728]1831
1832struct eitevent
1833{
1834        u_char event_id_hi                            /*:8*/;
1835        u_char event_id_lo                            /*:8*/;
1836        u_char mjd_hi                                 /*:8*/;
1837        u_char mjd_lo                                 /*:8*/;
1838        u_char start_time_h                           /*:8*/;
1839        u_char start_time_m                           /*:8*/;
1840        u_char start_time_s                           /*:8*/;
1841        u_char duration_h                             /*:8*/;
1842        u_char duration_m                             /*:8*/;
1843        u_char duration_s                             /*:8*/;
1844        u_char descriptors_loop_length_hi             :4;
1845        u_char free_ca_mode                           :1;
1846        u_char running_status                         :3;
1847        u_char descriptors_loop_length_lo             /*:8*/;
1848        u_char data[];
1849};
1850#define EITEVENTLEN sizeof(struct eitevent)
[7734]1851#define GETEITDESCLEN(x) HILO(((struct eitevent *)x)->descriptors_loop_length)
[7728]1852
1853struct eitshortevent
1854{
1855        u_char descriptor_tag                         /*:8*/;
1856        u_char descriptor_length                      /*:8*/;
1857        u_char lang_code1                             /*:8*/;
1858        u_char lang_code2                             /*:8*/;
1859        u_char lang_code3                             /*:8*/;
1860        u_char event_name_length                      /*:8*/;
1861        u_char data[];
1862};
1863#define EITSHORTEVENTLEN sizeof(struct eitshortevent)
1864
1865struct eitlongevent
1866{
1867        u_char descriptor_tag                         /*:8*/;
1868        u_char descriptor_length                      /*:8*/;
1869        u_char last_descriptor_number                 :4;
1870        u_char descriptor_number                      :4;
1871        u_char lang_code1                             /*:8*/;
1872        u_char lang_code2                             /*:8*/;
1873        u_char lang_code3                             /*:8*/;
1874        u_char length_of_items                        /*:8*/;
1875        u_char data[]; /* struct eitlongeventitem */
1876};
1877#define EITLONGEVENTLEN sizeof(struct eitlongevent)
1878
1879struct eitlongeventitem
1880{
1881        u_char item_description_length               /*:8*/;
1882        u_char data[];
1883};
1884#define EITLONGEVENTITEMLEN sizeof(struct eitlongeventitem)
1885
[9572]1886struct eitlinkage
1887{
[19065]1888        u_char descriptor_tag                 /*:8*/;
1889        u_char descriptor_length              /*:8*/;
1890        u_char transport_stream_id_hi         /*:8*/;
1891        u_char transport_stream_id_lo         /*:8*/;
1892        u_char original_network_id_hi         /*:8*/;
1893        u_char original_network_id_lo         /*:8*/;
1894        u_char service_id_hi                  /*:8*/;
1895        u_char service_id_lo                  /*:8*/;
1896        u_char linkage_type                   /*:8*/;
[9572]1897};
1898#define EITLLINKAGELEN sizeof(struct eitlinkage)
1899
[10314]1900struct parentalrating
1901{
1902        u_char descriptor_tag                 /*:8*/;
1903        u_char descriptor_length              /*:8*/;
1904        u_char data[]; //struct parental_rating_item
1905};
1906#define PARENTALRATINGLEN sizeof(struct parentalrating)
1907
1908struct parentalratingitem
1909{
[13332]1910        u_char lang_code1                    /*:8*/;
1911        u_char lang_code2                    /*:8*/;
1912        u_char lang_code3                    /*:8*/;
1913        u_char rating                        /*:8*/;
[10314]1914};
1915#define PARENTALRATINGITEMLEN sizeof(struct parentalratingitem)
1916
[13332]1917struct rst //table id 0x71
1918{
1919        u_char table_id                     /*:8*/;
1920        u_char section_syntax_indicator         :1;
1921        u_char reserved_1                       :1;
1922        u_char reserved_2                       :2;
1923        u_int section_length                   :12;
1924};
1925#define RSTLEN sizeof(struct rst)
1926
1927struct rstitem
1928{
1929        u_char transponder_stream_id_hi     /*:8*/;
1930        u_char transponder_stream_id_lo     /*:8*/;
1931        u_char original_network_id_hi       /*:8*/;
1932        u_char original_network_id_lo       /*:8*/;
1933        u_char service_id_hi                /*:8*/;
1934        u_char service_id_lo                /*:8*/;
1935        u_char event_id_hi                  /*:8*/;
1936        u_char event_id_lo                  /*:8*/;
1937        u_char reserved_1                       :5;
1938        u_char running_status                   :3;
1939};
1940#define RSTITEMLEN sizeof(struct rstitem)
1941
[19065]1942struct mhwchannel
1943{
1944        u_char  network_id_hi;
1945        u_char  network_id_lo;
1946        u_char  transponder_id_hi;
1947        u_char  transponder_id_lo;
1948        u_char  channel_id_hi;
1949        u_char  channel_id_lo;
1950        u_char  name[16];
1951};
1952#define MHWCHANNELLEN sizeof(struct mhwchannel)
[16556]1953
[19065]1954struct mhwtitle
1955{
1956        u_char table_id                       :8;
1957        u_char section_length_hi              :4;
1958        u_char                                :2;
1959        u_char dummy                          :1;
1960        u_char section_syntax_indicator       :1;
1961        u_char section_length_lo              :8;
1962        u_char channel_id                     :8;
1963        u_char theme_id                       :8;
1964        u_char hours                                  :5;
1965        u_char day                            :3;
1966        u_char summary_available              :1;
1967        u_char                                      :1;
1968        u_char minutes                        :6;
1969        u_char                                :8;
1970        u_char                                :8;
1971        u_char duration_hi                    :8;
1972        u_char duration_lo                    :8;
1973        u_char title                          [23];
1974        u_char ppv_id_hi                      :8;
1975        u_char ppv_id_mh                      :8;
1976        u_char ppv_id_ml                      :8;
1977        u_char ppv_id_lo                      :8;
1978        u_char program_id_hi                  :8;
1979        u_char program_id_mh                  :8;
1980        u_char program_id_ml                  :8;
1981        u_char program_id_lo                  :8;
1982        u_char                                :8;
1983        u_char                                :8;
1984        u_char                                :8;
1985        u_char                                :8;
1986};
1987#define MHWTITLELEN sizeof(struct mhwtitle)
1988
1989struct mhwsummary
1990{
1991        u_char table_id                       :8;
1992        u_char section_length_hi              :4;
1993        u_char                                :2;
1994        u_char dummy                          :1;
1995        u_char section_syntax_indicator       :1;
1996        u_char section_length_lo              :8;
1997        u_char program_id_hi                  :8;
1998        u_char program_id_mh                  :8;
1999        u_char program_id_ml                  :8;
2000        u_char program_id_lo                  :8;
2001        u_char                                :8;
2002        u_char                                :8;
2003        u_char                                :8;
2004        u_char nb_replays                     :8;
2005};
2006#define MHWSUMMARYLEN sizeof(struct mhwsummary)
2007
[19249]2008struct mhw2channel
2009{
2010        u_char network_id_hi;
2011        u_char network_id_lo;
2012        u_char transponder_id_hi;
2013        u_char transponder_id_lo;
2014        u_char channel_id_hi;
2015        u_char channel_id_lo;
[19275]2016        u_char                                :8;
2017        u_char                                :8;
[19249]2018};
2019
[19309]2020struct extepgcache
[19269]2021{
2022        long id;
2023        struct epg* epgnode;
[19309]2024        struct extepgcache* next;
[19269]2025};
2026
[19309]2027struct extepgchannel
2028{
2029        long id;
2030        int serviceid;
2031        uint64_t transponderid;
2032        struct extepgchannel* next;
2033};
2034
2035struct extepgconfig
2036{
2037        uint64_t transponderid;
2038        int type;
2039        char* file;
2040        int channelpid;
[19339]2041        int titlepid[8];
2042        int summarypid[8];
[19309]2043        struct extepgconfig* next;
2044};
2045
[16504]2046struct blacklist
2047{
2048  char* file;
2049  struct splitstr* splitstr;
2050  int count;
2051};
[16556]2052
[22527]2053typedef struct sci_modes
2054{
2055        int emv2000;
2056        int dma;
2057        int man_act;
2058        int rw_mode;
2059} scimodes;
2060
2061typedef struct sci_parameters
2062{
2063        u_char T;
2064        unsigned long fs;
2065        unsigned long ETU;
2066        unsigned long WWT;
2067        unsigned long CWT;
2068        unsigned long BWT;
2069        unsigned long EGT;
2070        unsigned long clock_stop_polarity;
2071        u_char check;
2072        u_char P;
2073        u_char I;
2074        u_char U;
2075} sciparameters;
2076
[30310]2077struct update
2078{
2079        char* auth;
2080        char* type;
2081        char* skinname;
2082        char* filemask;
2083        char* filepath;
2084        int imgtype;
2085};
2086
[41669]2087struct musicdat
2088{
[41794]2089        char* dummy;
[41669]2090        char* thumb;
2091        char* title;
2092        char* album;
2093        char* realname;
2094        char* actors;
2095        char* genre;
2096        char* year;
[41685]2097        int   act;
[41669]2098} musicdat;
2099
[30678]2100#ifdef EPLAYER4
2101typedef enum { stUnknown, stPlainText, stSSA, stASS, stSRT, stVOB, stPGS } subtype_t;
2102typedef enum {atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC, atWMA} audiotype_t;
[30714]2103typedef struct _CustomData {
2104//typedef struct CustomData {
[30716]2105  GstElement *playbin2;   /* Our one and only element */
[30698]2106   
2107  gint n_video;          /* Number of embedded video streams */
2108  gint n_audio;          /* Number of embedded audio streams */
2109  gint n_text;           /* Number of embedded subtitle streams */
2110   
2111  gint current_video;    /* Currently playing video stream */
2112  gint current_audio;    /* Currently playing audio stream */
2113  gint current_text;     /* Currently playing subtitle stream */
2114
[30678]2115  gboolean is_live;
2116  GstElement *pipeline;
2117  GMainLoop *loop;
2118} CustomData;
[30698]2119
2120typedef enum {
2121        GST_PLAY_FLAG_VIDEO = (1 << 0),
2122        GST_PLAY_FLAG_AUDIO = (1 << 1),
2123        GST_PLAY_FLAG_TEXT = (1 << 2),
2124        GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 3)
2125} GstPlayFlags;
[7497]2126#endif
[30678]2127
[30771]2128#ifdef MIPSEL
2129//fuer cec Mipsel
[39259]2130
2131#ifdef DREAMBOX
[30771]2132struct cec_message
2133{
[39259]2134        unsigned char address;
2135        unsigned char data[16];
2136        unsigned char length;
2137        unsigned char flag;
2138}__attribute__((packed));
2139struct cec_rx_message
2140{
2141        unsigned char address;
2142        unsigned char destination;
2143        unsigned char data[16];
2144        unsigned char length;
2145}__attribute__((packed));
2146
2147
2148#else
2149struct cec_message
2150{
[30771]2151unsigned char address;
2152unsigned char length;
2153unsigned char data[256];
2154}__attribute__((packed));
[40418]2155struct cec_rx_message
2156{
2157        unsigned char address;
2158        unsigned char destination;
2159        unsigned char data[16];
2160        unsigned char length;
2161}__attribute__((packed));
[39259]2162#endif
[30771]2163
2164unsigned char cec_physicalAddress[2];
2165unsigned char cec_logicalAddress;
2166unsigned char cec_deviceType;
[31357]2167
[30678]2168#endif
[30771]2169
[37766]2170// cacc
[37786]2171/* CI+ certificates */
2172
2173struct cert_ctx {
2174        X509_STORE *store;
2175
2176        /* Host */
2177        X509 *cust_cert;
2178        X509 *device_cert;
2179
2180        /* Module */
2181        X509 *ci_cust_cert;
2182        X509 *ci_device_cert;
2183};
2184
[39294]2185#ifdef MIPSEL
[37769]2186enum ca_descr_data_type {
2187        CA_DATA_IV,
2188        CA_DATA_KEY,
2189};
2190
2191enum ca_descr_parity {
2192        CA_PARITY_EVEN,
2193        CA_PARITY_ODD,
2194};
2195
2196struct ca_descr_data {
2197        unsigned int index;
2198        enum ca_descr_parity parity;
2199        enum ca_descr_data_type data_type;
2200        unsigned int length;
2201        unsigned char *data;
2202};
2203
2204#endif
2205
[39294]2206#ifdef SH4NEW
2207enum ca_descr_data_type {
2208        CA_DATA_IV,
2209        CA_DATA_KEY,
2210};
2211
2212enum ca_descr_parity {
2213        CA_PARITY_EVEN,
2214        CA_PARITY_ODD,
2215};
2216
2217struct ca_descr_data {
2218        unsigned int index;
2219        enum ca_descr_parity parity;
2220        enum ca_descr_data_type data_type;
2221        unsigned int length;
2222        unsigned char *data;
2223};
2224
2225#endif
2226
[42624]2227#ifdef SIMULATE
2228enum ca_descr_data_type {
2229        CA_DATA_IV,
2230        CA_DATA_KEY,
2231};
2232
2233enum ca_descr_parity {
2234        CA_PARITY_EVEN,
2235        CA_PARITY_ODD,
2236};
2237
2238struct ca_descr_data {
2239        unsigned int index;
2240        enum ca_descr_parity parity;
2241        enum ca_descr_data_type data_type;
2242        unsigned int length;
2243        unsigned char *data;
2244};
2245
2246#endif
2247
[37719]2248struct aes_xcbc_mac_ctx {
2249        uint8_t K[3][16];
2250        uint8_t IV[16];
2251        AES_KEY key;
2252        int buflen;
2253};
2254
[37769]2255uint32_t datatype_sizes[MAX_ELEMENTS] = {
2256        0, 50, 0, 0, 0, 8, 8, 0,
2257        0, 0, 0, 0, 32, 256, 256, 0,
2258        0, 256, 256, 32, 8, 8, 32, 32,
2259        0, 8, 2, 32, 1, 32, 1, 0,
2260        32
2261};
2262
2263struct element {
2264        uint8_t *data;
2265        uint32_t size;
2266        /* buffer valid */
2267        int valid;
2268};
2269
2270struct cc_ctrl_data {
2271        /* parent */
2272        struct caslot* slot;
2273
2274        /* ci+ credentials */
2275        struct element elements[MAX_ELEMENTS];
2276
2277        /* DHSK */
2278        uint8_t dhsk[256];
2279
2280        /* KS_host */
2281        uint8_t ks_host[32];
2282
2283        /* derived keys */
2284        uint8_t sek[16];
2285        uint8_t sak[16];
2286
2287        /* AKH checks - module performs 5 tries to get correct AKH */
2288        unsigned int akh_index;
2289
2290        /* authentication data */
2291        uint8_t dh_exp[256];
2292
2293        /* certificates */
2294        struct cert_ctx *cert_ctx;
2295
2296        /* private key of device-cert */
2297        RSA *rsa_device_key;
2298};
2299
[30771]2300#endif
Note: See TracBrowser for help on using the repository browser.