Commit a8c893ff authored by Christophe Massiot's avatar Christophe Massiot

* Sync MOSX dev/CVS tree : code support for MacOS X audio, video and

interface (courtesy of Eugenio Jarosiewicz & Colin Delacroix) ;
* Bumped up version number to 0.2.70.
parent 94c51c45
......@@ -48,9 +48,12 @@ endif
# PROGRAM_BUILD is a complete identification of the build
# (we can't use fancy options with date since OSes like Solaris
# or FreeBSD have strange date implementations)
PROGRAM_BUILD = `date` $(USER)
ifeq ($(SYS),beos)
# XXX: beos does not support hostname (how lame...)
#PROGRAM_BUILD = `date` $(USER)@`hostname`
PROGRAM_BUILD = `date` $(USER)
else
PROGRAM_BUILD = `date` $(USER)@`hostname`
endif
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
......@@ -306,8 +309,7 @@ PLUGIN_BEOS = plugins/beos/beos.o \
plugins/beos/DrawingTidbits.o \
plugins/beos/TransportButton.o
PLUGIN_DARWIN = plugins/darwin/darwin.o \
plugins/darwin/aout_darwin.o
PLUGIN_DARWIN = plugins/darwin/darwin.o
PLUGIN_DSP = plugins/dsp/dsp.o \
plugins/dsp/aout_dsp.o
......@@ -429,7 +431,6 @@ STD_PLUGIN_OBJ = \
$(PLUGIN_IDCTMMX) \
$(PLUGIN_IDCTMMXEXT) \
$(PLUGIN_IDCTCOMMON) \
$(PLUGIN_MACOSX) \
$(PLUGIN_MGA) \
$(PLUGIN_MOTION) \
$(PLUGIN_MOTIONMMX) \
......@@ -449,6 +450,7 @@ NONSTD_PLUGIN_OBJ = \
$(PLUGIN_GLIDE) \
$(PLUGIN_GTK) \
$(PLUGIN_GNOME) \
$(PLUGIN_MACOSX) \
$(PLUGIN_IDCTALTIVEC)
NONSTD_CPP_PLUGIN_OBJ = \
......@@ -500,6 +502,19 @@ install:
$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
ifneq (,$(findstring darwin,$(SYS)))
# XXX this should only be for MacOS X
#should the following be "$(DESTDIR)$(bindir)vlc.app/" or "$(DESTDIR)vlc.app/" ?
mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS
mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
$(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist $(DESTDIR)$(bindir)vlc.app/Contents/
$(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo $(DESTDIR)$(bindir)vlc.app/Contents/
$(INSTALL) vlc $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/
$(INSTALL) $(PLUGINS:%=lib/%.so) $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
endif
show:
@echo CC: $(CC)
@echo CFLAGS: $(CFLAGS)
......@@ -573,7 +588,12 @@ $(cppdependancies): %.dpp: FORCE
$(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c
ifneq (,$(findstring darwin,$(SYS)))
#this is uglier of all
@if test "src/ac3_decoder/ac3_imdct.c" = "$<"; then $(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<; echo "(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<"; else $(CC) $(CFLAGS) -c -o $@ $<; echo "$(CC) $(CFLAGS) -c -o $@ $<"; fi
else
$(CC) $(CFLAGS) -c -o $@ $<
endif
$(CPP_OBJ): %.o: Makefile.dep
$(CPP_OBJ): %.o: .dep/%.dpp
......@@ -634,7 +654,12 @@ $(PLUGIN_BEOS): %.o: %.cpp
$(PLUGIN_IDCTALTIVEC): %.o: Makefile.dep
$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
$(PLUGIN_IDCTALTIVEC): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $< -faltivec
$(CC) $(CFLAGS) $(PCFLAGS) -faltivec -c -o $@ $<
$(PLUGIN_MACOSX): %.o: Makefile.dep
$(PLUGIN_MACOSX): %.o: .dep/%.d
$(PLUGIN_MACOSX): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
#
# Main application target
......@@ -647,6 +672,18 @@ ifeq ($(SYS),beos)
ln -s ../vlc ./plugins/_APP_
endif
vlc.app: all
ifneq (,$(findstring darwin,$(SYS)))
mkdir -p vlc.app/Contents/MacOS
mkdir -p vlc.app/Contents/MacOS/lib
mkdir -p vlc.app/Contents/MacOS/share
$(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
$(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
$(INSTALL) vlc vlc.app/Contents/MacOS/
$(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
$(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
endif
#
# Plugin targets
#
......@@ -710,7 +747,7 @@ lib/kde.so: $(PLUGIN_KDE)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lkdeui -lkdecore -lqt -ldl
lib/macosx.so: $(PLUGIN_MACOSX)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio -framework Carbon -framework AGL
lib/mga.so: $(PLUGIN_MGA)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
......@@ -737,10 +774,14 @@ lib/qt.so: $(PLUGIN_QT)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
lib/sdl.so: $(PLUGIN_SDL)
ifneq (,$(findstring darwin,$(SYS)))
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@ -framework Carbon -framework AGL
else
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
endif
lib/ts.so: $(PLUGIN_TS)
ifeq ($(SYS),darwin)
ifneq (,$(findstring darwin,$(SYS)))
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework AGL -framework Carbon
else
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_HOST
VLC_VERSION=0.2.63
VLC_VERSION=0.2.70
AC_SUBST(VLC_VERSION)
VLC_CODENAME=Urumov
AC_SUBST(VLC_CODENAME)
......@@ -130,9 +130,9 @@ AC_ARG_ENABLE(mmx,
[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ])
AC_ARG_ENABLE(altivec,
[ --enable-altivec Enable altivec optimizations (default enabled for PPC)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ],
[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ])
[ --enable-altivec Enable altivec optimizations (default disabled since it is broken)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ])
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ])
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
......@@ -172,11 +172,11 @@ AC_ARG_ENABLE(esd,
[if test x$enable_esd = xyes; then PLUGINS=${PLUGINS}"esd "; fi])
AC_ARG_ENABLE(darwin,
[ --enable-darwin Darwin sound support (default disabled)],
[if test x$enable_darwin = xyes; then PLUGINS=${PLUGINS}"darwin "; fi],
[AC_CHECK_HEADERS(CoreAudio/AudioHardware.h, [PLUGINS=${PLUGINS}"darwin "])])
[if test x$enable_darwin = xyes; then PLUGINS=${PLUGINS}"darwin "; fi])
AC_ARG_ENABLE(macosx,
[ --enable-macosx Mac OS X interface support (default disabled)],
[if test x$enable_macosx = xyes; then PLUGINS=${PLUGINS}"macosx "; fi])
[ --enable-macosx Mac OS X interface support (default enabled in Mac OS X)],
[if test x$enable_macosx = xyes; then PLUGINS=${PLUGINS}"macosx "; fi],
[AC_CHECK_HEADERS(Carbon/Carbon.h, PLUGINS=${PLUGINS}"macosx ")])
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer support (default disabled)],
[if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; fi])
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>vlc</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>
APPL????
\ No newline at end of file
......@@ -2,7 +2,7 @@
* darwin.c : Darwin plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: darwin.c,v 1.3 2001/03/21 13:42:33 sam Exp $
* $Id: darwin.c,v 1.4 2001/04/06 18:18:10 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -25,6 +25,12 @@
#define MODULE_NAME darwin
#include "modules_inner.h"
/* CD (2001/04/06):
* This module was written to handle audio output when we thought that
* CoreAudio was in Darwin. It currently does nothing.
* All the audio output code has been moved to the macosx plugin.
*/
/*****************************************************************************
* Preamble
*****************************************************************************/
......@@ -50,7 +56,7 @@ MODULE_CONFIG_END
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
void _M( aout_getfunctions )( function_list_t * p_function_list );
// void _M( aout_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* InitModule: get the module structure and configuration.
......@@ -63,11 +69,10 @@ void _M( aout_getfunctions )( function_list_t * p_function_list );
MODULE_INIT
{
p_module->psz_name = MODULE_STRING;
p_module->psz_longname = "Darwin HAL sound support module";
p_module->psz_longname = "Darwin support module";
p_module->psz_version = VERSION;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_AOUT;
p_module->i_capabilities = MODULE_CAPABILITY_NULL;
return( 0 );
}
......@@ -88,7 +93,7 @@ MODULE_ACTIVATE
return( -1 );
}
_M( aout_getfunctions )( &p_module->p_functions->aout );
// _M( aout_getfunctions )( &p_module->p_functions->aout );
p_module->p_config = p_config;
......
......@@ -2,7 +2,7 @@
* aout_darwin.c : Darwin audio output plugin
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: aout_darwin.c,v 1.4 2001/04/05 03:50:38 sam Exp $
* $Id: aout_macosx.c,v 1.1 2001/04/06 18:18:10 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
*
......@@ -34,7 +34,7 @@
* Find 8 bits files and adapt output
*/
#define MODULE_NAME darwin
#define MODULE_NAME macosx
#include "modules_inner.h"
/*****************************************************************************
......@@ -128,12 +128,12 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
static int aout_Probe( probedata_t *p_data )
{
if( TestMethod( AOUT_METHOD_VAR, "darwin" ) )
if( TestMethod( AOUT_METHOD_VAR, "macosx" ) )
{
return( 999 );
}
/* The Darwin plugin always works under Darwin or MacOS X */
/* This plugin always works under OS X */
return( 100 );
}
......@@ -219,7 +219,7 @@ static int aout_Open( aout_thread_t *p_aout )
if( p_aout->p_sys->p_Data == nil ) return paramErr;
#if WRITE_AUDIO_OUTPUT_TO_FILE
p_aout->p_sys->fd = open( "/Users/bofh/audio-darwin.pcm", O_RDWR|O_CREAT );
p_aout->p_sys->fd = open( "audio-darwin.pcm", O_RDWR|O_CREAT );
intf_WarnMsg( 1, "open(...) -> %d", p_aout->p_sys->fd );
#endif
......@@ -247,7 +247,7 @@ static int aout_SetFormat( aout_thread_t *p_aout )
if( err != noErr )
{
/* We have to tell the decoder to use audio device's buffer size */
intf_ErrMsg( "AudioDeviceSetProperty failed ( buffersize = %d ) -> %d",
intf_ErrMsg( "aout : AudioDeviceSetProperty failed ( buffersize = %d ) -> %d",
ui_bufferSize, err );
return( -1 );
}
......@@ -328,7 +328,7 @@ static int aout_SetFormat( aout_thread_t *p_aout )
ui_paramSize, &format);
if( err != noErr )
{
intf_ErrMsg( "AudioDeviceSetProperty( mFormatFlags = %x, "
intf_ErrMsg( "aout : AudioDeviceSetProperty( mFormatFlags = %x, "
"mSampleRate = %f, mChannelsPerFrame = %d ) -> %d",
format.mFormatFlags, format.mSampleRate,
format.mChannelsPerFrame, err );
......
This diff is collapsed.
......@@ -2,9 +2,10 @@
* macosx.c : MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: macosx.c,v 1.3 2001/03/21 13:42:34 sam Exp $
* $Id: macosx.c,v 1.4 2001/04/06 18:18:10 massiot Exp $
*
* Authors:
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -49,6 +50,7 @@ MODULE_CONFIG_END
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
void _M( aout_getfunctions )( function_list_t * p_function_list );
void _M( vout_getfunctions )( function_list_t * p_function_list );
void _M( intf_getfunctions )( function_list_t * p_function_list );
......@@ -63,11 +65,12 @@ void _M( intf_getfunctions )( function_list_t * p_function_list );
MODULE_INIT
{
p_module->psz_name = MODULE_STRING;
p_module->psz_longname = "MacOS X interface and video module";
p_module->psz_longname = "MacOS X interface, sound and video module";
p_module->psz_version = VERSION;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_VOUT
| MODULE_CAPABILITY_AOUT
| MODULE_CAPABILITY_INTF;
return( 0 );
......@@ -90,6 +93,7 @@ MODULE_ACTIVATE
}
_M( vout_getfunctions )( &p_module->p_functions->vout );
_M( aout_getfunctions )( &p_module->p_functions->aout );
_M( intf_getfunctions )( &p_module->p_functions->intf );
p_module->p_config = p_config;
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* modules.c : Built-in and dynamic modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.19 2001/03/21 13:42:34 sam Exp $
* $Id: modules.c,v 1.20 2001/04/06 18:18:10 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
......@@ -54,6 +54,12 @@
#include "common.h"
#include "threads.h"
#ifdef SYS_DARWIN1_3
#include <sys/param.h> /* for MAXPATHLEN */
#include "main.h"
extern main_t *p_main;
#endif
#include "intf_msg.h"
#include "modules.h"
#include "modules_core.h"
......@@ -88,7 +94,7 @@ module_bank_t * module_CreateBank( void )
*****************************************************************************/
void module_InitBank( module_bank_t * p_bank )
{
static char * path[] = { ".", "lib", PLUGIN_PATH, NULL };
static char * path[] = { ".", "lib", PLUGIN_PATH, NULL, NULL };
char ** ppsz_path = path;
char * psz_fullpath;
......@@ -97,6 +103,11 @@ void module_InitBank( module_bank_t * p_bank )
char * psz_vlcpath = beos_GetProgramPath();
int i_vlclen = strlen( psz_vlcpath );
boolean_t b_notinroot;
#elif defined SYS_DARWIN1_3
static char once = 0;
static char app_path[ MAXPATHLEN ];
// HACK TO CUT OUT trailing 'vlc'
int i_pathlen = strlen( p_main->ppsz_argv[0] ) - 3;
#endif
DIR * dir;
struct dirent * file;
......@@ -106,6 +117,18 @@ void module_InitBank( module_bank_t * p_bank )
intf_WarnMsg( 1, "module: module bank initialized" );
#ifdef SYS_DARWIN1_3
if ( !once )
{
once = 1;
strncpy( app_path, p_main->ppsz_argv[ 0 ], i_pathlen );
intf_ErrMsg( "%s", p_main->ppsz_argv[ 0 ] );
strcat( app_path, "lib" );
path[ 3 ] = app_path ;
intf_ErrMsg( "%s", path[ 3 ] );
}
#endif
for( ; *ppsz_path != NULL ; ppsz_path++ )
{
/* Store strlen(*ppsz_path) for later use. */
......
......@@ -2,7 +2,7 @@
* video_text.c : text manipulation functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_text.c,v 1.20 2001/03/21 13:42:35 sam Exp $
* $Id: video_text.c,v 1.21 2001/04/06 18:18:10 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -42,6 +42,13 @@
#include "common.h"
#include "video_text.h"
#ifdef SYS_DARWIN1_3
// #include <CFBundle.h>
#include <sys/param.h> /* for MAXPATHLEN */
#include "main.h"
extern main_t *p_main;
#endif
#include "intf_msg.h"
/*****************************************************************************
......@@ -210,19 +217,40 @@ static void PutByte32( u32 *p_pic, int i_byte, byte_t i_char, byte_t i_border,
*****************************************************************************/
vout_font_t *vout_LoadFont( const char *psz_name )
{
static char * path[] = { "share", DATA_PATH, NULL };
static char * path[] = { "share", DATA_PATH, NULL, NULL };
char ** ppsz_path = path;
char * psz_file;
#ifdef SYS_BEOS
char * psz_vlcpath = beos_GetProgramPath();
int i_vlclen = strlen( psz_vlcpath );
#elif defined SYS_DARWIN1_3
static char once = 0;
static char app_path[ MAXPATHLEN ];
/* HACK TO CUT OUT trailing 'vlc' */
int i_pathlen = strlen( p_main->ppsz_argv[ 0 ] ) - 3;
// CFBundleRef mainBundle;
#endif
int i_char, i_line; /* character and line indexes */
int i_file = -1; /* source file */
byte_t pi_buffer[2]; /* file buffer */
vout_font_t * p_font; /* the font itself */
#ifdef SYS_DARWIN1_3
// Get the main bundle for the app
// mainBundle = CFBundleGetMainBundle();
if( !once )
{
once = 1;
strncpy( app_path, p_main->ppsz_argv[ 0 ], i_pathlen );
intf_ErrMsg( "%s", p_main->ppsz_argv[ 0 ] );
strcat( app_path, "share" );
path[ 2 ] = app_path ;
intf_ErrMsg( "%s", path[ 2 ] );
}
#endif
for( ; *ppsz_path != NULL ; ppsz_path++ )
{
#ifdef SYS_BEOS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment