]> git.vomp.tv Git - vompclient.git/blob - defines.h
Split OsdWin into OsdWinPixel and WindowsOsd as preparation for Vector
[vompclient.git] / defines.h
1 /*
2     Copyright 2004-2005 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20
21 #ifndef DEFINES_H
22 #define DEFINES_H
23
24 typedef unsigned char UCHAR;
25 typedef unsigned short USHORT;
26 typedef unsigned int UINT;
27 typedef unsigned long ULONG;
28 typedef unsigned long long ULLONG;
29
30 #define OPTIONTYPE_TEXT 1
31 #define OPTIONTYPE_INT 2
32
33 #define BENCHMARK_FPS
34
35 //ULLONG htonll(ULLONG a);
36 //ULLONG ntohll(ULLONG a);
37 void MILLISLEEP(ULONG a);
38 long long getTimeMS();
39
40 int getClockRealTime(struct timespec *tp);
41
42
43 #ifdef WIN32
44
45   #define Surface_TYPE SurfaceWin
46   #define Thread_TYPE ThreadWin
47   #define ThreadID_TYPE unsigned int
48   #define Osd_TYPE OsdWinPixel
49
50   #define RemoteStartDev ""//No devices passed
51
52   #define SNPRINTF _snprintf
53   #define VSNPRINTF _vsnprintf
54   #define STRCASECMP _stricmp
55   #define STRCASESTR StrStrI
56 /*  #define STRTOULL _strtoui64 */
57   #define STRTOUL strtoul
58   #define STRTOKR strtok_s
59
60   #define CLOSESOCKET closesocket
61   #define DEFAULT_TCP_WINDOWSIZE 2048
62   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
63   #define PLAYER_MAX_STREAMING_BUFFERS 120 // for video in uints of 50000 KB
64
65   #define VOMP_HAS_EXIT
66
67 #else
68
69   int max(int, int);
70   int min(UINT, int);
71 /*#ifdef _MIPS_ARCH
72   #define Surface_TYPE SurfaceDirectFB
73 #else
74   #define Surface_TYPE SurfaceMVP
75 #endif*/
76 #ifdef __ANDROID__
77   #define Thread_TYPE ThreadPAndroid
78
79 #else
80   #define Thread_TYPE ThreadP
81
82 #endif
83   #include <pthread.h>
84   #define ThreadID_TYPE pthread_t
85
86   #define SNPRINTF snprintf
87   #define VSNPRINTF vsnprintf
88   #define STRCASECMP strcasecmp
89   #define STRCASESTR strcasestr
90   #define STRTOUL strtoul
91   #define STRTOKR strtok_r
92   #define CLOSESOCKET close
93
94 // add here defines for plattform specific objects
95 #ifdef VOMP_PLATTFORM_RASPBERRY
96    #define Remote_TYPE RemoteLinux  // Generic Remote under Linux (Konsole!, not X) will support in the end:
97    #define RemoteStartDev ""//No devices passed
98
99   // Keyboard
100   // remotes under /dev/event
101   // HDMI CEC
102   //lirc?
103    #define Mtd_TYPE MtdRaspberry  //this is device dependent
104    #define Led_TYPE LedRaspberry  //this is device dependent
105    #define Osd_TYPE OsdOpenVG   // This OpenGL ES 2.0, in the moment only for raspberry, but might be splitted for other devices
106    #define OsdStartDev ""
107    #define Audio_TYPE AudioOMX   // This is Audio based on OpenMax and libav for decoding
108    #define Video_TYPE VideoOMX   // This is Video based on OpenMax
109
110
111
112    #define VPE_OMX_SUPPORT // Activate support for hardware codec using openmax il
113    #define VPE_OMX_H264_DECODER "OMX.broadcom.video_decode"
114    #define VPE_OMX_MPEG2_DECODER "OMX.broadcom.video_decode"
115    #define VPE_OMX_VIDEO_SCHED "OMX.broadcom.video_scheduler"
116    #define VPE_OMX_VIDEO_REND "OMX.broadcom.video_render"
117    #define VPE_OMX_VIDEO_DEINTERLACE "OMX.broadcom.image_fx"
118    #define VPE_OMX_CLOCK "OMX.broadcom.clock"
119    #define VPE_OMX_AUDIO_DECODER "OMX.broadcom.audio_decode"
120    #define VPE_OMX_AUDIO_REND "OMX.broadcom.audio_render"
121    #define VPE_OMX_IMAGE_DECODER "OMX.broadcom.image_decode"
122    #define VPE_OMX_EGL_REND "OMX.broadcom.egl_render"
123
124    //#define  VPE_LIBAV_SUPPORT
125   // #define  VPE_LIBAV_MPEG2_TRANSCODING
126
127   #define DEFAULT_TCP_WINDOWSIZE 0
128   #define DEFAULT_TCP_WINDOWSIZENR 0  /*=2048*/
129   #define PLAYER_MAX_STREAMING_BUFFERS 120 // for video in uints of 50000 KB
130   #define TV_NORM_SWITCHABLE
131   #define HANDLE_VT_SWITCHING
132   #define GRADIENT_DRAWING
133   #define ADVANCED_MENUES // This is for special HD versions of our menus
134
135   #define PICTURE_DECODER_MAGICK
136   #define PICTURE_DECODER_OMX
137
138   #define VOMP_LINUX_CLOCK  CLOCK_MONOTONIC
139
140 #endif
141 #ifdef VOMP_PLATTFORM_MVP
142   #define Remote_TYPE RemoteMVP
143   #define RemoteStartDev "/dev/rawir"
144   #define Mtd_TYPE MtdMVP
145   #define Led_TYPE LedMVP
146   #define Osd_TYPE OsdMVP
147   #define OsdStartDev "/dev/stbgfx"
148   #define Audio_TYPE AudioMVP
149   #define Video_TYPE VideoMVP
150   #define Surface_TYPE SurfaceMVP //deprecated
151   #define DEFAULT_TCP_WINDOWSIZE 2048  /*=2048*/
152   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
153   #define PLAYER_MAX_STREAMING_BUFFERS 11 // for video in uints of 50000 KB
154   #define PAL_WSS
155   #define MVP_REMOTE_TYPES
156
157   #define VOMP_MEDIAPLAYER
158   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME
159 #endif
160
161 #ifdef VOMP_PLATTFORM_NMT // This was the attempt to port vomp to nmt, it failed but maybe the code is useful at some time
162   #define Remote_TYPE RemoteLirc
163   #define RemoteStartDev "/dev/lircd"
164   #define Mtd_TYPE MtdNMT
165   #define Led_TYPE LedMVP
166   #define Osd_TYPE OsdDirectFB
167   #define OsdStartDev ""
168   #define Audio_TYPE AudioNMT
169   #define Video_TYPE VideoNMT
170   #define Surface_TYPE SurfaceDirectFB //deprecated
171   #define DEFAULT_TCP_WINDOWSIZE 2048
172   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
173   #define PLAYER_MAX_STREAMING_BUFFERS 11 // for video in uints of 50000 KB
174
175   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME
176
177 #endif
178
179 #endif
180
181 /*
182 typedef struct
183 {
184   UINT id;               // Used for working out what has changed at the end
185   char *title;           // Name of the option
186   char *configSection;   // Which section of the config file
187   char *configParam;     // Parameter name in the config file
188   UINT optionType;       // 1 for text, 2 for int
189   UINT optionCount;      // How many choices?
190   UINT defaultOption;    // Serial of the default choice (base 0), or actual option in int mode
191   int startInt;          // Starting int for int mode
192   const char * const * options;  // Text for the options (null for int mode)
193 } OPTIONDATA;
194 */
195
196 #endif