#if defined( SYS_BEOS )
vlc_object_t * p_appthread;
char * psz_vlcpath;
-#elif defined( SYS_DARWIN )
+#elif defined( __APPLE__ )
char * psz_vlcpath;
vlc_iconv_t iconv_macosx; /* for HFS+ file names */
vlc_mutex_t iconv_lock;
/* Locks */
vlc_mutex_t config_lock; /* lock for the config file */
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
vlc_mutex_t quicktime_lock; /* QT is not thread safe on OSX */
#endif
#if defined( SYS_BEOS )
# include "beos_specific.h"
-#elif defined( SYS_DARWIN )
+#elif defined( __APPLE__ )
# include "darwin_specific.h"
#elif defined( WIN32 ) || defined( UNDER_CE )
# include "win32_specific.h"
# define vlc_strdup NULL
#endif
-#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
+#if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS)
# define vasprintf vlc_vasprintf
VLC_EXPORT( int, vlc_vasprintf, (char **, const char *, va_list ) );
#elif !defined(__PLUGIN__)
# define vlc_vasprintf NULL
#endif
-#if !defined(HAVE_ASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
+#if !defined(HAVE_ASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS)
# define asprintf vlc_asprintf
VLC_EXPORT( int, vlc_asprintf, (char **, const char *, ... ) );
#elif !defined(__PLUGIN__)
/* The configuration file and directory */
#ifdef SYS_BEOS
# define CONFIG_DIR "config/settings/VideoLAN Client"
-#elif SYS_DARWIN
+#elif __APPLE__
# define CONFIG_DIR "Library/Preferences/VLC"
#elif defined( WIN32 ) || defined( UNDER_CE )
# define CONFIG_DIR "vlc"
*****************************************************************************/
/* Thread priorities */
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
# define VLC_THREAD_PRIORITY_LOW (-47)
# define VLC_THREAD_PRIORITY_INPUT 37
# define VLC_THREAD_PRIORITY_AUDIO 37
#if defined( SYS_BSDI )
# include <dvd.h>
-#elif defined ( SYS_DARWIN )
+#elif defined ( __APPLE__ )
# include <CoreFoundation/CFBase.h>
# include <IOKit/IOKitLib.h>
# include <IOKit/storage/IOCDTypes.h>
* vcd device mode
*/
-#if defined( SYS_DARWIN )
+#if defined( __APPLE__ )
CDTOC *pTOC;
int i_descriptors;
* vcd device mode
*/
-#if defined( SYS_DARWIN )
+#if defined( __APPLE__ )
dk_cd_read_t cd_read;
memset( &cd_read, 0, sizeof(cd_read) );
free( p_vcddev->p_sectors );
}
-#if defined( SYS_DARWIN )
+#if defined( __APPLE__ )
/****************************************************************************
* darwin_getTOC: get the TOC
****************************************************************************/
return( i_tracks );
}
-#endif /* SYS_DARWIN */
+#endif /* __APPLE__ */
#if defined( WIN32 )
/*****************************************************************************
/*****************************************************************************
* Platform specifics
*****************************************************************************/
-#if defined( SYS_DARWIN )
+#if defined( __APPLE__ )
#define darwin_freeTOC( p ) free( (void*)p )
#define CD_MIN_TRACK_NO 01
#define CD_MAX_TRACK_NO 99
static int OpenVCDImage( vlc_object_t *, const char *, struct vcddev_s * );
static void CloseVCDImage( vlc_object_t *, struct vcddev_s * );
-#if defined( SYS_DARWIN )
+#if defined( __APPLE__ )
static CDTOC *darwin_getTOC( vlc_object_t *, const struct vcddev_s * );
static int darwin_getNumberOfDescriptors( CDTOC * );
static int darwin_getNumberOfTracks( CDTOC *, int );
return VLC_EGENERIC;
}
-#if !defined( SYS_DARWIN )
+#if !defined( __APPLE__ )
if( !config_GetInt( p_this, "hq-resampling" ) )
{
return VLC_EGENERIC;
int browser_Open( const char *psz_url )
{
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
char *psz_open_commandline;
psz_open_commandline = strdup( "/usr/bin/open " );
set_description( _("MPEG audio layer I/II/III parser") );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACODEC );
-#if defined(SYS_DARWIN) || defined(UNDER_CE)
+#if defined(__APPLE__) || defined(UNDER_CE)
set_capability( "decoder", 5 );
#else
set_capability( "decoder", 100 );
#include <vlc/vout.h>
#include <vlc/decoder.h>
-#if !defined (SYS_DARWIN) && !defined(WIN32)
+#if !defined (__APPLE__) && !defined(WIN32)
# define LOADER 1
#endif
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
#include <QuickTime/QuickTimeComponents.h>
#include <QuickTime/Movies.h>
#include <QuickTime/ImageCodec.h>
#define FCC( a, b , c, d ) \
((uint32_t)( ((a)<<24)|((b)<<16)|((c)<<8)|(d)))
-#ifndef SYS_DARWIN
+#ifndef __APPLE__
typedef struct OpaqueSoundConverter* SoundConverter;
#ifndef LOADER
typedef long OSType;
long reserved;
} SoundComponentData;
-#endif /* SYS_DARWIN */
+#endif /* __APPLE__ */
struct decoder_sys_t
{
/* library */
-#ifndef SYS_DARWIN
+#ifndef __APPLE__
#ifdef LOADER
ldt_fs_t *ldt_fs;
#endif /* LOADER */
HINSTANCE qts;
OSErr (*InitializeQTML) ( long flags );
OSErr (*TerminateQTML) ( void );
-#endif /* SYS_DARWIN */
+#endif /* __APPLE__ */
/* Audio */
int (*SoundConverterOpen) ( const SoundComponentData *,
/* get lock, avoid segfault */
var_Get( p_dec->p_libvlc, "qt_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
/* on OS X QT is not threadsafe */
vlc_mutex_lock( &p_dec->p_vlc->quicktime_lock );
#endif
if( p_sys->plane) free( p_sys->plane );
}
-#ifndef SYS_DARWIN
+#ifndef __APPLE__
FreeLibrary( p_sys->qtml );
FreeLibrary( p_sys->qts );
msg_Dbg( p_dec, "FreeLibrary ok." );
#endif
#endif
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock );
#endif
vlc_mutex_unlock( lockval.p_address );
/* get lock, avoid segfault */
var_Get( p_dec->p_libvlc, "qt_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
/* on OS X QT is not threadsafe */
vlc_mutex_lock( &p_dec->p_vlc->quicktime_lock );
#endif
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
EnterMovies();
#endif
goto exit_error;
}
-#ifndef SYS_DARWIN
+#ifndef __APPLE__
if( ( i_error = p_sys->InitializeQTML( 6 + 16 ) ) )
{
msg_Dbg( p_dec, "error on InitializeQTML = %d", i_error );
p_sys->i_out = 0;
p_sys->i_out_frames = 0;
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock );
#endif
vlc_mutex_unlock( lockval.p_address );
#ifdef LOADER
Restore_LDT_Keeper( p_sys->ldt_fs );
#endif
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock );
#endif
vlc_mutex_unlock( lockval.p_address );
var_Get( p_dec->p_libvlc, "qt_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
EnterMovies();
#endif
goto exit_error;
}
-#ifndef SYS_DARWIN
+#ifndef __APPLE__
if( ( i_result = p_sys->InitializeQTML( 6 + 16 ) ) )
{
msg_Dbg( p_dec, "error on InitializeQTML = %d", (int)i_result );
{
decoder_sys_t *p_sys = p_dec->p_sys;
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
p_sys->SoundConverterOpen = (void*)SoundConverterOpen;
p_sys->SoundConverterClose = (void*)SoundConverterClose;
p_sys->SoundConverterSetInfo = (void*)SoundConverterSetInfo;
}
msg_Dbg( p_dec, "Standard init done" );
-#endif /* else SYS_DARWIN */
+#endif /* else __APPLE__ */
return VLC_SUCCESS;
}
{
decoder_sys_t *p_sys = p_dec->p_sys;
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
p_sys->FindNextComponent = (void*)FindNextComponent;
p_sys->OpenComponent = (void*)OpenComponent;
p_sys->ImageCodecInitialize = (void*)ImageCodecInitialize;
msg_Err( p_dec, "failed getting proc address" );
return VLC_EGENERIC;
}
-#endif /* SYS_DARWIN */
+#endif /* __APPLE__ */
return VLC_SUCCESS;
}
/*****************************************************************************
* Local functions
*****************************************************************************/
-#if !defined(SYS_DARWIN) && !defined(SYS_BEOS) && !defined(WIN32)
+#if !defined(__APPLE__) && !defined(SYS_BEOS) && !defined(WIN32)
static int DirectoryCheck( char *psz_dir )
{
DIR *p_dir;
p_sys->i_files = 0;
p_sys->pp_files = NULL;
-#if defined(SYS_DARWIN) || defined(SYS_BEOS) || defined(WIN32)
+#if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL )
{
char * psz_vlcpath = p_intf->p_libvlc->psz_vlcpath;
msg_Dbg( &sys.demuxer, "| | + family=%d", *(uint32*)uid->GetBuffer() );
}
-#if defined( HAVE_GMTIME_R ) && !defined( SYS_DARWIN )
+#if defined( HAVE_GMTIME_R ) && !defined( __APPLE__ )
else if( MKV_IS_ID( l, KaxDateUTC ) )
{
KaxDateUTC &date = *(KaxDateUTC*)l;
# define UPDATE_VLC_OS "windows"
# define UPDATE_VLC_ARCH "i386"
#else
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
# define UPDATE_VLC_OS "macosx"
# define UPDATE_VLC_ARCH "ppc"
#else
#include FT_FREETYPE_H
#include FT_GLYPH_H
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
#define DEFAULT_FONT "/System/Library/Fonts/LucidaGrande.dfont"
#elif defined( SYS_BEOS )
#define DEFAULT_FONT "/boot/beos/etc/fonts/ttfonts/Swiss721.ttf"
#ifdef WIN32
GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 );
strcat( psz_fontfile, "\\fonts\\arial.ttf" );
-#elif SYS_DARWIN
+#elif __APPLE__
strcpy( psz_fontfile, DEFAULT_FONT );
#else
msg_Err( p_filter, "user didn't specify a font" );
#define MODE_HTML 1
#define MODE_SYSLOG 2
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
#define LOG_DIR "Library/Logs/"
#endif
psz_file = config_GetPsz( p_intf, "logfile" );
if( !psz_file )
{
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
char *psz_homedir = p_this->p_vlc->psz_homedir;
if( !psz_homedir )
#include <vlc/vlc.h>
#include <vlc/vout.h>
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
set_description( _("OpenGL video output") );
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
set_capability( "video output", 200 );
#else
set_capability( "video output", 20 );
var_Create( p_vout, "opengl-effect", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
p_sys->i_index = 0;
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
p_sys->i_tex_width = p_vout->fmt_in.i_width;
p_sys->i_tex_height = p_vout->fmt_in.i_height;
#else
p_sys->p_vout->pf_init( p_sys->p_vout );
-#if defined( SYS_DARWIN ) || (VLCGL_FORMAT == YCBCR_MESA)
+#if defined( __APPLE__ ) || (VLCGL_FORMAT == YCBCR_MESA)
p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
i_pixel_pitch = 2;
i_ret = p_sys->p_vout->pf_manage( p_sys->p_vout );
p_vout->i_changes = p_sys->p_vout->i_changes;
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
if( p_sys->p_vout->pf_lock &&
p_sys->p_vout->pf_lock( p_sys->p_vout ) )
{
return;
}
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
int i_new_index;
i_new_index = ( p_sys->i_index + 1 ) & 1;
/* glTexCoord works differently with GL_TEXTURE_2D and
GL_TEXTURE_RECTANGLE_EXT */
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
f_x = (float)p_vout->fmt_out.i_x_offset;
f_y = (float)p_vout->fmt_out.i_y_offset;
f_width = (float)p_vout->fmt_out.i_x_offset +
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
/* Tell the driver not to make a copy of the texture but to use
our buffer */
glEnable( GL_UNPACK_CLIENT_STORAGE_APPLE );
if( config_GetInt( p_vout, MODULE_STRING "-shm" ) )
{
-# ifdef SYS_DARWIN
+# ifdef __APPLE__
/* FIXME: As of 2001-03-16, XFree4 for MacOS X does not support Xshm */
# else
p_vout->p_sys->b_shm =
{
int i_ret;
-#ifndef SYS_DARWIN
+#ifndef __APPLE__
/* This clutters OSX GUI error logs */
fprintf( stderr, "VLC media player %s\n", VLC_Version() );
#endif