]> git.vomp.tv Git - vompclient.git/blob - defines.h
More compiler warning fixes
[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 //#define WINDOWS_LEGACY
43
44 #ifdef WIN32
45
46
47   #define Thread_TYPE ThreadWin
48   #define ThreadID_TYPE unsigned int
49   #define VectorHandle void* 
50   #define VECTOR_HANDLE_INIT NULL
51 #ifndef WINDOWS_LEGACY
52   #define Osd_TYPE OsdWinVector
53   #define Surface_TYPE SurfaceVector
54   #define GRADIENT_DRAWING
55   #define ADVANCED_MENUES // This is for special HD versions of our menus
56 #else
57   #define Osd_TYPE OsdWinPixel
58   #define Surface_TYPE SurfaceWin
59 #endif
60
61   #define RemoteStartDev ""//No devices passed
62
63   #define SNPRINTF _snprintf
64   #define VSNPRINTF _vsnprintf
65   #define STRCASECMP _stricmp
66   #define STRCASESTR StrStrI
67 /*  #define STRTOULL _strtoui64 */
68   #define STRTOUL strtoul
69   #define STRTOKR strtok_s
70
71   #define CLOSESOCKET closesocket
72   #define DEFAULT_TCP_WINDOWSIZE 2048
73   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
74   #define PLAYER_MAX_STREAMING_BUFFERS 120 // for video in uints of 50000 KB
75
76   #define VOMP_HAS_EXIT
77
78 #else
79
80   int max(int, int);
81   int min(UINT, int);
82 /*#ifdef _MIPS_ARCH
83   #define Surface_TYPE SurfaceDirectFB
84 #else
85   #define Surface_TYPE SurfaceMVP
86 #endif*/
87 #ifdef __ANDROID__
88   #define Thread_TYPE ThreadPAndroid
89
90 #else
91   #define Thread_TYPE ThreadP
92
93 #endif
94   #include <pthread.h>
95   #define ThreadID_TYPE pthread_t
96
97   #define SNPRINTF snprintf
98   #define VSNPRINTF vsnprintf
99   #define STRCASECMP strcasecmp
100   #define STRCASESTR strcasestr
101   #define STRTOUL strtoul
102   #define STRTOKR strtok_r
103   #define CLOSESOCKET close
104
105 // add here defines for plattform specific objects
106 #ifdef VOMP_PLATTFORM_RASPBERRY
107    #define Remote_TYPE RemoteLinux  // Generic Remote under Linux (Konsole!, not X) will support in the end:
108    #define RemoteStartDev ""//No devices passed
109
110   // Keyboard
111   // remotes under /dev/event
112   // HDMI CEC
113   //lirc?
114    #define Mtd_TYPE MtdRaspberry  //this is device dependent
115    #define Led_TYPE LedRaspberry  //this is device dependent
116    #define Osd_TYPE OsdOpenVG   // This OpenGL ES 2.0, in the moment only for raspberry, but might be splitted for other devices
117    #define OsdStartDev ""
118    #define Audio_TYPE AudioOMX   // This is Audio based on OpenMax and libav for decoding
119    #define Video_TYPE VideoOMX   // This is Video based on OpenMax
120
121
122
123    #define VPE_OMX_SUPPORT // Activate support for hardware codec using openmax il
124    #define VPE_OMX_H264_DECODER "OMX.broadcom.video_decode"
125    #define VPE_OMX_MPEG2_DECODER "OMX.broadcom.video_decode"
126    #define VPE_OMX_VIDEO_SCHED "OMX.broadcom.video_scheduler"
127    #define VPE_OMX_VIDEO_REND "OMX.broadcom.video_render"
128    #define VPE_OMX_VIDEO_DEINTERLACE "OMX.broadcom.image_fx"
129    #define VPE_OMX_CLOCK "OMX.broadcom.clock"
130    #define VPE_OMX_AUDIO_DECODER "OMX.broadcom.audio_decode"
131    #define VPE_OMX_AUDIO_REND "OMX.broadcom.audio_render"
132    #define VPE_OMX_IMAGE_DECODER "OMX.broadcom.image_decode"
133    #define VPE_OMX_EGL_REND "OMX.broadcom.egl_render"
134
135    //#define  VPE_LIBAV_SUPPORT
136   // #define  VPE_LIBAV_MPEG2_TRANSCODING
137
138   #define DEFAULT_TCP_WINDOWSIZE 0
139   #define DEFAULT_TCP_WINDOWSIZENR 0  /*=2048*/
140   #define PLAYER_MAX_STREAMING_BUFFERS 120 // for video in uints of 50000 KB
141   #define TV_NORM_SWITCHABLE
142   #define HANDLE_VT_SWITCHING
143   #define GRADIENT_DRAWING
144   #define ADVANCED_MENUES // This is for special HD versions of our menus
145   #define VectorHandle unsigned int 
146   #define VECTOR_HANDLE_INIT 0
147
148
149   #define PICTURE_DECODER_MAGICK
150   #define PICTURE_DECODER_OMX
151
152   #define VOMP_LINUX_CLOCK  CLOCK_MONOTONIC
153
154 #endif
155 #ifdef VOMP_PLATTFORM_MVP
156   #define Remote_TYPE RemoteMVP
157   #define RemoteStartDev "/dev/rawir"
158   #define Mtd_TYPE MtdMVP
159   #define Led_TYPE LedMVP
160   #define Osd_TYPE OsdMVP
161   #define OsdStartDev "/dev/stbgfx"
162   #define Audio_TYPE AudioMVP
163   #define Video_TYPE VideoMVP
164   #define Surface_TYPE SurfaceMVP //deprecated
165   #define DEFAULT_TCP_WINDOWSIZE 2048  /*=2048*/
166   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
167   #define PLAYER_MAX_STREAMING_BUFFERS 11 // for video in uints of 50000 KB
168   #define PAL_WSS
169   #define MVP_REMOTE_TYPES
170
171   #define VOMP_MEDIAPLAYER
172   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME
173
174   #define VectorHandle void*
175   #define VECTOR_HANDLE_INIT NULL
176
177 #endif
178
179 #ifdef VOMP_PLATTFORM_NMT // This was the attempt to port vomp to nmt, it failed but maybe the code is useful at some time
180   #define Remote_TYPE RemoteLirc
181   #define RemoteStartDev "/dev/lircd"
182   #define Mtd_TYPE MtdNMT
183   #define Led_TYPE LedMVP
184   #define Osd_TYPE OsdDirectFB
185   #define OsdStartDev ""
186   #define Audio_TYPE AudioNMT
187   #define Video_TYPE VideoNMT
188   #define Surface_TYPE SurfaceDirectFB //deprecated
189   #define DEFAULT_TCP_WINDOWSIZE 2048
190   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
191   #define PLAYER_MAX_STREAMING_BUFFERS 11 // for video in uints of 50000 KB
192
193   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME
194
195 #endif
196
197 #endif
198
199 /*
200 typedef struct
201 {
202   UINT id;               // Used for working out what has changed at the end
203   char *title;           // Name of the option
204   char *configSection;   // Which section of the config file
205   char *configParam;     // Parameter name in the config file
206   UINT optionType;       // 1 for text, 2 for int
207   UINT optionCount;      // How many choices?
208   UINT defaultOption;    // Serial of the default choice (base 0), or actual option in int mode
209   int startInt;          // Starting int for int mode
210   const char * const * options;  // Text for the options (null for int mode)
211 } OPTIONDATA;
212 */
213
214 #endif