]> git.sesse.net Git - vlc/commitdiff
* Fixed menus [Mac OS X port]
authorChristophe Massiot <massiot@videolan.org>
Sun, 12 May 2002 20:56:34 +0000 (20:56 +0000)
committerChristophe Massiot <massiot@videolan.org>
Sun, 12 May 2002 20:56:34 +0000 (20:56 +0000)
* Objective-C files are now .m
* Fixed a major bug in the spu decoder
* Disabled auto-hiding of mouse cursor since it doesn't work when browsing
  menus ; instead, click in the video window

23 files changed:
Makefile
Makefile.dep
Makefile.modules
Makefile.opts.in
configure
configure.in
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
extras/MacOSX/vlc.pbproj/project.pbxproj
plugins/macosx/Makefile
plugins/macosx/aout_macosx.m [moved from plugins/macosx/aout_macosx.c with 99% similarity]
plugins/macosx/intf_controller.m [moved from plugins/macosx/intf_controller.c with 98% similarity]
plugins/macosx/intf_macosx.m [moved from plugins/macosx/intf_macosx.c with 98% similarity]
plugins/macosx/intf_open.m [moved from plugins/macosx/intf_open.c with 99% similarity]
plugins/macosx/intf_vlc_wrapper.m [moved from plugins/macosx/intf_vlc_wrapper.c with 91% similarity]
plugins/macosx/macosx.m [moved from plugins/macosx/macosx.c with 97% similarity]
plugins/macosx/vout_macosx.m [moved from plugins/macosx/vout_macosx.c with 99% similarity]
plugins/macosx/vout_qdview.m [moved from plugins/macosx/vout_qdview.c with 96% similarity]
plugins/macosx/vout_vlc_wrapper.h
plugins/macosx/vout_vlc_wrapper.m [moved from plugins/macosx/vout_vlc_wrapper.c with 93% similarity]
plugins/macosx/vout_window.m [moved from plugins/macosx/vout_window.c with 92% similarity]
plugins/spudec/spu_decoder.c

index 80e1194110ed968e38716ce8e3ace93b4fcfa608..dfbf156455a527adce26892fe11da5e8c32943a8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -191,7 +191,7 @@ C_OBJ +=    src/misc/win32_specific.o
 RESOURCE_OBJ :=        share/vlc_win32_rc.o
 endif
 
-VLC_OBJ := $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ)
+VLC_OBJ := $(C_OBJ) $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ)
 
 #
 # Generated header
@@ -344,8 +344,8 @@ dist:
        rm -Rf tmp/vlc/tmp
        find debian -mindepth 1 -maxdepth 1 -type d | \
                while read i ; do rm -Rf tmp/vlc/$$i ; done
-       # Copy .c .h .in .cpp and .glade files
-       find include src plugins -type f -name '*.[bcdhigrst]*' | while read i ; \
+       # Copy .c .h .in .cpp .m and .glade files
+       find include src plugins -type f -name '*.[bcdhigmrst]*' | while read i ; \
                do cp $$i tmp/vlc/$$i ; done
        # Grmbl... special case...
        for i in API BUGS DESIGN TODO ; \
@@ -531,6 +531,12 @@ $(CPP_OBJ): %.o: .dep/%.dpp
 $(CPP_OBJ): %.o: %.cpp
        $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
 
+$(M_OBJ): %.o: Makefile.opts Makefile.dep Makefile
+$(M_OBJ): %.o: $(H_OBJ)
+$(M_OBJ): %.o: .dep/%.dm
+$(M_OBJ): %.o: %.m
+       $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
+
 $(RESOURCE_OBJ): %.o: Makefile.dep Makefile
 ifneq (,(findstring mingw32,$(SYS)))
 $(RESOURCE_OBJ): %.o: %.rc
index e56e57c62d7556886b071d93f759f6764f0fb04b..1853c564ba046770f69ad551b1d524710cc9454d 100644 (file)
@@ -57,9 +57,17 @@ $(C_DEP): .dep/%.d: %.c
 
 $(CPP_DEP): .dep/%.dpp: %.cpp
        @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
-       #@echo "regenerating dependencies for $*.c"
+       #@echo "regenerating dependencies for $*.cpp"
        @$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
        | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
        .dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \
        [ -s $@ ] || rm -f $@'
 
+$(M_DEP): .dep/%.dm: %.m
+       @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
+       #@echo "regenerating dependencies for $*.m"
+       @$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
+       | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
+       .dep\/$(subst /,\/,$*).dm : /g'\'' > $@; \
+       [ -s $@ ] || rm -f $@'
+
index 9fc3070d51763f5df96ac48fb34e31c2e29741c2..d6c33f16418e561d8d627d4ee75c54e15fd5868d 100644 (file)
@@ -21,6 +21,7 @@ suff := $(shell echo $(MAKECMDGOALS) | sed 's@.*\.@@' | tr so/a lo/o)
 #
 SRC_C := $(filter %.c,$($(module_name)_SOURCES))
 SRC_CPP := $(filter %.cpp,$($(module_name)_SOURCES))
+SRC_M := $(filter %.m,$($(module_name)_SOURCES))
 
 ifeq (lo,$(suff))
 extra_CFLAGS := $(plugins_CFLAGS) $($(module_name)_CFLAGS) \
@@ -31,7 +32,8 @@ else
 extra_CFLAGS := $(builtins_CFLAGS) $($(module_name)_CFLAGS) \
                 -DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
                 $($(module_name)_a_CFLAGS)
-OBJ_ALL := $(SRC_C:%.c=%.o.$(module_name)) $(SRC_CPP:%.cpp=%.o.$(module_name))
+OBJ_ALL := $(SRC_C:%.c=%.o.$(module_name)) $(SRC_CPP:%.cpp=%.o.$(module_name)) \
+               $(SRC_M:%.m=%.o.$(module_name))
 endif
 
 # 
@@ -39,6 +41,7 @@ endif
 #
 C_DEP := $(SRC_C:%.c=.dep/%.d)
 CPP_DEP := $(SRC_CPP:%.cpp=.dep/%.dpp)
+M_DEP := $(SRC_M:%.m=.dep/%.dm)
 
 export
 
@@ -63,6 +66,9 @@ $(C_DEP): %.d: FORCE
 $(CPP_DEP): %.dpp: FORCE
        @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@ CFLAGS="$(CFLAGS) $(extra_CFLAGS)"
 
+$(M_DEP): %.dm: FORCE
+       @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@ CFLAGS="$(CFLAGS) $(extra_CFLAGS)"
+
 $(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.d
 $(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.c
        $(CC) $(CFLAGS) $(extra_CFLAGS) -c $< -o $@
@@ -71,6 +77,10 @@ $(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.dpp
 $(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.cpp
        $(CC) $(CFLAGS) $(extra_CFLAGS) -c $< -o $@
 
+$(SRC_M:%.m=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.dm
+$(SRC_M:%.m=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.m
+       $(CC) $(CFLAGS) $(extra_CFLAGS) -c $< -o $@
+
 # foo_CUSTOM lets us override all target rules for foo.so and foo.a
 ifeq (,$($(module_name)_CUSTOM))
 ../$(module_name).so: $(EXTRA_DEP) $(OBJ_ALL)
index 878fd6ccb51d12db64e229d964d94d43cf05dcee..4598d2797ebc4bfaa066c3bb7e19b63147f86f4d 100644 (file)
@@ -83,7 +83,6 @@ gnome_CFLAGS = @gnome_CFLAGS@
 gtk_CFLAGS = @gtk_CFLAGS@
 kde_CFLAGS = @kde_CFLAGS@
 idctaltivec_CFLAGS = @idctaltivec_CFLAGS@
-macosx_CFLAGS = @macosx_CFLAGS@
 mad_CFLAGS = @mad_CFLAGS@
 memcpyaltivec_CFLAGS = @memcpyaltivec_CFLAGS@
 motionaltivec_CFLAGS = @motionaltivec_CFLAGS@
index 2463d8c5fc8ca6471aed1ea04591753b3101737f..c4b16a07f22523aa08e2d6d653018bc219df42b2 100755 (executable)
--- a/configure
+++ b/configure
@@ -7835,26 +7835,24 @@ if test "${enable_macosx+set}" = set; then
   if test x$enable_macosx = xyes
    then
      BUILTINS="${BUILTINS} macosx"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
-     LDFLAGS="${LDFLAGS} -ObjC"
+     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
    fi
 else
   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:7848: checking for $ac_hdr" >&5
+echo "configure:7846: 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 7853 "configure"
+#line 7851 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7856: \"$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*
@@ -7875,9 +7873,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  BUILTINS="${BUILTINS} macosx"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
-     LDFLAGS="${LDFLAGS} -ObjC"
+     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
    
 else
   echo "$ac_t""no" 1>&6
@@ -7899,17 +7895,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7903: checking for $ac_hdr" >&5
+echo "configure:7899: 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 7908 "configure"
+#line 7904 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7909: \"$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*
@@ -7980,17 +7976,17 @@ if test x$enable_lirc = xyes
 then
   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
-echo "configure:7984: checking for lirc/lirc_client.h" >&5
+echo "configure:7980: checking for lirc/lirc_client.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 7989 "configure"
+#line 7985 "configure"
 #include "confdefs.h"
 #include <lirc/lirc_client.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7990: \"$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*
@@ -8007,7 +8003,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
-echo "configure:8011: checking for lirc_init in -llirc_client" >&5
+echo "configure:8007: checking for lirc_init in -llirc_client" >&5
 ac_lib_var=`echo lirc_client'_'lirc_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
@@ -8015,7 +8011,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8019 "configure"
+#line 8015 "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
@@ -8026,7 +8022,7 @@ int main() {
 lirc_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8026: \"$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
@@ -8081,7 +8077,7 @@ fi
       ;;
     *)
                   echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:8085: checking whether the byte order is big-endian" >&5
+echo "configure:8081: checking whether the byte order is big-endian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8155,7 +8151,7 @@ if test "${enable_pth+set}" = set; then
   enableval="$enable_pth"
    if test "x$enable_pth" = "xyes"; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:8159: checking for pth_init in -lpth" >&5
+echo "configure:8155: 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
@@ -8163,7 +8159,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8167 "configure"
+#line 8163 "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
@@ -8174,7 +8170,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8174: \"$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
@@ -8202,7 +8198,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8206 "configure"
+#line 8202 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -8228,7 +8224,7 @@ if test "${enable_st+set}" = set; then
   enableval="$enable_st"
    if test "x$enable_st" = "xyes"; then
     echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
-echo "configure:8232: checking for st_init in -lst" >&5
+echo "configure:8228: checking for st_init in -lst" >&5
 ac_lib_var=`echo st'_'st_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
@@ -8236,7 +8232,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lst  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8240 "configure"
+#line 8236 "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
@@ -8247,7 +8243,7 @@ int main() {
 st_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8247: \"$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
@@ -8275,7 +8271,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8279 "configure"
+#line 8275 "configure"
 #include "confdefs.h"
 #include <st.h>
 EOF
index b32890e2221a788086bd73df878f400263807cc9..4df1657bf5ff440d14bc144c40cbf3bde713e207 100644 (file)
@@ -1355,15 +1355,11 @@ AC_ARG_ENABLE(macosx,
   [if test x$enable_macosx = xyes
    then
      BUILTINS="${BUILTINS} macosx"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
-     LDFLAGS="${LDFLAGS} -ObjC"
+     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
    fi],
   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
      BUILTINS="${BUILTINS} macosx"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
-     LDFLAGS="${LDFLAGS} -ObjC"
+     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
    )])
 
 dnl
index 9526066dc171622211aab6188522df15e52d53dc..f21223aecf7fcb58e29c8b5a885d08550487ed35 100644 (file)
             CLASS = Intf_Controller; 
             LANGUAGE = ObjC; 
             OUTLETS = {
-                o_pause = id
-                o_play = id
-                o_playlistds = id
-                o_stepf = id
-                o_stepr = id
-                o_stop = id
-                o_time = id; 
-                o_timeslider = id
-                o_window = id
+                o_pause = NSButton
+                o_play = NSButton
+                o_playlistds = Intf_PlaylistDS
+                o_stepf = NSButton
+                o_stepr = NSButton
+                o_stop = NSButton
+                o_time = NSTextField; 
+                o_timeslider = NSSlider
+                o_window = NSWindow
             }; 
             SUPERCLASS = NSObject; 
         }, 
@@ -70,7 +70,7 @@
         {
             CLASS = Intf_PlaylistDS; 
             LANGUAGE = ObjC; 
-            OUTLETS = {o_table = id; }; 
+            OUTLETS = {o_table = NSTableView; }; 
             SUPERCLASS = NSObject; 
         }
     ); 
index ebcee693612be75aa9803af904a8fc71e7fb9ba2..25bab50930dae3b8d5af7c20c1b98e3609d59c77 100644 (file)
@@ -9,7 +9,7 @@
                <key>235</key>
                <string>401 417 350 182 0 0 1152 746 </string>
                <key>29</key>
-               <string>804 409 205 44 0 0 1152 746 </string>
+               <string>804 409 262 44 0 0 1152 746 </string>
                <key>445</key>
                <string>347 561 370 117 0 0 1152 746 </string>
                <key>460</key>
@@ -19,8 +19,8 @@
        <string>248.0</string>
        <key>IBOpenObjects</key>
        <array>
-               <integer>29</integer>
                <integer>21</integer>
+               <integer>29</integer>
        </array>
        <key>IBSystem Version</key>
        <string>5Q125</string>
index 7103ef67661c2b263120ff0b596d8c992740d863..9d97749e7b00d438eae2ed16858724236a1b7cda 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 86d74ce954aa3d8870a30ee14f4194081ce2af40..5c93cef9136e2aedc62f43068b81c6642b220a5a 100644 (file)
@@ -13,8 +13,8 @@
                };
                F510A6CD01738ED001A80A1F = {
                        isa = PBXFileReference;
-                       name = intf_vlc_wrapper.c;
-                       path = plugins/macosx/intf_vlc_wrapper.c;
+                       name = intf_vlc_wrapper.m;
+                       path = plugins/macosx/intf_vlc_wrapper.m;
                        refType = 4;
                };
                F511306E0170620B01A80A1F = {
                };
                F512122B0170635601A80A1F = {
                        isa = PBXFileReference;
-                       name = aout_macosx.c;
-                       path = plugins/macosx/aout_macosx.c;
+                       name = aout_macosx.m;
+                       path = plugins/macosx/aout_macosx.m;
                        refType = 4;
                };
                F512122C0170635601A80A1F = {
                        isa = PBXFileReference;
-                       name = intf_controller.c;
-                       path = plugins/macosx/intf_controller.c;
+                       name = intf_controller.m;
+                       path = plugins/macosx/intf_controller.m;
                        refType = 4;
                };
                F512122D0170635601A80A1F = {
                };
                F51212300170635601A80A1F = {
                        isa = PBXFileReference;
-                       name = macosx.c;
-                       path = plugins/macosx/macosx.c;
+                       name = macosx.m;
+                       path = plugins/macosx/macosx.m;
                        refType = 4;
                };
                F51212310170635601A80A1F = {
                };
                F51212320170635601A80A1F = {
                        isa = PBXFileReference;
-                       name = vout_macosx.c;
-                       path = plugins/macosx/vout_macosx.c;
+                       name = vout_macosx.m;
+                       path = plugins/macosx/vout_macosx.m;
                        refType = 4;
                };
                F51352740170655D01A80A1F = {
        <key>CFBundleExecutable</key>
        <string>vlc</string>
        <key>CFBundleGetInfoString</key>
-       <string>VideoLAN Client</string>
+       <string>VideoLAN Client, Â© 1996-2002 VideoLAN project</string>
        <key>CFBundleIconFile</key>
        <string>vlc.icns</string>
        <key>CFBundleIdentifier</key>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>vlc 0.3.1</string>
+       <string>0.3.1</string>
        <key>CFBundleSignature</key>
        <string>VLC#</string>
        <key>CFBundleVersion</key>
 //F64
                F66B34EC0271A5AF01A80112 = {
                        isa = PBXFileReference;
-                       name = intf_open.c;
-                       path = plugins/macosx/intf_open.c;
+                       name = intf_open.m;
+                       path = plugins/macosx/intf_open.m;
                        refType = 4;
                };
                F66B34ED0271A5AF01A80112 = {
                };
                F6799746020DCC2A01A80112 = {
                        isa = PBXFileReference;
-                       name = intf_macosx.c;
-                       path = plugins/macosx/intf_macosx.c;
+                       name = intf_macosx.m;
+                       path = plugins/macosx/intf_macosx.m;
                        refType = 4;
                };
                F6799747020DCC2A01A80112 = {
                        isa = PBXFileReference;
-                       name = vout_qdview.c;
-                       path = plugins/macosx/vout_qdview.c;
+                       name = vout_qdview.m;
+                       path = plugins/macosx/vout_qdview.m;
                        refType = 4;
                };
                F6799748020DCC2A01A80112 = {
                };
                F6799749020DCC2A01A80112 = {
                        isa = PBXFileReference;
-                       name = vout_window.c;
-                       path = plugins/macosx/vout_window.c;
+                       name = vout_window.m;
+                       path = plugins/macosx/vout_window.m;
                        refType = 4;
                };
                F679974A020DCC2A01A80112 = {
                };
                F6EA76F5024171E201A80112 = {
                        isa = PBXFileReference;
-                       name = vout_vlc_wrapper.c;
-                       path = plugins/macosx/vout_vlc_wrapper.c;
+                       name = vout_vlc_wrapper.m;
+                       path = plugins/macosx/vout_vlc_wrapper.m;
                        refType = 4;
                };
                F6EA76F6024171E201A80112 = {
index 7f390b1531b2b91a6559775e56c5df874f0ad94c..21c41853df201e1dd3a9e59ed16956b3b60e7b75 100644 (file)
@@ -1 +1 @@
-macosx_SOURCES = macosx.c aout_macosx.c vout_macosx.c vout_window.c vout_qdview.c vout_vlc_wrapper.c intf_macosx.c intf_controller.c intf_vlc_wrapper.c intf_open.c 
+macosx_SOURCES = macosx.m aout_macosx.m vout_macosx.m vout_window.m vout_qdview.m vout_vlc_wrapper.m intf_macosx.m intf_controller.m intf_vlc_wrapper.m intf_open.m 
similarity index 99%
rename from plugins/macosx/aout_macosx.c
rename to plugins/macosx/aout_macosx.m
index 9e749aa3bf42b00d8d1ef2c21e53b5f0176e5b01..8b4267bbbd8ad731f7cc3eb62d437da33379c25b 100644 (file)
@@ -2,7 +2,7 @@
  * aout_macosx.c : CoreAudio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_macosx.c,v 1.20 2002/05/04 13:48:31 massiot Exp $
+ * $Id: aout_macosx.m,v 1.1 2002/05/12 20:56:33 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
similarity index 98%
rename from plugins/macosx/intf_controller.c
rename to plugins/macosx/intf_controller.m
index b30c9257b2315e38f417c108d9e1fa2de608ad5a..2b6b3c832939ac078ddbd5cfa7ed9c11e5160482 100644 (file)
@@ -2,7 +2,7 @@
  * intf_controller.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_controller.c,v 1.7 2002/05/06 22:59:46 massiot Exp $
+ * $Id: intf_controller.m,v 1.1 2002/05/12 20:56:33 massiot Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
similarity index 98%
rename from plugins/macosx/intf_macosx.c
rename to plugins/macosx/intf_macosx.m
index 5f1d0c1ef0aa309f8df32855e0a79b2fa34e7d19..2a897ee6e8e1a8ae3e04a3c65b69ac745aa25528 100644 (file)
@@ -2,7 +2,7 @@
  * intf_macosx.c: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_macosx.c,v 1.14 2002/05/12 01:39:36 massiot Exp $
+ * $Id: intf_macosx.m,v 1.1 2002/05/12 20:56:33 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Florian G. Pflug <fgp@phlo.org>
similarity index 99%
rename from plugins/macosx/intf_open.c
rename to plugins/macosx/intf_open.m
index 7245e0a34ad0e1d4f47ff61c57e98c42efff9f47..5b350bce5237ce04c88fc5e942e035f36834a8c7 100644 (file)
@@ -2,7 +2,7 @@
  * intf_open.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_open.c,v 1.1 2002/04/23 03:21:21 jlj Exp $
+ * $Id: intf_open.m,v 1.1 2002/05/12 20:56:33 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *
similarity index 91%
rename from plugins/macosx/intf_vlc_wrapper.c
rename to plugins/macosx/intf_vlc_wrapper.m
index 7a387916fa117cd19939f91edb8dc57990144a2e..09979df0c6f042dc7516ea72a66884ac31175123 100644 (file)
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_vlc_wrapper.c,v 1.14 2002/05/12 01:39:36 massiot Exp $
+ * $Id: intf_vlc_wrapper.m,v 1.1 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -555,8 +555,31 @@ static Intf_VLCWrapper *o_intf = nil;
 
     int i_es = [o_item tag];
 
-    input_ToggleES( p_input, p_input->stream.pp_es[i_es],
-                    [o_item state] == NSOffState );
+    if( [o_item state] == NSOnState )
+    {
+        /* We just have one ES to disable */
+        input_ToggleES( p_input, p_input->stream.pp_es[i_es], 0 );
+    }
+    else
+    {
+        /* Unselect the selected ES in the same class */
+        int i;
+        vlc_mutex_lock( &p_input->stream.stream_lock );
+        for( i = 0; i < p_input->stream.i_selected_es_number; i++ )
+        {
+            if( p_input->stream.pp_selected_es[i]->i_cat == AUDIO_ES )
+            {
+                vlc_mutex_unlock( &p_input->stream.stream_lock );
+                input_ToggleES( p_input, p_input->stream.pp_selected_es[i], 0 );
+                vlc_mutex_lock( &p_input->stream.stream_lock );
+                break;
+            }
+        }
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+        /* Select the wanted ES */
+        input_ToggleES( p_input, p_input->stream.pp_es[i_es], 1 );
+    }
 
     vlc_mutex_lock( &p_input->stream.stream_lock );
     [self setupMenus];
@@ -572,8 +595,31 @@ static Intf_VLCWrapper *o_intf = nil;
 
     int i_es = [o_item tag];
 
-    input_ToggleES( p_input, p_input->stream.pp_es[i_es],
-                    [o_item state] == NSOffState );
+    if( [o_item state] == NSOnState )
+    {
+        /* We just have one ES to disable */
+        input_ToggleES( p_input, p_input->stream.pp_es[i_es], 0 );
+    }
+    else
+    {
+        /* Unselect the selected ES in the same class */
+        int i;
+        vlc_mutex_lock( &p_input->stream.stream_lock );
+        for( i = 0; i < p_input->stream.i_selected_es_number; i++ )
+        {
+            if( p_input->stream.pp_selected_es[i]->i_cat == SPU_ES )
+            {
+                vlc_mutex_unlock( &p_input->stream.stream_lock );
+                input_ToggleES( p_input, p_input->stream.pp_selected_es[i], 0 );
+                vlc_mutex_lock( &p_input->stream.stream_lock );
+                break;
+            }
+        }
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+        /* Select the wanted ES */
+        input_ToggleES( p_input, p_input->stream.pp_es[i_es], 1 );
+    }
 
     vlc_mutex_lock( &p_input->stream.stream_lock );
     [self setupMenus];
@@ -665,6 +711,8 @@ static Intf_VLCWrapper *o_intf = nil;
                 }
             }
         }
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+        vlc_mutex_lock( &p_input->stream.stream_lock );
 
         /* ----- TITLES ----- */
         if( p_input->stream.i_area_nb < 2 )
@@ -708,6 +756,8 @@ static Intf_VLCWrapper *o_intf = nil;
                 }
             }
         }
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+        vlc_mutex_lock( &p_input->stream.stream_lock );
 
         /* ----- CHAPTERS ----- */
         if( p_input->stream.p_selected_area->i_part_nb < 2 )
@@ -750,6 +800,8 @@ static Intf_VLCWrapper *o_intf = nil;
             }
         }
         p_main->p_intf->p_sys->i_part = p_input->stream.p_selected_area->i_part;
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+        vlc_mutex_lock( &p_input->stream.stream_lock );
 
         /* ----- LANGUAGES & SUBTITLES ----- */
         o_language = [o_language_item submenu];
similarity index 97%
rename from plugins/macosx/macosx.c
rename to plugins/macosx/macosx.m
index 7917037c958be25a6cb73a912f037764cd084979..783ee99529ea7cd9ca07ba7f4c162a2fce9e42e5 100644 (file)
@@ -2,7 +2,7 @@
  * macosx.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: macosx.c,v 1.14 2002/04/19 13:56:11 sam Exp $
+ * $Id: macosx.m,v 1.1 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
similarity index 99%
rename from plugins/macosx/vout_macosx.c
rename to plugins/macosx/vout_macosx.m
index 4e04aba86d3fdafcaa9d458c4f8a2b09507b3860..910061a3f78b98cac1eaed8aa1b377e3aa9e3e0c 100644 (file)
@@ -346,6 +346,7 @@ static int vout_Manage( vout_thread_t *p_vout )
             CGDisplayShowCursor( kCGDirectMainDisplay );
             b_change = 1;
         }
+#if 0
         else if( !p_vout->p_sys->b_mouse_moved && 
             mdate() - p_vout->p_sys->i_time_mouse_last_moved > 2000000 &&
             p_vout->p_sys->b_mouse_pointer_visible )
@@ -353,6 +354,7 @@ static int vout_Manage( vout_thread_t *p_vout )
             CGDisplayHideCursor( kCGDirectMainDisplay );
             b_change = 1;
         }
+#endif
 
         if( b_change )
         {
similarity index 96%
rename from plugins/macosx/vout_qdview.c
rename to plugins/macosx/vout_qdview.m
index c9a086d5806cb1216a6e57beb1b69be1547480fd..2986ddf8c8f0b096ac734faeeb0ef96a024d8927 100644 (file)
@@ -2,7 +2,7 @@
  * vout_qdview.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_qdview.c,v 1.4 2002/05/07 20:17:07 massiot Exp $
+ * $Id: vout_qdview.m,v 1.1 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
index a8234a420710eef59824f8df2d4f7bd80eb75de7..a1d2a15a599fec5d9e5aa5ae0d8a9ff8d8b29a43 100644 (file)
@@ -2,7 +2,7 @@
  * vout_vlc_wrapper.h: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_vlc_wrapper.h,v 1.2 2002/05/07 20:17:07 massiot Exp $
+ * $Id: vout_vlc_wrapper.h,v 1.3 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *
@@ -25,6 +25,7 @@
 #define MOUSE_NOT_MOVED         0x00000002
 #define MOUSE_LAST_MOVED        0x00000004
 #define MOUSE_NOT_LAST_MOVED    0x00000008
+#define MOUSE_DOWN              0x00000010
 
 @interface Vout_VLCWrapper : NSObject
 {
similarity index 93%
rename from plugins/macosx/vout_vlc_wrapper.c
rename to plugins/macosx/vout_vlc_wrapper.m
index b6e53555eece782d91b7d3cd9fce9f38be30afff..f29ea4b42c1bd743b8a73df280a35464b90b8267 100644 (file)
@@ -2,7 +2,7 @@
  * vout_vlc_wrapper.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_vlc_wrapper.c,v 1.2 2002/05/07 20:17:07 massiot Exp $
+ * $Id: vout_vlc_wrapper.m,v 1.1 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *
@@ -84,6 +84,18 @@ static Vout_VLCWrapper *o_vout = nil;
         p_vout->p_sys->i_time_mouse_last_moved = mdate();
     if( ui_status & MOUSE_NOT_LAST_MOVED )
         p_vout->p_sys->i_time_mouse_last_moved = 0;
+    if( ui_status & MOUSE_DOWN )
+    {
+        if( p_vout->p_sys->b_mouse_pointer_visible )
+        {
+            CGDisplayHideCursor( kCGDirectMainDisplay );
+        }
+        else
+        {
+            CGDisplayShowCursor( kCGDirectMainDisplay );
+        }
+        p_vout->p_sys->b_mouse_pointer_visible = !p_vout->p_sys->b_mouse_pointer_visible;
+    }
 }
 
 - (BOOL)keyDown:(NSEvent *)o_event forVout:(void *)_p_vout
similarity index 92%
rename from plugins/macosx/vout_window.c
rename to plugins/macosx/vout_window.m
index a058ac219270b53c4617aac1cb78ea6df8b38057..e77a8e42092bae3c59572c4fab5c1d7604f82262 100644 (file)
@@ -2,7 +2,7 @@
  * vout_window.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_window.c,v 1.2 2002/03/19 03:33:52 jlj Exp $
+ * $Id: vout_window.m,v 1.1 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *
 - (void)becomeKeyWindow
 {
     [super becomeKeyWindow];
-
+#if 0
     [o_wrapper 
         mouseEvent: (MOUSE_NOT_MOVED | MOUSE_LAST_MOVED)
         forVout: p_vout];
+#endif
 }
 
 - (void)resignKeyWindow
         forVout: p_vout];
 }
 
+- (void)mouseDown:(NSEvent *)o_event
+{
+    [o_wrapper
+        mouseEvent: MOUSE_DOWN
+        forVout: p_vout];
+}
+
 @end
index 911dcc14ca3aaabba57febbb5f5d866e67ab21cd..134dc9dbf4ce0bec90a40009e98dd84cfe21e86e 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.18 2002/05/01 19:18:09 sam Exp $
+ * $Id: spu_decoder.c,v 1.19 2002/05/12 20:56:34 massiot Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
@@ -151,16 +151,19 @@ static int decoder_Run( decoder_config_t * p_config )
         DecoderError( p_spudec->p_fifo );
     }
 
-    /* End of thread */
-    EndThread( p_spudec );
-
-    if( p_spudec->p_fifo->b_error )
     {
-        return( -1 );
+        boolean_t b_error = p_spudec->p_fifo->b_error;
+
+        /* End of thread */
+        EndThread( p_spudec );
+
+        if( b_error )
+        {
+            return( -1 );
+        }
     }
    
     return( 0 );
-
 }
 
 /* following functions are local */