Commit 4bef8ffb authored by Christophe Massiot's avatar Christophe Massiot

* Fixed menus [Mac OS X port]

* 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
parent bc57d09c
......@@ -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
......
......@@ -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 $@'
......@@ -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)
......
......@@ -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@
......
......@@ -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
......
......@@ -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
......
......@@ -19,15 +19,15 @@
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;
}
);
......
......@@ -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>
......
......@@ -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 = {
......@@ -103,14 +103,14 @@
};
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 = {
......@@ -121,8 +121,8 @@
};
F51212300170635601A80A1F = {
isa = PBXFileReference;
name = macosx.c;
path = plugins/macosx/macosx.c;
name = macosx.m;
path = plugins/macosx/macosx.m;
refType = 4;
};
F51212310170635601A80A1F = {
......@@ -133,8 +133,8 @@
};
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 = {
......@@ -243,7 +243,7 @@
<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>
......@@ -255,7 +255,7 @@
<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>
......@@ -370,8 +370,8 @@
//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 = {
......@@ -382,14 +382,14 @@
};
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 = {
......@@ -400,8 +400,8 @@
};
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 = {
......@@ -412,8 +412,8 @@
};
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 = {
......
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
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
*
......
......@@ -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;
}
}
}