source: titan/titan/struct.h @ 39899

Last change on this file since 39899 was 39899, checked in by gost, 7 years ago

[titan] add new audio codec

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