Commit 28c71156 authored by Christophe Massiot's avatar Christophe Massiot

MacOS X port : native QuickTime video output, courtesy of Florian G.

Pflug <fgp@phlo.org>. Use it with -I macosx_qt.
parent f5da07b6
...@@ -55,8 +55,8 @@ E: ndeb@ece.cmu.edu ...@@ -55,8 +55,8 @@ E: ndeb@ece.cmu.edu
D: Minor autoconf and Makefile fixes D: Minor autoconf and Makefile fixes
N: Cyril Deguet N: Cyril Deguet
C: asmax
E: asmax@via.ecp.fr E: asmax@via.ecp.fr
C: asmax
D: PS input packet allocator D: PS input packet allocator
N: Colin Delacroix N: Colin Delacroix
...@@ -190,11 +190,16 @@ C: massiot ...@@ -190,11 +190,16 @@ C: massiot
D: MPEG PS input D: MPEG PS input
D: bitstream and input core functions D: bitstream and input core functions
D: MPEG video decoder D: MPEG video decoder
D: Many ports
N: Arkadiusz Miskiewicz N: Arkadiusz Miskiewicz
E: misiek@pld.ORG.PL E: misiek@pld.ORG.PL
D: autoconf and Makefile patches D: autoconf and Makefile patches
N: Florian G. Pflug
E: fgp@phlo.org
D: MacOS X port
N: Olivier Pomel N: Olivier Pomel
E: pomel@via.ecp.fr E: pomel@via.ecp.fr
C: pomel C: pomel
......
...@@ -18,7 +18,7 @@ PLUGINS_DIR := alsa beos darwin directx dsp dummy dvd esd fb ggi glide gtk downm ...@@ -18,7 +18,7 @@ PLUGINS_DIR := alsa beos darwin directx dsp dummy dvd esd fb ggi glide gtk downm
# #
# All possible plugin objects # All possible plugin objects
# #
PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin directx/directx dsp/dsp dummy/dummy dummy/null dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gtk/gnome gtk/gtk downmix/downmix downmix/downmixsse downmix/downmix3dn idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext idct/idctaltivec imdct/imdct imdct/imdct3dn imdct/imdctsse kde/kde macosx/macosx mga/mga motion/motion motion/motionmmx motion/motionmmxext motion/motion3dnow motion/motionaltivec mpeg/es mpeg/ps mpeg/ts qt/qt sdl/sdl text/ncurses text/rc x11/x11 x11/xvideo yuv/yuv yuv/yuvmmx PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin directx/directx dsp/dsp dummy/dummy dummy/null dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gtk/gnome gtk/gtk downmix/downmix downmix/downmixsse downmix/downmix3dn idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext idct/idctaltivec imdct/imdct imdct/imdct3dn imdct/imdctsse kde/kde macosx/macosx macosx/macosx_qt mga/mga motion/motion motion/motionmmx motion/motionmmxext motion/motion3dnow motion/motionaltivec mpeg/es mpeg/ps mpeg/ts qt/qt sdl/sdl text/ncurses text/rc x11/x11 x11/xvideo yuv/yuv yuv/yuvmmx
# #
# C Objects # C Objects
......
...@@ -4330,9 +4330,9 @@ fi ...@@ -4330,9 +4330,9 @@ fi
if test "x$withval" != "x"; then if test "x$withval" != "x"; then
TUNING=$withval TUNING=$withval
else else
if test x$ARCH = xi686; then TUNING="pentiumpro" if test x${target_cpu} = xi686; then TUNING="pentiumpro"
else else
if test x$ARCH = ppc; then TUNING="750"; fi if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
fi fi
fi fi
...@@ -4677,8 +4677,8 @@ if test "${enable_macosx+set}" = set; then ...@@ -4677,8 +4677,8 @@ if test "${enable_macosx+set}" = set; then
enableval="$enable_macosx" enableval="$enable_macosx"
if test x$enable_macosx = xyes if test x$enable_macosx = xyes
then then
BUILTINS="${BUILTINS} macosx" BUILTINS="${BUILTINS} macosx macosx_qt"
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL" LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
LIB_TS="${LIB_TS} -framework AGL -framework Carbon" LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon" LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
fi fi
...@@ -4717,8 +4717,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ...@@ -4717,8 +4717,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1 #define $ac_tr_hdr 1
EOF EOF
BUILTINS="${BUILTINS} macosx" BUILTINS="${BUILTINS} macosx macosx_qt"
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL" LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
LIB_TS="${LIB_TS} -framework AGL -framework Carbon" LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon" LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
......
...@@ -491,9 +491,9 @@ AC_ARG_WITH(tuning, ...@@ -491,9 +491,9 @@ AC_ARG_WITH(tuning,
if test "x$withval" != "x"; then if test "x$withval" != "x"; then
TUNING=$withval TUNING=$withval
else else
if test x$ARCH = xi686; then TUNING="pentiumpro" if test x${target_cpu} = xi686; then TUNING="pentiumpro"
else else
if test x$ARCH = ppc; then TUNING="750"; fi if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
fi fi
fi fi
...@@ -740,14 +740,14 @@ AC_ARG_ENABLE(macosx, ...@@ -740,14 +740,14 @@ AC_ARG_ENABLE(macosx,
[ --enable-macosx MacOS X support (default enabled on MacOS X)], [ --enable-macosx MacOS X support (default enabled on MacOS X)],
[if test x$enable_macosx = xyes [if test x$enable_macosx = xyes
then then
BUILTINS="${BUILTINS} macosx" BUILTINS="${BUILTINS} macosx macosx_qt"
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL" LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
LIB_TS="${LIB_TS} -framework AGL -framework Carbon" LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon" LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
fi], fi],
[AC_CHECK_HEADERS(Carbon/Carbon.h, [AC_CHECK_HEADERS(Carbon/Carbon.h,
BUILTINS="${BUILTINS} macosx" BUILTINS="${BUILTINS} macosx macosx_qt"
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL" LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
LIB_TS="${LIB_TS} -framework AGL -framework Carbon" LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon" LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
)]) )])
......
...@@ -7,10 +7,16 @@ ...@@ -7,10 +7,16 @@
# Objects # Objects
# #
PLUGIN_MACOSX = macosx.o intf_macosx.o aout_macosx.o vout_macosx.o PLUGIN_MACOSX = macosx.o intf_macosx.o vout_macosx.o
BUILTIN_MACOSX = $(PLUGIN_MACOSX:%.o=BUILTIN_%.o) PLUGIN_MACOSXQT = macosx_qt.o intf_macosx_qt.o vout_macosx_qt.o
PLUGIN_MACOSXCOMMON = aout_macosx.o
ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX) BUILTIN_MACOSX = $(PLUGIN_MACOSX:%.o=BUILTIN_MACOSX_%.o) \
$(PLUGIN_MACOSXCOMMON:%.o=BUILTIN_MACOSX_%.o)
BUILTIN_MACOSXQT = $(PLUGIN_MACOSXQT:%.o=BUILTIN_MACOSXQT_%.o) \
$(PLUGIN_MACOSXCOMMON:%.o=BUILTIN_MACOSXQT_%.o)
ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX) $(PLUGIN_MACOSXQT) $(BUILTIN_MACOSXQT) $(PLUGIN_MACOSXCOMMON)
# #
# Virtual targets # Virtual targets
...@@ -18,22 +24,33 @@ ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX) ...@@ -18,22 +24,33 @@ ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX)
include ../../Makefile.modules include ../../Makefile.modules
$(PLUGIN_MACOSX): %.o: .dep/%.d $(PLUGIN_MACOSX) $(PLUGIN_MACOSXQT) $(PLUGIN_MACOSXCOMMON): %.o: .dep/%.d
$(PLUGIN_MACOSX): %.o: %.c $(PLUGIN_MACOSX): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
$(BUILTIN_MACOSX): BUILTIN_%.o: .dep/%.d $(BUILTIN_MACOSX): BUILTIN_MACOSX_%.o: .dep/%.d
$(BUILTIN_MACOSX): BUILTIN_%.o: %.c $(BUILTIN_MACOSX): BUILTIN_MACOSX_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN -fpascal-strings -c -o $@ $< $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=macosx -fpascal-strings -c -o $@ $<
$(BUILTIN_MACOSXQT): BUILTIN_MACOSXQT_%.o: .dep/%.d
$(BUILTIN_MACOSXQT): BUILTIN_MACOSXQT_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=macosx_qt -fpascal-strings -c -o $@ $<
# #
# Real targets # Real targets
# #
../macosx.so: $(PLUGIN_MACOSX) ../macosx.so: $(PLUGIN_MACOSX) $(PLUGIN_MACOSXCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX) $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX)
../macosx.a: $(BUILTIN_MACOSX) ../macosx.a: $(BUILTIN_MACOSX)
ar r $@ $^ ar r $@ $^
$(RANLIB) $@ $(RANLIB) $@
../macosx_qt.so: $(PLUGIN_MACOSXQT) $(PLUGIN_MACOSXCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX)
../macosx_qt.a: $(BUILTIN_MACOSXQT)
ar r $@ $^
$(RANLIB) $@
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_darwin.c : Darwin audio output plugin * aout_darwin.c : Darwin audio output plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: aout_macosx.c,v 1.3 2001/07/12 20:44:52 reno Exp $ * $Id: aout_macosx.c,v 1.4 2001/10/08 16:20:25 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* *
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
* Find 8 bits files and adapt output * Find 8 bits files and adapt output
*/ */
#define MODULE_NAME macosx
#include "modules_inner.h" #include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
...@@ -96,17 +95,17 @@ static void aout_Play ( aout_thread_t *p_aout, ...@@ -96,17 +95,17 @@ static void aout_Play ( aout_thread_t *p_aout,
byte_t *buffer, int i_size ); byte_t *buffer, int i_size );
static void aout_Close ( aout_thread_t *p_aout ); static void aout_Close ( aout_thread_t *p_aout );
OSStatus appIOProc( AudioDeviceID inDevice, const AudioTimeStamp* inNow, static OSStatus appIOProc( AudioDeviceID inDevice, const AudioTimeStamp* inNow,
const void* inInputData, const AudioTimeStamp* inInputTime, const void* inInputData, const AudioTimeStamp* inInputTime,
AudioBufferList* outOutputData, AudioBufferList* outOutputData,
const AudioTimeStamp* inOutputTime, const AudioTimeStamp* inOutputTime,
void* threadGlobals ); void* threadGlobals );
void Convert16BitIntegerTo32Float( Ptr p_in16BitDataPtr, Ptr p_out32BitDataPtr, static void Convert16BitIntegerTo32Float( Ptr p_in16BitDataPtr, Ptr p_out32BitDataPtr,
UInt32 ui_totalBytes ); UInt32 ui_totalBytes );
void Convert16BitIntegerTo32FloatWithByteSwap( Ptr p_in16BitDataPtr, static void Convert16BitIntegerTo32FloatWithByteSwap( Ptr p_in16BitDataPtr,
Ptr p_out32BitDataPtr, Ptr p_out32BitDataPtr,
UInt32 p_totalBytes ); UInt32 p_totalBytes );
void Convert8BitIntegerTo32Float( Ptr in8BitDataPtr, Ptr p_out32BitDataPtr, static void Convert8BitIntegerTo32Float( Ptr in8BitDataPtr, Ptr p_out32BitDataPtr,
UInt32 ui_totalBytes ); UInt32 ui_totalBytes );
/***************************************************************************** /*****************************************************************************
...@@ -371,7 +370,7 @@ static long aout_GetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) ...@@ -371,7 +370,7 @@ static long aout_GetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
/***************************************************************************** /*****************************************************************************
* appIOProc : callback for audio output * appIOProc : callback for audio output
*****************************************************************************/ *****************************************************************************/
OSStatus appIOProc( AudioDeviceID inDevice, const AudioTimeStamp* inNow, static OSStatus appIOProc( AudioDeviceID inDevice, const AudioTimeStamp* inNow,
const void* inInputData, const AudioTimeStamp* inInputTime, const void* inInputData, const AudioTimeStamp* inInputTime,
AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime, AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime,
void* threadGlobals ) void* threadGlobals )
...@@ -436,7 +435,7 @@ static void aout_Close( aout_thread_t *p_aout ) ...@@ -436,7 +435,7 @@ static void aout_Close( aout_thread_t *p_aout )
/***************************************************************************** /*****************************************************************************
* Convert16BitIntegerTo32Float * Convert16BitIntegerTo32Float
*****************************************************************************/ *****************************************************************************/
void Convert16BitIntegerTo32Float( Ptr p_in16BitDataPtr, Ptr p_out32BitDataPtr, static void Convert16BitIntegerTo32Float( Ptr p_in16BitDataPtr, Ptr p_out32BitDataPtr,
UInt32 ui_totalBytes ) UInt32 ui_totalBytes )
{ {
UInt32 i, ui_samples = ui_totalBytes / 2 /* each 16 bit sample is 2 bytes */; UInt32 i, ui_samples = ui_totalBytes / 2 /* each 16 bit sample is 2 bytes */;
...@@ -458,7 +457,7 @@ void Convert16BitIntegerTo32Float( Ptr p_in16BitDataPtr, Ptr p_out32BitDataPtr, ...@@ -458,7 +457,7 @@ void Convert16BitIntegerTo32Float( Ptr p_in16BitDataPtr, Ptr p_out32BitDataPtr,
/***************************************************************************** /*****************************************************************************
* Convert16BitIntegerTo32FloatWithByteSwap * Convert16BitIntegerTo32FloatWithByteSwap
*****************************************************************************/ *****************************************************************************/
void Convert16BitIntegerTo32FloatWithByteSwap( Ptr p_in16BitDataPtr, static void Convert16BitIntegerTo32FloatWithByteSwap( Ptr p_in16BitDataPtr,
Ptr p_out32BitDataPtr, Ptr p_out32BitDataPtr,
UInt32 ui_totalBytes ) UInt32 ui_totalBytes )
{ {
...@@ -482,7 +481,7 @@ void Convert16BitIntegerTo32FloatWithByteSwap( Ptr p_in16BitDataPtr, ...@@ -482,7 +481,7 @@ void Convert16BitIntegerTo32FloatWithByteSwap( Ptr p_in16BitDataPtr,
/***************************************************************************** /*****************************************************************************
* Convert8BitIntegerTo32Float * Convert8BitIntegerTo32Float
*****************************************************************************/ *****************************************************************************/
void Convert8BitIntegerTo32Float( Ptr p_in8BitDataPtr, Ptr p_out32BitDataPtr, static void Convert8BitIntegerTo32Float( Ptr p_in8BitDataPtr, Ptr p_out32BitDataPtr,
UInt32 ui_totalBytes ) UInt32 ui_totalBytes )
{ {
UInt32 i, ui_samples = ui_totalBytes; UInt32 i, ui_samples = ui_totalBytes;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define MODULE_NAME macosx
#include "modules_inner.h" #include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* macosx.c : MacOS X plugin for vlc * macosx.c : MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: macosx.c,v 1.5 2001/05/30 17:03:12 sam Exp $ * $Id: macosx.c,v 1.6 2001/10/08 16:20:25 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu> * Eugenio Jarosiewicz <ej0@cise.ufl.edu>
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define MODULE_NAME macosx
#include "modules_inner.h" #include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* macosx.c : MacOS X plugin for vlc * macosx.c : MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $$ * $Id: macosx_common.h,v 1.3 2001/10/08 16:20:25 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* *
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define MODULE_NAME macosx
#include "modules_inner.h" #include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
......
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