2 Copyright 2004-2020 Chris Tallon
4 This file is part of VOMP.
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.
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.
16 You should have received a copy of the GNU General Public License
17 along with VOMP. If not, see <https://www.gnu.org/licenses/>.
23 typedef unsigned char UCHAR;
24 typedef unsigned short USHORT;
25 typedef unsigned int UINT;
26 typedef unsigned long ULONG;
27 typedef unsigned long long ULLONG;
29 #define OPTIONTYPE_TEXT 1
30 #define OPTIONTYPE_INT 2
34 //ULLONG htonll(ULLONG a);
35 //ULLONG ntohll(ULLONG a);
36 void MILLISLEEP(ULONG a);
37 long long getTimeMS();
39 int getClockRealTime(struct timespec *tp);
41 //#define WINDOWS_LEGACY
46 #define Thread_TYPE ThreadWin
47 #define ThreadID_TYPE unsigned int
48 #define VectorHandle void*
49 #define VECTOR_HANDLE_INIT NULL
50 #ifndef WINDOWS_LEGACY
51 #define Osd_TYPE OsdWinVector
52 #define Surface_TYPE SurfaceVector
53 #define GRADIENT_DRAWING
54 #define ADVANCED_MENUES // This is for special HD versions of our menus
56 #define Osd_TYPE OsdWinPixel
57 #define Surface_TYPE SurfaceWin
60 #define RemoteStartDev ""//No devices passed
62 #define SNPRINTF _snprintf
63 #define VSNPRINTF _vsnprintf
64 #define STRCASECMP _stricmp
65 #define STRCASESTR StrStrI
66 /* #define STRTOULL _strtoui64 */
67 #define STRTOUL strtoul
68 #define STRTOKR strtok_s
69 #define LOCALTIME_R(time, tm) (localtime_s(tm,time))
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
83 #define Surface_TYPE SurfaceDirectFB
88 #define Thread_TYPE ThreadPAndroid
91 #define Thread_TYPE ThreadP
95 #define ThreadID_TYPE pthread_t
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 LOCALTIME_R(time, tm) (localtime_r(time, tm))
106 #define CLOSESOCKET close
108 // add here defines for plattform specific objects
109 #ifdef VOMP_PLATFORM_RASPBERRY
110 #define Remote_TYPE RemoteLinux // Generic Remote under Linux (Konsole!, not X) will support in the end:
111 #define RemoteStartDev ""//No devices passed
114 // remotes under /dev/event
117 #define Led_TYPE LedRaspberry //this is device dependent
118 #define Osd_TYPE OsdOpenVG // This OpenGL ES 2.0, in the moment only for raspberry, but might be splitted for other devices
119 #define Audio_TYPE AudioOMX // This is Audio based on OpenMax and libav for decoding
120 #define Video_TYPE VideoOMX // This is Video based on OpenMax
124 #define VPE_OMX_SUPPORT // Activate support for hardware codec using openmax il
125 #define VPE_OMX_H264_DECODER "OMX.broadcom.video_decode"
126 #define VPE_OMX_MPEG2_DECODER "OMX.broadcom.video_decode"
127 #define VPE_OMX_VIDEO_SCHED "OMX.broadcom.video_scheduler"
128 #define VPE_OMX_VIDEO_REND "OMX.broadcom.video_render"
129 #define VPE_OMX_VIDEO_DEINTERLACE "OMX.broadcom.image_fx"
130 #define VPE_OMX_CLOCK "OMX.broadcom.clock"
131 #define VPE_OMX_AUDIO_DECODER "OMX.broadcom.audio_decode"
132 #define VPE_OMX_AUDIO_REND "OMX.broadcom.audio_render"
133 #define VPE_OMX_IMAGE_DECODER "OMX.broadcom.image_decode"
134 #define VPE_OMX_EGL_REND "OMX.broadcom.egl_render"
136 //#define VPE_LIBAV_SUPPORT
137 // #define VPE_LIBAV_MPEG2_TRANSCODING
139 #define DEFAULT_TCP_WINDOWSIZE 0
140 #define DEFAULT_TCP_WINDOWSIZENR 0 /*=2048*/
141 #define PLAYER_MAX_STREAMING_BUFFERS 120 // for video in uints of 50000 KB
142 #define TV_NORM_SWITCHABLE
143 #define HANDLE_VT_SWITCHING
144 #define GRADIENT_DRAWING
145 #define ADVANCED_MENUES // This is for special HD versions of our menus
146 #define VectorHandle unsigned int
147 #define VECTOR_HANDLE_INIT 0
150 #define PICTURE_DECODER_MAGICK
151 #define PICTURE_DECODER_OMX
153 #define VOMP_LINUX_CLOCK CLOCK_MONOTONIC
156 #ifdef VOMP_PLATTFORM_MVP
157 #define Remote_TYPE RemoteMVP
158 #define RemoteStartDev "/dev/rawir"
164 #define DEFAULT_TCP_WINDOWSIZE 2048 /*=2048*/
165 #define DEFAULT_TCP_WINDOWSIZENR 2 /*=2048*/
166 #define PLAYER_MAX_STREAMING_BUFFERS 11 // for video in uints of 50000 KB
169 #define VOMP_MEDIAPLAYER
170 #define VOMP_LINUX_CLOCK CLOCK_REALTIME
172 #define VectorHandle void*
173 #define VECTOR_HANDLE_INIT NULL
177 #ifdef VOMP_PLATTFORM_NMT // This was the attempt to port vomp to nmt, it failed but maybe the code is useful at some time
178 #define Remote_TYPE RemoteLirc
179 #define RemoteStartDev "/dev/lircd"
180 #define Led_TYPE LedMVP
181 #define Osd_TYPE OsdDirectFB
182 #define Audio_TYPE AudioNMT
183 #define Video_TYPE VideoNMT
184 #define Surface_TYPE SurfaceDirectFB //deprecated
185 #define DEFAULT_TCP_WINDOWSIZE 2048
186 #define DEFAULT_TCP_WINDOWSIZENR 2 /*=2048*/
187 #define PLAYER_MAX_STREAMING_BUFFERS 11 // for video in uints of 50000 KB
189 #define VOMP_LINUX_CLOCK CLOCK_REALTIME
198 UINT id; // Used for working out what has changed at the end
199 char *title; // Name of the option
200 char *configSection; // Which section of the config file
201 char *configParam; // Parameter name in the config file
202 UINT optionType; // 1 for text, 2 for int
203 UINT optionCount; // How many choices?
204 UINT defaultOption; // Serial of the default choice (base 0), or actual option in int mode
205 int startInt; // Starting int for int mode
206 const char * const * options; // Text for the options (null for int mode)