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