4 * Copyright (C) 2005-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #if defined(HAVE_CONFIG_H) && !defined(TARGET_WINDOWS)
25 #define DECLARE_UNUSED(a,b) a __attribute__((unused)) b;
31 #define HAS_DVD_SWSCALE
33 #define HAS_EVENT_SERVER
35 #define HAS_SCREENSAVER
38 #define HAS_VIDEO_PLAYBACK
39 #define HAS_VISUALISATION
40 #define HAS_PVRCLIENTS
42 #ifdef HAVE_LIBMICROHTTPD
43 #define HAS_WEB_SERVER
44 #define HAS_WEB_INTERFACE
50 #define HAS_ASAP_CODEC
53 #define HAS_FILESYSTEM
54 #define HAS_FILESYSTEM_CDDA
55 #define HAS_FILESYSTEM_RTV
56 #define HAS_FILESYSTEM_DAAP
57 #define HAS_FILESYSTEM_SAP
58 #define HAS_FILESYSTEM_VTP
59 #define HAS_FILESYSTEM_HTSP
61 #ifdef HAVE_LIBSMBCLIENT
62 #define HAS_FILESYSTEM_SMB
66 #define HAS_FILESYSTEM_NFS
69 #ifdef HAVE_LIBAFPCLIENT
70 #define HAS_FILESYSTEM_AFP
77 #ifdef HAVE_LIBSHAIRPORT
89 /**********************
91 **********************/
93 #if defined(TARGET_WINDOWS)
94 #define HAS_FILESYSTEM_RAR
96 #if defined(HAVE_XBMC_NONFREE)
97 #define HAS_FILESYSTEM_RAR
105 #if defined(TARGET_WINDOWS)
106 #define HAS_SDL_JOYSTICK
107 #define HAS_DVD_DRIVE
108 #define HAS_WIN32_NETWORK
109 #define HAS_IRSERVERSUITE
111 #define HAVE_LIBCRYSTALHD 2
112 #define HAS_WEB_SERVER
113 #define HAS_WEB_INTERFACE
116 #define HAVE_LIBBLURAY
117 #define HAS_ASAP_CODEC
118 #define HAVE_YAJL_YAJL_VERSION_H
119 #define HAS_FILESYSTEM_SMB
120 #define HAS_FILESYSTEM_NFS
125 #define HAVE_LIBMP3LAME
126 #define HAVE_LIBVORBISENC
130 #define DECLARE_UNUSED(a,b) a b;
137 #if defined(TARGET_DARWIN)
138 #if defined(TARGET_DARWIN_OSX)
141 #define HAS_SDL_OPENGL
142 #define HAS_SDL_WIN_EVENTS
145 #define HAS_LINUX_NETWORK
152 #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
153 #if defined(HAVE_LIBAVAHI_COMMON) && defined(HAVE_LIBAVAHI_CLIENT)
166 #ifndef HAS_SDL_OPENGL
167 #define HAS_SDL_OPENGL
169 #define HAS_SDL_WIN_EVENTS
171 #define HAS_LINUX_EVENTS
173 #define HAS_LINUX_NETWORK
176 #define HAS_PULSEAUDIO
178 #ifdef HAVE_LIBXRANDR
187 #define HAS_FILESYSTEM_SFTP
194 #if defined(TARGET_DARWIN)
195 #include "../git_revision.h"
199 #define GIT_REV "Unknown"
202 /****************************************
203 * Additional platform specific includes
204 ****************************************/
206 #if defined(TARGET_WINDOWS)
208 #define DIRECTINPUT_VERSION 0x0800
209 #include "mmsystem.h"
212 #define DSSPEAKER_USE_DEFAULT DSSPEAKER_STEREO
213 #define LPDIRECTSOUND8 LPDIRECTSOUND
215 #include "PlatformInclude.h"
217 #include "D3D9.h" // On Win32, we're always using DirectX for something, whether it be the actual rendering
218 #include "D3DX9.h" // or the reference video clock.
220 #include <d3d9types.h>
227 #if defined(TARGET_POSIX)
229 #include <sys/time.h>
230 #include <sys/types.h>
232 #include "PlatformInclude.h"
235 #if defined(TARGET_ANDROID)
236 #undef HAS_LINUX_EVENTS
240 // EGL detected. Dont use GLX!
246 // GLES2.0 detected. Dont use GL!
247 #ifdef HAVE_LIBGLESV2
252 // GLES1.0 detected. Dont use GL!
259 #define HAS_CDDA_RIPPER
262 #define SAFE_DELETE(p) do { delete (p); (p)=NULL; } while (0)
263 #define SAFE_DELETE_ARRAY(p) do { delete[] (p); (p)=NULL; } while (0)
264 #define SAFE_RELEASE(p) do { if(p) { (p)->Release(); (p)=NULL; } } while (0)
266 // Useful pixel colour manipulation macros
267 #define GET_A(color) ((color >> 24) & 0xFF)
268 #define GET_R(color) ((color >> 16) & 0xFF)
269 #define GET_G(color) ((color >> 8) & 0xFF)
270 #define GET_B(color) ((color >> 0) & 0xFF)