]> git.vomp.tv Git - vompclient-marten.git/blob - defines.h
Initial import of patches for ARM/Android/Raspeberry pi
[vompclient-marten.git] / defines.h
1 /*\r
2     Copyright 2004-2005 Chris Tallon\r
3 \r
4     This file is part of VOMP.\r
5 \r
6     VOMP is free software; you can redistribute it and/or modify\r
7     it under the terms of the GNU General Public License as published by\r
8     the Free Software Foundation; either version 2 of the License, or\r
9     (at your option) any later version.\r
10 \r
11     VOMP is distributed in the hope that it will be useful,\r
12     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14     GNU General Public License for more details.\r
15 \r
16     You should have received a copy of the GNU General Public License\r
17     along with VOMP; if not, write to the Free Software\r
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\r
19 */\r
20 \r
21 #ifndef DEFINES_H\r
22 #define DEFINES_H\r
23 \r
24 typedef unsigned char UCHAR;\r
25 typedef unsigned short USHORT;\r
26 typedef unsigned int UINT;\r
27 typedef unsigned long ULONG;\r
28 typedef unsigned long long ULLONG;\r
29 \r
30 #define OPTIONTYPE_TEXT 1\r
31 #define OPTIONTYPE_INT 2\r
32 \r
33 //ULLONG htonll(ULLONG a);\r
34 //ULLONG ntohll(ULLONG a);\r
35 void MILLISLEEP(ULONG a);\r
36 \r
37 #ifdef WIN32\r
38 \r
39   #define Surface_TYPE SurfaceWin\r
40   #define Thread_TYPE ThreadWin\r
41   #define ThreadID_TYPE unsigned int\r
42 \r
43   #define SNPRINTF _snprintf\r
44   #define VSNPRINTF _vsnprintf\r
45   #define STRCASECMP _stricmp\r
46   #define STRCASESTR StrStrI\r
47 /*  #define STRTOULL _strtoui64 */\r
48   #define STRTOUL strtoul\r
49   #define CLOSESOCKET closesocket\r
50 \r
51 \r
52 #else\r
53 \r
54   int max(int, int);\r
55   int min(UINT, int);\r
56 /*#ifdef _MIPS_ARCH\r
57   #define Surface_TYPE SurfaceDirectFB\r
58 #else\r
59   #define Surface_TYPE SurfaceMVP\r
60 #endif*/\r
61 #ifdef __ANDROID__\r
62   #define Thread_TYPE ThreadPAndroid\r
63 \r
64 #else\r
65   #define Thread_TYPE ThreadP\r
66 \r
67 #endif\r
68   #include <pthread.h>\r
69   #define ThreadID_TYPE pthread_t\r
70 \r
71   #define SNPRINTF snprintf\r
72   #define VSNPRINTF vsnprintf\r
73   #define STRCASECMP strcasecmp\r
74   #define STRCASESTR strcasestr\r
75   #define STRTOUL strtoul\r
76   #define CLOSESOCKET close\r
77 \r
78 // add here defines for plattform specific objects\r
79 #ifdef VOMP_PLATTFORM_RASPBERRY\r
80    #define Remote_TYPE RemoteLinux  // Generic Remote under Linux (Konsole!, not X) will support in the end:\r
81    #define RemoteStartDev ""//No devices passed\r
82 \r
83   // Keyboard\r
84   // remotes under /dev/event\r
85   // HDMI CEC\r
86   //lirc?\r
87    #define Mtd_TYPE MtdRaspberry  //this is device dependent\r
88    #define Led_TYPE LedRaspberry  //this is device dependent\r
89    #define Osd_TYPE OsdOpenGL   // This OpenGL ES 2.0, in the moment only for raspberry, but might be splitted for other devices\r
90    #define OsdStartDev ""\r
91    #define Audio_TYPE AudioVPE   // This is Audio based on VPE (Vomp Presentation Engine) should support OpenMax and Alsa with ffmpeg in the end\r
92    #define Video_TYPE VideoVPEOGL   // This is Video based on VPE (Vomp Presentation Engine) should support OpenMax and ffmpeg and opengl in the end\r
93 \r
94 #endif\r
95 #ifdef VOMP_PLATTFORM_MVP\r
96   #define Remote_TYPE RemoteMVP\r
97   #define RemoteStartDev "/dev/rawir"\r
98   #define Mtd_TYPE MtdMVP\r
99   #define Led_TYPE LedMVP\r
100   #define Osd_TYPE OsdMVP\r
101   #define OsdStartDev "/dev/stbgfx"\r
102   #define Audio_TYPE AudioMVP\r
103   #define Video_TYPE VideoMVP\r
104 #endif\r
105 \r
106 #ifdef VOMP_PLATTFORM_NMT // This was the attempt to port vomp to nmt, it failed but maybe the code is useful at some time\r
107   #define Remote_TYPE RemoteLirc\r
108   #define RemoteStartDev "/dev/lircd"\r
109   #define Mtd_TYPE MtdNMT\r
110   #define Led_TYPE LedMVP\r
111   #define Osd_TYPE OsdDirectFB\r
112   #define OsdStartDev ""\r
113   #define Audio_TYPE AudioNMT\r
114   #define Video_TYPE VideoNMT\r
115 \r
116 #endif\r
117 \r
118 #endif\r
119 \r
120 /*\r
121 typedef struct\r
122 {\r
123   UINT id;               // Used for working out what has changed at the end\r
124   char *title;           // Name of the option\r
125   char *configSection;   // Which section of the config file\r
126   char *configParam;     // Parameter name in the config file\r
127   UINT optionType;       // 1 for text, 2 for int\r
128   UINT optionCount;      // How many choices?\r
129   UINT defaultOption;    // Serial of the default choice (base 0), or actual option in int mode\r
130   int startInt;          // Starting int for int mode\r
131   const char * const * options;  // Text for the options (null for int mode)\r
132 } OPTIONDATA;\r
133 */\r
134 \r
135 #endif\r