]> git.sesse.net Git - vlc/commitdiff
New interface for MacOS X, courtesy of Florian G. Pflug.
authorChristophe Massiot <massiot@videolan.org>
Tue, 30 Oct 2001 10:48:14 +0000 (10:48 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 30 Oct 2001 10:48:14 +0000 (10:48 +0000)
38 files changed:
Makefile
configure
configure.in
extras/MacOSX/Resources/English.lproj/InfoPlist.strings [new file with mode: 0644]
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib [new file with mode: 0644]
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib [new file with mode: 0644]
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib [new file with mode: 0644]
extras/MacOSX/Resources/English.lproj/MainMenu~.nib/classes.nib [new file with mode: 0644]
extras/MacOSX/Resources/English.lproj/MainMenu~.nib/info.nib [new file with mode: 0644]
extras/MacOSX/Resources/English.lproj/MainMenu~.nib/objects.nib [new file with mode: 0644]
extras/MacOSX/Resources/pause.png [new file with mode: 0644]
extras/MacOSX/Resources/play.png [new file with mode: 0644]
extras/MacOSX/Resources/stepf.png [new file with mode: 0644]
extras/MacOSX/Resources/stepr.png [new file with mode: 0644]
extras/MacOSX/Resources/stop.png [new file with mode: 0644]
extras/MacOSX/Resources/vlc.icns [new file with mode: 0644]
extras/MacOSX/vlc.pbproj/fgp.pbxuser [new file with mode: 0644]
extras/MacOSX/vlc.pbproj/project.pbxproj [new file with mode: 0644]
extras/MacOSX_app/Contents/Info.plist [deleted file]
extras/MacOSX_app/Contents/PkgInfo [deleted file]
plugins/macosx/Makefile
plugins/macosx/intf_controller.c [new file with mode: 0644]
plugins/macosx/intf_controller.h [new file with mode: 0644]
plugins/macosx/intf_macosx.c [deleted file]
plugins/macosx/intf_main.c [moved from plugins/macosx/intf_macosx_qt.c with 66% similarity]
plugins/macosx/intf_qdview.c [new file with mode: 0644]
plugins/macosx/intf_qdview.h [new file with mode: 0644]
plugins/macosx/intf_vlc_wrapper.c [new file with mode: 0644]
plugins/macosx/intf_vlc_wrapper.h [new file with mode: 0644]
plugins/macosx/macosx.c
plugins/macosx/macosx.h [new file with mode: 0644]
plugins/macosx/macosx_common.h [deleted file]
plugins/macosx/macosx_qt.c [deleted file]
plugins/macosx/macosx_qt_common.h [deleted file]
plugins/macosx/vout_macosx.c
plugins/macosx/vout_macosx_qt.c [deleted file]
plugins/vcd/.cvsignore [new file with mode: 0644]
src/input/input.c

index 884016a78f8408dfe9501541981cc6c8ca1eb83a..10e0ea8fb2313e1767a906e32cb7c4ab64c84c76 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -133,6 +133,7 @@ clean: libdvdcss-clean plugins-clean vlc-clean
        rm -f src/*/*.o extras/*/*.o
        rm -f lib/*.so* lib/*.a
        rm -f plugins/*.so plugins/*.a
+       rm -rf extras/MacOSX/build
 
 libdvdcss-clean:
        -cd extras/libdvdcss && $(MAKE) clean
@@ -279,7 +280,7 @@ snapshot-nocss: snapshot-common
 libdvdcss-snapshot: snapshot-common
        # Remove vlc sources and icons, doc, debian directory...
        rm -Rf tmp/vlc/src tmp/vlc/share tmp/vlc/plugins tmp/vlc/doc
-       rm -Rf tmp/vlc/extras/GNUgetopt tmp/vlc/extras/MacOSX_app
+       rm -Rf tmp/vlc/extras/GNUgetopt tmp/vlc/extras/MacOSX
        rm -Rf tmp/vlc/debian
        # Remove useless headers
        rm -f tmp/vlc/include/*
@@ -321,13 +322,11 @@ gnome-vlc gvlc kvlc qvlc: vlc
 vlc.app: Makefile.opts
 ifneq (,$(findstring darwin,$(SYS)))
        rm -Rf vlc.app
-       mkdir -p vlc.app/Contents/Resources
-       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/
+       cd extras/MacOSX ; pbxbuild | grep -v '^ ' | grep -v '^\t'
+       cp -r extras/MacOSX/build/vlc.bundle ./vlc.app
+       $(INSTALL) -d vlc vlc.app/Contents/MacOS/share
+       $(INSTALL) -d vlc vlc.app/Contents/MacOS/plugins
        $(INSTALL) vlc vlc.app/Contents/MacOS/
-       $(INSTALL) share/vlc.icns vlc.app/Contents/Resources/
 ifneq (,$(PLUGINS))
        $(INSTALL) $(PLUGINS:%=plugins/%.so) vlc.app/Contents/MacOS/plugins
 endif
index 5273b7225f3bcdff402f3cff82180834bbd9fbf9..ad3878fb943442783b91018d980f364469ea3afc 100755 (executable)
--- a/configure
+++ b/configure
@@ -2325,12 +2325,15 @@ else
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
 # ifndef HAVE_SYS_PARAM_H
@@ -2385,7 +2388,7 @@ main()
        /*
         * First, make a file with some known garbage in it.
         */
-       data = malloc(pagesize);
+       data = (char*)malloc(pagesize);
        if (!data)
                exit(1);
        for (i = 0; i < pagesize; ++i)
@@ -2406,7 +2409,7 @@ main()
        fd = open("conftestmmap", O_RDWR);
        if (fd < 0)
                exit(1);
-       data2 = malloc(2 * pagesize);
+       data2 = (char*)malloc(2 * pagesize);
        if (!data2)
                exit(1);
        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2424,7 +2427,7 @@ main()
         */
        for (i = 0; i < pagesize; ++i)
                *(data2 + i) = *(data2 + i) + 1;
-       data3 = malloc(pagesize);
+       data3 = (char*)malloc(pagesize);
        if (!data3)
                exit(1);
        if (read(fd, data3, pagesize) != pagesize)
@@ -2438,7 +2441,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2461,12 +2464,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2465: checking return type of signal handlers" >&5
+echo "configure:2468: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2470 "configure"
+#line 2473 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2483,7 +2486,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2502,7 +2505,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2506: checking for dlopen in -ldl" >&5
+echo "configure:2509: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2510,7 +2513,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2514 "configure"
+#line 2517 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2521,7 +2524,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2542,7 +2545,7 @@ else
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:2546: checking for pow in -lm" >&5
+echo "configure:2549: checking for pow in -lm" >&5
 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2550,7 +2553,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2554 "configure"
+#line 2557 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2561,7 +2564,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2585,7 +2588,7 @@ fi
 THREAD_LIB=error
 if test "x${THREAD_LIB}" = xerror; then
   echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
-echo "configure:2589: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:2592: checking for pthread_attr_init in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2593,7 +2596,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2597 "configure"
+#line 2600 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2604,7 +2607,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2627,7 +2630,7 @@ fi
 fi
 if test "x${THREAD_LIB}" = xerror; then
   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:2631: checking for pthread_attr_init in -lpthreads" >&5
+echo "configure:2634: checking for pthread_attr_init in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2635,7 +2638,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2639 "configure"
+#line 2642 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2646,7 +2649,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2669,7 +2672,7 @@ fi
 fi
 if test "x${THREAD_LIB}" = xerror; then
   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
-echo "configure:2673: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:2676: checking for pthread_attr_init in -lc_r" >&5
 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2677,7 +2680,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2681 "configure"
+#line 2684 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2688,7 +2691,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2711,12 +2714,12 @@ fi
 fi
 if test "x${THREAD_LIB}" = xerror; then
   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
-echo "configure:2715: checking for pthread_attr_init" >&5
+echo "configure:2718: checking for pthread_attr_init" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2720 "configure"
+#line 2723 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_attr_init(); below.  */
@@ -2739,7 +2742,7 @@ pthread_attr_init();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pthread_attr_init=yes"
 else
@@ -2762,7 +2765,7 @@ fi
 fi
 
 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:2766: checking for cthread_fork in -lthreads" >&5
+echo "configure:2769: checking for cthread_fork in -lthreads" >&5
 ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2770,7 +2773,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
+#line 2777 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2781,7 +2784,7 @@ int main() {
 cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2803,7 +2806,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 2807 "configure"
+#line 2810 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -2819,7 +2822,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 2823 "configure"
+#line 2826 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
@@ -2839,17 +2842,17 @@ for ac_hdr in stddef.h getopt.h strings.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2843: checking for $ac_hdr" >&5
+echo "configure:2846: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
+#line 2851 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2879,17 +2882,17 @@ for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2883: checking for $ac_hdr" >&5
+echo "configure:2886: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2888 "configure"
+#line 2891 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2919,17 +2922,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2923: checking for $ac_hdr" >&5
+echo "configure:2926: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2928 "configure"
+#line 2931 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2959,17 +2962,17 @@ for ac_hdr in dlfcn.h image.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2963: checking for $ac_hdr" >&5
+echo "configure:2966: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2968 "configure"
+#line 2971 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2999,17 +3002,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3003: checking for $ac_hdr" >&5
+echo "configure:3006: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3008 "configure"
+#line 3011 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3039,17 +3042,17 @@ for ac_hdr in machine/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3043: checking for $ac_hdr" >&5
+echo "configure:3046: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3048 "configure"
+#line 3051 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3080,17 +3083,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3084: checking for $ac_hdr" >&5
+echo "configure:3087: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3089 "configure"
+#line 3092 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3118,20 +3121,20 @@ done
 
 
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:3122: checking for ntohl in sys/param.h" >&5
+echo "configure:3125: checking for ntohl in sys/param.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -Wall -Werror"
      cat > conftest.$ac_ext <<EOF
-#line 3128 "configure"
+#line 3131 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 int main() {
 void foo() { int meuh; ntohl(meuh); }
 ; return 0; }
 EOF
-if { (eval echo configure:3135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_ntohl_sys_param_h=yes
 else
@@ -3152,20 +3155,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:3156: checking if \$CC accepts -finline-limit" >&5
+echo "configure:3159: checking if \$CC accepts -finline-limit" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -finline-limit-30000"
      cat > conftest.$ac_ext <<EOF
-#line 3162 "configure"
+#line 3165 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline_limit=yes
 else
@@ -3183,20 +3186,20 @@ if test x"$ac_cv_c_inline_limit" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
-echo "configure:3187: checking if \$CC accepts -bundle -undefined error" >&5
+echo "configure:3190: checking if \$CC accepts -bundle -undefined error" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -bundle -undefined error"
      cat > conftest.$ac_ext <<EOF
-#line 3193 "configure"
+#line 3196 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_darwin=yes
 else
@@ -3214,20 +3217,20 @@ if test x"$ac_cv_ld_darwin" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:3218: checking if \$CC accepts -shared" >&5
+echo "configure:3221: checking if \$CC accepts -shared" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -shared"
      cat > conftest.$ac_ext <<EOF
-#line 3224 "configure"
+#line 3227 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_plugins=yes
 else
@@ -3246,7 +3249,7 @@ fi
         
 if test x"${SOFLAGS}" = x; then
     echo $ac_n "checking for soname setting""... $ac_c" 1>&6
-echo "configure:3250: checking for soname setting" >&5
+echo "configure:3253: checking for soname setting" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3255,14 +3258,14 @@ else
         try_SOFLAGS="-Wl,-soname -Wl,"
         LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
         cat > conftest.$ac_ext <<EOF
-#line 3259 "configure"
+#line 3262 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_soname="${try_SOFLAGS}"
 else
@@ -3274,14 +3277,14 @@ else
             try_SOFLAGS="-Wl,-h -Wl,"
             LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
             cat > conftest.$ac_ext <<EOF
-#line 3278 "configure"
+#line 3281 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_soname="${try_SOFLAGS}"
 else
@@ -3310,7 +3313,7 @@ have problems using libdvdcss.
 fi
 
 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:3314: checking __attribute__ ((aligned ())) support" >&5
+echo "configure:3317: checking __attribute__ ((aligned ())) support" >&5
 if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3318,14 +3321,14 @@ else
        CFLAGS="${save_CFLAGS} -Werror"
     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
         cat > conftest.$ac_ext <<EOF
-#line 3322 "configure"
+#line 3325 "configure"
 #include "confdefs.h"
 
 int main() {
 static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
 ; return 0; }
 EOF
-if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
 else
@@ -3348,19 +3351,19 @@ CFLAGS="${save_CFLAGS}"
 LDFLAGS="${save_LDFLAGS}"
 
 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3352: checking for boolean_t in sys/types.h" >&5
+echo "configure:3355: checking for boolean_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3357 "configure"
+#line 3360 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 void quux() { boolean_t foo; }
 ; return 0; }
 EOF
-if { (eval echo configure:3364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_sys_types_h=yes
 else
@@ -3381,19 +3384,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:3385: checking for boolean_t in pthread.h" >&5
+echo "configure:3388: checking for boolean_t in pthread.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3390 "configure"
+#line 3393 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
 void quux() { boolean_t foo; }
 ; return 0; }
 EOF
-if { (eval echo configure:3397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_pthread_h=yes
 else
@@ -3414,19 +3417,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
-echo "configure:3418: checking for boolean_t in cthreads.h" >&5
+echo "configure:3421: checking for boolean_t in cthreads.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3423 "configure"
+#line 3426 "configure"
 #include "confdefs.h"
 #include <cthreads.h>
 int main() {
 void quux() { boolean_t foo; }
 ; return 0; }
 EOF
-if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_cthreads_h=yes
 else
@@ -3447,18 +3450,18 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3451: checking for working const" >&5
+echo "configure:3454: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3456 "configure"
+#line 3459 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
+typedef int charset[2]; const charset x = {0,0};
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -3501,7 +3504,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3522,12 +3525,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3526: checking for ANSI C header files" >&5
+echo "configure:3529: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 3534 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3535,7 +3538,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3552,7 +3555,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3556 "configure"
+#line 3559 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3570,7 +3573,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3574 "configure"
+#line 3577 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3591,7 +3594,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3595 "configure"
+#line 3598 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3602,7 +3605,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3626,12 +3629,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3630: checking for size_t" >&5
+echo "configure:3633: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3635 "configure"
+#line 3638 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3659,12 +3662,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3663: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3666: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3668 "configure"
+#line 3671 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3673,7 +3676,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3707,19 +3710,19 @@ SSE_MODULES="imdctsse downmixsse"
 ALTIVEC_MODULES="idctaltivec motionaltivec"
 
 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:3711: checking if \$CC groks MMX inline assembly" >&5
+echo "configure:3714: checking if \$CC groks MMX inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3716 "configure"
+#line 3719 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));}
 ; return 0; }
 EOF
-if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmx_inline=yes
 else
@@ -3737,19 +3740,19 @@ if test x"$ac_cv_mmx_inline" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
-echo "configure:3741: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:3744: checking if \$CC groks MMX EXT inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3746 "configure"
+#line 3749 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));}
 ; return 0; }
 EOF
-if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmxext_inline=yes
 else
@@ -3767,19 +3770,19 @@ if test x"$ac_cv_mmxext_inline" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
-echo "configure:3771: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:3774: checking if \$CC groks 3D Now! inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3776 "configure"
+#line 3779 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));}
 ; return 0; }
 EOF
-if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3dnow_inline=yes
 else
@@ -3801,19 +3804,19 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:3805: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:3808: checking if \$CC groks SSE inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3810 "configure"
+#line 3813 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));}
 ; return 0; }
 EOF
-if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sse_inline=yes
 else
@@ -3835,19 +3838,19 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
-echo "configure:3839: checking if \$CC groks Altivec inline assembly" >&5
+echo "configure:3842: checking if \$CC groks Altivec inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3844 "configure"
+#line 3847 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){asm volatile("vperm 0,1,2,3");}
 ; return 0; }
 EOF
-if { (eval echo configure:3851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes
 else
@@ -3857,14 +3860,14 @@ else
   save_CFLAGS=$CFLAGS
           CFLAGS="$CFLAGS -Wa,-m7400"
           cat > conftest.$ac_ext <<EOF
-#line 3861 "configure"
+#line 3864 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){asm volatile("vperm 0,1,2,3");}
 ; return 0; }
 EOF
-if { (eval echo configure:3868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes; CFLAGS_ALTIVEC="-Wa,-m7400"
 else
@@ -3890,7 +3893,7 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
-echo "configure:3894: checking if \$CC groks Altivec C extensions" >&5
+echo "configure:3897: checking if \$CC groks Altivec C extensions" >&5
 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3898,14 +3901,14 @@ else
      CFLAGS="$CFLAGS -faltivec"
      # Darwin test
      cat > conftest.$ac_ext <<EOF
-#line 3902 "configure"
+#line 3905 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){vec_mtvscr((vector unsigned int)(0));}
 ; return 0; }
 EOF
-if { (eval echo configure:3909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec=-faltivec
 else
@@ -3916,14 +3919,14 @@ else
         # Linux/PPC test
         CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 3920 "configure"
+#line 3923 "configure"
 #include "confdefs.h"
 
 int main() {
 void quux(){vec_mtvscr((vector unsigned int)(0));}
 ; return 0; }
 EOF
-if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec="-fvec"
 else
@@ -3950,21 +3953,21 @@ EOF
 fi
 
 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
-echo "configure:3954: checking if linker needs -framework vecLib" >&5
+echo "configure:3957: checking if linker needs -framework vecLib" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   save_LDFLAGS=$LDFLAGS
      LDFLAGS="$LDFLAGS -framework vecLib"
      cat > conftest.$ac_ext <<EOF
-#line 3961 "configure"
+#line 3964 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_altivec=yes
 else
@@ -3990,17 +3993,17 @@ for ac_hdr in winioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3994: checking for $ac_hdr" >&5
+echo "configure:3997: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3999 "configure"
+#line 4002 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4033,17 +4036,17 @@ for ac_hdr in sys/ioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4037: checking for $ac_hdr" >&5
+echo "configure:4040: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4042 "configure"
+#line 4045 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4069,17 +4072,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4073: checking for $ac_hdr" >&5
+echo "configure:4076: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4078 "configure"
+#line 4081 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4108,7 +4111,7 @@ done
   BSD_DVD_STRUCT=0
   LINUX_DVD_STRUCT=0
         cat > conftest.$ac_ext <<EOF
-#line 4112 "configure"
+#line 4115 "configure"
 #include "confdefs.h"
 #include <sys/cdio.h>
 EOF
@@ -4121,7 +4124,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 EOF
 
     cat > conftest.$ac_ext <<EOF
-#line 4125 "configure"
+#line 4128 "configure"
 #include "confdefs.h"
 #include <sys/cdio.h>
 EOF
@@ -4141,7 +4144,7 @@ fi
 rm -f conftest*
 
         cat > conftest.$ac_ext <<EOF
-#line 4145 "configure"
+#line 4148 "configure"
 #include "confdefs.h"
 #include <sys/dvdio.h>
 EOF
@@ -4154,7 +4157,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 EOF
 
     cat > conftest.$ac_ext <<EOF
-#line 4158 "configure"
+#line 4161 "configure"
 #include "confdefs.h"
 #include <sys/dvdio.h>
 EOF
@@ -4174,7 +4177,7 @@ fi
 rm -f conftest*
 
         cat > conftest.$ac_ext <<EOF
-#line 4178 "configure"
+#line 4181 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -4193,7 +4196,7 @@ rm -f conftest*
 
         NEED_BSDI_LIBDVD=0
   cat > conftest.$ac_ext <<EOF
-#line 4197 "configure"
+#line 4200 "configure"
 #include "confdefs.h"
 #include <dvd.h>
 EOF
@@ -4215,17 +4218,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4219: checking for $ac_hdr" >&5
+echo "configure:4222: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4224 "configure"
+#line 4227 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4265,17 +4268,17 @@ rm -f conftest*
 
         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
-echo "configure:4269: checking for sys/scsi/scsi_types.h" >&5
+echo "configure:4272: checking for sys/scsi/scsi_types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4274 "configure"
+#line 4277 "configure"
 #include "confdefs.h"
 #include <sys/scsi/scsi_types.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4294,17 +4297,17 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   
     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
-echo "configure:4298: checking for sys/scsi/impl/uscsi.h" >&5
+echo "configure:4301: checking for sys/scsi/impl/uscsi.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4303 "configure"
+#line 4306 "configure"
 #include "confdefs.h"
 #include <sys/scsi/impl/uscsi.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4456,7 +4459,7 @@ if test "${enable_pth+set}" = set; then
   enableval="$enable_pth"
    if test x$enableval = xyes; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:4460: checking for pth_init in -lpth" >&5
+echo "configure:4463: checking for pth_init in -lpth" >&5
 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4464,7 +4467,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4468 "configure"
+#line 4471 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4475,7 +4478,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4503,7 +4506,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 4507 "configure"
+#line 4510 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -4610,7 +4613,7 @@ fi
 if test x$enable_vcd != xno
 then
   cat > conftest.$ac_ext <<EOF
-#line 4614 "configure"
+#line 4617 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -4692,7 +4695,7 @@ if test "${enable_esd+set}" = set; then
      # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4696: checking for $ac_word" >&5
+echo "configure:4699: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4749,27 +4752,26 @@ if test "${enable_macosx+set}" = set; then
   enableval="$enable_macosx"
   if test x$enable_macosx = xyes
    then
-     BUILTINS="${BUILTINS} macosx macosx_qt"
-     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
-     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
-     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
+     BUILTINS="${BUILTINS} macosx"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB="${LIB} -ObjC"
    fi
 else
-  for ac_hdr in Carbon/Carbon.h
+  for ac_hdr in Cocoa/Cocoa.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4763: checking for $ac_hdr" >&5
+echo "configure:4765: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4768 "configure"
+#line 4770 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4789,10 +4791,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
- BUILTINS="${BUILTINS} macosx macosx_qt"
-     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
-     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
-     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
+ BUILTINS="${BUILTINS} macosx"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB="${LIB} -ObjC"
    
 else
   echo "$ac_t""no" 1>&6
@@ -4814,17 +4815,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4818: checking for $ac_hdr" >&5
+echo "configure:4819: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4823 "configure"
+#line 4824 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4902,7 +4903,7 @@ fi
   # Extract the first word of "sdl12-config", so it can be a program name with args.
 set dummy sdl12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4906: checking for $ac_word" >&5
+echo "configure:4907: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4942,7 +4943,7 @@ fi
     # Extract the first word of "sdl11-config", so it can be a program name with args.
 set dummy sdl11-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4946: checking for $ac_word" >&5
+echo "configure:4947: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4983,7 +4984,7 @@ fi
     # Extract the first word of "sdl-config", so it can be a program name with args.
 set dummy sdl-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4987: checking for $ac_word" >&5
+echo "configure:4988: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5029,17 +5030,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5033: checking for $ac_hdr" >&5
+echo "configure:5034: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5038 "configure"
+#line 5039 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5102,17 +5103,17 @@ if test "${with_directx+set}" = set; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5106: checking for $ac_hdr" >&5
+echo "configure:5107: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5111 "configure"
+#line 5112 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5151,17 +5152,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5155: checking for $ac_hdr" >&5
+echo "configure:5156: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5160 "configure"
+#line 5161 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5258,7 +5259,7 @@ if test "${enable_gnome+set}" = set; then
     # Extract the first word of "gnome-config", so it can be a program name with args.
 set dummy gnome-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5262: checking for $ac_word" >&5
+echo "configure:5263: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5303,17 +5304,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5307: checking for $ac_hdr" >&5
+echo "configure:5308: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5312 "configure"
+#line 5313 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5363,7 +5364,7 @@ then
   # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5367: checking for $ac_word" >&5
+echo "configure:5368: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5408,17 +5409,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5412: checking for $ac_hdr" >&5
+echo "configure:5413: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5417 "configure"
+#line 5418 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5469,17 +5470,17 @@ if test x$enable_x11 != xno; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5473: checking for $ac_hdr" >&5
+echo "configure:5474: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5478 "configure"
+#line 5479 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5531,17 +5532,17 @@ if test x$enable_xvideo != xno; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5535: checking for $ac_hdr" >&5
+echo "configure:5536: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5540 "configure"
+#line 5541 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5581,17 +5582,17 @@ if test "${enable_alsa+set}" = set; then
    then
      ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:5585: checking for sys/asoundlib.h" >&5
+echo "configure:5586: checking for sys/asoundlib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5590 "configure"
+#line 5591 "configure"
 #include "confdefs.h"
 #include <sys/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5608,7 +5609,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:5612: checking for main in -lasound" >&5
+echo "configure:5613: checking for main in -lasound" >&5
 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5616,14 +5617,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5620 "configure"
+#line 5621 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
index 7d7db99e97a4288eba4dee56b3d3d389b2bb5322..55a762ce8eccbdd05b584dfd0eeda34e7fce7251 100644 (file)
@@ -761,16 +761,14 @@ AC_ARG_ENABLE(macosx,
   [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
   [if test x$enable_macosx = xyes
    then
-     BUILTINS="${BUILTINS} macosx macosx_qt"
-     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
-     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
-     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
+     BUILTINS="${BUILTINS} macosx"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB="${LIB} -ObjC"
    fi],
-  [AC_CHECK_HEADERS(Carbon/Carbon.h,
-     BUILTINS="${BUILTINS} macosx macosx_qt"
-     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL -framework QuickTime"
-     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
-     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
+  [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
+     BUILTINS="${BUILTINS} macosx"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB="${LIB} -ObjC"
    )])
 
 dnl
diff --git a/extras/MacOSX/Resources/English.lproj/InfoPlist.strings b/extras/MacOSX/Resources/English.lproj/InfoPlist.strings
new file mode 100644 (file)
index 0000000..c478562
Binary files /dev/null and b/extras/MacOSX/Resources/English.lproj/InfoPlist.strings differ
diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
new file mode 100644 (file)
index 0000000..a7cbbe6
--- /dev/null
@@ -0,0 +1,38 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {
+                fullscreen_toggle = id; 
+                pause = id; 
+                play = id; 
+                speedslider_update = id; 
+                timeslider_update = id; 
+            }; 
+            CLASS = Intf_Controller; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                o_currenttime = id; 
+                o_menu_fullscreen = id; 
+                o_outputpanel = id; 
+                o_pause = id; 
+                o_play = id; 
+                o_playlistds = id; 
+                o_qdview = id; 
+                o_stepf = id; 
+                o_stepr = id; 
+                o_stop = id; 
+                o_timeslider = id; 
+            }; 
+            SUPERCLASS = NSObject; 
+        }, 
+        {
+            CLASS = Intf_PlaylistDS; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {o_table = id; }; 
+            SUPERCLASS = NSObject; 
+        }, 
+        {CLASS = VlcQuickDrawView; LANGUAGE = ObjC; SUPERCLASS = NSQuickDrawView; }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
new file mode 100644 (file)
index 0000000..903d320
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>87 157 428 240 0 0 1280 938 </string>
+       <key>IBFramework Version</key>
+       <string>219.0</string>
+       <key>IBMainMenuLocation</key>
+       <string>420 524 257 44 0 0 1280 938 </string>
+       <key>IBSystem Version</key>
+       <string>5L14</string>
+       <key>IBUserGuides</key>
+       <dict/>
+</dict>
+</plist>
diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
new file mode 100644 (file)
index 0000000..dcb05df
Binary files /dev/null and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/classes.nib b/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/classes.nib
new file mode 100644 (file)
index 0000000..a7cbbe6
--- /dev/null
@@ -0,0 +1,38 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {
+                fullscreen_toggle = id; 
+                pause = id; 
+                play = id; 
+                speedslider_update = id; 
+                timeslider_update = id; 
+            }; 
+            CLASS = Intf_Controller; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                o_currenttime = id; 
+                o_menu_fullscreen = id; 
+                o_outputpanel = id; 
+                o_pause = id; 
+                o_play = id; 
+                o_playlistds = id; 
+                o_qdview = id; 
+                o_stepf = id; 
+                o_stepr = id; 
+                o_stop = id; 
+                o_timeslider = id; 
+            }; 
+            SUPERCLASS = NSObject; 
+        }, 
+        {
+            CLASS = Intf_PlaylistDS; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {o_table = id; }; 
+            SUPERCLASS = NSObject; 
+        }, 
+        {CLASS = VlcQuickDrawView; LANGUAGE = ObjC; SUPERCLASS = NSQuickDrawView; }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/info.nib b/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/info.nib
new file mode 100644 (file)
index 0000000..903d320
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>87 157 428 240 0 0 1280 938 </string>
+       <key>IBFramework Version</key>
+       <string>219.0</string>
+       <key>IBMainMenuLocation</key>
+       <string>420 524 257 44 0 0 1280 938 </string>
+       <key>IBSystem Version</key>
+       <string>5L14</string>
+       <key>IBUserGuides</key>
+       <dict/>
+</dict>
+</plist>
diff --git a/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/objects.nib b/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/objects.nib
new file mode 100644 (file)
index 0000000..c50e0e5
Binary files /dev/null and b/extras/MacOSX/Resources/English.lproj/MainMenu~.nib/objects.nib differ
diff --git a/extras/MacOSX/Resources/pause.png b/extras/MacOSX/Resources/pause.png
new file mode 100644 (file)
index 0000000..ccefc9a
Binary files /dev/null and b/extras/MacOSX/Resources/pause.png differ
diff --git a/extras/MacOSX/Resources/play.png b/extras/MacOSX/Resources/play.png
new file mode 100644 (file)
index 0000000..82eb6ed
Binary files /dev/null and b/extras/MacOSX/Resources/play.png differ
diff --git a/extras/MacOSX/Resources/stepf.png b/extras/MacOSX/Resources/stepf.png
new file mode 100644 (file)
index 0000000..037cf15
Binary files /dev/null and b/extras/MacOSX/Resources/stepf.png differ
diff --git a/extras/MacOSX/Resources/stepr.png b/extras/MacOSX/Resources/stepr.png
new file mode 100644 (file)
index 0000000..ef82a65
Binary files /dev/null and b/extras/MacOSX/Resources/stepr.png differ
diff --git a/extras/MacOSX/Resources/stop.png b/extras/MacOSX/Resources/stop.png
new file mode 100644 (file)
index 0000000..0ae0658
Binary files /dev/null and b/extras/MacOSX/Resources/stop.png differ
diff --git a/extras/MacOSX/Resources/vlc.icns b/extras/MacOSX/Resources/vlc.icns
new file mode 100644 (file)
index 0000000..b624528
Binary files /dev/null and b/extras/MacOSX/Resources/vlc.icns differ
diff --git a/extras/MacOSX/vlc.pbproj/fgp.pbxuser b/extras/MacOSX/vlc.pbproj/fgp.pbxuser
new file mode 100644 (file)
index 0000000..07d1231
--- /dev/null
@@ -0,0 +1,109 @@
+// !$*UTF8*$!
+{
+       F510A6CD01738ED001A80A1F = {
+               uiCtxt = {
+                       sepNavWindowFrame = "{{15, 431}, {750, 502}}";
+               };
+       };
+       F511306E0170620B01A80A1F = {
+               activeBuildStyle = F51130710170620B01A80A1F;
+               activeTarget = F52EEB23017E3F0701A80A1F;
+               addToTargets = (
+                       F52EEB23017E3F0701A80A1F,
+               );
+               breakpoints = (
+               );
+               perUserDictionary = {
+                       PBXWorkspaceConfiguration = {
+                               ContentSize = "{1280, 819}";
+                               LeftSlideOut = {
+                                       ActiveTab = 0;
+                                       Frame = "{{0, 23}, {1280, 796}}";
+                                       Split0 = {
+                                               ActiveTab = 2;
+                                               Frame = "{{323, 0}, {957, 796}}";
+                                               Split0 = {
+                                                       Frame = "{{0, 75}, {957, 721}}";
+                                               };
+                                               SplitCount = 1;
+                                               Tab0 = {
+                                                       Debugger = {
+                                                               Frame = "{{0, 0}, {484, 208}}";
+                                                               Split0 = {
+                                                                       Frame = "{{0, 25}, {484, 183}}";
+                                                                       Split0 = {
+                                                                               Frame = "{{0, 0}, {236, 183}}";
+                                                                       };
+                                                                       Split1 = {
+                                                                               Frame = "{{245, 0}, {239, 183}}";
+                                                                       };
+                                                                       SplitCount = 2;
+                                                               };
+                                                               SplitCount = 1;
+                                                               Tab0 = {
+                                                                       Frame = "{{0, 0}, {100, 50}}";
+                                                               };
+                                                               Tab1 = {
+                                                                       Frame = "{{0, 0}, {100, 50}}";
+                                                               };
+                                                               TabCount = 2;
+                                                       };
+                                                       Frame = "{{0, 0}, {484, 208}}";
+                                                       LauncherConfigVersion = 4;
+                                               };
+                                               Tab1 = {
+                                                       Frame = "{{0, 0}, {484, 208}}";
+                                                       LauncherConfigVersion = 3;
+                                                       Runner = {
+                                                               Frame = "{{0, 0}, {484, 208}}";
+                                                       };
+                                               };
+                                               Tab2 = {
+                                                       BuildMessageFrame = "{{0, 0}, {959, 43}}";
+                                                       BuildTranscriptFrame = "{{0, 52}, {959, 0}}";
+                                                       Frame = "{{0, 0}, {957, 50}}";
+                                               };
+                                               Tab3 = {
+                                                       Frame = "{{0, 0}, {612, 295}}";
+                                               };
+                                               TabCount = 4;
+                                       };
+                                       SplitCount = 1;
+                                       Tab0 = {
+                                               Frame = "{{0, 0}, {298, 796}}";
+                                       };
+                                       Tab1 = {
+                                               ClassesFrame = "{{0, 0}, {202, 56}}";
+                                               Frame = "{{0, 0}, {200, 100}}";
+                                               MembersFrame = "{{0, 65}, {202, 35}}";
+                                               OptionsSetName = "Hierarchy, all classes";
+                                       };
+                                       Tab2 = {
+                                               Frame = "{{0, 0}, {200, 100}}";
+                                       };
+                                       Tab3 = {
+                                               Frame = "{{0, 0}, {200, 718}}";
+                                               Split0 = {
+                                                       Frame = "{{0, 0}, {200, 349}}";
+                                               };
+                                               Split1 = {
+                                                       Frame = "{{0, 358}, {200, 360}}";
+                                               };
+                                               SplitCount = 2;
+                                       };
+                                       Tab4 = {
+                                               Frame = "{{0, 0}, {250, 781}}";
+                                       };
+                                       TabCount = 5;
+                               };
+                       };
+               };
+               wantsIndex = 1;
+               wantsSCM = 0;
+       };
+       F52EEB23017E3F0701A80A1F = {
+               activeExec = 0;
+               customExecs = {
+               };
+       };
+}
diff --git a/extras/MacOSX/vlc.pbproj/project.pbxproj b/extras/MacOSX/vlc.pbproj/project.pbxproj
new file mode 100644 (file)
index 0000000..325d195
--- /dev/null
@@ -0,0 +1,347 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 34;
+       objects = {
+               F510A6CC01738ED001A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_vlc_wrapper.h;
+                       path = plugins/macosx/intf_vlc_wrapper.h;
+                       refType = 4;
+               };
+               F510A6CD01738ED001A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_vlc_wrapper.c;
+                       path = plugins/macosx/intf_vlc_wrapper.c;
+                       refType = 4;
+               };
+               F511306E0170620B01A80A1F = {
+                       buildStyles = (
+                               F51130710170620B01A80A1F,
+                       );
+                       isa = PBXProject;
+                       mainGroup = F511306F0170620B01A80A1F;
+                       productRefGroup = F511306F0170620B01A80A1F;
+                       projectDirPath = "";
+                       targets = (
+                               F52EEB23017E3F0701A80A1F,
+                       );
+               };
+               F511306F0170620B01A80A1F = {
+                       children = (
+                               F5121224017062C501A80A1F,
+                               F5121225017062C501A80A1F,
+                               F52EEB22017E3F0701A80A1F,
+                       );
+                       isa = PBXGroup;
+                       refType = 4;
+               };
+               F51130710170620B01A80A1F = {
+                       buildRules = (
+                       );
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                       };
+                       isa = PBXBuildStyle;
+                       name = Deployment;
+               };
+               F51212220170627901A80A1F = {
+                       children = (
+                               F51212230170627901A80A1F,
+                       );
+                       isa = PBXVariantGroup;
+                       name = MainMenu.nib;
+                       path = "";
+                       refType = 4;
+               };
+               F51212230170627901A80A1F = {
+                       isa = PBXFileReference;
+                       name = English;
+                       path = English.lproj/MainMenu.nib;
+                       refType = 4;
+               };
+               F5121224017062C501A80A1F = {
+                       children = (
+                               F512122B0170635601A80A1F,
+                               F512122C0170635601A80A1F,
+                               F512122D0170635601A80A1F,
+                               F512122F0170635601A80A1F,
+                               F51212300170635601A80A1F,
+                               F51212310170635601A80A1F,
+                               F51212320170635601A80A1F,
+                               F510A6CC01738ED001A80A1F,
+                               F510A6CD01738ED001A80A1F,
+                               F53A3B49018DECF201A80A1F,
+                               F53A3B4A018DECF201A80A1F,
+                       );
+                       isa = PBXGroup;
+                       name = Files;
+                       path = ../..;
+                       refType = 2;
+               };
+               F5121225017062C501A80A1F = {
+                       children = (
+                               F51212220170627901A80A1F,
+                               F51352740170655D01A80A1F,
+                               F513527F0170659801A80A1F,
+                               F51352800170659801A80A1F,
+                               F51352810170659801A80A1F,
+                               F51352820170659801A80A1F,
+                               F52EEB2F017E3F8C01A80A1F,
+                       );
+                       isa = PBXGroup;
+                       path = Resources;
+                       refType = 2;
+               };
+               F512122B0170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = aout_macosx.c;
+                       path = plugins/macosx/aout_macosx.c;
+                       refType = 4;
+               };
+               F512122C0170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_controller.c;
+                       path = plugins/macosx/intf_controller.c;
+                       refType = 4;
+               };
+               F512122D0170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_controller.h;
+                       path = plugins/macosx/intf_controller.h;
+                       refType = 4;
+               };
+               F512122F0170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_main.c;
+                       path = plugins/macosx/intf_main.c;
+                       refType = 4;
+               };
+               F51212300170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = macosx.c;
+                       path = plugins/macosx/macosx.c;
+                       refType = 4;
+               };
+               F51212310170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = macosx.h;
+                       path = plugins/macosx/macosx.h;
+                       refType = 4;
+               };
+               F51212320170635601A80A1F = {
+                       isa = PBXFileReference;
+                       name = vout_macosx.c;
+                       path = plugins/macosx/vout_macosx.c;
+                       refType = 4;
+               };
+               F51352740170655D01A80A1F = {
+                       isa = PBXFileReference;
+                       path = pause.png;
+                       refType = 4;
+               };
+               F513527F0170659801A80A1F = {
+                       isa = PBXFileReference;
+                       path = play.png;
+                       refType = 4;
+               };
+               F51352800170659801A80A1F = {
+                       isa = PBXFileReference;
+                       path = stepf.png;
+                       refType = 4;
+               };
+               F51352810170659801A80A1F = {
+                       isa = PBXFileReference;
+                       path = stepr.png;
+                       refType = 4;
+               };
+               F51352820170659801A80A1F = {
+                       isa = PBXFileReference;
+                       path = stop.png;
+                       refType = 4;
+               };
+               F52EEB22017E3F0701A80A1F = {
+                       isa = PBXBundleReference;
+                       path = vlc.bundle;
+                       refType = 3;
+               };
+               F52EEB23017E3F0701A80A1F = {
+                       buildPhases = (
+                               F52EEB24017E3F0701A80A1F,
+                               F52EEB25017E3F0701A80A1F,
+                               F52EEB2C017E3F0701A80A1F,
+                               F52EEB2D017E3F0701A80A1F,
+                               F52EEB2E017E3F0701A80A1F,
+                       );
+                       buildSettings = {
+                               DEBUGGING_SYMBOLS = NO;
+                               OPTIMIZATION_CFLAGS = "-O3";
+                               OTHER_CFLAGS = "";
+                               OTHER_LDFLAGS = "-bundle -undefined suppress";
+                               OTHER_REZFLAGS = "";
+                               PRODUCT_NAME = vlc;
+                               SECTORDER_FLAGS = "";
+                               WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+                               WRAPPER_EXTENSION = bundle;
+                       };
+                       dependencies = (
+                       );
+                       isa = PBXBundleTarget;
+                       name = vlc;
+                       productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
+                       productName = vlc.app;
+                       productReference = F52EEB22017E3F0701A80A1F;
+                       productSettingsXML = "<?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>CFBundleDocumentTypes</key>
+       <array>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>VOB</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>vlc.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>VOB File (DVD)</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Viewer</string>
+               </dict>
+       </array>
+       <key>CFBundleExecutable</key>
+       <string>vlc</string>
+       <key>CFBundleGetInfoString</key>
+       <string>VideoLan Client</string>
+       <key>CFBundleIconFile</key>
+       <string>vlc.icns</string>
+       <key>CFBundleIdentifier</key>
+       <string>org.videolan.vlc</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>vlc</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>vlc 0.2.90</string>
+       <key>CFBundleVersion</key>
+       <string>0.2.90</string>
+       <key>NSMainNibFile</key>
+       <string>MainMenu</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+</dict>
+</plist>
+";
+                       shouldUseHeadermap = 0;
+               };
+               F52EEB24017E3F0701A80A1F = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXHeadersBuildPhase;
+                       name = Headers;
+               };
+               F52EEB25017E3F0701A80A1F = {
+                       buildActionMask = 2147483647;
+                       files = (
+                               F52EEB26017E3F0701A80A1F,
+                               F52EEB27017E3F0701A80A1F,
+                               F52EEB28017E3F0701A80A1F,
+                               F52EEB29017E3F0701A80A1F,
+                               F52EEB2A017E3F0701A80A1F,
+                               F52EEB2B017E3F0701A80A1F,
+                               F52EEB30017E3F8C01A80A1F,
+                       );
+                       isa = PBXResourcesBuildPhase;
+                       name = "Bundle Resources";
+               };
+               F52EEB26017E3F0701A80A1F = {
+                       fileRef = F51212220170627901A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F52EEB27017E3F0701A80A1F = {
+                       fileRef = F51352740170655D01A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F52EEB28017E3F0701A80A1F = {
+                       fileRef = F513527F0170659801A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F52EEB29017E3F0701A80A1F = {
+                       fileRef = F51352800170659801A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F52EEB2A017E3F0701A80A1F = {
+                       fileRef = F51352810170659801A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F52EEB2B017E3F0701A80A1F = {
+                       fileRef = F51352820170659801A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F52EEB2C017E3F0701A80A1F = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXSourcesBuildPhase;
+                       name = Sources;
+               };
+               F52EEB2D017E3F0701A80A1F = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXFrameworksBuildPhase;
+                       name = "Frameworks & Libraries";
+               };
+               F52EEB2E017E3F0701A80A1F = {
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       isa = PBXRezBuildPhase;
+                       name = "ResourceManager Resources";
+               };
+               F52EEB2F017E3F8C01A80A1F = {
+                       isa = PBXFileReference;
+                       path = vlc.icns;
+                       refType = 4;
+               };
+               F52EEB30017E3F8C01A80A1F = {
+                       fileRef = F52EEB2F017E3F8C01A80A1F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               F53A3B49018DECF201A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_qdview.h;
+                       path = plugins/macosx/intf_qdview.h;
+                       refType = 4;
+               };
+               F53A3B4A018DECF201A80A1F = {
+                       isa = PBXFileReference;
+                       name = intf_qdview.c;
+                       path = plugins/macosx/intf_qdview.c;
+                       refType = 4;
+               };
+       };
+       rootObject = F511306E0170620B01A80A1F;
+}
diff --git a/extras/MacOSX_app/Contents/Info.plist b/extras/MacOSX_app/Contents/Info.plist
deleted file mode 100644 (file)
index 883edb7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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>CFBundleIconFile</key>
-        <string>vlc.icns</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>
diff --git a/extras/MacOSX_app/Contents/PkgInfo b/extras/MacOSX_app/Contents/PkgInfo
deleted file mode 100644 (file)
index bd04210..0000000
+++ /dev/null
@@ -1 +0,0 @@
-APPL????
\ No newline at end of file
index 994f3f4ab685779ffe044b1c45196dcb8b192c6e..dc9554540c4691c041a1c3044e42b3c84d81f4f8 100644 (file)
@@ -7,16 +7,10 @@
 # Objects
 #
 
-PLUGIN_MACOSX = macosx.o intf_macosx.o vout_macosx.o
-PLUGIN_MACOSXQT = macosx_qt.o intf_macosx_qt.o vout_macosx_qt.o
-PLUGIN_MACOSXCOMMON = aout_macosx.o
+PLUGIN_MACOSX = macosx.o intf_main.o intf_controller.o aout_macosx.o vout_macosx.o intf_vlc_wrapper.o intf_qdview.o
+BUILTIN_MACOSX = $(PLUGIN_MACOSX:%.o=BUILTIN_%.o)
 
-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)
+ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX)
 
 #
 # Virtual targets
@@ -24,33 +18,22 @@ ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX) $(PLUGIN_MACOSXQT) $(BUILTIN_MACOSX
 
 include ../../Makefile.modules
 
-$(PLUGIN_MACOSX) $(PLUGIN_MACOSXQT) $(PLUGIN_MACOSXCOMMON): %.o: .dep/%.d
+$(PLUGIN_MACOSX): %.o: .dep/%.d
 $(PLUGIN_MACOSX): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
-
-$(BUILTIN_MACOSX): BUILTIN_MACOSX_%.o: .dep/%.d
-$(BUILTIN_MACOSX): BUILTIN_MACOSX_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=macosx -fpascal-strings -c -o $@ $<
+       $(CC) $(CFLAGS) $(PCFLAGS) -ObjC -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 $@ $<
+$(BUILTIN_MACOSX): BUILTIN_%.o: .dep/%.d
+$(BUILTIN_MACOSX): BUILTIN_%.o: %.c
+       $(CC) $(CFLAGS) -DBUILTIN -ObjC -c -o $@ $<
 
 #
 # Real targets
 #
 
-../macosx.so: $(PLUGIN_MACOSX) $(PLUGIN_MACOSXCOMMON)
-       $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX)
+../macosx.so: $(PLUGIN_MACOSX)
+       $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX) -lobjc
 
 ../macosx.a: $(BUILTIN_MACOSX)
        ar r $@ $^
        $(RANLIB) $@
 
-../macosx_qt.so: $(PLUGIN_MACOSXQT) $(PLUGIN_MACOSXCOMMON)
-       $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX)
-
-../macosx_qt.a: $(BUILTIN_MACOSXQT)
-       ar r $@ $^
-       $(RANLIB) $@
-
diff --git a/plugins/macosx/intf_controller.c b/plugins/macosx/intf_controller.c
new file mode 100644 (file)
index 0000000..cbca69a
--- /dev/null
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * intf_controller.c : MacOS X plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $$
+ *
+ * Authors: Florian G. Pflug <fgp@phlo.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/* Remark:
+    I need to subclass NSQuickDrawView, and post a notification when its display
+    method is called. This is necessary because GetPortBound and similar functions
+    return the actual on-screen size of the QDPort, which isn't updated immidiately
+    after calling e.g. setFrame
+*/
+
+#include <QuickTime/QuickTime.h>
+#include <ApplicationServices/ApplicationServices.h>
+#import "intf_controller.h"
+#import "intf_vlc_wrapper.h"
+
+@implementation Intf_Controller
+//Initialization & Event-Management
+    - (void) awakeFromNib {
+        o_vlc = [Intf_VlcWrapper instance] ;
+        b_window_is_fullscreen = FALSE ;
+        [NSTimer scheduledTimerWithTimeInterval: 0.5
+            target: self
+            selector: @selector(manage:)
+            userInfo: nil
+            repeats:TRUE
+        ] ;
+        [o_vlc initWithDelegate:self] ;
+    }
+
+    - (void) manage:(NSTimer *)timer {
+        if ([o_vlc manage])
+            [NSApp terminate: self] ;
+        
+        [o_currenttime setStringValue: [o_vlc getTimeAsString]] ;
+        [o_timeslider setFloatValue: [o_vlc getTimeAsFloat]] ;
+   }
+    
+    - (void)applicationDidBecomeActive:(NSNotification*)aNotification {
+        if (b_window_is_fullscreen) {
+            [o_window orderFront:self] ;
+            [o_vlc play] ;
+        }
+    }
+    
+    - (void)applicationDidResignActive:(NSNotification*)aNotification {
+        if (b_window_is_fullscreen) {
+            [o_vlc pause] ;
+            [o_window orderOut:self] ;
+        }
+    }
+        
+        
+        
+        
+//Functions attached to user interface         
+    - (IBAction) pause:(id)sender {
+        [o_vlc pause] ;
+    }
+    
+    - (IBAction) play:(id)sender {
+        [o_vlc play] ;
+    }
+    
+    - (IBAction) timeslider_update:(id)slider {
+        [o_vlc setTimeAsFloat: [o_timeslider floatValue]] ;
+    }
+    
+    - (IBAction) speedslider_update:(id)slider {
+        [o_vlc setSpeed: (intf_speed_t) [slider intValue]] ;
+    }
+  
+    - (IBAction) fullscreen_toggle:(id)sender {
+        [self requestQDPortFullscreen:!b_window_is_fullscreen] ;
+    }
+
+
+
+                               
+//Callbacks - we are the delegate for the VlcWrapper
+    - (void) requestQDPortFullscreen:(bool)b_fullscreen {
+        NSRect s_rect ;
+        VlcQuickDrawView *o_qdview ;
+        
+        s_rect.origin.x = s_rect.origin.y = 0 ;
+        
+        [self releaseQDPort] ;
+        o_window = [NSWindow alloc] ;
+        if (b_fullscreen) {
+            [o_window
+                initWithContentRect: [[NSScreen mainScreen] frame]
+                styleMask: NSBorderlessWindowMask
+                backing: NSBackingStoreBuffered
+                defer:NO screen:[NSScreen mainScreen]
+            ] ;
+            [o_window setLevel:CGShieldingWindowLevel()] ;
+            b_window_is_fullscreen = TRUE ;
+        }
+        else {
+            s_rect.size = [o_vlc videoSize] ;
+            [o_window
+                initWithContentRect: s_rect
+                styleMask: (NSTitledWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)
+                backing: NSBackingStoreBuffered
+                defer:NO screen:[NSScreen mainScreen]
+            ] ;
+            [o_window setAspectRatio:[o_vlc videoSize]] ;            
+            [o_window center] ;
+            [o_window setDelegate:self] ;
+            b_window_is_fullscreen = FALSE ;
+        }
+        o_qdview = [[VlcQuickDrawView alloc] init] ;
+        [o_qdview setPostsFrameChangedNotifications:YES] ;
+        [[NSNotificationCenter defaultCenter]
+            addObserver: o_vlc
+            selector: @selector(sizeChangeQDPort)
+            name: VlcQuickDrawViewDidResize
+            object: o_qdview
+        ] ;
+        [o_window setContentView:o_qdview] ;
+        [o_window orderFront:self] ;
+        [o_vlc setQDPort:[o_qdview qdPort]] ;
+        [o_menu_fullscreen setState:(b_window_is_fullscreen ? NSOnState : NSOffState)] ;
+    }
+    
+    - (void) releaseQDPort {
+        [[NSNotificationCenter defaultCenter]
+            removeObserver: nil
+            name: nil
+            object: [o_window contentView]
+        ] ;
+        [o_vlc setQDPort:nil] ;
+        if (o_window) {
+            [o_window close] ;
+            o_window = nil ;
+        }
+    }
+    
+    - (void) resizeQDPortFullscreen:(bool)b_fullscreen {
+        if (b_window_is_fullscreen != b_fullscreen) {
+            [self requestQDPortFullscreen:b_fullscreen] ;
+        }
+        else if (!b_window_is_fullscreen && !b_fullscreen) {
+            [o_window setAspectRatio:[o_vlc videoSize]] ;
+        }
+    }
+@end
+
+@implementation Intf_PlaylistDS
+    - (void ) awakeFromNib {
+        o_vlc = [Intf_VlcWrapper instance] ;
+        o_playlist = [[NSMutableArray arrayWithCapacity:10] retain] ;
+    }
+    
+    - (void) readPlaylist {
+        static unsigned int i_length_old = 0;
+        unsigned int i ;
+    
+        if (i_length_old == [o_vlc getPlaylistLength])
+            return ;
+    
+        [o_playlist removeAllObjects] ;
+        [o_vlc lockPlaylist] ;
+        for(i=0; i < [o_vlc getPlaylistLength]; i++)
+            [o_playlist addObject:[o_vlc getPlaylistItem:i]] ;
+        [o_vlc unlockPlaylist] ;
+    }
+
+    - (int) numberOfRowsInTableView:(NSTableView*)o_table {
+        [self readPlaylist] ;
+        return [o_playlist count] ;
+    }
+    
+    - (id) tableView:(NSTableView*)o_table objectValueForTableColumn:(NSTableColumn*)o_column row:(int)i_row {
+        return [o_playlist objectAtIndex:i_row] ;
+    }
+    
+    - (void)tableView:(NSTableView *)aTableView setObjectValue:anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
+    }
+@end
diff --git a/plugins/macosx/intf_controller.h b/plugins/macosx/intf_controller.h
new file mode 100644 (file)
index 0000000..8f1a793
--- /dev/null
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * intf_controller.h : MacOS X plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $$
+ *
+ * Authors: Florian G. Pflug <fgp@phlo.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+#import "intf_vlc_wrapper.h"
+#import "intf_qdview.h"
+
+@interface Intf_PlaylistDS : NSObject {
+    Intf_VlcWrapper* o_vlc ;
+    NSMutableArray* o_playlist ;
+
+    IBOutlet NSTableView *o_table ;
+}
+
+- (void ) awakeFromNib ;
+- (void) readPlaylist ;
+
+- (int) numberOfRowsInTableView:(NSTableView*)o_table ;
+- (id) tableView:(NSTableView*)o_table objectValueForTableColumn:(NSTableColumn*)o_column row:(int)i_row ;
+- (void)tableView:(NSTableView *)aTableView setObjectValue:anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex ;
+@end
+
+@interface Intf_Controller : NSObject <VlcWrapper_Delegate> {
+    Intf_VlcWrapper* o_vlc ;
+
+    NSWindow *o_window ;
+    bool b_window_is_fullscreen ;
+    
+    IBOutlet NSButton *o_play ;
+    IBOutlet NSButton *o_pause ;
+    IBOutlet NSButton *o_stop ;
+    IBOutlet NSButton *o_stepr ;
+    IBOutlet NSButton *o_stepf ;
+    IBOutlet NSSlider *o_timeslider ;
+    IBOutlet NSTextField *o_currenttime ;
+    IBOutlet NSMenuItem *o_menu_fullscreen ;
+    
+    IBOutlet Intf_PlaylistDS *o_playlistds ;
+}
+
+//Initialization & Event-Management
+- (void) awakeFromNib ;
+- (void) manage:(NSTimer *)timer ;
+- (void)applicationDidBecomeActive:(NSNotification*)aNotification ;
+- (void)applicationDidResignActive:(NSNotification*)aNotification ;
+
+//Functions atteched to user interface 
+- (IBAction) pause:(id)sender ;
+- (IBAction) play:(id)sender ;
+- (IBAction) timeslider_update:(id)slider ;
+- (IBAction) speedslider_update:(id)slider ;
+- (IBAction) fullscreen_toggle:(id)sender ;
+@end
diff --git a/plugins/macosx/intf_macosx.c b/plugins/macosx/intf_macosx.c
deleted file mode 100644 (file)
index 0fe2fab..0000000
+++ /dev/null
@@ -1,1035 +0,0 @@
-/*****************************************************************************
- * intf_macosx.c: MacOS X interface plugin
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- *
- * Authors: Colin Delacroix <colin@zoy.org>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <sys/param.h>                                    /* for MAXPATHLEN */
-
-#include "config.h"
-#include "common.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "interface.h"
-#include "intf_msg.h"
-#include "intf_playlist.h"
-
-#include "stream_control.h"
-#include "input_ext-intf.h"
-
-#include "audio_output.h"
-
-#include "video.h"
-#include "video_output.h"
-
-#include "main.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
-#include "macosx_common.h"
-
-extern main_t *p_main;
-
-
-/*****************************************************************************
- * Constants & more
- *****************************************************************************/
-
-//how often to have callback to main loop.  Target of 30fps then 30hz + maybe some more...
-//it doesn't really scale if we move to 2x the hz...  something else is slowing us down...
-#define kMainLoopFrequency  (kEventDurationSecond / 45)                //45 for good measure
-
-// Menu defs
-enum
-{
-/*    kMenuApple  = 128,
-    kMenuFile   = 129,
-    kMenuControls   = 130,
-
-    kAppleAbout = 1, 
-    kAppleQuit = 7, //is this always the same?
-
-    kFileNew   = 1, 
-    kFileOpen   = 2, 
-    kFileCloseDivisor   = 3,
-    kFileClose   = 4,
-
-    kControlsPlayORPause   = 1, 
-    kControlsStop   = 2, 
-    kControlsForward   = 3, 
-    kControlsRewind   = 4, 
-    kControlsChapterDiv   = 5, 
-    kControlsChapterNext   = 6, 
-    kControlsChapterPrevious   = 7, 
-    kControlsDVDdiv   = 8, 
-    kControlsDVDMenu   = 9, 
-    kControlsVolumeDiv   = 10, 
-    kControlsVolumeUp   = 11, 
-    kControlsVolumeDown   = 12, 
-    kControlsVolumeMute   = 13, 
-    kControlsEjectDiv   = 14, 
-    kControlsEject   = 15 
-*/
-
-    kMenuApple  = 128,
-    kMenuFile,
-    kMenuControls,
-
-    kAppleAbout = 1, 
-    kAppleQuit = 8, //is this always the same?
-
-    kFileNew   = 1, 
-    kFileOpen,
-    kFileCloseDivisor,
-    kFileClose,
-    kFileQuitHack,
-
-    kControlsPlayORPause   = 1, 
-    kControlsStop,
-    kControlsForward,
-    kControlsRewind,
-    kControlsChapterDiv,
-    kControlsChapterNext,
-    kControlsChapterPrevious,
-    kControlsDVDdiv,
-    kControlsDVDMenu,
-    kControlsVolumeDiv,
-    kControlsVolumeUp,
-    kControlsVolumeDown,
-    kControlsVolumeMute,
-    kControlsEjectDiv,
-    kControlsEject 
-
-#if 0
-//virtual key codes ; raw subtract 0x40 from these values
-//http://devworld.apple.com/techpubs/mac/Text/Text-577.html#HEADING577-0
-    kLeftArrow = 0x7B,
-    kRightArrow = 0x7C,
-    kDownArrow = 0x7D,
-    kUpArrow = 0x7E,
-
-//http://devworld.apple.com/techpubs/mac/Text/Text-571.html#MARKER-9-18    
-    kPeriod = 47, //(decimal)
-    kSpace = 49, //(decimal)
-    kEscape = 53 //(decimal)
-#endif
-
-};
-
-// Initial Window Constants
-enum
-{
-    kAboutWindowOffset = 200,
-    kAboutWindowWidth = 200, //400
-    kAboutWindowHeight = 50 //100
-};
-
-
-/*****************************************************************************
- * intf_sys_t: description and status of the interface
- *****************************************************************************/
-typedef struct intf_sys_s
-{
-    EventLoopTimerRef manageTimer;
-    Rect aboutRect;
-    WindowRef  p_aboutWindow;
-    int playback_status; //moved from vout ; prolly didn't belong
-                               //there for a good reason ; more like Beos
-} intf_sys_t;
-
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-static int  intf_Probe     ( probedata_t *p_data );
-static int  intf_Open      ( intf_thread_t *p_intf );
-static void intf_Close     ( intf_thread_t *p_intf );
-static void intf_Run       ( intf_thread_t *p_intf );
-
-/* OS Specific */
-
-static int MakeAboutWindow             ( intf_thread_t *p_intf );
-
-void CarbonManageCallback ( EventLoopTimerRef inTimer, void *inUserData );
-
-OSErr MyOpenDocument(const FSSpecPtr defaultLocationfssPtr);
-
-void playorpause ( intf_thread_t *p_intf );
-void stop ( intf_thread_t *p_intf );
-void silence ( intf_thread_t *p_intf );
-
-
-#ifndef CarbonEvents
-void EventLoop( intf_thread_t *p_intf );
-void DoEvent( intf_thread_t *p_intf , EventRecord *event);
-void DoMenuCommand( intf_thread_t *p_intf , long menuResult);
-void DrawWindow(WindowRef window);
-void DrawAboutWindow(WindowRef window);
-#else
-/*
-pascal OSErr   QuitEventHandler(const AppleEvent *theEvent, AppleEvent *theReply, SInt32 refCon);
-static pascal OSStatus MyKeyHandler( EventHandlerCallRef inCallRef, EventRef inEvent, void* userData );
-static pascal OSStatus MyWindowEventHandler(EventHandlerCallRef myHandler, EventRef event, void* userData);
-*/
-#endif
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = intf_Probe;
-    p_function_list->functions.intf.pf_open  = intf_Open;
-    p_function_list->functions.intf.pf_close = intf_Close;
-    p_function_list->functions.intf.pf_run   = intf_Run;
-}
-
-/*****************************************************************************
- * intf_Probe: probe the interface and return a score
- *****************************************************************************
- * This function checks the interface can be run and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    if( TestMethod( INTF_METHOD_VAR, "macosx" ) )
-    {
-        return( 999 );
-    }
-
-    /* Under MacOS X, this plugin always works */
-    return( 100 );
-}
-
-/*****************************************************************************
- * intf_Open: initialize interface
- *****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
-{
-    MenuHandle menu;
-//    MenuRef windMenu;
-
-    /* Allocate instance and initialize some members */
-    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
-    if( p_intf->p_sys == NULL )
-    {
-        return( 1 );
-    };
-
-    /* Init Mac stuff */
-    InitCursor();
-    SetQDGlobalsRandomSeed( TickCount() );
-
-// neat menu but don't know if we want it.
-// Install the Windows menu. Free of charge!
-//    CreateStandardWindowMenu( 0, &windMenu );
-//    InsertMenu( windMenu, 0 );
-//    DrawMenuBar();
-
-    menu = NewMenu( kMenuApple, "\p\024" );
-    AppendMenu( menu, "\pAbout VLCÉ/A" );
-    InsertMenu( menu, 0 );
-
-    menu = NewMenu( kMenuFile, "\pFile" );
-    AppendMenu( menu, "\pNew Viewer Window/N" );
-    AppendMenu( menu, "\pOpenÉ/O" );
-    AppendMenu( menu, "\p(-" );
-    AppendMenu( menu, "\pClose/W" );
-    //standard OS X application menu quit isn't working nicely
-    AppendMenu( menu, "\pQuit/Q" );
-    InsertMenu( menu, 0 );
-
-//BIG HONKING MENU - in order Mac OS 9 dvd player
-//can't get key codes right for menus... argh that's why they use resources!
-
-    menu = NewMenu( kMenuControls, "\pControls" );
-
-    AppendMenu( menu, "\pPlay/," );
-//    SetMenuItemCommandKey(menu, 0, false, kSpace);
-//    SetMenuItemModifiers( menu, 0, kMenuNoCommandModifier);
-
-    AppendMenu( menu, "\pStop/." );
-
-    AppendMenu( menu, "\pFast Forward/f" );
-//    SetMenuItemCommandKey(menu, 2, false, kRightArrow);
-
-    AppendMenu( menu, "\pRewind/r" );
-//    SetMenuItemCommandKey(menu, 3, false, kLeftArrow);
-
-    AppendMenu( menu, "\p(-" ); //4
-
-    AppendMenu( menu, "\pNext Chapter/c" );
-//    SetMenuItemCommandKey(menu, 5, false, kRightArrow);
-//    SetMenuItemModifiers( menu, 5, kMenuNoCommandModifier);
-
-    AppendMenu( menu, "\pPrevious Chapter/p" );
-//    SetMenuItemCommandKey(menu, 6, false, kLeftArrow);
-//    SetMenuItemModifiers( menu, 6, kMenuNoCommandModifier);
-
-    AppendMenu( menu, "\p(-" ); //7
-
-    AppendMenu( menu, "\pDVD Menu/v" );
-//    SetMenuItemCommandKey(menu, 8, false, kEscape);
-//    SetMenuItemModifiers( menu, 8, kMenuNoCommandModifier);
-
-    AppendMenu( menu, "\p(-" ); //9
-
-    AppendMenu( menu, "\pVolume Up/u" );
-//    SetMenuItemCommandKey(menu, 10, false, kUpArrow);
-
-    AppendMenu( menu, "\pVolume Down/d" );
-//    SetMenuItemCommandKey(menu, 11, false, kDownArrow);
-
-    AppendMenu( menu, "\pMute/M" ); //12
-
-    AppendMenu( menu, "\p(-" ); //13
-
-    AppendMenu( menu, "\pEject/E" ); //14
-
-    InsertMenu( menu, 0 );
-
-//Hmm, eventually we might want more than one player window, but for now we assume one only (like OS 9 player)
-//and since we start with a window open, we temporarily disable the 'new' menu
-    DisableMenuItem( GetMenuHandle(kMenuFile), kFileNew);
-
-//FIXME - Disabled Menus which are not implemented yet
-    DisableMenuItem( GetMenuHandle(kMenuControls), kControlsDVDMenu);
-    DisableMenuItem( GetMenuHandle(kMenuControls), kControlsEject);
-
-    DrawMenuBar();
-
-    if( MakeAboutWindow( p_intf ) )
-    {
-        intf_ErrMsg( "vout error: can't make about window" );
-        return( 1 );
-    }
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * intf_Close: destroy interface
- *****************************************************************************/
-static void intf_Close( intf_thread_t *p_intf )
-{
-    /* Destroy structure */
-    free( p_intf->p_sys );
-}
-
-/*****************************************************************************
- * intf_Run: main loop
- *****************************************************************************/
-static void intf_Run( intf_thread_t *p_intf )
-{
-    OSStatus err;
-    EventLoopTimerUPP manageUPP;
-
-/*
-Eventually we want to use Carbon events, or maybe even write this app in Cocoa
-//kinda going out of bounds here... need to bring window creation to this file.
-    main_t *p_main;
-
-    EventTypeSpec windowEventType = { kEventClassWindow, kEventWindowClose };
-    EventHandlerUPP windowHandlerUPP;
-
-    EventTypeSpec keyboardEventType = { kEventClassKeyboard, kEventRawKeyDown };
-    EventHandlerUPP keyboardHandlerUPP;
-*/
-
-    manageUPP = NewEventLoopTimerUPP ( CarbonManageCallback );
-    err = InstallEventLoopTimer ( GetCurrentEventLoop(), 0, kMainLoopFrequency, manageUPP, (void *) p_intf, &p_intf->p_sys->manageTimer );
-    assert(err == noErr);
-    DisposeEventLoopTimerUPP(manageUPP);
-
-/*
-    windowHandlerUPP = NewEventHandlerUPP ( MyWindowEventHandler );
-    err = InstallWindowEventHandler ( p_main->p_vout->p_sys->p_window , windowHandlerUPP,      GetEventTypeCount(windowEventType), &windowEventType, (void *) p_intf, NULL );
-    assert(err == noErr);
-    DisposeEventHandlerUPP(windowHandlerUPP);
-*/
-
-
-#ifndef CarbonEvents
-    //UGLY Event Loop!
-    EventLoop( p_intf );
-#else
-    RunApplicationEventLoop();
-#endif
-    err = RemoveEventLoopTimer(p_intf->p_sys->manageTimer);
-    assert(err == noErr);
-}
-
-
-/*****************************************************************************
- * MakeAboutWindow: similar to MakeWindow in vout_macosx.c ; 
- * open and set-up a Mac OS window to be used for 'about' program... 
- * create it hidden and only show it when requested
- *****************************************************************************/
-static int MakeAboutWindow( intf_thread_t *p_intf )
-{
-    int left = 0;
-    int top = 0;
-    int bottom = kAboutWindowHeight;
-    int right = kAboutWindowWidth;
-
-    WindowAttributes windowAttr = kWindowCloseBoxAttribute |
-                                    kWindowStandardHandlerAttribute |
-                                    kWindowInWindowMenuAttribute;
-    
-    SetRect( &p_intf->p_sys->aboutRect, left, top, right, bottom );
-    OffsetRect( &p_intf->p_sys->aboutRect, kAboutWindowOffset, kAboutWindowOffset );
-
-    CreateNewWindow( kDocumentWindowClass, windowAttr, &p_intf->p_sys->aboutRect, &p_intf->p_sys->p_aboutWindow );
-    if ( p_intf->p_sys->p_aboutWindow == nil )
-    {
-        return( 1 );
-    }
-
-    InstallStandardEventHandler(GetWindowEventTarget(p_intf->p_sys->p_aboutWindow));
-    SetWindowTitleWithCFString( p_intf->p_sys->p_aboutWindow, CFSTR("About DVD.app & VLC") );
-    
-    return( 0 );
-}
-
-
-void CarbonManageCallback ( EventLoopTimerRef inTimer, void *inUserData )
-{
-    intf_thread_t * p_intf = (intf_thread_t *) inUserData;
-
-    /* Manage core vlc functions through the callback */
-    p_intf->pf_manage( p_intf );
-    
-    if ( p_intf->b_die )
-    {
-       QuitApplicationEventLoop();
-    }
-}
-
-#ifndef CarbonEvents
-
-void EventLoop( intf_thread_t *p_intf )
-{
-    Boolean    gotEvent;
-    EventRecord        event;
-    
-    do
-    {
-    p_intf->pf_manage( p_intf );
-        gotEvent = WaitNextEvent(everyEvent,&event,32767,nil);
-        if (gotEvent)
-            DoEvent( p_intf, &event);
-    } while (! p_intf->b_die );
-    
-    //ExitToShell();                                   
-}
-
-
-void DoEvent( intf_thread_t *p_intf , EventRecord *event)
-{
-    short      part;
-    Boolean    hit;
-    char       key;
-    Rect       tempRect;
-    WindowRef  whichWindow;
-        
-    switch (event->what) 
-    {
-        case mouseDown:
-            part = FindWindow(event->where, &whichWindow);
-            switch (part)
-            {
-                case inMenuBar:  /* process a moused menu command */
-                    DoMenuCommand( p_intf, MenuSelect(event->where));
-                    break;
-                    
-                case inSysWindow:
-                    break;
-                
-                case inContent:
-                    if (whichWindow != FrontWindow()) 
-                        SelectWindow(whichWindow);
-                    break;
-                
-                case inDrag:   /* pass screenBits.bounds */
-                    GetRegionBounds(GetGrayRgn(), &tempRect);
-                    DragWindow(whichWindow, event->where, &tempRect);
-                    break;
-                    
-                case inGrow:
-                    break;
-                    
-                case inGoAway:
-                    p_intf->b_die = true;
-                    return;
-                    break;
-                    
-                case inZoomIn:
-                case inZoomOut:
-                    hit = TrackBox(whichWindow, event->where, part);
-                    if (hit) 
-                    {
-                        SetPort(GetWindowPort(whichWindow));   // window must be current port
-                        EraseRect(GetWindowPortBounds(whichWindow, &tempRect));   // inval/erase because of ZoomWindow bug
-                        ZoomWindow(whichWindow, part, true);
-                        InvalWindowRect(whichWindow, GetWindowPortBounds(whichWindow, &tempRect));     
-                    }
-                    break;
-                }
-                break;
-               
-                case keyDown:
-               case autoKey:
-                    key = event->message & charCodeMask;
-                    if (event->modifiers & cmdKey)
-                        if (event->what == keyDown)
-                            DoMenuCommand( p_intf, MenuKey(key));
-                            
-               case activateEvt:              /* if you needed to do something special */
-                    break;
-                    
-                case updateEvt:
-                        DrawWindow((WindowRef) event->message);
-                    break;
-                        
-                case kHighLevelEvent:
-                       AEProcessAppleEvent( event );
-                    break;
-               
-                case diskEvt:
-                    break;
-       }
-}
-
-//the code for playorpause and stop taken almost directly from the BeOS code
-void playorpause ( intf_thread_t *p_intf )
-{
-    int i_index;
-
-    // pause the playback
-    if (p_intf->p_input != NULL )
-    {
-        // mute the volume if currently playing
-        if (p_intf->p_sys->playback_status == PLAYING)
-        {
-            vlc_mutex_lock( &p_aout_bank->lock );
-            for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-            {
-                p_aout_bank->pp_aout[i_index]->i_savedvolume =
-                                    p_aout_bank->pp_aout[i_index]->i_volume;
-                p_aout_bank->pp_aout[i_index]->i_volume = 0;
-            }
-            vlc_mutex_unlock( &p_aout_bank->lock );
-            p_intf->p_sys->playback_status = PAUSED;
-            SetMenuItemText( GetMenuHandle(kMenuControls), kControlsPlayORPause, "\pPlay");
-        }
-        else
-        // restore the volume
-        {
-            vlc_mutex_lock( &p_aout_bank->lock );
-            for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-            {
-                p_aout_bank->pp_aout[i_index]->i_volume =
-                                p_aout_bank->pp_aout[i_index]->i_savedvolume;
-                p_aout_bank->pp_aout[i_index]->i_savedvolume = 0;
-            }
-            vlc_mutex_unlock( &p_aout_bank->lock );
-            p_intf->p_sys->playback_status = PLAYING;
-            SetMenuItemText( GetMenuHandle(kMenuControls), kControlsPlayORPause, "\pPause");
-        }
-        //snooze(400000);
-        input_SetStatus(p_intf->p_input, INPUT_STATUS_PAUSE);
-    }
-}
-
-void stop ( intf_thread_t *p_intf )
-{
-    int i_index;
-
-    // this currently stops playback not nicely
-    if( p_intf->p_input != NULL )
-    {
-        // silence the sound, otherwise very horrible
-        vlc_mutex_lock( &p_aout_bank->lock );
-        for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-        {
-            p_aout_bank->pp_aout[i_index]->i_savedvolume = p_aout_bank->pp_aout[i_index]->i_volume;
-            p_aout_bank->pp_aout[i_index]->i_volume = 0;
-        }
-        vlc_mutex_unlock( &p_aout_bank->lock );
-
-        //snooze( 400000 );
-        input_SetStatus( p_intf->p_input, INPUT_STATUS_END );
-    }
-    p_intf->p_sys->playback_status = STOPPED;
-}
-
-
-void DoMenuCommand( intf_thread_t *p_intf , long menuResult)
-{
-    short      menuID;         /* the resource ID of the selected menu */
-    short      menuItem;       /* the item number of the selected menu */
-    int i_index;
-    vout_thread_t *p_vout;
-
-    menuID = HiWord(menuResult);    /* use macros to get item & menu number */
-    menuItem = LoWord(menuResult);
-
-    switch (menuID) 
-    {
-        case kMenuApple:
-            switch (menuItem) 
-            {
-                case kAppleAbout:
-                    ShowWindow( p_intf->p_sys->p_aboutWindow );
-                    SelectWindow( p_intf->p_sys->p_aboutWindow );
-                    DrawAboutWindow( p_intf->p_sys->p_aboutWindow); //kludge
-                    EnableMenuItem( GetMenuHandle(kMenuFile), kFileClose);
-                    break;
-                    
-                case kAppleQuit:
-                    p_intf->b_die = true;
-                    //hrmm... don't know what is going on w/ the Quit item in the new application menu...documentation???
-                    break;
-                               
-                default:
-                    break;
-            }
-            break;
-        
-        case kMenuFile:
-            switch (menuItem) 
-            {
-                case kFileNew:
-                    vlc_mutex_lock( &p_vout_bank->lock );
-                    /* XXX: only test the first video output */
-                    if( p_vout_bank->i_count )
-                    {
-                        p_vout = p_vout_bank->pp_vout[0];
-                        ShowWindow( p_vout->p_sys->p_window );
-                        SelectWindow( p_vout->p_sys->p_window );
-                    }
-                    vlc_mutex_unlock( &p_vout_bank->lock );
-                    DisableMenuItem( GetMenuHandle(kMenuFile), kFileNew);
-                    EnableMenuItem( GetMenuHandle(kMenuFile), kFileClose);
-                    //hmm, can't say to play() right now because I don't know if a file is in playlist yet.
-                    //need to see if I can tell this or eve if calling play() w/o a file is bad...not sure of either
-                    break;
-
-                case kFileOpen:
-                    playorpause( p_intf );
-                    MyOpenDocument(nil);
-                    // starts playing automatically on open? playorpause( p_intf );
-                    break;
-
-                case kFileClose:
-                    HideWindow( FrontWindow() );
-
-                    vlc_mutex_lock( &p_vout_bank->lock );
-                    /* XXX: only test the first video output */
-                    if( p_vout_bank->i_count )
-                    {
-                        p_vout = p_vout_bank->pp_vout[0];
-                        printf("ok\n");
-                    }
-                        else printf("NO\n");
-                    vlc_mutex_unlock( &p_vout_bank->lock );
-
-                    if ( ! IsWindowVisible( p_vout->p_sys->p_window ) && ! IsWindowVisible( p_intf->p_sys->p_aboutWindow ) )
-                    {
-                        //calling this even if no file open shouldn't be bad... not sure of opposite situation above
-                        stop( p_intf );
-                        EnableMenuItem( GetMenuHandle(kMenuFile), kFileNew);
-                        DisableMenuItem( GetMenuHandle(kMenuFile), kFileClose);
-                    }
-                    break;
-                    
-                case kFileQuitHack:
-                        stop( p_intf );
-                        p_intf->b_die = true;
-                    break;
-                    
-                default:
-                    break;
-            }
-            break;
-               
-        case kMenuControls:
-            switch (menuItem) 
-            {
-                case kControlsPlayORPause:
-                        playorpause( p_intf );
-                    break;
-
-                case kControlsStop:
-                        stop( p_intf );
-                    break;
-
-                case kControlsForward:
-               // cycle the fast playback modes
-                    if (p_intf->p_input != NULL )
-                    {
-                        vlc_mutex_lock( &p_aout_bank->lock );
-                        for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-                        {
-                            p_aout_bank->pp_aout[i_index]->i_savedvolume =
-                                                p_aout_bank->pp_aout[i_index]->i_volume;
-                            p_aout_bank->pp_aout[i_index]->i_volume = 0;
-                        }
-                        vlc_mutex_unlock( &p_aout_bank->lock );
-                        //snooze(400000);
-                        input_SetStatus(p_intf->p_input, INPUT_STATUS_FASTER);
-                    }
-                    break;
-
-                case kControlsRewind:
-               // cycle the slow playback modes
-                    if (p_intf->p_input != NULL )
-                    {
-                        vlc_mutex_lock( &p_aout_bank->lock );
-                        for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-                        {
-                            p_aout_bank->pp_aout[i_index]->i_savedvolume =
-                                                p_aout_bank->pp_aout[i_index]->i_volume;
-                            p_aout_bank->pp_aout[i_index]->i_volume = 0;
-                        }
-                        vlc_mutex_unlock( &p_aout_bank->lock );
-                        //snooze(400000);
-                        input_SetStatus(p_intf->p_input, INPUT_STATUS_FASTER);
-                    }
-                    break;
-                
-                case kControlsChapterNext:
-                    if( p_intf->p_input != NULL )
-                    {
-                        /* FIXME: temporary hack */
-                        p_intf->p_input->b_eof = 1;
-                    }
-                    break;
-
-                case kControlsChapterPrevious:
-                    if( p_intf->p_input != NULL )
-                    {
-                        /* FIXME: temporary hack */
-                        intf_PlaylistPrev( p_main->p_playlist );
-                        intf_PlaylistPrev( p_main->p_playlist );
-                        p_intf->p_input->b_eof = 1;
-                    }
-                    break;
-
-                case kControlsDVDMenu:
-                    //Fixme
-                    SysBeep(30);
-                    break;
-
-                case kControlsVolumeUp:
-               // adjust the volume
-                    vlc_mutex_lock( &p_aout_bank->lock );
-                    for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-                    {
-//                            ++p_aout_bank->pp_aout[i_index]->i_volume;
-                            p_aout_bank->pp_aout[i_index]->i_savedvolume = ++p_aout_bank->pp_aout[i_index]->i_volume;
-                    }
-                    vlc_mutex_unlock( &p_aout_bank->lock );
-                    break;
-
-                case kControlsVolumeDown:
-               // adjust the volume
-                    vlc_mutex_lock( &p_aout_bank->lock );
-                    for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-                    {
-//                            --p_aout_bank->pp_aout[i_index]->i_volume;
-                            p_aout_bank->pp_aout[i_index]->i_savedvolume = --p_aout_bank->pp_aout[i_index]->i_volume;
-                    }
-                    vlc_mutex_unlock( &p_aout_bank->lock );
-                    break;
-
-                case kControlsVolumeMute:
-                // mute
-                    vlc_mutex_lock( &p_aout_bank->lock );
-                    for( i_index = 0 ; i_index < p_aout_bank->i_count ; i_index++ )
-                    {
-                        if( p_aout_bank->pp_aout[i_index]->i_savedvolume )
-                        {
-                            p_aout_bank->pp_aout[i_index]->i_volume =
-                                            p_aout_bank->pp_aout[i_index]->i_savedvolume;
-                            p_aout_bank->pp_aout[i_index]->i_savedvolume = 0;
-                        }
-                        else
-                        {
-                            p_aout_bank->pp_aout[i_index]->i_savedvolume =
-                                                p_aout_bank->pp_aout[i_index]->i_volume;
-                            p_aout_bank->pp_aout[i_index]->i_volume = 0;
-                        }
-                    }
-                    vlc_mutex_unlock( &p_aout_bank->lock );
-                    break;
-
-                case kControlsEject:
-                    //Fixme
-                    SysBeep(30);
-                    break;
-                    
-                default:
-                    break;
-            }
-            break;
-
-        default:
-            break;
-    }
-    HiliteMenu(0);     /* unhighlight what MenuSelect (or MenuKey) hilited */
-}
-
-void DrawWindow(WindowRef window)
-{
-    Rect tempRect;
-    GrafPtr previousPort;
-    
-    GetPort(&previousPort);
-    SetPort(GetWindowPort(window));
-    BeginUpdate(window);
-    EraseRect(GetWindowPortBounds(window, &tempRect));
-    DrawControls(window);
-    DrawGrowIcon(window);
-    EndUpdate(window);
-    SetPort(previousPort);
-}
-
-void DrawAboutWindow(WindowRef window)
-{
-    GrafPtr previousPort;
-
-    GetPort(&previousPort);
-    SetPort(GetWindowPort(window));
-    
-    MoveTo(10,30);
-    DrawString("\phttp://www.videolan.org");
-
-    SetPort(previousPort);
-}
-
-#else
-
-static pascal OSStatus MyEventHandler(EventHandlerCallRef myHandler, EventRef event, void* userData)
-{
-    WindowRef                     window;
-    Rect                          bounds;
-    UInt32                        whatHappened;
-    HICommand                     commandStruct;
-    MenuRef                       theMenuRef;
-    UInt16                        theMenuItem;
-    OSStatus                      result = eventNotHandledErr; // report failure by default
-    
-    GetEventParameter(event, kEventParamDirectObject, typeWindowRef, NULL, sizeof(window), NULL, &window);
-    
-    whatHappened = GetEventKind(event);
-    
-    switch (whatHappened)
-    {
-        case kEventWindowActivated:
-            break;
-        
-        case kEventWindowDeactivated:
-            break;
-        
-        case kEventWindowDrawContent:
-            //DoUpdate(window);
-            result = noErr;
-            break;
-
-        case kEventWindowBoundsChanged:
-            InvalWindowRect(window, GetWindowPortBounds(window, &bounds));
-            //DoUpdate(window);
-            result = noErr;
-            break;
-
-        case kEventWindowClickContentRgn:
-            /*DoContentClick(window);
-            DoUpdate(window);
-            AdjustMenus();*/
-            result = noErr;
-            break;
-
-        case kEventCommandProcess:
-            GetEventParameter (event, kEventParamDirectObject, 
-                                        typeHICommand, NULL, sizeof(HICommand), 
-                                        NULL, &commandStruct);
-            theMenuRef = commandStruct.menu.menuRef;
-
-            if (theMenuRef == GetMenuHandle(kMenuApple)) 
-                {
-                    // Because the event didn't occur *in* the window, the 
-                    // window reference isn't valid until we set it here 
-                    window = FrontWindow(); 
-
-                    theMenuItem = commandStruct.menu.menuItemIndex;
-                    switch ( theMenuItem ) 
-                            {
-                                case iStop:
-                                        SetLight(window, true);
-                                        break;
-                                case iGo:
-                                        SetLight(window, false);
-                                        break;
-                            }
-                    DoUpdate(window);
-                    AdjustMenus();
-                    result = noErr;
-                }
-            */
-            break; 
-
-        case kEventMouseMoved:
-            /*
-            CursorRgn = NewRgn();
-            GetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
-                                        NULL, sizeof(Point), NULL, &wheresMyMouse);
-            AdjustCursor(wheresMyMouse, CursorRgn);
-            DisposeRgn(CursorRgn);
-            */
-            result = noErr;
-            break;
-
-        default: 
-            // If nobody handled the event, it gets propagated to the
-            // application-level handler.
-            break;
-    }
-    return result;
-}
-#endif
-
-//FIXME Adding this has introduced or surfaced a lot of bugs...
-//comented out a lot of things to strip this down to make this a 'quicky'
-OSErr MyOpenDocument(const FSSpecPtr defaultLocationfssPtr)
-{
-    NavDialogOptions    dialogOptions;
-//    AEDesc              defaultLocation;
-//    NavEventUPP         eventProc = NewNavEventProc(myEventProc);
-//    NavObjectFilterUPP  filterProc = 
-//                        NewNavObjectFilterProc(myFilterProc);
-    OSErr               anErr = noErr;
-    
-    //  Specify default options for dialog box
-    anErr = NavGetDefaultDialogOptions(&dialogOptions);
-    if (anErr == noErr)
-    {
-        //  Adjust the options to fit our needs
-        //  Set default location option
-//        dialogOptions.dialogOptionFlags |= kNavSelectDefaultLocation;
-        //  Clear preview option
-        dialogOptions.dialogOptionFlags ^= kNavAllowPreviews;
-        
-        // make descriptor for default location
-//        anErr = AECreateDesc(typeFSS, defaultLocationfssPtr,
-//                             sizeof(*defaultLocationfssPtr),
-//                             &defaultLocation );
-        if (anErr == noErr)
-        {
-            // Get 'open' resource. A nil handle being returned is OK,
-            // this simply means no automatic file filtering.
-            NavTypeListHandle typeList = (NavTypeListHandle)GetResource(
-                                        'open', 128);
-            NavReplyRecord reply;
-            
-            // Call NavGetFile() with specified options and
-            // declare our app-defined functions and type list
-//            anErr = NavGetFile (&defaultLocation, &reply, &dialogOptions,
-            anErr = NavGetFile (nil, &reply, &dialogOptions,
-//                                eventProc, nil, filterProc,
-                                nil, nil, nil,
-                                typeList, nil);
-            if (anErr == noErr && reply.validRecord)
-            {
-                //  Deal with multiple file selection
-                long    count;
-                
-                anErr = AECountItems(&(reply.selection), &count);
-                // Set up index for file list
-                if (anErr == noErr)
-                {
-                    long index;
-                    
-                    for (index = 1; index <= count; index++)
-                    {
-                        AEKeyword   theKeyword;
-                        DescType    actualType;
-                        Size        actualSize;
-                        FSSpec      documentFSSpec;
-                        
-                        // Get a pointer to selected file
-                        anErr = AEGetNthPtr(&(reply.selection), index,
-                                            typeFSS, &theKeyword,
-                                            &actualType,&documentFSSpec,
-                                            sizeof(documentFSSpec),
-                                            &actualSize);
-                        if (anErr == noErr)
-                        {
-//                            anErr = DoOpenFile(&documentFSSpec);
-//HERE
-                            FSRef newRef;
-                            char path[MAXPATHLEN];
-                            
-                            //make an FSRef out of an FSSpec
-                            anErr = FSpMakeFSRef( &documentFSSpec, &newRef);
-                            if (anErr != noErr)
-                            {
-                                return(anErr);
-                            }
-                            //make a path out of the FSRef
-                            anErr = FSRefMakePath( &newRef, path, MAXPATHLEN);
-                            if (anErr != noErr)
-                            {
-                                return(anErr);
-                            }
-                            
-                            //else, ok...add it to playlist!
-                            intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, path );
-
-                            
-                        }
-                    }
-                }
-                //  Dispose of NavReplyRecord, resources, descriptors
-                anErr = NavDisposeReply(&reply);
-            }
-            if (typeList != NULL)
-            {
-                ReleaseResource( (Handle)typeList);
-            }
-            //(void) AEDisposeDesc(&defaultLocation);
-        }
-    }
-//    DisposeRoutineDescriptor(eventProc);
-//    DisposeRoutineDescriptor(filterProc);
-    return anErr;
-}
-
similarity index 66%
rename from plugins/macosx/intf_macosx_qt.c
rename to plugins/macosx/intf_main.c
index 49f652ad9a2a54a823c4cabfe6472b38e26fbb50..8d6e24e3afe293fe4e02d91f5696f35436f98c00 100644 (file)
@@ -1,9 +1,10 @@
 /*****************************************************************************
- * intf_macosx.c: MacOS X interface plugin
+ * intf_main.c: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  *
- * Authors: Colin Delacroix <colin@zoy.org>
+ * Authors:    Colin Delacroix <colin@zoy.org>
+ *             Florian G. Pflug <fgp@phlo.org>
  *
  * 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
@@ -20,6 +21,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#define MODULE_NAME macosx
 #include "modules_inner.h"
 
 /*****************************************************************************
 
 #include "interface.h"
 #include "intf_msg.h"
-#include "intf_playlist.h"
-
-#include "main.h"
 
 #include "modules.h"
 #include "modules_export.h"
 
-#include "macosx_qt_common.h"
+/* OS specific */
+#import <Cocoa/Cocoa.h>
+
+
+/*****************************************************************************
+ * intf_sys_t: description and status of the interface
+ *****************************************************************************/
+typedef struct intf_sys_s
+{
+    NSAutoreleasePool *o_pool ;
+} intf_sys_t;
 
 
 /*****************************************************************************
@@ -56,12 +65,6 @@ static int  intf_Open      ( intf_thread_t *p_intf );
 static void intf_Close     ( intf_thread_t *p_intf );
 static void intf_Run       ( intf_thread_t *p_intf );
 
-/* OS specific */
-#define kMainLoopFrequency  (kEventDurationSecond)             //45 for good measure
-
-static pascal OSStatus FS_suspend_resume_handler(EventHandlerCallRef ref, EventRef event, void *dummy) ;
-static pascal void APP_timer_handler(EventLoopTimerRef timer, void *dummy) ;
-
 /*****************************************************************************
  * Functions exported as capabilities. They are declared as static so that
  * we don't pollute the namespace too much.
@@ -82,13 +85,13 @@ void _M( intf_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int intf_Probe( probedata_t *p_data )
 {
-    if( TestMethod( INTF_METHOD_VAR, "macosx_qt" ) )
+    if( TestMethod( INTF_METHOD_VAR, "macosx" ) )
     {
         return( 999 );
     }
 
     /* Under MacOS X, this plugin always works */
-    return( 90 );
+    return( 100 );
 }
 
 /*****************************************************************************
@@ -102,6 +105,11 @@ static int intf_Open( intf_thread_t *p_intf )
         return( 1 );
     };
 
+    p_intf->p_sys->o_pool =[[NSAutoreleasePool alloc] init];
+
+    [NSApplication sharedApplication];
+    [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
+
     return( 0 );
 }
 
@@ -111,6 +119,8 @@ static int intf_Open( intf_thread_t *p_intf )
 static void intf_Close( intf_thread_t *p_intf )
 {
     /* Destroy structure */
+    [NSApp terminate:NSApp] ;
+    [p_intf->p_sys->o_pool release] ;
     free( p_intf->p_sys );
 }
 
@@ -119,41 +129,5 @@ static void intf_Close( intf_thread_t *p_intf )
  *****************************************************************************/
 static void intf_Run( intf_thread_t *p_intf )
 {
-    static EventTypeSpec suspendResumeEvent[2] = {{kEventClassApplication,kEventAppActivated}, {kEventClassApplication,kEventAppDeactivated}} ;
-
-    BeginFullScreen(&p_intf->p_sys->before_fullscreen, nil, 0, 0, &p_intf->p_sys->p_window, 0, fullScreenAllowEvents) ;
-    InstallStandardEventHandler(GetApplicationEventTarget()) ;
-    InstallApplicationEventHandler(NewEventHandlerUPP(FS_suspend_resume_handler), 2, suspendResumeEvent, &p_intf->p_sys->p_window, NULL) ;
-    InstallEventLoopTimer(GetMainEventLoop(), 0, kMainLoopFrequency, NewEventLoopTimerUPP(APP_timer_handler), NULL, &p_intf->p_sys->r_timer) ;
-    ShowWindow(p_intf->p_sys->p_window );
-    p_intf->p_sys->b_active = 1 ;
-
-    RunApplicationEventLoop() ;
-
-    p_intf->p_sys->b_active = 0 ;
-    EndFullScreen(p_intf->p_sys->before_fullscreen, nil) ;
+    [NSApp run] ;
 }
-
-static pascal void APP_timer_handler(EventLoopTimerRef timer, void *dummy)
-{
-       p_main->p_intf->pf_manage(p_main->p_intf) ;
-       
-       if (p_main->p_intf->b_die) QuitApplicationEventLoop() ;
-}
-
-static pascal OSStatus FS_suspend_resume_handler(EventHandlerCallRef ref, EventRef event, void *dummy)
-{
-       switch (GetEventKind(event))
-       {
-               case kEventAppActivated:        ShowWindow(p_main->p_intf->p_sys->p_window) ;
-                                               SetPortWindowPort(p_main->p_intf->p_sys->p_window) ;
-                                               intf_WarnMsg(1, "Application is on foreground") ;
-                                               break ;
-               case kEventAppDeactivated:      HideWindow(p_main->p_intf->p_sys->p_window) ;
-                                               intf_WarnMsg(1, "Application sent to background") ;
-                                               break ;
-       }
-
-       return noErr ;
-}
-
diff --git a/plugins/macosx/intf_qdview.c b/plugins/macosx/intf_qdview.c
new file mode 100644 (file)
index 0000000..52a713b
--- /dev/null
@@ -0,0 +1,25 @@
+//
+//  intf_qdview.c
+//  vlc
+//
+//  Created by fgp on Mon Oct 29 2001.
+//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
+//
+
+#import "intf_qdview.h"
+
+NSString *VlcQuickDrawViewDidResize = @"VlcQuickDrawViewDidDraw" ;
+
+@implementation VlcQuickDrawView
+
+- (id)initWithFrame:(NSRect)frame {
+    self = [super initWithFrame:frame];
+    return self;
+}
+
+- (void)drawRect:(NSRect)rect {
+    [super drawRect:rect] ;
+    [[NSNotificationCenter defaultCenter] postNotificationName:VlcQuickDrawViewDidResize object:self] ;
+}
+
+@end
diff --git a/plugins/macosx/intf_qdview.h b/plugins/macosx/intf_qdview.h
new file mode 100644 (file)
index 0000000..835f002
--- /dev/null
@@ -0,0 +1,16 @@
+//
+//  intf_qdview.h
+//  vlc
+//
+//  Created by fgp on Mon Oct 29 2001.
+//  Copyright (c) 2001 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+extern NSString *VlcQuickDrawViewDidResize ;
+
+@interface VlcQuickDrawView : NSQuickDrawView {
+}
+
+@end
diff --git a/plugins/macosx/intf_vlc_wrapper.c b/plugins/macosx/intf_vlc_wrapper.c
new file mode 100644 (file)
index 0000000..9d590b4
--- /dev/null
@@ -0,0 +1,265 @@
+/*****************************************************************************
+ * intf_vlc_wrapper.c : MacOS X plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $$
+ *
+ * Authors: Florian G. Pflug <fgp@phlo.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+#include "defs.h"
+
+#include <stdlib.h>                                      /* malloc(), free() */
+#include <sys/param.h>                                    /* for MAXPATHLEN */
+
+#include "config.h"
+#include "common.h"
+#include "threads.h"
+#include "mtime.h"
+#include "tests.h"
+
+#include "interface.h"
+#include "intf_msg.h"
+#include "intf_playlist.h"
+
+#include "main.h"
+
+#include "modules.h"
+#include "modules_export.h"
+
+#define OSX_COM_STRUCT vout_sys_s
+#define OSX_COM_TYPE vout_sys_t
+#include "macosx.h"
+
+#include "video.h"
+#include "video_output.h"
+#include "stream_control.h"
+#include "input_ext-intf.h"
+
+#import "intf_vlc_wrapper.h"
+
+#define p_area p_main->p_intf->p_input->stream.p_selected_area
+
+@implementation Intf_VlcWrapper
+//Initialization,.....
+    + (Intf_VlcWrapper*) instance {
+        static bool b_initialized = 0;
+        static Intf_VlcWrapper* o_vlc = nil ;
+    
+        if (!b_initialized) {
+            o_vlc = [[Intf_VlcWrapper alloc] init] ;
+            b_initialized = TRUE ;
+        }
+        
+        return o_vlc ;
+    }
+    
+    - (Intf_VlcWrapper*) initWithDelegate:(id)_o_delegate {
+            e_speed = SPEED_NORMAL ;
+            o_delegate = _o_delegate ;
+        
+            return self ;
+    }
+
+
+
+
+    - (bool) manage {
+        vout_thread_t *p_vout ;
+        bool b_resize=FALSE, b_request=FALSE, b_release=FALSE;
+        bool b_fullscreen=FALSE ;
+
+        p_main->p_intf->pf_manage( p_main->p_intf ) ;
+        
+        if ((p_vout = [self lockVout])) {
+            i_width = p_vout->i_width ;
+            i_height = p_vout->i_height ;
+            b_fullscreen = !!p_vout->b_fullscreen ;
+            
+            //Also mange the notifications for the output.
+            if (p_vout->i_changes & (VOUT_SIZE_CHANGE | VOUT_FULLSCREEN_CHANGE)) b_resize = TRUE ;
+            if (p_vout->p_sys->i_changes & OSX_VOUT_INTF_REQUEST_QDPORT) b_request = TRUE ;
+            if (p_vout->p_sys->i_changes & OSX_VOUT_INTF_RELEASE_QDPORT) b_release = TRUE ;
+            
+            p_vout->i_changes &= ~(VOUT_SIZE_CHANGE | VOUT_FULLSCREEN_CHANGE) ;
+            p_vout->p_sys->i_changes &= ~(OSX_VOUT_INTF_REQUEST_QDPORT | OSX_VOUT_INTF_RELEASE_QDPORT) ;
+
+            [self unlockVout] ;
+        }
+        
+        if (b_resize) [o_delegate resizeQDPortFullscreen:b_fullscreen] ;
+        if (b_release) [o_delegate releaseQDPort] ;
+        if (b_request) [o_delegate requestQDPortFullscreen:b_fullscreen] ;
+
+        return p_main->p_intf->b_die ;
+    }
+
+
+
+
+//Function for the GUI. 
+    - (void) setQDPort:(CGrafPtr)p_qdport {
+        vout_thread_t *p_vout;
+        
+        if ((p_vout = [self lockVout])) {
+            p_vout->p_sys->p_qdport = p_qdport ;
+            p_vout->p_sys->i_changes |= OSX_INTF_VOUT_QDPORT_CHANGE ;
+            [self unlockVout] ;
+        }
+    }
+    
+    - (void) sizeChangeQDPort {
+        vout_thread_t *p_vout;
+        
+        if ((p_vout = [self lockVout])) {
+            p_vout->p_sys->i_changes |= OSX_INTF_VOUT_SIZE_CHANGE ;
+            [self unlockVout] ;
+        }
+    }    
+
+    - (NSSize) videoSize {
+        return NSMakeSize(i_width, i_height) ;
+    }
+
+
+
+
+//Playback control
+    - (void) play {
+        if (![self hasInput]) return ;
+    
+        switch (e_speed)
+        {
+            case SPEED_SLOW:
+                input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_SLOWER) ;
+                break ;
+            case SPEED_NORMAL:
+                input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_PLAY) ;
+                break ;
+            case SPEED_FAST:
+                input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_FASTER) ;
+                break ;
+        }
+    }
+    
+    - (void) pause {
+        if (![self hasInput]) return ;
+    
+        input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_PAUSE) ;
+    }
+    
+    - (void) stop {
+        return ;
+    }
+    
+    - (void) stepf {
+        return ;
+    }
+    
+    - (void) stepr {
+        return ;
+    }
+    
+    - (void) setSpeed:(intf_speed_t) _e_speed {
+        e_speed = _e_speed ;
+        [self play] ;
+    }
+    
+    - (NSString *) getTimeAsString {
+        static char psz_currenttime[ OFFSETTOTIME_MAX_SIZE ] ;
+        
+        if (![self hasInput]) return [NSString stringWithCString:"00:00:00"] ;
+        
+        input_OffsetToTime( p_main->p_intf->p_input, psz_currenttime, p_area->i_tell ) ;        
+        return [NSString stringWithCString:psz_currenttime] ;
+    }
+    
+    - (float) getTimeAsFloat {
+        if (![self hasInput]) return 0.0 ;
+    
+        return (float)p_area->i_tell / (float)p_area->i_size ;
+    }
+
+    - (void) setTimeAsFloat:(float) f_position {
+        if (![self hasInput]) return ;
+    
+        input_Seek(p_main->p_intf->p_input, p_area->i_size * f_position) ;
+    }
+    
+    
+
+    
+//Playlist control
+    - (void) lockPlaylist {
+        vlc_mutex_lock(&p_main->p_playlist->change_lock) ;
+    }
+    
+    - (void) unlockPlaylist {
+        vlc_mutex_unlock(&p_main->p_playlist->change_lock) ;
+    }
+    
+     - (int) getPlaylistLength {
+        return p_main->p_playlist->i_size ;
+    }
+    
+    - (NSString*) getPlaylistItem:(int) i_pos {
+        if (i_pos >= p_main->p_playlist->i_size)
+            return nil ;
+            
+        return [NSString stringWithCString:p_main->p_playlist->p_item[i_pos].psz_name] ;
+    }
+    
+    - (void) playNextPlaylistItem {
+        intf_PlaylistNext(p_main->p_playlist) ;
+    }
+    
+    - (void) playPrevPlaylistItem {
+        intf_PlaylistPrev(p_main->p_playlist) ;
+    }
+    
+    - (void) addPlaylistItem:(NSString*)o_filename {
+        intf_PlaylistAdd(p_main->p_playlist, PLAYLIST_END, [o_filename lossyCString]) ;
+    }
+    
+
+
+
+// Private Functions. This are just some utilities for other functions
+    - (bool) hasInput {
+        return (p_main->p_intf->p_input != NULL) ? TRUE : FALSE ;
+    }
+
+    - (struct vout_thread_s*) lockVout {
+        vlc_mutex_lock(&p_vout_bank->lock) ;
+        if (p_vout_bank->i_count) {
+            vlc_mutex_lock(&p_vout_bank->pp_vout[0]->change_lock) ;
+            vlc_mutex_lock(&p_vout_bank->pp_vout[0]->p_sys->lock) ;
+            return p_vout_bank->pp_vout[0] ;
+        }
+        else
+        {
+            vlc_mutex_unlock(&p_vout_bank->lock) ;
+            return NULL ;
+        }
+    }
+    
+    - (void) unlockVout {
+        vlc_mutex_lock(&p_vout_bank->pp_vout[0]->p_sys->lock) ;
+        vlc_mutex_unlock(&p_vout_bank->pp_vout[0]->change_lock) ;
+        vlc_mutex_unlock(&p_vout_bank->lock) ;
+    }
+@end
diff --git a/plugins/macosx/intf_vlc_wrapper.h b/plugins/macosx/intf_vlc_wrapper.h
new file mode 100644 (file)
index 0000000..58da6aa
--- /dev/null
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * intf_vlc_wrapper.h : MacOS X plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $$
+ *
+ * Authors: Florian G. Pflug <fgp@phlo.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+struct vlc_thread_s ;
+typedef enum intf_speed_e {SPEED_SLOW=0, SPEED_NORMAL, SPEED_FAST} intf_speed_t ;
+@protocol VlcWrapper_Delegate
+    - (void) requestQDPortFullscreen:(bool)b_fullscreen ;
+    - (void) releaseQDPort ;
+    - (void) resizeQDPortFullscreen:(bool)b_fullscreen ;
+@end
+
+
+// Intf_VlcWrapper is a singleton class (there is only one instance at any time)
+@interface Intf_VlcWrapper : NSObject {    
+    id<VlcWrapper_Delegate> o_delegate ;
+    intf_speed_t e_speed ;
+    
+    unsigned int i_width, i_height ;
+}
+
+// Initialization,.... 
++ (Intf_VlcWrapper*) instance ;
+- (Intf_VlcWrapper*) initWithDelegate:(id)o_delegate ;
+
+- (bool) manage ;
+
+//Function for the GUI. 
+- (void) setQDPort:(CGrafPtr)p_qdport ;
+- (void) sizeChangeQDPort ;
+- (NSSize) videoSize ;
+
+// Playback control
+- (void) play ;
+- (void) pause ;
+- (void) stop ;
+- (void) stepf ;
+- (void) stepr ;
+- (void) setSpeed:(intf_speed_t)e_speed ;
+- (NSString*) getTimeAsString ;
+- (float) getTimeAsFloat ;
+- (void) setTimeAsFloat:(float)i_offset ;
+
+// Playlist control
+- (void) lockPlaylist ;
+- (void) unlockPlaylist ;
+- (int) getPlaylistLength ;
+- (NSString*) getPlaylistItem:(int)i_pos ;
+- (void) playNextPlaylistItem ;
+- (void) playPrevPlaylistItem ;
+- (void) addPlaylistItem:(NSString*)o_filename ;
+
+//private
+- (bool) hasInput ;
+- (struct vout_thread_s*) lockVout ;
+- (void) unlockVout ;
+@end
+
index 31bd1a4871823012c890382e12e3c5a67c32dd8a..4f6fe439cc0c37c72b7fbd603da537d9d479536f 100644 (file)
@@ -2,10 +2,11 @@
  * macosx.c : MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: macosx.c,v 1.6 2001/10/08 16:20:25 massiot Exp $
+ * $Id: macosx.c,v 1.7 2001/10/30 10:48:14 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
+ *         Florian G. Pflug <fgp@phlo.org>
  *
  * 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
@@ -22,6 +23,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#define MODULE_NAME macosx
 #include "modules_inner.h"
 
 /*****************************************************************************
diff --git a/plugins/macosx/macosx.h b/plugins/macosx/macosx.h
new file mode 100644 (file)
index 0000000..1c6c17c
--- /dev/null
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * macosx.h : MacOS X plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $$
+ *
+ * Authors: Florian G. Pflug <fgp@phlo.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * The vout struct as access from both, the output and the interface module
+ *****************************************************************************/
+#include <QuickTime/QuickTime.h>
+
+#define OSX_INTF_VOUT_QDPORT_CHANGE    0x0001
+#define OSX_INTF_VOUT_SIZE_CHANGE      0x0002
+#define OSX_VOUT_INTF_REQUEST_QDPORT   0x0004
+#define OSX_VOUT_INTF_RELEASE_QDPORT   0x0008
+
+/* This struct is included as the _FIRST_ member in vout_sys_t */
+/* That way the interface can cast the vout_sys_t to osx_com_t */
+/* and doesn't need the definition of vout_sys_t */
+#ifndef OSX_COM_TYPE
+    #define OSX_COM_TYPE osx_com_t
+    #define OSX_COM_STRUCT osx_com_s
+#endif
+typedef struct OSX_COM_STRUCT {
+    vlc_mutex_t lock ;
+    unsigned int i_changes ;
+    
+    CGrafPtr p_qdport ;
+} OSX_COM_TYPE ;
diff --git a/plugins/macosx/macosx_common.h b/plugins/macosx/macosx_common.h
deleted file mode 100755 (executable)
index 78388a4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * macosx.c : MacOS X plugin for vlc
- *****************************************************************************
- * 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>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Constants & more
- *****************************************************************************/
-
-#ifndef __CARBONPREFIX__
-    #define __CARBONPREFIX__
-
-    // Needed for carbonization
-    #define TARGET_API_MAC_CARBON 1
-
-    // For the pascal to C or C to pascal string conversions in carbon
-    #define OLDP2C 1
-#endif
-
-#include <Carbon/Carbon.h>
-
-
-#define PLAYING                0
-#define PAUSED         1
-#define STOPPED                2
-
-
-/*****************************************************************************
- * Type declarations that unfortunately need to be known to both
- * ...
- * Kind of a hack due to the fact that on Mac OS, there is little difference 
- * between the interface and the video output, and hence little separation
- * between those elements.
- *****************************************************************************/
-
-/*****************************************************************************
- * vout_sys_t: MacOS X video output method descriptor
- *****************************************************************************
- * This structure is part of the video output thread descriptor.
- * It describes the MacOS X specific properties of an output thread.
- *****************************************************************************/
-typedef struct vout_sys_s
-{
-    Rect       wrect;
-    WindowRef  p_window;
-    short gwLocOffscreen;
-    GWorldPtr p_gw[ 2 ];
-    Boolean gNewNewGWorld;      /* can we allocate in VRAm or AGP memory ? */
-    
-    GDHandle  theGDList;
-    Ptr                                theBase;
-    int                                theRow;
-    int                                theDepth;
-} vout_sys_t;
diff --git a/plugins/macosx/macosx_qt.c b/plugins/macosx/macosx_qt.c
deleted file mode 100644 (file)
index 11c2dcf..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * macosx.c : MacOS X plugin for vlc
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: macosx_qt.c,v 1.1 2001/10/08 23:10:28 massiot Exp $
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <stdlib.h>                                      /* malloc(), free() */
-
-#include "config.h"
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-
-/*****************************************************************************
- * 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 );
-
-/*****************************************************************************
- * Build configuration tree.
- *****************************************************************************/
-MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MacOS X QuickTime module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
-MODULE_CONFIG_STOP
-
-MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT
-                                | MODULE_CAPABILITY_AOUT
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "MacOS X QuickTime output";
-MODULE_INIT_STOP
-
-MODULE_ACTIVATE_START
-    _M( vout_getfunctions )( &p_module->p_functions->vout );
-    _M( aout_getfunctions )( &p_module->p_functions->aout );
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
-MODULE_ACTIVATE_STOP
-
-MODULE_DEACTIVATE_START
-MODULE_DEACTIVATE_STOP
-
diff --git a/plugins/macosx/macosx_qt_common.h b/plugins/macosx/macosx_qt_common.h
deleted file mode 100644 (file)
index 6c7a37c..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*****************************************************************************
- * macosx.c : MacOS X plugin for vlc
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: macosx_qt_common.h,v 1.1 2001/10/08 23:10:28 massiot Exp $
- *
- * Authors: Colin Delacroix <colin@zoy.org>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Constants & more
- *****************************************************************************/
-
-#ifndef __CARBONPREFIX__
-    #define __CARBONPREFIX__
-
-    // Needed for carbonization
-    #define TARGET_API_MAC_CARBON 1
-
-    // For the pascal to C or C to pascal string conversions in carbon
-    #define OLDP2C 1
-#endif
-
-#include <Carbon/Carbon.h>
-#include <QuickTime/QuickTime.h>
-#include <CoreServices/CoreServices.h>
-#include <QuickTime/QuickTime.h>
-#include <ApplicationServices/ApplicationServices.h>
-
-
-/*****************************************************************************
- * Type declarations that unfortunately need to be known to both
- * ...
- * Kind of a hack due to the fact that on Mac OS, there is little difference 
- * between the interface and the video output, and hence little separation
- * between those elements.
- *****************************************************************************/
-extern main_t *p_main;
-
-/*****************************************************************************
- * vout_sys_t: MacOS X video output method descriptor
- *****************************************************************************
- * This structure is part of the video output thread descriptor.
- * It describes the MacOS X specific properties of an output thread.
- *****************************************************************************/
-typedef struct vout_sys_s
-{
-    ImageDescriptionHandle h_img_descr ;
-    ImageSequence i_seq ;   
-    unsigned int i_img_size ;
-    unsigned char *p_img ;
-} vout_sys_t;
-
-/*****************************************************************************
- * intf_sys_t: description and status of the interface
- *****************************************************************************/
-typedef struct intf_sys_s
-{
-    Ptr before_fullscreen ;
-    WindowRef p_window;
-    EventLoopTimerRef r_timer ;
-    
-    unsigned int b_active ;
-} intf_sys_t;
-
index b58dae5c0104730f2269137110d71b01fe0e8f60..97a86533442c648405101d0e30925f68b3b255e3 100644 (file)
@@ -1,9 +1,11 @@
+
 /*****************************************************************************
  * vout_macosx.c: MacOS X video output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  *
  * Authors: Colin Delacroix <colin@zoy.org>
+ *          Florian G. Pflug <fgp@phlo.org>
  *
  * 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
@@ -20,6 +22,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#define MODULE_NAME macosx
 #include "modules_inner.h"
 
 /*****************************************************************************
@@ -37,6 +40,7 @@
 #include "mtime.h"
 #include "tests.h"
 
+#include "interface.h"
 #include "intf_msg.h"
 
 #include "video.h"
 #include "modules.h"
 #include "main.h"
 
-#include "macosx_common.h"
+#include "macosx.h"
 
+#include <QuickTime/QuickTime.h>
 
 /*****************************************************************************
- * Constants & more
+ * vout_sys_t: MacOS X video output method descriptor
+ *****************************************************************************
+ * This structure is part of the video output thread descriptor.
+ * It describes the MacOS X specific properties of an output thread.
  *****************************************************************************/
-
-// Initial Window Constants
-enum
+typedef unsigned int yuv2_data_t ;
+typedef struct vout_sys_s
 {
-    kWindowOffset = 100
-};
+    osx_com_t osx_communication ;
 
-// where is the off screen
-enum
-{
-    kNoWhere = 0,
-    kInVRAM,
-    kInAGP,
-    kInSystem
-};
+    ImageDescriptionHandle h_img_descr ;
+    ImageSequence i_seq ;   
+    unsigned int c_codec ;
+    MatrixRecordPtr p_matrix ;
+    
+    yuv2_data_t *p_yuv2 ;
+    unsigned i_yuv2_size ;
+    PlanarPixmapInfoYUV420 s_ppiy420 ;
+} vout_sys_t;
 
 
 /*****************************************************************************
@@ -79,17 +86,14 @@ static void vout_Destroy   ( struct vout_thread_s * );
 static int  vout_Manage    ( struct vout_thread_s * );
 static void vout_Display   ( struct vout_thread_s * );
 
-/* OS specific */
-
-static int CreateDisplay       ( struct vout_thread_s * );
-static int MakeWindow          ( struct vout_thread_s * );
-static int AllocBuffer         ( struct vout_thread_s * , short index );
-
-void BlitToWindow              ( struct vout_thread_s * , short index );
-GDHandle GetWindowDevice       ( struct vout_thread_s * );
-void FillOffscreen             ( struct vout_thread_s * , short index);
-
-void FindBestMemoryLocation( struct vout_thread_s * );
+/* OS Specific */
+static void fillout_PPIYUV420( picture_t *p_y420, PlanarPixmapInfoYUV420 *p_ppiy420 ) ;
+static void fillout_ImageDescription(ImageDescriptionHandle h_descr, unsigned int i_with, unsigned int i_height, unsigned int c_codec) ;
+static void fillout_ScalingMatrix( vout_thread_t *p_vout ) ;
+static OSErr new_QTSequence(ImageSequence *i_seq, CGrafPtr p_port, ImageDescriptionHandle h_descr, MatrixRecordPtr p_matrix) ;
+static int create_QTSequenceBestCodec( vout_thread_t *p_vout ) ;
+static void dispose_QTSequence( vout_thread_t *p_vout ) ;
+static void convert_Y420_to_YUV2( picture_t *p_y420, yuv2_data_t *p_yuv2 ) ;
 
 /*****************************************************************************
  * Functions exported as capabilities. They are declared as static so that
@@ -127,271 +131,34 @@ static int vout_Probe( probedata_t *p_data )
  *****************************************************************************/
 static int vout_Create( vout_thread_t *p_vout )
 {
-    //intf_ErrMsg( "vout_Create()" );
-
-    /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
     {
         intf_ErrMsg( "error: %s", strerror( ENOMEM ) );
         return( 1 );
     }
+    p_vout->p_sys->h_img_descr = (ImageDescriptionHandle)NewHandleClear( sizeof( ImageDescription ) ) ;
+    p_vout->p_sys->p_matrix = (MatrixRecordPtr)malloc( sizeof( MatrixRecord ) ) ;
+    p_vout->p_sys->c_codec = 'NONE' ;
 
-    p_vout->p_sys->gwLocOffscreen = kNoWhere;
-    p_vout->p_sys->p_window       = NULL;
-    p_vout->p_sys->p_gw[ 0 ]      = NULL;
-    p_vout->p_sys->p_gw[ 1 ]      = NULL;
-    
-    if ( CreateDisplay( p_vout ) )
-    {
-        intf_ErrMsg( "vout error: can't open display" );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-
-#if 0
-    intf_ErrMsg( "vout p_vout->i_width %d" , p_vout->i_width);
-    intf_ErrMsg( "vout p_vout->i_height %d" , p_vout->i_height);
-    intf_ErrMsg( "vout p_vout->i_bytes_per_pixel %d" , p_vout->i_bytes_per_pixel);
-    intf_ErrMsg( "vout p_vout->i_screen_depth %d" , p_vout->i_screen_depth);
-#endif
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * Find the best memory (AGP, VRAM, system) location
- *****************************************************************************/
-void FindBestMemoryLocation( vout_thread_t *p_vout )
-{
-    long versionSystem;
-
-    Gestalt( gestaltSystemVersion, &versionSystem );
-    if ( 0x00000900 <= ( versionSystem & 0x00000FF00  ) )
-    {
-        intf_ErrMsg( "FindBestMemoryLocation : gNewNewGWorld = true" );
-        p_vout->p_sys->gNewNewGWorld = true;
-    }
-    else
-    {
-        // now it is tricky
-        // we will try to allocate in VRAM and find out where the allocation really ended up.
-        GWorldPtr pgwTest = NULL;
-        Rect rectTest = {0, 0, 10, 10};
-        short wPixDepth = 
-            (**(GetPortPixMap( GetWindowPort( p_vout->p_sys->p_window ) ))).pixelSize;
-        GDHandle hgdWindow = GetWindowDevice( p_vout );
-
-        intf_ErrMsg( "FindBestMemoryLocation : gNewNewGWorld = false !" );
-#if 0
-        p_vout->i_screen_depth = wPixDepth;
-        p_vout->i_bytes_per_pixel = wPixDepth;
-        p_vout->i_bytes_per_line = (**(**hgdWindow).gdPMap).rowBytes & 0x3FFF ;
-#endif
-        if(    ( noErr == NewGWorld( &pgwTest, wPixDepth, &rectTest, NULL, hgdWindow,
-                                     noNewDevice | useDistantHdwrMem ) ) 
-            && ( pgwTest ) )
-        {
-            p_vout->p_sys->gNewNewGWorld = true;       
-        }
-        
-        if( pgwTest )
-        {
-            DisposeGWorld( pgwTest );
-        }
-    }
-}
-
-/*****************************************************************************
- * CreateDisplay: setup display params...
- *****************************************************************************/
-static int CreateDisplay( vout_thread_t *p_vout )
-{
-    PixMapHandle hPixmap0, hPixmap1;
-    void * hPixmapBaseAddr0, * hPixmapBaseAddr1;
-
-    //intf_ErrMsg( "CreateDisplay()" );
-
-    if( MakeWindow( p_vout ) )
-    {
-        intf_ErrMsg( "vout error: can't open window display" );
-        return( 1 );
-    }
-
-    // FindBestMemoryLocation( p_vout );
-
-    //try to allocate @ best location, will eventaully trickle down to worst
-    p_vout->p_sys->gwLocOffscreen = kInVRAM;
-    if( AllocBuffer( p_vout, 0 ) || AllocBuffer( p_vout, 1 ) )
-    {
-        intf_ErrMsg( "vout error: can't alloc offscreen buffers" );
-        return( 1 );
-    }
-
-//FIXME ? - lock this down until the end...
-    hPixmap0 = GetGWorldPixMap( p_vout->p_sys->p_gw[0] );
-    LockPixels(hPixmap0);
-    hPixmap1 = GetGWorldPixMap( p_vout->p_sys->p_gw[1] );
-    LockPixels(hPixmap1);
-    
-    //FIXME hopefully this is the same for all Gworlds & window since they are the same size
-    p_vout->i_bytes_per_line = (**hPixmap0).rowBytes & 0x3FFF;
-
-    if ( (hPixmap0 == NULL) || (hPixmap1 == NULL) )
-    {
-        intf_ErrMsg( "vout error: pixmap problem");
-        UnlockPixels(hPixmap0);
-        UnlockPixels(hPixmap1);
-        return( 1 );
-    }
-
-    hPixmapBaseAddr0 = GetPixBaseAddr( hPixmap0 );
-    hPixmapBaseAddr1 = GetPixBaseAddr( hPixmap1 );
-    if ( (hPixmapBaseAddr0 == NULL) || (hPixmapBaseAddr1 == NULL) )
-    {
-        intf_ErrMsg( "vout error: pixmap base addr problem");
-        return( 1 );
-    }
-
-//FIXME - if I ever dispose of the Gworlds and recreate them, i'll have a new address
-//and I'll need to tell vout about them...  dunno what problems vout might have if we just updateGworld  
-    p_vout->pf_setbuffers( p_vout, hPixmapBaseAddr0, hPixmapBaseAddr1 );
-
-    return 0;
-}
-
-/*****************************************************************************
- * MakeWindow: open and set-up a Mac OS main window
- *****************************************************************************/
-static int MakeWindow( vout_thread_t *p_vout )
-{
-    int left = 0;
-    int top = 0;
-    int bottom = p_vout->i_height;
-    int right = p_vout->i_width;
-    ProcessSerialNumber PSN;
-
-    WindowAttributes windowAttr = kWindowStandardDocumentAttributes | 
-                                    kWindowStandardHandlerAttribute |
-                                    kWindowInWindowMenuAttribute;
-    
-    SetRect( &p_vout->p_sys->wrect, left, top, right, bottom );
-    OffsetRect( &p_vout->p_sys->wrect, kWindowOffset, kWindowOffset );
-
-    CreateNewWindow( kDocumentWindowClass, windowAttr, &p_vout->p_sys->wrect, &p_vout->p_sys->p_window );
-    if ( p_vout->p_sys->p_window == nil )
-    {
-        return( 1 );
-    }
-
-    InstallStandardEventHandler(GetWindowEventTarget(p_vout->p_sys->p_window));
-    SetPort( GetWindowPort( p_vout->p_sys->p_window ) );
-    SetWindowTitleWithCFString( p_vout->p_sys->p_window, CFSTR("VLC") );
-    ShowWindow( p_vout->p_sys->p_window );
-    SelectWindow( p_vout->p_sys->p_window );
-
-    //in case we are run from the command line, bring us to front instead of Terminal
-    GetCurrentProcess(&PSN);
-    SetFrontProcess(&PSN);
-
-{
-    short wPixDepth = (**(GetPortPixMap( GetWindowPort( p_vout->p_sys->p_window ) ))).pixelSize;
-    p_vout->i_screen_depth = wPixDepth;
-    p_vout->i_bytes_per_pixel = p_vout->i_screen_depth / 8;
-    p_vout->i_bytes_per_line   = p_vout->i_width * p_vout->i_bytes_per_pixel;
-
-    p_vout->i_bytes_per_line = (**(**GetWindowDevice( p_vout )).gdPMap).rowBytes & 0x3FFF ;
-
-    switch ( p_vout->i_screen_depth )
-    {
-        case 32:
-        case 24:
-            p_vout->i_red_mask =   0xff0000;
-            p_vout->i_green_mask = 0xff00;
-            p_vout->i_blue_mask =  0xff;
-            break;
-        case 16:
-        case 15:
-            p_vout->i_red_mask =   0x00007c00;
-            p_vout->i_green_mask = 0x000003e0;
-            p_vout->i_blue_mask =  0x0000001f;
-            break;
-        default:
-            break;
-    }
-}
-
-#if 0
-    p_vout->i_red_lshift = 0x10;
-    p_vout->i_red_rshift = 0x0;
-    p_vout->i_green_lshift = 0x8;
-    p_vout->i_green_rshift = 0x0;
-    p_vout->i_blue_lshift = 0x0;
-    p_vout->i_blue_rshift = 0x0;
-
-    p_vout->i_white_pixel = 0xffffff;
-    p_vout->i_black_pixel = 0x0;
-    p_vout->i_gray_pixel = 0x808080;
-    p_vout->i_blue_pixel = 0x32;
-#endif
+    EnterMovies() ;
 
     return( 0 );
 }
 
-/*****************************************************************************
- * AllocBuffer: forces offscreen allocation (if different than current) in
- * memory type specified
- *****************************************************************************/
-static int AllocBuffer ( vout_thread_t *p_vout, short index )
-{
-    Rect bounds;
-    GDHandle hgdWindow = GetWindowDevice( p_vout );
-
-    switch ( p_vout->p_sys->gwLocOffscreen )
-    {
-        case kInVRAM:
-            if ( noErr == NewGWorld( &p_vout->p_sys->p_gw[index], p_vout->i_screen_depth, 
-                GetPortBounds( GetWindowPort( p_vout->p_sys->p_window ), &bounds ), NULL, 
-                hgdWindow, noNewDevice | useDistantHdwrMem ) )         
-            {
-                intf_ErrMsg( "Allocate off screen image in VRAM" );
-                break;
-            }
-            intf_ErrMsg( "Unable to allocate off screen image in VRAM, trying next best AGP" );
-            p_vout->p_sys->gwLocOffscreen = kInAGP;
-        case kInAGP:
-            if (noErr == NewGWorld( &p_vout->p_sys->p_gw[index], p_vout->i_screen_depth, 
-                GetPortBounds( GetWindowPort( p_vout->p_sys->p_window ), &bounds ), NULL, 
-                hgdWindow, noNewDevice | useLocalHdwrMem ) )
-            {
-                intf_ErrMsg( "Allocate off screen image in AGP" );
-                break;
-            }
-            intf_ErrMsg( "Unable to allocate off screen image in AGP, trying next best System" );
-            p_vout->p_sys->gwLocOffscreen = kInSystem;
-        case kInSystem:
-        default:
-            if ( noErr == NewGWorld( &p_vout->p_sys->p_gw[index], p_vout->i_screen_depth, 
-                GetPortBounds( GetWindowPort( p_vout->p_sys->p_window ), &bounds ), NULL, 
-                hgdWindow, noNewDevice | keepLocal) )
-            {
-                intf_ErrMsg( "Allocate off screen image in System" );
-                break;
-            }
-            intf_ErrMsg( "Unable to allocate off screen image in System, no options left - failing" );
-            p_vout->p_sys->gwLocOffscreen = kNoWhere;
-            return( 1 ); // nothing was allocated
-    } 
-    return( 0 );
-}
-
 /*****************************************************************************
  * vout_Init: initialize video thread output method
  *****************************************************************************/
 static int vout_Init( vout_thread_t *p_vout )
 {
-    //intf_ErrMsg( "vout_Init()" );
-    return( 0 );
+    p_vout->b_need_render = 0 ;
+    p_vout->i_bytes_per_line = p_vout->i_width ;
+    p_vout->p_sys->c_codec = 'NONE' ;
+    vlc_mutex_lock( &p_vout->p_sys->osx_communication.lock ) ;
+        p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
+    vlc_mutex_unlock( &p_vout->p_sys->osx_communication.lock ) ;
+    
+    return 0 ;
 }
 
 /*****************************************************************************
@@ -399,8 +166,11 @@ static int vout_Init( vout_thread_t *p_vout )
  *****************************************************************************/
 static void vout_End( vout_thread_t *p_vout )
 {
-    //intf_ErrMsg( "vout_End()" );
-    ;
+    vlc_mutex_lock( &p_vout->p_sys->osx_communication.lock ) ;
+        p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_RELEASE_QDPORT ;
+    vlc_mutex_unlock( &p_vout->p_sys->osx_communication.lock ) ;
+    
+    dispose_QTSequence( p_vout ) ;
 }
 
 /*****************************************************************************
@@ -408,28 +178,8 @@ static void vout_End( vout_thread_t *p_vout )
  *****************************************************************************/
 static void vout_Destroy( vout_thread_t *p_vout )
 {
-    //intf_ErrMsg( "vout_Destroy()" );
-
-//FIXME Big Lock around Gworlds
-    PixMapHandle hPixmap0, hPixmap1;
-    hPixmap0 = GetGWorldPixMap( p_vout->p_sys->p_gw[0] );
-    hPixmap1 = GetGWorldPixMap( p_vout->p_sys->p_gw[1] );
-    UnlockPixels(hPixmap0);
-    UnlockPixels(hPixmap1);
-
-    if ( p_vout->p_sys->p_gw[0] )
-    {
-        DisposeGWorld( p_vout->p_sys->p_gw[0] );
-    }
-    if ( p_vout->p_sys->p_gw[1] )
-    {
-        DisposeGWorld( p_vout->p_sys->p_gw[1] );
-    }
-    if ( p_vout->p_sys->p_window )
-    {
-        DisposeWindow( p_vout->p_sys->p_window );
-    }
-
+    free( p_vout->p_sys->p_matrix ) ;
+    DisposeHandle( (Handle)p_vout->p_sys->h_img_descr ) ;
     free( p_vout->p_sys );
 }
 
@@ -440,179 +190,207 @@ static void vout_Destroy( vout_thread_t *p_vout )
  * console events. It returns a non null value on error.
  *****************************************************************************/
 static int vout_Manage( vout_thread_t *p_vout )
-{
-//    intf_ErrMsg( "vout_Manage()" );
-    return( 0 );
+{    
+    vlc_mutex_lock( &p_vout->p_sys->osx_communication.lock ) ;
+        if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_QDPORT_CHANGE ) {
+            dispose_QTSequence( p_vout ) ;
+            create_QTSequenceBestCodec( p_vout ) ;
+        }
+        else if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_SIZE_CHANGE ) {
+            fillout_ScalingMatrix( p_vout ) ;
+            SetDSequenceMatrix( p_vout->p_sys->i_seq, p_vout->p_sys->p_matrix ) ;
+        }
+        
+        p_vout->p_sys->osx_communication.i_changes &= ~( 
+            OSX_INTF_VOUT_QDPORT_CHANGE |
+            OSX_INTF_VOUT_SIZE_CHANGE
+        ) ;
+    vlc_mutex_unlock( &p_vout->p_sys->osx_communication.lock ) ;
+        
+    return 0 ;
 }
 
+
 /*****************************************************************************
- * vout_Display: displays previously rendered output
+ * vout_OSX_Display: displays previously rendered output
  *****************************************************************************
  * This function send the currently rendered image to image, waits until
  * it is displayed and switch the two rendering buffers, preparing next frame.
  *****************************************************************************/
-static void vout_Display( vout_thread_t *p_vout )
+void vout_Display( vout_thread_t *p_vout )
 {
-//    intf_ErrMsg( "vout_Display()" );
+    CodecFlags out_flags ;
+    
+    switch (p_vout->p_sys->c_codec)
+    {
+        case 'yuv2':
+            convert_Y420_to_YUV2(p_vout->p_rendered_pic, p_vout->p_sys->p_yuv2) ;
+            DecompressSequenceFrameS(
+               p_vout->p_sys->i_seq,
+               (void *)p_vout->p_sys->p_yuv2,
+               p_vout->p_sys->i_yuv2_size,
+               codecFlagUseScreenBuffer,
+               &out_flags,
+               nil
+            ) ;
+            break ;
+        case 'y420':
+            fillout_PPIYUV420(p_vout->p_rendered_pic, &p_vout->p_sys->s_ppiy420) ;
+            DecompressSequenceFrameS(
+               p_vout->p_sys->i_seq,
+               (void *)&p_vout->p_sys->s_ppiy420,
+               sizeof(PlanarPixmapInfoYUV420),
+               codecFlagUseScreenBuffer,
+               &out_flags,
+               nil
+            ) ;            
+            break ;
+    }
+}
 
-//we should not be called if we set the status to paused or stopped via the interface
-//    if ( p_vout->p_sys->playback_status != PAUSED &&  p_vout->p_sys->playback_status != STOPPED )
-        BlitToWindow ( p_vout, p_vout->i_buffer_index );
+static void fillout_PPIYUV420( picture_t *p_y420, PlanarPixmapInfoYUV420 *p_ppiy420 )
+{
+    p_ppiy420->componentInfoY.offset = (void *)p_y420->p_y - (void *)p_ppiy420 ;
+    p_ppiy420->componentInfoY.rowBytes = p_y420->i_width ;
+    p_ppiy420->componentInfoCb.offset = (void *)p_y420->p_u - (void *)p_ppiy420 ;
+    p_ppiy420->componentInfoCb.rowBytes = p_y420->i_width / 2;
+    p_ppiy420->componentInfoCr.offset = (void *)p_y420->p_v - (void *)p_ppiy420 ;
+    p_ppiy420->componentInfoCr.rowBytes = p_y420->i_width / 2;
 }
 
 
-/*****************************************************************************
- * flushQD: flushes buffered window area
- *****************************************************************************/
-void flushQD( vout_thread_t *p_vout )
+static void fillout_ImageDescription(ImageDescriptionHandle h_descr, unsigned int i_width, unsigned int i_height, unsigned int c_codec)
 {
-    CGrafPtr thePort;
-
-    //intf_ErrMsg( "flushQD()" );
-    
-    thePort = GetWindowPort( p_vout->p_sys->p_window );
+    ImageDescriptionPtr p_descr ;
+
+    HLock((Handle)h_descr) ;
+    p_descr = *h_descr ;
+    p_descr->idSize = sizeof(ImageDescription) ;
+    p_descr->cType = c_codec ;
+    p_descr->resvd1 = 0 ; //Reserved
+    p_descr->resvd2 = 0 ; //Reserved
+    p_descr->dataRefIndex = 0 ; //Reserved
+    p_descr->version = 1 ; //
+    p_descr->revisionLevel = 0 ;
+    p_descr->vendor = 'appl' ; //How do we get a vendor id??
+    p_descr->width = i_width  ;
+    p_descr->height = i_height ;
+    p_descr->hRes = Long2Fix(72) ;
+    p_descr->vRes = Long2Fix(72) ;
+    p_descr->spatialQuality = codecLosslessQuality ;
+    p_descr->frameCount = 1 ;
+    p_descr->clutID = -1 ; //We don't need a color table
     
-    /* flush the entire port */
-    if (QDIsPortBuffered(thePort))
-        QDFlushPortBuffer(thePort, NULL);
-
-#if 0
-    /* flush part of the port */
-    if (QDIsPortBuffered(thePort)) {
-        RgnHandle theRgn;
-        theRgn = NewRgn();
-            /* local port coordinates */
-        SetRectRgn(theRgn, 10, 10, 100, 30); 
-        QDFlushPortBuffer(thePort, theRgn);
-        DisposeRgn(theRgn);
+    switch (c_codec)
+    {
+        case 'yuv2':
+            p_descr->dataSize=i_width * i_height * 2 ;
+            p_descr->depth = 24 ;
+            break ;
+        case 'y420':
+            p_descr->dataSize=i_width * i_height * 1.5 ;
+            p_descr->depth = 12 ;
+            break ;
     }
-#endif
-
+    
+    HUnlock((Handle)h_descr) ;
 }
 
-/*****************************************************************************
- * BlitToWindow: checks offscreen and blits it to the front
- *****************************************************************************/
+static void fillout_ScalingMatrix( vout_thread_t *p_vout)
+{
+       Rect s_rect ;
+       Fixed factor_x ;
+       Fixed factor_y ;
+               
+       GetPortBounds( p_vout->p_sys->osx_communication.p_qdport, &s_rect ) ;
+//     if (((s_rect.right - s_rect.left) / ((float) p_vout->i_width)) < ((s_rect.bottom - s_rect.top) / ((float) p_vout->i_height)))
+               factor_x = FixDiv(Long2Fix(s_rect.right - s_rect.left), Long2Fix(p_vout->i_width)) ;
+//     else
+               factor_y = FixDiv(Long2Fix(s_rect.bottom - s_rect.top), Long2Fix(p_vout->i_height)) ;
+       
+       SetIdentityMatrix(p_vout->p_sys->p_matrix) ;
+       ScaleMatrix( p_vout->p_sys->p_matrix, factor_x, factor_y, Long2Fix(0), Long2Fix(0) ) ;
+}
 
-void BlitToWindow( vout_thread_t *p_vout, short index )
+static OSErr new_QTSequence( ImageSequence *i_seq, CGrafPtr p_qdport, ImageDescriptionHandle h_descr, MatrixRecordPtr p_matrix )
 {
-    Rect rectDest, rectSource;
-    GrafPtr pCGrafSave, windowPort = GetWindowPort( p_vout->p_sys->p_window );
+    return DecompressSequenceBeginS(
+        i_seq, 
+        h_descr,
+        NULL,
+        0,
+        p_qdport,
+        NULL, //device to display (is set implicit via the qdPort)
+        NULL, //src-rect
+        p_matrix, //matrix
+        0, //just do plain copying
+        NULL, //no mask region
+        codecFlagUseScreenBuffer,
+        codecLosslessQuality,
+        (DecompressorComponent) bestSpeedCodec
+    ) ;
+}
 
-    //intf_ErrMsg( "BlitToWindow() for %d", index );
+static int create_QTSequenceBestCodec( vout_thread_t *p_vout )
+{
+    if ( p_vout->p_sys->osx_communication.p_qdport == nil)
+    {
+        p_vout->p_sys->c_codec = 'NONE' ;
+        return 1 ;
+    }
 
-    GetPortBounds( p_vout->p_sys->p_gw[index], &rectSource );
-    GetPortBounds( windowPort, &rectDest );
-    
-    GetPort ( &pCGrafSave );
-    SetPortWindowPort( p_vout->p_sys->p_window );
-//FIXME have global lock - kinda bad but oh well 
-//    if ( LockPixels( GetGWorldPixMap( p_vout->p_sys->p_gw[index] ) ) )
-//    {
-
-//LockPortBits(GetWindowPort( p_vout->p_sys->p_window ));
-//NoPurgePixels( GetGWorldPixMap( p_vout->p_sys->p_gw[index] ) );
-
-        CopyBits( GetPortBitMapForCopyBits( p_vout->p_sys->p_gw[index] ), 
-                    GetPortBitMapForCopyBits( GetWindowPort( p_vout->p_sys->p_window ) ), 
-                    &rectSource, &rectDest, srcCopy, NULL);
-
-//UnlockPortBits(GetWindowPort( p_vout->p_sys->p_window ));
-//AllowPurgePixels( GetGWorldPixMap( p_vout->p_sys->p_gw[index] ) );
-
-//        UnlockPixels( GetGWorldPixMap( p_vout->p_sys->p_gw[index] ) );
-        //flushQD( p_vout );
-//    }
-    SetPort ( pCGrafSave );
+    SetPort( p_vout->p_sys->osx_communication.p_qdport ) ;
+    fillout_ScalingMatrix( p_vout ) ;
+    fillout_ImageDescription(
+        p_vout->p_sys->h_img_descr,
+        p_vout->i_width,
+        p_vout->i_height,
+        'y420'
+    ) ;
+    if ( !new_QTSequence(
+            &p_vout->p_sys->i_seq,
+            p_vout->p_sys->osx_communication.p_qdport,
+            p_vout->p_sys->h_img_descr,
+            p_vout->p_sys->p_matrix
+        ) )
+    {
+        p_vout->p_sys->c_codec = 'y420' ;
+        return 0 ;
+    }
+   
+    p_vout->p_sys->c_codec = 'NONE' ;
+    return 1 ;
 }
 
-
-/*****************************************************************************
- * GetWindowDevice: returns GDHandle that window resides on (most of it anyway)
- *****************************************************************************/
-GDHandle GetWindowDevice( vout_thread_t *p_vout )
+static void dispose_QTSequence( vout_thread_t *p_vout )
 {
-    GrafPtr pgpSave;
-    Rect rectWind, rectSect;
-    long greatestArea, sectArea;
-    GDHandle hgdNthDevice, hgdZoomOnThisDevice = NULL;
-    
-    //intf_ErrMsg( "GetWindowDevice()" );
-
-    GetPort( &pgpSave );
-    SetPortWindowPort( p_vout->p_sys->p_window );
-    GetPortBounds( GetWindowPort( p_vout->p_sys->p_window ), &rectWind );
-    LocalToGlobal( ( Point* ) &rectWind.top );
-    LocalToGlobal( ( Point* ) &rectWind.bottom );
-    hgdNthDevice = GetDeviceList();
-    greatestArea = 0;
-    // check window against all gdRects in gDevice list and remember 
-    //  which gdRect contains largest area of window}
-    while ( hgdNthDevice )
+    CDSequenceEnd( p_vout->p_sys->i_seq ) ;
+    switch (p_vout->p_sys->c_codec)
     {
-        if ( TestDeviceAttribute( hgdNthDevice, screenDevice ) )
-        {
-            if ( TestDeviceAttribute( hgdNthDevice, screenActive ) )
-            {
-                // The SectRect routine calculates the intersection 
-                //  of the window rectangle and this gDevice 
-                //  rectangle and returns TRUE if the rectangles intersect, 
-                //  FALSE if they don't.
-                SectRect( &rectWind, &( **hgdNthDevice ).gdRect, &rectSect );
-                // determine which screen holds greatest window area
-                //  first, calculate area of rectangle on current device
-                sectArea = ( long )( rectSect.right - rectSect.left ) * ( rectSect.bottom - rectSect.top );
-                if ( sectArea > greatestArea )
-                {
-                    greatestArea = sectArea;   // set greatest area so far
-                    hgdZoomOnThisDevice = hgdNthDevice;        // set zoom device
-                }
-                hgdNthDevice = GetNextDevice( hgdNthDevice );
-            }
-        }
-    }  // of WHILE
-    SetPort( pgpSave );
-    return hgdZoomOnThisDevice;
+        case 'yuv2':
+            free( (void *)p_vout->p_sys->p_yuv2 ) ;
+            p_vout->p_sys->i_yuv2_size = 0 ;
+            break ;
+        case 'y420': 
+            break ;
+    }
+    p_vout->p_sys->c_codec = 'NONE' ;
 }
 
-/*****************************************************************************
- * FillOffScreen: fills offscreen buffer with random bright color
- *****************************************************************************/
-
-void FillOffscreen( vout_thread_t *p_vout, short index )
+static void convert_Y420_to_YUV2( picture_t *p_y420, yuv2_data_t *p_yuv2 )
 {
-    static RGBColor rgbColorOld;
-    GDHandle hGDSave;
-    CGrafPtr pCGrafSave;
-    Rect rectSource;
-    RGBColor rgbColor;
-    
-    //intf_ErrMsg( "FillOffscreen" );
-
-    GetPortBounds( p_vout->p_sys->p_gw[index], &rectSource );
-    
-    do 
-        rgbColor.red = ( Random () + 32767) / 2 + 32767;
-    while ( abs ( rgbColor.red - rgbColorOld.red ) <  3000 );  
-    do 
-        rgbColor.green = (Random () + 32767) / 2 + 32767;
-    while ( abs ( rgbColor.green - rgbColorOld.green ) <  3000);
-    do 
-        rgbColor.blue = (Random () + 32767) / 2 + 32767;
-    while ( abs ( rgbColor.blue - rgbColorOld.blue ) <  3000);
+    unsigned int width = p_y420->i_width, height = p_y420->i_height ;
+    unsigned int x, y ;
     
-    rgbColorOld = rgbColor;
-
-    GetGWorld( &pCGrafSave, &hGDSave );
-    SetGWorld( p_vout->p_sys->p_gw[index], NULL );
-//FIXME have global lock - kinda bad but oh well 
-//    if ( LockPixels( GetGWorldPixMap( p_vout->p_sys->p_gw[index] ) ) )
-//    {
-        // draw some background
-        EraseRect( &rectSource );
-        RGBForeColor( &rgbColor );
-        PaintRect( &rectSource );
-//        UnlockPixels( GetGWorldPixMap( p_vout->p_sys->p_gw[index] ) );
-//    }
-    SetGWorld( pCGrafSave, hGDSave );
+    for( x=0; x < height; x++ )
+    {
+        for( y=0; y < (width/2); y++ )
+        {
+            p_yuv2[(width/2)*x + y] =
+                (p_y420->p_y[width*x + 2*y]) << 24 |
+                ((p_y420->p_u[(width/2)*(x/2) + y] ^ 0x80) << 16) |
+                (p_y420->p_y[width*x + 2*y + 1] << 8) |
+                (p_y420->p_v[(width/2)*(x/2) + y] ^ 0x80) ;   
+        }
+    }
 }
diff --git a/plugins/macosx/vout_macosx_qt.c b/plugins/macosx/vout_macosx_qt.c
deleted file mode 100644 (file)
index c61e606..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*****************************************************************************
- * vout_macosx.c: MacOS X video output plugin
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- *
- * Authors: Colin Delacroix <colin@zoy.org>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-
-#include "config.h"
-#include "common.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "interface.h"
-#include "intf_msg.h"
-
-#include "video.h"
-#include "video_output.h"
-
-#include "modules.h"
-#include "main.h"
-
-#include "macosx_qt_common.h"
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
-static int  vout_Create    ( struct vout_thread_s * );
-static int  vout_Init      ( struct vout_thread_s * );
-static void vout_End       ( struct vout_thread_s * );
-static void vout_Destroy   ( struct vout_thread_s * );
-static int  vout_Manage    ( struct vout_thread_s * );
-void vout_OSX_Display   ( struct vout_thread_s * );
-
-/* OS specific */
-static int vout_OSX_create_sequence( vout_thread_t *p_vout ) ;
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( vout_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = vout_Probe;
-    p_function_list->functions.vout.pf_create     = vout_Create;
-    p_function_list->functions.vout.pf_init       = vout_Init;
-    p_function_list->functions.vout.pf_end        = vout_End;
-    p_function_list->functions.vout.pf_destroy    = vout_Destroy;
-    p_function_list->functions.vout.pf_manage     = vout_Manage;
-    p_function_list->functions.vout.pf_display    = vout_OSX_Display;
-    p_function_list->functions.vout.pf_setpalette = NULL;
-}
-
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    if( TestMethod( VOUT_METHOD_VAR, "macosx_qt" ) )
-    {
-        return( 999 );
-    }
-
-    return( 90 );
-}
-
-/*****************************************************************************
- * vout_Create: allocates MacOS X video thread output method
- *****************************************************************************
- * This function allocates and initializes a MacOS X vout method.
- *****************************************************************************/
-static int vout_Create( vout_thread_t *p_vout )
-{
-    p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
-    if( p_vout->p_sys == NULL )
-    {
-        intf_ErrMsg( "error: %s", strerror( ENOMEM ) );
-        return( 1 );
-    }
-
-    EnterMovies() ;
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * MakeWindow: open and set-up a Mac OS main window
- *****************************************************************************/
-static int vout_OSX_create_sequence( vout_thread_t *p_vout )
-{
-    ImageDescriptionPtr descr_ptr ;
-    OSErr qterror ;
-
-    p_vout->p_sys->h_img_descr = (ImageDescriptionHandle)NewHandleClear(sizeof(ImageDescription)) ;
-    p_vout->p_sys->i_img_size = p_vout->i_width * p_vout->i_height * 1.5 ; //before: 2
-    if (! (p_vout->p_sys->p_img  = malloc(p_vout->p_sys->i_img_size))) {
-       intf_ErrMsg("couldn't allocate image:") ;
-       return 1 ;
-    }
-
-    HLock((Handle)p_vout->p_sys->h_img_descr) ; 
-    descr_ptr = *p_vout->p_sys->h_img_descr ;
-    descr_ptr->idSize = sizeof(ImageDescription) ;
-    descr_ptr->cType = 'y420' ; //before: yuv2
-    descr_ptr->resvd1 = 0 ; //Reserved
-    descr_ptr->resvd2 = 0 ; //Reserved
-    descr_ptr->dataRefIndex = 0 ; //Reserved
-    descr_ptr->version = 1 ; //
-    descr_ptr->revisionLevel = 0 ;
-    descr_ptr->vendor = 'appl' ; //How do we get a vendor id??
-    descr_ptr->width = p_vout->i_width  ;
-    descr_ptr->height = p_vout->i_height ;
-    descr_ptr->hRes = Long2Fix(72) ;
-    descr_ptr->vRes = Long2Fix(72) ;
-    descr_ptr->spatialQuality = codecLosslessQuality ;
-    descr_ptr->dataSize = p_vout->p_sys->i_img_size ;
-    descr_ptr->frameCount = 1 ;
-    //memcpy(descr_ptr->name, "\pComponent Video\0") ;
-    descr_ptr->depth = 12 ; //before: 24
-    descr_ptr->clutID = -1 ; //We don't need a color table
-    HUnlock((Handle)p_vout->p_sys->h_img_descr) ;
-
-    SetPortWindowPort(p_main->p_intf->p_sys->p_window) ;
-    qterror = DecompressSequenceBeginS(&p_vout->p_sys->i_seq, 
-                                p_vout->p_sys->h_img_descr,
-                                (void *)p_vout->p_sys->p_img,
-                                p_vout->p_sys->i_img_size,
-                                GetWindowPort(p_main->p_intf->p_sys->p_window),
-                                NULL, //device to display (is set implicit via the qdPort)
-                                NULL, //src-rect
-                                NULL, //matrix
-                                0, //just do plain copying
-                                NULL, //no mask region
-                                codecFlagUseScreenBuffer,
-                                codecLosslessQuality,
-                                (DecompressorComponent) bestSpeedCodec) ;
-   intf_WarnMsg(1, "DecompressSequenceBeginS: %d\n", qterror) ;
-   
-   if (qterror)
-   {
-       return(1) ; 
-   }
-
-   p_vout->b_need_render = 0 ;
-   p_vout->i_bytes_per_line = p_vout->i_width ;
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * vout_Init: initialize video thread output method
- *****************************************************************************/
-static int vout_Init( vout_thread_t *p_vout )
-{
-    if ( vout_OSX_create_sequence( p_vout ) )
-    {
-        intf_ErrMsg( "vout error: can't create quicktime view" );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * vout_End: terminate video thread output method
- *****************************************************************************/
-static void vout_End( vout_thread_t *p_vout )
-{
-       CDSequenceEnd(p_vout->p_sys->i_seq) ;
-}
-
-/*****************************************************************************
- * vout_Destroy: destroy video thread output method
- *****************************************************************************/
-static void vout_Destroy( vout_thread_t *p_vout )
-{
-    free( p_vout->p_sys );
-}
-
-/*****************************************************************************
- * vout_Manage: handle events
- *****************************************************************************
- * This function should be called regularly by video output thread. It manages
- * console events. It returns a non null value on error.
- *****************************************************************************/
-static int vout_Manage( vout_thread_t *p_vout )
-{
-    return( 0 );
-}
-
-
-/*****************************************************************************
- * vout_OSX_Display: displays previously rendered output
- *****************************************************************************
- * This function send the currently rendered image to image, waits until
- * it is displayed and switch the two rendering buffers, preparing next frame.
- *****************************************************************************/
-void vout_OSX_Display( vout_thread_t *p_vout )
-{
-       OSErr qterror ;
-//     unsigned int x,y, height=p_vout->i_height, width=p_vout->i_width ;
-       CodecFlags out_flags ;
-       PlanarPixmapInfoYUV420 y420_info ;
-
-       if (!p_main->p_intf->p_sys->b_active)
-               return ;
-
-/*     for(x=0; x < height; x++)
-       {
-               for(y=0; y < (width/2); y++)
-               {
-                       p_vout->p_sys->p_img[(width/2)*x + y] =
-                               (p_vout->p_rendered_pic->p_y[width*x + 2*y]) << 24 |
-                               ((p_vout->p_rendered_pic->p_u[(width/2)*(x/2) + y] ^ 0x80) << 16) |
-                               (p_vout->p_rendered_pic->p_y[width*x + 2*y + 1] << 8) |
-                               (p_vout->p_rendered_pic->p_v[(width/2)*(x/2) + y] ^ 0x80) ;   
-               }
-       }
-*/
-
-       y420_info.componentInfoY.offset = p_vout->p_rendered_pic->p_y - p_vout->p_sys->p_img ;
-       y420_info.componentInfoY.rowBytes = p_vout->i_width ;
-       y420_info.componentInfoCb.offset = p_vout->p_rendered_pic->p_u - p_vout->p_sys->p_img ;
-       y420_info.componentInfoCb.rowBytes = p_vout->i_width / 2;
-       y420_info.componentInfoCr.offset = p_vout->p_rendered_pic->p_v - p_vout->p_sys->p_img ;
-       y420_info.componentInfoCr.rowBytes = p_vout->i_width / 2;
-
-       memcpy(p_vout->p_sys->p_img, &y420_info, sizeof(PlanarPixmapInfoYUV420)) ;
-
-       qterror = DecompressSequenceFrameWhen(
-               p_vout->p_sys->i_seq,
-               (void *)p_vout->p_sys->p_img,
-               p_vout->p_sys->i_img_size,
-               codecFlagUseScreenBuffer,
-               &out_flags,
-               nil,
-               nil) ;
-
-//     intf_WarnMsg(1, "DecompressSequenceFrameWhen: %d", qterror) ;
- }
diff --git a/plugins/vcd/.cvsignore b/plugins/vcd/.cvsignore
new file mode 100644 (file)
index 0000000..63e7180
--- /dev/null
@@ -0,0 +1 @@
+.dep
index 8d2a60e9e57dac8ad671daabf17a4dccc92c262a..7ed30f2da1ae4e7a8dbded0c0dc66cce3ed1785f 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.145 2001/10/23 03:06:50 jobi Exp $
+ * $Id: input.c,v 1.146 2001/10/30 10:48:14 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -592,8 +592,8 @@ static void FileOpen( input_thread_t * p_input )
             psz_name += 4;
             i_stat = stat( psz_name, &stat_info );
         }
-       else if( ( i_size > 4 )
-            && !strncasecmp( psz_name, "vcd:", 4 ) )
+        else if( ( i_size > 4 )
+                 && !strncasecmp( psz_name, "vcd:", 4 ) )
         {
             /* get rid of the 'vcd:' stuff and try again */
             psz_name += 4;