From: Sam Hocevar Date: Sat, 1 Jun 2002 12:32:02 +0000 (+0000) Subject: * ALL: the first libvlc commit. X-Git-Tag: 0.5.0~1358 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9e3ab283c258cba17e4ca6730d84f9d00d49b068;p=vlc * ALL: the first libvlc commit. As for video output 4, this breaks almost everything, but I'll slowly do what remains to be fixed during the weekend. Changes in vlc: =============== * vlc is now a very small program (20 lines) which uses the libvlc API; it is quite simple for the moment but can be extended in the future. * interfaces, decoders, video outputs, etc. are now almost the same objects (yes, I know, this is C++ redone in C) and are structured in a tree. More about this later, but basically it allows the following nice features: - several interfaces - several playlists with several outputs - input plugins spawning helper interfaces (will be used for DVD menus) - anything spawning anything; I swear there are useful uses for this! * libvlc can be used in other programs; I'm currently writing a Mozilla plugin for my employer. Things currently broken: ======================== * most interfaces, most ports * the playlist handling (almost finished rewriting this though). This means no file can be played from the GUI, you need to use the commandline. This also means it segfaults at EOF, when exiting the program, and it sometimes refuses to open a file when asked to. --- diff --git a/.cvsignore b/.cvsignore index ab07159772..7e57e3e44b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -5,8 +5,8 @@ conftest conftest.* .dep gmon.out -vlc-debug.log -vlc-debug.ct +vlc-debug.* +vlc-log.* config.log config.cache config.status diff --git a/BUGS b/BUGS index e0539322fc..b98e49aaae 100644 --- a/BUGS +++ b/BUGS @@ -1,4 +1,4 @@ -List of known vlc bugs $Id: BUGS,v 1.13 2002/05/20 22:30:19 sam Exp $ +List of known vlc bugs $Id: BUGS,v 1.14 2002/06/01 12:31:57 sam Exp $ Please try to keep this file up to date. Also, grep for FIXME in the source files for more and more bugs to fix. @@ -63,3 +63,10 @@ Misc: * The Jin-Roh DVD seems to segfault. + +From: David Legg +If I change the value of AOUT_FIFO_SIZE from 255 to 511, vlc segmentation +faults. + + + diff --git a/Makefile b/Makefile index 469a6659fa..4e1fb8f251 100644 --- a/Makefile +++ b/Makefile @@ -96,10 +96,11 @@ PLUGINS_TARGETS := a52/a52 \ esd/esd \ fb/fb \ ffmpeg/ffmpeg \ + filter/filter_clone \ filter/filter_deinterlace \ - filter/filter_transform \ - filter/filter_invert \ filter/filter_distort \ + filter/filter_invert \ + filter/filter_transform \ filter/filter_wall \ filter/filter_clone \ fx/fx_scope \ @@ -132,7 +133,7 @@ PLUGINS_TARGETS := a52/a52 \ motion/motionmmxext \ motion/motion3dnow \ motion/motionaltivec \ - mpeg_system/mpeg_audio \ + mpeg_system/mpeg_audio \ mpeg_system/mpeg_es \ mpeg_system/mpeg_ps \ mpeg_system/mpeg_ts \ @@ -159,27 +160,36 @@ PLUGINS_TARGETS := a52/a52 \ # # C Objects # -INTERFACE := main interface intf_msg intf_playlist intf_eject +VLC := vlc +LIBVLC := libvlc +INTERFACE := interface intf_eject +PLAYLIST := playlist INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures AUDIO_OUTPUT := audio_output aout_ext-dec aout_pcm aout_spdif -MISC := mtime modules configuration netutils iso_lang +MISC := mtime modules threads cpu configuration netutils iso_lang messages objects -C_OBJ := $(INTERFACE:%=src/interface/%.o) \ +LIBVLC_OBJ := $(LIBVLC:%=src/%.o) \ + $(INTERFACE:%=src/interface/%.o) \ + $(PLAYLIST:%=src/playlist/%.o) \ $(INPUT:%=src/input/%.o) \ $(VIDEO_OUTPUT:%=src/video_output/%.o) \ $(AUDIO_OUTPUT:%=src/audio_output/%.o) \ $(MISC:%=src/misc/%.o) +VLC_OBJ := $(VLC:%=src/%.o) + +C_OBJ := $(VLC_OBJ) $(LIBVLC_OBJ) + # # Misc Objects # ifeq ($(NEED_GETOPT),1) -C_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o +LIBVLC_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o endif ifeq ($(NEED_SYMBOLS),1) -C_OBJ += src/misc/symbols.o +LIBVLC_OBJ += src/misc/symbols.o endif ifeq ($(SYS),beos) @@ -187,15 +197,16 @@ CPP_OBJ := src/misc/beos_specific.o endif ifneq (,$(findstring darwin,$(SYS))) -C_OBJ += src/misc/darwin_specific.o +LIBVLC_OBJ += src/misc/darwin_specific.o endif ifneq (,$(findstring mingw32,$(SYS))) -C_OBJ += src/misc/win32_specific.o +LIBVLC_OBJ += src/misc/win32_specific.o RESOURCE_OBJ := share/vlc_win32_rc.o endif -VLC_OBJ := $(C_OBJ) $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) +LIBVLC_OBJ += $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ) +VLC_OBJ += $(RESOURCE_OBJ) # # Generated header @@ -262,7 +273,7 @@ clean: plugins-clean po-clean vlc-clean rm -f src/*/*.o extras/*/*.o rm -f lib/*.so* lib/*.a rm -f plugins/*.so plugins/*.a plugins/*.lib plugins/*.tds - rm -rf extras/MacOSX/build + rm -Rf extras/MacOSX/build po-clean: -cd po && $(MAKE) clean @@ -302,28 +313,28 @@ vlc-install: ifneq (,$(ALIASES)) for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done endif - mkdir -p $(DESTDIR)$(datadir)/videolan - $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan - $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan - $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan + mkdir -p $(DESTDIR)$(datadir)/vlc + $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/vlc + $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/vlc + $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/vlc vlc-uninstall: rm -f $(DESTDIR)$(bindir)/vlc ifneq (,$(ALIASES)) for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias ; fi ; done endif - rm -f $(DESTDIR)$(datadir)/videolan/*.psf - rm -f $(DESTDIR)$(datadir)/videolan/*.png - rm -f $(DESTDIR)$(datadir)/videolan/*.xpm + rm -f $(DESTDIR)$(datadir)/vlc/*.psf + rm -f $(DESTDIR)$(datadir)/vlc/*.png + rm -f $(DESTDIR)$(datadir)/vlc/*.xpm plugins-install: - mkdir -p $(DESTDIR)$(libdir)/videolan/vlc + mkdir -p $(DESTDIR)$(libdir)/vlc ifneq (,$(PLUGINS)) - $(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/videolan/vlc + $(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc endif plugins-uninstall: - rm -f $(DESTDIR)$(libdir)/videolan/vlc/*.so + rm -f $(DESTDIR)$(libdir)/vlc/*.so po-install: -cd po && $(MAKE) install @@ -386,7 +397,9 @@ dist: cp $$file tmp/vlc/share ; done # Build archives F=vlc-${VERSION}; \ - mv tmp/vlc tmp/$$F; (cd tmp ; tar czf ../$$F.tar.gz $$F); \ + mv tmp/vlc tmp/$$F; (cd tmp ; \ + cd $$F && $(MAKE) distclean && cd .. ; \ + tar czf ../$$F.tar.gz $$F); # Clean up rm -Rf tmp @@ -495,8 +508,8 @@ FORCE: # # Generic rules (see below) # -$(H_OBJ): Makefile.opts Makefile.dep Makefile -# @echo "regenerating $@" +src/misc/modules_builtin.h: Makefile.opts Makefile + @echo "make[$(MAKELEVEL)]: Creating \`$@'" @rm -f $@ && cp $@.in $@ ifneq (,$(BUILTINS)) @for i in $(BUILTINS) ; do \ @@ -550,25 +563,41 @@ endif # # Main application target # -vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) $(BUILTIN_OBJ) - $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS) +vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ) + $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS) ifeq ($(SYS),beos) xres -o $@ ./share/vlc_beos.rsrc mimeset -f $@ endif +# here are the rules for a dynamic link of libvlc: +#vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.so $(BUILTIN_OBJ) +# $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(builtins_LDFLAGS) -L./lib -lvlc + +# +# Main library target +# +lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ) + rm -f $@ + ar rc $@ $(LIBVLC_OBJ) + $(RANLIB) $@ + +#lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ) +# $(CC) -shared $(LIBVLC_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) -o $@ +# chmod a-x $@ + # # Plugins target # plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ) -$(PLUGIN_OBJ): FORCE +$(PLUGIN_OBJ): $(H_OBJ) FORCE @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%) # # Built-in modules target # builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ) -$(BUILTIN_OBJ): FORCE +$(BUILTIN_OBJ): $(H_OBJ) FORCE @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%) # diff --git a/Makefile.dep b/Makefile.dep index 1853c564ba..de071516de 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -49,7 +49,7 @@ CFLAGS += -DMAKE_DEP $(C_DEP): .dep/%.d: %.c @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*) - #@echo "regenerating dependencies for $*.c" + @echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.c'" @$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ .dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ @@ -57,7 +57,7 @@ $(C_DEP): .dep/%.d: %.c $(CPP_DEP): .dep/%.dpp: %.cpp @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*) - #@echo "regenerating dependencies for $*.cpp" + @echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.cpp'" @$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ .dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \ @@ -65,7 +65,7 @@ $(CPP_DEP): .dep/%.dpp: %.cpp $(M_DEP): .dep/%.dm: %.m @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*) - #@echo "regenerating dependencies for $*.m" + @echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.m'" @$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ .dep\/$(subst /,\/,$*).dm : /g'\'' > $@; \ diff --git a/Makefile.modules b/Makefile.modules index d6c33f1641..b020a9094a 100644 --- a/Makefile.modules +++ b/Makefile.modules @@ -53,7 +53,7 @@ all: clean: # rm -f $(PLUGIN_ALL) $(BUILTIN_ALL) rm -f *.o *.o.* *.lo *.lo.* *.obj *.moc *.moc.* *.bak - rm -rf .dep + rm -Rf .dep FORCE: diff --git a/Makefile.opts.in b/Makefile.opts.in index 908fa1ce79..ba2449b1c3 100644 --- a/Makefile.opts.in +++ b/Makefile.opts.in @@ -167,8 +167,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\" # Data and plugin location -CFLAGS += -DDATA_PATH=\"@prefix@/share/videolan\" -CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\" +CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\" +CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\" ############################################################################### # Tuning and other variables - do not change anything except if you know @@ -183,13 +183,15 @@ CFLAGS += -Iinclude -Iextras # # C compiler flags: mainstream compilation # -CFLAGS += -D_REENTRANT +CFLAGS += -D_REENTRANT -D_THREAD_SAFE CFLAGS += -D_GNU_SOURCE ifeq ($(RELEASE),1) CFLAGS += -DHAVE_RELEASE endif +CFLAGS += -D__VLC__ + # Optimizations : don't compile debug versions with them ifeq ($(OPTIMS),1) CFLAGS += @CFLAGS_OPTIM@ @@ -241,9 +243,8 @@ endif # # C compiler flags: plugins and builtins compilation # -vlc_CFLAGS += -D__VLC__ -plugins_CFLAGS += -D__VLC__ -D__PLUGIN__ -I../../include -I../../extras -builtins_CFLAGS += -D__VLC__ -D__BUILTIN__ -I../../include -I../../extras +plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras +builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras # # Linker flags: plugins and builtins linking diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000000..c54c842ab7 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,96 @@ +#! /bin/sh + +## bootstrap.sh file for vlc, the VideoLAN Client +## $Id: bootstrap.sh,v 1.1 2002/06/01 12:31:57 sam Exp $ +## +## Authors: Samuel Hocevar + +## +## autoconf && autoheader +## +echo -n "running the auto* tools: " +autoconf || exit $? +echo -n "autoconf " +autoheader || exit $? +echo "autoheader." + + +## +## headers which need to be regenerated because of the VLC_EXPORT macro +## +file=src/misc/modules_plugin.h +echo -n "creating headers: " +rm -f $file +cp $file.in $file +echo '#define STORE_SYMBOLS( p_symbols ) \' >> $file +cat include/*.h | grep '^ *VLC_EXPORT.*;' | \ + sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> $file +echo '' >> $file +echo -n "$file " + +file=include/vlc_symbols.h +rm -f $file && touch $file +echo '/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */' >> $file +echo '' >> $file +echo 'struct module_symbols_s' >> $file +echo '{' >> $file +cat include/*.h | grep '^ *VLC_EXPORT.*;' | \ + sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> $file +echo '};' >> $file +echo '' >> $file +echo '#ifdef __PLUGIN__' >> $file +cat include/*.h | grep '^ *VLC_EXPORT.*;' | \ + sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' >> $file +echo '#endif /* __PLUGIN__ */' >> $file +echo '' >> $file +echo "$file." + + +## +## Glade sometimes sucks +## +echo -n "fixing glade bugs: " +for file in gnome_interface.c gtk_interface.c +do +if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file +then + rm -f /tmp/$$.$file.bak + cat > /tmp/$$.$file.bak << EOF +/* This file was created automatically by glade and fixed by bootstrap.sh */ + +#include +EOF + tail +8 plugins/gtk/$file \ + | sed 's#DISABLED!!!_("/dev/dvd")#config_GetPsz( "dvd" )#' \ + | sed 's#DISABLED!!!11954#config_GetInt( "frequency" )#' \ + | sed 's#DISABLED!!!27500#config_GetInt( "symbol-rate" )#' \ + | sed 's#_("-:--:--")#"-:--:--"#' \ + | sed 's#_("---")#"---"#' \ + | sed 's#_("--")#"--"#' \ + | sed 's#_("/dev/dvd")#"/dev/dvd"#' \ + | sed 's#_(\("./."\))#\1#' \ + >> /tmp/$$.$file.bak + mv -f /tmp/$$.$file.bak plugins/gtk/$file +fi +echo -n "$file " +done + +file=gtk_support.h +if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file +then + rm -f /tmp/$$.$file.bak + sed 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < plugins/gtk/$file > /tmp/$$.$file.bak + mv -f /tmp/$$.$file.bak plugins/gtk/$file +fi +echo "$file." + + +## +## Update the potfiles because no one ever does it +## +echo -n "updating potfiles: " +cd po +make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//' +cd .. +echo "." + diff --git a/configure b/configure index 4177fe5564..9a517d05d4 100755 --- a/configure +++ b/configure @@ -27,7 +27,7 @@ ac_help="$ac_help ac_help="$ac_help --disable-optimizations disable compiler optimizations (default enabled)" ac_help="$ac_help - --disable-altivec disable altivec optimizations (default enabled on PPC)" + --disable-altivec disable AltiVec optimizations (default enabled on PPC)" ac_help="$ac_help --enable-debug debug mode (default disabled)" ac_help="$ac_help @@ -772,16 +772,18 @@ test "$host_alias" != "$target_alias" && program_prefix=${target_alias}- +CONFIGURE_LINE="$0 $*" + PACKAGE="vlc" VERSION="0.4.0" CODENAME=Ourumov -save_CFLAGS="${CFLAGS}" save_CPPFLAGS="${CPPFLAGS}" +save_CFLAGS="${CFLAGS}" save_LDFLAGS="${LDFLAGS}" echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:785: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:787: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -810,7 +812,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:814: checking for $ac_word" >&5 +echo "configure:816: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -840,7 +842,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:844: checking for $ac_word" >&5 +echo "configure:846: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -891,7 +893,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:895: checking for $ac_word" >&5 +echo "configure:897: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -923,7 +925,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:927: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:929: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -934,12 +936,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 938 "configure" +#line 940 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -965,12 +967,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:974: checking whether we are using GNU C" >&5 +echo "configure:976: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -979,7 +981,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -998,7 +1000,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1002: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1004: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1030,7 +1032,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1034: checking how to run the C preprocessor" >&5 +echo "configure:1036: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1045,13 +1047,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1057: \"$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 : @@ -1062,13 +1064,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1074: \"$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 : @@ -1079,13 +1081,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1091: \"$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 : @@ -1119,7 +1121,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1123: checking for $ac_word" >&5 +echo "configure:1125: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1151,7 +1153,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1155: checking for $ac_word" >&5 +echo "configure:1157: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1186,7 +1188,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1190: checking for $ac_word" >&5 +echo "configure:1192: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1218,7 +1220,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1222: checking for $ac_word" >&5 +echo "configure:1224: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1254,7 +1256,7 @@ fi # Extract the first word of "gmake", so it can be a program name with args. set dummy gmake; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1258: checking for $ac_word" >&5 +echo "configure:1260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1289,7 +1291,7 @@ fi if test "x$GMAKE" = "xno"; then echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6 -echo "configure:1293: checking whether GNU make is installed" >&5 +echo "configure:1295: checking whether GNU make is installed" >&5 if eval "test \"`echo '$''{'ac_cv_gmake'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1321,7 +1323,7 @@ EOF # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1325: checking for $ac_word" >&5 +echo "configure:1327: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1350,7 +1352,7 @@ fi echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:1354: checking for strerror in -lcposix" >&5 +echo "configure:1356: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1358,7 +1360,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1375: \"$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 @@ -1392,12 +1394,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1396: checking for ANSI C header files" >&5 +echo "configure:1398: 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 < #include @@ -1405,7 +1407,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1411: \"$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* @@ -1422,7 +1424,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 @@ -1440,7 +1442,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 @@ -1461,7 +1463,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1472,7 +1474,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1496,12 +1498,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1500: checking for working const" >&5 +echo "configure:1502: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1571,21 +1573,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1575: checking for inline" >&5 +echo "configure:1577: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1611,12 +1613,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1615: checking for off_t" >&5 +echo "configure:1617: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1644,12 +1646,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1648: checking for size_t" >&5 +echo "configure:1650: 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 < #if STDC_HEADERS @@ -1679,19 +1681,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1683: checking for working alloca.h" >&5 +echo "configure:1685: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1712,12 +1714,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1716: checking for alloca" >&5 +echo "configure:1718: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1777,12 +1779,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1781: checking whether alloca needs Cray hooks" >&5 +echo "configure:1783: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1811: checking for $ac_func" >&5 +echo "configure:1813: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1862,7 +1864,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1866: checking stack direction for C alloca" >&5 +echo "configure:1868: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1870,7 +1872,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -1914,17 +1916,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1918: checking for $ac_hdr" >&5 +echo "configure:1920: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1930: \"$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* @@ -1953,12 +1955,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1957: checking for $ac_func" >&5 +echo "configure:1959: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2006,7 +2008,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2010: checking for working mmap" >&5 +echo "configure:2012: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2014,7 +2016,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2160: \"$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 @@ -2178,12 +2180,12 @@ fi echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 -echo "configure:2182: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo "configure:2184: checking whether we are using the GNU C Library 2.1 or newer" >&5 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2219,17 +2221,17 @@ stdlib.h string.h unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2223: checking for $ac_hdr" >&5 +echo "configure:2225: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2235: \"$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* @@ -2260,12 +2262,12 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ strdup strtoul tsearch __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2264: checking for $ac_func" >&5 +echo "configure:2266: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2328,7 +2330,7 @@ fi echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:2332: checking for iconv" >&5 +echo "configure:2334: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2336,7 +2338,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -2346,7 +2348,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else @@ -2358,7 +2360,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat > conftest.$ac_ext < #include @@ -2368,7 +2370,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes @@ -2389,13 +2391,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 -echo "configure:2393: checking for iconv declaration" >&5 +echo "configure:2395: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2414,7 +2416,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else @@ -2443,19 +2445,19 @@ EOF echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 -echo "configure:2447: checking for nl_langinfo and CODESET" >&5 +echo "configure:2449: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else @@ -2478,19 +2480,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2482: checking for LC_MESSAGES" >&5 +echo "configure:2484: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2511,7 +2513,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2515: checking whether NLS is requested" >&5 +echo "configure:2517: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -2533,7 +2535,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2537: checking whether included gettext is requested" >&5 +echo "configure:2539: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -2553,17 +2555,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2557: checking for libintl.h" >&5 +echo "configure:2559: checking for libintl.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2569: \"$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* @@ -2580,12 +2582,12 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 -echo "configure:2584: checking for GNU gettext in libc" >&5 +echo "configure:2586: checking for GNU gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; @@ -2594,7 +2596,7 @@ bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libc=yes else @@ -2610,14 +2612,14 @@ echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 -echo "configure:2614: checking for GNU gettext in libintl" >&5 +echo "configure:2616: checking for GNU gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl $LIBICONV" cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; @@ -2626,7 +2628,7 @@ bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libintl=yes else @@ -2659,12 +2661,12 @@ EOF for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2663: checking for $ac_func" >&5 +echo "configure:2665: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2716,7 +2718,7 @@ done # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2720: checking for $ac_word" >&5 +echo "configure:2722: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2750,7 +2752,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2754: checking for $ac_word" >&5 +echo "configure:2756: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2787,7 +2789,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2791: checking for $ac_word" >&5 +echo "configure:2793: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2837,7 +2839,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2841: checking for $ac_word" >&5 +echo "configure:2843: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2871,7 +2873,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2875: checking for $ac_word" >&5 +echo "configure:2877: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2907,7 +2909,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2911: checking for $ac_word" >&5 +echo "configure:2913: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2978,7 +2980,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2982: checking for $ac_word" >&5 +echo "configure:2984: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3011,7 +3013,7 @@ done ac_verc_fail=yes else echo $ac_n "checking version of bison""... $ac_c" 1>&6 -echo "configure:3015: checking version of bison" >&5 +echo "configure:3017: checking version of bison" >&5 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -3058,7 +3060,7 @@ echo "configure:3015: checking version of bison" >&5 LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3062: checking for catalogs to be installed" >&5 +echo "configure:3064: checking for catalogs to be installed" >&5 NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no @@ -3110,7 +3112,7 @@ echo "configure:3062: checking for catalogs to be installed" >&5 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3114: checking for a BSD compatible install" >&5 +echo "configure:3116: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3163,6 +3165,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +vlc_LDFLAGS="${LDFLAGS}" + case x"${target_os}" in x) SYS=unknown @@ -3189,7 +3193,7 @@ case x"${target_os}" in # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3193: checking for $ac_word" >&5 +echo "configure:3197: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3221,7 +3225,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3225: checking for $ac_word" >&5 +echo "configure:3229: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3291,12 +3295,12 @@ save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefgh for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3295: checking for $ac_func" >&5 +echo "configure:3299: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3345,12 +3349,12 @@ done echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:3349: checking for connect" >&5 +echo "configure:3353: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -3392,7 +3396,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3396: checking for connect in -lsocket" >&5 +echo "configure:3400: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3400,7 +3404,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3419: \"$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 @@ -3436,12 +3440,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3440: checking for gethostbyname" >&5 +echo "configure:3444: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -3483,7 +3487,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3487: checking for gethostbyname in -lnsl" >&5 +echo "configure:3491: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3491,7 +3495,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3510: \"$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 @@ -3526,12 +3530,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3530: checking for gethostbyname" >&5 +echo "configure:3534: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -3573,7 +3577,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6 -echo "configure:3577: checking for gethostbyname in -lbind" >&5 +echo "configure:3581: checking for gethostbyname in -lbind" >&5 ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3581,7 +3585,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3600: \"$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 @@ -3618,12 +3622,12 @@ fi for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3622: checking for $ac_func" >&5 +echo "configure:3626: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3668,7 +3672,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6 -echo "configure:3672: checking for nanosleep in -lrt" >&5 +echo "configure:3676: checking for nanosleep in -lrt" >&5 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3676,7 +3680,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3695: \"$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 @@ -3706,7 +3710,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6 -echo "configure:3710: checking for nanosleep in -lposix4" >&5 +echo "configure:3714: checking for nanosleep in -lposix4" >&5 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3714,7 +3718,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3733: \"$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 @@ -3753,12 +3757,12 @@ fi done echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:3757: checking for inet_aton" >&5 +echo "configure:3761: checking for inet_aton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -3800,7 +3804,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:3804: checking for inet_aton in -lresolv" >&5 +echo "configure:3808: checking for inet_aton in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3808,7 +3812,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3827: \"$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 @@ -3843,12 +3847,12 @@ fi fi echo $ac_n "checking for textdomain""... $ac_c" 1>&6 -echo "configure:3847: checking for textdomain" >&5 +echo "configure:3851: checking for textdomain" >&5 if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_textdomain=yes" else @@ -3890,7 +3894,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3894: checking for textdomain in -lintl" >&5 +echo "configure:3898: checking for textdomain in -lintl" >&5 ac_lib_var=`echo intl'_'textdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3898,7 +3902,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3917: \"$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 @@ -3924,7 +3928,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - save_LDFLAGS="${save_LDFLAGS} -lintl" + vlc_LDFLAGS="${vlc_LDFLAGS} -lintl" else echo "$ac_t""no" 1>&6 fi @@ -3935,12 +3939,12 @@ fi NEED_GETOPT=0 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 -echo "configure:3939: checking for getopt_long" >&5 +echo "configure:3943: checking for getopt_long" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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* eval "ac_cv_func_getopt_long=yes" else @@ -3985,7 +3989,7 @@ else echo "$ac_t""no" 1>&6 # FreeBSD has a gnugetopt library for this: echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6 -echo "configure:3989: checking for getopt_long in -lgnugetopt" >&5 +echo "configure:3993: checking for getopt_long in -lgnugetopt" >&5 ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3993,7 +3997,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnugetopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4012: \"$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 @@ -4032,12 +4036,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4036: checking return type of signal handlers" >&5 +echo "configure:4040: 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 < #include @@ -4054,7 +4058,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4073,7 +4077,7 @@ EOF echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4077: checking for dlopen in -ldl" >&5 +echo "configure:4081: 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 @@ -4081,7 +4085,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4100: \"$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 @@ -4113,7 +4117,7 @@ else fi echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6 -echo "configure:4117: checking for cos in -lm" >&5 +echo "configure:4121: checking for cos in -lm" >&5 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4121,7 +4125,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4140: \"$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 @@ -4154,7 +4158,7 @@ else fi echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6 -echo "configure:4158: checking for pow in -lm" >&5 +echo "configure:4162: 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 @@ -4162,7 +4166,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4181: \"$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 @@ -4188,6 +4192,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 + ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm" imdct_LDFLAGS="${imdct_LDFLAGS} -lm" imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm" imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm" @@ -4201,7 +4206,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:4205: checking for pthread_attr_init in -lpthread" >&5 +echo "configure:4210: 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 @@ -4209,7 +4214,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4229: \"$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 @@ -4243,7 +4248,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:4247: checking for pthread_attr_init in -lpthreads" >&5 +echo "configure:4252: 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 @@ -4251,7 +4256,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4271: \"$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 @@ -4285,7 +4290,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:4289: checking for pthread_attr_init in -lc_r" >&5 +echo "configure:4294: 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 @@ -4293,7 +4298,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4313: \"$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 @@ -4327,12 +4332,12 @@ fi fi if test "x${THREAD_LIB}" = xerror; then echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6 -echo "configure:4331: checking for pthread_attr_init" >&5 +echo "configure:4336: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4364: \"$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 @@ -4378,7 +4383,7 @@ fi fi echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6 -echo "configure:4382: checking for cthread_fork in -lthreads" >&5 +echo "configure:4387: 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 @@ -4386,7 +4391,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4406: \"$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 @@ -4419,7 +4424,7 @@ fi cat > conftest.$ac_ext < EOF @@ -4435,7 +4440,23 @@ fi rm -f conftest* cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pthread_once" >/dev/null 2>&1; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +#define PTHREAD_ONCE_IN_PTHREAD_H 1 +EOF + +fi +rm -f conftest* + +cat > conftest.$ac_ext < EOF @@ -4451,21 +4472,21 @@ fi rm -f conftest* -for ac_hdr in getopt.h strings.h +for ac_hdr in stdint.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:4459: checking for $ac_hdr" >&5 +echo "configure:4480: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4490: \"$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* @@ -4495,17 +4516,17 @@ for ac_hdr in sys/sockio.h fcntl.h sys/types.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:4499: checking for $ac_hdr" >&5 +echo "configure:4520: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4530: \"$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* @@ -4535,17 +4556,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:4539: checking for $ac_hdr" >&5 +echo "configure:4560: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4570: \"$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* @@ -4575,17 +4596,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:4579: checking for $ac_hdr" >&5 +echo "configure:4600: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4610: \"$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* @@ -4615,17 +4636,17 @@ for ac_hdr in machine/param.h sys/shm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4619: checking for $ac_hdr" >&5 +echo "configure:4640: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4650: \"$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* @@ -4655,17 +4676,17 @@ for ac_hdr in linux/version.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4659: checking for $ac_hdr" >&5 +echo "configure:4680: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4690: \"$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* @@ -4693,12 +4714,12 @@ done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4697: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4718: 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 < #include @@ -4707,7 +4728,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4729,7 +4750,7 @@ fi cat > conftest.$ac_ext < EOF @@ -4747,7 +4768,7 @@ rm -f conftest* cat > conftest.$ac_ext < EOF @@ -4768,17 +4789,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:4772: checking for $ac_hdr" >&5 +echo "configure:4793: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4803: \"$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* @@ -4818,17 +4839,17 @@ then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4822: checking for $ac_hdr" >&5 +echo "configure:4843: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4853: \"$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* @@ -4850,7 +4871,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then EOF cat > conftest.$ac_ext < EOF @@ -4876,20 +4897,20 @@ done fi echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6 -echo "configure:4880: checking for ntohl in sys/param.h" >&5 +echo "configure:4901: 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 < int main() { void foo() { int meuh; ntohl(meuh); } ; return 0; } EOF -if { (eval echo configure:4893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_ntohl_sys_param_h=yes else @@ -4910,20 +4931,20 @@ EOF fi echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6 -echo "configure:4914: checking if \$CC accepts -finline-limit" >&5 +echo "configure:4935: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline_limit=yes else @@ -4941,20 +4962,20 @@ if test x"$ac_cv_c_inline_limit" != x"no"; then fi echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6 -echo "configure:4945: checking if \$CC accepts -Wall -Winline" >&5 +echo "configure:4966: checking if \$CC accepts -Wall -Winline" >&5 if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - CFLAGS="${save_CFLAGS} -Wall -Winline" + CFLAGS="-Wall -Winline ${save_CFLAGS}" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_Wall_Winline=yes else @@ -4968,23 +4989,23 @@ fi echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6 if test x"$ac_cv_c_Wall_Winline" != x"no"; then - save_CFLAGS="${save_CFLAGS} -Wall -Winline" + save_CFLAGS="-Wall -Winline ${save_CFLAGS}" else echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6 -echo "configure:4975: checking if \$CC accepts -wall -winline" >&5 +echo "configure:4996: checking if \$CC accepts -wall -winline" >&5 if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - CFLAGS="${save_CFLAGS} -wall -winline" + CFLAGS="-wall -winline ${save_CFLAGS}" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_wall_winline=yes else @@ -4998,25 +5019,25 @@ fi echo "$ac_t""$ac_cv_c_wall_winline" 1>&6 if test x"$ac_cv_c_wall_winline" != x"no"; then - save_CFLAGS="${save_CFLAGS} -wall -winline" + save_CFLAGS="-wall -winline ${save_CFLAGS}" fi fi echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6 -echo "configure:5007: checking if \$CC accepts -pipe" >&5 +echo "configure:5028: checking if \$CC accepts -pipe" >&5 if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_pipe=yes else @@ -5034,20 +5055,20 @@ if test x"$ac_cv_c_pipe" != x"no"; then fi echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6 -echo "configure:5038: checking if \$CC accepts -O3" >&5 +echo "configure:5059: checking if \$CC accepts -O3" >&5 if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -O3" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_o3=yes else @@ -5064,20 +5085,20 @@ if test x"$ac_cv_c_o3" != x"no"; then CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3" else echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6 -echo "configure:5068: checking if \$CC accepts -O2" >&5 +echo "configure:5089: checking if \$CC accepts -O2" >&5 if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -O2" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_o2=yes else @@ -5094,20 +5115,20 @@ echo "$ac_t""$ac_cv_c_o2" 1>&6 CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2" else echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6 -echo "configure:5098: checking if \$CC accepts -O" >&5 +echo "configure:5119: checking if \$CC accepts -O" >&5 if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -O" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_o=yes else @@ -5127,20 +5148,20 @@ echo "$ac_t""$ac_cv_c_o" 1>&6 fi echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6 -echo "configure:5131: checking if \$CC accepts -ffast-math" >&5 +echo "configure:5152: checking if \$CC accepts -ffast-math" >&5 if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -ffast-math" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_fast_math=yes else @@ -5158,20 +5179,20 @@ if test x"$ac_cv_c_fast_math" != x"no"; then fi echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6 -echo "configure:5162: checking if \$CC accepts -funroll-loops" >&5 +echo "configure:5183: checking if \$CC accepts -funroll-loops" >&5 if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -funroll-loops" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_unroll_loops=yes else @@ -5189,20 +5210,20 @@ if test x"$ac_cv_c_unroll_loops" != x"no"; then fi echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6 -echo "configure:5193: checking if \$CC accepts -fomit-frame-pointer" >&5 +echo "configure:5214: checking if \$CC accepts -fomit-frame-pointer" >&5 if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS} -fomit-frame-pointer" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_omit_frame_pointer=yes else @@ -5220,20 +5241,20 @@ if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then fi echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6 -echo "configure:5224: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5 +echo "configure:5245: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&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 -lcc_dynamic" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_ld_darwin=yes else @@ -5251,20 +5272,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:5255: checking if \$CC accepts -shared" >&5 +echo "configure:5276: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_ld_plugins=yes else @@ -5282,13 +5303,13 @@ if test x"$ac_cv_ld_plugins" != x"no"; then fi echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6 -echo "configure:5286: checking for variadic cpp macros" >&5 +echo "configure:5307: checking for variadic cpp macros" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else CFLAGS="${save_CFLAGS}" cat > conftest.$ac_ext < #define a(b,c...) printf(b,##c) @@ -5296,7 +5317,7 @@ int main() { a("foo");a("%s","bar");a("%s%s","baz","quux"); ; return 0; } EOF -if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_variadic_macros=yes else @@ -5317,7 +5338,7 @@ EOF fi echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6 -echo "configure:5321: checking __attribute__ ((aligned ())) support" >&5 +echo "configure:5342: 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 @@ -5325,14 +5346,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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5357: \"$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 @@ -5351,109 +5372,6 @@ EOF fi -CFLAGS="${save_CFLAGS}" -CPPFLAGS="${save_CPPFLAGS}" -LDFLAGS="${save_LDFLAGS}" - -echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5360: 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 < -int main() { -boolean_t foo; -; return 0; } -EOF -if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_boolean_t_sys_types_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_boolean_t_sys_types_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6 -if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then - cat >> confdefs.h <<\EOF -#define BOOLEAN_T_IN_SYS_TYPES_H 1 -EOF - -fi - -echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6 -echo "configure:5393: 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 < -int main() { -boolean_t foo; -; return 0; } -EOF -if { (eval echo configure:5405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_boolean_t_pthread_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_boolean_t_pthread_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6 -if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then - cat >> confdefs.h <<\EOF -#define BOOLEAN_T_IN_PTHREAD_H 1 -EOF - -fi - -echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6 -echo "configure:5426: 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 < -int main() { -boolean_t foo; -; return 0; } -EOF -if { (eval echo configure:5438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_boolean_t_cthreads_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_boolean_t_cthreads_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6 -if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then - cat >> confdefs.h <<\EOF -#define BOOLEAN_T_IN_CTHREADS_H 1 -EOF - -fi - case x"${target_cpu}" in x) ARCH=unknown @@ -5463,8 +5381,8 @@ case x"${target_cpu}" in ;; esac -BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec" -PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope" +BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix mpeg_adec ac3_adec mpeg_vdec" +PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_audio mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga" MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx" MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext" @@ -5473,19 +5391,20 @@ SSE_MODULES="imdctsse downmixsse" ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec" echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6 -echo "configure:5477: checking if \$CC groks MMX inline assembly" >&5 +echo "configure:5395: 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 < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mmx_inline=yes else @@ -5503,19 +5422,20 @@ 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:5507: checking if \$CC groks MMX EXT inline assembly" >&5 +echo "configure:5426: 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 < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mmxext_inline=yes else @@ -5533,19 +5453,20 @@ 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:5537: checking if \$CC groks 3D Now! inline assembly" >&5 +echo "configure:5457: 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 < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_3dnow_inline=yes else @@ -5567,19 +5488,20 @@ EOF fi echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6 -echo "configure:5571: checking if \$CC groks SSE inline assembly" >&5 +echo "configure:5492: 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 < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sse_inline=yes else @@ -5600,40 +5522,40 @@ EOF ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}" fi -# don't try to grok altivec with native mingw32 it doesn't work right now +# don't try to grok AltiVec with native mingw32 it doesn't work right now # we should be able to remove this test with future versions of mingw32 if test x$SYS != xmingw32; then -echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6 -echo "configure:5608: checking if \$CC groks Altivec inline assembly" >&5 +echo $ac_n "checking if \$CC groks AltiVec inline assembly""... $ac_c" 1>&6 +echo "configure:5530: 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 < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_altivec_inline=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Wa,-m7400" + CFLAGS="$save_CFLAGS -Wa,-m7400" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_altivec_inline="-Wa,-m7400" else @@ -5643,7 +5565,6 @@ else ac_cv_altivec_inline=no fi rm -f conftest* - CFLAGS=$save_CFLAGS fi rm -f conftest* @@ -5664,23 +5585,22 @@ EOF ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" fi -echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6 -echo "configure:5669: checking if \$CC groks Altivec C extensions" >&5 +echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6 +echo "configure:5590: 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 - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -faltivec" + CFLAGS="$save_CFLAGS -faltivec" # Darwin test cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_altivec=-faltivec else @@ -5691,14 +5611,14 @@ else # Linux/PPC test CFLAGS="$save_CFLAGS $idctaltivec_CFLAGS -fvec" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_altivec="-fvec" else @@ -5711,7 +5631,6 @@ rm -f conftest* fi rm -f conftest* - CFLAGS=$save_CFLAGS fi @@ -5729,21 +5648,20 @@ EOF fi echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6 -echo "configure:5733: checking if linker needs -framework vecLib" >&5 +echo "configure:5652: 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" + LDFLAGS="$vlc_LDFLAGS -framework vecLib" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_ld_altivec=yes else @@ -5753,7 +5671,6 @@ else ac_cv_ld_altivec=no fi rm -f conftest* - LDFLAGS=$save_LDFLAGS fi @@ -5798,7 +5715,7 @@ fi if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386 then ARCH="${ARCH} mmx" - BUILTINS="${BUILTINS} ${ACCEL_MODULES}" + PLUGINS="${PLUGINS} ${ACCEL_MODULES}" fi # Check whether --enable-optimizations or --disable-optimizations was given. @@ -5875,17 +5792,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5879: checking for $ac_hdr" >&5 +echo "configure:5796: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5806: \"$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* @@ -5916,7 +5833,7 @@ done else echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6 -echo "configure:5920: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5 +echo "configure:5837: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5 real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`" if test "x$real_dvdcss_tree" = x then @@ -5942,7 +5859,7 @@ echo "configure:5920: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5 ;; *) echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6 -echo "configure:5946: checking for dvdcss headers in ${with_dvdcss}" >&5 +echo "configure:5863: checking for dvdcss headers in ${with_dvdcss}" >&5 if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h then echo "$ac_t""yes" 1>&6 @@ -5984,17 +5901,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5988: checking for $ac_hdr" >&5 +echo "configure:5905: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5915: \"$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* @@ -6015,15 +5932,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then #define $ac_tr_hdr 1 EOF + CFLAGS="${save_CFLAGS}" cat > conftest.$ac_ext < int main() { void foo() { int i=DVD_VIDEO_LB_LEN; } ; return 0; } EOF -if { (eval echo configure:6027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PLUGINS="${PLUGINS} dvdread" @@ -6086,17 +6004,17 @@ fi CPPFLAGS="$save_CPPFLAGS $test_CFLAGS" ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6 -echo "configure:6090: checking for dvbpsi/dr.h" >&5 +echo "configure:6008: checking for dvbpsi/dr.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6018: \"$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* @@ -6140,7 +6058,7 @@ fi if test x$enable_vcd != xno then cat > conftest.$ac_ext < EOF @@ -6155,7 +6073,7 @@ rm -f conftest* cat > conftest.$ac_ext < EOF @@ -6197,13 +6115,14 @@ fi if test x$SYS != xnto && test "x$SYS" != "xmingw32" then + CFLAGS="$save_CFLAGS" echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -echo "configure:6202: checking for inet_pton" >&5 +echo "configure:6121: checking for inet_pton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_pton=yes" else @@ -6249,9 +6168,9 @@ fi if test "x$SYS" = "xmingw32" then echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6 -echo "configure:6253: checking for getaddrinfo in ws2tcpip.h" >&5 +echo "configure:6172: checking for getaddrinfo in ws2tcpip.h" >&5 cat > conftest.$ac_ext < EOF @@ -6322,7 +6241,7 @@ fi { echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; } fi echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6 -echo "configure:6326: checking for mad.h in ${real_mad_tree}/libmad" >&5 +echo "configure:6245: checking for mad.h in ${real_mad_tree}/libmad" >&5 if test -f ${real_mad_tree}/libmad/mad.h then echo "$ac_t""yes" 1>&6 @@ -6331,7 +6250,7 @@ echo "configure:6326: checking for mad.h in ${real_mad_tree}/libmad" >&5 save_LDFLAGS=$LDFLAGS LDFLAGS=$mad_LDFLAGS echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6 -echo "configure:6335: checking for mad_bit_init in -lmad" >&5 +echo "configure:6254: checking for mad_bit_init in -lmad" >&5 ac_lib_var=`echo mad'_'mad_bit_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 @@ -6339,7 +6258,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmad $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6273: \"$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 @@ -6381,25 +6300,23 @@ fi { echo "configure: error: the specified tree doesn't have mad.h" 1>&2; exit 1; } fi else - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS $mad_CFLAGS" - LDFLAGS="$LDFLAGS $mad_LDFLAGS" + CFLAGS="$vlc_CFLAGS $mad_CFLAGS" + LDFLAGS="$vlc_LDFLAGS $mad_LDFLAGS" for ac_hdr in mad.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6393: checking for $ac_hdr" >&5 +echo "configure:6310: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6320: \"$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* @@ -6427,7 +6344,7 @@ fi done echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6 -echo "configure:6431: checking for mad_bit_init in -lmad" >&5 +echo "configure:6348: checking for mad_bit_init in -lmad" >&5 ac_lib_var=`echo mad'_'mad_bit_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 @@ -6435,7 +6352,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmad $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6367: \"$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 @@ -6469,8 +6386,6 @@ else { echo "configure: error: Cannot find libmad library..." 1>&2; exit 1; } fi - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS fi fi @@ -6503,7 +6418,7 @@ fi if test "x$with_ffmpeg_tree" != "x" then echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6 -echo "configure:6507: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5 +echo "configure:6422: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5 real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`" if test "x$real_ffmpeg_tree" = x then @@ -6526,7 +6441,7 @@ echo "configure:6507: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5 CFLAGS="$CFLAGS $ffmpeg_CFLAGS" LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS -lm" echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6 -echo "configure:6530: checking for avcodec_init in -lavcodec" >&5 +echo "configure:6445: checking for avcodec_init in -lavcodec" >&5 ac_lib_var=`echo avcodec'_'avcodec_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 @@ -6534,7 +6449,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lavcodec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6464: \"$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 @@ -6602,7 +6517,7 @@ fi { echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; } fi echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6 -echo "configure:6606: checking for a52.h in ${real_a52_tree}/include" >&5 +echo "configure:6521: checking for a52.h in ${real_a52_tree}/include" >&5 if test -f ${real_a52_tree}/include/a52.h then echo "$ac_t""yes" 1>&6 @@ -6611,7 +6526,7 @@ echo "configure:6606: checking for a52.h in ${real_a52_tree}/include" >&5 save_LDFLAGS=$LDFLAGS LDFLAGS="$a52_LDFLAGS $LDFLAGS" echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6 -echo "configure:6615: checking for a52_free in -la52" >&5 +echo "configure:6530: checking for a52_free in -la52" >&5 ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6619,7 +6534,7 @@ else ac_save_LIBS="$LIBS" LIBS="-la52 -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6549: \"$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 @@ -6671,17 +6586,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6675: checking for $ac_hdr" >&5 +echo "configure:6590: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6600: \"$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* @@ -6703,7 +6618,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then EOF echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6 -echo "configure:6707: checking for a52_free in -la52" >&5 +echo "configure:6622: checking for a52_free in -la52" >&5 ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6711,7 +6626,7 @@ else ac_save_LIBS="$LIBS" LIBS="-la52 -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6641: \"$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 @@ -6767,17 +6682,17 @@ then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6771: checking for $ac_hdr" >&5 +echo "configure:6686: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6696: \"$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* @@ -6835,17 +6750,17 @@ if test x$enable_x11 != xno && do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6839: checking for $ac_hdr" >&5 +echo "configure:6754: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6764: \"$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* @@ -6892,23 +6807,22 @@ if test x$enable_xvideo != xno && if test x$x_libraries = xNONE; then x_libraries=/usr/X11R6/lib fi - save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$save_CPPFLAGS -I$x_includes" for ac_hdr in X11/extensions/Xv.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6902: checking for $ac_hdr" >&5 +echo "configure:6816: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6826: \"$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* @@ -6929,10 +6843,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then #define $ac_tr_hdr 1 EOF - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext" + CFLAGS="$save_CFLAGS -L$x_libraries -lX11 -lXext" echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6 -echo "configure:6936: checking for XvSetPortAttribute in -lXv_pic" >&5 +echo "configure:6849: checking for XvSetPortAttribute in -lXv_pic" >&5 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6940,7 +6853,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXv_pic $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6868: \"$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 @@ -6978,7 +6891,6 @@ else xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes" fi - CFLAGS="$save_CFLAGS" CPPFLAGS="$save_CPPFLAGS" else @@ -7009,7 +6921,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:7013: checking for $ac_word" >&5 +echo "configure:6925: 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 @@ -7049,7 +6961,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:7053: checking for $ac_word" >&5 +echo "configure:6965: 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 @@ -7090,7 +7002,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:7094: checking for $ac_word" >&5 +echo "configure:7006: 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 @@ -7135,17 +7047,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7139: checking for $ac_hdr" >&5 +echo "configure:7051: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7061: \"$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* @@ -7215,17 +7127,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7219: checking for $ac_hdr" >&5 +echo "configure:7131: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7141: \"$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* @@ -7254,7 +7166,7 @@ done else echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6 -echo "configure:7258: checking for directX headers in ${with_directx}" >&5 +echo "configure:7170: checking for directX headers in ${with_directx}" >&5 if test -f ${with_directx}/ddraw.h then PLUGINS="${PLUGINS} directx" @@ -7281,17 +7193,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7285: checking for $ac_hdr" >&5 +echo "configure:7197: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7207: \"$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* @@ -7386,17 +7298,17 @@ if test x$enable_aa = xyes then ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for aalib.h""... $ac_c" 1>&6 -echo "configure:7390: checking for aalib.h" >&5 +echo "configure:7302: checking for aalib.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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7312: \"$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* @@ -7447,17 +7359,17 @@ then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7451: checking for $ac_hdr" >&5 +echo "configure:7363: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7373: \"$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* @@ -7480,7 +7392,7 @@ EOF PLUGINS="${PLUGINS} dsp" echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6 -echo "configure:7484: checking for main in -lossaudio" >&5 +echo "configure:7396: checking for main in -lossaudio" >&5 ac_lib_var=`echo ossaudio'_'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 @@ -7488,14 +7400,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lossaudio $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7411: \"$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 @@ -7531,7 +7443,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:7535: checking for $ac_word" >&5 +echo "configure:7447: 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 @@ -7582,7 +7494,7 @@ if test "${enable_arts+set}" = set; then # Extract the first word of "artsc-config", so it can be a program name with args. set dummy artsc-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7586: checking for $ac_word" >&5 +echo "configure:7498: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7632,17 +7544,17 @@ if test "${enable_alsa+set}" = set; then then ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6 -echo "configure:7636: checking for alsa/asoundlib.h" >&5 +echo "configure:7548: checking for alsa/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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7558: \"$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* @@ -7659,7 +7571,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:7663: checking for main in -lasound" >&5 +echo "configure:7575: 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 @@ -7667,14 +7579,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lasound $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7590: \"$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 @@ -7751,7 +7663,7 @@ fi # Extract the first word of "gtk12-config", so it can be a program name with args. set dummy gtk12-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7755: checking for $ac_word" >&5 +echo "configure:7667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7790,7 +7702,7 @@ fi # 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:7794: checking for $ac_word" >&5 +echo "configure:7706: 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 @@ -7839,17 +7751,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7843: checking for $ac_hdr" >&5 +echo "configure:7755: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7765: \"$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* @@ -7895,7 +7807,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:7899: checking for $ac_word" >&5 +echo "configure:7811: 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 @@ -7939,17 +7851,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7943: checking for $ac_hdr" >&5 +echo "configure:7855: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7865: \"$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* @@ -8036,17 +7948,17 @@ else do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8040: checking for $ac_hdr" >&5 +echo "configure:7952: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7962: \"$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* @@ -8089,17 +8001,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8093: checking for $ac_hdr" >&5 +echo "configure:8005: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8015: \"$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* @@ -8170,17 +8082,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:8174: checking for lirc/lirc_client.h" >&5 +echo "configure:8086: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8096: \"$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* @@ -8197,7 +8109,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:8201: checking for lirc_init in -llirc_client" >&5 +echo "configure:8113: 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 @@ -8205,7 +8117,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llirc_client $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8132: \"$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 @@ -8271,7 +8183,7 @@ fi ;; *) echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6 -echo "configure:8275: checking whether the byte order is big-endian" >&5 +echo "configure:8187: 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 @@ -8319,11 +8231,18 @@ EOF fi +PROFILING=0 + GPROF=0 # Check whether --enable-gprof or --disable-gprof was given. if test "${enable_gprof+set}" = set; then enableval="$enable_gprof" - if test "x$enable_gprof" = "xyes"; then GPROF=1; fi + if test "x$enable_gprof" = "xyes" + then + GPROF=1 + PROFILING="gprof" + fi + fi @@ -8331,10 +8250,11 @@ CPROF=0 # Check whether --enable-cprof or --disable-cprof was given. if test "${enable_cprof+set}" = set; then enableval="$enable_cprof" - if test "x$enable_cprof" = "xyes"; + if test "x$enable_cprof" = "xyes" then LDFLAGS="${LDFLAGS} -lcprof" CPROF=1 + PROFILING="cprof" fi fi @@ -8345,7 +8265,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:8349: checking for pth_init in -lpth" >&5 +echo "configure:8269: 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 @@ -8353,7 +8273,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpth $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8288: \"$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 @@ -8392,7 +8312,7 @@ else fi cat > conftest.$ac_ext < EOF @@ -8418,7 +8338,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:8422: checking for st_init in -lst" >&5 +echo "configure:8342: 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 @@ -8426,7 +8346,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lst $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8361: \"$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 @@ -8465,7 +8385,7 @@ else fi cat > conftest.$ac_ext < EOF @@ -8486,7 +8406,8 @@ rm -f conftest* fi -LDFLAGS="${LDFLAGS} ${THREAD_LIB}" +vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}" +plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}" # Check whether --enable-plugins or --disable-plugins was given. if test "${enable_plugins+set}" = set; then @@ -8515,6 +8436,10 @@ cat >> confdefs.h <> confdefs.h <> confdefs.h < defines pthread_cond_t.)]) +AC_EGREP_HEADER(pthread_once,pthread.h,[ + AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1, + Define if defines pthread_once.)]) AC_EGREP_HEADER(strncasecmp,strings.h,[ AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1, Define if defines strncasecmp.)]) dnl Check for headers -AC_CHECK_HEADERS(getopt.h strings.h) +AC_CHECK_HEADERS(stdint.h getopt.h strings.h) AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h) AC_CHECK_HEADERS(dlfcn.h image.h) AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h) @@ -254,17 +271,17 @@ fi dnl Check for -W or -w flags AC_CACHE_CHECK([if \$CC accepts -Wall -Winline], [ac_cv_c_Wall_Winline], - [CFLAGS="${save_CFLAGS} -Wall -Winline" + [CFLAGS="-Wall -Winline ${save_CFLAGS}" AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)]) if test x"$ac_cv_c_Wall_Winline" != x"no"; then - save_CFLAGS="${save_CFLAGS} -Wall -Winline" + save_CFLAGS="-Wall -Winline ${save_CFLAGS}" else AC_CACHE_CHECK([if \$CC accepts -wall -winline], [ac_cv_c_wall_winline], - [CFLAGS="${save_CFLAGS} -wall -winline" + [CFLAGS="-wall -winline ${save_CFLAGS}" AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)]) if test x"$ac_cv_c_wall_winline" != x"no"; then - save_CFLAGS="${save_CFLAGS} -wall -winline" + save_CFLAGS="-wall -winline ${save_CFLAGS}" fi fi @@ -376,36 +393,6 @@ if test x"$ac_cv_c_attribute_aligned" != x"0"; then [$ac_cv_c_attribute_aligned],[Maximum supported data alignment]) fi -dnl End of the bizarre compilation tests -CFLAGS="${save_CFLAGS}" -CPPFLAGS="${save_CPPFLAGS}" -LDFLAGS="${save_LDFLAGS}" - -dnl Check for boolean_t -AC_CACHE_CHECK([for boolean_t in sys/types.h], - [ac_cv_c_boolean_t_sys_types_h], - [AC_TRY_COMPILE([#include ], [boolean_t foo;], - ac_cv_c_boolean_t_sys_types_h=yes, ac_cv_c_boolean_t_sys_types_h=no)]) -if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then - AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if defines boolean_t.) -fi - -AC_CACHE_CHECK([for boolean_t in pthread.h], - [ac_cv_c_boolean_t_pthread_h], - [AC_TRY_COMPILE([#include ], [boolean_t foo;], - ac_cv_c_boolean_t_pthread_h=yes, ac_cv_c_boolean_t_pthread_h=no)]) -if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then - AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if defines boolean_t.) -fi - -AC_CACHE_CHECK([for boolean_t in cthreads.h], - [ac_cv_c_boolean_t_cthreads_h], - [AC_TRY_COMPILE([#include ], [boolean_t foo;], - ac_cv_c_boolean_t_cthreads_h=yes, ac_cv_c_boolean_t_cthreads_h=no)]) -if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then - AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if defines boolean_t.) -fi - dnl dnl Check the CPU dnl @@ -421,8 +408,8 @@ esac dnl dnl default modules dnl -BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec" -PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope" +BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix mpeg_adec ac3_adec mpeg_vdec" +PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_audio mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga" dnl dnl Accelerated modules @@ -435,7 +422,8 @@ ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec" AC_CACHE_CHECK([if \$CC groks MMX inline assembly], [ac_cv_mmx_inline], - [AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));], + [CFLAGS="${save_CFLAGS}" + AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));], ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)]) if test x"$ac_cv_mmx_inline" != x"no"; then ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}" @@ -443,7 +431,8 @@ fi AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly], [ac_cv_mmxext_inline], - [AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));], + [CFLAGS="${save_CFLAGS}" + AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));], ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)]) if test x"$ac_cv_mmxext_inline" != x"no"; then ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}" @@ -451,7 +440,8 @@ fi AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], - [AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));], + [CFLAGS="${save_CFLAGS}" + AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));], ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)]) if test x"$ac_cv_3dnow_inline" != x"no"; then AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.) @@ -460,29 +450,29 @@ fi AC_CACHE_CHECK([if \$CC groks SSE inline assembly], [ac_cv_sse_inline], - [AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));], + [CFLAGS="${save_CFLAGS}" + AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));], ac_cv_sse_inline=yes, ac_cv_sse_inline=no)]) if test x"$ac_cv_sse_inline" != x"no" -a x$SYS != xmingw32; then AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.) ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}" fi -# don't try to grok altivec with native mingw32 it doesn't work right now +# don't try to grok AltiVec with native mingw32 it doesn't work right now # we should be able to remove this test with future versions of mingw32 if test x$SYS != xmingw32; then -AC_CACHE_CHECK([if \$CC groks Altivec inline assembly], +AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly], [ac_cv_altivec_inline], - [AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");], + [CFLAGS="${save_CFLAGS}" + AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");], ac_cv_altivec_inline=yes, - [save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Wa,-m7400" + [CFLAGS="$save_CFLAGS -Wa,-m7400" AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");], [ac_cv_altivec_inline="-Wa,-m7400"], ac_cv_altivec_inline=no) - CFLAGS=$save_CFLAGS ])]) if test x"$ac_cv_altivec_inline" != x"no"; then - AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.) + AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.) if test x"$ac_cv_altivec_inline" != x"yes"; then idctaltivec_CFLAGS="$idctaltivec_CFLAGS $ac_cv_altivec_inline" motionaltivec_CFLAGS="$motionaltivec_CFLAGS $ac_cv_altivec_inline" @@ -492,10 +482,9 @@ if test x"$ac_cv_altivec_inline" != x"no"; then ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" fi -AC_CACHE_CHECK([if \$CC groks Altivec C extensions], +AC_CACHE_CHECK([if \$CC groks AltiVec C extensions], [ac_cv_c_altivec], - [save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -faltivec" + [CFLAGS="$save_CFLAGS -faltivec" # Darwin test AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));], ac_cv_c_altivec=-faltivec, [ @@ -504,10 +493,9 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions], AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));], [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no) ]) - CFLAGS=$save_CFLAGS ]) if test x"$ac_cv_c_altivec" != x"no"; then - AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C altivec extensions.) + AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.) idctaltivec_CFLAGS="$idctaltivec_CFLAGS $ac_cv_c_altivec" motionaltivec_CFLAGS="$motionaltivec_CFLAGS $ac_cv_c_altivec" memcpyaltivec_CFLAGS="$memcpyaltivec_CFLAGS $ac_cv_c_altivec" @@ -517,10 +505,8 @@ fi AC_CACHE_CHECK([if linker needs -framework vecLib], [ac_cv_ld_altivec], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -framework vecLib" + [LDFLAGS="$vlc_LDFLAGS -framework vecLib" AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no) - LDFLAGS=$save_LDFLAGS ]) if test x"$ac_cv_ld_altivec" != x"no"; then idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib" @@ -555,7 +541,7 @@ dnl if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386 then ARCH="${ARCH} mmx" - BUILTINS="${BUILTINS} ${ACCEL_MODULES}" + PLUGINS="${PLUGINS} ${ACCEL_MODULES}" fi dnl @@ -570,7 +556,7 @@ dnl dnl AltiVec acceleration dnl AC_ARG_ENABLE(altivec, -[ --disable-altivec disable altivec optimizations (default enabled on PPC)], +[ --disable-altivec disable AltiVec optimizations (default enabled on PPC)], [ if test x$enable_altivec = xyes; then ARCH="${ARCH} altivec"; BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ], [ if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec"; @@ -685,6 +671,7 @@ then fi CPPFLAGS="$save_CPPFLAGS $test_CFLAGS" AC_CHECK_HEADERS(dvdread/dvd_reader.h, [ + CFLAGS="${save_CFLAGS}" AC_TRY_COMPILE([#include ], [void foo() { int i=DVD_VIDEO_LB_LEN; }],[ PLUGINS="${PLUGINS} dvdread" @@ -785,6 +772,7 @@ dnl ipv6 plugin - not for QNX yet dnl if test x$SYS != xnto && test "x$SYS" != "xmingw32" then + CFLAGS="$save_CFLAGS" AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"]) fi if test "x$SYS" = "xmingw32" @@ -856,18 +844,14 @@ then AC_MSG_ERROR([the specified tree doesn't have mad.h]) fi else - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS $mad_CFLAGS" - LDFLAGS="$LDFLAGS $mad_LDFLAGS" + CFLAGS="$vlc_CFLAGS $mad_CFLAGS" + LDFLAGS="$vlc_LDFLAGS $mad_LDFLAGS" AC_CHECK_HEADERS(mad.h, , [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ]) AC_CHECK_LIB(mad, mad_bit_init, [ PLUGINS="${PLUGINS} mad" mad_LDFLAGS="${mad_LDFLAGS} -lmad" ], [ AC_MSG_ERROR([Cannot find libmad library...]) ]) - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS fi fi @@ -1043,11 +1027,9 @@ if test x$enable_xvideo != xno && if test x$x_libraries = xNONE; then x_libraries=/usr/X11R6/lib fi - save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$save_CPPFLAGS -I$x_includes" AC_CHECK_HEADERS(X11/extensions/Xv.h, [ - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext" + CFLAGS="$save_CFLAGS -L$x_libraries -lX11 -lXext" AC_CHECK_LIB(Xv_pic,XvSetPortAttribute, # We have Xv_pic, that's good, we can build an xvideo.so plugin ! PLUGINS="${PLUGINS} xvideo" @@ -1057,7 +1039,6 @@ if test x$enable_xvideo != xno && BUILTINS="${BUILTINS} xvideo" xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv" xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes") - CFLAGS="$save_CFLAGS" ] CPPFLAGS="$save_CPPFLAGS") fi @@ -1548,18 +1529,26 @@ fi dnl dnl Profiling dnl +PROFILING=0 + GPROF=0 AC_ARG_ENABLE(gprof, [ --enable-gprof gprof profiling (default disabled)], -[ if test "x$enable_gprof" = "xyes"; then GPROF=1; fi ]) +[ if test "x$enable_gprof" = "xyes" + then + GPROF=1 + PROFILING="gprof" + fi +]) CPROF=0 AC_ARG_ENABLE(cprof, [ --enable-cprof cprof profiling (default disabled)], -[ if test "x$enable_cprof" = "xyes"; +[ if test "x$enable_cprof" = "xyes" then LDFLAGS="${LDFLAGS} -lcprof" CPROF=1 + PROFILING="cprof" fi ]) @@ -1591,7 +1580,8 @@ AC_ARG_ENABLE(st, fi]) ]) -LDFLAGS="${LDFLAGS} ${THREAD_LIB}" +vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}" +plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}" dnl dnl Plug-ins - this must be AT THE END @@ -1619,6 +1609,7 @@ dnl Stuff used by the program dnl AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN", [Simple version string]) AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN", [Copyright string]) +AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "$CONFIGURE_LINE", [The ./configure command line]) VLC_SYMBOL="`echo ${VERSION} | tr .- __`" AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__MODULE_$VLC_SYMBOL", [String suffix for module functions]) @@ -1629,6 +1620,13 @@ AC_SUBST(DATA_PATH) PLUGIN_PATH="${ac_tool_prefix}/share/videolan" AC_SUBST(PLUGIN_PATH) +dnl +dnl Restore *FLAGS +dnl +CPPFLAGS="${save_CPPFLAGS}" +CFLAGS="${save_CFLAGS}" +LDFLAGS="${save_LDFLAGS}" + dnl dnl Configuration is finished dnl @@ -1739,7 +1737,7 @@ optimizations : ${OPTIMS} tuning : ${TUNING} debug mode : ${DEBUG} release : ${RELEASE} -cprof/gprof support : ${CPROF}/${GPROF} +profiling : ${PROFILING} need builtin getopt : ${NEED_GETOPT} built-in modules :${BUILTINS} plug-in modules :${PLUGINS} diff --git a/debian/rules b/debian/rules index ec32dd2f2d..0795f2184f 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,7 @@ export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk # Remove --without-dvdcss here in non-totalitarian countries export DVDCSS_FLAGS="--enable-dvd --without-dvdcss" -export VIDDIR="usr/share/videolan" +export VIDDIR="usr/share/vlc" export PIXDIR="usr/share/pixmaps" export GNOMEDIR="usr/share/gnome/apps/Multimedia" @@ -61,8 +61,8 @@ install: build esac ;\ for alias in $$ARCH_ALIASES ; do \ ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \ - mv debian/vlc/usr/lib/videolan/vlc/$$alias.so \ - debian/vlc-$$alias/usr/lib/videolan/vlc/ ; done + mv debian/vlc/usr/lib/vlc/$$alias.so \ + debian/vlc-$$alias/usr/lib/vlc/ ; done mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/ mv debian/vlc/usr/bin/gnome-vlc debian/vlc-gnome/usr/bin/ diff --git a/debian/vlc-aa.dirs b/debian/vlc-aa.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-aa.dirs +++ b/debian/vlc-aa.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-alsa.dirs b/debian/vlc-alsa.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-alsa.dirs +++ b/debian/vlc-alsa.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-arts.dirs b/debian/vlc-arts.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-arts.dirs +++ b/debian/vlc-arts.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-esd.dirs b/debian/vlc-esd.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-esd.dirs +++ b/debian/vlc-esd.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-ggi.dirs b/debian/vlc-ggi.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-ggi.dirs +++ b/debian/vlc-ggi.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-glide.dirs b/debian/vlc-glide.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-glide.dirs +++ b/debian/vlc-glide.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-gnome.dirs b/debian/vlc-gnome.dirs index 6ecbbcbc51..3656746551 100644 --- a/debian/vlc-gnome.dirs +++ b/debian/vlc-gnome.dirs @@ -1,7 +1,7 @@ usr/bin -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc usr/share/gnome/apps/Multimedia usr/share/man/man1 usr/share/pixmaps -usr/share/videolan +usr/share/vlc diff --git a/debian/vlc-gnome.menu b/debian/vlc-gnome.menu index e934b5481a..f9a39a9b2f 100644 --- a/debian/vlc-gnome.menu +++ b/debian/vlc-gnome.menu @@ -1,3 +1,3 @@ ?package(vlc-gnome):command="/usr/bin/gnome-vlc" hotkey="V" needs="X11" \ section="Apps/Viewers" title="Gnome VideoLAN Client" \ - icon="/usr/share/videolan/gnome-vlc.xpm" hints="Video" + icon="/usr/share/vlc/gnome-vlc.xpm" hints="Video" diff --git a/debian/vlc-gtk.dirs b/debian/vlc-gtk.dirs index 6ecbbcbc51..3656746551 100644 --- a/debian/vlc-gtk.dirs +++ b/debian/vlc-gtk.dirs @@ -1,7 +1,7 @@ usr/bin -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc usr/share/gnome/apps/Multimedia usr/share/man/man1 usr/share/pixmaps -usr/share/videolan +usr/share/vlc diff --git a/debian/vlc-gtk.menu b/debian/vlc-gtk.menu index 8642ab3a75..d40504d724 100644 --- a/debian/vlc-gtk.menu +++ b/debian/vlc-gtk.menu @@ -1,3 +1,3 @@ ?package(vlc-gtk):command="/usr/bin/gvlc" hotkey="V" needs="X11" \ section="Apps/Viewers" title="Gtk+ VideoLAN Client" \ - icon="/usr/share/videolan/gvlc.xpm" hints="Video" + icon="/usr/share/vlc/gvlc.xpm" hints="Video" diff --git a/debian/vlc-kde.dirs b/debian/vlc-kde.dirs index 71c5e3e62a..308555845e 100644 --- a/debian/vlc-kde.dirs +++ b/debian/vlc-kde.dirs @@ -1,6 +1,6 @@ usr/bin -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc usr/share/man/man1 usr/share/pixmaps -usr/share/videolan +usr/share/vlc diff --git a/debian/vlc-kde.menu b/debian/vlc-kde.menu index 5d17e1071f..5e588d562c 100644 --- a/debian/vlc-kde.menu +++ b/debian/vlc-kde.menu @@ -1,3 +1,3 @@ ?package(vlc-kde):command="/usr/bin/kvlc" hotkey="V" needs="X11" \ section="Apps/Viewers" title="KDE VideoLAN Client" \ - icon="/usr/share/videolan/kvlc.xpm" hints="Video" + icon="/usr/share/vlc/kvlc.xpm" hints="Video" diff --git a/debian/vlc-lirc.dirs b/debian/vlc-lirc.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-lirc.dirs +++ b/debian/vlc-lirc.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-mad.dirs b/debian/vlc-mad.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-mad.dirs +++ b/debian/vlc-mad.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc-qt.dirs b/debian/vlc-qt.dirs index 71c5e3e62a..308555845e 100644 --- a/debian/vlc-qt.dirs +++ b/debian/vlc-qt.dirs @@ -1,6 +1,6 @@ usr/bin -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc usr/share/man/man1 usr/share/pixmaps -usr/share/videolan +usr/share/vlc diff --git a/debian/vlc-qt.menu b/debian/vlc-qt.menu index 7168abb99f..15cedecb4c 100644 --- a/debian/vlc-qt.menu +++ b/debian/vlc-qt.menu @@ -1,3 +1,3 @@ ?package(vlc-qt):command="/usr/bin/qvlc" hotkey="V" needs="X11" \ section="Apps/Viewers" title="Qt VideoLAN Client" \ - icon="/usr/share/videolan/qvlc.xpm" hints="Video" + icon="/usr/share/vlc/qvlc.xpm" hints="Video" diff --git a/debian/vlc-sdl.dirs b/debian/vlc-sdl.dirs index 490355785e..db077d30f0 100644 --- a/debian/vlc-sdl.dirs +++ b/debian/vlc-sdl.dirs @@ -1,2 +1,2 @@ -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc diff --git a/debian/vlc.dirs b/debian/vlc.dirs index 5b8cfb3868..1c4cd9d5e4 100644 --- a/debian/vlc.dirs +++ b/debian/vlc.dirs @@ -1,7 +1,7 @@ usr/bin -usr/lib/videolan/vlc +usr/lib/vlc usr/share/doc/vlc usr/share/gnome/apps/Multimedia usr/share/pixmaps -usr/share/videolan +usr/share/vlc usr/share/man/man1 diff --git a/debian/vlc.menu b/debian/vlc.menu index 6e29defbcf..697dd1c381 100644 --- a/debian/vlc.menu +++ b/debian/vlc.menu @@ -1,3 +1,3 @@ ?package(vlc):command="/usr/bin/vlc" hotkey="V" needs="X11" \ section="Apps/Viewers" title="VideoLAN Client" \ - icon="/usr/share/videolan/vlc.xpm" hints="Video" + icon="/usr/share/vlc/vlc.xpm" hints="Video" diff --git a/include/ac3_downmix.h b/include/ac3_downmix.h index 8dede4cfdd..07183896ed 100644 --- a/include/ac3_downmix.h +++ b/include/ac3_downmix.h @@ -2,7 +2,7 @@ * ac3_downmix.h : AC3 downmix types ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_downmix.h,v 1.3 2001/05/15 16:19:42 sam Exp $ + * $Id: ac3_downmix.h,v 1.4 2002/06/01 12:31:57 sam Exp $ * * Authors: Michel Kaempf * Renaud Dartus @@ -22,15 +22,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -typedef struct dm_par_s { +struct dm_par_s { float unit; float clev; float slev; -} dm_par_t; +}; -typedef struct downmix_s { +struct downmix_s { /* Module used and shortcuts */ - struct module_s * p_module; + module_t * p_module; void (*pf_downmix_3f_2r_to_2ch)(float *, dm_par_t * dm_par); void (*pf_downmix_3f_1r_to_2ch)(float *, dm_par_t * dm_par); void (*pf_downmix_2f_2r_to_2ch)(float *, dm_par_t * dm_par); @@ -38,5 +38,5 @@ typedef struct downmix_s { void (*pf_downmix_3f_0r_to_2ch)(float *, dm_par_t * dm_par); void (*pf_stream_sample_2ch_to_s16)(s16 *, float *left, float *right); void (*pf_stream_sample_1ch_to_s16)(s16 *, float *center); -} downmix_t; +}; diff --git a/include/ac3_imdct.h b/include/ac3_imdct.h index cbc8a44c20..22972bc469 100644 --- a/include/ac3_imdct.h +++ b/include/ac3_imdct.h @@ -2,7 +2,7 @@ * ac3_imdct.h : AC3 IMDCT types ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_imdct.h,v 1.7 2002/04/05 01:05:22 gbazin Exp $ + * $Id: ac3_imdct.h,v 1.8 2002/06/01 12:31:57 sam Exp $ * * Authors: Michel Kaempf * Renaud Dartus @@ -22,14 +22,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -typedef struct complex_s { +struct complex_s { float real; float imag; -} complex_t; +}; #define N 512 -typedef struct imdct_s +struct imdct_s { complex_t * buf; void * buf_orig; /* pointer before memalign */ @@ -69,13 +69,12 @@ typedef struct imdct_s void * w_1_orig; /* pointer before memalign */ /* Module used and shortcuts */ - struct module_s * p_module; - void (*pf_imdct_init) (struct imdct_s *); + module_t * p_module; + void (*pf_imdct_init) ( imdct_t * ); //void (*pf_fft_64p) (complex_t *a); - void (*pf_imdct_256)(struct imdct_s *, float data[], float delay[]); - void (*pf_imdct_256_nol)(struct imdct_s *, float data[], float delay[]); - void (*pf_imdct_512)(struct imdct_s *, float data[], float delay[]); - void (*pf_imdct_512_nol)(struct imdct_s *, float data[], float delay[]); - -} imdct_t; + void (*pf_imdct_256) ( imdct_t *, float [], float [] ); + void (*pf_imdct_256_nol) ( imdct_t *, float [], float [] ); + void (*pf_imdct_512) ( imdct_t *, float [], float [] ); + void (*pf_imdct_512_nol) ( imdct_t *, float [], float [] ); +}; diff --git a/include/audio_output.h b/include/audio_output.h index beba49e063..9e56780210 100644 --- a/include/audio_output.h +++ b/include/audio_output.h @@ -2,7 +2,7 @@ * audio_output.h : audio output thread interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: audio_output.h,v 1.46 2002/04/24 00:36:24 sam Exp $ + * $Id: audio_output.h,v 1.47 2002/06/01 12:31:57 sam Exp $ * * Authors: Michel Kaempf * Cyril Deguet @@ -22,27 +22,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -/***************************************************************************** - * aout_bank_t, p_aout_bank (global variable) - ***************************************************************************** - * This global variable is accessed by any function using the audio output. - *****************************************************************************/ -typedef struct aout_bank_s -{ - /* Array to all the audio outputs */ - struct aout_thread_s *pp_aout[ AOUT_MAX_THREADS ]; - - int i_count; - vlc_mutex_t lock; /* Global lock */ - -} aout_bank_t; - -#ifndef __PLUGIN__ -extern aout_bank_t *p_aout_bank; -#else -# define p_aout_bank (p_symbols->p_aout_bank) -#endif - /***************************************************************************** * aout_increment_t ***************************************************************************** @@ -72,7 +51,7 @@ typedef struct aout_increment_s /***************************************************************************** * aout_fifo_t *****************************************************************************/ -typedef struct aout_fifo_s +struct aout_fifo_s { /* See the fifo formats below */ int i_format; @@ -80,7 +59,7 @@ typedef struct aout_fifo_s int i_rate; int i_frame_size; - boolean_t b_die; + vlc_bool_t b_die; int i_fifo; /* Just to keep track of the fifo index */ vlc_mutex_t data_lock; @@ -93,11 +72,11 @@ typedef struct aout_fifo_s * audio data. It it also the first frame in the current timestamped frame * area, ie the first dated frame in the decoded part of the buffer. :-p */ int i_start_frame; - boolean_t b_start_frame; + vlc_bool_t b_start_frame; /* The next frame is the end frame of the current timestamped frame area, * ie the first dated frame after the start frame. */ int i_next_frame; - boolean_t b_next_frame; + vlc_bool_t b_next_frame; /* The end frame is the first frame, after the start frame, that doesn't * contain decoded audio data. That's why the end frame is the first frame * where the audio decoder can store its decoded audio frames. */ @@ -113,8 +92,7 @@ typedef struct aout_fifo_s /* The following variable is used to store the number of remaining audio * units in the current timestamped frame area. */ int i_units; - -} aout_fifo_t; +}; #define AOUT_FIFO_ISEMPTY( fifo ) \ ( (fifo).i_end_frame == (fifo).i_start_frame ) @@ -133,22 +111,20 @@ typedef struct aout_fifo_s /***************************************************************************** * aout_thread_t : audio output thread descriptor *****************************************************************************/ -typedef struct aout_thread_s +struct aout_thread_s { - vlc_thread_t thread_id; - boolean_t b_die; - boolean_t b_active; + VLC_COMMON_MEMBERS vlc_mutex_t fifos_lock; aout_fifo_t fifo[ AOUT_MAX_FIFOS ]; /* Plugin used and shortcuts to access its capabilities */ - struct module_s * p_module; - int ( *pf_open ) ( p_aout_thread_t ); - int ( *pf_setformat ) ( p_aout_thread_t ); - int ( *pf_getbufinfo ) ( p_aout_thread_t, int ); - void ( *pf_play ) ( p_aout_thread_t, byte_t *, int ); - void ( *pf_close ) ( p_aout_thread_t ); + module_t * p_module; + int ( *pf_open ) ( aout_thread_t * ); + int ( *pf_setformat ) ( aout_thread_t * ); + int ( *pf_getbufinfo ) ( aout_thread_t * , int ); + void ( *pf_play ) ( aout_thread_t * , byte_t *, int ); + void ( *pf_close ) ( aout_thread_t * ); void * buffer; /* The s32 buffer is used to mix all the audio fifos together before @@ -178,9 +154,8 @@ typedef struct aout_thread_s /* there might be some useful private structure, such as audio_buf_info * for the OSS output */ - p_aout_sys_t p_sys; - -} aout_thread_t; + aout_sys_t * p_sys; +}; /* Those are from but are needed because of formats * on other platforms */ @@ -207,18 +182,10 @@ typedef struct aout_thread_s /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -void aout_InitBank ( void ); -void aout_EndBank ( void ); +aout_thread_t * aout_CreateThread ( vlc_object_t *, int, int ); +void aout_DestroyThread ( aout_thread_t * ); -aout_thread_t * aout_CreateThread ( int *, int, int ); -void aout_DestroyThread ( aout_thread_t *, int * ); - -aout_fifo_t * aout_CreateFifo ( int, int, int, int, void * ); -void aout_DestroyFifo ( aout_fifo_t *p_fifo ); +VLC_EXPORT( aout_fifo_t *, aout_CreateFifo, ( vlc_object_t *, int, int, int, int, void * ) ); +VLC_EXPORT( void, aout_DestroyFifo, ( aout_fifo_t *p_fifo ) ); void aout_FreeFifo ( aout_fifo_t *p_fifo ); -#else -# define aout_CreateFifo p_symbols->aout_CreateFifo -# define aout_DestroyFifo p_symbols->aout_DestroyFifo -#endif diff --git a/include/config.h b/include/config.h index a37badb4c3..055b2ba7bf 100644 --- a/include/config.h +++ b/include/config.h @@ -51,9 +51,9 @@ #ifdef SYS_BEOS # define CONFIG_DIR "config/settings" #elif defined( WIN32 ) -# define CONFIG_DIR "videolan" +# define CONFIG_DIR "vlc" #else -# define CONFIG_DIR ".videolan" +# define CONFIG_DIR ".vlc" #endif #define CONFIG_FILE "vlcrc" @@ -266,4 +266,4 @@ /* Maximal size of the message queue - in case of overflow, all messages in the * queue are printed, but not sent to the threads */ -#define INTF_MSG_QSIZE 256 +#define VLC_MSG_QSIZE 256 diff --git a/include/configuration.h b/include/configuration.h index 1e2f3aca81..095e463176 100644 --- a/include/configuration.h +++ b/include/configuration.h @@ -4,7 +4,7 @@ * It includes functions allowing to declare, get or set configuration options. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: configuration.h,v 1.11 2002/05/30 08:17:04 gbazin Exp $ + * $Id: configuration.h,v 1.12 2002/06/01 12:31:57 sam Exp $ * * Authors: Gildas Bazin * @@ -45,7 +45,7 @@ #define MODULE_CONFIG_ITEM 0x00F0 -typedef struct module_config_s +struct module_config_s { int i_type; /* Configuration type */ char *psz_name; /* Option name */ @@ -55,49 +55,43 @@ typedef struct module_config_s char *psz_value; /* Option value */ int i_value; /* Option value */ float f_value; /* Option value */ - void *p_callback; /* Function to call when commiting a change */ - vlc_mutex_t *p_lock; /* lock to use when modifying the config */ - boolean_t b_dirty; /* Dirty flag to indicate a config change */ -} module_config_t; + /* Function to call when commiting a change */ + void ( * pf_callback ) ( vlc_object_t * ); + + vlc_mutex_t *p_lock; /* lock to use when modifying the config */ + vlc_bool_t b_dirty; /* Dirty flag to indicate a config change */ +}; /***************************************************************************** * Prototypes - these methods are used to get, set or manipulate configuration * data. *****************************************************************************/ -#ifndef __PLUGIN__ -int config_GetIntVariable( const char *psz_name ); -float config_GetFloatVariable( const char *psz_name ); -char * config_GetPszVariable( const char *psz_name ); -void config_PutIntVariable( const char *psz_name, int i_value ); -void config_PutFloatVariable( const char *psz_name, float f_value ); -void config_PutPszVariable( const char *psz_name, char *psz_value ); - -int config_LoadConfigFile( const char *psz_module_name ); -int config_SaveConfigFile( const char *psz_module_name ); -char * config_GetHomeDir( void ); -int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], - boolean_t b_ignore_errors ); - -module_config_t *config_Duplicate ( module_config_t * ); -module_config_t *config_FindConfig ( const char * ); -void config_SetCallbacks ( module_config_t *, module_config_t * ); -void config_UnsetCallbacks( module_config_t * ); - -#else -# define config_GetIntVariable p_symbols->config_GetIntVariable -# define config_PutIntVariable p_symbols->config_PutIntVariable -# define config_GetFloatVariable p_symbols->config_GetFloatVariable -# define config_PutFloatVariable p_symbols->config_PutFloatVariable -# define config_GetPszVariable p_symbols->config_GetPszVariable -# define config_PutPszVariable p_symbols->config_PutPszVariable -# define config_LoadConfigFile p_symbols->config_LoadConfigFile -# define config_SaveConfigFile p_symbols->config_SaveConfigFile -# define config_Duplicate p_symbols->config_Duplicate -# define config_FindConfig p_symbols->config_FindConfig -# define config_SetCallbacks p_symbols->config_SetCallbacks -# define config_UnsetCallbacks p_symbols->config_UnsetCallbacks -#endif +VLC_EXPORT( int, __config_GetInt, (vlc_object_t *, const char *) ); +VLC_EXPORT( void, __config_PutInt, (vlc_object_t *, const char *, int) ); +VLC_EXPORT( float, __config_GetFloat, (vlc_object_t *, const char *) ); +VLC_EXPORT( void, __config_PutFloat, (vlc_object_t *, const char *, float) ); +VLC_EXPORT( char *, __config_GetPsz, (vlc_object_t *, const char *) ); +VLC_EXPORT( void, __config_PutPsz, (vlc_object_t *, const char *, char *) ); + +VLC_EXPORT( int, config_LoadCmdLine, ( vlc_object_t *, int *, char *[], vlc_bool_t ) ); +VLC_EXPORT( char *, config_GetHomeDir, ( void ) ); +VLC_EXPORT( int, config_LoadConfigFile, ( vlc_object_t *, const char * ) ); +VLC_EXPORT( int, config_SaveConfigFile, ( vlc_object_t *, const char * ) ); +VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char *psz_name ) ); + +VLC_EXPORT( void, config_Duplicate, ( module_t *, module_config_t * ) ); + void config_Free ( module_t * ); + +VLC_EXPORT( void, config_SetCallbacks, ( module_config_t *, module_config_t * ) ); +VLC_EXPORT( void, config_UnsetCallbacks, ( module_config_t * ) ); + +#define config_GetInt(a,b) __config_GetInt(CAST_TO_VLC_OBJECT(a),b) +#define config_PutInt(a,b,c) __config_PutInt(CAST_TO_VLC_OBJECT(a),b,c) +#define config_GetFloat(a,b) __config_GetFloat(CAST_TO_VLC_OBJECT(a),b) +#define config_PutFloat(a,b,c) __config_PutFloat(CAST_TO_VLC_OBJECT(a),b,c) +#define config_GetPsz(a,b) __config_GetPsz(CAST_TO_VLC_OBJECT(a),b) +#define config_PutPsz(a,b,c) __config_PutPsz(CAST_TO_VLC_OBJECT(a),b,c) /***************************************************************************** * Macros used to build the configuration structure. diff --git a/include/defs.h.in b/include/defs.h.in index 8f9f18935f..ca5075311b 100644 --- a/include/defs.h.in +++ b/include/defs.h.in @@ -268,6 +268,9 @@ /* Define if you have the header file. */ #undef HAVE_STDDEF_H +/* Define if you have the header file. */ +#undef HAVE_STDINT_H + /* Define if you have the header file. */ #undef HAVE_STDLIB_H @@ -344,6 +347,9 @@ /* Define if defines pthread_cond_t. */ #undef PTHREAD_COND_T_IN_PTHREAD_H +/* Define if defines pthread_once. */ +#undef PTHREAD_ONCE_IN_PTHREAD_H + /* Define if defines strncasecmp. */ #undef STRNCASECMP_IN_STRINGS_H @@ -365,25 +371,16 @@ /* Maximum supported data alignment */ #undef ATTRIBUTE_ALIGNED_MAX -/* Define if defines boolean_t. */ -#undef BOOLEAN_T_IN_SYS_TYPES_H - -/* Define if defines boolean_t. */ -#undef BOOLEAN_T_IN_PTHREAD_H - -/* Define if defines boolean_t. */ -#undef BOOLEAN_T_IN_CTHREADS_H - /* Define if $CC groks 3D Now! inline assembly. */ #undef CAN_COMPILE_3DNOW /* Define if $CC groks SSE inline assembly. */ #undef CAN_COMPILE_SSE -/* Define if $CC groks ALTIVEC inline assembly. */ +/* Define if $CC groks AltiVec inline assembly. */ #undef CAN_COMPILE_ALTIVEC -/* Define if your compiler groks C altivec extensions. */ +/* Define if your compiler groks C AltiVec extensions. */ #undef CAN_COMPILE_C_ALTIVEC /* For FreeBSD VCD support */ @@ -407,6 +404,9 @@ /* Copyright string */ #undef COPYRIGHT_MESSAGE +/* The ./configure command line */ +#undef CONFIGURE_LINE + /* String suffix for module functions */ #undef MODULE_SUFFIX diff --git a/include/input_ext-dec.h b/include/input_ext-dec.h index 9851ed8ece..e646571ad1 100644 --- a/include/input_ext-dec.h +++ b/include/input_ext-dec.h @@ -2,7 +2,7 @@ * input_ext-dec.h: structures exported to the VideoLAN decoders ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_ext-dec.h,v 1.59 2002/05/24 12:42:14 gbazin Exp $ + * $Id: input_ext-dec.h,v 1.60 2002/06/01 12:31:57 sam Exp $ * * Authors: Christophe Massiot * Michel Kaempf @@ -22,6 +22,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ +#ifndef _VLC_INPUT_EXT_DEC_H +#define _VLC_INPUT_EXT_DEC_H 1 + /* ES streams types - see ISO/IEC 13818-1 table 2-29 numbers */ #define MPEG1_VIDEO_ES 0x01 #define MPEG2_VIDEO_ES 0x02 @@ -45,22 +48,22 @@ ***************************************************************************** * Describe a data packet. *****************************************************************************/ -typedef struct data_packet_s +struct data_packet_s { /* Used to chain the packets that carry data for a same PES or PSI */ - struct data_packet_s * p_next; + data_packet_t * p_next; /* start of the PS or TS packet */ - byte_t * p_demux_start; + byte_t * p_demux_start; /* start of the PES payload in this packet */ - byte_t * p_payload_start; - byte_t * p_payload_end; /* guess ? :-) */ + byte_t * p_payload_start; + byte_t * p_payload_end; /* guess ? :-) */ /* is the packet messed up ? */ - boolean_t b_discard_payload; + vlc_bool_t b_discard_payload; /* pointer to the real data */ - struct data_buffer_s * p_buffer; -} data_packet_t; + data_buffer_t * p_buffer; +}; /***************************************************************************** * pes_packet_t @@ -68,55 +71,58 @@ typedef struct data_packet_s * Describes an PES packet, with its properties, and pointers to the TS packets * containing it. *****************************************************************************/ -typedef struct pes_packet_s +struct pes_packet_s { /* Chained list to the next PES packet (depending on the context) */ - struct pes_packet_s * p_next; + pes_packet_t * p_next; /* PES properties */ - boolean_t b_data_alignment; /* used to find the beginning of - * a video or audio unit */ - boolean_t b_discontinuity; /* This packet doesn't follow the - * previous one */ + vlc_bool_t b_data_alignment; /* used to find the beginning of + * a video or audio unit */ + vlc_bool_t b_discontinuity; /* This packet doesn't follow the + * previous one */ - mtime_t i_pts; /* PTS for this packet (zero if unset) */ - mtime_t i_dts; /* DTS for this packet (zero if unset) */ - int i_rate; /* current pace of reading - * (see stream_control.h) */ + mtime_t i_pts; /* PTS for this packet (zero if unset) */ + mtime_t i_dts; /* DTS for this packet (zero if unset) */ + int i_rate; /* current reading pace (see stream_control.h) */ - unsigned int i_pes_size; /* size of the current PES packet */ + unsigned int i_pes_size; /* size of the current PES packet */ /* Chained list to packets */ - data_packet_t * p_first; /* The first packet contained by this + data_packet_t * p_first; /* The first packet contained by this * PES (used by decoders). */ - data_packet_t * p_last; /* The last packet contained by this - PES (used by the buffer allocator) */ - unsigned int i_nb_data; /* Number of data packets in the chained - list */ -} pes_packet_t; + data_packet_t * p_last; /* The last packet contained by this + * PES (used by the buffer allocator) */ + unsigned int i_nb_data; /* Number of data packets in the chained list */ +}; /***************************************************************************** * decoder_fifo_t ***************************************************************************** * This rotative FIFO contains PES packets that are to be decoded. *****************************************************************************/ -typedef struct decoder_fifo_s +struct decoder_fifo_s { + VLC_COMMON_MEMBERS + /* Thread structures */ - vlc_mutex_t data_lock; /* fifo data lock */ - vlc_cond_t data_wait; /* fifo data conditional variable */ + vlc_mutex_t data_lock; /* fifo data lock */ + vlc_cond_t data_wait; /* fifo data conditional variable */ /* Data */ - pes_packet_t * p_first; - pes_packet_t ** pp_last; - int i_depth; /* number of PES packets in the stack */ + pes_packet_t * p_first; + pes_packet_t ** pp_last; + int i_depth; /* number of PES packets in the stack */ /* Communication interface between input and decoders */ - boolean_t b_die; /* the decoder should return now */ - boolean_t b_error; /* the decoder is in an error loop */ - struct input_buffers_s *p_packets_mgt; /* packets management services - * data */ -} decoder_fifo_t; + input_buffers_t *p_packets_mgt; /* packets management services data */ + + /* Standard pointers given to the decoders as a toolbox. */ + u16 i_id; + u8 i_type; + void * p_demux_data; + stream_ctrl_t * p_stream_ctrl; +}; /***************************************************************************** * bit_fifo_t : bit fifo descriptor @@ -144,31 +150,30 @@ typedef struct bit_fifo_s * This type, based on a PES stream, includes all the structures needed to * handle the input stream like a bit stream. *****************************************************************************/ -typedef struct bit_stream_s +struct bit_stream_s { /* * Bit structures */ - bit_fifo_t fifo; + bit_fifo_t fifo; /* * Input structures */ /* The decoder fifo contains the data of the PES stream */ - decoder_fifo_t * p_decoder_fifo; + decoder_fifo_t * p_decoder_fifo; /* Callback to the decoder used when changing data packets ; set * to NULL if your decoder doesn't need it. */ - void (* pf_bitstream_callback)( struct bit_stream_s *, - boolean_t b_new_pes ); + void (* pf_bitstream_callback)( bit_stream_t *, vlc_bool_t ); /* Optional argument to the callback */ - void * p_callback_arg; + void * p_callback_arg; /* * PTS retrieval */ - mtime_t i_pts, i_dts; - byte_t * p_pts_validity; + mtime_t i_pts, i_dts; + byte_t * p_pts_validity; /* * Byte structures @@ -182,7 +187,7 @@ typedef struct bit_stream_s /* Temporary buffer in case we're not aligned when changing data packets */ WORD_TYPE i_showbits_buffer; data_packet_t showbits_data; -} bit_stream_t; +}; /***************************************************************************** * Inline functions used by the decoders to read bit_stream_t @@ -213,26 +218,13 @@ typedef struct bit_stream_s /***************************************************************************** * Prototypes from input_ext-dec.c *****************************************************************************/ -#ifndef __PLUGIN__ -void InitBitstream ( struct bit_stream_s *, struct decoder_fifo_s *, - void (* pf_bitstream_callback)( struct bit_stream_s *, - boolean_t ), - void * p_callback_arg ); -boolean_t NextDataPacket( struct decoder_fifo_s *, struct data_packet_s ** ); -void BitstreamNextDataPacket( struct bit_stream_s * ); -u32 UnalignedShowBits( struct bit_stream_s *, unsigned int ); -void UnalignedRemoveBits( struct bit_stream_s * ); -u32 UnalignedGetBits( struct bit_stream_s *, unsigned int ); -void CurrentPTS( struct bit_stream_s *, mtime_t *, mtime_t * ); -#else -# define InitBitstream p_symbols->InitBitstream -# define NextDataPacket p_symbols->NextDataPacket -# define BitstreamNextDataPacket p_symbols->BitstreamNextDataPacket -# define UnalignedShowBits p_symbols->UnalignedShowBits -# define UnalignedRemoveBits p_symbols->UnalignedRemoveBits -# define UnalignedGetBits p_symbols->UnalignedGetBits -# define CurrentPTS p_symbols->CurrentPTS -#endif +VLC_EXPORT( void, InitBitstream, ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) ); +VLC_EXPORT( vlc_bool_t, NextDataPacket, ( decoder_fifo_t *, data_packet_t ** ) ); +VLC_EXPORT( void, BitstreamNextDataPacket, ( bit_stream_t * ) ); +VLC_EXPORT( u32, UnalignedShowBits, ( bit_stream_t *, unsigned int ) ); +VLC_EXPORT( void, UnalignedRemoveBits, ( bit_stream_t * ) ); +VLC_EXPORT( u32, UnalignedGetBits, ( bit_stream_t *, unsigned int ) ); +VLC_EXPORT( void, CurrentPTS, ( bit_stream_t *, mtime_t *, mtime_t * ) ); /***************************************************************************** * AlignWord : fill in the bit buffer so that the byte pointer be aligned @@ -265,8 +257,7 @@ static inline void AlignWord( bit_stream_t * p_bit_stream ) /***************************************************************************** * ShowBits : return i_bits bits from the bit stream *****************************************************************************/ -static inline u32 ShowBits( bit_stream_t * p_bit_stream, - unsigned int i_bits ) +static inline u32 ShowBits( bit_stream_t * p_bit_stream, unsigned int i_bits ) { if( p_bit_stream->fifo.i_available >= i_bits ) { @@ -361,8 +352,7 @@ static inline void RemoveBits32( bit_stream_t * p_bit_stream ) * GetBits : returns i_bits bits from the bit stream and removes them * XXX: do not use for 32 bits, see GetBits32 *****************************************************************************/ -static inline u32 GetBits( bit_stream_t * p_bit_stream, - unsigned int i_bits ) +static inline u32 GetBits( bit_stream_t * p_bit_stream, unsigned int i_bits ) { u32 i_result; @@ -493,14 +483,16 @@ static inline void GetChunk( bit_stream_t * p_bit_stream, if( (i_available = p_bit_stream->p_end - p_bit_stream->p_byte) >= i_buf_len ) { - FAST_MEMCPY( p_buffer, p_bit_stream->p_byte, i_buf_len ); + p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer, + p_bit_stream->p_byte, i_buf_len ); p_bit_stream->p_byte += i_buf_len; } else { do { - FAST_MEMCPY( p_buffer, p_bit_stream->p_byte, i_available ); + p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer, + p_bit_stream->p_byte, i_available ); p_bit_stream->p_byte = p_bit_stream->p_end; p_buffer += i_available; i_buf_len -= i_available; @@ -513,7 +505,8 @@ static inline void GetChunk( bit_stream_t * p_bit_stream, if( i_buf_len ) { - FAST_MEMCPY( p_buffer, p_bit_stream->p_byte, i_buf_len ); + p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer, + p_bit_stream->p_byte, i_buf_len ); p_bit_stream->p_byte += i_buf_len; } } @@ -529,27 +522,9 @@ static inline void GetChunk( bit_stream_t * p_bit_stream, * Communication interface between input and decoders */ -/***************************************************************************** - * decoder_config_t - ***************************************************************************** - * Standard pointers given to the decoders as a toolbox. - *****************************************************************************/ -typedef struct decoder_config_s -{ - u16 i_id; - u8 i_type; /* type of the elementary stream */ - - void * p_demux_data; - struct stream_ctrl_s * p_stream_ctrl; - struct decoder_fifo_s * p_decoder_fifo; -} decoder_config_t; - /***************************************************************************** * Prototypes from input_dec.c *****************************************************************************/ -#ifndef __PLUGIN__ -void DecoderError ( struct decoder_fifo_s * p_fifo ); -#else -# define DecoderError p_symbols->DecoderError -#endif +VLC_EXPORT( void, DecoderError, ( decoder_fifo_t * p_fifo ) ); +#endif /* "input_ext-dec.h" */ diff --git a/include/input_ext-intf.h b/include/input_ext-intf.h index 0f278b9d24..99762b9b17 100644 --- a/include/input_ext-intf.h +++ b/include/input_ext-intf.h @@ -4,7 +4,7 @@ * control the pace of reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: input_ext-intf.h,v 1.66 2002/04/25 02:10:33 jobi Exp $ + * $Id: input_ext-intf.h,v 1.67 2002/06/01 12:31:57 sam Exp $ * * Authors: Christophe Massiot * @@ -23,6 +23,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ +#ifndef _VLC_INPUT_EXT_INTF_H +#define _VLC_INPUT_EXT_INTF_H 1 + /* * Communication input -> interface */ @@ -34,39 +37,18 @@ #define OFFSETTOTIME_MAX_SIZE 10 -/***************************************************************************** - * input_bank_t, p_input_bank (global variable) - ***************************************************************************** - * This global variable is accessed by any function using the input. - *****************************************************************************/ -typedef struct input_bank_s -{ - /* Array to all the input threads */ - struct input_thread_s *pp_input[ INPUT_MAX_THREADS ]; - - int i_count; - vlc_mutex_t lock; /* Global lock */ - -} input_bank_t; - -#ifndef __PLUGIN__ -extern input_bank_t *p_input_bank; -#else -# define p_input_bank (p_symbols->p_input_bank) -#endif - /***************************************************************************** * es_descriptor_t: elementary stream descriptor ***************************************************************************** * Describes an elementary stream, and includes fields required to handle and * demultiplex this elementary stream. *****************************************************************************/ -typedef struct es_descriptor_s +struct es_descriptor_s { u16 i_id; /* stream ID for PS, PID for TS */ u8 i_stream_id; /* stream ID defined in the PES */ u8 i_type; /* stream type */ - boolean_t b_audio; /* is the stream an audio stream that + vlc_bool_t b_audio; /* is the stream an audio stream that * will need to be discarded with * fast forward and slow motion ? */ u8 i_cat; /* stream category: video, audio, @@ -79,25 +61,22 @@ typedef struct es_descriptor_s /* Demultiplexer information */ void * p_demux_data; - struct pgrm_descriptor_s * - p_pgrm; /* very convenient in the demultiplexer */ + pgrm_descriptor_t * p_pgrm; /* very convenient in the demultiplexer */ /* PES parser information */ - struct pes_packet_s * p_pes; /* Current PES */ + pes_packet_t * p_pes; /* Current PES */ int i_pes_real_size; /* as indicated by the header */ /* Decoder information */ - struct decoder_fifo_s * p_decoder_fifo; + decoder_fifo_t * p_decoder_fifo; vlc_thread_t thread_id; /* ID of the decoder */ count_t c_packets; /* total packets read */ count_t c_invalid_packets; /* invalid packets read */ /* Module properties */ - struct module_s * p_module; - struct decoder_config_s * p_config; - -} es_descriptor_t; + module_t * p_module; +}; /* Special PID values - note that the PID is only on 13 bits, and that values * greater than 0x1fff have no meaning in a stream */ @@ -119,12 +98,12 @@ typedef struct es_descriptor_s * Describes a program and list associated elementary streams. It is build by * the PSI decoder upon the informations carried in program map sections *****************************************************************************/ -typedef struct pgrm_descriptor_s +struct pgrm_descriptor_s { /* Program characteristics */ u16 i_number; /* program number */ u8 i_version; /* version number */ - boolean_t b_is_ok; /* Is the description up to date ? */ + vlc_bool_t b_is_ok; /* Is the description up to date ? */ /* Service Descriptor (program name) - DVB extension */ u8 i_srv_type; @@ -145,7 +124,7 @@ typedef struct pgrm_descriptor_s int i_es_number; /* size of the following array */ es_descriptor_t ** pp_es; /* array of pointers to ES */ -} pgrm_descriptor_t; +}; /* Synchro states */ #define SYNCHRO_OK 0 @@ -157,7 +136,7 @@ typedef struct pgrm_descriptor_s ***************************************************************************** * Attributes for current area (title for DVD) *****************************************************************************/ -typedef struct input_area_s +struct input_area_s { /* selected area attributes */ int i_id; /* identificator for area */ @@ -178,7 +157,7 @@ typedef struct input_area_s /* offset to plugin related data */ off_t i_plugin_data; -} input_area_t; +}; /***************************************************************************** * stream_descriptor_t @@ -186,10 +165,10 @@ typedef struct input_area_s * Describes a stream and list its associated programs. Build upon * the information carried in program association sections (for instance) *****************************************************************************/ -typedef struct stream_descriptor_s +struct stream_descriptor_s { u16 i_stream_id; /* stream id */ - boolean_t b_changed; /* if stream has been changed, + vlc_bool_t b_changed; /* if stream has been changed, we have to inform the interface */ vlc_mutex_t stream_lock; /* to be taken every time you read * or modify stream, pgrm or es */ @@ -197,8 +176,8 @@ typedef struct stream_descriptor_s /* Input method data */ int i_method; /* input method for stream: file, disc or network */ - boolean_t b_pace_control; /* can we read when we want ? */ - boolean_t b_seekable; /* can we do lseek() ? */ + vlc_bool_t b_pace_control; /* can we read when we want ? */ + vlc_bool_t b_seekable; /* can we do lseek() ? */ /* if (b_seekable) : */ int i_area_nb; @@ -241,7 +220,21 @@ typedef struct stream_descriptor_s /* Statistics */ count_t c_packets_read; /* packets read */ count_t c_packets_trashed; /* trashed packets */ -} stream_descriptor_t; +}; + +/***************************************************************************** + * stream_position_t + ***************************************************************************** + * Describes the current position in the stream. + *****************************************************************************/ +struct stream_position_s +{ + off_t i_tell; /* actual location in the area (in arbitrary units) */ + off_t i_size; /* total size of the area (in arbitrary units) */ + + u32 i_mux_rate; /* the rate we read the stream (in + * units of 50 bytes/s) ; 0 if undef */ +}; #define MUTE_NO_CHANGE -1 @@ -250,57 +243,53 @@ typedef struct stream_descriptor_s ***************************************************************************** * This structure includes all the local static variables of an input thread *****************************************************************************/ -typedef struct input_thread_s +struct input_thread_s { + VLC_COMMON_MEMBERS + /* Thread properties and locks */ - boolean_t b_die; /* 'die' flag */ - boolean_t b_error; - boolean_t b_eof; - vlc_thread_t thread_id; /* id for thread functions */ + vlc_bool_t b_eof; int i_status; /* status flag */ /* Access module */ - struct module_s * p_access_module; - int (* pf_open)( struct input_thread_s * ); - void (* pf_close)( struct input_thread_s * ); - ssize_t (* pf_read) ( struct input_thread_s *, - byte_t *, size_t ); - int (* pf_set_program)( struct input_thread_s *, - struct pgrm_descriptor_s * ); - int (* pf_set_area)( struct input_thread_s *, - struct input_area_s * ); - void (* pf_seek)( struct input_thread_s *, off_t ); - void * p_access_data; - size_t i_mtu; + module_t * p_access_module; + int (* pf_open ) ( input_thread_t * ); + void (* pf_close )( input_thread_t * ); + ssize_t (* pf_read ) ( input_thread_t *, byte_t *, size_t ); + int (* pf_set_program )( input_thread_t *, pgrm_descriptor_t * ); + int (* pf_set_area )( input_thread_t *, input_area_t * ); + void (* pf_seek ) ( input_thread_t *, off_t ); + void * p_access_data; + size_t i_mtu; /* Demux module */ - struct module_s * p_demux_module; - int (* pf_init)( struct input_thread_s * ); - void (* pf_end)( struct input_thread_s * ); - int (* pf_demux)( struct input_thread_s * ); - int (* pf_rewind)( struct input_thread_s * ); + module_t * p_demux_module; + int (* pf_init ) ( input_thread_t * ); + void (* pf_end ) ( input_thread_t * ); + int (* pf_demux ) ( input_thread_t * ); + int (* pf_rewind ) ( input_thread_t * ); /* NULL if we don't support going * * backwards (it's gonna be fun) */ - void * p_demux_data; /* data of the demux */ + void * p_demux_data; /* data of the demux */ /* Buffer manager */ - struct input_buffers_s *p_method_data; /* data of the packet manager */ - struct data_buffer_s * p_data_buffer; - byte_t * p_current_data; - byte_t * p_last_data; - size_t i_bufsize; + input_buffers_t *p_method_data; /* data of the packet manager */ + data_buffer_t * p_data_buffer; + byte_t * p_current_data; + byte_t * p_last_data; + size_t i_bufsize; /* General stream description */ stream_descriptor_t stream; /* Playlist item */ - char * psz_source; - char * psz_access; - char * psz_demux; - char * psz_name; + char * psz_source; + char * psz_access; + char * psz_demux; + char * psz_name; - count_t c_loops; -} input_thread_t; + count_t c_loops; +}; /* Input methods */ /* The first figure is a general method that can be used in interface plugins ; @@ -325,39 +314,40 @@ typedef struct input_thread_s #define INPUT_STATUS_FASTER 3 #define INPUT_STATUS_SLOWER 4 +/* Seek modes */ +#define INPUT_SEEK_SET 0x00 +#define INPUT_SEEK_CUR 0x01 +#define INPUT_SEEK_END 0x02 +#define INPUT_SEEK_BYTES 0x00 +#define INPUT_SEEK_SECONDS 0x10 +#define INPUT_SEEK_PERCENT 0x20 + /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -void input_InitBank ( void ); -void input_EndBank ( void ); - -struct input_thread_s * input_CreateThread ( struct playlist_item_s *, - int *pi_status ); -void input_StopThread ( struct input_thread_s *, int *pi_status ); -void input_DestroyThread ( struct input_thread_s * ); - -void input_SetStatus ( struct input_thread_s *, int ); -void input_Seek ( struct input_thread_s *, off_t ); -void input_DumpStream ( struct input_thread_s * ); -char * input_OffsetToTime ( struct input_thread_s *, char *, off_t ); -int input_ChangeES ( struct input_thread_s *, - struct es_descriptor_s *, u8 ); -int input_ToggleES ( struct input_thread_s *, - struct es_descriptor_s *, boolean_t ); -int input_ChangeArea ( struct input_thread_s *, struct input_area_s * ); -int input_ChangeProgram ( struct input_thread_s *, u16 ); -int input_ToggleGrayscale( struct input_thread_s * ); -int input_ToggleMute ( struct input_thread_s * ); -int input_SetSMP ( struct input_thread_s *, int ); -#else -# define input_SetStatus p_symbols->input_SetStatus -# define input_Seek p_symbols->input_Seek -# define input_DumpStream p_symbols->input_DumpStream -# define input_OffsetToTime p_symbols->input_OffsetToTime -# define input_ChangeES p_symbols->input_ChangeES -# define input_ToggleES p_symbols->input_ToggleES -# define input_ChangeArea p_symbols->input_ChangeArea -# define input_ChangeProgram p_symbols->input_ChangeProgram -#endif +input_thread_t * input_CreateThread ( vlc_object_t *, + playlist_item_t *, int * ); +void input_StopThread ( input_thread_t *, int *pi_status ); +void input_DestroyThread ( input_thread_t * ); + +#define input_SetStatus(a,b) __input_SetStatus(CAST_TO_VLC_OBJECT(a),b) +VLC_EXPORT( void, __input_SetStatus, ( vlc_object_t *, int ) ); + +#define input_Seek(a,b,c) __input_Seek(CAST_TO_VLC_OBJECT(a),b,c) +VLC_EXPORT( void, __input_Seek, ( vlc_object_t *, off_t, int ) ); + +#define input_Tell(a,b) __input_Tell(CAST_TO_VLC_OBJECT(a),b) +VLC_EXPORT( void, __input_Tell, ( vlc_object_t *, stream_position_t * ) ); + +VLC_EXPORT( void, input_DumpStream, ( input_thread_t * ) ); +VLC_EXPORT( char *, input_OffsetToTime, ( input_thread_t *, char *, off_t ) ); +VLC_EXPORT( int, input_ChangeES, ( input_thread_t *, es_descriptor_t *, u8 ) ); +VLC_EXPORT( int, input_ToggleES, ( input_thread_t *, es_descriptor_t *, vlc_bool_t ) ); +VLC_EXPORT( int, input_ChangeArea, ( input_thread_t *, input_area_t * ) ); +VLC_EXPORT( int, input_ChangeProgram, ( input_thread_t *, u16 ) ); + +int input_ToggleGrayscale( input_thread_t * ); +int input_ToggleMute ( input_thread_t * ); +int input_SetSMP ( input_thread_t *, int ); +#endif /* "input_ext-intf.h" */ diff --git a/include/input_ext-plugins.h b/include/input_ext-plugins.h index 9a82cea845..c38afdaea3 100644 --- a/include/input_ext-plugins.h +++ b/include/input_ext-plugins.h @@ -3,7 +3,7 @@ * but exported to plug-ins ***************************************************************************** * Copyright (C) 1999-2002 VideoLAN - * $Id: input_ext-plugins.h,v 1.28 2002/05/18 17:47:46 sam Exp $ + * $Id: input_ext-plugins.h,v 1.29 2002/06/01 12:31:57 sam Exp $ * * Authors: Christophe Massiot * @@ -38,109 +38,56 @@ /***************************************************************************** * Prototypes from input_programs.c *****************************************************************************/ -#ifndef __PLUGIN__ -int input_InitStream( struct input_thread_s *, size_t ); -void input_EndStream ( struct input_thread_s * ); -struct pgrm_descriptor_s * input_FindProgram( struct input_thread_s *, u16 ); -struct pgrm_descriptor_s * input_AddProgram ( struct input_thread_s *, - u16, size_t ); -void input_DelProgram( struct input_thread_s *, struct pgrm_descriptor_s * ); -int input_SetProgram( struct input_thread_s *, struct pgrm_descriptor_s * ); -struct input_area_s * input_AddArea( struct input_thread_s * ); -void input_DelArea ( struct input_thread_s *, struct input_area_s * ); -struct es_descriptor_s * input_FindES( struct input_thread_s *, u16 ); -struct pgrm_descriptor_s * input_FindProgram( struct input_thread_s *, u16 ); -struct es_descriptor_s * input_AddES ( struct input_thread_s *, - struct pgrm_descriptor_s *, u16, - size_t ); -void input_DelES ( struct input_thread_s *, struct es_descriptor_s * ); -int input_SelectES ( struct input_thread_s *, struct es_descriptor_s * ); -int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * ); -#else -# define input_InitStream p_symbols->input_InitStream -# define input_EndStream p_symbols->input_EndStream -# define input_SetProgram p_symbols->input_SetProgram -# define input_FindES p_symbols->input_FindES -# define input_FindProgram p_symbols->input_FindProgram -# define input_AddES p_symbols->input_AddES -# define input_DelES p_symbols->input_DelES -# define input_SelectES p_symbols->input_SelectES -# define input_UnselectES p_symbols->input_UnselectES -# define input_AddProgram p_symbols->input_AddProgram -# define input_DelProgram p_symbols->input_DelProgram -# define input_AddArea p_symbols->input_AddArea -# define input_DelArea p_symbols->input_DelArea -#endif +VLC_EXPORT( int, input_InitStream,( input_thread_t *, size_t ) ); +VLC_EXPORT( void, input_EndStream, ( input_thread_t * ) ); +VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, u16 ) ); +VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, u16, size_t ) ); +VLC_EXPORT( void, input_DelProgram,( input_thread_t *, pgrm_descriptor_t * ) ); +VLC_EXPORT( int, input_SetProgram,( input_thread_t *, pgrm_descriptor_t * ) ); +VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t * ) ); +VLC_EXPORT( void, input_DelArea, ( input_thread_t *, input_area_t * ) ); +VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, u16 ) ); +VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, u16, size_t ) ); +VLC_EXPORT( void, input_DelES, ( input_thread_t *, es_descriptor_t * ) ); +VLC_EXPORT( int, input_SelectES, ( input_thread_t *, es_descriptor_t * ) ); +VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) ); /***************************************************************************** * Prototypes from input_dec.c *****************************************************************************/ -#ifndef __PLUGIN__ -//decoder_capabilities_s * input_ProbeDecoder( void ); -vlc_thread_t input_RunDecoder( struct input_thread_s *, - struct es_descriptor_s * ); -void input_EndDecoder( struct input_thread_s *, struct es_descriptor_s * ); -void input_DecodePES ( struct decoder_fifo_s *, struct pes_packet_s * ); -void input_EscapeDiscontinuity( struct input_thread_s * ); -void input_EscapeAudioDiscontinuity( struct input_thread_s * ); -#else -# define input_DecodePES p_symbols->input_DecodePES -#endif +//decoder_capabilities_t * input_ProbeDecoder( void ); +decoder_fifo_t * input_RunDecoder( input_thread_t *, es_descriptor_t * ); +void input_EndDecoder( input_thread_t *, es_descriptor_t * ); +VLC_EXPORT( void, input_DecodePES, ( decoder_fifo_t *, pes_packet_t * ) ); +void input_EscapeDiscontinuity( input_thread_t * ); +void input_EscapeAudioDiscontinuity( input_thread_t * ); /***************************************************************************** * Prototypes from input_clock.c *****************************************************************************/ -#ifndef __PLUGIN__ -void input_ClockInit( struct pgrm_descriptor_s * ); -int input_ClockManageControl( struct input_thread_s *, - struct pgrm_descriptor_s *, mtime_t ); -void input_ClockManageRef( struct input_thread_s *, - struct pgrm_descriptor_s *, mtime_t ); -mtime_t input_ClockGetTS( struct input_thread_s *, - struct pgrm_descriptor_s *, mtime_t ); -#else -# define input_ClockManageRef p_symbols->input_ClockManageRef -# define input_ClockManageControl p_symbols->input_ClockManageControl -# define input_ClockGetTS p_symbols->input_ClockGetTS -#endif +void input_ClockInit( pgrm_descriptor_t * ); +VLC_EXPORT( int, input_ClockManageControl, ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ); +VLC_EXPORT( void, input_ClockManageRef, ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ); +VLC_EXPORT( mtime_t, input_ClockGetTS, ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ); /***************************************************************************** * Prototypes from input_ext-plugins.h (buffers management) *****************************************************************************/ -#ifndef __PLUGIN__ -void * input_BuffersInit( void ); -void input_BuffersEnd( struct input_buffers_s * ); -struct data_buffer_s * input_NewBuffer( struct input_buffers_s *, size_t ); -void input_ReleaseBuffer( struct input_buffers_s *, struct data_buffer_s * ); -struct data_packet_s * input_ShareBuffer( struct input_buffers_s *, - struct data_buffer_s * ); -struct data_packet_s * input_NewPacket( struct input_buffers_s *, size_t ); -void input_DeletePacket( struct input_buffers_s *, struct data_packet_s * ); -struct pes_packet_s * input_NewPES( struct input_buffers_s * ); -void input_DeletePES( struct input_buffers_s *, struct pes_packet_s * ); -ssize_t input_FillBuffer( struct input_thread_s * ); -ssize_t input_Peek( struct input_thread_s *, byte_t **, size_t ); -ssize_t input_SplitBuffer( struct input_thread_s *, data_packet_t **, size_t ); -int input_AccessInit( struct input_thread_s * ); -void input_AccessReinit( struct input_thread_s * ); -void input_AccessEnd( struct input_thread_s * ); -#else -# define input_BuffersInit p_symbols->input_BuffersInit -# define input_BuffersEnd p_symbols->input_BuffersEnd -# define input_NewBuffer p_symbols->input_NewBuffer -# define input_ReleaseBuffer p_symbols->input_ReleaseBuffer -# define input_ShareBuffer p_symbols->input_ShareBuffer -# define input_NewPacket p_symbols->input_NewPacket -# define input_DeletePacket p_symbols->input_DeletePacket -# define input_NewPES p_symbols->input_NewPES -# define input_DeletePES p_symbols->input_DeletePES -# define input_FillBuffer p_symbols->input_FillBuffer -# define input_Peek p_symbols->input_Peek -# define input_SplitBuffer p_symbols->input_SplitBuffer -# define input_AccessInit p_symbols->input_AccessInit -# define input_AccessReinit p_symbols->input_AccessReinit -# define input_AccessEnd p_symbols->input_AccessEnd -#endif +VLC_EXPORT( void *, input_BuffersInit, ( vlc_object_t * ) ); +VLC_EXPORT( void, input_BuffersEnd, ( input_thread_t *, input_buffers_t * ) ); +VLC_EXPORT( data_buffer_t *, input_NewBuffer, ( input_buffers_t *, size_t ) ); +VLC_EXPORT( void, input_ReleaseBuffer, ( input_buffers_t *, data_buffer_t * ) ); +VLC_EXPORT( data_packet_t *, input_ShareBuffer, ( input_buffers_t *, data_buffer_t * ) ); +VLC_EXPORT( data_packet_t *, input_NewPacket, ( input_buffers_t *, size_t ) ); +VLC_EXPORT( void, input_DeletePacket, ( input_buffers_t *, data_packet_t * ) ); +VLC_EXPORT( pes_packet_t *, input_NewPES, ( input_buffers_t * ) ); +VLC_EXPORT( void, input_DeletePES, ( input_buffers_t *, pes_packet_t * ) ); +VLC_EXPORT( ssize_t, input_FillBuffer, ( input_thread_t * ) ); +VLC_EXPORT( ssize_t, input_Peek, ( input_thread_t *, byte_t **, size_t ) ); +VLC_EXPORT( ssize_t, input_SplitBuffer, ( input_thread_t *, data_packet_t **, size_t ) ); +VLC_EXPORT( int, input_AccessInit, ( input_thread_t * ) ); +VLC_EXPORT( void, input_AccessReinit, ( input_thread_t * ) ); +VLC_EXPORT( void, input_AccessEnd, ( input_thread_t * ) ); /***************************************************************************** * Create a NULL packet for padding in case of a data loss @@ -154,7 +101,7 @@ static inline void input_NullPacket( input_thread_t * p_input, if( (p_pad_data = input_NewPacket( p_input->p_method_data, PADDING_PACKET_SIZE )) == NULL ) { - intf_ErrMsg("input error: no new packet"); + msg_Err( p_input, "no new packet" ); p_input->b_error = 1; return; } @@ -174,7 +121,7 @@ static inline void input_NullPacket( input_thread_t * p_input, { if( (p_pes = input_NewPES( p_input->p_method_data )) == NULL ) { - intf_ErrMsg("input error: no PES packet"); + msg_Err( p_input, "no PES packet" ); p_input->b_error = 1; return; } @@ -216,7 +163,7 @@ typedef void( * psi_callback_t )( input_thread_t * p_input, data_packet_t * p_data, es_descriptor_t * p_es, - boolean_t b_unit_start ); + vlc_bool_t b_unit_start ); /***************************************************************************** @@ -236,13 +183,13 @@ typedef struct psi_section_s u16 i_read_in_section; /* the PSI is complete */ - boolean_t b_is_complete; + vlc_bool_t b_is_complete; /* packet missed up ? */ - boolean_t b_trash; + vlc_bool_t b_trash; /*about sections */ - boolean_t b_section_complete; + vlc_bool_t b_section_complete; /* where are we currently ? */ byte_t * p_current; @@ -254,7 +201,7 @@ typedef struct psi_section_s *****************************************************************************/ typedef struct es_ts_data_s { - boolean_t b_psi; /* Does the stream have to be handled by + vlc_bool_t b_psi; /* Does the stream have to be handled by * the PSI decoder ? */ int i_psi_type; /* There are different types of PSI */ @@ -291,7 +238,7 @@ typedef struct stream_ts_data_s *****************************************************************************/ typedef struct stream_ps_data_s { - boolean_t b_has_PSM; /* very rare, in fact */ + vlc_bool_t b_has_PSM; /* very rare, in fact */ u8 i_PSM_version; } stream_ps_data_t; @@ -303,27 +250,13 @@ typedef struct stream_ps_data_s /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -void input_ParsePES ( struct input_thread_s *, struct es_descriptor_s * ); -void input_GatherPES ( struct input_thread_s *, struct data_packet_s *, - struct es_descriptor_s *, boolean_t, boolean_t ); -ssize_t input_ReadPS ( struct input_thread_s *, struct data_packet_s ** ); -es_descriptor_t * input_ParsePS( struct input_thread_s *, - struct data_packet_s * ); -ssize_t input_ReadTS ( struct input_thread_s *, struct data_packet_s ** ); -void input_DemuxPS ( struct input_thread_s *, struct data_packet_s * ); -void input_DemuxTS ( struct input_thread_s *, struct data_packet_s *, - psi_callback_t ); -#else -# define input_ParsePES p_symbols->input_ParsePES -# define input_GatherPES p_symbols->input_GatherPES -# define input_ReadPS p_symbols->input_ReadPS -# define input_ParsePS p_symbols->input_ParsePS -# define input_DemuxPS p_symbols->input_DemuxPS -# define input_ReadTS p_symbols->input_ReadTS -# define input_DemuxTS p_symbols->input_DemuxTS -#endif - +VLC_EXPORT( void, input_ParsePES, ( input_thread_t *, es_descriptor_t * ) ); +VLC_EXPORT( void, input_GatherPES, ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t, vlc_bool_t ) ); +VLC_EXPORT( ssize_t, input_ReadPS, ( input_thread_t *, data_packet_t ** ) ); +VLC_EXPORT( es_descriptor_t *, input_ParsePS, ( input_thread_t *, data_packet_t * ) ); +VLC_EXPORT( ssize_t, input_ReadTS, ( input_thread_t *, data_packet_t ** ) ); +VLC_EXPORT( void, input_DemuxPS, ( input_thread_t *, data_packet_t * ) ); +VLC_EXPORT( void, input_DemuxTS, ( input_thread_t *, data_packet_t *, void(*) ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t ) ) ); /* * Optional standard file descriptor operations (input_ext-plugins.h) @@ -332,26 +265,18 @@ void input_DemuxTS ( struct input_thread_s *, struct data_packet_s *, /***************************************************************************** * input_socket_t: private access plug-in data *****************************************************************************/ -typedef struct input_socket_s +struct input_socket_s { /* Unbuffered file descriptor */ int i_handle; -} input_socket_t; +}; /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -void input_FDClose( struct input_thread_s * ); -void input_FDNetworkClose( struct input_thread_s * ); -ssize_t input_FDRead( input_thread_t *, byte_t *, size_t ); -ssize_t input_FDNetworkRead( input_thread_t *, byte_t *, size_t ); -void input_FDSeek( struct input_thread_s *, off_t ); -#else -# define input_FDClose p_symbols->input_FDClose -# define input_FDNetworkClose p_symbols->input_FDNetworkClose -# define input_FDRead p_symbols->input_FDRead -# define input_FDNetworkRead p_symbols->input_FDNetworkRead -# define input_FDSeek p_symbols->input_FDSeek -#endif +VLC_EXPORT( void, input_FDClose, ( input_thread_t * ) ); +VLC_EXPORT( void, input_FDNetworkClose, ( input_thread_t * ) ); +VLC_EXPORT( ssize_t, input_FDRead, ( input_thread_t *, byte_t *, size_t ) ); +VLC_EXPORT( ssize_t, input_FDNetworkRead, ( input_thread_t *, byte_t *, size_t ) ); +VLC_EXPORT( void, input_FDSeek, ( input_thread_t *, off_t ) ); diff --git a/include/interface.h b/include/interface.h index a688c423c9..2d463cb395 100644 --- a/include/interface.h +++ b/include/interface.h @@ -4,7 +4,7 @@ * interface, such as message output. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: interface.h,v 1.28 2002/04/24 00:36:24 sam Exp $ + * $Id: interface.h,v 1.29 2002/06/01 12:31:57 sam Exp $ * * Authors: Vincent Seguin * @@ -29,82 +29,40 @@ * This structe describes all interface-specific data of the main (interface) * thread. *****************************************************************************/ -typedef struct intf_thread_s +struct intf_thread_s { - boolean_t b_die; /* `die' flag */ + VLC_COMMON_MEMBERS + + /* Thread properties and locks */ + vlc_bool_t b_block; /* Specific interfaces */ - p_intf_console_t p_console; /* console */ - p_intf_sys_t p_sys; /* system interface */ + intf_console_t * p_console; /* console */ + intf_sys_t * p_sys; /* system interface */ /* Plugin used and shortcuts to access its capabilities */ - struct module_s * p_module; - int ( *pf_open ) ( struct intf_thread_s * ); - void ( *pf_close ) ( struct intf_thread_s * ); - void ( *pf_run ) ( struct intf_thread_s * ); - - /* Interface callback */ - void ( *pf_manage ) ( struct intf_thread_s * ); + module_t * p_module; + int ( *pf_open ) ( intf_thread_t * ); + void ( *pf_close ) ( intf_thread_t * ); + void ( *pf_run ) ( intf_thread_t * ); /* XXX: new message passing stuff will go here */ - vlc_mutex_t change_lock; - boolean_t b_menu_change; - boolean_t b_menu; - -} intf_thread_t; - -/***************************************************************************** - * msg_item_t - ***************************************************************************** - * Store a single message. Messages have a maximal size of INTF_MSG_MSGSIZE. - *****************************************************************************/ -typedef struct -{ - int i_type; /* message type, see below */ - char * psz_msg; /* the message itself */ - -#if 0 - mtime_t date; /* date of the message */ - char * psz_file; /* file in which the function was called */ - char * psz_function; /* function from which the function was called */ - int i_line; /* line at which the function was called */ -#endif -} msg_item_t; - -/* Message types */ -#define INTF_MSG_STD 0 /* standard message */ -#define INTF_MSG_ERR 1 /* error message */ -#define INTF_MSG_WARN 2 /* warning message */ -#define INTF_MSG_STAT 3 /* statistic message */ - -/***************************************************************************** - * intf_subscription_t - ***************************************************************************** - * Used by interface plugins which subscribe to the message queue. - *****************************************************************************/ -typedef struct intf_subscription_s -{ - int i_start; - int* pi_stop; - - msg_item_t* p_msg; - vlc_mutex_t* p_lock; -} intf_subscription_t; + vlc_mutex_t change_lock; + vlc_bool_t b_menu_change; + vlc_bool_t b_menu; +}; /***************************************************************************** * Prototypes *****************************************************************************/ -intf_thread_t * intf_Create ( void ); -void intf_Destroy ( intf_thread_t * p_intf ); +intf_thread_t * intf_Create ( vlc_object_t * ); +vlc_error_t intf_RunThread ( intf_thread_t * ); +void intf_StopThread ( intf_thread_t * ); +void intf_Destroy ( intf_thread_t * ); -void intf_MsgCreate ( void ); -void intf_MsgDestroy ( void ); +void msg_Create ( vlc_object_t * ); +void msg_Destroy ( vlc_object_t * ); -#ifndef __PLUGIN__ -intf_subscription_t* intf_MsgSub ( void ); -void intf_MsgUnsub ( intf_subscription_t * ); -#else -# define intf_MsgSub p_symbols->intf_MsgSub -# define intf_MsgUnsub p_symbols->intf_MsgUnsub -#endif +VLC_EXPORT( msg_subscription_t*, msg_Subscribe, ( vlc_object_t * ) ); +VLC_EXPORT( void, msg_Unsubscribe, ( vlc_object_t *, msg_subscription_t * ) ); diff --git a/include/intf_eject.h b/include/intf_eject.h index 0a65a6c762..7acf00cf56 100644 --- a/include/intf_eject.h +++ b/include/intf_eject.h @@ -2,7 +2,7 @@ * intf_eject.h: CD/DVD-ROM ejection handling functions ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: intf_eject.h,v 1.2 2002/04/24 00:36:24 sam Exp $ + * $Id: intf_eject.h,v 1.3 2002/06/01 12:31:57 sam Exp $ * * Author: Julien Blache * @@ -21,8 +21,5 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -#ifndef __PLUGIN__ -int intf_Eject( const char * ); -#else -# define intf_Eject p_symbols->intf_Eject -#endif +VLC_EXPORT( int, intf_Eject, ( vlc_object_t *, const char * ) ); + diff --git a/include/iso_lang.h b/include/iso_lang.h index 8b02b94aa3..2bdb7b51b8 100644 --- a/include/iso_lang.h +++ b/include/iso_lang.h @@ -2,7 +2,7 @@ * iso_lang.h: function to decode language code (in dvd or a52 for instance). ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: iso_lang.h,v 1.5 2002/05/20 22:36:42 sam Exp $ + * $Id: iso_lang.h,v 1.6 2002/06/01 12:31:57 sam Exp $ * * Author: Stéphane Borel * Arnaud de Bossoreille de Ribou @@ -31,15 +31,8 @@ struct iso639_lang_s char * psz_iso639_2B; /* ISO-639-2/B (3 characters) native code */ }; -#ifndef __PLUGIN__ -const iso639_lang_t * GetLang_1( const char * psz_iso639_1 ); -const iso639_lang_t * GetLang_2T( const char * psz_iso639_2T ); -const iso639_lang_t * GetLang_2B( const char * psz_iso639_2B ); -const char * DecodeLanguage( u16 ); -#else -# define GetLang_1 p_symbols->GetLang_1 -# define GetLang_2T p_symbols->GetLang_2T -# define GetLang_2B p_symbols->GetLang_2B -# define DecodeLanguage p_symbols->DecodeLanguage -#endif +VLC_EXPORT( const iso639_lang_t *, GetLang_1, ( const char * ) ); +VLC_EXPORT( const iso639_lang_t *, GetLang_2T, ( const char * ) ); +VLC_EXPORT( const iso639_lang_t *, GetLang_2B, ( const char * ) ); +VLC_EXPORT( const char *, DecodeLanguage, ( u16 ) ); diff --git a/include/main.h b/include/main.h index 1502b78478..9298bd587f 100644 --- a/include/main.h +++ b/include/main.h @@ -2,8 +2,8 @@ * main.h: access to all program variables * Declaration and extern access to global program object. ***************************************************************************** - * Copyright (C) 1999, 2000 VideoLAN - * $Id: main.h,v 1.35 2002/04/27 22:11:22 gbazin Exp $ + * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN + * $Id: main.h,v 1.36 2002/06/01 12:31:57 sam Exp $ * * Authors: Vincent Seguin * @@ -23,7 +23,7 @@ *****************************************************************************/ /***************************************************************************** - * main_t, p_main (global variable) + * vlc_t, p_vlc (global variable) ***************************************************************************** * This structure has an unique instance, declared in main and pointed by the * only global variable of the program. It should allow access to any variable @@ -32,26 +32,24 @@ * it when you can access the members you need in an other way. In fact, it * should only be used by interface thread. *****************************************************************************/ - -typedef struct main_s +struct vlc_s { - /* Private data */ - struct main_sys_s* p_sys; /* for system specific properties */ + VLC_COMMON_MEMBERS + + /* The vlc structure status */ + int i_status; /* Global properties */ int i_argc; /* command line arguments count */ char ** ppsz_argv; /* command line arguments */ - char * psz_arg0; /* program name (whithout path) */ char * psz_homedir; /* user's home directory */ u32 i_cpu_capabilities; /* CPU extensions */ - int i_warning_level; /* warning messages level */ - boolean_t b_stats; /* display statistics ? */ /* Generic settings */ - boolean_t b_audio; /* is audio output allowed ? */ - boolean_t b_video; /* is video output allowed ? */ - boolean_t b_stereo; + vlc_bool_t b_quiet; /* be quiet ? */ + vlc_bool_t b_verbose; /* info messages ? */ + vlc_bool_t b_color; /* color messages ? */ mtime_t i_desync; /* relative desync of the audio ouput */ /* Fast memcpy plugin used */ @@ -59,27 +57,27 @@ typedef struct main_s void* ( *pf_memcpy ) ( void *, const void *, size_t ); void* ( *pf_memset ) ( void *, int, size_t ); /* FIXME: unimplemented */ - /* Unique threads */ - p_intf_thread_t p_intf; /* main interface thread */ + /* The module bank */ + module_bank_t module_bank; + + /* The message bank */ + msg_bank_t msg_bank; - /* Shared data - these structures are accessed directly from p_main by + /* Shared data - these structures are accessed directly from p_vlc by * several modules */ - p_playlist_t p_playlist; /* playlist */ - p_intf_msg_t p_msg; /* messages interface data */ - p_input_channel_t p_channel; /* channel library data */ + intf_msg_t * p_msg; /* messages interface data */ + input_channel_t * p_channel; /* channel library data */ /* Locks */ vlc_mutex_t config_lock; /* lock for the config file */ -} main_t; + vlc_mutex_t structure_lock; /* lock for the p_vlc tree */ + int i_counter; /* object counter */ -#ifndef __PLUGIN__ -extern main_t *p_main; -#else -# define p_main (p_symbols->p_main) -#endif + /* Pointer to the big, evil global lock */ + vlc_mutex_t * p_global_lock; + void ** pp_global_data; + + /* Private data */ + main_sys_t* p_sys; /* for system specific properties */ +}; -/***************************************************************************** - * Fast memory operation module - *****************************************************************************/ -#define FAST_MEMCPY p_main->pf_memcpy -#define FAST_MEMSET p_main->pf_memset diff --git a/include/modules.h b/include/modules.h index 4380991228..969683af87 100644 --- a/include/modules.h +++ b/include/modules.h @@ -2,7 +2,7 @@ * modules.h : Module management functions. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules.h,v 1.51 2002/05/30 08:17:04 gbazin Exp $ + * $Id: modules.h,v 1.52 2002/06/01 12:31:57 sam Exp $ * * Authors: Samuel Hocevar * @@ -39,78 +39,70 @@ typedef void * module_handle_t; /***************************************************************************** * Module capabilities. *****************************************************************************/ -static inline char *GetCapabilityName( unsigned int i_capa ) -{ - /* The sole purpose of this inline function and the ugly #defines - * around it is to avoid having two places to modify when adding a - * new capability. */ - static char *pp_capa[] = - { - "main", #define MODULE_CAPABILITY_MAIN 0 /* Main */ - "interface", #define MODULE_CAPABILITY_INTF 1 /* Interface */ - "access", #define MODULE_CAPABILITY_ACCESS 2 /* Input */ - "demux", #define MODULE_CAPABILITY_DEMUX 3 /* Input */ - "network", #define MODULE_CAPABILITY_NETWORK 4 /* Network */ - "decoder", #define MODULE_CAPABILITY_DECODER 5 /* Audio or video decoder */ - "motion", #define MODULE_CAPABILITY_MOTION 6 /* Motion compensation */ - "iDCT", #define MODULE_CAPABILITY_IDCT 7 /* IDCT transformation */ - "audio output", #define MODULE_CAPABILITY_AOUT 8 /* Audio output */ - "video output", #define MODULE_CAPABILITY_VOUT 9 /* Video output */ - "chroma transformation", #define MODULE_CAPABILITY_CHROMA 10 /* colorspace conversion */ - "iMDCT", #define MODULE_CAPABILITY_IMDCT 11 /* IMDCT transformation */ - "downmix", #define MODULE_CAPABILITY_DOWNMIX 12 /* AC3 downmix */ - "memcpy", #define MODULE_CAPABILITY_MEMCPY 13 /* memcpy */ - "unknown" #define MODULE_CAPABILITY_MAX 14 /* Total number of capabilities */ - }; - return pp_capa[ (i_capa) > MODULE_CAPABILITY_MAX ? MODULE_CAPABILITY_MAX : - (i_capa) ]; -} +#define DECLARE_MODULE_CAPABILITY_TABLE \ + static const char *ppsz_capabilities[] = \ + { \ + "main", \ + "interface", \ + "access", \ + "demux", \ + "network", \ + "decoder", \ + "motion", \ + "iDCT", \ + "audio output", \ + "video output", \ + "chroma transformation", \ + "iMDCT", \ + "downmix", \ + "memcpy", \ + "unknown" \ + } + +#define MODULE_CAPABILITY( i_capa ) \ + ppsz_capabilities[ ((i_capa) > MODULE_CAPABILITY_MAX) ? \ + MODULE_CAPABILITY_MAX : (i_capa) ] /***************************************************************************** - * module_bank_t, p_module_bank (global variable) + * module_bank_t: the module bank ***************************************************************************** - * This global variable is accessed by any function using modules. + * This variable is accessed by any function using modules. *****************************************************************************/ -typedef struct module_bank_s +struct module_bank_s { - struct module_s * first; /* First module in the bank */ - int i_count; /* Number of allocated modules */ + module_t * first; /* First module in the bank */ + int i_count; /* Number of allocated modules */ - vlc_mutex_t lock; /* Global lock -- you can't imagine how awful * + vlc_mutex_t lock; /* Global lock -- you can't imagine how awful * it is to design thread-safe linked lists */ -} module_bank_t; - -#ifndef __PLUGIN__ -extern module_bank_t *p_module_bank; -#else -# define p_module_bank (p_symbols->p_module_bank) -#endif +}; /***************************************************************************** * Module description structure *****************************************************************************/ -typedef struct module_s +struct module_s { + VLC_COMMON_MEMBERS + /* * Variables set by the module to identify itself */ - char *psz_name; /* Module _unique_ name */ char *psz_longname; /* Module descriptive name */ /* @@ -124,12 +116,12 @@ typedef struct module_s u32 i_cpu_capabilities; /* Required CPU capabilities */ - struct module_functions_s *p_functions; /* Capability functions */ + module_functions_t *p_functions; /* Capability functions */ /* * Variables set by the module to store its config options */ - struct module_config_s *p_config; /* Module configuration structure */ + module_config_t *p_config; /* Module configuration structure */ vlc_mutex_t config_lock; /* lock used to modify the config */ unsigned int i_config_items; /* number of configuration items */ unsigned int i_bool_items; /* number of bool config items */ @@ -137,7 +129,7 @@ typedef struct module_s /* * Variables used internally by the module manager */ - boolean_t b_builtin; /* Set to true if the module is built in */ + vlc_bool_t b_builtin; /* Set to true if the module is built in */ union { @@ -150,7 +142,7 @@ typedef struct module_s struct { - int ( *pf_deactivate ) ( struct module_s * ); + int ( *pf_deactivate ) ( module_t * ); } builtin; @@ -159,15 +151,14 @@ typedef struct module_s int i_usage; /* Reference counter */ int i_unused_delay; /* Delay until module is unloaded */ - struct module_s *next; /* Next module */ - struct module_s *prev; /* Previous module */ + module_t *next; /* Next module */ + module_t *prev; /* Previous module */ /* * Symbol table we send to the module so that it can access vlc symbols */ - struct module_symbols_s *p_symbols; - -} module_t; + module_symbols_t *p_symbols; +}; /***************************************************************************** * Module functions description structure @@ -179,61 +170,57 @@ typedef struct function_list_s /* Interface plugin */ struct { - int ( * pf_open ) ( struct intf_thread_s * ); - void ( * pf_close )( struct intf_thread_s * ); - void ( * pf_run ) ( struct intf_thread_s * ); + int ( * pf_open ) ( intf_thread_t * ); + void ( * pf_close )( intf_thread_t * ); + void ( * pf_run ) ( intf_thread_t * ); } intf; /* Access plugin */ struct { - int ( * pf_open ) ( struct input_thread_s * ); - void ( * pf_close )( struct input_thread_s * ); - ssize_t ( * pf_read ) ( struct input_thread_s *, byte_t *, size_t ); - void ( * pf_seek ) ( struct input_thread_s *, off_t ); - int ( * pf_set_program ) ( struct input_thread_s *, - struct pgrm_descriptor_s * ); - int ( * pf_set_area ) ( struct input_thread_s *, - struct input_area_s * ); + int ( * pf_open ) ( input_thread_t * ); + void ( * pf_close ) ( input_thread_t * ); + ssize_t ( * pf_read ) ( input_thread_t *, byte_t *, size_t ); + void ( * pf_seek ) ( input_thread_t *, off_t ); + int ( * pf_set_program ) ( input_thread_t *, pgrm_descriptor_t * ); + int ( * pf_set_area ) ( input_thread_t *, input_area_t * ); } access; /* Demux plugin */ struct { - int ( * pf_init ) ( struct input_thread_s * ); - void ( * pf_end ) ( struct input_thread_s * ); - int ( * pf_demux )( struct input_thread_s * ); - int ( * pf_rewind ) ( struct input_thread_s * ); + int ( * pf_init ) ( input_thread_t * ); + void ( * pf_end ) ( input_thread_t * ); + int ( * pf_demux ) ( input_thread_t * ); + int ( * pf_rewind ) ( input_thread_t * ); } demux; /* Network plugin */ struct { - int ( * pf_open )( struct network_socket_s * ); + int ( * pf_open ) ( vlc_object_t *, network_socket_t * ); } network; /* Audio output plugin */ struct { - int ( * pf_open ) ( struct aout_thread_s * ); - int ( * pf_setformat ) ( struct aout_thread_s * ); - int ( * pf_getbufinfo ) ( struct aout_thread_s *, int ); - void ( * pf_play ) ( struct aout_thread_s *, byte_t *, int ); - void ( * pf_close ) ( struct aout_thread_s * ); + int ( * pf_open ) ( aout_thread_t * ); + int ( * pf_setformat ) ( aout_thread_t * ); + int ( * pf_getbufinfo ) ( aout_thread_t *, int ); + void ( * pf_play ) ( aout_thread_t *, byte_t *, int ); + void ( * pf_close ) ( aout_thread_t * ); } aout; /* Video output plugin */ struct { - int ( * pf_create ) ( struct vout_thread_s * ); - int ( * pf_init ) ( struct vout_thread_s * ); - void ( * pf_end ) ( struct vout_thread_s * ); - void ( * pf_destroy ) ( struct vout_thread_s * ); - int ( * pf_manage ) ( struct vout_thread_s * ); - void ( * pf_render ) ( struct vout_thread_s *, - struct picture_s * ); - void ( * pf_display ) ( struct vout_thread_s *, - struct picture_s * ); + int ( * pf_create ) ( vout_thread_t * ); + int ( * pf_init ) ( vout_thread_t * ); + void ( * pf_end ) ( vout_thread_t * ); + void ( * pf_destroy ) ( vout_thread_t * ); + int ( * pf_manage ) ( vout_thread_t * ); + void ( * pf_render ) ( vout_thread_t *, picture_t * ); + void ( * pf_display ) ( vout_thread_t *, picture_t * ); } vout; /* Motion compensation plugin */ @@ -261,34 +248,30 @@ typedef struct function_list_s /* Chroma transformation plugin */ struct { - int ( * pf_init ) ( struct vout_thread_s * ); - void ( * pf_end ) ( struct vout_thread_s * ); + int ( * pf_init ) ( vout_thread_t * ); + void ( * pf_end ) ( vout_thread_t * ); } chroma; /* IMDCT plugin */ struct { - void ( * pf_imdct_init ) ( struct imdct_s * ); - void ( * pf_imdct_256 ) ( struct imdct_s *, - float data[], float delay[] ); - void ( * pf_imdct_256_nol )( struct imdct_s *, - float data[], float delay[] ); - void ( * pf_imdct_512 ) ( struct imdct_s *, - float data[], float delay[] ); - void ( * pf_imdct_512_nol )( struct imdct_s *, - float data[], float delay[] ); -// void ( * pf_fft_64p ) ( struct complex_s * ); + void ( * pf_imdct_init ) ( imdct_t * ); + void ( * pf_imdct_256 ) ( imdct_t *, float [], float [] ); + void ( * pf_imdct_256_nol )( imdct_t *, float [], float [] ); + void ( * pf_imdct_512 ) ( imdct_t *, float [], float [] ); + void ( * pf_imdct_512_nol )( imdct_t *, float [], float [] ); +// void ( * pf_fft_64p ) ( complex_t * ); } imdct; /* AC3 downmix plugin */ struct { - void ( * pf_downmix_3f_2r_to_2ch ) ( float *, struct dm_par_s * ); - void ( * pf_downmix_3f_1r_to_2ch ) ( float *, struct dm_par_s * ); - void ( * pf_downmix_2f_2r_to_2ch ) ( float *, struct dm_par_s * ); - void ( * pf_downmix_2f_1r_to_2ch ) ( float *, struct dm_par_s * ); - void ( * pf_downmix_3f_0r_to_2ch ) ( float *, struct dm_par_s * ); + void ( * pf_downmix_3f_2r_to_2ch ) ( float *, dm_par_t * ); + void ( * pf_downmix_3f_1r_to_2ch ) ( float *, dm_par_t * ); + void ( * pf_downmix_2f_2r_to_2ch ) ( float *, dm_par_t * ); + void ( * pf_downmix_2f_1r_to_2ch ) ( float *, dm_par_t * ); + void ( * pf_downmix_3f_0r_to_2ch ) ( float *, dm_par_t * ); void ( * pf_stream_sample_2ch_to_s16 ) ( s16 *, float *, float * ); void ( * pf_stream_sample_1ch_to_s16 ) ( s16 *, float * ); @@ -298,7 +281,7 @@ typedef struct function_list_s struct { int ( * pf_probe)( u8 * p_es ); - int ( * pf_run ) ( struct decoder_config_s * p_config ); + int ( * pf_run ) ( decoder_fifo_t * p_fifo ); } dec; /* memcpy plugins */ @@ -312,7 +295,7 @@ typedef struct function_list_s } function_list_t; -typedef struct module_functions_s +struct module_functions_s { /* XXX: The order here has to be the same as above for the #defines */ function_list_t intf; @@ -328,26 +311,21 @@ typedef struct module_functions_s function_list_t imdct; function_list_t downmix; function_list_t memcpy; - -} module_functions_t; - -typedef struct module_functions_s * p_module_functions_t; +}; /***************************************************************************** * Exported functions. *****************************************************************************/ -#ifndef __PLUGIN__ -void module_InitBank ( void ); -void module_LoadMain ( void ); -void module_LoadBuiltins ( void ); -void module_LoadPlugins ( void ); -void module_EndBank ( void ); -void module_ResetBank ( void ); -void module_ManageBank ( void ); -module_t * module_Need ( int, char *, void * ); -void module_Unneed ( module_t * ); +void module_InitBank ( vlc_object_t * ); +void module_LoadMain ( vlc_object_t * ); +void module_LoadBuiltins ( vlc_object_t * ); +void module_LoadPlugins ( vlc_object_t * ); +void module_EndBank ( vlc_object_t * ); +void module_ResetBank ( vlc_object_t * ); +void module_ManageBank ( vlc_object_t * ); + +VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, int, char *, void * ) ); +VLC_EXPORT( void, module_Unneed, ( module_t * ) ); + +#define module_Need(a,b,c,d) __module_Need(CAST_TO_VLC_OBJECT(a),b,c,d) -#else -# define module_Need p_symbols->module_Need -# define module_Unneed p_symbols->module_Unneed -#endif diff --git a/include/modules_inner.h b/include/modules_inner.h index 4319d2d2eb..043d4426ff 100644 --- a/include/modules_inner.h +++ b/include/modules_inner.h @@ -2,7 +2,7 @@ * modules_inner.h : Macros used from within a module. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules_inner.h,v 1.22 2002/05/30 08:17:04 gbazin Exp $ + * $Id: modules_inner.h,v 1.23 2002/06/01 12:31:57 sam Exp $ * * Authors: Samuel Hocevar * @@ -22,10 +22,10 @@ *****************************************************************************/ /***************************************************************************** - * Check that we are within a module. + * If we are not within a module, assume we're in the vlc core. *****************************************************************************/ -#if !( defined( MODULE_NAME ) || defined( MAKE_DEP ) ) -# error "You must define MODULE_NAME before using modules_inner.h !" +#if !defined( __PLUGIN__ ) && !defined( __BUILTIN__ ) +# define MODULE_NAME main #endif /***************************************************************************** @@ -36,7 +36,6 @@ * * if user has #defined MODULE_NAME foo, then we will need: * #define MODULE_STRING "foo" - * #define MODULE_VAR(blah) "VLC_MODULE_foo_blah" * * and, if __BUILTIN__ is set, we will also need: * #define MODULE_FUNC( zog ) module_foo_zog @@ -51,16 +50,14 @@ #define CONCATENATE( y, z ) CRUDE_HACK( y, z ) #define CRUDE_HACK( y, z ) y##__MODULE_##z -#define MODULE_VAR( z ) "VLC_MODULE_" #z - /* If the module is built-in, then we need to define foo_InitModule instead * of InitModule. Same for Activate- and DeactivateModule. */ -#ifdef __BUILTIN__ +#if defined( __BUILTIN__ ) # define _M( function ) CONCATENATE( function, MODULE_NAME ) # define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME ) # define DECLARE_SYMBOLS ; # define STORE_SYMBOLS ; -#else +#elif defined( __PLUGIN__ ) # define _M( function ) function # define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_SYMBOL ) # define DECLARE_SYMBOLS module_symbols_t* p_symbols; @@ -80,9 +77,8 @@ int __VLC_SYMBOL( InitModule ) ( module_t *p_module ) \ { \ int i_shortcut = 1; \ - struct module_config_s* p_item; \ STORE_SYMBOLS; \ - p_module->psz_name = MODULE_STRING; \ + p_module->psz_object_name = MODULE_STRING; \ p_module->psz_longname = MODULE_STRING; \ p_module->psz_program = NULL; \ p_module->pp_shortcuts[ 0 ] = MODULE_STRING; \ @@ -93,31 +89,13 @@ #define MODULE_INIT_STOP \ } while( 0 ); \ p_module->pp_shortcuts[ i_shortcut ] = NULL; \ - p_module->i_config_items = p_module->i_bool_items = 0; \ - for( p_item = p_config; \ - p_item->i_type != MODULE_CONFIG_HINT_END; \ - p_item++ ) \ - { \ - if( p_item->i_type & MODULE_CONFIG_ITEM ) \ - p_module->i_config_items++; \ - if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL ) \ - p_module->i_bool_items++; \ - } \ - vlc_mutex_init( &p_module->config_lock ); \ - p_module->p_config = config_Duplicate( p_config ); \ + config_Duplicate( p_module, p_config ); \ if( p_module->p_config == NULL ) \ { \ - intf_ErrMsg( MODULE_STRING \ - " InitModule error: can't duplicate p_config" ); \ - return( -1 ); \ - } \ - for( p_item = p_module->p_config; \ - p_item->i_type != MODULE_CONFIG_HINT_END; \ - p_item++ ) \ - { \ - p_item->p_lock = &p_module->config_lock; \ +/*//X intf_Err( p_module, "InitModule can't duplicate p_config" );*/ \ + return -1; \ } \ - return( 0 ); \ + return 0; \ } #define ADD_CAPABILITY( cap, score ) \ @@ -158,7 +136,7 @@ #define MODULE_ACTIVATE_STOP \ } while( 0 ); \ - return( 0 ); \ + return 0; \ } /* @@ -175,5 +153,5 @@ #define MODULE_DEACTIVATE_STOP \ } while( 0 ); \ config_UnsetCallbacks( p_module->p_config ); \ - return( 0 ); \ + return 0; \ } diff --git a/include/mtime.h b/include/mtime.h index c435769a2a..8f779035aa 100644 --- a/include/mtime.h +++ b/include/mtime.h @@ -9,7 +9,7 @@ * Functions prototyped are implemented in interface/mtime.c. ***************************************************************************** * Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN - * $Id: mtime.h,v 1.11 2002/04/24 00:36:24 sam Exp $ + * $Id: mtime.h,v 1.12 2002/06/01 12:31:57 sam Exp $ * * Authors: Vincent Seguin * @@ -50,14 +50,8 @@ /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -char * mstrtime ( char *psz_buffer, mtime_t date ); -mtime_t mdate ( void ); -void mwait ( mtime_t date ); -void msleep ( mtime_t delay ); -#else -# define msleep p_symbols->msleep -# define mdate p_symbols->mdate -# define mstrtime p_symbols->mstrtime -#endif +VLC_EXPORT( char *, mstrtime, ( char *psz_buffer, mtime_t date ) ); +VLC_EXPORT( mtime_t, mdate, ( void ) ); +VLC_EXPORT( void, mwait, ( mtime_t date ) ); +VLC_EXPORT( void, msleep, ( mtime_t delay ) ); diff --git a/include/netutils.h b/include/netutils.h index bd0612cdba..0302af1cef 100644 --- a/include/netutils.h +++ b/include/netutils.h @@ -4,7 +4,7 @@ * modules. ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: netutils.h,v 1.19 2002/04/24 00:36:24 sam Exp $ + * $Id: netutils.h,v 1.20 2002/06/01 12:31:57 sam Exp $ * * Authors: Vincent Seguin * Henri Fallon @@ -33,11 +33,6 @@ struct sockaddr_in; int network_BuildAddr ( struct sockaddr_in *, char *, int ); -#ifndef __PLUGIN__ -int network_ChannelJoin ( int ); -int network_ChannelCreate ( void ); -#else -# define network_ChannelCreate p_symbols->network_ChannelCreate -# define network_ChannelJoin p_symbols->network_ChannelJoin -#endif +VLC_EXPORT( int, network_ChannelJoin, ( vlc_object_t *, int ) ); +VLC_EXPORT( int, network_ChannelCreate, ( vlc_object_t * ) ); diff --git a/include/network.h b/include/network.h index dfaf7f658d..2991ee38fd 100644 --- a/include/network.h +++ b/include/network.h @@ -2,7 +2,7 @@ * network.h: interface to communicate with network plug-ins ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: network.h,v 1.1 2002/03/01 00:33:18 massiot Exp $ + * $Id: network.h,v 1.2 2002/06/01 12:31:57 sam Exp $ * * Authors: Christophe Massiot * @@ -25,7 +25,7 @@ * network_socket_t: structure passed to a network plug-in to define the * kind of socket we want *****************************************************************************/ -typedef struct network_socket_s +struct network_socket_s { unsigned int i_type; @@ -38,7 +38,7 @@ typedef struct network_socket_s /* Return values */ int i_handle; size_t i_mtu; -} network_socket_t; +}; /* Socket types */ #define NETWORK_UDP 1 diff --git a/include/os_specific.h b/include/os_specific.h index 46ee3b9a3f..8e0b61491c 100644 --- a/include/os_specific.h +++ b/include/os_specific.h @@ -2,7 +2,7 @@ * os_specific.h: OS specific features ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: os_specific.h,v 1.7 2002/04/28 09:05:37 sam Exp $ + * $Id: os_specific.h,v 1.8 2002/06/01 12:31:57 sam Exp $ * * Authors: Samuel Hocevar * Gildas Bazin @@ -40,22 +40,17 @@ extern "C" { # endif -/***************************************************************************** - * main_sys_t: system specific descriptor - ****************************************************************************/ -struct main_sys_s; - /***************************************************************************** * Prototypes *****************************************************************************/ #ifdef _NEED_OS_SPECIFIC_H - void system_Init ( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ); - void system_Configure ( void ); - void system_End ( void ); + void system_Init ( vlc_object_t *, int *, char *[] ); + void system_Configure ( vlc_object_t * ); + void system_End ( vlc_object_t * ); #else # define system_Init( a, b, c ) {} -# define system_Configure( ) {} -# define system_End( ) {} +# define system_Configure( a ) {} +# define system_End( a ) {} #endif # ifdef __cplusplus diff --git a/include/intf_playlist.h b/include/playlist.h similarity index 63% rename from include/intf_playlist.h rename to include/playlist.h index 0294467ad4..21df19b29d 100644 --- a/include/intf_playlist.h +++ b/include/playlist.h @@ -1,8 +1,8 @@ /***************************************************************************** - * intf_playlist.h : Playlist functions + * vlc_playlist.h : Playlist functions ***************************************************************************** - * Copyright (C) 1999, 2000 VideoLAN - * $Id: intf_playlist.h,v 1.6 2002/04/24 00:36:24 sam Exp $ + * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN + * $Id: playlist.h,v 1.3 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,12 +24,12 @@ /***************************************************************************** * playlist_item_t: playlist item *****************************************************************************/ -typedef struct playlist_item_s +struct playlist_item_s { char* psz_name; int i_type; /* unused yet */ int i_status; /* unused yet */ -} playlist_item_t; +}; /***************************************************************************** * playlist_t: playlist structure @@ -38,22 +38,23 @@ typedef struct playlist_item_s * the playlist, a change lock, a dynamic array of playlist items, and a * current item which is an exact copy of one of the array members. *****************************************************************************/ -typedef struct playlist_s +struct playlist_s { + VLC_COMMON_MEMBERS + + /* Thread properties and lock */ + vlc_mutex_t change_lock; + int i_index; /* current index */ int i_size; /* total size */ + playlist_item_t ** pp_items; - int i_mode; /* parse mode (random, forward, backward) */ - int i_seed; /* seed used for random mode */ - boolean_t b_stopped; - - vlc_mutex_t change_lock; + int i_status; - playlist_item_t current; - playlist_item_t* p_item; -} playlist_t; + input_thread_t * p_input; +}; -/* Used by intf_PlaylistAdd */ +/* Used by playlist_Add */ #define PLAYLIST_START 0 #define PLAYLIST_END -1 @@ -66,27 +67,30 @@ typedef struct playlist_s #define PLAYLIST_RANDOM 3 /* Shuffle play */ #define PLAYLIST_REVERSE_RANDOM -3 /* Reverse shuffle play */ +/* Playlist commands */ +#define PLAYLIST_PLAY 1 /* Starts playing. No arg. */ +#define PLAYLIST_PAUSE 2 /* Toggles playlist pause. No arg. */ +#define PLAYLIST_STOP 3 /* Stops playing. No arg. */ +#define PLAYLIST_SKIP 4 /* Skip X items and play. */ +#define PLAYLIST_GOTO 5 /* Goto Xth item. */ +#define PLAYLIST_MODE 6 /* Set playlist mode. ??? */ + /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -playlist_t * intf_PlaylistCreate ( void ); -void intf_PlaylistInit ( playlist_t * p_playlist ); -int intf_PlaylistAdd ( playlist_t * p_playlist, - int i_pos, const char * psz_item ); -int intf_PlaylistDelete ( playlist_t * p_playlist, int i_pos ); -void intf_PlaylistNext ( playlist_t * p_playlist ); -void intf_PlaylistPrev ( playlist_t * p_playlist ); -void intf_PlaylistDestroy ( playlist_t * p_playlist ); -void intf_PlaylistJumpto ( playlist_t * p_playlist , int i_pos); -void intf_UrlDecode ( char * ); -#else -# define intf_PlaylistAdd p_symbols->intf_PlaylistAdd -# define intf_PlaylistDelete p_symbols->intf_PlaylistDelete -# define intf_PlaylistNext p_symbols->intf_PlaylistNext -# define intf_PlaylistPrev p_symbols->intf_PlaylistPrev -# define intf_PlaylistDestroy p_symbols->intf_PlaylistDestroy -# define intf_PlaylistJumpto p_symbols->intf_PlaylistJumpto -# define intf_UrlDecode p_symbols->intf_UrlDecode -#endif +playlist_t * playlist_Create ( vlc_object_t * ); +void playlist_Destroy ( playlist_t * ); + +VLC_EXPORT( void, playlist_Command, ( playlist_t *, int, int ) ); + +#define playlist_Play(p) playlist_Command(p,PLAYLIST_PLAY,0) +#define playlist_Pause(p) playlist_Command(p,PLAYLIST_PAUSE,0) +#define playlist_Stop(p) playlist_Command(p,PLAYLIST_STOP,0) +#define playlist_Next(p) playlist_Command(p,PLAYLIST_SKIP,1) +#define playlist_Prev(p) playlist_Command(p,PLAYLIST_SKIP,-1) +#define playlist_Skip(p,i) playlist_Command(p,PLAYLIST_SKIP,i) +#define playlist_Goto(p,i) playlist_Command(p,PLAYLIST_GOTO,i) + +VLC_EXPORT( int, playlist_Add, ( vlc_object_t *, int, const char * ) ); +VLC_EXPORT( int, playlist_Delete, ( playlist_t *, int ) ); diff --git a/include/stream_control.h b/include/stream_control.h index f18ab0a0f0..9ab021c97e 100644 --- a/include/stream_control.h +++ b/include/stream_control.h @@ -4,7 +4,7 @@ * of the reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: stream_control.h,v 1.7 2002/01/07 02:12:29 sam Exp $ + * $Id: stream_control.h,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Christophe Massiot * @@ -23,6 +23,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ +#ifndef _STREAM_CONTROL_H +#define _STREAM_CONTROL_H 1 + /* Structures exported to interface, input and decoders */ /***************************************************************************** @@ -30,7 +33,7 @@ ***************************************************************************** * Describe the state of a program stream. *****************************************************************************/ -typedef struct stream_ctrl_s +struct stream_ctrl_s { vlc_mutex_t control_lock; @@ -38,11 +41,11 @@ typedef struct stream_ctrl_s /* if i_status == FORWARD_S or BACKWARD_S */ int i_rate; - boolean_t b_mute; - boolean_t b_grayscale; /* use color or grayscale */ + vlc_bool_t b_mute; + vlc_bool_t b_grayscale; /* use color or grayscale */ int i_smp; /* number of symmetrical threads to launch * to decode the video | 0 == disabled */ -} stream_ctrl_t; +}; /* Possible status : */ #define UNDEF_S 0 @@ -57,3 +60,5 @@ typedef struct stream_ctrl_s #define DEFAULT_RATE 1000 #define MINIMAL_RATE 31 /* Up to 32/1 */ #define MAXIMAL_RATE 8000 /* Up to 1/8 */ + +#endif /* "stream_control.h" */ diff --git a/include/threads_funcs.h b/include/threads_funcs.h index 07c0331306..f1ded21249 100644 --- a/include/threads_funcs.h +++ b/include/threads_funcs.h @@ -3,10 +3,10 @@ * This header provides a portable threads implementation. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: threads_funcs.h,v 1.4 2002/05/19 23:51:37 massiot Exp $ + * $Id: threads_funcs.h,v 1.5 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler - * Samuel Hocevar + * Samuel Hocevar * Gildas Bazin * * This program is free software; you can redistribute it and/or modify @@ -27,146 +27,41 @@ /***************************************************************************** * Function definitions *****************************************************************************/ +VLC_EXPORT( int, __vlc_threads_init, ( vlc_object_t * ) ); +VLC_EXPORT( int, vlc_threads_end, ( void ) ); +VLC_EXPORT( int, __vlc_mutex_init, ( vlc_object_t *, vlc_mutex_t * ) ); +VLC_EXPORT( int, __vlc_mutex_destroy, ( char *, int, vlc_mutex_t * ) ); +VLC_EXPORT( int, vlc_cond_init, ( vlc_cond_t * ) ); +VLC_EXPORT( int, __vlc_cond_destroy, ( char *, int, vlc_cond_t * ) ); +VLC_EXPORT( int, __vlc_thread_create, ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), vlc_bool_t ) ); +VLC_EXPORT( void, __vlc_thread_ready, ( vlc_object_t * ) ); +VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, char *, int ) ); /***************************************************************************** * vlc_threads_init: initialize threads system *****************************************************************************/ -static inline int vlc_threads_init( void ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - return pth_init(); - -#elif defined( ST_INIT_IN_ST_H ) - return st_init(); - -#elif defined( WIN32 ) - return 0; - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - return 0; - -#elif defined( HAVE_CTHREADS_H ) - return 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - return 0; - -#endif -} - -/***************************************************************************** - * vlc_threads_end: stop threads system - *****************************************************************************/ -static inline int vlc_threads_end( void ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - return pth_kill(); - -#elif defined( ST_INIT_IN_ST_H ) - return 0; - -#elif defined( WIN32 ) - return 0; - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - return 0; - -#elif defined( HAVE_CTHREADS_H ) - return 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - return 0; - -#endif -} +#define vlc_threads_init( P_THIS ) \ + __vlc_threads_init( CAST_TO_VLC_OBJECT(P_THIS) ) /***************************************************************************** * vlc_mutex_init: initialize a mutex *****************************************************************************/ -static inline int vlc_mutex_init( vlc_mutex_t *p_mutex ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - return pth_mutex_init( p_mutex ); - -#elif defined( ST_INIT_IN_ST_H ) - *p_mutex = st_mutex_new(); - return ( *p_mutex == NULL ) ? errno : 0; - -#elif defined( WIN32 ) - /* We use mutexes on WinNT/2K/XP because we can use the SignalObjectAndWait - * function and have a 100% correct vlc_cond_wait() implementation. - * As this function is not available on Win9x, we can use the faster - * CriticalSections */ - if( (GetVersion() < 0x80000000) && !p_main->p_sys->b_fast_pthread ) - { - /* We are running on NT/2K/XP, we can use SignalObjectAndWait */ - p_mutex->mutex = CreateMutex( 0, FALSE, 0 ); - return ( p_mutex->mutex ? 0 : 1 ); - } - else - { - InitializeCriticalSection( &p_mutex->csection ); - p_mutex->mutex = NULL; - return 0; - } - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) -# if defined(DEBUG) && defined(SYS_LINUX) - /* Create error-checking mutex to detect threads problems more easily. */ - pthread_mutexattr_t attr; - int i_result; - - pthread_mutexattr_init( &attr ); - pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP ); - i_result = pthread_mutex_init( p_mutex, &attr ); - pthread_mutexattr_destroy( &attr ); - return( i_result ); -# endif - - return pthread_mutex_init( p_mutex, NULL ); - -#elif defined( HAVE_CTHREADS_H ) - mutex_init( p_mutex ); - return 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - - /* check the arguments and whether it's already been initialized */ - if( p_mutex == NULL ) - { - return B_BAD_VALUE; - } - - if( p_mutex->init == 9999 ) - { - return EALREADY; - } - - p_mutex->lock = create_sem( 1, "BeMutex" ); - if( p_mutex->lock < B_NO_ERROR ) - { - return( -1 ); - } - - p_mutex->init = 9999; - return B_OK; - -#endif -} +#define vlc_mutex_init( P_THIS, P_MUTEX ) \ + __vlc_mutex_init( CAST_TO_VLC_OBJECT(P_THIS), P_MUTEX ) /***************************************************************************** * vlc_mutex_lock: lock a mutex *****************************************************************************/ #ifdef DEBUG # define vlc_mutex_lock( P_MUTEX ) \ - _vlc_mutex_lock( __FILE__, __LINE__, P_MUTEX ) + __vlc_mutex_lock( __FILE__, __LINE__, P_MUTEX ) #else # define vlc_mutex_lock( P_MUTEX ) \ - _vlc_mutex_lock( "(unknown)", 0, P_MUTEX ) + __vlc_mutex_lock( "(unknown)", 0, P_MUTEX ) #endif -static inline int _vlc_mutex_lock( char * psz_file, int i_line, - vlc_mutex_t *p_mutex ) +static inline int __vlc_mutex_lock( char * psz_file, int i_line, + vlc_mutex_t *p_mutex ) { #if defined( PTH_INIT_IN_PTH_H ) return pth_mutex_acquire( p_mutex, TRUE, NULL ); @@ -189,8 +84,8 @@ static inline int _vlc_mutex_lock( char * psz_file, int i_line, int i_return = pthread_mutex_lock( p_mutex ); if( i_return ) { - intf_ErrMsg( "thread %d error: mutex_lock failed at %s:%d (%s)", - pthread_self(), psz_file, i_line, strerror(i_return) ); +// msg_Err( "thread %d: mutex_lock failed at %s:%d (%s)", +// pthread_self(), psz_file, i_line, strerror(i_return) ); } return i_return; @@ -222,14 +117,14 @@ static inline int _vlc_mutex_lock( char * psz_file, int i_line, *****************************************************************************/ #ifdef DEBUG # define vlc_mutex_unlock( P_MUTEX ) \ - _vlc_mutex_unlock( __FILE__, __LINE__, P_MUTEX ) + __vlc_mutex_unlock( __FILE__, __LINE__, P_MUTEX ) #else # define vlc_mutex_unlock( P_MUTEX ) \ - _vlc_mutex_unlock( "(unknown)", 0, P_MUTEX ) + __vlc_mutex_unlock( "(unknown)", 0, P_MUTEX ) #endif -static inline int _vlc_mutex_unlock( char * psz_file, int i_line, - vlc_mutex_t *p_mutex ) +static inline int __vlc_mutex_unlock( char * psz_file, int i_line, + vlc_mutex_t *p_mutex ) { #if defined( PTH_INIT_IN_PTH_H ) return pth_mutex_release( p_mutex ); @@ -252,8 +147,8 @@ static inline int _vlc_mutex_unlock( char * psz_file, int i_line, int i_return = pthread_mutex_unlock( p_mutex ); if( i_return ) { - intf_ErrMsg( "thread %d error: mutex_unlock failed at %s:%d (%s)", - pthread_self(), psz_file, i_line, strerror(i_return) ); +// msg_Err( "thread %d: mutex_unlock failed at %s:%d (%s)", +// pthread_self(), psz_file, i_line, strerror(i_return) ); } return i_return; @@ -283,110 +178,12 @@ static inline int _vlc_mutex_unlock( char * psz_file, int i_line, *****************************************************************************/ #ifdef DEBUG # define vlc_mutex_destroy( P_MUTEX ) \ - _vlc_mutex_destroy( __FILE__, __LINE__, P_MUTEX ) + __vlc_mutex_destroy( __FILE__, __LINE__, P_MUTEX ) #else # define vlc_mutex_destroy( P_MUTEX ) \ - _vlc_mutex_destroy( "(unknown)", 0, P_MUTEX ) + __vlc_mutex_destroy( "(unknown)", 0, P_MUTEX ) #endif -static inline int _vlc_mutex_destroy( char * psz_file, int i_line, - vlc_mutex_t *p_mutex ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - return 0; - -#elif defined( ST_INIT_IN_ST_H ) - return st_mutex_destroy( *p_mutex ); - -#elif defined( WIN32 ) - if( p_mutex->mutex ) - { - CloseHandle( p_mutex->mutex ); - } - else - { - DeleteCriticalSection( &p_mutex->csection ); - } - return 0; - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - int i_return = pthread_mutex_destroy( p_mutex ); - if( i_return ) - { - intf_ErrMsg( "thread %d error: mutex_destroy failed at %s:%d (%s)", - pthread_self(), psz_file, i_line, strerror(i_return) ); - } - return i_return; - -#elif defined( HAVE_CTHREADS_H ) - return 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - if( p_mutex->init == 9999 ) - { - delete_sem( p_mutex->lock ); - } - - p_mutex->init = 0; - return B_OK; - -#endif -} - -/***************************************************************************** - * vlc_cond_init: initialize a condition - *****************************************************************************/ -static inline int vlc_cond_init( vlc_cond_t *p_condvar ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - return pth_cond_init( p_condvar ); - -#elif defined( ST_INIT_IN_ST_H ) - *p_condvar = st_cond_new(); - return ( *p_condvar == NULL ) ? errno : 0; - -#elif defined( WIN32 ) - /* initialise counter */ - p_condvar->i_waiting_threads = 0; - - /* Create an auto-reset event. */ - p_condvar->signal = CreateEvent( NULL, /* no security */ - FALSE, /* auto-reset event */ - FALSE, /* non-signaled initially */ - NULL ); /* unnamed */ - - return( !p_condvar->signal ); - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - return pthread_cond_init( p_condvar, NULL ); - -#elif defined( HAVE_CTHREADS_H ) - /* condition_init() */ - spin_lock_init( &p_condvar->lock ); - cthread_queue_init( &p_condvar->queue ); - p_condvar->name = 0; - p_condvar->implications = 0; - - return 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - if( !p_condvar ) - { - return B_BAD_VALUE; - } - - if( p_condvar->init == 9999 ) - { - return EALREADY; - } - - p_condvar->thread = -1; - p_condvar->init = 9999; - return 0; - -#endif -} - /***************************************************************************** * vlc_cond_signal: start a thread on condition completion *****************************************************************************/ @@ -536,16 +333,15 @@ static inline int vlc_cond_broadcast( vlc_cond_t *p_condvar ) * vlc_cond_wait: wait until condition completion *****************************************************************************/ #ifdef DEBUG -# define vlc_cond_wait( P_COND, P_MUTEX ) \ - _vlc_cond_wait( __FILE__, __LINE__, P_COND, P_MUTEX ) +# define vlc_cond_wait( P_COND, P_MUTEX ) \ + __vlc_cond_wait( __FILE__, __LINE__, P_COND, P_MUTEX ) #else -# define vlc_cond_wait( P_COND, P_MUTEX ) \ - _vlc_cond_wait( "(unknown)", 0, P_COND, P_MUTEX ) +# define vlc_cond_wait( P_COND, P_MUTEX ) \ + __vlc_cond_wait( "(unknown)", 0, P_COND, P_MUTEX ) #endif -static inline int _vlc_cond_wait( char * psz_file, int i_line, - vlc_cond_t *p_condvar, - vlc_mutex_t *p_mutex ) +static inline int __vlc_cond_wait( char * psz_file, int i_line, + vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex ) { #if defined( PTH_INIT_IN_PTH_H ) return pth_cond_await( p_condvar, p_mutex, NULL ); @@ -575,8 +371,8 @@ static inline int _vlc_cond_wait( char * psz_file, int i_line, if( p_mutex->mutex ) { - p_main->p_sys->SignalObjectAndWait( p_mutex->mutex, p_condvar->signal, - INFINITE, FALSE ); + p_mutex->SignalObjectAndWait( p_mutex->mutex, p_condvar->signal, + INFINITE, FALSE ); } else { @@ -593,9 +389,7 @@ static inline int _vlc_cond_wait( char * psz_file, int i_line, #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) -#ifndef DEBUG - return pthread_cond_wait( p_condvar, p_mutex ); -#else +# ifdef DEBUG /* In debug mode, timeout */ struct timeval now; struct timespec timeout; @@ -611,19 +405,22 @@ static inline int _vlc_cond_wait( char * psz_file, int i_line, if( i_result == ETIMEDOUT ) { - intf_WarnMsg( 1, "thread %d warning: Possible deadlock detected in cond_wait at %s:%d (%s)", - pthread_self(), psz_file, i_line, strerror(i_result) ); +//X msg_Warn( "thread %d: possible deadlock detected " +//X "in cond_wait at %s:%d (%s)", pthread_self(), +//X psz_file, i_line, strerror(i_result) ); continue; } if( i_result ) { - intf_ErrMsg( "thread %d error: cond_wait failed at %s:%d (%s)", - pthread_self(), psz_file, i_line, strerror(i_result) ); +//X msg_Err( "thread %d: cond_wait failed at %s:%d (%s)", +//X pthread_self(), psz_file, i_line, strerror(i_result) ); } return( i_result ); } -#endif +# else + return pthread_cond_wait( p_condvar, p_mutex ); +# endif #elif defined( HAVE_CTHREADS_H ) condition_wait( (condition_t)p_condvar, (mutex_t)p_mutex ); @@ -664,239 +461,32 @@ static inline int _vlc_cond_wait( char * psz_file, int i_line, *****************************************************************************/ #ifdef DEBUG # define vlc_cond_destroy( P_COND ) \ - _vlc_cond_destroy( __FILE__, __LINE__, P_COND ) + __vlc_cond_destroy( __FILE__, __LINE__, P_COND ) #else # define vlc_cond_destroy( P_COND ) \ - _vlc_cond_destroy( "(unknown)", 0, P_COND ) + __vlc_cond_destroy( "(unknown)", 0, P_COND ) #endif -static inline int _vlc_cond_destroy( char * psz_file, int i_line, - vlc_cond_t *p_condvar ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - return 0; - -#elif defined( ST_INIT_IN_ST_H ) - return st_cond_destroy( *p_condvar ); - -#elif defined( WIN32 ) - return( !CloseHandle( p_condvar->signal ) ); - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - int i_result = pthread_cond_destroy( p_condvar ); - if( i_result ) - { - intf_ErrMsg( "thread %d error: cond_destroy failed at %s:%d (%s)", - pthread_self(), psz_file, i_line, strerror(i_result) ); - } - return i_result; - -#elif defined( HAVE_CTHREADS_H ) - return 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - p_condvar->init = 0; - return 0; - -#endif -} - /***************************************************************************** * vlc_thread_create: create a thread *****************************************************************************/ -#define vlc_thread_create( P_THREAD, PSZ_NAME, FUNC, P_DATA ) \ - _vlc_thread_create( __FILE__, __LINE__, P_THREAD, PSZ_NAME, FUNC, P_DATA ) - -static inline int _vlc_thread_create( char * psz_file, int i_line, - vlc_thread_t *p_thread, char *psz_name, - vlc_thread_func_t func, void *p_data ) -{ - int i_ret; - -#ifdef GPROF - wrapper_t wrapper; - - /* Initialize the wrapper structure */ - wrapper.func = func; - wrapper.p_data = p_data; - getitimer( ITIMER_PROF, &wrapper.itimer ); - vlc_mutex_init( &wrapper.lock ); - vlc_cond_init( &wrapper.wait ); - vlc_mutex_lock( &wrapper.lock ); - - /* Alter user-passed data so that we call the wrapper instead - * of the real function */ - p_data = &wrapper; - func = vlc_thread_wrapper; -#endif - -#if defined( PTH_INIT_IN_PTH_H ) - *p_thread = pth_spawn( PTH_ATTR_DEFAULT, func, p_data ); - i_ret = ( p_thread == NULL ); - -#elif defined( ST_INIT_IN_ST_H ) - *p_thread = st_thread_create( func, p_data, 1, 0 ); - i_ret = ( p_thread == NULL ); - -#elif defined( WIN32 ) - unsigned threadID; - /* When using the MSVCRT C library you have to use the _beginthreadex - * function instead of CreateThread, otherwise you'll end up with memory - * leaks and the signal functions not working */ - *p_thread = (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, - p_data, 0, &threadID ); - - i_ret = ( *p_thread ? 0 : 1 ); - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - i_ret = pthread_create( p_thread, NULL, func, p_data ); - -#ifdef SYS_DARWIN - { - struct sched_param param; - param.sched_priority = 10; - if (pthread_setschedparam(*p_thread, SCHED_RR, ¶m)) - { - intf_ErrMsg("pthread_setschedparam failed"); - } - } -#endif - -#elif defined( HAVE_CTHREADS_H ) - *p_thread = cthread_fork( (cthread_fn_t)func, (any_t)p_data ); - i_ret = 0; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - *p_thread = spawn_thread( (thread_func)func, psz_name, - B_NORMAL_PRIORITY, p_data ); - i_ret = resume_thread( *p_thread ); - -#endif - -#ifdef GPROF - if( i_ret == 0 ) - { - vlc_cond_wait( &wrapper.wait, &wrapper.lock ); - } - - vlc_mutex_unlock( &wrapper.lock ); - vlc_mutex_destroy( &wrapper.lock ); - vlc_cond_destroy( &wrapper.wait ); -#endif - - if( i_ret == 0 ) - { - intf_WarnMsg( 2, "thread info: %d (%s) has been created (%s:%d)", - *p_thread, psz_name, psz_file, i_line ); - } - else - { - intf_ErrMsg( "thread error: %s couldn't be created at %s:%d (%s)", - psz_name, psz_file, i_line, strerror(i_ret) ); - } - - return i_ret; -} +# define vlc_thread_create( P_THIS, PSZ_NAME, FUNC, WAIT ) \ + __vlc_thread_create( CAST_TO_VLC_OBJECT(P_THIS), __FILE__, __LINE__, PSZ_NAME, (void * ( * ) ( void * ))FUNC, WAIT ) /***************************************************************************** - * vlc_thread_exit: terminate a thread + * vlc_thread_ready: tell the parent thread we were successfully spawned *****************************************************************************/ -static inline void vlc_thread_exit( void ) -{ -#if defined( PTH_INIT_IN_PTH_H ) - pth_exit( 0 ); - -#elif defined( ST_INIT_IN_ST_H ) - int result; - st_thread_exit( &result ); - -#elif defined( WIN32 ) - /* For now we don't close the thread handles (because of race conditions). - * Need to be looked at. */ - _endthreadex(0); - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - pthread_exit( 0 ); - -#elif defined( HAVE_CTHREADS_H ) - int result; - cthread_exit( &result ); - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - exit_thread( 0 ); - -#endif -} +# define vlc_thread_ready( P_THIS ) \ + __vlc_thread_ready( CAST_TO_VLC_OBJECT(P_THIS) ) /***************************************************************************** * vlc_thread_join: wait until a thread exits *****************************************************************************/ #ifdef DEBUG -# define vlc_thread_join( THREAD ) \ - _vlc_thread_join( __FILE__, __LINE__, THREAD ) +# define vlc_thread_join( P_THIS ) \ + __vlc_thread_join( CAST_TO_VLC_OBJECT(P_THIS), __FILE__, __LINE__ ) #else -# define vlc_thread_join( THREAD ) \ - _vlc_thread_join( "(unknown)", 0, THREAD ) -#endif - -static inline void _vlc_thread_join( char * psz_file, int i_line, - vlc_thread_t thread ) -{ - int i_ret = 0; - -#if defined( PTH_INIT_IN_PTH_H ) - i_ret = pth_join( thread, NULL ); - -#elif defined( ST_INIT_IN_ST_H ) - i_ret = st_thread_join( thread, NULL ); - -#elif defined( WIN32 ) - WaitForSingleObject( thread, INFINITE ); - -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) - i_ret = pthread_join( thread, NULL ); - -#elif defined( HAVE_CTHREADS_H ) - cthread_join( thread ); - i_ret = 1; - -#elif defined( HAVE_KERNEL_SCHEDULER_H ) - int32 exit_value; - wait_for_thread( thread, &exit_value ); - +# define vlc_thread_join( P_THIS ) \ + __vlc_thread_join( CAST_TO_VLC_OBJECT(P_THIS), "(unknown)", 0 ) #endif - if( i_ret ) - { - intf_ErrMsg( "thread error: thread_join(%d) failed at %s:%d (%s)", - thread, psz_file, i_line, strerror(i_ret) ); - } - else - { - intf_WarnMsg( 2, "thread info: %d has been joined (%s:%d)", - thread, psz_file, i_line ); - } -} - -/***************************************************************************** - * vlc_thread_wrapper: wrapper around thread functions used when profiling. - *****************************************************************************/ -#ifdef GPROF -static void *vlc_thread_wrapper( void *p_wrapper ) -{ - /* Put user data in thread-local variables */ - void * p_data = ((wrapper_t*)p_wrapper)->p_data; - vlc_thread_func_t func = ((wrapper_t*)p_wrapper)->func; - - /* Set the profile timer value */ - setitimer( ITIMER_PROF, &((wrapper_t*)p_wrapper)->itimer, NULL ); - - /* Tell the calling thread that we don't need its data anymore */ - vlc_mutex_lock( &((wrapper_t*)p_wrapper)->lock ); - vlc_cond_signal( &((wrapper_t*)p_wrapper)->wait ); - vlc_mutex_unlock( &((wrapper_t*)p_wrapper)->lock ); - - /* Call the real function */ - return func( p_data ); -} -#endif diff --git a/include/vdec_ext-plugins.h b/include/vdec_ext-plugins.h index 6bcb113dd1..6c4838d8cc 100644 --- a/include/vdec_ext-plugins.h +++ b/include/vdec_ext-plugins.h @@ -2,7 +2,7 @@ * vdec_ext-plugins.h : structures from the video decoder exported to plug-ins ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: vdec_ext-plugins.h,v 1.11 2002/04/15 23:04:08 massiot Exp $ + * $Id: vdec_ext-plugins.h,v 1.12 2002/06/01 12:31:58 sam Exp $ * * Authors: Christophe Massiot * @@ -39,15 +39,15 @@ typedef struct idct_inner_s typedef struct motion_inner_s { - boolean_t b_average; /* 0 == copy */ + vlc_bool_t b_average; /* 0 == copy */ int i_x_pred, i_y_pred; /* motion vectors */ yuv_data_t * pp_source[3]; int i_dest_offset, i_src_offset; int i_stride, i_height; - boolean_t b_second_half; + vlc_bool_t b_second_half; } motion_inner_t; -typedef struct macroblock_s +struct macroblock_s { int i_mb_modes; @@ -64,8 +64,7 @@ typedef struct macroblock_s motion_inner_t p_motions[8]; int i_nb_motions; yuv_data_t * pp_dest[3]; - -} macroblock_t; +}; /* Macroblock Modes */ #define MB_INTRA 1 @@ -78,15 +77,16 @@ typedef struct macroblock_s /***************************************************************************** * vdec_thread_t: video decoder thread descriptor *****************************************************************************/ -typedef struct vdec_thread_s +typedef struct vdec_thread_s vdec_thread_t; + +struct vdec_thread_s { - vlc_thread_t thread_id; /* id for thread functions */ - boolean_t b_die; + VLC_COMMON_MEMBERS /* IDCT iformations */ - void * p_idct_data; + void * p_idct_data; /* Input properties */ struct vdec_pool_s * p_pool; -} vdec_thread_t; +}; diff --git a/include/video.h b/include/video.h index 6c0f972a8a..7e8ffe00a2 100644 --- a/include/video.h +++ b/include/video.h @@ -4,7 +4,7 @@ * includes all common video types and constants. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video.h,v 1.52 2002/05/28 18:34:42 stef Exp $ + * $Id: video.h,v 1.53 2002/06/01 12:31:58 sam Exp $ * * Authors: Vincent Seguin * @@ -38,11 +38,11 @@ typedef struct plane_s int i_pixel_bytes; /* Is there a margin ? defaults to no */ - boolean_t b_margin; + vlc_bool_t b_margin; /* Variables used for pictures with margins */ int i_visible_bytes; /* How many real pixels are there ? */ - boolean_t b_hidden; /* Are we allowed to write to the margin ? */ + vlc_bool_t b_hidden; /* Are we allowed to write to the margin ? */ } plane_t; @@ -54,7 +54,7 @@ typedef struct plane_s * Picture type and flags should only be modified by the output thread. Note * that an empty picture MUST have its flags set to 0. *****************************************************************************/ -typedef struct picture_s +struct picture_s { /* Picture data - data can always be freely modified, but p_data may * NEVER be modified. A direct buffer can be handled as the plugin @@ -73,28 +73,27 @@ typedef struct picture_s * the video output thread API, but should never be written directly */ int i_refcount; /* link reference counter */ mtime_t date; /* display date */ - boolean_t b_force; + vlc_bool_t b_force; /* Picture dynamic properties - those properties can be changed by the * decoder */ - boolean_t b_progressive; /* is it a progressive frame ? */ - boolean_t b_repeat_first_field; /* RFF bit */ - boolean_t b_top_field_first; /* which field is first */ + vlc_bool_t b_progressive; /* is it a progressive frame ? */ + vlc_bool_t b_repeat_first_field; /* RFF bit */ + vlc_bool_t b_top_field_first; /* which field is first */ /* The picture heap we are attached to */ - struct picture_heap_s* p_heap; + picture_heap_t* p_heap; /* Private data - the video output plugin might want to put stuff here to * keep track of the picture */ - struct picture_sys_s *p_sys; - -} picture_t; + picture_sys_t * p_sys; +}; /***************************************************************************** * picture_heap_t: video picture heap, either render (to store pictures used * by the decoder) or output (to store pictures displayed by the vout plugin) *****************************************************************************/ -typedef struct picture_heap_s +struct picture_heap_s { int i_pictures; /* current heap size */ @@ -114,9 +113,8 @@ typedef struct picture_heap_s int i_bmask, i_rbshift, i_lbshift; /* Stuff used for palettized RGB planes */ - void (* pf_setpalette) ( struct vout_thread_s *, u16 *, u16 *, u16 * ); - -} picture_heap_t; + void (* pf_setpalette) ( vout_thread_t *, u16 *, u16 *, u16 * ); +}; /* RGB2PIXEL: assemble RGB components to a pixel value, returns a u32 */ #define RGB2PIXEL( p_vout, i_r, i_g, i_b ) \ @@ -145,141 +143,141 @@ typedef struct picture_heap_s /***************************************************************************** * Codes used to describe picture format - see http://www.webartz.com/fourcc/ *****************************************************************************/ -#define MAKEFOURCC( a, b, c, d ) \ +#define VLC_FOURCC( a, b, c, d ) \ ( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) ) -#define MAKETWOCC( a, b ) \ +#define VLC_TWOCC( a, b ) \ ( (u16)(a) | ( (u16)(b) << 8 ) ) /* AVI stuff */ -#define FOURCC_RIFF MAKEFOURCC('R','I','F','F') -#define FOURCC_LIST MAKEFOURCC('L','I','S','T') -#define FOURCC_JUNK MAKEFOURCC('J','U','N','K') -#define FOURCC_AVI MAKEFOURCC('A','V','I',' ') -#define FOURCC_WAVE MAKEFOURCC('W','A','V','E') - -#define FOURCC_avih MAKEFOURCC('a','v','i','h') -#define FOURCC_hdrl MAKEFOURCC('h','d','r','l') -#define FOURCC_movi MAKEFOURCC('m','o','v','i') -#define FOURCC_idx1 MAKEFOURCC('i','d','x','1') - -#define FOURCC_strl MAKEFOURCC('s','t','r','l') -#define FOURCC_strh MAKEFOURCC('s','t','r','h') -#define FOURCC_strf MAKEFOURCC('s','t','r','f') -#define FOURCC_strd MAKEFOURCC('s','t','r','d') - -#define FOURCC_rec MAKEFOURCC('r','e','c',' ') -#define FOURCC_auds MAKEFOURCC('a','u','d','s') -#define FOURCC_vids MAKEFOURCC('v','i','d','s') - -#define TWOCC_wb MAKETWOCC('w','b') -#define TWOCC_db MAKETWOCC('d','b') -#define TWOCC_dc MAKETWOCC('d','c') -#define TWOCC_pc MAKETWOCC('p','c') +#define FOURCC_RIFF VLC_FOURCC('R','I','F','F') +#define FOURCC_LIST VLC_FOURCC('L','I','S','T') +#define FOURCC_JUNK VLC_FOURCC('J','U','N','K') +#define FOURCC_AVI VLC_FOURCC('A','V','I',' ') +#define FOURCC_WAVE VLC_FOURCC('W','A','V','E') + +#define FOURCC_avih VLC_FOURCC('a','v','i','h') +#define FOURCC_hdrl VLC_FOURCC('h','d','r','l') +#define FOURCC_movi VLC_FOURCC('m','o','v','i') +#define FOURCC_idx1 VLC_FOURCC('i','d','x','1') + +#define FOURCC_strl VLC_FOURCC('s','t','r','l') +#define FOURCC_strh VLC_FOURCC('s','t','r','h') +#define FOURCC_strf VLC_FOURCC('s','t','r','f') +#define FOURCC_strd VLC_FOURCC('s','t','r','d') + +#define FOURCC_rec VLC_FOURCC('r','e','c',' ') +#define FOURCC_auds VLC_FOURCC('a','u','d','s') +#define FOURCC_vids VLC_FOURCC('v','i','d','s') + +#define TWOCC_wb VLC_TWOCC('w','b') +#define TWOCC_db VLC_TWOCC('d','b') +#define TWOCC_dc VLC_TWOCC('d','c') +#define TWOCC_pc VLC_TWOCC('p','c') /* MPEG4 codec */ -#define FOURCC_DIVX MAKEFOURCC('D','I','V','X') -#define FOURCC_divx MAKEFOURCC('d','i','v','x') -#define FOURCC_DIV1 MAKEFOURCC('D','I','V','1') -#define FOURCC_div1 MAKEFOURCC('d','i','v','1') -#define FOURCC_MP4S MAKEFOURCC('M','P','4','S') -#define FOURCC_mp4s MAKEFOURCC('m','p','4','s') -#define FOURCC_M4S2 MAKEFOURCC('M','4','S','2') -#define FOURCC_m4s2 MAKEFOURCC('m','4','s','2') -#define FOURCC_xvid MAKEFOURCC('x','v','i','d') -#define FOURCC_XVID MAKEFOURCC('X','V','I','D') -#define FOURCC_XviD MAKEFOURCC('X','v','i','D') -#define FOURCC_DX50 MAKEFOURCC('D','X','5','0') -#define FOURCC_mp4v MAKEFOURCC('m','p','4','v') -#define FOURCC_4 MAKEFOURCC( 4, 0, 0, 0 ) - +#define FOURCC_DIVX VLC_FOURCC('D','I','V','X') +#define FOURCC_divx VLC_FOURCC('d','i','v','x') +#define FOURCC_DIV1 VLC_FOURCC('D','I','V','1') +#define FOURCC_div1 VLC_FOURCC('d','i','v','1') +#define FOURCC_MP4S VLC_FOURCC('M','P','4','S') +#define FOURCC_mp4s VLC_FOURCC('m','p','4','s') +#define FOURCC_M4S2 VLC_FOURCC('M','4','S','2') +#define FOURCC_m4s2 VLC_FOURCC('m','4','s','2') +#define FOURCC_xvid VLC_FOURCC('x','v','i','d') +#define FOURCC_XVID VLC_FOURCC('X','V','I','D') +#define FOURCC_XviD VLC_FOURCC('X','v','i','D') +#define FOURCC_DX50 VLC_FOURCC('D','X','5','0') +#define FOURCC_mp4v VLC_FOURCC('m','p','4','v') +#define FOURCC_4 VLC_FOURCC( 4, 0, 0, 0 ) + /* MSMPEG4 v2 */ -#define FOURCC_MPG4 MAKEFOURCC('M','P','G','4') -#define FOURCC_mpg4 MAKEFOURCC('m','p','g','4') -#define FOURCC_DIV2 MAKEFOURCC('D','I','V','2') -#define FOURCC_div2 MAKEFOURCC('d','i','v','2') -#define FOURCC_MP42 MAKEFOURCC('M','P','4','2') -#define FOURCC_mp42 MAKEFOURCC('m','p','4','2') - -/* MSMPEG4 v3 */ -/* M$ mpeg4 v3 */ -#define FOURCC_MPG3 MAKEFOURCC('M','P','G','3') -#define FOURCC_mpg3 MAKEFOURCC('m','p','g','3') -#define FOURCC_div3 MAKEFOURCC('d','i','v','3') -#define FOURCC_MP43 MAKEFOURCC('M','P','4','3') -#define FOURCC_mp43 MAKEFOURCC('m','p','4','3') +#define FOURCC_MPG4 VLC_FOURCC('M','P','G','4') +#define FOURCC_mpg4 VLC_FOURCC('m','p','g','4') +#define FOURCC_DIV2 VLC_FOURCC('D','I','V','2') +#define FOURCC_div2 VLC_FOURCC('d','i','v','2') +#define FOURCC_MP42 VLC_FOURCC('M','P','4','2') +#define FOURCC_mp42 VLC_FOURCC('m','p','4','2') + +/* MSMPEG4 v3 / M$ mpeg4 v3 */ +#define FOURCC_MPG3 VLC_FOURCC('M','P','G','3') +#define FOURCC_mpg3 VLC_FOURCC('m','p','g','3') +#define FOURCC_div3 VLC_FOURCC('d','i','v','3') +#define FOURCC_MP43 VLC_FOURCC('M','P','4','3') +#define FOURCC_mp43 VLC_FOURCC('m','p','4','3') + /* DivX 3.20 */ -#define FOURCC_DIV3 MAKEFOURCC('D','I','V','3') -#define FOURCC_DIV4 MAKEFOURCC('D','I','V','4') -#define FOURCC_div4 MAKEFOURCC('d','i','v','4') -#define FOURCC_DIV5 MAKEFOURCC('D','I','V','5') -#define FOURCC_div5 MAKEFOURCC('d','i','v','5') -#define FOURCC_DIV6 MAKEFOURCC('D','I','V','6') -#define FOURCC_div6 MAKEFOURCC('d','i','v','6') -/* AngelPotion stuff */ -#define FOURCC_AP41 MAKEFOURCC('A','P','4','1') -/* ?? */ -#define FOURCC_3IV1 MAKEFOURCC('3','I','V','1') +#define FOURCC_DIV3 VLC_FOURCC('D','I','V','3') +#define FOURCC_DIV4 VLC_FOURCC('D','I','V','4') +#define FOURCC_div4 VLC_FOURCC('d','i','v','4') +#define FOURCC_DIV5 VLC_FOURCC('D','I','V','5') +#define FOURCC_div5 VLC_FOURCC('d','i','v','5') +#define FOURCC_DIV6 VLC_FOURCC('D','I','V','6') +#define FOURCC_div6 VLC_FOURCC('d','i','v','6') +/* AngelPotion stuff */ +#define FOURCC_AP41 VLC_FOURCC('A','P','4','1') +/* ?? */ +#define FOURCC_3IV1 VLC_FOURCC('3','I','V','1') /* Packed RGB for 8bpp */ -#define FOURCC_BI_RGB MAKEFOURCC( 0 , 0 , 0 , 0 ) -#define FOURCC_RGB2 MAKEFOURCC('R','G','B','2') +#define FOURCC_BI_RGB VLC_FOURCC( 0 , 0 , 0 , 0 ) +#define FOURCC_RGB2 VLC_FOURCC('R','G','B','2') /* Packed RGB for 16, 24, 32bpp */ -#define FOURCC_BI_BITFIELDS MAKEFOURCC( 0 , 0 , 0 , 3 ) +#define FOURCC_BI_BITFIELDS VLC_FOURCC( 0 , 0 , 0 , 3 ) /* Packed RGB 15bpp, 0x1f, 0x7e0, 0xf800 */ -#define FOURCC_RV15 MAKEFOURCC('R','V','1','5') +#define FOURCC_RV15 VLC_FOURCC('R','V','1','5') /* Packed RGB 16bpp, 0x1f, 0x3e0, 0x7c00 */ -#define FOURCC_RV16 MAKEFOURCC('R','V','1','6') +#define FOURCC_RV16 VLC_FOURCC('R','V','1','6') /* Packed RGB 24bpp, 0xff, 0xff00, 0xff0000 */ -#define FOURCC_RV24 MAKEFOURCC('R','V','2','4') +#define FOURCC_RV24 VLC_FOURCC('R','V','2','4') /* Packed RGB 32bpp, 0xff, 0xff00, 0xff0000 */ -#define FOURCC_RV32 MAKEFOURCC('R','V','3','2') +#define FOURCC_RV32 VLC_FOURCC('R','V','3','2') /* Planar YUV 4:2:0, Y:U:V */ -#define FOURCC_I420 MAKEFOURCC('I','4','2','0') -#define FOURCC_IYUV MAKEFOURCC('I','Y','U','V') +#define FOURCC_I420 VLC_FOURCC('I','4','2','0') +#define FOURCC_IYUV VLC_FOURCC('I','Y','U','V') /* Planar YUV 4:2:0, Y:V:U */ -#define FOURCC_YV12 MAKEFOURCC('Y','V','1','2') +#define FOURCC_YV12 VLC_FOURCC('Y','V','1','2') /* Packed YUV 4:2:2, U:Y:V:Y, interlaced */ -#define FOURCC_IUYV MAKEFOURCC('I','U','Y','V') +#define FOURCC_IUYV VLC_FOURCC('I','U','Y','V') /* Packed YUV 4:2:2, U:Y:V:Y */ -#define FOURCC_UYVY MAKEFOURCC('U','Y','V','Y') -#define FOURCC_UYNV MAKEFOURCC('U','Y','N','V') -#define FOURCC_Y422 MAKEFOURCC('Y','4','2','2') +#define FOURCC_UYVY VLC_FOURCC('U','Y','V','Y') +#define FOURCC_UYNV VLC_FOURCC('U','Y','N','V') +#define FOURCC_Y422 VLC_FOURCC('Y','4','2','2') /* Packed YUV 4:2:2, U:Y:V:Y, reverted */ -#define FOURCC_cyuv MAKEFOURCC('c','y','u','v') +#define FOURCC_cyuv VLC_FOURCC('c','y','u','v') /* Packed YUV 4:2:2, Y:U:Y:V */ -#define FOURCC_YUY2 MAKEFOURCC('Y','U','Y','2') -#define FOURCC_YUNV MAKEFOURCC('Y','U','N','V') +#define FOURCC_YUY2 VLC_FOURCC('Y','U','Y','2') +#define FOURCC_YUNV VLC_FOURCC('Y','U','N','V') /* Packed YUV 4:2:2, Y:V:Y:U */ -#define FOURCC_YVYU MAKEFOURCC('Y','V','Y','U') +#define FOURCC_YVYU VLC_FOURCC('Y','V','Y','U') /* Packed YUV 2:1:1, Y:U:Y:V */ -#define FOURCC_Y211 MAKEFOURCC('Y','2','1','1') +#define FOURCC_Y211 VLC_FOURCC('Y','2','1','1') /* Custom formats which we use but which don't exist in the fourcc database */ /* Planar Y, packed UV, from Matrox */ -#define FOURCC_YMGA MAKEFOURCC('Y','M','G','A') +#define FOURCC_YMGA VLC_FOURCC('Y','M','G','A') /* Planar 4:2:2, Y:U:V */ -#define FOURCC_I422 MAKEFOURCC('I','4','2','2') +#define FOURCC_I422 VLC_FOURCC('I','4','2','2') /* Planar 4:4:4, Y:U:V */ -#define FOURCC_I444 MAKEFOURCC('I','4','4','4') +#define FOURCC_I444 VLC_FOURCC('I','4','4','4') /***************************************************************************** * Shortcuts to access image components @@ -306,18 +304,18 @@ typedef struct picture_heap_s * Subtitle type and flags should only be modified by the output thread. Note * that an empty subtitle MUST have its flags set to 0. *****************************************************************************/ -typedef struct subpicture_s +struct subpicture_s { /* Type and flags - should NOT be modified except by the vout thread */ int i_type; /* type */ int i_status; /* flags */ int i_size; /* data size */ - struct subpicture_s * p_next; /* next subtitle to be displayed */ + subpicture_t * p_next; /* next subtitle to be displayed */ /* Date properties */ mtime_t i_start; /* beginning of display date */ mtime_t i_stop; /* end of display date */ - boolean_t b_ephemer; /* does the subtitle have a TTL ? */ + vlc_bool_t b_ephemer; /* does the subtitle have a TTL ? */ /* Display properties - these properties are only indicative and may be * changed by the video output thread, or simply ignored depending of the @@ -335,7 +333,7 @@ typedef struct subpicture_s * format */ struct { - p_vout_font_t p_font; /* font, NULL for default */ + vout_font_t * p_font; /* font, NULL for default */ int i_style; /* text style */ u32 i_char_color; /* character color */ u32 i_border_color; /* border color */ @@ -345,15 +343,13 @@ typedef struct subpicture_s #endif /* The subpicture rendering routine */ - void ( *pf_render ) ( const struct vout_thread_s *, picture_t *, - const struct subpicture_s * ); + void ( *pf_render ) ( vout_thread_t *, picture_t *, const subpicture_t * ); /* Private data - the subtitle plugin might want to put stuff here to * keep track of the subpicture */ - struct subpicture_sys_s *p_sys; /* subpicture data */ - void *p_sys_orig; /* pointer before memalign */ - -} subpicture_t; + subpicture_sys_t *p_sys; /* subpicture data */ + void *p_sys_orig; /* pointer before memalign */ +}; /* Subpicture type */ #define EMPTY_SUBPICTURE 0 /* subtitle slot is empty and available */ diff --git a/include/video_output.h b/include/video_output.h index 105e13cb47..d8f5c42607 100644 --- a/include/video_output.h +++ b/include/video_output.h @@ -5,7 +5,7 @@ * thread, and destroy a previously opened video output thread. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video_output.h,v 1.75 2002/04/25 21:52:42 sam Exp $ + * $Id: video_output.h,v 1.76 2002/06/01 12:31:58 sam Exp $ * * Authors: Vincent Seguin * @@ -24,27 +24,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -/***************************************************************************** - * vout_bank_t, p_vout_bank (global variable) - ***************************************************************************** - * This global variable is accessed by any function using the video output. - *****************************************************************************/ -typedef struct vout_bank_s -{ - /* Array to all the video outputs */ - struct vout_thread_s *pp_vout[ VOUT_MAX_THREADS ]; - - int i_count; - vlc_mutex_t lock; /* Global lock */ - -} vout_bank_t; - -#ifndef __PLUGIN__ -extern vout_bank_t *p_vout_bank; -#else -# define p_vout_bank (p_symbols->p_vout_bank) -#endif - /***************************************************************************** * vout_chroma_t: Chroma conversion function ***************************************************************************** @@ -54,7 +33,7 @@ extern vout_bank_t *p_vout_bank; * p_dest destination picture * Picture width and source dimensions must be multiples of 16. *****************************************************************************/ -typedef void (vout_chroma_convert_t)( struct vout_thread_s *, +typedef void (vout_chroma_convert_t)( vout_thread_t *, picture_t *, picture_t * ); typedef struct vout_chroma_s @@ -63,12 +42,12 @@ typedef struct vout_chroma_s vout_chroma_convert_t *pf_convert; /* Private module-dependant data */ - p_chroma_sys_t p_sys; /* private data */ + chroma_sys_t * p_sys; /* private data */ /* Plugin used and shortcuts to access its capabilities */ - struct module_s * p_module; - int ( * pf_init ) ( struct vout_thread_s * ); - void ( * pf_end ) ( struct vout_thread_s * ); + module_t * p_module; + int ( * pf_init ) ( vout_thread_t * ); + void ( * pf_end ) ( vout_thread_t * ); } vout_chroma_t; @@ -79,7 +58,7 @@ typedef struct vout_fifo_s { /* See the fifo types below */ int i_type; - boolean_t b_die; + vlc_bool_t b_die; int i_fifo; /* Just to keep track of the fifo index */ vlc_mutex_t data_lock; @@ -98,42 +77,37 @@ typedef struct vout_fifo_s * is represented by a video output thread, and described using the following * structure. *****************************************************************************/ -typedef struct vout_thread_s +struct vout_thread_s { + VLC_COMMON_MEMBERS + /* Thread properties and lock */ - boolean_t b_die; /* `die' flag */ - boolean_t b_error; /* `error' flag */ - boolean_t b_active; /* `active' flag */ - vlc_thread_t thread_id; /* id for pthread functions */ vlc_mutex_t picture_lock; /* picture heap lock */ vlc_mutex_t subpicture_lock; /* subpicture heap lock */ vlc_mutex_t change_lock; /* thread change lock */ - int * pi_status; /* temporary status flag */ - p_vout_sys_t p_sys; /* system output method */ + vout_sys_t * p_sys; /* system output method */ /* Current display properties */ u16 i_changes; /* changes made to the thread */ float f_gamma; /* gamma */ - boolean_t b_grayscale; /* color or grayscale display */ - boolean_t b_info; /* print additional information */ - boolean_t b_interface; /* render interface */ - boolean_t b_scale; /* allow picture scaling */ - boolean_t b_fullscreen; /* toogle fullscreen display */ + vlc_bool_t b_grayscale; /* color or grayscale display */ + vlc_bool_t b_info; /* print additional information */ + vlc_bool_t b_interface; /* render interface */ + vlc_bool_t b_scale; /* allow picture scaling */ + vlc_bool_t b_fullscreen; /* toogle fullscreen display */ mtime_t render_time; /* last picture render time */ int i_window_width; /* video window width */ int i_window_height; /* video window height */ /* Plugin used and shortcuts to access its capabilities */ - struct module_s * p_module; - int ( *pf_create ) ( struct vout_thread_s * ); - int ( *pf_init ) ( struct vout_thread_s * ); - void ( *pf_end ) ( struct vout_thread_s * ); - void ( *pf_destroy ) ( struct vout_thread_s * ); - int ( *pf_manage ) ( struct vout_thread_s * ); - void ( *pf_render ) ( struct vout_thread_s *, - struct picture_s * ); - void ( *pf_display ) ( struct vout_thread_s *, - struct picture_s * ); + module_t * p_module; + int ( *pf_create ) ( vout_thread_t * ); + int ( *pf_init ) ( vout_thread_t * ); + void ( *pf_end ) ( vout_thread_t * ); + void ( *pf_destroy ) ( vout_thread_t * ); + int ( *pf_manage ) ( vout_thread_t * ); + void ( *pf_render ) ( vout_thread_t *, picture_t * ); + void ( *pf_display ) ( vout_thread_t *, picture_t * ); /* Statistics - these numbers are not supposed to be accurate, but are a * good indication of the thread status */ @@ -144,7 +118,7 @@ typedef struct vout_thread_s int i_heap_size; /* heap size */ picture_heap_t render; /* rendered pictures */ picture_heap_t output; /* direct buffers */ - boolean_t b_direct; /* rendered are like direct ? */ + vlc_bool_t b_direct; /* rendered are like direct ? */ vout_chroma_t chroma; /* translation tables */ /* Picture and subpicture heaps */ @@ -152,8 +126,8 @@ typedef struct vout_thread_s subpicture_t p_subpicture[VOUT_MAX_PICTURES]; /* subpictures */ /* Bitmap fonts */ - p_vout_font_t p_default_font; /* default font */ - p_vout_font_t p_large_font; /* large font */ + vout_font_t * p_default_font; /* default font */ + vout_font_t * p_large_font; /* large font */ /* Statistics */ count_t c_loops; @@ -161,7 +135,7 @@ typedef struct vout_thread_s mtime_t display_jitter; /* average deviation from the PTS */ count_t c_jitter_samples; /* number of samples used for the * * calculation of the jitter */ -} vout_thread_t; +}; #define I_OUTPUTPICTURES p_vout->output.i_pictures #define PP_OUTPUTPICTURE p_vout->output.pp_picture @@ -189,52 +163,31 @@ typedef struct vout_thread_s /***************************************************************************** * Prototypes *****************************************************************************/ -#ifndef __PLUGIN__ -void vout_InitBank ( void ); -void vout_EndBank ( void ); - -vout_thread_t * vout_CreateThread ( int *pi_status, int, int, u32, int ); -void vout_DestroyThread ( vout_thread_t *, int *pi_status ); +VLC_EXPORT( vout_thread_t *, vout_CreateThread, ( vlc_object_t *, int, int, u32, int ) ); +VLC_EXPORT( void, vout_DestroyThread, ( vout_thread_t * ) ); vout_fifo_t * vout_CreateFifo ( void ); void vout_DestroyFifo ( vout_fifo_t * ); void vout_FreeFifo ( vout_fifo_t * ); -int vout_ChromaCmp ( u32, u32 ); +VLC_EXPORT( int, vout_ChromaCmp, ( u32, u32 ) ); -picture_t * vout_CreatePicture ( vout_thread_t *, - boolean_t, boolean_t, boolean_t ); -void vout_AllocatePicture( picture_t *, int, int, u32 ); -void vout_DestroyPicture ( vout_thread_t *, picture_t * ); -void vout_DisplayPicture ( vout_thread_t *, picture_t * ); -void vout_DatePicture ( vout_thread_t *, picture_t *, mtime_t ); -void vout_LinkPicture ( vout_thread_t *, picture_t * ); -void vout_UnlinkPicture ( vout_thread_t *, picture_t * ); +VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, vlc_bool_t, vlc_bool_t, vlc_bool_t ) ); +VLC_EXPORT( void, vout_AllocatePicture,( vout_thread_t *, picture_t *, int, int, u32 ) ); +VLC_EXPORT( void, vout_DestroyPicture, ( vout_thread_t *, picture_t * ) ); +VLC_EXPORT( void, vout_DisplayPicture, ( vout_thread_t *, picture_t * ) ); +VLC_EXPORT( void, vout_DatePicture, ( vout_thread_t *, picture_t *, mtime_t ) ); +VLC_EXPORT( void, vout_LinkPicture, ( vout_thread_t *, picture_t * ) ); +VLC_EXPORT( void, vout_UnlinkPicture, ( vout_thread_t *, picture_t * ) ); +VLC_EXPORT( void, vout_PlacePicture, ( vout_thread_t *, int, int, int *, int *, int *, int * ) ); picture_t * vout_RenderPicture ( vout_thread_t *, picture_t *, subpicture_t * ); -void vout_PlacePicture ( vout_thread_t *, int, int, - int *, int *, int *, int * ); -subpicture_t * vout_CreateSubPicture ( vout_thread_t *, int, int ); -void vout_DestroySubPicture ( vout_thread_t *, subpicture_t * ); -void vout_DisplaySubPicture ( vout_thread_t *, subpicture_t * ); +VLC_EXPORT( subpicture_t *, vout_CreateSubPicture, ( vout_thread_t *, int, int ) ); +VLC_EXPORT( void, vout_DestroySubPicture, ( vout_thread_t *, subpicture_t * ) ); +VLC_EXPORT( void, vout_DisplaySubPicture, ( vout_thread_t *, subpicture_t * ) ); + subpicture_t * vout_SortSubPictures ( vout_thread_t *, mtime_t ); void vout_RenderSubPictures ( vout_thread_t *, picture_t *, subpicture_t * ); -#else -# define vout_CreateThread p_symbols->vout_CreateThread -# define vout_DestroyThread p_symbols->vout_DestroyThread -# define vout_CreateSubPicture p_symbols->vout_CreateSubPicture -# define vout_DestroySubPicture p_symbols->vout_DestroySubPicture -# define vout_DisplaySubPicture p_symbols->vout_DisplaySubPicture -# define vout_CreatePicture p_symbols->vout_CreatePicture -# define vout_AllocatePicture p_symbols->vout_AllocatePicture -# define vout_DisplayPicture p_symbols->vout_DisplayPicture -# define vout_DestroyPicture p_symbols->vout_DestroyPicture -# define vout_DatePicture p_symbols->vout_DatePicture -# define vout_LinkPicture p_symbols->vout_LinkPicture -# define vout_UnlinkPicture p_symbols->vout_UnlinkPicture -# define vout_PlacePicture p_symbols->vout_PlacePicture -# define vout_ChromaCmp p_symbols->vout_ChromaCmp -#endif diff --git a/include/videolan/vlc.h b/include/vlc/aout.h similarity index 61% rename from include/videolan/vlc.h rename to include/vlc/aout.h index 71549873b8..896c529d7d 100644 --- a/include/videolan/vlc.h +++ b/include/vlc/aout.h @@ -1,12 +1,8 @@ /***************************************************************************** - * vlc.h: global header for vlc + * aout.h: audio output header for vlc ***************************************************************************** - * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc.h,v 1.10 2002/04/28 01:26:15 sam Exp $ - * - * Authors: Samuel Hocevar - * Vincent Seguin - * Gildas Bazin + * Copyright (C) 2002 VideoLAN + * $Id: aout.h,v 1.1 2002/06/01 12:31:58 sam Exp $ * * 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 @@ -23,28 +19,25 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -/***************************************************************************** - * Required vlc headers - *****************************************************************************/ -#if defined( __VLC__ ) -# include "defs.h" -# include "config.h" - -# if defined( __PLUGIN__ ) || defined( __BUILTIN__ ) -# include "modules_inner.h" -# endif +#ifndef _VLC_AOUT_H +#define _VLC_AOUT_H 1 -# include "common.h" +# ifdef __cplusplus +extern "C" { +# endif -# include "os_specific.h" +/***************************************************************************** + * Required public headers + *****************************************************************************/ +#include -# include "intf_msg.h" -# include "threads.h" -# include "mtime.h" -# include "modules.h" +/***************************************************************************** + * Required internal headers + *****************************************************************************/ +#include "audio_output.h" -# include "main.h" -# include "configuration.h" -# include "threads_funcs.h" -#endif +# ifdef __cplusplus +} +# endif +#endif /* */ diff --git a/include/intf_msg.h b/include/vlc/decoder.h similarity index 54% rename from include/intf_msg.h rename to include/vlc/decoder.h index 873d9b02e9..473d81205d 100644 --- a/include/intf_msg.h +++ b/include/vlc/decoder.h @@ -1,12 +1,8 @@ /***************************************************************************** - * intf_msg.h: messages interface - * This library provides basic functions for threads to interact with user - * interface, such as message output. See config.h for output configuration. + * decoder.h: header for vlc decoders ***************************************************************************** - * Copyright (C) 1999, 2000 VideoLAN - * $Id: intf_msg.h,v 1.19 2002/04/24 00:36:24 sam Exp $ - * - * Authors: Vincent Seguin + * Copyright (C) 2002 VideoLAN + * $Id: decoder.h,v 1.1 2002/06/01 12:31:58 sam Exp $ * * 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 @@ -23,23 +19,26 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ +#ifndef _VLC_DECODER_H +#define _VLC_DECODER_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + /***************************************************************************** - * Prototypes + * Required public headers *****************************************************************************/ -#ifndef __PLUGIN__ -void intf_Msg ( char *psz_format, ... ); -void intf_ErrMsg ( char *psz_format, ... ); -void intf_WarnMsg ( int i_level, char *psz_format, ... ); -void intf_StatMsg ( char *psz_format, ... ); +#include -void intf_WarnHexDump ( int i_level, void *p_data, int i_size ); -#else -# define intf_MsgSub p_symbols->intf_MsgSub -# define intf_MsgUnsub p_symbols->intf_MsgUnsub +/***************************************************************************** + * Required internal headers + *****************************************************************************/ +#include "stream_control.h" +#include "input_ext-dec.h" -# define intf_Msg p_symbols->intf_Msg -# define intf_ErrMsg p_symbols->intf_ErrMsg -# define intf_StatMsg p_symbols->intf_StatMsg -# define intf_WarnMsg p_symbols->intf_WarnMsg -#endif +# ifdef __cplusplus +} +# endif +#endif /* */ diff --git a/include/vlc/input.h b/include/vlc/input.h new file mode 100644 index 0000000000..2f3f7b1c7f --- /dev/null +++ b/include/vlc/input.h @@ -0,0 +1,46 @@ +/***************************************************************************** + * input.h: input modules header for vlc + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * $Id: input.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * 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. + *****************************************************************************/ + +#ifndef _VLC_INPUT_H +#define _VLC_INPUT_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + +/***************************************************************************** + * Required public headers + *****************************************************************************/ +#include + +/***************************************************************************** + * Required internal headers + *****************************************************************************/ +#include "stream_control.h" +#include "input_ext-intf.h" /* input_thread_s */ +#include "input_ext-dec.h" /* data_packet_s */ +#include "input_ext-plugins.h" + +# ifdef __cplusplus +} +# endif + +#endif /* */ diff --git a/include/vlc/intf.h b/include/vlc/intf.h new file mode 100644 index 0000000000..4394232c63 --- /dev/null +++ b/include/vlc/intf.h @@ -0,0 +1,47 @@ +/***************************************************************************** + * intf.h: interface header for vlc + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * $Id: intf.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * 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. + *****************************************************************************/ + +#ifndef _VLC_INTF_H +#define _VLC_INTF_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + +/***************************************************************************** + * Required public headers + *****************************************************************************/ +#include + +/***************************************************************************** + * Required internal headers + *****************************************************************************/ +#include "interface.h" +#include "intf_eject.h" +#include "playlist.h" +#include "stream_control.h" +#include "input_ext-intf.h" + +# ifdef __cplusplus +} +# endif + +#endif /* */ diff --git a/include/vlc/vlc.h b/include/vlc/vlc.h new file mode 100644 index 0000000000..e94d4d3ff5 --- /dev/null +++ b/include/vlc/vlc.h @@ -0,0 +1,103 @@ +/***************************************************************************** + * vlc.h: global header for vlc + ***************************************************************************** + * Copyright (C) 1998, 1999, 2000 VideoLAN + * $Id: vlc.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * 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. + *****************************************************************************/ + +#ifndef _VLC_VLC_H +#define _VLC_VLC_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + +/***************************************************************************** + * Error values + *****************************************************************************/ +typedef signed int vlc_error_t; + +#define VLC_SUCCESS -0 /* No error */ +#define VLC_EGENERIC -1 /* Generic error */ +#define VLC_ENOMEM -2 /* Not enough memory */ +#define VLC_ESTATUS -3 /* Invalid status */ +#define VLC_EEXIT -255 /* Program exited */ + +/***************************************************************************** + * Booleans + *****************************************************************************/ +typedef int vlc_bool_t; + +#define VLC_FALSE 0 +#define VLC_TRUE 1 + +/***************************************************************************** + * Main structure status + *****************************************************************************/ +typedef int vlc_status_t; + +#define VLC_STATUS_NONE 0x00000000 +#define VLC_STATUS_CREATED 0x02020202 +#define VLC_STATUS_STOPPED 0x12121212 +#define VLC_STATUS_RUNNING 0x42424242 + +/***************************************************************************** + * Structure types + *****************************************************************************/ +#define VLC_DECLARE_STRUCT( name ) \ + struct name##_s; \ + typedef struct name##_s name##_t; +VLC_DECLARE_STRUCT(vlc) +VLC_DECLARE_STRUCT(vlc_object) + +/***************************************************************************** + * Required internal headers + *****************************************************************************/ +#if defined( __VLC__ ) +# include "defs.h" +# include "config.h" +# include "modules_inner.h" +# include "vlc_common.h" +# include "vlc_messages.h" +# include "mtime.h" +# include "modules.h" +# include "main.h" +# include "configuration.h" +# include "threads_funcs.h" +# include "vlc_objects.h" +#endif + +/***************************************************************************** + * Exported libvlc base API + *****************************************************************************/ +vlc_t * vlc_create ( void ); +vlc_error_t vlc_init ( vlc_t *, int, char *[] ); +vlc_error_t vlc_run ( vlc_t * ); +vlc_error_t vlc_stop ( vlc_t * ); +vlc_error_t vlc_end ( vlc_t * ); +vlc_error_t vlc_destroy ( vlc_t * ); + +vlc_error_t vlc_add_intf ( vlc_t *, char *, vlc_bool_t ); +vlc_error_t vlc_add_target ( vlc_t *, char * ); + +vlc_status_t vlc_status ( vlc_t * ); + +# ifdef __cplusplus +} +# endif + +#endif /* */ diff --git a/include/vlc/vout.h b/include/vlc/vout.h new file mode 100644 index 0000000000..6f71622971 --- /dev/null +++ b/include/vlc/vout.h @@ -0,0 +1,44 @@ +/***************************************************************************** + * vout.h: video output header for vlc + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * $Id: vout.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * 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. + *****************************************************************************/ + +#ifndef _VLC_VOUT_H +#define _VLC_VOUT_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + +/***************************************************************************** + * Required public headers + *****************************************************************************/ +#include + +/***************************************************************************** + * Required internal headers + *****************************************************************************/ +#include "video.h" +#include "video_output.h" + +# ifdef __cplusplus +} +# endif + +#endif /* */ diff --git a/include/common.h b/include/vlc_common.h similarity index 50% rename from include/common.h rename to include/vlc_common.h index 41e9c11d37..12de15865d 100644 --- a/include/common.h +++ b/include/vlc_common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: common.h,v 1.108 2002/05/20 22:36:42 sam Exp $ + * $Id: vlc_common.h,v 1.1 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * Vincent Seguin @@ -38,40 +38,40 @@ /***************************************************************************** * Basic types definitions *****************************************************************************/ +#ifdef HAVE_STDINT_H +# include + typedef uint8_t u8; + typedef int8_t s8; -typedef unsigned char u8; -typedef signed char s8; + typedef uint16_t u16; + typedef int16_t s16; -typedef unsigned short u16; -typedef signed short s16; + typedef uint32_t u32; + typedef int32_t s32; -typedef unsigned int u32; -typedef signed int s32; - -#if defined( _MSC_VER ) || ( defined( WIN32 ) && !defined( __MINGW32__ ) ) -typedef unsigned __int64 u64; -typedef signed __int64 s64; + typedef uint64_t u64; + typedef int64_t s64; #else -typedef unsigned long long u64; -typedef signed long long s64; -#endif + typedef unsigned char u8; + typedef signed char s8; -typedef u8 byte_t; + typedef unsigned short u16; + typedef signed short s16; -/* Boolean type */ -#ifdef BOOLEAN_T_IN_SYS_TYPES_H - /* already included */ -#elif defined(BOOLEAN_T_IN_PTHREAD_H) -# include -#elif defined(BOOLEAN_T_IN_CTHREADS_H) -# include -#else -typedef int boolean_t; -#endif -#ifdef SYS_GNU -# define _MACH_I386_BOOLEAN_H_ + typedef unsigned int u32; + typedef signed int s32; + +# if defined( _MSC_VER ) || ( defined( WIN32 ) && !defined( __MINGW32__ ) ) + typedef unsigned __int64 u64; + typedef signed __int64 s64; +# else + typedef unsigned long long u64; + typedef signed long long s64; +# endif #endif +typedef u8 byte_t; + /* ptrdiff_t definition */ #ifdef HAVE_STDDEF_H # include @@ -113,95 +113,131 @@ typedef s64 mtime_t; * Classes declaration *****************************************************************************/ -/* Plugins */ -struct plugin_bank_s; -struct plugin_info_s; +/* System */ +VLC_DECLARE_STRUCT(main_sys) -typedef struct plugin_bank_s * p_plugin_bank_t; -typedef struct plugin_info_s * p_plugin_info_t; +/* Messages */ +VLC_DECLARE_STRUCT(msg_bank) +VLC_DECLARE_STRUCT(msg_subscription) /* Playlist */ -struct playlist_s; -struct playlist_item_s; -struct module_s; -struct module_config_s; +VLC_DECLARE_STRUCT(playlist) +VLC_DECLARE_STRUCT(playlist_item) -typedef struct playlist_s * p_playlist_t; -typedef struct playlist_item_s * p_playlist_item_t; -typedef struct module_s * p_module_t; -typedef struct module_config_s * p_module_config_t; +/* Modules */ +VLC_DECLARE_STRUCT(module_bank) +VLC_DECLARE_STRUCT(module) +VLC_DECLARE_STRUCT(module_config) +VLC_DECLARE_STRUCT(module_symbols) +VLC_DECLARE_STRUCT(module_functions) /* Interface */ -struct intf_thread_s; -struct intf_sys_s; -struct intf_console_s; -struct intf_msg_s; -struct intf_channel_s; - -typedef struct intf_thread_s * p_intf_thread_t; -typedef struct intf_sys_s * p_intf_sys_t; -typedef struct intf_console_s * p_intf_console_t; -typedef struct intf_msg_s * p_intf_msg_t; -typedef struct intf_channel_s * p_intf_channel_t; +VLC_DECLARE_STRUCT(intf_thread) +VLC_DECLARE_STRUCT(intf_sys) +VLC_DECLARE_STRUCT(intf_console) +VLC_DECLARE_STRUCT(intf_msg) +VLC_DECLARE_STRUCT(intf_channel) /* Input */ -struct input_thread_s; -struct input_channel_s; -struct input_cfg_s; -struct input_area_s; - -typedef struct input_thread_s * p_input_thread_t; -typedef struct input_channel_s * p_input_channel_t; -typedef struct input_cfg_s * p_input_cfg_t; -typedef struct input_area_s * p_input_area_t; +VLC_DECLARE_STRUCT(input_thread) +VLC_DECLARE_STRUCT(input_channel) +VLC_DECLARE_STRUCT(input_cfg) +VLC_DECLARE_STRUCT(input_area) +VLC_DECLARE_STRUCT(input_buffers) +VLC_DECLARE_STRUCT(input_socket) /* Audio */ -struct aout_thread_s; -struct aout_sys_s; - -typedef struct aout_thread_s * p_aout_thread_t; -typedef struct aout_sys_s * p_aout_sys_t; +VLC_DECLARE_STRUCT(aout_thread) +VLC_DECLARE_STRUCT(aout_sys) +VLC_DECLARE_STRUCT(aout_fifo) /* Video */ -struct vout_thread_s; -struct vout_font_s; -struct vout_sys_s; -struct chroma_sys_s; -struct vdec_thread_s; -struct vpar_thread_s; -struct video_parser_s; - -typedef struct vout_thread_s * p_vout_thread_t; -typedef struct vout_font_s * p_vout_font_t; -typedef struct vout_sys_s * p_vout_sys_t; -typedef struct chroma_sys_s * p_chroma_sys_t; -typedef struct vdec_thread_s * p_vdec_thread_t; -typedef struct vpar_thread_s * p_vpar_thread_t; -typedef struct video_parser_s * p_video_parser_t; +VLC_DECLARE_STRUCT(vout_thread) +VLC_DECLARE_STRUCT(vout_font) +VLC_DECLARE_STRUCT(vout_sys) +VLC_DECLARE_STRUCT(chroma_sys) +VLC_DECLARE_STRUCT(picture) +VLC_DECLARE_STRUCT(picture_sys) +VLC_DECLARE_STRUCT(picture_heap) +VLC_DECLARE_STRUCT(subpicture) +VLC_DECLARE_STRUCT(subpicture_sys) /* Decoders */ -struct decoder_config_s; -struct decoder_fifo_s; +VLC_DECLARE_STRUCT(decoder_fifo) /* Misc */ -struct macroblock_s; -struct data_packet_s; -struct imdct_s; -struct complex_s; -struct dm_par_s; -struct picture_s; -struct picture_sys_s; -struct picture_heap_s; -struct es_descriptor_s; -struct pgrm_descriptor_s; -struct pes_packet_s; -struct input_area_s; -struct bit_stream_s; -struct input_buffers_s; -struct network_socket_s; -struct intf_subscription_s; - -typedef struct iso639_lang_s iso639_lang_t; +VLC_DECLARE_STRUCT(macroblock) +VLC_DECLARE_STRUCT(data_packet) +VLC_DECLARE_STRUCT(data_buffer) +VLC_DECLARE_STRUCT(downmix) +VLC_DECLARE_STRUCT(imdct) +VLC_DECLARE_STRUCT(complex) +VLC_DECLARE_STRUCT(dm_par) +VLC_DECLARE_STRUCT(es_descriptor) +VLC_DECLARE_STRUCT(pgrm_descriptor) +VLC_DECLARE_STRUCT(stream_descriptor) +VLC_DECLARE_STRUCT(stream_position) +VLC_DECLARE_STRUCT(stream_ctrl) +VLC_DECLARE_STRUCT(pes_packet) +VLC_DECLARE_STRUCT(bit_stream) +VLC_DECLARE_STRUCT(network_socket) +VLC_DECLARE_STRUCT(iso639_lang) + +/***************************************************************************** + * OS-specific headers and thread types + *****************************************************************************/ +#include "os_specific.h" +#include "vlc_threads.h" + +/***************************************************************************** + * Compiler-specific workarounds + *****************************************************************************/ +#if defined( __BORLANDC__ ) +# undef HAVE_VARIADIC_MACROS +#endif + +/***************************************************************************** + * Common structure members + *****************************************************************************/ + +/* VLC_COMMON_MEMBERS : members common to all basic vlc objects */ +#define VLC_COMMON_MEMBERS \ + int i_object_id; \ + int i_object_type; \ + char *psz_object_type; \ + char *psz_object_name; \ + \ + /* Thread properties, if any */ \ + vlc_bool_t b_thread; \ + vlc_thread_t thread_id; \ + vlc_mutex_t thread_lock; \ + vlc_cond_t thread_wait; \ + \ + volatile vlc_bool_t b_error; /* set by the object */ \ + volatile vlc_bool_t b_die; /* set by the outside */ \ + volatile vlc_bool_t b_dead; /* set by the object */ \ + \ + vlc_object_t * p_this; /* a pointer to ourselves */ \ + vlc_t * p_vlc; /* root of all evil */ \ + \ + volatile int i_refcount; \ + vlc_object_t ** pp_parents; /* our parents */ \ + volatile int i_parents; \ + vlc_object_t ** pp_children; /* our children */ \ + volatile int i_children; \ + \ + /* Just a reminder so that people don't cast garbage */ \ + int be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \ + +/* The real vlc_object_t type. Yes, it's that simple :-) */ +struct vlc_object_s +{ + VLC_COMMON_MEMBERS +}; + +/* CAST_TO_VLC_OBJECT: attempt at doing a clever cast */ +#define CAST_TO_VLC_OBJECT( x ) \ + ((vlc_object_t *)(x))+0*(x)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct /***************************************************************************** * Macros and inline functions @@ -500,220 +536,14 @@ typedef __int64 off_t; #endif /***************************************************************************** - * Debug macros + * Plug-in stuff *****************************************************************************/ -/* ASSERT: this macro is used to test that a pointer is not nul. It inserts - * the needed code when the program is compiled with the debug option, but - * does nothing when not in debug mode. */ -#ifdef DEBUG -# define ASSERT(p_Mem) \ - if (!(p_Mem)) \ - intf_ErrMsg("Void pointer error: " \ - "%s line %d (variable %s at address %p)\n", \ - __FILE__, __LINE__, #p_Mem, &p_Mem); +#ifndef __PLUGIN__ +# define VLC_EXPORT( type, name, args ) type name args; #else -# define ASSERT(p_Mem) +# define VLC_EXPORT( type, name, args ) ; + extern module_symbols_t* p_symbols; #endif -/***************************************************************************** - * Plug-in stuff - *****************************************************************************/ -typedef struct module_symbols_s -{ - struct main_s* p_main; - struct module_bank_s* p_module_bank; - struct input_bank_s* p_input_bank; - struct aout_bank_s* p_aout_bank; - struct vout_bank_s* p_vout_bank; - - int ( * config_GetIntVariable ) ( const char * ); - float ( * config_GetFloatVariable ) ( const char * ); - char * ( * config_GetPszVariable ) ( const char * ); - void ( * config_PutIntVariable ) ( const char *, int ); - void ( * config_PutFloatVariable ) ( const char *, float ); - void ( * config_PutPszVariable ) ( const char *, char * ); - int ( * config_LoadConfigFile ) ( const char * ); - int ( * config_SaveConfigFile ) ( const char * ); - struct module_config_s * ( * config_FindConfig ) ( const char * ); - struct module_config_s * ( * config_Duplicate ) ( struct module_config_s* ); - void ( * config_SetCallbacks ) ( struct module_config_s *, - struct module_config_s * ); - void ( * config_UnsetCallbacks ) ( struct module_config_s * ); - - struct intf_subscription_s * ( * intf_MsgSub ) ( void ); - void ( * intf_MsgUnsub ) ( struct intf_subscription_s * ); - - void ( * intf_Msg ) ( char *, ... ); - void ( * intf_ErrMsg ) ( char *, ... ); - void ( * intf_StatMsg ) ( char *, ... ); - void ( * intf_WarnMsg ) ( int, char *, ... ); - - int ( * intf_PlaylistAdd ) ( struct playlist_s *, int, const char* ); - int ( * intf_PlaylistDelete ) ( struct playlist_s *, int ); - void ( * intf_PlaylistNext ) ( struct playlist_s * ); - void ( * intf_PlaylistPrev ) ( struct playlist_s * ); - void ( * intf_PlaylistDestroy ) ( struct playlist_s * ); - void ( * intf_PlaylistJumpto ) ( struct playlist_s *, int ); - void ( * intf_UrlDecode ) ( char * ); - int ( * intf_Eject ) ( const char * ); - - void ( * msleep ) ( mtime_t ); - mtime_t ( * mdate ) ( void ); - char * ( * mstrtime ) ( char *, mtime_t ); - - int ( * network_ChannelCreate )( void ); - int ( * network_ChannelJoin ) ( int ); - - int ( * input_SetProgram ) ( struct input_thread_s *, - struct pgrm_descriptor_s * ); - void ( * input_SetStatus ) ( struct input_thread_s *, int ); - void ( * input_Seek ) ( struct input_thread_s *, off_t ); - void ( * input_DumpStream ) ( struct input_thread_s * ); - char * ( * input_OffsetToTime ) ( struct input_thread_s *, char *, off_t ); - int ( * input_ChangeES ) ( struct input_thread_s *, - struct es_descriptor_s *, u8 ); - int ( * input_ToggleES ) ( struct input_thread_s *, - struct es_descriptor_s *, boolean_t ); - int ( * input_ChangeArea ) ( struct input_thread_s *, - struct input_area_s * ); - int ( * input_ChangeProgram ) ( struct input_thread_s *, u16 ); - struct es_descriptor_s * ( * input_FindES ) ( struct input_thread_s *, - u16 ); - struct pgrm_descriptor_s * ( * input_FindProgram ) - ( struct input_thread_s *, u16 ); - struct es_descriptor_s * ( * input_AddES ) ( struct input_thread_s *, - struct pgrm_descriptor_s *, u16, size_t ); - void ( * input_DelES ) ( struct input_thread_s *, - struct es_descriptor_s * ); - int ( * input_SelectES ) ( struct input_thread_s *, - struct es_descriptor_s * ); - int ( * input_UnselectES ) ( struct input_thread_s *, - struct es_descriptor_s * ); - struct pgrm_descriptor_s* ( * input_AddProgram ) ( struct input_thread_s *, - u16, size_t ); - void ( * input_DelProgram ) ( struct input_thread_s *, - struct pgrm_descriptor_s * ); - struct input_area_s * ( * input_AddArea ) ( struct input_thread_s * ); - void ( * input_DelArea ) ( struct input_thread_s *, - struct input_area_s * ); - - void ( * InitBitstream ) ( struct bit_stream_s *, - struct decoder_fifo_s *, - void ( * ) ( struct bit_stream_s *, - boolean_t ), - void * ); - void ( * BitstreamNextDataPacket )( struct bit_stream_s * ); - boolean_t ( * NextDataPacket ) ( struct decoder_fifo_s *, - struct data_packet_s ** ); - void ( * DecoderError ) ( struct decoder_fifo_s * p_fifo ); - int ( * input_InitStream ) ( struct input_thread_s *, size_t ); - void ( * input_EndStream ) ( struct input_thread_s * ); - - void ( * input_ParsePES ) ( struct input_thread_s *, - struct es_descriptor_s * ); - void ( * input_GatherPES ) ( struct input_thread_s *, - struct data_packet_s *, - struct es_descriptor_s *, - boolean_t, boolean_t ); - void ( * input_DecodePES ) ( struct decoder_fifo_s *, - struct pes_packet_s * ); - struct es_descriptor_s * ( * input_ParsePS ) ( struct input_thread_s *, - struct data_packet_s * ); - ssize_t ( * input_ReadPS ) ( struct input_thread_s *, - struct data_packet_s ** ); - void ( * input_DemuxPS ) ( struct input_thread_s *, - struct data_packet_s * ); - ssize_t ( * input_ReadTS ) ( struct input_thread_s *, - struct data_packet_s ** ); - void ( * input_DemuxTS ) ( struct input_thread_s *, - struct data_packet_s *, - void(* pf_psi_callback) - ( struct input_thread_s *, - struct data_packet_s *, - struct es_descriptor_s *, - boolean_t ) ); - void ( * input_ClockManageRef ) ( struct input_thread_s *, - struct pgrm_descriptor_s *, - mtime_t ); - int ( * input_ClockManageControl ) ( struct input_thread_s *, - struct pgrm_descriptor_s *, - mtime_t ); - mtime_t ( *input_ClockGetTS ) ( struct input_thread_s *, - struct pgrm_descriptor_s *, - mtime_t ); - void ( * input_FDSeek ) ( struct input_thread_s *, off_t ); - void ( * input_FDClose ) ( struct input_thread_s * ); - void ( * input_FDNetworkClose ) ( struct input_thread_s * ); - ssize_t ( * input_FDRead ) ( struct input_thread_s *, byte_t *, - size_t ); - ssize_t ( * input_FDNetworkRead ) ( struct input_thread_s *, byte_t *, - size_t ); - - void * ( * input_BuffersInit )( void ); - void ( * input_BuffersEnd )( struct input_buffers_s * ); - struct data_buffer_s * ( * input_NewBuffer )( struct input_buffers_s *, size_t ); - void ( * input_ReleaseBuffer )( struct input_buffers_s *, struct data_buffer_s * ); - struct data_packet_s * ( * input_ShareBuffer )( struct input_buffers_s *, - struct data_buffer_s * ); - struct data_packet_s * ( * input_NewPacket )( struct input_buffers_s *, size_t ); - void ( * input_DeletePacket )( struct input_buffers_s *, struct data_packet_s * ); - struct pes_packet_s * ( * input_NewPES )( struct input_buffers_s * ); - void ( * input_DeletePES )( struct input_buffers_s *, struct pes_packet_s * ); - ssize_t ( * input_FillBuffer )( struct input_thread_s * ); - ssize_t ( * input_Peek )( struct input_thread_s *, byte_t **, size_t ); - ssize_t ( * input_SplitBuffer )( struct input_thread_s *, struct data_packet_s **, size_t ); - int ( * input_AccessInit )( struct input_thread_s * ); - void ( * input_AccessReinit )( struct input_thread_s * ); - void ( * input_AccessEnd )( struct input_thread_s * ); - - struct aout_fifo_s * ( * aout_CreateFifo ) ( int, int, int, int, void * ); - void ( * aout_DestroyFifo ) ( struct aout_fifo_s * ); - - struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, u32, int ); - void ( * vout_DestroyThread ) ( struct vout_thread_s *, int * ); - - struct picture_s * ( * vout_CreatePicture ) - ( struct vout_thread_s *, - boolean_t, boolean_t, boolean_t ); - void ( * vout_AllocatePicture )( struct picture_s *, int, int, u32 ); - void ( * vout_DisplayPicture ) ( struct vout_thread_s *, - struct picture_s * ); - void ( * vout_DestroyPicture ) ( struct vout_thread_s *, - struct picture_s * ); - void ( * vout_LinkPicture ) ( struct vout_thread_s *, - struct picture_s * ); - void ( * vout_UnlinkPicture ) ( struct vout_thread_s *, - struct picture_s * ); - void ( * vout_DatePicture ) ( struct vout_thread_s *, - struct picture_s *, mtime_t ); - void ( * vout_PlacePicture ) ( struct vout_thread_s *, int, int, - int *, int *, int *, int * ); - int ( * vout_ChromaCmp ) ( u32, u32 ); - - struct subpicture_s * (* vout_CreateSubPicture) - ( struct vout_thread_s *, int, int ); - void ( * vout_DestroySubPicture ) ( struct vout_thread_s *, - struct subpicture_s * ); - void ( * vout_DisplaySubPicture ) ( struct vout_thread_s *, - struct subpicture_s * ); - - u32 ( * UnalignedShowBits ) ( struct bit_stream_s *, unsigned int ); - void ( * UnalignedRemoveBits ) ( struct bit_stream_s * ); - u32 ( * UnalignedGetBits ) ( struct bit_stream_s *, unsigned int ); - void ( * CurrentPTS ) ( struct bit_stream_s *, mtime_t *, - mtime_t * ); - - const iso639_lang_t * ( * GetLang_1 ) ( const char * ); - const iso639_lang_t * ( * GetLang_2T ) ( const char * ); - const iso639_lang_t * ( * GetLang_2B ) ( const char * ); - const char * ( * DecodeLanguage ) ( u16 ); - - struct module_s * ( * module_Need ) ( int, char *, void * ); - void ( * module_Unneed ) ( struct module_s * ); - -} module_symbols_t; - -#ifdef __PLUGIN__ -extern module_symbols_t* p_symbols; -#endif +#include "vlc_symbols.h" diff --git a/include/vlc_cpu.h b/include/vlc_cpu.h new file mode 100644 index 0000000000..d5cdcb0380 --- /dev/null +++ b/include/vlc_cpu.h @@ -0,0 +1,25 @@ +/***************************************************************************** + * cpu.h: CPU type detection + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * $Id: vlc_cpu.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * Authors: Samuel Hocevar + * + * 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. + *****************************************************************************/ + +u32 CPUCapabilities( vlc_object_t * ); + diff --git a/include/vlc_messages.h b/include/vlc_messages.h new file mode 100644 index 0000000000..6aa12b5a31 --- /dev/null +++ b/include/vlc_messages.h @@ -0,0 +1,123 @@ +/***************************************************************************** + * messages.h: messages interface + * This library provides basic functions for threads to interact with user + * interface, such as message output. + ***************************************************************************** + * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN + * $Id: vlc_messages.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * Authors: Vincent Seguin + * Samuel Hocevar + * + * 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 + +/***************************************************************************** + * msg_item_t + ***************************************************************************** + * Store a single message. + *****************************************************************************/ +typedef struct +{ + int i_type; /* message type, see below */ + char * psz_module; + char * psz_msg; /* the message itself */ + +#if 0 + mtime_t date; /* date of the message */ + char * psz_file; /* file in which the function was called */ + char * psz_function; /* function from which the function was called */ + int i_line; /* line at which the function was called */ +#endif +} msg_item_t; + +/* Message types */ +#define VLC_MSG_INFO 0 /* standard messages */ +#define VLC_MSG_ERR 1 /* error messages */ +#define VLC_MSG_WARN 2 /* warning messages */ +#define VLC_MSG_DBG 3 /* debug messages */ + +/***************************************************************************** + * msg_bank_t + ***************************************************************************** + * Store all data requiered by messages interfaces. + *****************************************************************************/ +struct msg_bank_s +{ + /* Message queue lock */ + vlc_mutex_t lock; + + /* Message queue */ + msg_item_t msg[VLC_MSG_QSIZE]; /* message queue */ + int i_start; + int i_stop; + + /* Subscribers */ + int i_sub; + msg_subscription_t **pp_sub; +}; + +/***************************************************************************** + * msg_subscription_t + ***************************************************************************** + * Used by interface plugins which subscribe to the message bank. + *****************************************************************************/ +struct msg_subscription_s +{ + int i_start; + int* pi_stop; + + msg_item_t* p_msg; + vlc_mutex_t* p_lock; +}; + +/***************************************************************************** + * Prototypes + *****************************************************************************/ +VLC_EXPORT( void, __msg_Generic, ( vlc_object_t *, int, const char *, const char *, ... ) ); +VLC_EXPORT( void, __msg_Info, ( void *, const char *, ... ) ); +VLC_EXPORT( void, __msg_Err, ( void *, const char *, ... ) ); +VLC_EXPORT( void, __msg_Warn, ( void *, const char *, ... ) ); +VLC_EXPORT( void, __msg_Dbg, ( void *, const char *, ... ) ); + +#ifdef HAVE_VARIADIC_MACROS + +# define msg_Info( p_this, psz_format, args... ) \ + __msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_INFO, MODULE_STRING, \ + psz_format, ## args ) + +# define msg_Err( p_this, psz_format, args... ) \ + __msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_ERR, MODULE_STRING, \ + psz_format, ## args ) + +# define msg_Warn( p_this, psz_format, args... ) \ + __msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_WARN, MODULE_STRING, \ + psz_format, ## args ) + +# define msg_Dbg( p_this, psz_format, args... ) \ + __msg_Generic( CAST_TO_VLC_OBJECT(p_this), VLC_MSG_DBG, MODULE_STRING, \ + psz_format, ## args ) + +#else /* HAVE_VARIADIC_MACROS */ + +# define msg_Info __msg_Info +# define msg_Err __msg_Err +# define msg_Warn __msg_Warn +# define msg_Dbg __msg_Dbg + +#endif /* HAVE_VARIADIC_MACROS */ + diff --git a/include/vlc_objects.h b/include/vlc_objects.h new file mode 100644 index 0000000000..64cff0ef7f --- /dev/null +++ b/include/vlc_objects.h @@ -0,0 +1,90 @@ +/***************************************************************************** + * vlc_objects.h: vlc_object_t definition. + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * $Id: vlc_objects.h,v 1.1 2002/06/01 12:31:58 sam Exp $ + * + * Authors: Samuel Hocevar + * + * 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. + *****************************************************************************/ + +/* Object types */ +#define VLC_OBJECT_ROOT (-1) +#define VLC_OBJECT_MODULE (-2) +#define VLC_OBJECT_INTF (-3) +#define VLC_OBJECT_PLAYLIST (-4) +#define VLC_OBJECT_INPUT (-5) +#define VLC_OBJECT_DECODER (-6) +#define VLC_OBJECT_VOUT (-7) +#define VLC_OBJECT_AOUT (-8) +#define VLC_OBJECT_PRIVATE (-666) + +/* Object search mode */ +#define FIND_PARENT 0x0001 +#define FIND_CHILD 0x0002 +#define FIND_ANYWHERE 0x0003 + +#define FIND_STRICT 0x0010 + +/***************************************************************************** + * Prototypes + *****************************************************************************/ +VLC_EXPORT( void *, __vlc_object_create, ( vlc_object_t *, int ) ); +VLC_EXPORT( void, __vlc_object_destroy, ( vlc_object_t * ) ); +VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) ); +VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) ); +VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) ); +VLC_EXPORT( void, __vlc_object_unlink, ( vlc_object_t *, vlc_object_t * ) ); +VLC_EXPORT( void, __vlc_object_unlink_all, ( vlc_object_t * ) ); +VLC_EXPORT( void, __vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) ); +#if 0 +//VLC_EXPORT( void, __vlc_object_setchild, ( vlc_object_t *, vlc_object_t * ) ); +#endif + +VLC_EXPORT( void, __vlc_dumpstructure, ( vlc_object_t * ) ); + +#define vlc_object_create(a,b) \ + __vlc_object_create( CAST_TO_VLC_OBJECT(a), b ) + +#define vlc_object_destroy(a) \ + __vlc_object_destroy( CAST_TO_VLC_OBJECT(a) ) + +#define vlc_object_find(a,b,c) \ + __vlc_object_find( CAST_TO_VLC_OBJECT(a),b,c) + +#define vlc_object_yield(a) \ + __vlc_object_yield( CAST_TO_VLC_OBJECT(a) ) + +#define vlc_object_release(a) \ + __vlc_object_release( CAST_TO_VLC_OBJECT(a) ) + +#define vlc_object_unlink(a,b) \ + __vlc_object_unlink( CAST_TO_VLC_OBJECT(a), CAST_TO_VLC_OBJECT(b) ) + +#define vlc_object_unlink_all(a) \ + __vlc_object_unlink_all( CAST_TO_VLC_OBJECT(a) ) + +#define vlc_object_attach(a,b) \ + __vlc_object_attach( CAST_TO_VLC_OBJECT(a), CAST_TO_VLC_OBJECT(b) ) + +#if 0 +#define vlc_object_setchild(a,b) \ + __vlc_object_setchild( CAST_TO_VLC_OBJECT(a), CAST_TO_VLC_OBJECT(b) ) +#endif + +#define vlc_dumpstructure(a) \ + __vlc_dumpstructure( CAST_TO_VLC_OBJECT(a) ) + diff --git a/include/vlc_symbols.h b/include/vlc_symbols.h new file mode 100644 index 0000000000..a20aab3b91 --- /dev/null +++ b/include/vlc_symbols.h @@ -0,0 +1,273 @@ +/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */ + +struct module_symbols_s +{ + aout_fifo_t * (* aout_CreateFifo_inner) ( vlc_object_t *, int, int, int, int, void * ) ; + void (* aout_DestroyFifo_inner) ( aout_fifo_t *p_fifo ) ; + int (* __config_GetInt_inner) (vlc_object_t *, const char *) ; + void (* __config_PutInt_inner) (vlc_object_t *, const char *, int) ; + float (* __config_GetFloat_inner) (vlc_object_t *, const char *) ; + void (* __config_PutFloat_inner) (vlc_object_t *, const char *, float) ; + char * (* __config_GetPsz_inner) (vlc_object_t *, const char *) ; + void (* __config_PutPsz_inner) (vlc_object_t *, const char *, char *) ; + int (* config_LoadCmdLine_inner) ( vlc_object_t *, int *, char *[], vlc_bool_t ) ; + char * (* config_GetHomeDir_inner) ( void ) ; + int (* config_LoadConfigFile_inner) ( vlc_object_t *, const char * ) ; + int (* config_SaveConfigFile_inner) ( vlc_object_t *, const char * ) ; + module_config_t * (* config_FindConfig_inner) ( vlc_object_t *, const char *psz_name ) ; + void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ; + void (* config_SetCallbacks_inner) ( module_config_t *, module_config_t * ) ; + void (* config_UnsetCallbacks_inner) ( module_config_t * ) ; + void (* InitBitstream_inner) ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) ; + vlc_bool_t (* NextDataPacket_inner) ( decoder_fifo_t *, data_packet_t ** ) ; + void (* BitstreamNextDataPacket_inner) ( bit_stream_t * ) ; + u32 (* UnalignedShowBits_inner) ( bit_stream_t *, unsigned int ) ; + void (* UnalignedRemoveBits_inner) ( bit_stream_t * ) ; + u32 (* UnalignedGetBits_inner) ( bit_stream_t *, unsigned int ) ; + void (* CurrentPTS_inner) ( bit_stream_t *, mtime_t *, mtime_t * ) ; + void (* DecoderError_inner) ( decoder_fifo_t * p_fifo ) ; + void (* __input_SetStatus_inner) ( vlc_object_t *, int ) ; + void (* __input_Seek_inner) ( vlc_object_t *, off_t, int ) ; + void (* __input_Tell_inner) ( vlc_object_t *, stream_position_t * ) ; + void (* input_DumpStream_inner) ( input_thread_t * ) ; + char * (* input_OffsetToTime_inner) ( input_thread_t *, char *, off_t ) ; + int (* input_ChangeES_inner) ( input_thread_t *, es_descriptor_t *, u8 ) ; + int (* input_ToggleES_inner) ( input_thread_t *, es_descriptor_t *, vlc_bool_t ) ; + int (* input_ChangeArea_inner) ( input_thread_t *, input_area_t * ) ; + int (* input_ChangeProgram_inner) ( input_thread_t *, u16 ) ; + int (* input_InitStream_inner) ( input_thread_t *, size_t ) ; + void (* input_EndStream_inner) ( input_thread_t * ) ; + pgrm_descriptor_t * (* input_FindProgram_inner) ( input_thread_t *, u16 ) ; + pgrm_descriptor_t * (* input_AddProgram_inner) ( input_thread_t *, u16, size_t ) ; + void (* input_DelProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ; + int (* input_SetProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ; + input_area_t * (* input_AddArea_inner) ( input_thread_t * ) ; + void (* input_DelArea_inner) ( input_thread_t *, input_area_t * ) ; + es_descriptor_t * (* input_FindES_inner) ( input_thread_t *, u16 ) ; + es_descriptor_t * (* input_AddES_inner) ( input_thread_t *, pgrm_descriptor_t *, u16, size_t ) ; + void (* input_DelES_inner) ( input_thread_t *, es_descriptor_t * ) ; + int (* input_SelectES_inner) ( input_thread_t *, es_descriptor_t * ) ; + int (* input_UnselectES_inner) ( input_thread_t *, es_descriptor_t * ) ; + void (* input_DecodePES_inner) ( decoder_fifo_t *, pes_packet_t * ) ; + int (* input_ClockManageControl_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ; + void (* input_ClockManageRef_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ; + mtime_t (* input_ClockGetTS_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ; + void * (* input_BuffersInit_inner) ( vlc_object_t * ) ; + void (* input_BuffersEnd_inner) ( input_thread_t *, input_buffers_t * ) ; + data_buffer_t * (* input_NewBuffer_inner) ( input_buffers_t *, size_t ) ; + void (* input_ReleaseBuffer_inner) ( input_buffers_t *, data_buffer_t * ) ; + data_packet_t * (* input_ShareBuffer_inner) ( input_buffers_t *, data_buffer_t * ) ; + data_packet_t * (* input_NewPacket_inner) ( input_buffers_t *, size_t ) ; + void (* input_DeletePacket_inner) ( input_buffers_t *, data_packet_t * ) ; + pes_packet_t * (* input_NewPES_inner) ( input_buffers_t * ) ; + void (* input_DeletePES_inner) ( input_buffers_t *, pes_packet_t * ) ; + ssize_t (* input_FillBuffer_inner) ( input_thread_t * ) ; + ssize_t (* input_Peek_inner) ( input_thread_t *, byte_t **, size_t ) ; + ssize_t (* input_SplitBuffer_inner) ( input_thread_t *, data_packet_t **, size_t ) ; + int (* input_AccessInit_inner) ( input_thread_t * ) ; + void (* input_AccessReinit_inner) ( input_thread_t * ) ; + void (* input_AccessEnd_inner) ( input_thread_t * ) ; + void (* input_ParsePES_inner) ( input_thread_t *, es_descriptor_t * ) ; + void (* input_GatherPES_inner) ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t, vlc_bool_t ) ; + ssize_t (* input_ReadPS_inner) ( input_thread_t *, data_packet_t ** ) ; + es_descriptor_t * (* input_ParsePS_inner) ( input_thread_t *, data_packet_t * ) ; + ssize_t (* input_ReadTS_inner) ( input_thread_t *, data_packet_t ** ) ; + void (* input_DemuxPS_inner) ( input_thread_t *, data_packet_t * ) ; + void (* input_DemuxTS_inner) ( input_thread_t *, data_packet_t *, void(*) ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t ) ) ; + void (* input_FDClose_inner) ( input_thread_t * ) ; + void (* input_FDNetworkClose_inner) ( input_thread_t * ) ; + ssize_t (* input_FDRead_inner) ( input_thread_t *, byte_t *, size_t ) ; + ssize_t (* input_FDNetworkRead_inner) ( input_thread_t *, byte_t *, size_t ) ; + void (* input_FDSeek_inner) ( input_thread_t *, off_t ) ; + msg_subscription_t* (* msg_Subscribe_inner) ( vlc_object_t * ) ; + void (* msg_Unsubscribe_inner) ( vlc_object_t *, msg_subscription_t * ) ; + int (* intf_Eject_inner) ( vlc_object_t *, const char * ) ; + const iso639_lang_t * (* GetLang_1_inner) ( const char * ) ; + const iso639_lang_t * (* GetLang_2T_inner) ( const char * ) ; + const iso639_lang_t * (* GetLang_2B_inner) ( const char * ) ; + const char * (* DecodeLanguage_inner) ( u16 ) ; + module_t * (* __module_Need_inner) ( vlc_object_t *, int, char *, void * ) ; + void (* module_Unneed_inner) ( module_t * ) ; + char * (* mstrtime_inner) ( char *psz_buffer, mtime_t date ) ; + mtime_t (* mdate_inner) ( void ) ; + void (* mwait_inner) ( mtime_t date ) ; + void (* msleep_inner) ( mtime_t delay ) ; + int (* network_ChannelJoin_inner) ( vlc_object_t *, int ) ; + int (* network_ChannelCreate_inner) ( vlc_object_t * ) ; + void (* playlist_Command_inner) ( playlist_t *, int, int ) ; + int (* playlist_Add_inner) ( vlc_object_t *, int, const char * ) ; + int (* playlist_Delete_inner) ( playlist_t *, int ) ; + int (* __vlc_threads_init_inner) ( vlc_object_t * ) ; + int (* vlc_threads_end_inner) ( void ) ; + int (* __vlc_mutex_init_inner) ( vlc_object_t *, vlc_mutex_t * ) ; + int (* __vlc_mutex_destroy_inner) ( char *, int, vlc_mutex_t * ) ; + int (* vlc_cond_init_inner) ( vlc_cond_t * ) ; + int (* __vlc_cond_destroy_inner) ( char *, int, vlc_cond_t * ) ; + int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), vlc_bool_t ) ; + void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ; + void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ; + vout_thread_t * (* vout_CreateThread_inner) ( vlc_object_t *, int, int, u32, int ) ; + void (* vout_DestroyThread_inner) ( vout_thread_t * ) ; + int (* vout_ChromaCmp_inner) ( u32, u32 ) ; + picture_t * (* vout_CreatePicture_inner) ( vout_thread_t *, vlc_bool_t, vlc_bool_t, vlc_bool_t ) ; + void (* vout_AllocatePicture_inner) ( vout_thread_t *, picture_t *, int, int, u32 ) ; + void (* vout_DestroyPicture_inner) ( vout_thread_t *, picture_t * ) ; + void (* vout_DisplayPicture_inner) ( vout_thread_t *, picture_t * ) ; + void (* vout_DatePicture_inner) ( vout_thread_t *, picture_t *, mtime_t ) ; + void (* vout_LinkPicture_inner) ( vout_thread_t *, picture_t * ) ; + void (* vout_UnlinkPicture_inner) ( vout_thread_t *, picture_t * ) ; + void (* vout_PlacePicture_inner) ( vout_thread_t *, int, int, int *, int *, int *, int * ) ; + subpicture_t * (* vout_CreateSubPicture_inner) ( vout_thread_t *, int, int ) ; + void (* vout_DestroySubPicture_inner) ( vout_thread_t *, subpicture_t * ) ; + void (* vout_DisplaySubPicture_inner) ( vout_thread_t *, subpicture_t * ) ; + void (* __msg_Generic_inner) ( vlc_object_t *, int, const char *, const char *, ... ) ; + void (* __msg_Info_inner) ( void *, const char *, ... ) ; + void (* __msg_Err_inner) ( void *, const char *, ... ) ; + void (* __msg_Warn_inner) ( void *, const char *, ... ) ; + void (* __msg_Dbg_inner) ( void *, const char *, ... ) ; + void * (* __vlc_object_create_inner) ( vlc_object_t *, int ) ; + void (* __vlc_object_destroy_inner) ( vlc_object_t * ) ; + void * (* __vlc_object_find_inner) ( vlc_object_t *, int, int ) ; + void (* __vlc_object_yield_inner) ( vlc_object_t * ) ; + void (* __vlc_object_release_inner) ( vlc_object_t * ) ; + void (* __vlc_object_unlink_inner) ( vlc_object_t *, vlc_object_t * ) ; + void (* __vlc_object_unlink_all_inner) ( vlc_object_t * ) ; + void (* __vlc_object_attach_inner) ( vlc_object_t *, vlc_object_t * ) ; + void (* __vlc_dumpstructure_inner) ( vlc_object_t * ) ; +}; + +#ifdef __PLUGIN__ +# define aout_CreateFifo p_symbols->aout_CreateFifo_inner +# define aout_DestroyFifo p_symbols->aout_DestroyFifo_inner +# define __config_GetInt p_symbols->__config_GetInt_inner +# define __config_PutInt p_symbols->__config_PutInt_inner +# define __config_GetFloat p_symbols->__config_GetFloat_inner +# define __config_PutFloat p_symbols->__config_PutFloat_inner +# define __config_GetPsz p_symbols->__config_GetPsz_inner +# define __config_PutPsz p_symbols->__config_PutPsz_inner +# define config_LoadCmdLine p_symbols->config_LoadCmdLine_inner +# define config_GetHomeDir p_symbols->config_GetHomeDir_inner +# define config_LoadConfigFile p_symbols->config_LoadConfigFile_inner +# define config_SaveConfigFile p_symbols->config_SaveConfigFile_inner +# define config_FindConfig p_symbols->config_FindConfig_inner +# define config_Duplicate p_symbols->config_Duplicate_inner +# define config_SetCallbacks p_symbols->config_SetCallbacks_inner +# define config_UnsetCallbacks p_symbols->config_UnsetCallbacks_inner +# define InitBitstream p_symbols->InitBitstream_inner +# define NextDataPacket p_symbols->NextDataPacket_inner +# define BitstreamNextDataPacket p_symbols->BitstreamNextDataPacket_inner +# define UnalignedShowBits p_symbols->UnalignedShowBits_inner +# define UnalignedRemoveBits p_symbols->UnalignedRemoveBits_inner +# define UnalignedGetBits p_symbols->UnalignedGetBits_inner +# define CurrentPTS p_symbols->CurrentPTS_inner +# define DecoderError p_symbols->DecoderError_inner +# define __input_SetStatus p_symbols->__input_SetStatus_inner +# define __input_Seek p_symbols->__input_Seek_inner +# define __input_Tell p_symbols->__input_Tell_inner +# define input_DumpStream p_symbols->input_DumpStream_inner +# define input_OffsetToTime p_symbols->input_OffsetToTime_inner +# define input_ChangeES p_symbols->input_ChangeES_inner +# define input_ToggleES p_symbols->input_ToggleES_inner +# define input_ChangeArea p_symbols->input_ChangeArea_inner +# define input_ChangeProgram p_symbols->input_ChangeProgram_inner +# define input_InitStream p_symbols->input_InitStream_inner +# define input_EndStream p_symbols->input_EndStream_inner +# define input_FindProgram p_symbols->input_FindProgram_inner +# define input_AddProgram p_symbols->input_AddProgram_inner +# define input_DelProgram p_symbols->input_DelProgram_inner +# define input_SetProgram p_symbols->input_SetProgram_inner +# define input_AddArea p_symbols->input_AddArea_inner +# define input_DelArea p_symbols->input_DelArea_inner +# define input_FindES p_symbols->input_FindES_inner +# define input_AddES p_symbols->input_AddES_inner +# define input_DelES p_symbols->input_DelES_inner +# define input_SelectES p_symbols->input_SelectES_inner +# define input_UnselectES p_symbols->input_UnselectES_inner +# define input_DecodePES p_symbols->input_DecodePES_inner +# define input_ClockManageControl p_symbols->input_ClockManageControl_inner +# define input_ClockManageRef p_symbols->input_ClockManageRef_inner +# define input_ClockGetTS p_symbols->input_ClockGetTS_inner +# define input_BuffersInit p_symbols->input_BuffersInit_inner +# define input_BuffersEnd p_symbols->input_BuffersEnd_inner +# define input_NewBuffer p_symbols->input_NewBuffer_inner +# define input_ReleaseBuffer p_symbols->input_ReleaseBuffer_inner +# define input_ShareBuffer p_symbols->input_ShareBuffer_inner +# define input_NewPacket p_symbols->input_NewPacket_inner +# define input_DeletePacket p_symbols->input_DeletePacket_inner +# define input_NewPES p_symbols->input_NewPES_inner +# define input_DeletePES p_symbols->input_DeletePES_inner +# define input_FillBuffer p_symbols->input_FillBuffer_inner +# define input_Peek p_symbols->input_Peek_inner +# define input_SplitBuffer p_symbols->input_SplitBuffer_inner +# define input_AccessInit p_symbols->input_AccessInit_inner +# define input_AccessReinit p_symbols->input_AccessReinit_inner +# define input_AccessEnd p_symbols->input_AccessEnd_inner +# define input_ParsePES p_symbols->input_ParsePES_inner +# define input_GatherPES p_symbols->input_GatherPES_inner +# define input_ReadPS p_symbols->input_ReadPS_inner +# define input_ParsePS p_symbols->input_ParsePS_inner +# define input_ReadTS p_symbols->input_ReadTS_inner +# define input_DemuxPS p_symbols->input_DemuxPS_inner +# define input_DemuxTS p_symbols->input_DemuxTS_inner +# define input_FDClose p_symbols->input_FDClose_inner +# define input_FDNetworkClose p_symbols->input_FDNetworkClose_inner +# define input_FDRead p_symbols->input_FDRead_inner +# define input_FDNetworkRead p_symbols->input_FDNetworkRead_inner +# define input_FDSeek p_symbols->input_FDSeek_inner +# define msg_Subscribe p_symbols->msg_Subscribe_inner +# define msg_Unsubscribe p_symbols->msg_Unsubscribe_inner +# define intf_Eject p_symbols->intf_Eject_inner +# define GetLang_1 p_symbols->GetLang_1_inner +# define GetLang_2T p_symbols->GetLang_2T_inner +# define GetLang_2B p_symbols->GetLang_2B_inner +# define DecodeLanguage p_symbols->DecodeLanguage_inner +# define __module_Need p_symbols->__module_Need_inner +# define module_Unneed p_symbols->module_Unneed_inner +# define mstrtime p_symbols->mstrtime_inner +# define mdate p_symbols->mdate_inner +# define mwait p_symbols->mwait_inner +# define msleep p_symbols->msleep_inner +# define network_ChannelJoin p_symbols->network_ChannelJoin_inner +# define network_ChannelCreate p_symbols->network_ChannelCreate_inner +# define playlist_Command p_symbols->playlist_Command_inner +# define playlist_Add p_symbols->playlist_Add_inner +# define playlist_Delete p_symbols->playlist_Delete_inner +# define __vlc_threads_init p_symbols->__vlc_threads_init_inner +# define vlc_threads_end p_symbols->vlc_threads_end_inner +# define __vlc_mutex_init p_symbols->__vlc_mutex_init_inner +# define __vlc_mutex_destroy p_symbols->__vlc_mutex_destroy_inner +# define vlc_cond_init p_symbols->vlc_cond_init_inner +# define __vlc_cond_destroy p_symbols->__vlc_cond_destroy_inner +# define __vlc_thread_create p_symbols->__vlc_thread_create_inner +# define __vlc_thread_ready p_symbols->__vlc_thread_ready_inner +# define __vlc_thread_join p_symbols->__vlc_thread_join_inner +# define vout_CreateThread p_symbols->vout_CreateThread_inner +# define vout_DestroyThread p_symbols->vout_DestroyThread_inner +# define vout_ChromaCmp p_symbols->vout_ChromaCmp_inner +# define vout_CreatePicture p_symbols->vout_CreatePicture_inner +# define vout_AllocatePicture p_symbols->vout_AllocatePicture_inner +# define vout_DestroyPicture p_symbols->vout_DestroyPicture_inner +# define vout_DisplayPicture p_symbols->vout_DisplayPicture_inner +# define vout_DatePicture p_symbols->vout_DatePicture_inner +# define vout_LinkPicture p_symbols->vout_LinkPicture_inner +# define vout_UnlinkPicture p_symbols->vout_UnlinkPicture_inner +# define vout_PlacePicture p_symbols->vout_PlacePicture_inner +# define vout_CreateSubPicture p_symbols->vout_CreateSubPicture_inner +# define vout_DestroySubPicture p_symbols->vout_DestroySubPicture_inner +# define vout_DisplaySubPicture p_symbols->vout_DisplaySubPicture_inner +# define __msg_Generic p_symbols->__msg_Generic_inner +# define __msg_Info p_symbols->__msg_Info_inner +# define __msg_Err p_symbols->__msg_Err_inner +# define __msg_Warn p_symbols->__msg_Warn_inner +# define __msg_Dbg p_symbols->__msg_Dbg_inner +# define __vlc_object_create p_symbols->__vlc_object_create_inner +# define __vlc_object_destroy p_symbols->__vlc_object_destroy_inner +# define __vlc_object_find p_symbols->__vlc_object_find_inner +# define __vlc_object_yield p_symbols->__vlc_object_yield_inner +# define __vlc_object_release p_symbols->__vlc_object_release_inner +# define __vlc_object_unlink p_symbols->__vlc_object_unlink_inner +# define __vlc_object_unlink_all p_symbols->__vlc_object_unlink_all_inner +# define __vlc_object_attach p_symbols->__vlc_object_attach_inner +# define __vlc_dumpstructure p_symbols->__vlc_dumpstructure_inner +#endif /* __PLUGIN__ */ + diff --git a/include/threads.h b/include/vlc_threads.h similarity index 79% rename from include/threads.h rename to include/vlc_threads.h index 9e3e0622a4..fc9123670c 100644 --- a/include/threads.h +++ b/include/vlc_threads.h @@ -3,7 +3,7 @@ * This header provides a portable threads implementation. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: threads.h,v 1.42 2002/04/27 22:11:22 gbazin Exp $ + * $Id: vlc_threads.h,v 1.1 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -36,17 +36,17 @@ #elif defined( ST_INIT_IN_ST_H ) /* State threads */ # include -#elif defined( WIN32 ) +#elif defined( WIN32 ) /* Win32 API */ # include #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */ # include # ifdef DEBUG -/* Needed for pthread_cond_timedwait */ + /* Needed for pthread_cond_timedwait */ # include # endif -/* This is not prototyped under Linux, though it exists. */ -int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind ); + /* This is not prototyped under Linux, though it exists. */ + int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind ); #elif defined( HAVE_CTHREADS_H ) /* GNUMach */ # include @@ -106,8 +106,9 @@ typedef HANDLE vlc_thread_t; typedef struct { - CRITICAL_SECTION csection; - HANDLE mutex; + CRITICAL_SECTION csection; + HANDLE mutex; + SIGNALOBJECTANDWAIT SignalObjectAndWait; } vlc_mutex_t; typedef struct @@ -127,16 +128,18 @@ typedef pthread_cond_t vlc_cond_t; typedef cthread_t vlc_thread_t; /* Those structs are the ones defined in /include/cthreads.h but we need - * to handle (*foo) where foo is a (mutex_t) while they handle (foo) where + * to handle (&foo) where foo is a (mutex_t) while they handle (foo) where * foo is a (mutex_t*) */ -typedef struct s_mutex { +typedef struct +{ spin_lock_t held; spin_lock_t lock; char *name; struct cthread_queue queue; } vlc_mutex_t; -typedef struct s_condition { +typedef struct +{ spin_lock_t lock; struct cthread_queue queue; char *name; @@ -164,45 +167,3 @@ typedef struct #endif -typedef void *(*vlc_thread_func_t)(void *p_data); - - -/***************************************************************************** - * Prototype for GPROF wrapper - *****************************************************************************/ - -#ifdef GPROF -/* Wrapper function for profiling */ -static void * vlc_thread_wrapper ( void *p_wrapper ); - -# ifdef WIN32 - -# define ITIMER_REAL 1 -# define ITIMER_PROF 2 - -struct itimerval -{ - struct timeval it_value; - struct timeval it_interval; -}; - -int setitimer(int kind, const struct itimerval* itnew, struct itimerval* itold); - -# endif /* WIN32 */ - -typedef struct wrapper_s -{ - /* Data lock access */ - vlc_mutex_t lock; - vlc_cond_t wait; - - /* Data used to spawn the real thread */ - vlc_thread_func_t func; - void *p_data; - - /* Profiling timer passed to the thread */ - struct itimerval itimer; - -} wrapper_t; - -#endif /* GPROF */ diff --git a/include/win32_specific.h b/include/win32_specific.h index 18a2c21033..4a64466464 100644 --- a/include/win32_specific.h +++ b/include/win32_specific.h @@ -2,7 +2,7 @@ * win32_specific.h: Win32 specific features ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: win32_specific.h,v 1.2 2002/04/02 23:43:57 gbazin Exp $ + * $Id: win32_specific.h,v 1.3 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * Gildas Bazin @@ -33,9 +33,9 @@ typedef BOOL (WINAPI *SIGNALOBJECTANDWAIT)( HANDLE, HANDLE, DWORD, BOOL ); * This structure is a system specific descriptor. It describes the Win32 * properties of the program. *****************************************************************************/ -typedef struct main_sys_s +struct main_sys_s { SIGNALOBJECTANDWAIT SignalObjectAndWait; - boolean_t b_fast_pthread; + vlc_bool_t b_fast_pthread; +}; -} main_sys_t; diff --git a/ipkg/rules b/ipkg/rules index 9a9d543ea3..705904a97a 100755 --- a/ipkg/rules +++ b/ipkg/rules @@ -8,7 +8,7 @@ export CC=arm-linux-gcc export LD=arm-linux-ld export STRIP=arm-linux-strip export CONFIG_FLAGS="--enable-release --prefix=/usr --disable-gtk --enable-fb --enable-sdl --disable-xvideo --disable-plugins --with-tuning=strongarm1100 --x-includes=/skiff/local/arm-linux/include --x-libraries=/skiff/local/arm-linux/lib/X11 --with-sdl-config-path=/skiff/local/bin --with-mad=/skiff/local/arm-linux" -export VIDDIR="usr/share/videolan" +export VIDDIR="usr/share/vlc" export PIXDIR="usr/share/pixmaps" export DESTDIR=/tmp/vlc diff --git a/plugins/a52/a52.c b/plugins/a52/a52.c index 68bb70f4a9..89815730b4 100644 --- a/plugins/a52/a52.c +++ b/plugins/a52/a52.c @@ -4,7 +4,7 @@ * (http://liba52.sf.net/). ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: a52.c,v 1.15 2002/05/31 21:56:01 massiot Exp $ + * $Id: a52.c,v 1.16 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -30,12 +30,9 @@ #include /* strdup() */ #include /* int16_t .. */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include #ifdef USE_A52DEC_TREE /* liba52 header file */ #include "include/a52.h" @@ -51,12 +48,12 @@ * Local prototypes *****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static int DecodeFrame ( a52_adec_thread_t * ); static int InitThread ( a52_adec_thread_t * ); static void EndThread ( a52_adec_thread_t * ); -static void BitstreamCallback ( bit_stream_t *, boolean_t ); +static void BitstreamCallback ( bit_stream_t *, vlc_bool_t ); static void float2s16_2 ( float *, int16_t * ); static inline int16_t convert ( int32_t ); @@ -76,8 +73,8 @@ void _M( adec_getfunctions )( function_list_t * p_function_list ) #define DYNRNG_LONGTEXT N_( \ "Dynamic range compression makes the loud sounds softer, and the soft " \ "sounds louder, so you can more easily listen to the stream in a noisy " \ - "environment without disturbing anyone.\nIf you disable the dynamic range"\ - " compression the playback will be more adapted to a movie theater or a " \ + "environment without disturbing anyone. If you disable the dynamic range "\ + "compression the playback will be more adapted to a movie theater or a " \ "listening room.") MODULE_CONFIG_START @@ -88,7 +85,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("a52 ATSC A/52 aka AC-3 audio decoder module") ) ADD_CAPABILITY( DECODER, 40 ) - ADD_SHORTCUT( "a52" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -112,18 +108,16 @@ static int decoder_Probe( u8 *pi_type ) /***************************************************************************** * decoder_Run: this function is called just after the thread is created *****************************************************************************/ -static int decoder_Run ( decoder_config_t *p_config ) +static int decoder_Run ( decoder_fifo_t *p_fifo ) { a52_adec_thread_t *p_a52_adec; /* Allocate the memory needed to store the thread's structure */ - p_a52_adec = - (a52_adec_thread_t *)malloc( sizeof(a52_adec_thread_t) ); + p_a52_adec = (a52_adec_thread_t *)malloc( sizeof(a52_adec_thread_t) ); if (p_a52_adec == NULL) { - intf_ErrMsg ( "a52 error: not enough memory " - "for decoder_Run() to allocate p_a52_adec" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } @@ -134,12 +128,12 @@ static int decoder_Run ( decoder_config_t *p_config ) * Initialize the thread properties */ p_a52_adec->p_aout_fifo = NULL; - p_a52_adec->p_config = p_config; - p_a52_adec->p_fifo = p_a52_adec->p_config->p_decoder_fifo; + p_a52_adec->p_fifo = p_fifo; + if( InitThread( p_a52_adec ) ) { - intf_ErrMsg( "a52 error: could not initialize thread" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_a52_adec->p_fifo, "could not initialize thread" ); + DecoderError( p_fifo ); free( p_a52_adec ); return( -1 ); } @@ -168,13 +162,13 @@ static int decoder_Run ( decoder_config_t *p_config ) if( !p_a52_adec->frame_size ) { - intf_WarnMsg( 3, "a52: a52_syncinfo failed" ); + msg_Warn( p_a52_adec->p_fifo, "a52_syncinfo failed" ); continue; } if( DecodeFrame( p_a52_adec ) && !p_a52_adec->p_fifo->b_die ) { - DecoderError( p_config->p_decoder_fifo ); + DecoderError( p_fifo ); free( p_a52_adec ); return( -1 ); } @@ -198,18 +192,15 @@ static int decoder_Run ( decoder_config_t *p_config ) *****************************************************************************/ static int InitThread( a52_adec_thread_t * p_a52_adec ) { - intf_WarnMsg( 3, "a52: InitThread" ); - /* Initialize liba52 */ p_a52_adec->p_a52_state = a52_init( 0 ); if( p_a52_adec->p_a52_state == NULL ) { - intf_ErrMsg ( "a52 error: InitThread() unable to initialize " - "liba52" ); + msg_Err( p_a52_adec->p_fifo, "unable to initialize liba52" ); return -1; } - p_a52_adec->b_dynrng = config_GetIntVariable( "a52-dynrng" ); + p_a52_adec->b_dynrng = config_GetInt( p_a52_adec->p_fifo, "a52-dynrng" ); /* Init the BitStream */ InitBitstream( &p_a52_adec->bit_stream, @@ -243,8 +234,8 @@ static int DecodeFrame( a52_adec_thread_t * p_a52_adec ) /* Creating the audio output fifo if not created yet */ if( p_a52_adec->p_aout_fifo == NULL ) { - p_a52_adec->p_aout_fifo = aout_CreateFifo( AOUT_FIFO_PCM, - p_a52_adec->i_channels, + p_a52_adec->p_aout_fifo = aout_CreateFifo( p_a52_adec->p_fifo->p_this, + AOUT_FIFO_PCM, p_a52_adec->i_channels, p_a52_adec->sample_rate, AC3DEC_FRAME_SIZE * p_a52_adec->i_channels, NULL ); @@ -292,7 +283,9 @@ static int DecodeFrame( a52_adec_thread_t * p_a52_adec ) for( i = 0; i < 6; i++ ) { if( a52_block( p_a52_adec->p_a52_state ) ) - intf_WarnMsg( 5, "a52: a52_block failed for block %i", i ); + { + msg_Warn( p_a52_adec->p_fifo, "a52_block failed for block %i", i ); + } float2s16_2( a52_samples( p_a52_adec->p_a52_state ), ((int16_t *)p_buffer) + i * 256 * p_a52_adec->i_channels ); @@ -313,8 +306,6 @@ static int DecodeFrame( a52_adec_thread_t * p_a52_adec ) *****************************************************************************/ static void EndThread (a52_adec_thread_t *p_a52_adec) { - intf_WarnMsg ( 3, "a52: EndThread" ); - /* If the audio output fifo was created, we destroy it */ if (p_a52_adec->p_aout_fifo != NULL) { @@ -362,7 +353,7 @@ static void float2s16_2 (float * _f, int16_t * s16) * This function is called by input's NextDataPacket. *****************************************************************************/ static void BitstreamCallback ( bit_stream_t * p_bit_stream, - boolean_t b_new_pes ) + vlc_bool_t b_new_pes ) { if( b_new_pes ) { diff --git a/plugins/a52/a52.h b/plugins/a52/a52.h index 0782628d8f..78df719b64 100644 --- a/plugins/a52/a52.h +++ b/plugins/a52/a52.h @@ -4,7 +4,7 @@ * (http://liba52.sf.net/). ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: a52.h,v 1.3 2002/05/20 15:03:33 gbazin Exp $ + * $Id: a52.h,v 1.4 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -36,7 +36,7 @@ typedef struct a52_adec_thread_s int flags; int sample_rate; int bit_rate; - boolean_t b_dynrng; + vlc_bool_t b_dynrng; /* The bit stream structure handles the PES stream at the bit level */ bit_stream_t bit_stream; @@ -46,7 +46,6 @@ typedef struct a52_adec_thread_s */ decoder_fifo_t *p_fifo; /* stores the PES stream data */ data_packet_t *p_data; - decoder_config_t *p_config; /* * Output properties diff --git a/plugins/aa/aa.c b/plugins/aa/aa.c index d9517e19a4..c8c49867aa 100644 --- a/plugins/aa/aa.c +++ b/plugins/aa/aa.c @@ -2,7 +2,7 @@ * vout_aa.c: Aa video output display method for testing purposes ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: aa.c,v 1.4 2002/05/27 18:26:31 sam Exp $ + * $Id: aa.c,v 1.5 2002/06/01 12:31:58 sam Exp $ * * Authors: Sigmund Augdal * @@ -30,11 +30,9 @@ #include -#include - -#include "video.h" -#include "video_output.h" -#include "interface.h" +#include +#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -51,7 +49,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("ASCII-art video output module") ) ADD_CAPABILITY( VOUT, 10 ) - ADD_SHORTCUT( "aa" ) ADD_SHORTCUT( "aalib" ) MODULE_INIT_STOP @@ -70,27 +67,26 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the aa specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { struct aa_context* aa_context; aa_palette palette; int i_width; /* width of main window */ int i_height; /* height of main window */ - -} vout_sys_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); -static void SetPalette ( struct vout_thread_s *, u16 *, u16 *, u16 * ); +static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -118,7 +114,7 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -127,7 +123,7 @@ static int vout_Create( vout_thread_t *p_vout ) if (!(p_vout->p_sys->aa_context = aa_autoinit(&aa_defparams))) { - intf_ErrMsg( "vout error: cannot initialize AA-lib. Sorry" ); + msg_Err( p_vout, "cannot initialize aalib" ); return( 1 ); } @@ -221,10 +217,16 @@ static int vout_Manage( vout_thread_t *p_vout ) { case AA_MOUSE: aa_getmouse( p_vout->p_sys->aa_context, &x, &y, &b ); - if ( b & AA_BUTTON3 ) { - vlc_mutex_lock( &p_main->p_intf->change_lock ); - p_main->p_intf->b_menu_change = 1; - vlc_mutex_unlock( &p_main->p_intf->change_lock ); + if ( b & AA_BUTTON3 ) + { + intf_thread_t *p_intf; + p_intf = vlc_object_find( p_vout->p_vlc, VLC_OBJECT_INTF, + FIND_CHILD ); + if( p_intf ) + { + p_intf->b_menu_change = 1; + vlc_object_release( p_intf ); + } } break; case AA_RESIZE: diff --git a/plugins/ac3_adec/ac3_adec.c b/plugins/ac3_adec/ac3_adec.c index 146ee7f99f..0a2fda1422 100644 --- a/plugins/ac3_adec/ac3_adec.c +++ b/plugins/ac3_adec/ac3_adec.c @@ -2,7 +2,7 @@ * ac3_adec.c: ac3 decoder module main file ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_adec.c,v 1.31 2002/05/27 16:01:42 fenrir Exp $ + * $Id: ac3_adec.c,v 1.32 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Lespinasse * @@ -27,21 +27,16 @@ #include /* malloc(), free() */ #include /* memset() */ -#include +#include +#include +#include #ifdef HAVE_UNISTD_H # include /* getpid() */ #endif -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" -#include "input_ext-intf.h" /* MPEG?_AUDIO_ES */ - #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" #include "ac3_adec.h" #define AC3DEC_FRAME_SIZE (2*1536) @@ -50,11 +45,11 @@ * Local prototypes *****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); -static int InitThread ( ac3dec_thread_t * p_adec ); -static void EndThread ( ac3dec_thread_t * p_adec ); +static int decoder_Run ( decoder_fifo_t * ); +static int InitThread ( ac3dec_t * p_adec ); +static void EndThread ( ac3dec_t * p_adec ); static void BitstreamCallback ( bit_stream_t *p_bit_stream, - boolean_t b_new_pes ); + vlc_bool_t b_new_pes ); /***************************************************************************** * Capabilities @@ -84,7 +79,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("software AC3 decoder") ) ADD_CAPABILITY( DECODER, 50 ) - ADD_SHORTCUT( "ac3_adec" ) ADD_SHORTCUT( "ac3" ) MODULE_INIT_STOP @@ -107,36 +101,160 @@ static int decoder_Probe( u8 *pi_type ) return ( *pi_type == AC3_AUDIO_ES ) ? 0 : -1; } - /***************************************************************************** - * InitThread: initialize data before entering main loop + * decoder_Run: this function is called just after the thread is created *****************************************************************************/ -static int InitThread( ac3dec_thread_t * p_ac3thread ) +static int decoder_Run ( decoder_fifo_t * p_fifo ) { - char *psz_name; + ac3dec_t * p_ac3dec; + void * p_orig; /* pointer before memalign */ + vlc_bool_t b_sync = 0; + + /* Allocate the memory needed to store the thread's structure */ + p_ac3dec = (ac3dec_t *)vlc_memalign( &p_orig, 16, sizeof(ac3dec_t) ); + memset( p_ac3dec, 0, sizeof( ac3dec_t ) ); + + if( p_ac3dec == NULL ) + { + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); + return( -1 ); + } /* - * Thread properties + * Initialize the thread properties */ - p_ac3thread->p_fifo = p_ac3thread->p_config->p_decoder_fifo; + p_ac3dec->p_fifo = p_fifo; + if( InitThread( p_ac3dec ) ) + { + msg_Err( p_fifo, "could not initialize thread" ); + DecoderError( p_fifo ); + free( p_orig ); + return( -1 ); + } + + /* ac3 decoder thread's main loop */ + /* FIXME : do we have enough room to store the decoded frames ?? */ + while ((!p_ac3dec->p_fifo->b_die) && (!p_ac3dec->p_fifo->b_error)) + { + s16 * buffer; + ac3_sync_info_t sync_info; + + if( !b_sync ) + { + int i_sync_ptr; +#define p_bit_stream (&p_ac3dec->bit_stream) + + /* Go to the next PES packet and jump to sync_ptr */ + do { + BitstreamNextDataPacket( p_bit_stream ); + } while( !p_bit_stream->p_decoder_fifo->b_die + && !p_bit_stream->p_decoder_fifo->b_error + && p_bit_stream->p_data != + p_bit_stream->p_decoder_fifo->p_first->p_first ); + i_sync_ptr = *(p_bit_stream->p_byte - 2) << 8 + | *(p_bit_stream->p_byte - 1); + p_bit_stream->p_byte += i_sync_ptr; + + /* Empty the bit FIFO and realign the bit stream */ + p_bit_stream->fifo.buffer = 0; + p_bit_stream->fifo.i_available = 0; + AlignWord( p_bit_stream ); + b_sync = 1; +#undef p_bit_stream + } - p_ac3thread->ac3_decoder = - vlc_memalign( &p_ac3thread->ac3_decoder_orig, 16, sizeof(ac3dec_t) ); - memset( p_ac3thread->ac3_decoder, 0, sizeof( ac3dec_t ) ); + if (ac3_sync_frame (p_ac3dec, &sync_info)) + { + b_sync = 0; + continue; + } + + if( ( p_ac3dec->p_aout_fifo != NULL ) && + ( p_ac3dec->p_aout_fifo->i_rate != sync_info.sample_rate ) ) + { + /* Make sure the output thread leaves the NextFrame() function */ + vlc_mutex_lock (&(p_ac3dec->p_aout_fifo->data_lock)); + aout_DestroyFifo (p_ac3dec->p_aout_fifo); + vlc_cond_signal (&(p_ac3dec->p_aout_fifo->data_wait)); + vlc_mutex_unlock (&(p_ac3dec->p_aout_fifo->data_lock)); + + p_ac3dec->p_aout_fifo = NULL; + } + + /* Creating the audio output fifo if not created yet */ + if (p_ac3dec->p_aout_fifo == NULL ) { + p_ac3dec->p_aout_fifo = + aout_CreateFifo( p_ac3dec->p_fifo->p_this, AOUT_FIFO_PCM, 2, + sync_info.sample_rate, AC3DEC_FRAME_SIZE, NULL ); + if ( p_ac3dec->p_aout_fifo == NULL ) + { + p_ac3dec->p_fifo->b_error = 1; + break; + } + } + + CurrentPTS( &p_ac3dec->bit_stream, + &p_ac3dec->p_aout_fifo->date[p_ac3dec->p_aout_fifo->i_end_frame], + NULL ); + if( !p_ac3dec->p_aout_fifo->date[p_ac3dec->p_aout_fifo->i_end_frame] ) + { + p_ac3dec->p_aout_fifo->date[ + p_ac3dec->p_aout_fifo->i_end_frame] = + LAST_MDATE; + } + + buffer = ((s16 *)p_ac3dec->p_aout_fifo->buffer) + + (p_ac3dec->p_aout_fifo->i_end_frame * AC3DEC_FRAME_SIZE); + + if (ac3_decode_frame (p_ac3dec, buffer)) + { + b_sync = 0; + continue; + } + + vlc_mutex_lock (&p_ac3dec->p_aout_fifo->data_lock); + p_ac3dec->p_aout_fifo->i_end_frame = + (p_ac3dec->p_aout_fifo->i_end_frame + 1) & AOUT_FIFO_SIZE; + vlc_cond_signal (&p_ac3dec->p_aout_fifo->data_wait); + vlc_mutex_unlock (&p_ac3dec->p_aout_fifo->data_lock); + + RealignBits(&p_ac3dec->bit_stream); + } + + /* If b_error is set, the ac3 decoder thread enters the error loop */ + if (p_ac3dec->p_fifo->b_error) + { + DecoderError( p_ac3dec->p_fifo ); + } + + /* End of the ac3 decoder thread */ + EndThread (p_ac3dec); + + free( p_orig ); + + return( 0 ); +} + +/***************************************************************************** + * InitThread: initialize data before entering main loop + *****************************************************************************/ +static int InitThread( ac3dec_t * p_ac3dec ) +{ + char *psz_name; /* * Choose the best downmix module */ -#define DOWNMIX p_ac3thread->ac3_decoder->downmix - psz_name = config_GetPszVariable( DOWNMIX_METHOD_VAR ); - DOWNMIX.p_module = module_Need( MODULE_CAPABILITY_DOWNMIX, psz_name, - NULL ); +#define DOWNMIX p_ac3dec->downmix + psz_name = config_GetPsz( p_ac3dec->p_fifo, DOWNMIX_METHOD_VAR ); + DOWNMIX.p_module = module_Need( p_ac3dec->p_fifo, + MODULE_CAPABILITY_DOWNMIX, psz_name, NULL ); if( psz_name ) free( psz_name ); if( DOWNMIX.p_module == NULL ) { - intf_ErrMsg( "ac3dec error: no suitable downmix module" ); - free( p_ac3thread->ac3_decoder_orig ); + msg_Err( p_ac3dec->p_fifo, "no suitable downmix module" ); return( -1 ); } @@ -154,21 +272,20 @@ static int InitThread( ac3dec_thread_t * p_ac3thread ) /* * Choose the best IMDCT module */ - p_ac3thread->ac3_decoder->imdct = - vlc_memalign( &p_ac3thread->ac3_decoder->imdct_orig, 16, sizeof(imdct_t) ); + p_ac3dec->imdct = vlc_memalign( &p_ac3dec->imdct_orig, + 16, sizeof(imdct_t) ); -#define IMDCT p_ac3thread->ac3_decoder->imdct - psz_name = config_GetPszVariable( IMDCT_METHOD_VAR ); - IMDCT->p_module = module_Need( MODULE_CAPABILITY_IMDCT, psz_name, - NULL ); +#define IMDCT p_ac3dec->imdct + psz_name = config_GetPsz( p_ac3dec->p_fifo, IMDCT_METHOD_VAR ); + IMDCT->p_module = module_Need( p_ac3dec->p_fifo, + MODULE_CAPABILITY_IMDCT, psz_name, NULL ); if( psz_name ) free( psz_name ); if( IMDCT->p_module == NULL ) { - intf_ErrMsg( "ac3dec error: no suitable IMDCT module" ); - module_Unneed( p_ac3thread->ac3_decoder->downmix.p_module ); - free( p_ac3thread->ac3_decoder->imdct_orig ); - free( p_ac3thread->ac3_decoder_orig ); + msg_Err( p_ac3dec->p_fifo, "no suitable IMDCT module" ); + module_Unneed( p_ac3dec->downmix.p_module ); + free( p_ac3dec->imdct_orig ); return( -1 ); } @@ -181,9 +298,8 @@ static int InitThread( ac3dec_thread_t * p_ac3thread ) #undef F /* Initialize the ac3 decoder structures */ - p_ac3thread->ac3_decoder->samples = - vlc_memalign( &p_ac3thread->ac3_decoder->samples_orig, - 16, 6 * 256 * sizeof(float) ); + p_ac3dec->samples = vlc_memalign( &p_ac3dec->samples_orig, + 16, 6 * 256 * sizeof(float) ); IMDCT->buf = vlc_memalign( &IMDCT->buf_orig, 16, N/4 * sizeof(complex_t) ); @@ -217,178 +333,40 @@ static int InitThread( ac3dec_thread_t * p_ac3thread ) 16, 64 * sizeof(complex_t) ); #undef IMDCT - _M( ac3_init )( p_ac3thread->ac3_decoder ); + _M( ac3_init )( p_ac3dec ); /* * Initialize the output properties */ - p_ac3thread->p_aout_fifo = NULL; + p_ac3dec->p_aout_fifo = NULL; /* * Bit stream */ - InitBitstream(&p_ac3thread->ac3_decoder->bit_stream, - p_ac3thread->p_config->p_decoder_fifo, - BitstreamCallback, (void *) p_ac3thread ); + InitBitstream( &p_ac3dec->bit_stream, p_ac3dec->p_fifo, + BitstreamCallback, (void *) p_ac3dec ); return( 0 ); } -/***************************************************************************** - * decoder_Run: this function is called just after the thread is created - *****************************************************************************/ -static int decoder_Run ( decoder_config_t * p_config ) -{ - ac3dec_thread_t * p_ac3thread; - void * p_ac3thread_orig; /* pointer before memalign */ - boolean_t b_sync = 0; - - /* Allocate the memory needed to store the thread's structure */ - p_ac3thread = (ac3dec_thread_t *)vlc_memalign( &p_ac3thread_orig, 16, - sizeof(ac3dec_thread_t) ); - - if( p_ac3thread == NULL ) - { - intf_ErrMsg ( "ac3_adec error: not enough memory " - "for decoder_Run() to allocate p_ac3thread" ); - DecoderError( p_config->p_decoder_fifo ); - return( -1 ); - } - - /* - * Initialize the thread properties - */ - p_ac3thread->p_config = p_config; - if( InitThread( p_ac3thread ) ) - { - intf_ErrMsg( "ac3_adec error: could not initialize thread" ); - DecoderError( p_config->p_decoder_fifo ); - free( p_ac3thread_orig ); - return( -1 ); - } - - /* ac3 decoder thread's main loop */ - /* FIXME : do we have enough room to store the decoded frames ?? */ - while ((!p_ac3thread->p_fifo->b_die) && (!p_ac3thread->p_fifo->b_error)) - { - s16 * buffer; - ac3_sync_info_t sync_info; - - if( !b_sync ) - { - int i_sync_ptr; -#define p_bit_stream (&p_ac3thread->ac3_decoder->bit_stream) - - /* Go to the next PES packet and jump to sync_ptr */ - do { - BitstreamNextDataPacket( p_bit_stream ); - } while( !p_bit_stream->p_decoder_fifo->b_die - && !p_bit_stream->p_decoder_fifo->b_error - && p_bit_stream->p_data != - p_bit_stream->p_decoder_fifo->p_first->p_first ); - i_sync_ptr = *(p_bit_stream->p_byte - 2) << 8 - | *(p_bit_stream->p_byte - 1); - p_bit_stream->p_byte += i_sync_ptr; - - /* Empty the bit FIFO and realign the bit stream */ - p_bit_stream->fifo.buffer = 0; - p_bit_stream->fifo.i_available = 0; - AlignWord( p_bit_stream ); - b_sync = 1; -#undef p_bit_stream - } - - if (ac3_sync_frame (p_ac3thread->ac3_decoder, &sync_info)) - { - b_sync = 0; - continue; - } - - if( ( p_ac3thread->p_aout_fifo != NULL ) && - ( p_ac3thread->p_aout_fifo->i_rate != sync_info.sample_rate ) ) - { - /* Make sure the output thread leaves the NextFrame() function */ - vlc_mutex_lock (&(p_ac3thread->p_aout_fifo->data_lock)); - aout_DestroyFifo (p_ac3thread->p_aout_fifo); - vlc_cond_signal (&(p_ac3thread->p_aout_fifo->data_wait)); - vlc_mutex_unlock (&(p_ac3thread->p_aout_fifo->data_lock)); - - p_ac3thread->p_aout_fifo = NULL; - } - - /* Creating the audio output fifo if not created yet */ - if (p_ac3thread->p_aout_fifo == NULL ) - { - p_ac3thread->p_aout_fifo = aout_CreateFifo( AOUT_FIFO_PCM, 2, - sync_info.sample_rate, AC3DEC_FRAME_SIZE, NULL ); - if ( p_ac3thread->p_aout_fifo == NULL ) - { - p_ac3thread->p_fifo->b_error = 1; - break; - } - } - - CurrentPTS( &p_ac3thread->ac3_decoder->bit_stream, - &p_ac3thread->p_aout_fifo->date[p_ac3thread->p_aout_fifo->i_end_frame], - NULL ); - if( !p_ac3thread->p_aout_fifo->date[p_ac3thread->p_aout_fifo->i_end_frame] ) - { - p_ac3thread->p_aout_fifo->date[ - p_ac3thread->p_aout_fifo->i_end_frame] = - LAST_MDATE; - } - - buffer = ((s16 *)p_ac3thread->p_aout_fifo->buffer) + - (p_ac3thread->p_aout_fifo->i_end_frame * AC3DEC_FRAME_SIZE); - - if (ac3_decode_frame (p_ac3thread->ac3_decoder, buffer)) - { - b_sync = 0; - continue; - } - - vlc_mutex_lock (&p_ac3thread->p_aout_fifo->data_lock); - p_ac3thread->p_aout_fifo->i_end_frame = - (p_ac3thread->p_aout_fifo->i_end_frame + 1) & AOUT_FIFO_SIZE; - vlc_cond_signal (&p_ac3thread->p_aout_fifo->data_wait); - vlc_mutex_unlock (&p_ac3thread->p_aout_fifo->data_lock); - - RealignBits(&p_ac3thread->ac3_decoder->bit_stream); - } - - /* If b_error is set, the ac3 decoder thread enters the error loop */ - if (p_ac3thread->p_fifo->b_error) - { - DecoderError( p_ac3thread->p_fifo ); - } - - /* End of the ac3 decoder thread */ - EndThread (p_ac3thread); - - free( p_ac3thread_orig ); - - return( 0 ); -} - - /***************************************************************************** * EndThread : ac3 decoder thread destruction *****************************************************************************/ -static void EndThread (ac3dec_thread_t * p_ac3thread) +static void EndThread (ac3dec_t * p_ac3dec) { /* If the audio output fifo was created, we destroy it */ - if (p_ac3thread->p_aout_fifo != NULL) + if (p_ac3dec->p_aout_fifo != NULL) { - aout_DestroyFifo (p_ac3thread->p_aout_fifo); + aout_DestroyFifo (p_ac3dec->p_aout_fifo); /* Make sure the output thread leaves the NextFrame() function */ - vlc_mutex_lock (&(p_ac3thread->p_aout_fifo->data_lock)); - vlc_cond_signal (&(p_ac3thread->p_aout_fifo->data_wait)); - vlc_mutex_unlock (&(p_ac3thread->p_aout_fifo->data_lock)); + vlc_mutex_lock (&(p_ac3dec->p_aout_fifo->data_lock)); + vlc_cond_signal (&(p_ac3dec->p_aout_fifo->data_wait)); + vlc_mutex_unlock (&(p_ac3dec->p_aout_fifo->data_lock)); } /* Free allocated structures */ -#define IMDCT p_ac3thread->ac3_decoder->imdct +#define IMDCT p_ac3dec->imdct free( IMDCT->w_1_orig ); free( IMDCT->w_64_orig ); free( IMDCT->w_32_orig ); @@ -406,15 +384,14 @@ static void EndThread (ac3dec_thread_t * p_ac3thread) free( IMDCT->buf_orig ); #undef IMDCT - free( p_ac3thread->ac3_decoder->samples_orig ); + free( p_ac3dec->samples_orig ); /* Unlock the modules */ - module_Unneed( p_ac3thread->ac3_decoder->downmix.p_module ); - module_Unneed( p_ac3thread->ac3_decoder->imdct->p_module ); + module_Unneed( p_ac3dec->downmix.p_module ); + module_Unneed( p_ac3dec->imdct->p_module ); /* Free what's left of the decoder */ - free( p_ac3thread->ac3_decoder->imdct_orig ); - free( p_ac3thread->ac3_decoder_orig ); + free( p_ac3dec->imdct_orig ); } /***************************************************************************** @@ -423,7 +400,7 @@ static void EndThread (ac3dec_thread_t * p_ac3thread) * This function is called by input's NextDataPacket. *****************************************************************************/ static void BitstreamCallback ( bit_stream_t * p_bit_stream, - boolean_t b_new_pes ) + vlc_bool_t b_new_pes ) { if( b_new_pes ) { diff --git a/plugins/ac3_adec/ac3_adec.h b/plugins/ac3_adec/ac3_adec.h index 91c40e6a98..9bdbfab822 100644 --- a/plugins/ac3_adec/ac3_adec.h +++ b/plugins/ac3_adec/ac3_adec.h @@ -1,10 +1,11 @@ /***************************************************************************** - * ac3_adec.h : ac3 decoder thread interface + * ac3_adec.h : ac3 decoder interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_adec.h,v 1.3 2002/04/05 01:05:22 gbazin Exp $ + * $Id: ac3_adec.h,v 1.4 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf + * Renaud Dartus * * 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,15 +23,349 @@ *****************************************************************************/ /***************************************************************************** - * ac3dec_thread_t : ac3 decoder thread descriptor + * Prototypes *****************************************************************************/ +vlc_thread_t ac3dec_CreateThread( decoder_fifo_t * p_fifo ); + +/**** ac3 decoder API - public ac3 decoder structures */ + +typedef struct ac3dec_s ac3dec_t; + +typedef struct ac3_sync_info_s { + int sample_rate; /* sample rate in Hz */ + int frame_size; /* frame size in bytes */ + int bit_rate; /* nominal bit rate in kbps */ +} ac3_sync_info_t; + + +/**** ac3 decoder API - functions publically provided by the ac3 decoder ****/ + +int _M( ac3_init )(ac3dec_t * p_ac3dec); +int ac3_sync_frame (ac3dec_t * p_ac3dec, ac3_sync_info_t * p_sync_info); +int ac3_decode_frame (ac3dec_t * p_ac3dec, s16 * buffer); + +/**** EVERYTHING AFTER THIS POINT IS PRIVATE ! DO NOT USE DIRECTLY ****/ + +/**** ac3 decoder internal structures ****/ + +/* The following structures are filled in by their corresponding parse_* + * functions. See http://www.atsc.org/Standards/A52/a_52.pdf for + * full details on each field. Indented fields are used to denote + * conditional fields. + */ + +typedef struct syncinfo_s { + /* Sync word == 0x0B77 */ + /* u16 syncword; */ + /* crc for the first 5/8 of the sync block */ + /* u16 crc1; */ + /* Stream Sampling Rate (kHz) 0 = 48, 1 = 44.1, 2 = 32, 3 = reserved */ + u16 fscod; + /* Frame size code */ + u16 frmsizecod; + + /* Information not in the AC-3 bitstream, but derived */ + /* Frame size in 16 bit words */ + u16 frame_size; + /* Bit rate in kilobits */ + //u16 bit_rate; +} syncinfo_t; + +typedef struct bsi_s { + /* Bit stream identification == 0x8 */ + u16 bsid; + /* Bit stream mode */ + u16 bsmod; + /* Audio coding mode */ + u16 acmod; + /* If we're using the centre channel then */ + /* centre mix level */ + u16 cmixlev; + /* If we're using the surround channel then */ + /* surround mix level */ + u16 surmixlev; + /* If we're in 2/0 mode then */ + /* Dolby surround mix level - NOT USED - */ + u16 dsurmod; + /* Low frequency effects on */ + u16 lfeon; + /* Dialogue Normalization level */ + u16 dialnorm; + /* Compression exists */ + u16 compre; + /* Compression level */ + u16 compr; + /* Language code exists */ + u16 langcode; + /* Language code */ + u16 langcod; + /* Audio production info exists*/ + u16 audprodie; + u16 mixlevel; + u16 roomtyp; + /* If we're in dual mono mode (acmod == 0) then extra stuff */ + u16 dialnorm2; + u16 compr2e; + u16 compr2; + u16 langcod2e; + u16 langcod2; + u16 audprodi2e; + u16 mixlevel2; + u16 roomtyp2; + /* Copyright bit */ + u16 copyrightb; + /* Original bit */ + u16 origbs; + /* Timecode 1 exists */ + u16 timecod1e; + /* Timecode 1 */ + u16 timecod1; + /* Timecode 2 exists */ + u16 timecod2e; + /* Timecode 2 */ + u16 timecod2; + /* Additional bit stream info exists */ + u16 addbsie; + /* Additional bit stream length - 1 (in bytes) */ + u16 addbsil; + /* Additional bit stream information (max 64 bytes) */ + u8 addbsi[64]; + + /* Information not in the AC-3 bitstream, but derived */ + /* Number of channels (excluding LFE) + * Derived from acmod */ + u16 nfchans; +} bsi_t; + +/* more pain */ +typedef struct audblk_s { + /* block switch bit indexed by channel num */ + u16 blksw[5]; + /* dither enable bit indexed by channel num */ + u16 dithflag[5]; + /* dynamic range gain exists */ + u16 dynrnge; + /* dynamic range gain */ + u16 dynrng; + /* if acmod==0 then */ + /* dynamic range 2 gain exists */ + u16 dynrng2e; + /* dynamic range 2 gain */ + u16 dynrng2; + /* coupling strategy exists */ + u16 cplstre; + /* coupling in use */ + u16 cplinu; + /* channel coupled */ + u16 chincpl[5]; + /* if acmod==2 then */ + /* Phase flags in use */ + u16 phsflginu; + /* coupling begin frequency code */ + u16 cplbegf; + /* coupling end frequency code */ + u16 cplendf; + /* coupling band structure bits */ + u16 cplbndstrc[18]; + /* Do coupling co-ords exist for this channel? */ + u16 cplcoe[5]; + /* Master coupling co-ordinate */ + u16 mstrcplco[5]; + /* Per coupling band coupling co-ordinates */ + u16 cplcoexp[5][18]; + u16 cplcomant[5][18]; + /* Phase flags for dual mono */ + u16 phsflg[18]; + /* Is there a rematrixing strategy */ + u16 rematstr; + /* Rematrixing bits */ + u16 rematflg[4]; + /* Coupling exponent strategy */ + u16 cplexpstr; + /* Exponent strategy for full bandwidth channels */ + u16 chexpstr[5]; + /* Exponent strategy for lfe channel */ + u16 lfeexpstr; + /* Channel bandwidth for independent channels */ + u16 chbwcod[5]; + /* The absolute coupling exponent */ + u16 cplabsexp; + /* Coupling channel exponents (D15 mode gives 18 * 12 /3 encoded exponents */ + u16 cplexps[18 * 12 / 3]; + /* Sanity checking constant */ + u32 magic2; + /* fbw channel exponents */ + u16 exps[5][252 / 3]; + /* channel gain range */ + u16 gainrng[5]; + /* low frequency exponents */ + u16 lfeexps[3]; + + /* Bit allocation info */ + u16 baie; + /* Slow decay code */ + u16 sdcycod; + /* Fast decay code */ + u16 fdcycod; + /* Slow gain code */ + u16 sgaincod; + /* dB per bit code */ + u16 dbpbcod; + /* masking floor code */ + u16 floorcod; + + /* SNR offset info */ + u16 snroffste; + /* coarse SNR offset */ + u16 csnroffst; + /* coupling fine SNR offset */ + u16 cplfsnroffst; + /* coupling fast gain code */ + u16 cplfgaincod; + /* fbw fine SNR offset */ + u16 fsnroffst[5]; + /* fbw fast gain code */ + u16 fgaincod[5]; + /* lfe fine SNR offset */ + u16 lfefsnroffst; + /* lfe fast gain code */ + u16 lfefgaincod; + + /* Coupling leak info */ + u16 cplleake; + /* coupling fast leak initialization */ + u16 cplfleak; + /* coupling slow leak initialization */ + u16 cplsleak; + + /* delta bit allocation info */ + u16 deltbaie; + /* coupling delta bit allocation exists */ + u16 cpldeltbae; + /* fbw delta bit allocation exists */ + u16 deltbae[5]; + /* number of cpl delta bit segments */ + u16 cpldeltnseg; + /* coupling delta bit allocation offset */ + u16 cpldeltoffst[8]; + /* coupling delta bit allocation length */ + u16 cpldeltlen[8]; + /* coupling delta bit allocation length */ + u16 cpldeltba[8]; + /* number of delta bit segments */ + u16 deltnseg[5]; + /* fbw delta bit allocation offset */ + u16 deltoffst[5][8]; + /* fbw delta bit allocation length */ + u16 deltlen[5][8]; + /* fbw delta bit allocation length */ + u16 deltba[5][8]; + + /* skip length exists */ + u16 skiple; + /* skip length */ + u16 skipl; + + /* channel mantissas */ +// u16 chmant[5][256]; + + /* coupling mantissas */ + float cpl_flt[ 256 ]; +// u16 cplmant[256]; + + /* coupling mantissas */ +// u16 lfemant[7]; + + /* -- Information not in the bitstream, but derived thereof -- */ + + /* Number of coupling sub-bands */ + u16 ncplsubnd; + + /* Number of combined coupling sub-bands + * Derived from ncplsubnd and cplbndstrc */ + u16 ncplbnd; + + /* Number of exponent groups by channel + * Derived from strmant, endmant */ + u16 nchgrps[5]; -typedef struct ac3dec_thread_s + /* Number of coupling exponent groups + * Derived from cplbegf, cplendf, cplexpstr */ + u16 ncplgrps; + + /* End mantissa numbers of fbw channels */ + u16 endmant[5]; + + /* Start and end mantissa numbers for the coupling channel */ + u16 cplstrtmant; + u16 cplendmant; + + /* Decoded exponent info */ + u16 fbw_exp[5][256]; + u16 cpl_exp[256]; + u16 lfe_exp[7]; + + /* Bit allocation pointer results */ + u16 fbw_bap[5][256]; + /* FIXME?? figure out exactly how many entries there should be (253-37?) */ + u16 cpl_bap[256]; + u16 lfe_bap[7]; +} audblk_t; + +/* Everything you wanted to know about band structure */ + +/* + * The entire frequency domain is represented by 256 real + * floating point fourier coefficients. Only the lower 253 + * coefficients are actually utilized however. We use arrays + * of 256 to be efficient in some cases. + * + * The 5 full bandwidth channels (fbw) can have their higher + * frequencies coupled together. These coupled channels then + * share their high frequency components. + * + * This coupling band is broken up into 18 sub-bands starting + * at mantissa number 37. Each sub-band is 12 bins wide. + * + * There are 50 bit allocation sub-bands which cover the entire + * frequency range. The sub-bands are of non-uniform width, and + * approximate a 1/6 octave scale. + */ + +typedef struct bit_allocate_s +{ + s16 psd[256]; + s16 bndpsd[256]; + s16 excite[256]; + s16 mask[256]; + s16 sdecay; + s16 fdecay; + s16 sgain; + s16 dbknee; + s16 floor; +} bit_allocate_t; + +/* These store the persistent state of the packed mantissas */ +typedef struct mantissa_s +{ + float q_1[2]; + float q_2[2]; + float q_4[1]; + s32 q_1_pointer; + s32 q_2_pointer; + s32 q_4_pointer; + u16 lfsr_state; +} mantissa_t; + +/***************************************************************************** + * ac3dec_t : ac3 decoder thread descriptor + *****************************************************************************/ + +struct ac3dec_s { /* * Decoder properties */ - ac3dec_t * ac3_decoder; void * ac3_decoder_orig; /* pointer before memalign */ /* @@ -42,16 +377,33 @@ typedef struct ac3dec_thread_s * Input properties */ decoder_fifo_t * p_fifo; /* stores the PES stream data */ - decoder_config_t * p_config; + + /* The bit stream structure handles the PES stream at the bit level */ + bit_stream_t bit_stream; + int i_available; + unsigned int total_bits_read; /* temporary */ + + /* + * Decoder properties + */ + syncinfo_t syncinfo; + bsi_t bsi; + audblk_t audblk; + + dm_par_t dm_par; + + bit_allocate_t bit_allocate; + mantissa_t mantissa; + downmix_t downmix; /* * Output properties */ aout_fifo_t * p_aout_fifo; /* stores the decompressed audio frames */ -} ac3dec_thread_t; + float * samples; + void * samples_orig; /* pointer before memalign */ + imdct_t * imdct; + void * imdct_orig; /* pointer before memalign */ +}; -/***************************************************************************** - * Prototypes - *****************************************************************************/ -vlc_thread_t ac3dec_CreateThread( decoder_config_t * p_config ); diff --git a/plugins/ac3_adec/ac3_bit_allocate.c b/plugins/ac3_adec/ac3_bit_allocate.c index d190fdd545..027239bcce 100644 --- a/plugins/ac3_adec/ac3_bit_allocate.c +++ b/plugins/ac3_adec/ac3_bit_allocate.c @@ -2,7 +2,7 @@ * ac3_bit_allocate.c: ac3 allocation tables ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: ac3_bit_allocate.c,v 1.7 2002/05/18 17:47:46 sam Exp $ + * $Id: ac3_bit_allocate.c,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Aaron Holtzman @@ -28,14 +28,12 @@ *****************************************************************************/ #include /* memcpy() */ -#include - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" +#include "ac3_adec.h" #include "ac3_internal.h" /* DELTA_BIT_REUSE */ diff --git a/plugins/ac3_adec/ac3_decoder.c b/plugins/ac3_adec/ac3_decoder.c index 6768d9af6e..38f0ddfb3b 100644 --- a/plugins/ac3_adec/ac3_decoder.c +++ b/plugins/ac3_adec/ac3_decoder.c @@ -2,7 +2,7 @@ * ac3_decoder.c: core ac3 decoder ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_decoder.c,v 1.7 2002/04/23 23:44:36 fenrir Exp $ + * $Id: ac3_decoder.c,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -28,16 +28,11 @@ *****************************************************************************/ #include /* memcpy() */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" #include "ac3_adec.h" /* ac3dec_thread_t */ #include "ac3_internal.h" @@ -56,11 +51,10 @@ int _M( ac3_init )(ac3dec_t * p_ac3dec) int ac3_decode_frame (ac3dec_t * p_ac3dec, s16 * buffer) { int i; - ac3dec_thread_t * p_ac3thread = (ac3dec_thread_t *) p_ac3dec->bit_stream.p_callback_arg; if (parse_bsi (p_ac3dec)) { - intf_WarnMsg (3,"ac3dec warn: error during parsing"); + msg_Warn( p_ac3dec->p_fifo, "parse error" ); parse_auxdata (p_ac3dec); return 1; } @@ -86,26 +80,26 @@ int ac3_decode_frame (ac3dec_t * p_ac3dec, s16 * buffer) (p_ac3dec->bsi.nfchans + p_ac3dec->bsi.lfeon)); - if( p_ac3thread->p_fifo->b_die || p_ac3thread->p_fifo->b_error ) + if( p_ac3dec->p_fifo->b_die || p_ac3dec->p_fifo->b_error ) { return 1; } if( parse_audblk( p_ac3dec, i ) ) { - intf_WarnMsg( 3, "ac3dec warning: error during audioblock" ); + msg_Warn( p_ac3dec->p_fifo, "audioblock error" ); parse_auxdata( p_ac3dec ); return 1; } - if( p_ac3thread->p_fifo->b_die || p_ac3thread->p_fifo->b_error ) + if( p_ac3dec->p_fifo->b_die || p_ac3dec->p_fifo->b_error ) { return 1; } if( exponent_unpack( p_ac3dec ) ) { - intf_WarnMsg( 3, "ac3dec warning: error during unpack" ); + msg_Warn( p_ac3dec->p_fifo, "unpack error" ); parse_auxdata( p_ac3dec ); return 1; } @@ -113,7 +107,7 @@ int ac3_decode_frame (ac3dec_t * p_ac3dec, s16 * buffer) bit_allocate (p_ac3dec); mantissa_unpack (p_ac3dec); - if( p_ac3thread->p_fifo->b_die || p_ac3thread->p_fifo->b_error ) + if( p_ac3dec->p_fifo->b_die || p_ac3dec->p_fifo->b_error ) { return 1; } diff --git a/plugins/ac3_adec/ac3_exponent.c b/plugins/ac3_adec/ac3_exponent.c index 4f5b851edd..16e1fbf708 100644 --- a/plugins/ac3_adec/ac3_exponent.c +++ b/plugins/ac3_adec/ac3_exponent.c @@ -2,7 +2,7 @@ * ac3_exponent.c: ac3 exponent calculations ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_exponent.c,v 1.6 2001/12/30 07:09:54 sam Exp $ + * $Id: ac3_exponent.c,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -28,16 +28,12 @@ *****************************************************************************/ #include /* memcpy(), memset() */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" +#include "ac3_adec.h" #include "ac3_internal.h" diff --git a/plugins/ac3_adec/ac3_exponent.h b/plugins/ac3_adec/ac3_exponent.h index c006bad726..1b6ac06566 100644 --- a/plugins/ac3_adec/ac3_exponent.h +++ b/plugins/ac3_adec/ac3_exponent.h @@ -2,7 +2,7 @@ * ac3_exponent.h: ac3 exponent calculations ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_exponent.h,v 1.2 2002/05/18 17:47:46 sam Exp $ + * $Id: ac3_exponent.h,v 1.3 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -57,9 +57,9 @@ static const s16 exps_3[128] = #define UNPACK_CPL 2 #define UNPACK_LFE 4 -static inline int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type, +static inline int exp_unpack_ch( ac3dec_t * p_ac3dec, u16 type, u16 expstr, u16 ngrps, u16 initial_exp, - u16 exps[], u16 * dest) + u16 exps[], u16 * dest ) { u16 i,j; s16 exp_acc; @@ -88,7 +88,7 @@ static inline int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type, { if (exps[i] > 124) { - intf_ErrMsg ( "ac3dec error: invalid exponent" ); + msg_Err( p_ac3dec->p_fifo, "invalid exponent" ); return 1; } exp_acc += (exps_1[exps[i]] /*- 2*/); @@ -105,7 +105,7 @@ static inline int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type, { if (exps[i] > 124) { - intf_ErrMsg ( "ac3dec error: invalid exponent" ); + msg_Err( p_ac3dec->p_fifo, "invalid exponent" ); return 1; } exp_acc += (exps_1[exps[i]] /*- 2*/); @@ -125,7 +125,7 @@ static inline int exp_unpack_ch (ac3dec_t * p_ac3dec, u16 type, { if (exps[i] > 124) { - intf_ErrMsg ( "ac3dec error: invalid exponent" ); + msg_Err( p_ac3dec->p_fifo, "invalid exponent" ); return 1; } exp_acc += (exps_1[exps[i]] /*- 2*/); diff --git a/plugins/ac3_adec/ac3_imdct.c b/plugins/ac3_adec/ac3_imdct.c index ae9e67abc9..72af766ff5 100644 --- a/plugins/ac3_adec/ac3_imdct.c +++ b/plugins/ac3_adec/ac3_imdct.c @@ -2,7 +2,7 @@ * ac3_imdct.c: ac3 DCT ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_imdct.c,v 1.8 2002/04/23 23:44:36 fenrir Exp $ + * $Id: ac3_imdct.c,v 1.9 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Aaron Holtzman @@ -31,14 +31,12 @@ #include #include -#include - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" +#include "ac3_adec.h" #ifndef M_PI # define M_PI 3.14159265358979323846 diff --git a/plugins/ac3_adec/ac3_mantissa.c b/plugins/ac3_adec/ac3_mantissa.c index 238c975026..0e735ef55f 100644 --- a/plugins/ac3_adec/ac3_mantissa.c +++ b/plugins/ac3_adec/ac3_mantissa.c @@ -2,7 +2,7 @@ * ac3_mantissa.c: ac3 mantissa computation ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_mantissa.c,v 1.6 2001/12/30 07:09:54 sam Exp $ + * $Id: ac3_mantissa.c,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Aaron Holtzman @@ -28,16 +28,12 @@ *****************************************************************************/ #include /* memcpy() */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" +#include "ac3_adec.h" #include "ac3_mantissa.h" diff --git a/plugins/ac3_adec/ac3_mantissa.h b/plugins/ac3_adec/ac3_mantissa.h index 914a848d0c..53a47eb736 100644 --- a/plugins/ac3_adec/ac3_mantissa.h +++ b/plugins/ac3_adec/ac3_mantissa.h @@ -2,7 +2,7 @@ * ac3_mantissa.h: ac3 mantissa computation ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: ac3_mantissa.h,v 1.2 2002/05/18 17:47:46 sam Exp $ + * $Id: ac3_mantissa.h,v 1.3 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Aaron Holtzman @@ -245,8 +245,8 @@ static inline u16 dither_gen (mantissa_t * p_mantissa) /* Fetch an unpacked, left justified, and properly biased/dithered mantissa value */ -static inline float coeff_get_float (ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, - u16 exp) +static inline float coeff_get_float( ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, + u16 exp ) { u16 group_code = 0; @@ -270,7 +270,7 @@ static inline float coeff_get_float (ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, p_ac3dec->total_bits_read += 5; if ((group_code = GetBits (&p_ac3dec->bit_stream,5)) > 26) { - intf_WarnMsg ( 3, "ac3dec warn: invalid mantissa (1)" ); + msg_Warn( p_ac3dec->p_fifo, "invalid mantissa (1)" ); return 0; } @@ -291,7 +291,7 @@ static inline float coeff_get_float (ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, p_ac3dec->total_bits_read += 7; if ((group_code = GetBits (&p_ac3dec->bit_stream,7)) > 124) { - intf_WarnMsg ( 3, "ac3dec warn: invalid mantissa (2)" ); + msg_Warn( p_ac3dec->p_fifo, "invalid mantissa (2)" ); return 0; } @@ -306,7 +306,7 @@ static inline float coeff_get_float (ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, p_ac3dec->total_bits_read += 3; if ((group_code = GetBits (&p_ac3dec->bit_stream,3)) > 6) { - intf_WarnMsg ( 3, "ac3dec warn: invalid mantissa (3)" ); + msg_Warn( p_ac3dec->p_fifo, "invalid mantissa (3)" ); return 0; } @@ -322,7 +322,7 @@ static inline float coeff_get_float (ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, p_ac3dec->total_bits_read += 7; if ((group_code = GetBits (&p_ac3dec->bit_stream,7)) > 120) { - intf_WarnMsg ( 3, "ac3dec warn: invalid mantissa (4)" ); + msg_Warn( p_ac3dec->p_fifo, "invalid mantissa (4)" ); return 0; } @@ -336,7 +336,7 @@ static inline float coeff_get_float (ac3dec_t * p_ac3dec, u16 bap, u16 dithflag, p_ac3dec->total_bits_read += 4; if ((group_code = GetBits (&p_ac3dec->bit_stream,4)) > 14) { - intf_WarnMsg ( 3, "ac3dec warn: invalid mantissa (5)" ); + msg_Warn( p_ac3dec->p_fifo, "invalid mantissa (5)" ); return 0; } diff --git a/plugins/ac3_adec/ac3_parse.c b/plugins/ac3_adec/ac3_parse.c index e313e0a72f..f484cadee3 100644 --- a/plugins/ac3_adec/ac3_parse.c +++ b/plugins/ac3_adec/ac3_parse.c @@ -2,7 +2,7 @@ * ac3_parse.c: ac3 parsing procedures ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_parse.c,v 1.8 2002/03/06 03:27:17 sam Exp $ + * $Id: ac3_parse.c,v 1.9 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Aaron Holtzman @@ -28,17 +28,12 @@ *****************************************************************************/ #include /* memset() */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" -#include "ac3_adec.h" /* ac3dec_thread_t */ +#include "ac3_adec.h" #include "ac3_internal.h" /* EXP_REUSE */ @@ -101,15 +96,13 @@ static void parse_audblk_stats (ac3dec_t * p_ac3dec); /* Parse a syncinfo structure */ int ac3_sync_frame (ac3dec_t * p_ac3dec, ac3_sync_info_t * p_sync_info) { - ac3dec_thread_t * p_ac3dec_t = (ac3dec_thread_t *) p_ac3dec->bit_stream.p_callback_arg; - p_ac3dec->total_bits_read = 0; p_ac3dec->i_available = 0; /* sync word - should be 0x0b77 */ RealignBits(&p_ac3dec->bit_stream); while( (ShowBits (&p_ac3dec->bit_stream,16)) != 0x0b77 && - (!p_ac3dec_t->p_fifo->b_die) && (!p_ac3dec_t->p_fifo->b_error)) + (!p_ac3dec->p_fifo->b_die) && (!p_ac3dec->p_fifo->b_error)) { RemoveBits (&p_ac3dec->bit_stream,8); p_ac3dec->total_bits_read += 8; @@ -298,10 +291,7 @@ int parse_bsi (ac3dec_t * p_ac3dec) } p_ac3dec->total_bits_read += 25; - if( p_main->b_stats ) - { - parse_bsi_stats (p_ac3dec); - } + parse_bsi_stats (p_ac3dec); return 0; } @@ -776,10 +766,7 @@ int parse_audblk (ac3dec_t * p_ac3dec, int blknum) p_ac3dec->total_bits_read += 8 * p_ac3dec->audblk.skipl + 9; } - if( p_main->b_stats ) - { - parse_audblk_stats(p_ac3dec); - } + parse_audblk_stats(p_ac3dec); return 0; } diff --git a/plugins/ac3_adec/ac3_rematrix.c b/plugins/ac3_adec/ac3_rematrix.c index 009ac324f9..5f6d72ba16 100644 --- a/plugins/ac3_adec/ac3_rematrix.c +++ b/plugins/ac3_adec/ac3_rematrix.c @@ -2,7 +2,7 @@ * ac3_rematrix.c: ac3 audio rematrixing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_rematrix.c,v 1.7 2002/05/18 17:47:46 sam Exp $ + * $Id: ac3_rematrix.c,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Aaron Holtzman @@ -25,14 +25,12 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "ac3_imdct.h" #include "ac3_downmix.h" -#include "ac3_decoder.h" +#include "ac3_adec.h" struct rematrix_band_s { u32 start; diff --git a/plugins/ac3_spdif/ac3_spdif.c b/plugins/ac3_spdif/ac3_spdif.c index 0cc4e46a17..7c79227f0e 100644 --- a/plugins/ac3_spdif/ac3_spdif.c +++ b/plugins/ac3_spdif/ac3_spdif.c @@ -2,7 +2,7 @@ * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ac3_spdif.c,v 1.26 2002/05/27 16:01:42 fenrir Exp $ + * $Id: ac3_spdif.c,v 1.27 2002/06/01 12:31:58 sam Exp $ * * Authors: Stéphane Borel * Juha Yrjola @@ -31,27 +31,24 @@ #include /* memcpy() */ #include -#include +#include +#include +#include #ifdef HAVE_UNISTD_H # include #endif -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" - #include "ac3_spdif.h" /**************************************************************************** * Local Prototypes ****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static int InitThread ( ac3_spdif_thread_t * ); static void EndThread ( ac3_spdif_thread_t * ); -static void BitstreamCallback ( bit_stream_t *, boolean_t ); +static void BitstreamCallback ( bit_stream_t *, vlc_bool_t ); int ac3_parse_syncinfo ( struct ac3_spdif_thread_s * ); @@ -118,7 +115,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("SPDIF pass-through AC3 decoder") ) ADD_CAPABILITY( DECODER, 0 ) - ADD_SHORTCUT( "ac3_spdif" ) ADD_SHORTCUT( "pass_through" ) ADD_SHORTCUT( "pass" ) MODULE_INIT_STOP @@ -147,11 +143,11 @@ static int decoder_Probe( u8 *pi_type ) **************************************************************************** * This function is called just after the thread is launched. ****************************************************************************/ -static int decoder_Run( decoder_config_t * p_config ) +static int decoder_Run( decoder_fifo_t * p_fifo ) { ac3_spdif_thread_t * p_spdif; mtime_t i_frame_time; - boolean_t b_sync; + vlc_bool_t b_sync; /* PTS of the current frame */ mtime_t i_current_pts = 0; u16 i_length; @@ -161,18 +157,17 @@ static int decoder_Run( decoder_config_t * p_config ) if( p_spdif == NULL ) { - intf_ErrMsg ( "spdif error: not enough memory " - "for spdif_CreateThread() to create the new thread"); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } - p_spdif->p_config = p_config; + p_spdif->p_fifo = p_fifo; if (InitThread( p_spdif ) ) { - intf_ErrMsg( "spdif error: could not initialize thread" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "could not initialize thread" ); + DecoderError( p_fifo ); free( p_spdif ); return( -1 ); } @@ -194,8 +189,8 @@ static int decoder_Run( decoder_config_t * p_config ) i_frame_time; if( i_delta > i_frame_time || i_delta < -i_frame_time ) { - intf_WarnMsg( 3, "spdif warning: date discontinuity (%d)", - i_delta ); + msg_Warn( p_fifo, + "date discontinuity (%d)", i_delta ); } i_current_pts = p_spdif->i_real_pts; p_spdif->i_real_pts = 0; @@ -257,7 +252,7 @@ static int decoder_Run( decoder_config_t * p_config ) ****************************************************************************/ static int InitThread( ac3_spdif_thread_t * p_spdif ) { - boolean_t b_sync = 0; + vlc_bool_t b_sync = 0; /* Temporary buffer to store first ac3 frame */ p_spdif->p_ac3 = malloc( SPDIF_FRAME_SIZE ); @@ -271,9 +266,9 @@ static int InitThread( ac3_spdif_thread_t * p_spdif ) /* * Initialize the thread properties */ - p_spdif->p_fifo = p_spdif->p_config->p_decoder_fifo; + p_spdif->p_fifo = p_spdif->p_fifo; - InitBitstream( &p_spdif->bit_stream, p_spdif->p_config->p_decoder_fifo, + InitBitstream( &p_spdif->bit_stream, p_spdif->p_fifo, BitstreamCallback, (void*)p_spdif ); /* Find syncword */ @@ -299,7 +294,7 @@ static int InitThread( ac3_spdif_thread_t * p_spdif ) /* Check stream properties */ if( ac3_parse_syncinfo( p_spdif ) < 0 ) { - intf_ErrMsg( "spdif error: stream not valid"); + msg_Err( p_spdif->p_fifo, "stream not valid" ); return( -1 ); } @@ -309,27 +304,28 @@ static int InitThread( ac3_spdif_thread_t * p_spdif ) * but all rates should be supported by the decoder (32, 44.1, 48) */ if( p_spdif->ac3_info.i_sample_rate != 48000 ) { - intf_ErrMsg( "spdif error: Only 48000 Hz streams tested" - "expect weird things !" ); + msg_Err( p_spdif->p_fifo, + "only 48000 Hz streams tested, expect weird things!" ); } /* The audio output need to be ready for an ac3 stream */ - p_spdif->i_previous_format = config_GetIntVariable( "audio-format" ); - config_PutIntVariable( "audio-format", 8 ); + p_spdif->i_previous_format = config_GetInt( p_spdif->p_fifo, + "audio-format" ); + config_PutInt( p_spdif->p_fifo, "audio-format", 8 ); /* Creating the audio output fifo */ - p_spdif->p_aout_fifo = aout_CreateFifo( AOUT_FIFO_SPDIF, 1, - p_spdif->ac3_info.i_sample_rate, - p_spdif->ac3_info.i_frame_size, - NULL ); + p_spdif->p_aout_fifo = + aout_CreateFifo( p_spdif->p_fifo->p_this, AOUT_FIFO_SPDIF, + 1, p_spdif->ac3_info.i_sample_rate, + p_spdif->ac3_info.i_frame_size, NULL ); if( p_spdif->p_aout_fifo == NULL ) { return( -1 ); } - intf_WarnMsg( 3, "spdif: aout fifo #%d created", - p_spdif->p_aout_fifo->i_fifo ); + msg_Dbg( p_spdif->p_fifo, "aout fifo #%d created", + p_spdif->p_aout_fifo->i_fifo ); /* Put read data into fifo */ memcpy( (u8*)(p_spdif->p_aout_fifo->buffer) + @@ -365,7 +361,8 @@ static void EndThread( ac3_spdif_thread_t * p_spdif ) } /* restore previous setting for output format */ - config_PutIntVariable( "audio-format", p_spdif->i_previous_format ); + config_PutInt( p_spdif->p_fifo, "audio-format", + p_spdif->i_previous_format ); /* Destroy descriptor */ free( p_spdif ); @@ -377,7 +374,7 @@ static void EndThread( ac3_spdif_thread_t * p_spdif ) * This function is called by input's NextDataPacket. *****************************************************************************/ static void BitstreamCallback( bit_stream_t * p_bit_stream, - boolean_t b_new_pes ) + vlc_bool_t b_new_pes ) { ac3_spdif_thread_t * p_spdif; diff --git a/plugins/ac3_spdif/ac3_spdif.h b/plugins/ac3_spdif/ac3_spdif.h index 3a6edffef2..e4eef8083d 100644 --- a/plugins/ac3_spdif/ac3_spdif.h +++ b/plugins/ac3_spdif/ac3_spdif.h @@ -2,7 +2,7 @@ * ac3_spdif.h: header for ac3 pass-through ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ac3_spdif.h,v 1.3 2002/03/15 01:47:16 stef Exp $ + * $Id: ac3_spdif.h,v 1.4 2002/06/01 12:31:58 sam Exp $ * * Authors: Stéphane Borel * @@ -68,7 +68,6 @@ typedef struct ac3_spdif_thread_s * Input properties */ decoder_fifo_t * p_fifo; /* stores the PES stream data */ - decoder_config_t * p_config; /* The bit stream structure handles the PES stream at the bit level */ bit_stream_t bit_stream; diff --git a/plugins/access/file.c b/plugins/access/file.c index 45c2f6857a..9f6a32c128 100644 --- a/plugins/access/file.c +++ b/plugins/access/file.c @@ -2,7 +2,7 @@ * file.c: file input (file: access plug-in) ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: file.c,v 1.6 2002/05/22 17:17:45 sam Exp $ + * $Id: file.c,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Authors: Christophe Massiot * @@ -31,7 +31,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -39,16 +40,11 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - /***************************************************************************** * Local prototypes *****************************************************************************/ static void input_getfunctions( function_list_t * ); -static int FileOpen ( struct input_thread_s * ); +static int FileOpen ( input_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -59,7 +55,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("Standard filesystem file reading") ) ADD_CAPABILITY( ACCESS, 50 ) - ADD_SHORTCUT( "file" ) ADD_SHORTCUT( "stream" ) MODULE_INIT_STOP @@ -95,7 +90,7 @@ static int FileOpen( input_thread_t * p_input ) int i_stat; struct stat stat_info; input_socket_t * p_access_data; - boolean_t b_stdin; + vlc_bool_t b_stdin; p_input->i_mtu = 0; @@ -103,8 +98,8 @@ static int FileOpen( input_thread_t * p_input ) if( !b_stdin && (i_stat = stat( psz_name, &stat_info )) == (-1) ) { - intf_ErrMsg( "input error: cannot stat() file `%s' (%s)", - psz_name, strerror(errno)); + msg_Err( p_input, "cannot stat() file `%s' (%s)", + psz_name, strerror(errno)); return( -1 ); } @@ -145,8 +140,7 @@ static int FileOpen( input_thread_t * p_input ) else { vlc_mutex_unlock( &p_input->stream.stream_lock ); - intf_ErrMsg( "input error: unknown file type for `%s'", - psz_name ); + msg_Err( p_input, "unknown file type for `%s'", psz_name ); return( -1 ); } } @@ -155,12 +149,12 @@ static int FileOpen( input_thread_t * p_input ) p_input->stream.i_method = INPUT_METHOD_FILE; vlc_mutex_unlock( &p_input->stream.stream_lock ); - intf_WarnMsg( 2, "input: opening file `%s'", psz_name ); + msg_Dbg( p_input, "opening file `%s'", psz_name ); p_access_data = malloc( sizeof(input_socket_t) ); p_input->p_access_data = (void *)p_access_data; if( p_access_data == NULL ) { - intf_ErrMsg( "input error: Out of memory" ); + msg_Err( p_input, "out of memory" ); return( -1 ); } @@ -171,8 +165,8 @@ static int FileOpen( input_thread_t * p_input ) else if( (p_access_data->i_handle = open( psz_name, /*O_NONBLOCK | O_LARGEFILE*/ 0 )) == (-1) ) { - intf_ErrMsg( "input error: cannot open file %s (%s)", psz_name, - strerror(errno) ); + msg_Err( p_input, "cannot open file %s (%s)", psz_name, + strerror(errno) ); free( p_access_data ); return( -1 ); } diff --git a/plugins/access/http.c b/plugins/access/http.c index 520082ae22..23e7cd4d00 100644 --- a/plugins/access/http.c +++ b/plugins/access/http.c @@ -2,7 +2,7 @@ * http.c: HTTP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: http.c,v 1.10 2002/05/22 23:11:00 massiot Exp $ + * $Id: http.c,v 1.11 2002/06/01 12:31:58 sam Exp $ * * Authors: Christophe Massiot * @@ -31,7 +31,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -49,21 +50,16 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "network.h" /***************************************************************************** * Local prototypes *****************************************************************************/ static void input_getfunctions( function_list_t * ); -static int HTTPOpen ( struct input_thread_s * ); -static void HTTPClose ( struct input_thread_s * ); -static int HTTPSetProgram ( struct input_thread_s * , pgrm_descriptor_t * ); -static void HTTPSeek ( struct input_thread_s *, off_t ); +static int HTTPOpen ( input_thread_t * ); +static void HTTPClose ( input_thread_t * ); +static int HTTPSetProgram ( input_thread_t *, pgrm_descriptor_t * ); +static void HTTPSeek ( input_thread_t *, off_t ); /***************************************************************************** * Build configuration tree. @@ -74,7 +70,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("HTTP access plug-in") ) ADD_CAPABILITY( ACCESS, 0 ) - ADD_SHORTCUT( "http" ) ADD_SHORTCUT( "http4" ) ADD_SHORTCUT( "http6" ) MODULE_INIT_STOP @@ -122,12 +117,12 @@ typedef struct _input_socket_s static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) { _input_socket_t * p_access_data = p_input->p_access_data; - struct module_s * p_network; + module_t * p_network; char psz_buffer[256]; byte_t * psz_parser; /* Find an appropriate network module */ - p_network = module_Need( MODULE_CAPABILITY_NETWORK, + p_network = module_Need( p_input, MODULE_CAPABILITY_NETWORK, p_access_data->psz_network, &p_access_data->socket_desc ); if( p_network == NULL ) @@ -153,7 +148,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) if( send( p_access_data->_socket.i_handle, psz_buffer, strlen( psz_buffer ), 0 ) == (-1) ) { - intf_ErrMsg( "http error: cannot send request (%s)", strerror(errno) ); + msg_Err( p_input, "cannot send request (%s)", strerror(errno) ); input_FDNetworkClose( p_input ); return( -1 ); } @@ -178,7 +173,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) { if( input_Peek( p_input, &psz_parser, MAX_LINE ) <= 0 ) { - intf_ErrMsg( "http error: not enough data" ); + msg_Err( p_input, "not enough data" ); input_FDNetworkClose( p_input ); return( -1 ); } @@ -238,18 +233,18 @@ static int HTTPOpen( input_thread_t * p_input ) p_access_data = p_input->p_access_data = malloc( sizeof(_input_socket_t) ); if( p_access_data == NULL ) { - intf_ErrMsg( "http error: Out of memory" ); + msg_Err( p_input, "out of memory" ); free(psz_name); return( -1 ); } p_access_data->psz_name = psz_name; p_access_data->psz_network = ""; - if( config_GetIntVariable( "ipv4" ) ) + if( config_GetInt( p_input, "ipv4" ) ) { p_access_data->psz_network = "ipv4"; } - if( config_GetIntVariable( "ipv6" ) ) + if( config_GetInt( p_input, "ipv6" ) ) { p_access_data->psz_network = "ipv6"; } @@ -304,8 +299,7 @@ static int HTTPOpen( input_thread_t * p_input ) i_server_port = strtol( psz_server_port, &psz_parser, 10 ); if( *psz_parser ) { - intf_ErrMsg( "input error: cannot parse server port near %s", - psz_parser ); + msg_Err( p_input, "cannot parse server port near %s", psz_parser ); free( p_input->p_access_data ); free( psz_name ); return( -1 ); @@ -319,7 +313,7 @@ static int HTTPOpen( input_thread_t * p_input ) if( !*psz_server_addr ) { - intf_ErrMsg( "input error: no server given" ); + msg_Err( p_input, "no server given" ); free( p_input->p_access_data ); free( psz_name ); return( -1 ); @@ -382,7 +376,7 @@ static int HTTPOpen( input_thread_t * p_input ) } else { - intf_ErrMsg( "input error: http_proxy environment variable is invalid !" ); + msg_Err( p_input, "http_proxy environment variable is invalid!" ); free( p_input->p_access_data ); free( psz_name ); return( -1 ); @@ -409,8 +403,8 @@ static int HTTPOpen( input_thread_t * p_input ) } p_access_data->psz_buffer[sizeof(p_access_data->psz_buffer) - 1] = '\0'; - intf_WarnMsg( 2, "input: opening server=%s port=%d path=%s", - psz_server_addr, i_server_port, psz_path ); + msg_Dbg( p_input, "opening server=%s port=%d path=%s", + psz_server_addr, i_server_port, psz_path ); vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_pace_control = 1; @@ -448,7 +442,7 @@ static void HTTPSeek( input_thread_t * p_input, off_t i_pos ) { _input_socket_t * p_access_data = p_input->p_access_data; close( p_access_data->_socket.i_handle ); - intf_WarnMsg( 2, "http: seeking to position %lld", i_pos ); + msg_Dbg( p_input, "seeking to position %lld", i_pos ); HTTPConnect( p_input, i_pos ); } diff --git a/plugins/access/udp.c b/plugins/access/udp.c index ea872ab47d..e5a50bceb7 100644 --- a/plugins/access/udp.c +++ b/plugins/access/udp.c @@ -2,7 +2,7 @@ * udp.c: raw UDP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: udp.c,v 1.10 2002/05/15 13:07:18 marcari Exp $ + * $Id: udp.c,v 1.11 2002/06/01 12:31:58 sam Exp $ * * Authors: Christophe Massiot * @@ -31,7 +31,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -39,18 +40,13 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "network.h" /***************************************************************************** * Local prototypes *****************************************************************************/ static void input_getfunctions( function_list_t * ); -static int UDPOpen ( struct input_thread_s * ); +static int UDPOpen ( input_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -61,7 +57,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("Raw UDP access plug-in") ) ADD_CAPABILITY( ACCESS, 0 ) - ADD_SHORTCUT( "udp" ) ADD_SHORTCUT( "udpstream" ) ADD_SHORTCUT( "udp4" ) ADD_SHORTCUT( "udp6" ) @@ -96,7 +91,7 @@ static void input_getfunctions( function_list_t * p_function_list ) static int UDPOpen( input_thread_t * p_input ) { input_socket_t * p_access_data; - struct module_s * p_network; + module_t * p_network; char * psz_network = ""; char * psz_name = strdup(p_input->psz_name); char * psz_parser = psz_name; @@ -107,11 +102,11 @@ static int UDPOpen( input_thread_t * p_input ) int i_bind_port = 0, i_server_port = 0; network_socket_t socket_desc; - if( config_GetIntVariable( "ipv4" ) ) + if( config_GetInt( p_input, "ipv4" ) ) { psz_network = "ipv4"; } - if( config_GetIntVariable( "ipv6" ) ) + if( config_GetInt( p_input, "ipv6" ) ) { psz_network = "ipv6"; } @@ -205,8 +200,7 @@ static int UDPOpen( input_thread_t * p_input ) i_server_port = strtol( psz_server_port, &psz_parser, 10 ); if( *psz_parser ) { - intf_ErrMsg( "input error: cannot parse server port near %s", - psz_parser ); + msg_Err( p_input, "cannot parse server port near %s", psz_parser ); free(psz_name); return( -1 ); } @@ -217,8 +211,7 @@ static int UDPOpen( input_thread_t * p_input ) i_bind_port = strtol( psz_bind_port, &psz_parser, 10 ); if( *psz_parser ) { - intf_ErrMsg( "input error: cannot parse bind port near %s", - psz_parser ); + msg_Err( p_input, "cannot parse bind port near %s", psz_parser ); free(psz_name); return( -1 ); } @@ -233,19 +226,19 @@ static int UDPOpen( input_thread_t * p_input ) if( *psz_server_addr || i_server_port ) { - intf_ErrMsg("input warning: this UDP syntax is deprecated ; the server argument will be"); - intf_ErrMsg("ignored (%s:%d). If you wanted to enter a multicast address", - psz_server_addr, i_server_port); - intf_ErrMsg("or local port, type : %s:@%s:%d", - *p_input->psz_access ? p_input->psz_access : "udp", - psz_server_addr, i_server_port ); + msg_Err( p_input, "this UDP syntax is deprecated; the server argument will be"); + msg_Err( p_input, "ignored (%s:%d). If you wanted to enter a multicast address", + psz_server_addr, i_server_port); + msg_Err( p_input, "or local port, type : %s:@%s:%d", + *p_input->psz_access ? p_input->psz_access : "udp", + psz_server_addr, i_server_port ); i_server_port = 0; psz_server_addr = ""; } - intf_WarnMsg( 2, "input: opening server=%s:%d local=%s:%d", - psz_server_addr, i_server_port, psz_bind_addr, i_bind_port ); + msg_Dbg( p_input, "opening server=%s:%d local=%s:%d", + psz_server_addr, i_server_port, psz_bind_addr, i_bind_port ); /* Prepare the network_socket_t structure */ socket_desc.i_type = NETWORK_UDP; @@ -255,8 +248,8 @@ static int UDPOpen( input_thread_t * p_input ) socket_desc.i_server_port = i_server_port; /* Find an appropriate network module */ - p_network = module_Need( MODULE_CAPABILITY_NETWORK, psz_network, - &socket_desc ); + p_network = module_Need( p_input, MODULE_CAPABILITY_NETWORK, + psz_network, &socket_desc ); free(psz_name); if( p_network == NULL ) { @@ -267,7 +260,7 @@ static int UDPOpen( input_thread_t * p_input ) p_access_data = p_input->p_access_data = malloc( sizeof(input_socket_t) ); if( p_access_data == NULL ) { - intf_ErrMsg( "input error: Out of memory" ); + msg_Err( p_input, "out of memory" ); return( -1 ); } diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index 94287faf5d..e363f89943 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -2,7 +2,7 @@ * alsa.c : alsa plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: alsa.c,v 1.17 2002/04/21 10:32:20 sam Exp $ + * $Id: alsa.c,v 1.18 2002/06/01 12:31:58 sam Exp $ * * Authors: Henri Fallon - Original Author * Jeffrey Baker - Port to ALSA 1.0 API @@ -27,14 +27,12 @@ *****************************************************************************/ #include /* ENOMEM */ #include /* strerror() */ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ -#include - -#include +#include +#include -#include "audio_output.h" /* aout_thread_t */ +#include /***************************************************************************** * Capabilities defined in the other files. @@ -57,7 +55,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("ALSA audio module") ) ADD_CAPABILITY( AOUT, 50 ) - ADD_SHORTCUT( "alsa" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -82,7 +79,7 @@ typedef struct alsa_card_s /* here we store plugin dependant informations */ -typedef struct aout_sys_s +struct aout_sys_s { snd_pcm_t * p_alsa_handle; unsigned long buffer_time; @@ -93,7 +90,7 @@ typedef struct aout_sys_s unsigned int bytes_per_sample; unsigned int samples_per_frame; unsigned int bytes_per_frame; -} aout_sys_t; +}; /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -122,8 +119,7 @@ static int aout_Open( aout_thread_t *p_aout ) p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg( "aout error: failed allocating memory for ALSA (%s)", - strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return -1; } @@ -147,8 +143,7 @@ static int aout_Open( aout_thread_t *p_aout ) psz_alsadev, SND_PCM_STREAM_PLAYBACK, 0); if( i_ret != 0 ) { - intf_ErrMsg( "aout error: could not open ALSA device (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "cannot open ALSA device (%s)", snd_strerror(i_ret) ); return -1; } @@ -203,7 +198,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) i_rv = snd_pcm_hw_params_any( p_aout->p_sys->p_alsa_handle, p_hw ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to retrieve initial parameters" ); + msg_Err( p_aout, "unable to retrieve initial parameters" ); return( -1 ); } @@ -211,7 +206,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) SND_PCM_ACCESS_RW_INTERLEAVED ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set interleaved stream format" ); + msg_Err( p_aout, "unable to set interleaved stream format" ); return( -1 ); } @@ -219,8 +214,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) p_hw, i_format ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set stream sample size and word" - " order" ); + msg_Err( p_aout, "unable to set stream sample size and word order" ); return( -1 ); } @@ -228,7 +222,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) p_aout->i_channels ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set number of output channels" ); + msg_Err( p_aout, "unable to set number of output channels" ); return( -1 ); } @@ -236,7 +230,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) p_aout->i_rate, 0 ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set sample rate" ); + msg_Err( p_aout, "unable to set sample rate" ); return( -1 ); } p_aout->p_sys->rate = i_rv; @@ -247,7 +241,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) 0 ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set buffer time" ); + msg_Err( p_aout, "unable to set buffer time" ); return( -1 ); } p_aout->p_sys->buffer_time = i_rv; @@ -256,7 +250,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) p_hw, p_aout->p_sys->buffer_time / p_aout->p_sys->bytes_per_frame, 0 ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set period time" ); + msg_Err( p_aout, "unable to set period time" ); return( -1 ); } p_aout->p_sys->period_time = i_rv; @@ -264,7 +258,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) i_rv = snd_pcm_hw_params(p_aout->p_sys->p_alsa_handle, p_hw); if (i_rv < 0) { - intf_ErrMsg( "aout error: unable to set hardware configuration" ); + msg_Err( p_aout, "unable to set hardware configuration" ); return( -1 ); } @@ -288,7 +282,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) i_rv = snd_pcm_sw_params( p_aout->p_sys->p_alsa_handle, p_sw ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to set software configuration" ); + msg_Err( p_aout, "unable to set software configuration" ); return( -1 ); } @@ -305,14 +299,14 @@ static void aout_HandleXrun(aout_thread_t *p_aout) { int i_rv; - intf_ErrMsg( "aout error: resetting output after buffer underrun" ); + msg_Err( p_aout, "resetting output after buffer underrun" ); // i_rv = snd_pcm_reset( p_aout->p_sys->p_alsa_handle ); i_rv = snd_pcm_prepare( p_aout->p_sys->p_alsa_handle ); if( i_rv < 0 ) { - intf_ErrMsg( "aout error: unable to recover from buffer underrun (%s)", - snd_strerror( i_rv ) ); + msg_Err( p_aout, "unable to recover from buffer underrun (%s)", + snd_strerror( i_rv ) ); } } @@ -337,8 +331,8 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) if( i_alsa_get_status_returns ) { - intf_ErrMsg ( "aout error: failed getting alsa buffer info (%s)", - snd_strerror ( i_alsa_get_status_returns ) ); + msg_Err( p_aout, "failed getting alsa buffer info (%s)", + snd_strerror ( i_alsa_get_status_returns ) ); return ( -1 ); } @@ -354,8 +348,8 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) break; default: - intf_ErrMsg( "aout error: unhandled condition %i", - snd_pcm_status_get_state( p_status ) ); + msg_Err( p_aout, "unhandled condition %i", + snd_pcm_status_get_state( p_status ) ); break; } @@ -385,8 +379,8 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) if( (signed int) rv < 0 ) { - intf_ErrMsg( "aout error: failed writing to output (%s)", - snd_strerror( rv ) ); + msg_Err( p_aout, "failed writing to output (%s)", + snd_strerror( rv ) ); return; } @@ -405,8 +399,8 @@ static void aout_Close( aout_thread_t *p_aout ) if( i_close_returns ) { - intf_ErrMsg( "aout error: failed closing ALSA device (%s)", - i_close_returns, snd_strerror( i_close_returns ) ); + msg_Err( p_aout, "failed closing ALSA device (%s)", + snd_strerror( i_close_returns ) ); } free( p_aout->p_sys ); diff --git a/plugins/arts/Makefile b/plugins/arts/Makefile index 97097b154b..ddd35a10db 100644 --- a/plugins/arts/Makefile +++ b/plugins/arts/Makefile @@ -1 +1 @@ -arts_SOURCES = arts.c aout_arts.c +arts_SOURCES = arts.c diff --git a/plugins/arts/aout_arts.c b/plugins/arts/aout_arts.c deleted file mode 100644 index 4e02122aaa..0000000000 --- a/plugins/arts/aout_arts.c +++ /dev/null @@ -1,152 +0,0 @@ -/***************************************************************************** - * aout_arts.c : aRts functions library - ***************************************************************************** - * Copyright (C) 2001 VideoLAN - * - * Authors: Blindauer Emmanuel - * - * 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. - *****************************************************************************/ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#include /* ENOMEM */ -#include /* open(), O_WRONLY */ -#include /* strerror() */ -#include /* write(), close() */ -#include /* "intf_msg.h" */ -#include /* calloc(), malloc(), free() */ - -#include - -#include - -#include "audio_output.h" /* aout_thread_t */ - -/***************************************************************************** - * aout_sys_t: arts audio output method descriptor - ***************************************************************************** - * This structure is part of the audio output thread descriptor. - * It describes some arts specific variables. - *****************************************************************************/ -typedef struct aout_sys_s -{ - arts_stream_t stream; - -} aout_sys_t; - -/***************************************************************************** - * Local prototypes. - *****************************************************************************/ -static int aout_Open ( aout_thread_t *p_aout ); -static int aout_SetFormat ( aout_thread_t *p_aout ); -static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); -static void aout_Play ( aout_thread_t *p_aout, - byte_t *buffer, int i_size ); -static void aout_Close ( aout_thread_t *p_aout ); - -/***************************************************************************** - * Functions exported as capabilities. They are declared as static so that - * we don't pollute the namespace too much. - *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ) -{ - p_function_list->functions.aout.pf_open = aout_Open; - p_function_list->functions.aout.pf_setformat = aout_SetFormat; - p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo; - p_function_list->functions.aout.pf_play = aout_Play; - p_function_list->functions.aout.pf_close = aout_Close; -} - -/***************************************************************************** - * aout_Open: initialize arts connection to server - *****************************************************************************/ -static int aout_Open( aout_thread_t *p_aout ) -{ - int i_err = 0; - - /* Allocate structure */ - p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); - if( p_aout->p_sys == NULL ) - { - intf_ErrMsg("error: %s", strerror(ENOMEM) ); - return( 1 ); - } - - i_err = arts_init(); - - if (i_err < 0) - { - intf_ErrMsg( "aout error: arts_init (%s)", arts_error_text(i_err) ); - free( p_aout->p_sys ); - return(-1); - } - - p_aout->p_sys->stream = - arts_play_stream( p_aout->i_rate, 16, p_aout->i_channels, "vlc" ); - - return( 0 ); -} - -/***************************************************************************** - * aout_SetFormat: set the output format - *****************************************************************************/ -static int aout_SetFormat( aout_thread_t *p_aout ) -{ - /*Not ready*/ -/* p_aout->i_latency = esd_get_latency(i_fd);*/ - p_aout->i_latency = 0; - - //intf_WarnMsg( 5, "aout_arts_latency: %d",p_aout->i_latency); - - return( 0 ); -} - -/***************************************************************************** - * aout_GetBufInfo: buffer status query - *****************************************************************************/ -static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) -{ - /* arbitrary value that should be changed */ - return( i_buffer_limit ); -} - -/***************************************************************************** - * aout_Play: play a sound samples buffer - ***************************************************************************** - * This function writes a buffer of i_length bytes in the socket - *****************************************************************************/ -static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) -{ - - int i_err = arts_write( p_aout->p_sys->stream, buffer, i_size ); - - if( i_err < 0 ) - { - intf_ErrMsg( "aout error: arts_write (%s)", arts_error_text(i_err) ); - } - -} - -/***************************************************************************** - * aout_Close: close the Esound socket - *****************************************************************************/ -static void aout_Close( aout_thread_t *p_aout ) -{ - arts_close_stream( p_aout->p_sys->stream ); - free( p_aout->p_sys ); -} - diff --git a/plugins/arts/arts.c b/plugins/arts/arts.c index 915b8f832d..fd995d9275 100644 --- a/plugins/arts/arts.c +++ b/plugins/arts/arts.c @@ -23,15 +23,37 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* malloc(), free() */ -#include /* strdup() */ +#include /* ENOMEM */ +#include /* open(), O_WRONLY */ +#include /* strerror() */ +#include /* write(), close() */ +#include /* calloc(), malloc(), free() */ -#include +#include +#include + +#include + +/***************************************************************************** + * aout_sys_t: arts audio output method descriptor + ***************************************************************************** + * This structure is part of the audio output thread descriptor. + * It describes some arts specific variables. + *****************************************************************************/ +struct aout_sys_s +{ + arts_stream_t stream; +}; /***************************************************************************** - * Capabilities defined in the other files. + * Local prototypes. *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ); +static void aout_getfunctions ( function_list_t * ); +static int aout_Open ( aout_thread_t * ); +static int aout_SetFormat ( aout_thread_t * ); +static int aout_GetBufInfo ( aout_thread_t *, int ); +static void aout_Play ( aout_thread_t *, byte_t *, int ); +static void aout_Close ( aout_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -42,13 +64,102 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("aRts audio module") ) ADD_CAPABILITY( AOUT, 50 ) - ADD_SHORTCUT( "arts" ) MODULE_INIT_STOP MODULE_ACTIVATE_START - _M( aout_getfunctions )( &p_module->p_functions->aout ); + aout_getfunctions( &p_module->p_functions->aout ); MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP +/***************************************************************************** + * Functions exported as capabilities. They are declared as static so that + * we don't pollute the namespace too much. + *****************************************************************************/ +static void aout_getfunctions( function_list_t * p_function_list ) +{ + p_function_list->functions.aout.pf_open = aout_Open; + p_function_list->functions.aout.pf_setformat = aout_SetFormat; + p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo; + p_function_list->functions.aout.pf_play = aout_Play; + p_function_list->functions.aout.pf_close = aout_Close; +} + +/***************************************************************************** + * aout_Open: initialize arts connection to server + *****************************************************************************/ +static int aout_Open( aout_thread_t *p_aout ) +{ + int i_err = 0; + + /* Allocate structure */ + p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); + if( p_aout->p_sys == NULL ) + { + msg_Err( p_aout, "out of memory" ); + return( 1 ); + } + + i_err = arts_init(); + + if (i_err < 0) + { + msg_Err( p_aout, "arts_init failed (%s)", arts_error_text(i_err) ); + free( p_aout->p_sys ); + return(-1); + } + + p_aout->p_sys->stream = + arts_play_stream( p_aout->i_rate, 16, p_aout->i_channels, "vlc" ); + + return( 0 ); +} + +/***************************************************************************** + * aout_SetFormat: set the output format + *****************************************************************************/ +static int aout_SetFormat( aout_thread_t *p_aout ) +{ + /*Not ready*/ +/* p_aout->i_latency = esd_get_latency(i_fd);*/ + p_aout->i_latency = 0; + + //msg_Dbg( p_aout, "aout_arts_latency: %d", p_aout->i_latency ); + + return( 0 ); +} + +/***************************************************************************** + * aout_GetBufInfo: buffer status query + *****************************************************************************/ +static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) +{ + /* arbitrary value that should be changed */ + return( i_buffer_limit ); +} + +/***************************************************************************** + * aout_Play: play a sound samples buffer + ***************************************************************************** + * This function writes a buffer of i_length bytes in the socket + *****************************************************************************/ +static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) +{ + int i_err = arts_write( p_aout->p_sys->stream, buffer, i_size ); + + if( i_err < 0 ) + { + msg_Err( p_aout, "arts_write failed (%s)", arts_error_text(i_err) ); + } +} + +/***************************************************************************** + * aout_Close: close the Esound socket + *****************************************************************************/ +static void aout_Close( aout_thread_t *p_aout ) +{ + arts_close_stream( p_aout->p_sys->stream ); + free( p_aout->p_sys ); +} + diff --git a/plugins/avi/avi.c b/plugins/avi/avi.c index 74c4c8ed0a..db1063f03b 100644 --- a/plugins/avi/avi.c +++ b/plugins/avi/avi.c @@ -2,7 +2,7 @@ * avi.c : AVI file Stream input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: avi.c,v 1.20 2002/05/25 16:23:07 fenrir Exp $ + * $Id: avi.c,v 1.21 2002/06/01 12:31:58 sam Exp $ * Authors: Laurent Aimar * * This program is free software; you can redistribute it and/or modify @@ -28,12 +28,8 @@ #include #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" +#include +#include #include "video.h" @@ -44,10 +40,10 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -static void input_getfunctions( function_list_t * p_function_list ); -static int AVIDemux ( struct input_thread_s * ); -static int AVIInit ( struct input_thread_s * ); -static void AVIEnd ( struct input_thread_s * ); +static void input_getfunctions( function_list_t * ); +static int AVIDemux ( input_thread_t * ); +static int AVIInit ( input_thread_t * ); +static void AVIEnd ( input_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -58,7 +54,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( "RIFF-AVI Stream input" ) ADD_CAPABILITY( DEMUX, 150 ) - ADD_SHORTCUT( "avi" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -277,19 +272,19 @@ static void __AVI_GetIndex( input_thread_t *p_input ) &p_idx1, FOURCC_idx1)!=0 ) { - intf_WarnMsg( 1, "input init: cannot find index" ); + msg_Warn( p_input, "cannot find index" ); RIFF_GoToChunk( p_input, p_avi_demux->p_hdrl ); return; } p_avi_demux->p_idx1 = p_idx1; - intf_WarnMsg( 1, "input init: loading index" ); + msg_Dbg( p_input, "loading index" ); for(;;) { i_read = __MIN( 16*1024, p_idx1->i_size - i_totalentry *16); if( ((i_read = input_Peek( p_input, &p_buff, i_read )) < 16 ) ||( i_totalentry *16 >= p_idx1->i_size ) ) { - intf_WarnMsg( 1,"input info: read %d idx entries", i_totalentry ); + msg_Dbg( p_input, "read %d idx entries", i_totalentry ); return; } i_read /= 16 ; @@ -325,7 +320,7 @@ static int __AVI_SeekToChunk( input_thread_t *p_input, AVIStreamInfo_t *p_info ) return( 0 ); } /* no index can't arrive but ...*/ - intf_WarnMsg( 1, "input error: can't seek"); + msg_Warn( p_input, "cannot seek"); return( -1 ); } @@ -360,8 +355,7 @@ static void __AVI_UpdateIndexOffset( input_thread_t *p_input ) { for( i = 0; i < p_info->i_idxnb; i++ ) { - p_info->p_index[i].i_pos += - p_avi_demux->p_movi->i_pos + 8; + p_info->p_index[i].i_pos += p_avi_demux->p_movi->i_pos + 8; } } } @@ -452,14 +446,14 @@ static int AVIInit( input_thread_t *p_input ) /* we need to seek to be able to readcorrectly */ if( !p_input->stream.b_seekable ) { - intf_WarnMsg( 2,"input: RIFF-AVI plug-in discarded (no seekable)" ); + msg_Warn( p_input, "RIFF-AVI module discarded (not seekable)" ); return( -1 ); } p_input->p_demux_data = p_avi_demux = malloc( sizeof(demux_data_avi_file_t) ); if( p_avi_demux == NULL ) { - intf_ErrMsg( "input error: not enough memory" ); + msg_Err( p_input, "out of memory" ); return( -1 ); } memset( p_avi_demux, 0, sizeof( demux_data_avi_file_t ) ); @@ -475,7 +469,7 @@ static int AVIInit( input_thread_t *p_input ) if( RIFF_TestFileHeader( p_input, &p_riff, FOURCC_AVI ) != 0 ) { __AVIFreeDemuxData( p_input ); - intf_WarnMsg( 2,"input: RIFF-AVI plug-in discarded (avi_file)" ); + msg_Warn( p_input, "RIFF-AVI module discarded" ); return( -1 ); } p_avi_demux->p_riff = p_riff; @@ -483,7 +477,7 @@ static int AVIInit( input_thread_t *p_input ) if ( RIFF_DescendChunk(p_input) != 0 ) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot look for subchunk (avi_file)" ); + msg_Err( p_input, "cannot look for subchunk" ); return ( -1 ); } @@ -491,7 +485,7 @@ static int AVIInit( input_thread_t *p_input ) if( RIFF_FindListChunk(p_input ,&p_hdrl,p_riff, FOURCC_hdrl) != 0 ) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot find \"LIST-hdrl\" (avi_file)" ); + msg_Err( p_input, "cannot find \"LIST-hdrl\"" ); return( -1 ); } p_avi_demux->p_hdrl = p_hdrl; @@ -499,7 +493,7 @@ static int AVIInit( input_thread_t *p_input ) if( RIFF_DescendChunk(p_input) != 0 ) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot look for subchunk (avi_file)" ); + msg_Err( p_input, "cannot look for subchunk" ); return ( -1 ); } /* in LIST-hdrl search avih */ @@ -507,7 +501,7 @@ static int AVIInit( input_thread_t *p_input ) &p_avih, FOURCC_avih ) != 0 ) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot find \"avih\" chunk (avi_file)" ); + msg_Err( p_input, "cannot find \"avih\" chunk" ); return( -1 ); } __AVI_Parse_avih( &p_avi_demux->avih, p_avih->p_data->p_payload_start ); @@ -517,24 +511,24 @@ static int AVIInit( input_thread_t *p_input ) /* no stream found, perhaps it would be cool to find it */ { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: no defined stream !" ); + msg_Err( p_input, "no stream defined!" ); return( -1 ); } /* create one program */ - vlc_mutex_lock( &p_input->stream.stream_lock ); + vlc_mutex_lock( &p_input->stream.stream_lock ); if( input_InitStream( p_input, 0 ) == -1) { vlc_mutex_unlock( &p_input->stream.stream_lock ); __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot init stream" ); + msg_Err( p_input, "cannot init stream" ); return( -1 ); } if( input_AddProgram( p_input, 0, 0) == NULL ) { vlc_mutex_unlock( &p_input->stream.stream_lock ); __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot add program" ); + msg_Err( p_input, "cannot add program" ); return( -1 ); } p_input->stream.p_selected_program = p_input->stream.pp_programs[0]; @@ -561,7 +555,7 @@ static int AVIInit( input_thread_t *p_input ) ||( RIFF_DescendChunk(p_input) != 0 )) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot find \"LIST-strl\" (avi_file)" ); + msg_Err( p_input, "cannot find \"LIST-strl\"" ); return( -1 ); } @@ -571,7 +565,7 @@ static int AVIInit( input_thread_t *p_input ) { RIFF_DeleteChunk( p_input, p_strl ); __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot find \"strh\" (avi_file)" ); + msg_Err( p_input, "cannot find \"strh\"" ); return( -1 ); } __AVI_Parse_Header( &p_info->header, @@ -584,7 +578,7 @@ static int AVIInit( input_thread_t *p_input ) { RIFF_DeleteChunk( p_input, p_strl ); __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot find \"strf\" (avi_file)" ); + msg_Err( p_input, "cannot find \"strf\"" ); return( -1 ); } /* we don't get strd, it's useless for divx,opendivx,mepgaudio */ @@ -593,7 +587,7 @@ static int AVIInit( input_thread_t *p_input ) RIFF_DeleteChunk( p_input, p_strf ); RIFF_DeleteChunk( p_input, p_strl ); __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot go out (\"strl\") (avi_file)" ); + msg_Err( p_input, "cannot go out (\"strl\")" ); return( -1 ); } @@ -616,9 +610,8 @@ static int AVIInit( input_thread_t *p_input ) __AVI_AudioGetType( p_info->audio_format.i_formattag ); if( p_es->i_type == 0 ) { - intf_ErrMsg( "input error: stream(%d,0x%x) not supported", - i, - p_info->audio_format.i_formattag ); + msg_Err( p_input, "stream(%d,0x%x) not supported", i, + p_info->audio_format.i_formattag ); p_es->i_cat = UNKNOWN_ES; } break; @@ -632,15 +625,13 @@ static int AVIInit( input_thread_t *p_input ) __AVI_VideoGetType( p_info->video_format.i_compression ); if( p_es->i_type == 0 ) { - intf_ErrMsg( "input error: stream(%d,%4.4s) not supported", - i, - (char*)&p_info->video_format.i_compression); + msg_Err( p_input, "stream(%d,%4.4s) not supported", i, + (char*)&p_info->video_format.i_compression); p_es->i_cat = UNKNOWN_ES; } break; default: - intf_ErrMsg( "input error: unknown stream(%d) type", - i ); + msg_Err( p_input, "unknown stream(%d) type", i ); p_es->i_cat = UNKNOWN_ES; break; } @@ -661,14 +652,14 @@ static int AVIInit( input_thread_t *p_input ) if( RIFF_AscendChunk(p_input, p_hdrl) != 0) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot go out (\"hdrl\") (avi_file)" ); + msg_Err( p_input, "cannot go out (\"hdrl\")" ); return( -1 ); } /* go to movi chunk to get it*/ if( RIFF_FindListChunk(p_input ,&p_movi,p_riff, FOURCC_movi) != 0 ) { - intf_ErrMsg( "input error: cannot find \"LIST-movi\" (avi_file)" ); + msg_Err( p_input, "cannot find \"LIST-movi\"" ); __AVIFreeDemuxData( p_input ); return( -1 ); } @@ -684,7 +675,7 @@ static int AVIInit( input_thread_t *p_input ) } else { - intf_WarnMsg( 1, "input init: no index !" ); + msg_Warn( p_input, "no index!" ); } @@ -703,7 +694,7 @@ static int AVIInit( input_thread_t *p_input ) { case( AUDIO_ES ): if( RIFF_FindChunk( p_input, - MAKEFOURCC('0'+i/10, '0'+i%10,'w','b' ), + VLC_FOURCC('0'+i/10, '0'+i%10,'w','b' ), p_movi ) == 0) { p_chunk = RIFF_ReadChunk( p_input ); @@ -712,7 +703,7 @@ static int AVIInit( input_thread_t *p_input ) case( VIDEO_ES ): if( (RIFF_FindChunk( p_input, - MAKEFOURCC('0'+i/10, '0'+i%10,'d','c' ), + VLC_FOURCC('0'+i/10, '0'+i%10,'d','c' ), p_movi ) == 0) ) { p_chunk = RIFF_ReadChunk( p_input ); @@ -722,7 +713,7 @@ static int AVIInit( input_thread_t *p_input ) RIFF_GoToChunk( p_input, p_avi_demux->p_movi ); if( RIFF_DescendChunk(p_input) != 0 ) { continue; } if( (RIFF_FindChunk( p_input, - MAKEFOURCC('0'+i/10, '0'+i%10,'d','b' ), + VLC_FOURCC('0'+i/10, '0'+i%10,'d','b' ), p_movi ) == 0) ) { p_chunk = RIFF_ReadChunk( p_input ); @@ -737,9 +728,8 @@ static int AVIInit( input_thread_t *p_input ) index.i_pos = p_chunk->i_pos; index.i_length = p_chunk->i_size; __AVI_AddEntryIndex( p_info, &index ); - intf_WarnMsg( 3, "input init: add index entry (%4.4s) (%d)", - (char*)&p_chunk->i_id, - i); + msg_Dbg( p_input, "add index entry (%4.4s) (%d)", + (char*)&p_chunk->i_id, i ); } } @@ -751,19 +741,19 @@ static int AVIInit( input_thread_t *p_input ) if( RIFF_DescendChunk( p_input ) != 0 ) { __AVIFreeDemuxData( p_input ); - intf_ErrMsg( "input error: cannot go in (\"movi\") (avi_file)" ); + msg_Err( p_input, "cannot go in (\"movi\")" ); return( -1 ); } /* print informations on streams */ - intf_Msg( "input init: AVIH: %d stream, flags %s%s%s%s%s%s ", - p_avi_demux->i_streams, - p_avi_demux->avih.i_flags&AVIF_HASINDEX?" HAS_INDEX":"", - p_avi_demux->avih.i_flags&AVIF_MUSTUSEINDEX?" MUST_USE_INDEX":"", - p_avi_demux->avih.i_flags&AVIF_ISINTERLEAVED?" IS_INTERLEAVED":"", - p_avi_demux->avih.i_flags&AVIF_TRUSTCKTYPE?" TRUST_CKTYPE":"", - p_avi_demux->avih.i_flags&AVIF_WASCAPTUREFILE?" CAPTUREFILE":"", - p_avi_demux->avih.i_flags&AVIF_COPYRIGHTED?" COPYRIGHTED":"" ); + msg_Dbg( p_input, "AVIH: %d stream, flags %s%s%s%s%s%s ", + p_avi_demux->i_streams, + p_avi_demux->avih.i_flags&AVIF_HASINDEX?" HAS_INDEX":"", + p_avi_demux->avih.i_flags&AVIF_MUSTUSEINDEX?" MUST_USE_INDEX":"", + p_avi_demux->avih.i_flags&AVIF_ISINTERLEAVED?" IS_INTERLEAVED":"", + p_avi_demux->avih.i_flags&AVIF_TRUSTCKTYPE?" TRUST_CKTYPE":"", + p_avi_demux->avih.i_flags&AVIF_WASCAPTUREFILE?" CAPTUREFILE":"", + p_avi_demux->avih.i_flags&AVIF_COPYRIGHTED?" COPYRIGHTED":"" ); for( i = 0; i < p_avi_demux->i_streams; i++ ) { @@ -771,36 +761,36 @@ static int AVIInit( input_thread_t *p_input ) switch( p_info->p_es->i_cat ) { case( VIDEO_ES ): - intf_Msg("input init: video(%4.4s) %dx%d %dbpp %ffps (size %d)", - (char*)&p_info->video_format.i_compression, - p_info->video_format.i_width, - p_info->video_format.i_height, - p_info->video_format.i_bitcount, - (float)p_info->header.i_rate / - (float)p_info->header.i_scale, - p_info->header.i_samplesize ); + msg_Dbg( p_input, "video(%4.4s) %dx%d %dbpp %ffps (size %d)", + (char*)&p_info->video_format.i_compression, + p_info->video_format.i_width, + p_info->video_format.i_height, + p_info->video_format.i_bitcount, + (float)p_info->header.i_rate / + (float)p_info->header.i_scale, + p_info->header.i_samplesize ); if( (p_avi_demux->p_info_video == NULL) ) { p_avi_demux->p_info_video = p_info; - } + } break; case( AUDIO_ES ): - intf_Msg( "input init: audio(0x%x) %d channels %dHz %dbits %ffps (size %d)", - p_info->audio_format.i_formattag, - p_info->audio_format.i_channels, - p_info->audio_format.i_samplespersec, - p_info->audio_format.i_bitspersample, - (float)p_info->header.i_rate / - (float)p_info->header.i_scale, - p_info->header.i_samplesize ); + msg_Dbg( p_input, "audio(0x%x) %d channels %dHz %dbits %ffps (size %d)", + p_info->audio_format.i_formattag, + p_info->audio_format.i_channels, + p_info->audio_format.i_samplespersec, + p_info->audio_format.i_bitspersample, + (float)p_info->header.i_rate / + (float)p_info->header.i_scale, + p_info->header.i_samplesize ); if( (p_avi_demux->p_info_audio == NULL) ) { p_avi_demux->p_info_audio = p_info; } break; case( UNKNOWN_ES ): - intf_Msg( "input init: unhanled stream %d", i ); + msg_Warn( p_input, "unhandled stream %d", i ); } #undef p_info } @@ -815,15 +805,16 @@ static int AVIInit( input_thread_t *p_input ) } else { - intf_Msg( "input error: no video stream found !" ); + msg_Err( p_input, "no video stream found" ); } + if( p_avi_demux->p_info_audio != NULL ) { input_SelectES( p_input, p_avi_demux->p_info_audio->p_es ); } else { - intf_Msg( "input init: no audio stream found !" ); + msg_Warn( p_input, "no audio stream found!" ); } p_input->stream.p_selected_program->b_is_ok = 1; vlc_mutex_unlock( &p_input->stream.stream_lock ); @@ -984,7 +975,7 @@ static int __AVI_GoToStreamChunk( input_thread_t *p_input, if( !p_input->stream.b_seekable ) { - intf_ErrMsg( "input error: need the ability to seek in stream" ); + msg_Err( p_input, "need the ability to seek in stream" ); return( -1 ); } @@ -1033,7 +1024,7 @@ static int __AVI_GoToStreamBytes( input_thread_t *p_input, if( !p_input->stream.b_seekable ) { - intf_ErrMsg( "input error: need the ability to seek in stream" ); + msg_Err( p_input, "need the ability to seek in stream" ); return( -1 ); } @@ -1506,7 +1497,7 @@ static int AVIDemux( input_thread_t *p_input ) if( !p_info_master ) { - intf_ErrMsg( "input error: no stream selected" ); + msg_Err( p_input, "no stream selected" ); return( -1 ); } diff --git a/plugins/avi/libioRIFF.c b/plugins/avi/libioRIFF.c index 7fe20b90b2..86c4cdcb11 100644 --- a/plugins/avi/libioRIFF.c +++ b/plugins/avi/libioRIFF.c @@ -2,7 +2,7 @@ * libioRIFF.c : AVI file Stream input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: libioRIFF.c,v 1.6 2002/05/25 16:23:07 fenrir Exp $ + * $Id: libioRIFF.c,v 1.7 2002/06/01 12:31:58 sam Exp $ * Authors: Laurent Aimar * * This program is free software; you can redistribute it and/or modify @@ -81,7 +81,7 @@ static int __RIFF_SkipBytes(input_thread_t * p_input,int nb) } else { - intf_WarnMsg( 1, "input demux: cannot seek, it will take times" ); + msg_Warn( p_input, "cannot seek, it will take times" ); if( nb < 0 ) { return( -1 ); } i_rest = nb; while (i_rest != 0 ) @@ -128,6 +128,7 @@ static riffchunk_t * RIFF_ReadChunk(input_thread_t * p_input) if((p_riff = malloc( sizeof(riffchunk_t))) == NULL) { + msg_Err( p_input, "out of memory" ); return NULL; } @@ -138,6 +139,7 @@ static riffchunk_t * RIFF_ReadChunk(input_thread_t * p_input) count=input_Peek( p_input, &p_peek, 12 ); if( count < 8 ) { + msg_Err( p_input, "cannot peek()" ); free(p_riff); return NULL; } @@ -169,6 +171,7 @@ static int RIFF_NextChunk( input_thread_t * p_input,riffchunk_t *p_rifffather) if( ( p_riff = RIFF_ReadChunk( p_input ) ) == NULL ) { + msg_Err( p_input, "cannot read chunk" ); return( -1 ); } i_len = p_riff->i_size; @@ -180,6 +183,7 @@ static int RIFF_NextChunk( input_thread_t * p_input,riffchunk_t *p_rifffather) if ( i_lenfather%2 !=0 ) {i_lenfather++;} if ( p_rifffather->i_pos + i_lenfather <= p_riff->i_pos + i_len + 8 ) { + msg_Err( p_input, "next chunk out of bounds" ); free( p_riff ); return( 1 ); /* pas dans nos frontiere */ } @@ -187,6 +191,7 @@ static int RIFF_NextChunk( input_thread_t * p_input,riffchunk_t *p_rifffather) if ( __RIFF_SkipBytes( p_input,i_len + 8 ) != 0 ) { free( p_riff ); + msg_Err( p_input, "cannot go to the next chunk" ); return( -1 ); } free( p_riff ); @@ -200,6 +205,7 @@ static int RIFF_DescendChunk(input_thread_t * p_input) { if ( __RIFF_SkipBytes(p_input,12) != 0) { + msg_Err( p_input, "cannot go into chunk" ); return ( -1 ); } return( 0 ); @@ -223,6 +229,7 @@ static int RIFF_AscendChunk(input_thread_t * p_input ,riffchunk_t *p_rifffather) if (( __RIFF_SkipBytes(p_input,i_skip)) != 0) { + msg_Err( p_input, "cannot exit from subchunk" ); return( -1 ); } return( 0 ); @@ -273,6 +280,7 @@ static int RIFF_LoadChunkData(input_thread_t * p_input,riffchunk_t *p_riff ) RIFF_GoToChunkData(p_input); if ( input_SplitBuffer( p_input, &p_riff->p_data, p_riff->i_size ) != p_riff->i_size ) { + msg_Err( p_input, "cannot read enough data " ); return ( -1 ); } if ( p_riff->i_size%2 != 0) @@ -392,6 +400,7 @@ static int RIFF_TestFileHeader( input_thread_t * p_input, riffchunk_t ** pp_ri if( *pp_riff == NULL ) { + msg_Err( p_input, "cannot retrieve header" ); return( -1 ); } if( (*pp_riff)->i_id != FOURCC_RIFF ) diff --git a/plugins/beos/InterfaceWindow.cpp b/plugins/beos/InterfaceWindow.cpp index 572bd59da7..d7faeff492 100644 --- a/plugins/beos/InterfaceWindow.cpp +++ b/plugins/beos/InterfaceWindow.cpp @@ -2,7 +2,7 @@ * InterfaceWindow.cpp: beos interface ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: InterfaceWindow.cpp,v 1.17 2002/06/01 09:21:59 tcastley Exp $ + * $Id: InterfaceWindow.cpp,v 1.18 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -37,18 +37,9 @@ /* VLC headers */ -extern "C" -{ -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - -#include "audio_output.h" -} +#include +#include +#include /* BeOS interface headers */ #include "MsgVals.h" @@ -71,7 +62,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name, playlist_window = NULL; p_intf = p_interface; BRect controlRect(0,0,0,0); - b_empty_playlist = (p_main->p_playlist->i_size < 0); + b_empty_playlist = (p_intf->p_vlc->p_playlist->i_size < 0); /* set the title bar */ SetName( "interface" ); @@ -163,6 +154,8 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) int playback_status; // remember playback state int i_index; BAlert *alert; + aout_bank_t *p_aout_bank = p_intf->p_vlc->p_aout_bank; + input_bank_t *p_input_bank = p_intf->p_vlc->p_input_bank; Activate(); if (p_input_bank->pp_input[0]) @@ -224,13 +217,13 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) snprintf( psz_source, B_FILE_NAME_LENGTH + 4, "dvd:%s", psz_device ); psz_source[ strlen(psz_source) ] = '\0'; - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (char*)psz_source ); + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, PLAYLIST_END, (char*)psz_source ); if( p_input_bank->pp_input[0] != NULL ) { p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_size - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, + p_intf->p_vlc->p_playlist->i_size - 1 ); b_empty_playlist = false; p_mediaControl->SetEnabled( !b_empty_playlist ); } @@ -254,10 +247,10 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) p_input_bank->pp_input[0]->b_eof = 1; /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->i_index--; + p_intf->p_vlc->p_playlist->b_stopped = 1; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } p_mediaControl->SetStatus(NOT_STARTED_S,DEFAULT_RATE); break; @@ -285,9 +278,9 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) /* pause the movie */ input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } else { @@ -305,25 +298,25 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) /* Start playing */ input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); - p_main->p_playlist->b_stopped = 0; + p_intf->p_vlc->p_playlist->b_stopped = 0; } } else { /* Play a new file */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - if( p_main->p_playlist->b_stopped ) + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + if( p_intf->p_vlc->p_playlist->b_stopped ) { - if( p_main->p_playlist->i_size ) + if( p_intf->p_vlc->p_playlist->i_size ) { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_index ); - p_main->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, + p_intf->p_vlc->p_playlist->i_index ); + p_intf->p_vlc->p_playlist->b_stopped = 0; } else { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } } @@ -346,9 +339,9 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) /* change the fast play mode */ input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } break; @@ -369,9 +362,9 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) /* change the slower play */ input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } break; @@ -512,14 +505,14 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) if( p_message->FindRef( "refs", &ref ) == B_OK ) { BPath path( &ref ); - intf_PlaylistAdd( p_main->p_playlist, + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, PLAYLIST_END, (char*)path.Path() ); if( p_input_bank->pp_input[0] != NULL ) { p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_size - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, + p_intf->p_vlc->p_playlist->i_size - 1 ); } } @@ -537,13 +530,15 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) *****************************************************************************/ void InterfaceWindow::updateInterface() { + input_bank_t *p_input_bank = p_intf->p_vlc->p_input_bank; + if ( p_input_bank->pp_input[0] ) { if ( acquire_sem(p_mediaControl->fScrubSem) == B_OK ) { uint64 seekTo = (p_mediaControl->GetSeekTo() * p_input_bank->pp_input[0]->stream.p_selected_area->i_size) / 100; - input_Seek( p_input_bank->pp_input[0], seekTo); + input_Seek( p_input_bank->pp_input[0]->p_this, seekTo, INPUT_SEEK_SET ); } else if( Lock() ) { @@ -554,7 +549,7 @@ void InterfaceWindow::updateInterface() Unlock(); } } - if ( b_empty_playlist != (p_main->p_playlist->i_size < 1) ) + if ( b_empty_playlist != (p_intf->p_vlc->p_playlist->i_size < 1) ) { if (Lock()) { @@ -570,7 +565,7 @@ void InterfaceWindow::updateInterface() *****************************************************************************/ bool InterfaceWindow::QuitRequested() { - p_intf->b_die = 1; + p_intf->p_vlc->b_die = 1; return( true ); } @@ -697,6 +692,7 @@ int LanguageMenu::GetChannels() BMessage *msg; int i; es_descriptor_t *p_es = NULL; + input_bank_t *p_input_bank = p_intf->p_vlc->p_input_bank; /* Insert the null */ if( kind == AUDIO_ES ) //audio diff --git a/plugins/beos/MediaControlView.cpp b/plugins/beos/MediaControlView.cpp index 9ef461f193..ea9b1f8afc 100644 --- a/plugins/beos/MediaControlView.cpp +++ b/plugins/beos/MediaControlView.cpp @@ -2,7 +2,7 @@ * MediaControlView.cpp: beos interface ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: MediaControlView.cpp,v 1.7 2001/12/30 07:09:54 sam Exp $ + * $Id: MediaControlView.cpp,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Tony Castley * @@ -27,16 +27,8 @@ #include /* VLC headers */ -extern "C" -{ -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" -} +#include +#include /* BeOS interface headers */ #include "MsgVals.h" diff --git a/plugins/beos/PlayListWindow.cpp b/plugins/beos/PlayListWindow.cpp index a3082b41c3..44d7085e45 100644 --- a/plugins/beos/PlayListWindow.cpp +++ b/plugins/beos/PlayListWindow.cpp @@ -2,7 +2,7 @@ * PlayListWindow.cpp: beos interface ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: PlayListWindow.cpp,v 1.6 2002/06/01 08:54:08 tcastley Exp $ + * $Id: PlayListWindow.cpp,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -30,16 +30,8 @@ #include /* VLC headers */ -extern "C" -{ -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" -} +#include +#include /* BeOS interface headers */ #include "InterfaceWindow.h" diff --git a/plugins/beos/VideoWindow.h b/plugins/beos/VideoWindow.h index 7e3511fccf..59dda60ddc 100644 --- a/plugins/beos/VideoWindow.h +++ b/plugins/beos/VideoWindow.h @@ -2,7 +2,7 @@ * VideoWindow.h: BeOS video window class prototype ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: VideoWindow.h,v 1.20 2002/06/01 08:54:08 tcastley Exp $ + * $Id: VideoWindow.h,v 1.21 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Tony Castley @@ -91,7 +91,7 @@ public: int colspace_index; private: - struct vout_thread_s *p_vout; + vout_thread_t *p_vout; }; diff --git a/plugins/beos/aout_beos.cpp b/plugins/beos/aout_beos.cpp index 29d7156595..ffe5dc657b 100644 --- a/plugins/beos/aout_beos.cpp +++ b/plugins/beos/aout_beos.cpp @@ -2,7 +2,7 @@ * aout_beos.cpp: BeOS audio output ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: aout_beos.cpp,v 1.23 2002/02/24 22:06:50 sam Exp $ + * $Id: aout_beos.cpp,v 1.24 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -39,9 +39,8 @@ extern "C" { -#include - -#include "audio_output.h" +#include +#include } /***************************************************************************** @@ -50,15 +49,14 @@ extern "C" * This structure is part of the audio output thread descriptor. * It describes some BeOS specific variables. *****************************************************************************/ -typedef struct aout_sys_s +struct aout_sys_s { BPushGameSound * p_sound; gs_audio_format * p_format; void * p_buffer; int i_buffer_size; int i_buffer_pos; - -} aout_sys_t; +}; extern "C" { @@ -95,7 +93,7 @@ static int aout_Open( aout_thread_t *p_aout ) p_aout->p_sys = (aout_sys_t*) malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -104,7 +102,7 @@ static int aout_Open( aout_thread_t *p_aout ) if( p_aout->p_sys->p_format == NULL ) { free( p_aout->p_sys ); - intf_ErrMsg("error: cannot allocate memory for gs_audio_format" ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -124,7 +122,7 @@ static int aout_Open( aout_thread_t *p_aout ) { free( p_aout->p_sys->p_format ); free( p_aout->p_sys ); - intf_ErrMsg("error: cannot allocate memory for BPushGameSound" ); + msg_Err( p_aout, "cannot allocate BPushGameSound" ); return( 1 ); } @@ -132,7 +130,7 @@ static int aout_Open( aout_thread_t *p_aout ) { free( p_aout->p_sys->p_format ); free( p_aout->p_sys ); - intf_ErrMsg("error: cannot allocate memory for BPushGameSound" ); + msg_Err( p_aout, "cannot initialize BPushGameSound" ); return( 1 ); } diff --git a/plugins/beos/beos.cpp b/plugins/beos/beos.cpp index 5d3b439c12..f983b30ae5 100644 --- a/plugins/beos/beos.cpp +++ b/plugins/beos/beos.cpp @@ -2,7 +2,7 @@ * beos.cpp : BeOS plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: beos.cpp,v 1.18 2002/04/19 13:56:10 sam Exp $ + * $Id: beos.cpp,v 1.19 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -28,10 +28,10 @@ #include /* malloc(), free() */ #include +#include + extern "C" { -#include - /***************************************************************************** * Capabilities defined in the other files. *****************************************************************************/ @@ -50,7 +50,6 @@ MODULE_INIT_START ADD_CAPABILITY( INTF, 100 ) ADD_CAPABILITY( VOUT, 100 ) ADD_CAPABILITY( AOUT, 100 ) - ADD_SHORTCUT( "beos" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/beos/intf_beos.cpp b/plugins/beos/intf_beos.cpp index b1d0ca78a3..2e4e3185e8 100644 --- a/plugins/beos/intf_beos.cpp +++ b/plugins/beos/intf_beos.cpp @@ -2,7 +2,7 @@ * intf_beos.cpp: beos interface ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: intf_beos.cpp,v 1.38 2002/02/15 13:32:52 sam Exp $ + * $Id: intf_beos.cpp,v 1.39 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -32,26 +32,19 @@ #include #include -extern "C" -{ -#include - -#include "stream_control.h" - -#include "interface.h" -#include "input_ext-intf.h" -} +#include +#include #include "InterfaceWindow.h" /***************************************************************************** * intf_sys_t: description and status of FB interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { InterfaceWindow * p_window; char i_key; -} intf_sys_t; +}; extern "C" @@ -93,7 +86,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM)); + msg_Err( p_intf, "out of memory" ); return( 1 ); } p_intf->p_sys->i_key = -1; @@ -105,7 +98,7 @@ static int intf_Open( intf_thread_t *p_intf ) if( p_intf->p_sys->p_window == 0 ) { free( p_intf->p_sys ); - intf_ErrMsg( "error: cannot allocate memory for InterfaceWindow" ); + msg_Err( p_intf, "cannot allocate InterfaceWindow" ); return( 1 ); } @@ -132,13 +125,13 @@ static void intf_Close( intf_thread_t *p_intf ) static void intf_Run( intf_thread_t *p_intf ) { - while( !p_intf->b_die ) + while( !p_intf->p_vlc->b_die ) { /* Manage core vlc functions through the callback */ p_intf->pf_manage( p_intf ); /* Manage the slider */ - if( p_input_bank->pp_input[0] != NULL + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL && p_intf->p_sys->p_window != NULL) { p_intf->p_sys->p_window->updateInterface(); diff --git a/plugins/beos/vout_beos.cpp b/plugins/beos/vout_beos.cpp index c1c3c87509..f78544d291 100644 --- a/plugins/beos/vout_beos.cpp +++ b/plugins/beos/vout_beos.cpp @@ -2,7 +2,7 @@ * vout_beos.cpp: beos video output display method ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: vout_beos.cpp,v 1.59 2002/06/01 09:21:59 tcastley Exp $ + * $Id: vout_beos.cpp,v 1.60 2002/06/01 12:31:58 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -36,16 +36,9 @@ #include #include -extern "C" -{ -#include - -#include "video.h" -#include "video_output.h" - -#include "interface.h" - -} +#include +#include +#include #include "VideoWindow.h" #include "DrawingTidbits.h" @@ -56,7 +49,7 @@ extern "C" * This structure is part of the video output thread descriptor. * It describes the BeOS specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { VideoWindow * p_window; @@ -65,8 +58,7 @@ typedef struct vout_sys_s u8 *pp_buffer[3]; int i_index; - -} vout_sys_t; +}; /***************************************************************************** * beos_GetAppWindow : retrieve a BWindow pointer from the window name @@ -94,6 +86,44 @@ BWindow *beos_GetAppWindow(char *name) return window; } +/**************************************************************************** + * DrawingThread : thread that really does the drawing + ****************************************************************************/ +int32 Draw(void *data) +{ + VideoWindow* p_win; + p_win = (VideoWindow *) data; + + if ( p_win->LockWithTimeout(50000) == B_OK ) + { + if (p_win->vsync) + { + BScreen *screen; + screen = new BScreen(p_win); + screen-> WaitForRetrace(22000); + delete screen; + } + if (p_win-> mode == OVERLAY) + { + rgb_color key; + p_win-> view->SetViewOverlay(p_win-> bitmap[p_win-> i_buffer], + p_win-> bitmap[p_win-> i_buffer]->Bounds() , + p_win-> view->Bounds(), + &key, B_FOLLOW_ALL, + B_OVERLAY_FILTER_HORIZONTAL|B_OVERLAY_FILTER_VERTICAL| + B_OVERLAY_TRANSFER_CHANNEL); + p_win-> view->SetViewColor(key); + } + else + { + p_win-> view-> DrawBitmap( p_win-> bitmap[p_win-> i_buffer], + p_win-> view->Bounds() ); + } + p_win-> Unlock(); + } + return B_OK; +} + /***************************************************************************** * VideoWindow constructor and destructor *****************************************************************************/ @@ -284,7 +314,7 @@ int VideoWindow::SelectDrawingMode(int width, int height) { int drawingMode = BITMAP; - int noOverlay = !config_GetIntVariable( "overlay" ); + int noOverlay = !config_GetInt( p_vout, "overlay" ); for (int i = 0; i < COLOR_COUNT; i++) { if (noOverlay) break; @@ -418,7 +448,7 @@ int vout_Create( vout_thread_t *p_vout ) p_vout->p_sys = (vout_sys_t*) malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) { - intf_ErrMsg( "error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } p_vout->p_sys->i_width = p_vout->render.i_width; @@ -440,7 +470,7 @@ int vout_Init( vout_thread_t *p_vout ) /* Open and initialize device */ if( BeosOpenDisplay( p_vout ) ) { - intf_ErrMsg("vout error: can't open display"); + msg_Err( p_vout, "cannot open display" ); return 0; } /* Set the buffers */ @@ -583,7 +613,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) if( p_vout->p_sys->p_window == NULL ) { - intf_ErrMsg( "error: cannot allocate memory for VideoWindow" ); + msg_Err( p_vout, "cannot allocate VideoWindow" ); return( 1 ); } diff --git a/plugins/chroma/i420_rgb.c b/plugins/chroma/i420_rgb.c index a00bd837bc..e79a989bb6 100644 --- a/plugins/chroma/i420_rgb.c +++ b/plugins/chroma/i420_rgb.c @@ -2,7 +2,7 @@ * i420_rgb.c : YUV to bitmap RGB conversion module for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: i420_rgb.c,v 1.8 2002/04/19 13:56:10 sam Exp $ + * $Id: i420_rgb.c,v 1.9 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -29,10 +29,8 @@ #include /* strerror() */ #include /* malloc(), free() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "i420_rgb.h" #if defined (MODULE_NAME_IS_chroma_i420_rgb) @@ -355,7 +353,7 @@ static void Set8bppPalette( vout_thread_t *p_vout, u8 *p_rgb8 ) * fscked up my code */ if( j == 256 ) { - intf_ErrMsg( "vout error: no colors left in palette" ); + msg_Err( p_vout, "no colors left in palette" ); break; } diff --git a/plugins/chroma/i420_rgb.h b/plugins/chroma/i420_rgb.h index 89a07a62d3..83955fee74 100644 --- a/plugins/chroma/i420_rgb.h +++ b/plugins/chroma/i420_rgb.h @@ -2,7 +2,7 @@ * i420_rgb.h : YUV to bitmap RGB conversion module for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: i420_rgb.h,v 1.5 2002/03/17 17:00:38 sam Exp $ + * $Id: i420_rgb.h,v 1.6 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ * This structure is part of the chroma transformation descriptor, it * describes the yuv2rgb specific properties. *****************************************************************************/ -typedef struct chroma_sys_s +struct chroma_sys_s { u8 *p_buffer; int *p_offset; @@ -39,8 +39,7 @@ typedef struct chroma_sys_s u16 *p_rgb16; /* RGB 16 bits table */ u32 *p_rgb32; /* RGB 32 bits table */ #endif - -} chroma_sys_t; +}; /***************************************************************************** * Prototypes @@ -250,7 +249,8 @@ void _M( I420_RGB32 )( vout_thread_t *, picture_t *, picture_t * ); while( (i_scale_count -= p_vout->render.i_height) > 0 ) \ { \ /* Height increment: copy previous picture line */ \ - FAST_MEMCPY( p_pic, p_pic_start, p_vout->output.i_width * BPP ); \ + p_vout->p_vlc->pf_memcpy( p_pic, p_pic_start, \ + p_vout->output.i_width * BPP ); \ (u8*)p_pic += p_dest->p->i_pitch; \ } \ i_scale_count += p_vout->output.i_height; \ diff --git a/plugins/chroma/i420_rgb16.c b/plugins/chroma/i420_rgb16.c index 1a7f37b7b2..038117ea27 100644 --- a/plugins/chroma/i420_rgb16.c +++ b/plugins/chroma/i420_rgb16.c @@ -2,7 +2,7 @@ * i420_rgb16.c : YUV to bitmap RGB conversion module for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: i420_rgb16.c,v 1.7 2002/06/01 10:47:07 sam Exp $ + * $Id: i420_rgb16.c,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* strerror() */ #include /* malloc(), free() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "i420_rgb.h" #if defined (MODULE_NAME_IS_chroma_i420_rgb) @@ -40,7 +38,7 @@ # include "i420_rgb_mmx.h" #endif -static void SetOffset( int, int, int, int, boolean_t *, int *, int * ); +static void SetOffset( int, int, int, int, vlc_bool_t *, int *, int * ); /***************************************************************************** * I420_RGB15: color YUV 4:2:0 to RGB 15 bpp @@ -61,7 +59,7 @@ void _M( I420_RGB15 )( vout_thread_t *p_vout, picture_t *p_src, u8 *p_u = p_src->U_PIXELS; u8 *p_v = p_src->V_PIXELS; - boolean_t b_hscale; /* horizontal scaling type */ + vlc_bool_t b_hscale; /* horizontal scaling type */ int i_vscale; /* vertical scaling type */ int i_x, i_y; /* horizontal and vertical indexes */ int i_right_margin; @@ -196,7 +194,7 @@ void _M( I420_RGB16 )( vout_thread_t *p_vout, picture_t *p_src, u8 *p_u = p_src->U_PIXELS; u8 *p_v = p_src->V_PIXELS; - boolean_t b_hscale; /* horizontal scaling type */ + vlc_bool_t b_hscale; /* horizontal scaling type */ int i_vscale; /* vertical scaling type */ int i_x, i_y; /* horizontal and vertical indexes */ int i_right_margin; @@ -331,7 +329,7 @@ void _M( I420_RGB32 )( vout_thread_t *p_vout, picture_t *p_src, u8 *p_u = p_src->U_PIXELS; u8 *p_v = p_src->V_PIXELS; - boolean_t b_hscale; /* horizontal scaling type */ + vlc_bool_t b_hscale; /* horizontal scaling type */ int i_vscale; /* vertical scaling type */ int i_x, i_y; /* horizontal and vertical indexes */ int i_right_margin; @@ -456,7 +454,7 @@ void _M( I420_RGB32 )( vout_thread_t *p_vout, picture_t *p_src, * It will also set horizontal and vertical scaling indicators. *****************************************************************************/ static void SetOffset( int i_width, int i_height, int i_pic_width, - int i_pic_height, boolean_t *pb_hscale, + int i_pic_height, vlc_bool_t *pb_hscale, int *pi_vscale, int *p_offset ) { int i_x; /* x position in destination */ diff --git a/plugins/chroma/i420_rgb8.c b/plugins/chroma/i420_rgb8.c index 4973ebce5c..edc9284184 100644 --- a/plugins/chroma/i420_rgb8.c +++ b/plugins/chroma/i420_rgb8.c @@ -2,7 +2,7 @@ * i420_rgb8.c : YUV to bitmap RGB conversion module for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: i420_rgb8.c,v 1.5 2002/04/02 10:17:08 sam Exp $ + * $Id: i420_rgb8.c,v 1.6 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,15 +28,13 @@ #include /* strerror() */ #include /* malloc(), free() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "i420_rgb.h" #include "i420_rgb_c.h" -static void SetOffset( int, int, int, int, boolean_t *, int *, int * ); +static void SetOffset( int, int, int, int, vlc_bool_t *, int *, int * ); /***************************************************************************** * I420_RGB8: color YUV 4:2:0 to RGB 8 bpp @@ -50,7 +48,7 @@ void _M( I420_RGB8 )( vout_thread_t *p_vout, picture_t *p_src, u8 *p_u = p_src->U_PIXELS; u8 *p_v = p_src->V_PIXELS; - boolean_t b_hscale; /* horizontal scaling type */ + vlc_bool_t b_hscale; /* horizontal scaling type */ int i_vscale; /* vertical scaling type */ int i_x, i_y; /* horizontal and vertical indexes */ int i_real_y; /* y % 4 */ @@ -112,7 +110,7 @@ void _M( I420_RGB8 )( vout_thread_t *p_vout, picture_t *p_src, * structure has interleaved Y and U/V offsets. *****************************************************************************/ static void SetOffset( int i_width, int i_height, int i_pic_width, - int i_pic_height, boolean_t *pb_hscale, + int i_pic_height, vlc_bool_t *pb_hscale, int *pi_vscale, int *p_offset ) { int i_x; /* x position in destination */ diff --git a/plugins/chroma/i420_rgb_mmx.h b/plugins/chroma/i420_rgb_mmx.h index 1cfe79d88d..aeccae322a 100644 --- a/plugins/chroma/i420_rgb_mmx.h +++ b/plugins/chroma/i420_rgb_mmx.h @@ -2,7 +2,7 @@ * transforms_yuvmmx.h: MMX YUV transformation assembly ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: i420_rgb_mmx.h,v 1.2 2002/01/28 16:51:22 sam Exp $ + * $Id: i420_rgb_mmx.h,v 1.3 2002/06/01 12:31:58 sam Exp $ * * Authors: Olie Lho * Gaël Hendryckx @@ -26,7 +26,7 @@ /* hope these constant values are cache line aligned */ #define UNUSED_LONGLONG(foo) \ - unsigned long long foo __asm__ (#foo) __attribute__((unused)) + static const unsigned long long foo __asm__ (#foo) __attribute__((unused)) UNUSED_LONGLONG(mmx_80w) = 0x0080008000800080; UNUSED_LONGLONG(mmx_10w) = 0x1010101010101010; UNUSED_LONGLONG(mmx_00ffw) = 0x00ff00ff00ff00ff; diff --git a/plugins/chroma/i420_ymga.c b/plugins/chroma/i420_ymga.c index 99d1a413f4..46e4e1ed7d 100644 --- a/plugins/chroma/i420_ymga.c +++ b/plugins/chroma/i420_ymga.c @@ -2,7 +2,7 @@ * i420_ymga.c : YUV to YUV conversion module for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: i420_ymga.c,v 1.5 2002/04/19 13:56:10 sam Exp $ + * $Id: i420_ymga.c,v 1.6 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* strerror() */ #include /* malloc(), free() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #define SRC_FOURCC "I420,IYUV,YV12" #define DEST_FOURCC "YMGA" @@ -140,7 +138,7 @@ static void I420_YMGA( vout_thread_t *p_vout, picture_t *p_source, int i_x; /* Copy the Y part */ - FAST_MEMCPY( p_dest->Y_PIXELS, p_source->Y_PIXELS, + p_vout->p_vlc->pf_memcpy( p_dest->Y_PIXELS, p_source->Y_PIXELS, p_dest->p[Y_PLANE].i_pitch * p_dest->p[Y_PLANE].i_lines ); /* Copy the U:V part */ diff --git a/plugins/chroma/i420_yuy2.c b/plugins/chroma/i420_yuy2.c index 2996814b40..ff28aa8e31 100644 --- a/plugins/chroma/i420_yuy2.c +++ b/plugins/chroma/i420_yuy2.c @@ -2,7 +2,7 @@ * i420_yuy2.c : YUV to YUV conversion module for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: i420_yuy2.c,v 1.7 2002/05/21 03:37:17 sam Exp $ + * $Id: i420_yuy2.c,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* strerror() */ #include /* malloc(), free() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "i420_yuy2.h" @@ -308,8 +306,7 @@ static void I420_IUYV( vout_thread_t *p_vout, picture_t *p_source, picture_t *p_dest ) { /* FIXME: TODO ! */ - intf_ErrMsg( "chroma error: I420_IUYV unimplemented, " - "please harass " ); + msg_Err( p_vout, "I420_IUYV unimplemented, please harass " ); } /***************************************************************************** diff --git a/plugins/chroma/i420_yuy2.h b/plugins/chroma/i420_yuy2.h index e78980e48e..7e18a0edfe 100644 --- a/plugins/chroma/i420_yuy2.h +++ b/plugins/chroma/i420_yuy2.h @@ -2,7 +2,7 @@ * i420_yuy2.h : YUV to YUV conversion module for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: i420_yuy2.h,v 1.7 2002/06/01 11:08:24 sam Exp $ + * $Id: i420_yuy2.h,v 1.8 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,7 +24,7 @@ #ifdef MODULE_NAME_IS_chroma_i420_yuy2_mmx #define UNUSED_LONGLONG(foo) \ - unsigned long long foo __asm__ (#foo) __attribute__((unused)) + static const unsigned long long foo __asm__ (#foo) __attribute__((unused)) UNUSED_LONGLONG(woo_00ffw) = 0x00ff00ff00ff00ff; UNUSED_LONGLONG(woo_80w) = 0x0000000080808080; diff --git a/plugins/chroma/i422_yuy2.c b/plugins/chroma/i422_yuy2.c index 2e26062293..58aa3438b5 100644 --- a/plugins/chroma/i422_yuy2.c +++ b/plugins/chroma/i422_yuy2.c @@ -2,7 +2,7 @@ * i422_yuy2.c : YUV to YUV conversion module for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: i422_yuy2.c,v 1.5 2002/04/19 13:56:10 sam Exp $ + * $Id: i422_yuy2.c,v 1.6 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* strerror() */ #include /* malloc(), free() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "i422_yuy2.h" @@ -281,8 +279,7 @@ static void I422_IUYV( vout_thread_t *p_vout, picture_t *p_source, picture_t *p_dest ) { /* FIXME: TODO ! */ - intf_ErrMsg( "chroma error: I422_IUYV unimplemented, " - "please harass " ); + msg_Err( p_vout, "I422_IUYV unimplemented, please harass " ); } /***************************************************************************** diff --git a/plugins/directx/aout_directx.c b/plugins/directx/aout_directx.c index 9554bfe1ca..95deadd411 100644 --- a/plugins/directx/aout_directx.c +++ b/plugins/directx/aout_directx.c @@ -2,7 +2,7 @@ * aout_directx.c: Windows DirectX audio output method ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: aout_directx.c,v 1.21 2002/05/21 07:48:50 gbazin Exp $ + * $Id: aout_directx.c,v 1.22 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -28,16 +28,14 @@ #include /* open(), O_WRONLY */ #include /* strerror() */ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ -#include +#include +#include #include #include -#include "audio_output.h" /* aout_thread_t */ - /***************************************************************************** * DirectSound GUIDs. * Defining them here allows us to get rid of the dxguid library during @@ -53,7 +51,7 @@ DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, * It describes the direct sound specific properties of an audio device. *****************************************************************************/ -typedef struct aout_sys_s +struct aout_sys_s { LPDIRECTSOUND p_dsobject; /* main Direct Sound object */ @@ -71,7 +69,7 @@ typedef struct aout_sys_s long l_buffer_size; /* secondary sound buffer size */ long l_write_position; /* next write position for the buffer */ - volatile boolean_t b_buffer_underflown; /* buffer underflow detection */ + volatile vlc_bool_t b_buffer_underflown; /* buffer underflow detection */ volatile long l_data_played_from_beginning; /* for underflow detection */ volatile long l_data_written_from_beginning; /* for underflow detection */ @@ -81,9 +79,8 @@ typedef struct aout_sys_s DSBPOSITIONNOTIFY notification_events[2]; /* play notification events */ - boolean_t b_notification_thread_die; /* flag to kill the thread */ - -} aout_sys_t; + vlc_bool_t b_notification_thread_die; /* flag to kill the thread */ +}; /***************************************************************************** * Local prototypes. @@ -124,14 +121,14 @@ static int aout_Open( aout_thread_t *p_aout ) HRESULT dsresult; DSBUFFERDESC dsbuffer_desc; - intf_WarnMsg( 3, "aout: DirectX aout_Open "); + msg_Dbg( p_aout, "aout_Open" ); /* Allocate structure */ p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg( "aout error: %s", strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -149,7 +146,7 @@ static int aout_Open( aout_thread_t *p_aout ) /* Initialise DirectSound */ if( DirectxInitDSound( p_aout ) ) { - intf_WarnMsg( 3, "aout: can't initialise DirectSound "); + msg_Warn( p_aout, "cannot initialize DirectSound" ); return( 1 ); } @@ -157,14 +154,14 @@ static int aout_Open( aout_thread_t *p_aout ) memset( &dsbuffer_desc, 0, sizeof(DSBUFFERDESC) ); dsbuffer_desc.dwSize = sizeof(DSBUFFERDESC); dsbuffer_desc.dwFlags = DSBCAPS_PRIMARYBUFFER; - intf_WarnMsg( 3, "aout: Create direct sound primary buffer "); + msg_Warn( p_aout, "create direct sound primary buffer" ); dsresult = IDirectSound_CreateSoundBuffer(p_aout->p_sys->p_dsobject, &dsbuffer_desc, &p_aout->p_sys->p_dsbuffer_primary, NULL); if( dsresult != DS_OK ) { - intf_WarnMsg( 3, "aout: can't create direct sound primary buffer "); + msg_Warn( p_aout, "cannot create direct sound primary buffer" ); IDirectSound_Release( p_aout->p_sys->p_dsobject ); p_aout->p_sys->p_dsobject = NULL; p_aout->p_sys->p_dsbuffer_primary = NULL; @@ -181,13 +178,12 @@ static int aout_Open( aout_thread_t *p_aout ) CreateEvent( NULL, FALSE, FALSE, NULL ); /* then launch the notification thread */ - intf_WarnMsg( 3, "aout: aout_Open creating DirectSoundThread" ); - if( vlc_thread_create( &p_aout->p_sys->notification_thread_id, + msg_Dbg( p_aout, "creating DirectSoundThread" ); + if( vlc_thread_create( p_aout, &p_aout->p_sys->notification_thread_id, "DirectSound Notification Thread", (void *) DirectSoundThread, (void *) p_aout) ) { - intf_ErrMsg( "aout error: can't create DirectSoundThread" ); - intf_ErrMsg("aout error: %s", strerror(ENOMEM)); + msg_Err( p_aout, "cannot create DirectSoundThread" ); /* Let's go on anyway */ } @@ -207,7 +203,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) WAVEFORMATEX *p_waveformat; unsigned long i_size_struct; - intf_WarnMsg( 3, "aout: DirectX aout_SetFormat "); + msg_Dbg( p_aout, "aout_SetFormat" ); /* Set the format of Direct Sound primary buffer */ @@ -239,10 +235,10 @@ static int aout_SetFormat( aout_thread_t *p_aout ) p_aout->p_sys->p_dsbuffer_primary, p_waveformat ); } - else intf_WarnMsg( 3, "aout: can't get primary buffer format" ); + else msg_Warn( p_aout, "cannot get primary buffer format" ); if( dsresult != DS_OK ) - intf_WarnMsg( 3, "aout: can't set primary buffer format" ); + msg_Warn( p_aout, "cannot set primary buffer format" ); /* Now we need to take care of Direct Sound secondary buffer */ @@ -255,7 +251,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) /* then create a new secondary buffer */ if( DirectxCreateSecondaryBuffer( p_aout ) ) { - intf_WarnMsg( 3, "aout: DirectX aout_SetFormat cannot create buffer"); + msg_Warn( p_aout, "cannot create buffer" ); vlc_mutex_unlock( &p_aout->p_sys->buffer_lock ); return( 1 ); } @@ -278,7 +274,7 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) if( p_aout->p_sys->b_buffer_underflown ) { - intf_WarnMsg( 3, "aout: DirectX aout_GetBufInfo underflow"); + msg_Warn( p_aout, "aout_GetBufInfo underflow" ); return( i_buffer_limit ); } @@ -286,7 +282,7 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) &l_play_position, &l_notused); if( dsresult != DS_OK ) { - intf_WarnMsg(3,"aout: DirectX aout_GetBufInfo cannot get current pos"); + msg_Warn( p_aout, "aout_GetBufInfo cannot get current pos" ); return( i_buffer_limit ); } @@ -296,7 +292,7 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) + p_aout->p_sys->l_write_position); #if 0 - intf_WarnMsg( 3, "aout: DirectX aout_GetBufInfo: %li", l_result); + msg_Dbg( p_aout, "aout_GetBufInfo: %i", i_result); #endif return l_result; } @@ -326,11 +322,11 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) &p_aout->p_sys->l_write_position ); if( dsresult != DS_OK ) { - intf_WarnMsg( 3, "aout: aout_Play can'get buffer position"); + msg_Warn( p_aout, "cannot get buffer position" ); p_aout->p_sys->l_write_position = 0; } - intf_WarnMsg( 3, "aout: aout_Play underflow"); + msg_Warn( p_aout, "aout_Play underflow" ); /* reinitialise the underflow detection counters */ p_aout->p_sys->b_buffer_underflown = 0; p_aout->p_sys->l_data_written_from_beginning = 0; @@ -376,7 +372,7 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) } if( dsresult != DS_OK ) { - intf_WarnMsg( 3, "aout: DirectX aout_Play can't lock buffer"); + msg_Warn( p_aout, "aout_Play cannot lock buffer" ); vlc_mutex_unlock( &p_aout->p_sys->buffer_lock ); return; } @@ -414,7 +410,7 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) } if( dsresult != DS_OK ) { - intf_WarnMsg( 3, "aout: DirectX aout_Play can't play buffer"); + msg_Warn( p_aout, "aout_Play cannot play buffer" ); return; } @@ -426,12 +422,12 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) static void aout_Close( aout_thread_t *p_aout ) { - intf_WarnMsg( 3, "aout: DirectX aout_Close "); + msg_Dbg( p_aout, "aout_Close" ); /* kill the position notification thread */ p_aout->p_sys->b_notification_thread_die = 1; SetEvent( p_aout->p_sys->notification_events[0].hEventNotify ); - vlc_thread_join( p_aout->p_sys->notification_thread_id ); + vlc_thread_join( p_aout, p_aout->p_sys->notification_thread_id ); vlc_mutex_destroy( &p_aout->p_sys->buffer_lock ); /* release the secondary buffer */ @@ -477,7 +473,7 @@ static int DirectxInitDSound( aout_thread_t *p_aout ) p_aout->p_sys->hdsound_dll = LoadLibrary("DSOUND.DLL"); if( p_aout->p_sys->hdsound_dll == NULL ) { - intf_WarnMsg( 3, "aout: can't open DSOUND.DLL "); + msg_Warn( p_aout, "cannot open DSOUND.DLL" ); return( 1 ); } @@ -486,7 +482,7 @@ static int DirectxInitDSound( aout_thread_t *p_aout ) if( OurDirectSoundCreate == NULL ) { - intf_WarnMsg( 3, "aout: GetProcAddress FAILED "); + msg_Warn( p_aout, "GetProcAddress FAILED" ); FreeLibrary( p_aout->p_sys->hdsound_dll ); p_aout->p_sys->hdsound_dll = NULL; return( 1 ); @@ -495,7 +491,7 @@ static int DirectxInitDSound( aout_thread_t *p_aout ) /* Create the direct sound object */ if( OurDirectSoundCreate(NULL, &p_aout->p_sys->p_dsobject, NULL) != DS_OK ) { - intf_WarnMsg( 3, "aout: can't create a direct sound device "); + msg_Warn( p_aout, "cannot create a direct sound device" ); p_aout->p_sys->p_dsobject = NULL; FreeLibrary( p_aout->p_sys->hdsound_dll ); p_aout->p_sys->hdsound_dll = NULL; @@ -516,7 +512,7 @@ static int DirectxInitDSound( aout_thread_t *p_aout ) GetDesktopWindow(), DSSCL_EXCLUSIVE) ) { - intf_WarnMsg( 3, "aout: can't set direct sound cooperative level "); + msg_Warn( p_aout, "cannot set direct sound cooperative level" ); } return( 0 ); @@ -565,7 +561,7 @@ static int DirectxCreateSecondaryBuffer( aout_thread_t *p_aout ) &p_aout->p_sys->p_dsbuffer, NULL) != DS_OK ) { - intf_WarnMsg( 3, "aout: can't create direct sound secondary buffer "); + msg_Warn( p_aout, "cannot create direct sound secondary buffer" ); p_aout->p_sys->p_dsbuffer = NULL; return( 1 ); } @@ -577,8 +573,8 @@ static int DirectxCreateSecondaryBuffer( aout_thread_t *p_aout ) p_aout->p_sys->l_buffer_size = dsbcaps.dwBufferBytes; p_aout->p_sys->l_write_position = 0; - intf_WarnMsg( 3, "aout: DirectX DirectxCreateSecondaryBuffer: %li", - p_aout->p_sys->l_buffer_size); + msg_Dbg( p_aout, "DirectxCreateSecondaryBuffer: %li", + p_aout->p_sys->l_buffer_size ); /* Now the secondary buffer is created, we need to setup its position * notification */ @@ -590,7 +586,7 @@ static int DirectxCreateSecondaryBuffer( aout_thread_t *p_aout ) &IID_IDirectSoundNotify, (LPVOID *)&p_aout->p_sys->p_dsnotify ) ) { - intf_WarnMsg( 3, "aout: DirectX can't get Notify interface" ); + msg_Warn( p_aout, "cannot get Notify interface" ); /* Go on anyway */ p_aout->p_sys->p_dsnotify = NULL; return( 0 ); @@ -601,7 +597,7 @@ static int DirectxCreateSecondaryBuffer( aout_thread_t *p_aout ) 2, p_aout->p_sys->notification_events ) ) { - intf_WarnMsg( 3, "aout: DirectX can't set position Notification" ); + msg_Warn( p_aout, "cannot set position Notification" ); /* Go on anyway */ } @@ -657,10 +653,10 @@ static void DirectSoundThread( aout_thread_t *p_aout ) if( !SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL ) ) { - intf_WarnMsg( 3, "aout: DirectSoundThread could not renice itself" ); + msg_Warn( p_aout, "DirectSoundThread could not renice itself" ); } - intf_WarnMsg( 3, "aout: DirectSoundThread ready" ); + msg_Dbg( p_aout, "DirectSoundThread ready" ); while( !p_aout->p_sys->b_notification_thread_die ) { @@ -684,14 +680,16 @@ static void DirectSoundThread( aout_thread_t *p_aout ) /* detect wrap-around */ if( l_data_in_buffer < (-l_buffer_size/2) ) { - intf_WarnMsg(3,"aout: DirectSoundThread wrap around: %li", l_data_in_buffer); + msg_Dbg( p_aout, "DirectSoundThread wrap around: %li", + l_data_in_buffer ); l_data_in_buffer += l_buffer_size; } /* detect underflow */ if( l_data_in_buffer <= 0 ) { - intf_WarnMsg(3,"aout: DirectSoundThread underflow: %li", l_data_in_buffer); + msg_Warn( p_aout, + "DirectSoundThread underflow: %li", l_data_in_buffer ); p_aout->p_sys->b_buffer_underflown = 1; p_aout->p_sys->l_write_position = (l_play_position + l_buffer_size/2) % l_buffer_size; @@ -725,7 +723,7 @@ static void DirectSoundThread( aout_thread_t *p_aout ) } if( dsresult != DS_OK ) { - intf_WarnMsg( 3, "aout: DirectX aout_Play can't lock buffer"); + msg_Warn( p_aout, "aout_Play cannot lock buffer" ); vlc_mutex_unlock( &p_aout->p_sys->buffer_lock ); return; } @@ -749,6 +747,6 @@ static void DirectSoundThread( aout_thread_t *p_aout ) CloseHandle( notification_events[0] ); CloseHandle( notification_events[1] ); - intf_WarnMsg( 3, "aout: DirectSoundThread exiting" ); + msg_Dbg( p_aout, "DirectSoundThread exiting" ); } diff --git a/plugins/directx/directx.c b/plugins/directx/directx.c index 5bdfc27ba5..76284e0d1a 100644 --- a/plugins/directx/directx.c +++ b/plugins/directx/directx.c @@ -2,7 +2,7 @@ * directx.c : Windows DirectX plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: directx.c,v 1.10 2002/05/30 08:17:04 gbazin Exp $ + * $Id: directx.c,v 1.11 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -27,12 +27,7 @@ #include /* malloc(), free() */ #include -#include - -#include "audio_output.h" - -#include "video.h" -#include "video_output.h" +#include /***************************************************************************** * Capabilities defined in the other files. @@ -64,7 +59,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("DirectX extension module") ) ADD_CAPABILITY( AOUT, 150 ) ADD_CAPABILITY( VOUT, 150 ) - ADD_SHORTCUT( "directx" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/directx/vout_directx.c b/plugins/directx/vout_directx.c index 2d92457d36..976c7a6d5e 100644 --- a/plugins/directx/vout_directx.c +++ b/plugins/directx/vout_directx.c @@ -2,7 +2,7 @@ * vout_directx.c: Windows DirectX video output display method ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: vout_directx.c,v 1.36 2002/05/30 08:17:04 gbazin Exp $ + * $Id: vout_directx.c,v 1.37 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -38,17 +38,14 @@ #include /* free() */ #include /* strerror() */ -#include +#include +#include +#include #include #include "netutils.h" -#include "video.h" -#include "video_output.h" - -#include "interface.h" - #include "vout_directx.h" /***************************************************************************** @@ -113,7 +110,7 @@ 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( "vout error: can't create p_sys (%s)", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -128,9 +125,9 @@ static int vout_Create( vout_thread_t *p_vout ) p_vout->p_sys->b_event_thread_die = 0; p_vout->p_sys->b_caps_overlay_clipping = 0; SetRectEmpty( &p_vout->p_sys->rect_display ); - p_vout->p_sys->b_using_overlay = config_GetIntVariable( "overlay" ); - p_vout->p_sys->b_use_sysmem = config_GetIntVariable( "directx-use-sysmem"); - p_vout->p_sys->b_hw_yuv = config_GetIntVariable( "directx-hw-yuv" ); + p_vout->p_sys->b_using_overlay = config_GetInt( p_vout, "overlay" ); + p_vout->p_sys->b_use_sysmem = config_GetInt( p_vout, "directx-use-sysmem"); + p_vout->p_sys->b_hw_yuv = config_GetInt( p_vout, "directx-hw-yuv" ); p_vout->p_sys->b_cursor_hidden = 0; p_vout->p_sys->i_lastmoved = mdate(); @@ -140,7 +137,7 @@ static int vout_Create( vout_thread_t *p_vout ) p_vout->p_sys->i_window_height = p_vout->i_window_height; /* Set locks and condition variables */ - vlc_mutex_init( &p_vout->p_sys->event_thread_lock ); + vlc_mutex_init( p_vout, &p_vout->p_sys->event_thread_lock ); vlc_cond_init( &p_vout->p_sys->event_thread_wait ); p_vout->p_sys->i_event_thread_status = THREAD_CREATE; @@ -151,13 +148,12 @@ static int vout_Create( vout_thread_t *p_vout ) * DirectXEventThread will take care of the creation of the video * window (because PeekMessage has to be called from the same thread which * created the window). */ - intf_WarnMsg( 3, "vout: vout_Create creating DirectXEventThread" ); - if( vlc_thread_create( &p_vout->p_sys->event_thread_id, + msg_Dbg( p_vout, "creating DirectXEventThread" ); + if( vlc_thread_create( p_vout, &p_vout->p_sys->event_thread_id, "DirectX Events Thread", (void *) DirectXEventThread, (void *) p_vout) ) { - intf_ErrMsg( "vout error: can't create DirectXEventThread" ); - intf_ErrMsg("vout error: %s", strerror(ENOMEM)); + msg_Err( p_vout, "cannot create DirectXEventThread" ); free( p_vout->p_sys ); return( 1 ); } @@ -172,17 +168,18 @@ static int vout_Create( vout_thread_t *p_vout ) vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock ); if( p_vout->p_sys->i_event_thread_status != THREAD_READY ) { - intf_ErrMsg( "vout error: DirectXEventThread failed" ); + msg_Err( p_vout, "DirectXEventThread failed" ); free( p_vout->p_sys ); return( 1 ); } - intf_WarnMsg( 3, "vout: vout_Create DirectXEventThread running" ); + msg_Dbg( p_vout, "DirectXEventThread running" ); + /* Initialise DirectDraw */ if( DirectXInitDDraw( p_vout ) ) { - intf_ErrMsg( "vout error: can't initialise DirectDraw" ); + msg_Err( p_vout, "cannot initialize DirectDraw" ); vout_Destroy( p_vout ); return ( 1 ); } @@ -190,7 +187,7 @@ static int vout_Create( vout_thread_t *p_vout ) /* Create the directx display */ if( DirectXCreateDisplay( p_vout ) ) { - intf_ErrMsg( "vout error: can't initialise DirectDraw" ); + msg_Err( p_vout, "cannot initialize DirectDraw" ); DirectXCloseDDraw( p_vout ); vout_Destroy( p_vout ); return ( 1 ); @@ -252,7 +249,7 @@ static void vout_End( vout_thread_t *p_vout ) *****************************************************************************/ static void vout_Destroy( vout_thread_t *p_vout ) { - intf_WarnMsg( 3, "vout: vout_Destroy" ); + msg_Dbg( p_vout, "vout_Destroy" ); DirectXCloseDisplay( p_vout ); DirectXCloseDDraw( p_vout ); @@ -296,7 +293,7 @@ static int vout_Manage( vout_thread_t *p_vout ) if( p_vout->i_changes & VOUT_SCALE_CHANGE || p_vout->p_sys->i_changes & VOUT_SCALE_CHANGE) { - intf_WarnMsg( 3, "vout: vout_Manage Scale Change" ); + msg_Dbg( p_vout, "Scale Change" ); if( !p_vout->p_sys->b_using_overlay ) InvalidateRect( p_vout->p_sys->hwnd, NULL, TRUE ); else @@ -311,7 +308,7 @@ static int vout_Manage( vout_thread_t *p_vout ) if( p_vout->i_changes & VOUT_SIZE_CHANGE || p_vout->p_sys->i_changes & VOUT_SIZE_CHANGE ) { - intf_WarnMsg( 3, "vout: vout_Manage Size Change" ); + msg_Dbg( p_vout, "Size Change" ); if( !p_vout->p_sys->b_using_overlay ) InvalidateRect( p_vout->p_sys->hwnd, NULL, TRUE ); else @@ -392,7 +389,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) if( (p_vout->p_sys->p_display == NULL) ) { - intf_WarnMsg( 3, "vout error: vout_Display no display!!" ); + msg_Warn( p_vout, "no display!!" ); return; } @@ -427,7 +424,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) if( dxresult != DD_OK ) { - intf_WarnMsg( 3, "vout: could not Blit the surface" ); + msg_Warn( p_vout, "could not Blit the surface" ); return; } @@ -455,20 +452,19 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) } if( dxresult != DD_OK ) - intf_WarnMsg( 8, "vout: couldn't flip overlay surface" ); - + msg_Warn( p_vout, "could not flip overlay surface" ); if( !DirectXGetSurfaceDesc( p_pic ) ) { /* AAARRGG */ - intf_ErrMsg( "vout error: vout_Display cannot get surface desc" ); + msg_Err( p_vout, "cannot get surface desc" ); return; } if( !UpdatePictureStruct( p_vout, p_pic, p_vout->output.i_chroma ) ) { /* AAARRGG */ - intf_ErrMsg( "vout error: vout_Display unvalid pic chroma" ); + msg_Err( p_vout, "invalid pic chroma" ); return; } @@ -492,13 +488,13 @@ static int DirectXInitDDraw( vout_thread_t *p_vout ) HRESULT (WINAPI *OurDirectDrawCreate)(GUID *,LPDIRECTDRAW *,IUnknown *); LPDIRECTDRAW p_ddobject; - intf_WarnMsg( 3, "vout: DirectXInitDDraw" ); + msg_Dbg( p_vout, "DirectXInitDDraw" ); /* load direct draw DLL */ p_vout->p_sys->hddraw_dll = LoadLibrary("DDRAW.DLL"); if( p_vout->p_sys->hddraw_dll == NULL ) { - intf_WarnMsg( 3, "vout: DirectXInitDDraw failed loading ddraw.dll" ); + msg_Warn( p_vout, "DirectXInitDDraw failed loading ddraw.dll" ); return( 1 ); } @@ -506,7 +502,7 @@ static int DirectXInitDDraw( vout_thread_t *p_vout ) (void *)GetProcAddress(p_vout->p_sys->hddraw_dll, "DirectDrawCreate"); if ( OurDirectDrawCreate == NULL ) { - intf_ErrMsg( "vout error: DirectXInitDDraw failed GetProcAddress" ); + msg_Err( p_vout, "DirectXInitDDraw failed GetProcAddress" ); FreeLibrary( p_vout->p_sys->hddraw_dll ); p_vout->p_sys->hddraw_dll = NULL; return( 1 ); @@ -516,7 +512,7 @@ static int DirectXInitDDraw( vout_thread_t *p_vout ) dxresult = OurDirectDrawCreate( NULL, &p_ddobject, NULL ); if( dxresult != DD_OK ) { - intf_ErrMsg( "vout error: DirectXInitDDraw can't initialize DDraw" ); + msg_Err( p_vout, "DirectXInitDDraw cannot initialize DDraw" ); p_vout->p_sys->p_ddobject = NULL; FreeLibrary( p_vout->p_sys->hddraw_dll ); p_vout->p_sys->hddraw_dll = NULL; @@ -529,7 +525,7 @@ static int DirectXInitDDraw( vout_thread_t *p_vout ) p_vout->p_sys->hwnd, DDSCL_NORMAL ); if( dxresult != DD_OK ) { - intf_ErrMsg( "vout error: can't set direct draw cooperative level." ); + msg_Err( p_vout, "cannot set direct draw cooperative level" ); IDirectDraw_Release( p_ddobject ); p_vout->p_sys->p_ddobject = NULL; FreeLibrary( p_vout->p_sys->hddraw_dll ); @@ -542,7 +538,7 @@ static int DirectXInitDDraw( vout_thread_t *p_vout ) (LPVOID *)&p_vout->p_sys->p_ddobject ); if( dxresult != DD_OK ) { - intf_ErrMsg( "vout error: can't get IDirectDraw2 interface." ); + msg_Err( p_vout, "cannot get IDirectDraw2 interface" ); IDirectDraw_Release( p_ddobject ); p_vout->p_sys->p_ddobject = NULL; FreeLibrary( p_vout->p_sys->hddraw_dll ); @@ -558,7 +554,7 @@ static int DirectXInitDDraw( vout_thread_t *p_vout ) /* Probe the capabilities of the hardware */ DirectXGetDDrawCaps( p_vout ); - intf_WarnMsg( 3, "vout: End DirectXInitDDraw" ); + msg_Dbg( p_vout, "End DirectXInitDDraw" ); return( 0 ); } @@ -575,7 +571,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout ) LPDIRECTDRAWSURFACE p_display; DDPIXELFORMAT pixel_format; - intf_WarnMsg( 3, "vout: DirectXCreateDisplay" ); + msg_Dbg( p_vout, "DirectXCreateDisplay" ); /* Now get the primary surface. This surface is what you actually see * on your screen */ @@ -589,7 +585,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout ) &p_display, NULL ); if( dxresult != DD_OK ) { - intf_ErrMsg( "vout error: can't get direct draw primary surface." ); + msg_Err( p_vout, "cannot get direct draw primary surface" ); p_vout->p_sys->p_display = NULL; return( 1 ); } @@ -599,7 +595,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout ) (LPVOID *)&p_vout->p_sys->p_display ); if ( dxresult != DD_OK ) { - intf_ErrMsg( "vout error: can't get IDirectDrawSurface3 interface." ); + msg_Err( p_vout, "cannot get IDirectDrawSurface3 interface" ); IDirectDrawSurface_Release( p_display ); p_vout->p_sys->p_display = NULL; return( 1 ); @@ -622,7 +618,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout ) dxresult = IDirectDrawSurface3_GetPixelFormat( p_vout->p_sys->p_display, &pixel_format ); if( dxresult != DD_OK ) - intf_WarnMsg( 3, "vout: DirectXUpdateOverlay GetPixelFormat failed" ); + msg_Warn( p_vout, "DirectXUpdateOverlay GetPixelFormat failed" ); p_vout->p_sys->i_colorkey = (DWORD)((( p_vout->p_sys->i_rgb_colorkey * pixel_format.dwRBitMask) / 255) & pixel_format.dwRBitMask); @@ -644,14 +640,14 @@ static int DirectXCreateClipper( vout_thread_t *p_vout ) { HRESULT dxresult; - intf_WarnMsg( 3, "vout: DirectXCreateClipper" ); + msg_Dbg( p_vout, "DirectXCreateClipper" ); /* Create the clipper */ dxresult = IDirectDraw2_CreateClipper( p_vout->p_sys->p_ddobject, 0, &p_vout->p_sys->p_clipper, NULL ); if( dxresult != DD_OK ) { - intf_WarnMsg( 3, "vout: DirectXCreateClipper can't create clipper." ); + msg_Warn( p_vout, "DirectXCreateClipper cannot create clipper" ); p_vout->p_sys->p_clipper = NULL; return( 1 ); } @@ -661,8 +657,8 @@ static int DirectXCreateClipper( vout_thread_t *p_vout ) p_vout->p_sys->hwnd); if( dxresult != DD_OK ) { - intf_WarnMsg( 3, - "vout: DirectXCreateClipper can't attach clipper to window." ); + msg_Warn( p_vout, + "DirectXCreateClipper cannot attach clipper to window" ); IDirectDrawSurface_Release( p_vout->p_sys->p_clipper ); p_vout->p_sys->p_clipper = NULL; return( 1 ); @@ -673,8 +669,8 @@ static int DirectXCreateClipper( vout_thread_t *p_vout ) p_vout->p_sys->p_clipper); if( dxresult != DD_OK ) { - intf_WarnMsg( 3, - "vout: DirectXCreateClipper can't attach clipper to surface." ); + msg_Warn( p_vout, + "DirectXCreateClipper cannot attach clipper to surface" ); IDirectDrawSurface_Release( p_vout->p_sys->p_clipper ); p_vout->p_sys->p_clipper = NULL; return( 1 ); @@ -786,7 +782,7 @@ static int DirectXCreateSurface( vout_thread_t *p_vout, IDirectDrawSurface_Release( p_surface ); /* Release the old interface */ if ( dxresult != DD_OK ) { - intf_ErrMsg( "vout error: can't get IDirectDrawSurface3 interface." ); + msg_Err( p_vout, "cannot get IDirectDrawSurface3 interface" ); *pp_surface_final = NULL; return 0; } @@ -833,8 +829,8 @@ void DirectXUpdateOverlay( vout_thread_t *p_vout ) &ddofx ); if(dxresult != DD_OK) { - intf_WarnMsg( 3, - "vout: DirectXUpdateOverlay can't move or resize overlay" ); + msg_Warn( p_vout, + "DirectXUpdateOverlay cannot move or resize overlay" ); } } @@ -846,7 +842,7 @@ void DirectXUpdateOverlay( vout_thread_t *p_vout ) *****************************************************************************/ static void DirectXCloseDDraw( vout_thread_t *p_vout ) { - intf_WarnMsg(3, "vout: DirectXCloseDDraw" ); + msg_Dbg( p_vout, "DirectXCloseDDraw" ); if( p_vout->p_sys->p_ddobject != NULL ) { IDirectDraw2_Release(p_vout->p_sys->p_ddobject); @@ -867,18 +863,18 @@ static void DirectXCloseDDraw( vout_thread_t *p_vout ) *****************************************************************************/ static void DirectXCloseDisplay( vout_thread_t *p_vout ) { - intf_WarnMsg( 3, "vout: DirectXCloseDisplay" ); + msg_Dbg( p_vout, "DirectXCloseDisplay" ); if( p_vout->p_sys->p_clipper != NULL ) { - intf_WarnMsg( 3, "vout: DirectXCloseDisplay clipper" ); + msg_Dbg( p_vout, "DirectXCloseDisplay clipper" ); IDirectDraw2_Release( p_vout->p_sys->p_clipper ); p_vout->p_sys->p_clipper = NULL; } if( p_vout->p_sys->p_display != NULL ) { - intf_WarnMsg( 3, "vout: DirectXCloseDisplay display" ); + msg_Dbg( p_vout, "DirectXCloseDisplay display" ); IDirectDraw2_Release( p_vout->p_sys->p_display ); p_vout->p_sys->p_display = NULL; } @@ -892,7 +888,7 @@ static void DirectXCloseDisplay( vout_thread_t *p_vout ) static void DirectXCloseSurface( vout_thread_t *p_vout, LPDIRECTDRAWSURFACE3 p_surface ) { - intf_WarnMsg( 3, "vout: DirectXCloseSurface" ); + msg_Dbg( p_vout, "DirectXCloseSurface" ); if( p_surface != NULL ) { IDirectDraw2_Release( p_surface ); @@ -911,7 +907,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic, boolean_t b_result_ok; LPDIRECTDRAWSURFACE3 p_surface; - intf_WarnMsg( 3, "vout: NewPictureVec" ); + msg_Dbg( p_vout, "NewPictureVec" ); I_OUTPUTPICTURES = 0; @@ -984,8 +980,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic, p_surface, &dds_caps, &p_pic[0].p_sys->p_surface ) ) { - intf_WarnMsg( 3, "vout: NewPictureVec couldn't get " - "back buffer" ); + msg_Warn( p_vout, "NewPictureVec could not get back buffer" ); /* front buffer is the same as back buffer */ p_pic[0].p_sys->p_surface = p_surface; } @@ -1008,11 +1003,11 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic, DirectXUpdateOverlay( p_vout ); I_OUTPUTPICTURES = 1; - intf_WarnMsg( 3,"vout: DirectX YUV overlay created successfully" ); + msg_Dbg( p_vout, "DirectX YUV overlay created successfully" ); } else { - intf_WarnMsg( 3, "vout: can't create an YUV overlay surface." ); + msg_Err( p_vout, "cannot create YUV overlay surface" ); p_vout->p_sys->b_using_overlay = 0; } } @@ -1056,7 +1051,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic, case 32: p_vout->output.i_chroma = FOURCC_RV32; break; default: - intf_ErrMsg( "vout error: unknown screen depth" ); + msg_Err( p_vout, "unknown screen depth" ); return( 0 ); } p_vout->output.i_rmask = ddpfPixelFormat.dwRBitMask; @@ -1114,16 +1109,15 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic, { /* Unknown chroma, tell the guy to get lost */ - intf_ErrMsg( "vout error: never heard of chroma 0x%.8x (%4.4s)", - p_vout->output.i_chroma, - (char*)&p_vout->output.i_chroma ); + msg_Err( p_vout, "never heard of chroma 0x%.8x (%4.4s)", + p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma ); FreePictureVec( p_vout, p_pic, I_OUTPUTPICTURES ); I_OUTPUTPICTURES = 0; return -1; } } - intf_WarnMsg( 3, "vout: End NewPictureVec"); + msg_Dbg( p_vout, "End NewPictureVec"); return 0; } @@ -1266,7 +1260,7 @@ static void DirectXGetDDrawCaps( vout_thread_t *p_vout ) &ddcaps, NULL ); if(dxresult != DD_OK ) { - intf_WarnMsg( 3,"vout error: can't get caps." ); + msg_Warn( p_vout, "cannot get caps" ); } else { @@ -1288,11 +1282,10 @@ static void DirectXGetDDrawCaps( vout_thread_t *p_vout ) /* Determine if the hardware supports scaling of the overlay surface */ bCanStretch = ((ddcaps.dwCaps & DDCAPS_OVERLAYSTRETCH) == DDCAPS_OVERLAYSTRETCH) ? TRUE : FALSE; - intf_WarnMsg( 3, "vout: DirectDraw Capabilities:" ); - intf_WarnMsg( 3, " overlay=%i yuvoverlay=%i can_clip_overlay=%i " - "colorkey=%i stretch=%i", - bHasOverlay, bHasOverlayFourCC, bCanClipOverlay, - bHasColorKey, bCanStretch ); + msg_Dbg( p_vout, "DirectDraw Capabilities: overlay=%i yuvoverlay=%i " + "can_clip_overlay=%i colorkey=%i stretch=%i", + bHasOverlay, bHasOverlayFourCC, bCanClipOverlay, + bHasColorKey, bCanStretch ); /* Overlay clipping support is interesting for us as it means we can * get rid of the colorkey alltogether */ @@ -1330,7 +1323,7 @@ static int DirectXGetSurfaceDesc( picture_t *p_pic ) } if( dxresult != DD_OK ) { - intf_ErrMsg( "vout: DirectXGetSurfaceDesc can't lock surface" ); +//X msg_Err( p_vout, "DirectXGetSurfaceDesc cannot lock surface" ); return 0; } diff --git a/plugins/directx/vout_directx.h b/plugins/directx/vout_directx.h index 6d0fe2f9bc..bf5280806c 100644 --- a/plugins/directx/vout_directx.h +++ b/plugins/directx/vout_directx.h @@ -2,7 +2,7 @@ * vout_directx.h: Windows DirectX video output header file ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vout_directx.h,v 1.6 2002/05/18 13:30:28 gbazin Exp $ + * $Id: vout_directx.h,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -27,7 +27,7 @@ * This structure is part of the video output thread descriptor. * It describes the DirectX specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { LPDIRECTDRAW2 p_ddobject; /* DirectDraw object */ @@ -38,9 +38,9 @@ typedef struct vout_sys_s HBRUSH hbrush; /* window backgound brush (color) */ HWND hwnd; /* Handle of the main window */ - boolean_t b_using_overlay; /* Are we using an overlay surface */ - boolean_t b_use_sysmem; /* Should we use system memory for surfaces */ - boolean_t b_hw_yuv; /* Should we use hardware YUV->RGB conversions */ + vlc_bool_t b_using_overlay; /* Are we using an overlay surface */ + vlc_bool_t b_use_sysmem; /* Should we use system memory for surfaces */ + vlc_bool_t b_hw_yuv; /* Should we use hardware YUV->RGB conversions */ /* size of the display */ RECT rect_display; @@ -67,17 +67,16 @@ typedef struct vout_sys_s volatile u16 i_changes; /* changes made to the video display */ /* Mouse */ - volatile boolean_t b_cursor_hidden; - volatile mtime_t i_lastmoved; + volatile vlc_bool_t b_cursor_hidden; + volatile mtime_t i_lastmoved; vlc_thread_t event_thread_id; /* event thread */ vlc_mutex_t event_thread_lock; /* lock for the event thread */ vlc_cond_t event_thread_wait; volatile int i_event_thread_status; /* DirectXEventThread status */ - volatile boolean_t b_event_thread_die; /* flag to kill the event thread */ - -} vout_sys_t; + volatile vlc_bool_t b_event_thread_die; /* flag to kill the event thread */ +}; /***************************************************************************** * picture_sys_t: direct buffer method descriptor @@ -85,13 +84,12 @@ typedef struct vout_sys_s * This structure is part of the picture descriptor, it describes the * DirectX specific properties of a direct buffer. *****************************************************************************/ -typedef struct picture_sys_s +struct picture_sys_s { LPDIRECTDRAWSURFACE3 p_surface; DDSURFACEDESC ddsd; LPDIRECTDRAWSURFACE3 p_front_surface; - -} picture_sys_t; +}; /***************************************************************************** * Prototypes from vout_directx.c diff --git a/plugins/directx/vout_events.c b/plugins/directx/vout_events.c index f07957e1d4..f4f239fa49 100644 --- a/plugins/directx/vout_events.c +++ b/plugins/directx/vout_events.c @@ -2,7 +2,7 @@ * vout_events.c: Windows DirectX video output events handler ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: vout_events.c,v 1.18 2002/05/18 22:41:43 gbazin Exp $ + * $Id: vout_events.c,v 1.19 2002/06/01 12:31:58 sam Exp $ * * Authors: Gildas Bazin * @@ -30,21 +30,18 @@ #include /* free() */ #include /* strerror() */ -#include +#include +#include +#include #include "netutils.h" -#include "video.h" -#include "video_output.h" - #include #include #include #include -#include "interface.h" - #include "vout_directx.h" /***************************************************************************** @@ -77,7 +74,7 @@ void DirectXEventThread( vout_thread_t *p_vout ) vlc_mutex_lock( &p_vout->p_sys->event_thread_lock ); if( DirectXCreateWindow( p_vout ) ) { - intf_ErrMsg( "vout error: can't create window" ); + msg_Err( p_vout, "out of memory" ); p_vout->p_sys->i_event_thread_status = THREAD_FATAL; p_vout->p_sys->b_event_thread_die = 1; } @@ -122,7 +119,7 @@ void DirectXEventThread( vout_thread_t *p_vout ) break; case WM_RBUTTONUP: - p_main->p_intf->b_menu_change = 1; + p_vout->p_vlc->p_intf->b_menu_change = 1; break; case WM_LBUTTONDOWN: @@ -136,13 +133,13 @@ void DirectXEventThread( vout_thread_t *p_vout ) /* the key events are first processed here. The next * message processed by this main message loop will be the * char translation of the key event */ - intf_WarnMsg( 3, "vout: vout_Manage WM_KEYDOWN" ); + msg_Dbg( p_vout, "WM_KEYDOWN" ); switch( msg.wParam ) { case VK_ESCAPE: case VK_F12: /* exit application */ - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; } TranslateMessage(&msg); @@ -154,7 +151,7 @@ void DirectXEventThread( vout_thread_t *p_vout ) case 'q': case 'Q': /* exit application */ - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; case 'f': /* switch to fullscreen */ @@ -185,16 +182,16 @@ void DirectXEventThread( vout_thread_t *p_vout ) p_vout->p_sys->i_changes |= VOUT_INTF_CHANGE; break; - case '0': network_ChannelJoin( 0 ); break; - case '1': network_ChannelJoin( 1 ); break; - case '2': network_ChannelJoin( 2 ); break; - case '3': network_ChannelJoin( 3 ); break; - case '4': network_ChannelJoin( 4 ); break; - case '5': network_ChannelJoin( 5 ); break; - case '6': network_ChannelJoin( 6 ); break; - case '7': network_ChannelJoin( 7 ); break; - case '8': network_ChannelJoin( 8 ); break; - case '9': network_ChannelJoin( 9 ); break; + case '0': network_ChannelJoin( p_vout->p_this, 0 ); break; + case '1': network_ChannelJoin( p_vout->p_this, 1 ); break; + case '2': network_ChannelJoin( p_vout->p_this, 2 ); break; + case '3': network_ChannelJoin( p_vout->p_this, 3 ); break; + case '4': network_ChannelJoin( p_vout->p_this, 4 ); break; + case '5': network_ChannelJoin( p_vout->p_this, 5 ); break; + case '6': network_ChannelJoin( p_vout->p_this, 6 ); break; + case '7': network_ChannelJoin( p_vout->p_this, 7 ); break; + case '8': network_ChannelJoin( p_vout->p_this, 8 ); break; + case '9': network_ChannelJoin( p_vout->p_this, 9 ); break; default: break; @@ -213,12 +210,11 @@ void DirectXEventThread( vout_thread_t *p_vout ) if( msg.message == WM_QUIT ) { - intf_WarnMsg( 3, "vout: DirectXEventThread WM_QUIT... " - "shouldn't happen!!" ); + msg_Warn( p_vout, "WM_QUIT... should not happen!!" ); p_vout->p_sys->hwnd = NULL; /* Window already destroyed */ } - intf_WarnMsg( 3, "vout: DirectXEventThread Terminating" ); + msg_Dbg( p_vout, "DirectXEventThread Terminating" ); /* clear the changes formerly signaled */ p_vout->p_sys->i_changes = 0; @@ -246,7 +242,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) HICON vlc_icon = NULL; char vlc_path[_MAX_PATH+1]; - intf_WarnMsg( 3, "vout: DirectXCreateWindow" ); + msg_Dbg( p_vout, "DirectXCreateWindow" ); /* get this module's instance */ hInstance = GetModuleHandle(NULL); @@ -269,7 +265,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) if( colorkey == GetNearestColor( hdc, colorkey ) ) break; } - intf_WarnMsg(3,"vout: DirectXCreateWindow background color:%i", colorkey); + msg_Dbg( p_vout, "background color: %i", colorkey ); /* create the actual brush */ p_vout->p_sys->hbrush = CreateSolidBrush(colorkey); @@ -279,10 +275,10 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) p_vout->p_sys->rect_display.right = GetDeviceCaps( hdc, HORZRES ); p_vout->p_sys->rect_display.bottom = GetDeviceCaps( hdc, VERTRES ); p_vout->p_sys->i_display_depth = GetDeviceCaps( hdc, BITSPIXEL ); - intf_WarnMsg( 3, "vout: Screen dimensions %ix%i colour depth %i", - p_vout->p_sys->rect_display.right, - p_vout->p_sys->rect_display.bottom, - p_vout->p_sys->i_display_depth ); + msg_Dbg( p_vout, "screen dimensions %ix%i colour depth %i", + p_vout->p_sys->rect_display.right, + p_vout->p_sys->rect_display.bottom, + p_vout->p_sys->i_display_depth ); ReleaseDC( p_vout->p_sys->hwnd, hdc ); @@ -326,7 +322,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) /* Check why it failed. If it's because one already exists then fine */ if( !GetClassInfo( hInstance, "VLC DirectX", &wndclass ) ) { - intf_ErrMsg( "vout: DirectXCreateWindow RegisterClass FAILED" ); + msg_Err( p_vout, "DirectXCreateWindow RegisterClass FAILED" ); return (1); } } @@ -356,7 +352,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) NULL); /* no additional arguments */ if (p_vout->p_sys->hwnd == NULL) { - intf_WarnMsg( 3, "vout: DirectXCreateWindow create window FAILED" ); + msg_Warn( p_vout, "DirectXCreateWindow create window FAILED" ); return (1); } @@ -378,7 +374,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) *****************************************************************************/ static void DirectXCloseWindow( vout_thread_t *p_vout ) { - intf_WarnMsg( 3, "vout: DirectXCloseWindow" ); + msg_Dbg( p_vout, "DirectXCloseWindow" ); vlc_mutex_lock( &p_vout->p_sys->event_thread_lock ); @@ -432,10 +428,10 @@ static void DirectXUpdateRects( vout_thread_t *p_vout ) IntersectRect( &rect_dest_clipped, &rect_dest, &rect_display ); #if 0 - intf_WarnMsg( 3, "vout: DirectXUpdateRects image_dst_clipped coords:" - " %i,%i,%i,%i", - rect_dest_clipped.left, rect_dest_clipped.top, - rect_dest_clipped.right, rect_dest_clipped.bottom); + msg_Dbg( p_vout, "DirectXUpdateRects image_dst_clipped coords:" + " %i,%i,%i,%i", + rect_dest_clipped.left, rect_dest_clipped.top, + rect_dest_clipped.right, rect_dest_clipped.bottom ); #endif /* the 2 following lines are to fix a bug when clicking on the desktop */ @@ -465,10 +461,10 @@ static void DirectXUpdateRects( vout_thread_t *p_vout ) (rect_dest.bottom - rect_dest.top); #if 0 - intf_WarnMsg( 3, "vout: DirectXUpdateRects image_src_clipped" - " coords: %i,%i,%i,%i", - rect_src_clipped.left, rect_src_clipped.top, - rect_src_clipped.right, rect_src_clipped.bottom); + msg_Dbg( p_vout, "DirectXUpdateRects image_src_clipped" + " coords: %i,%i,%i,%i", + rect_src_clipped.left, rect_src_clipped.top, + rect_src_clipped.right, rect_src_clipped.bottom ); #endif #undef rect_src @@ -492,7 +488,8 @@ static void DirectXUpdateRects( vout_thread_t *p_vout ) static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { - vout_thread_t *p_vout; + vout_thread_t *p_vout = + (vout_thread_t *)GetWindowLong( hwnd, GWL_USERDATA ); switch( message ) { @@ -502,8 +499,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, RECT rect_window; POINT point_window; - p_vout = (vout_thread_t *)GetWindowLong( hwnd, GWL_USERDATA ); - /* update the window position */ point_window.x = 0; point_window.y = 0; @@ -532,9 +527,17 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, /* the user wants to close the window */ case WM_CLOSE: - intf_WarnMsg( 4, "vout: WinProc WM_CLOSE" ); + msg_Dbg( p_vout, "WinProc WM_CLOSE" ); /* exit application */ - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; + return 0; + break; + + /* the window has been closed so shut down everything now */ + case WM_DESTROY: + msg_Dbg( p_vout, "WinProc WM_DESTROY" ); + /* just destroy the window */ + PostQuitMessage( 0 ); return 0; break; @@ -543,13 +546,12 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, { case SC_SCREENSAVE: /* catch the screensaver */ case SC_MONITORPOWER: /* catch the monitor turn-off */ - intf_WarnMsg( 3, "vout: WinProc WM_SYSCOMMAND" ); + msg_Dbg( p_vout, "WinProc WM_SYSCOMMAND" ); return 0; /* this stops them from happening */ } break; case WM_ERASEBKGND: - p_vout = (vout_thread_t *)GetWindowLong( hwnd, GWL_USERDATA ); if( !p_vout->p_sys->b_using_overlay ) { /* We want to eliminate unnecessary background redraws which create @@ -558,7 +560,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, RECT rect_temp; GetClipBox( (HDC)wParam, &rect_temp ); #if 0 - intf_WarnMsg( 4, "vout: WinProc WM_ERASEBKGND %i,%i,%i,%i", + msg_Dbg( p_vout, "WinProc WM_ERASEBKGND %i,%i,%i,%i", rect_temp.left, rect_temp.top, rect_temp.right, rect_temp.bottom ); #endif @@ -571,7 +573,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, break; default: - //intf_WarnMsg( 4, "vout: WinProc WM Default %i", message ); + //msg_Dbg( p_vout, "WinProc WM Default %i", message ); break; } diff --git a/plugins/downmix/ac3_downmix_3dn.c b/plugins/downmix/ac3_downmix_3dn.c index e69e494ea9..3559636d13 100644 --- a/plugins/downmix/ac3_downmix_3dn.c +++ b/plugins/downmix/ac3_downmix_3dn.c @@ -2,7 +2,7 @@ * ac3_downmix_3dn.c: accelerated 3D Now! ac3 downmix functions ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: ac3_downmix_3dn.c,v 1.10 2002/04/01 16:08:23 gbazin Exp $ + * $Id: ac3_downmix_3dn.c,v 1.11 2002/06/01 12:31:58 sam Exp $ * * Authors: Renaud Dartus * @@ -24,7 +24,7 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include +#include #include "ac3_downmix.h" diff --git a/plugins/downmix/ac3_downmix_c.c b/plugins/downmix/ac3_downmix_c.c index e4efeeb48a..75311dbb21 100644 --- a/plugins/downmix/ac3_downmix_c.c +++ b/plugins/downmix/ac3_downmix_c.c @@ -2,7 +2,7 @@ * ac3_downmix_c.c: ac3 downmix functions in C ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: ac3_downmix_c.c,v 1.4 2001/12/30 07:09:54 sam Exp $ + * $Id: ac3_downmix_c.c,v 1.5 2002/06/01 12:31:58 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -27,7 +27,7 @@ *****************************************************************************/ #include /* memcpy() */ -#include +#include #include "ac3_downmix.h" diff --git a/plugins/downmix/ac3_downmix_sse.c b/plugins/downmix/ac3_downmix_sse.c index ff2d0c13d8..585c0c4e50 100644 --- a/plugins/downmix/ac3_downmix_sse.c +++ b/plugins/downmix/ac3_downmix_sse.c @@ -2,7 +2,7 @@ * ac3_downmix_sse.c: accelerated SSE ac3 downmix functions ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: ac3_downmix_sse.c,v 1.10 2002/04/01 16:08:23 gbazin Exp $ + * $Id: ac3_downmix_sse.c,v 1.11 2002/06/01 12:31:58 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -25,7 +25,7 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include +#include #include "ac3_downmix.h" diff --git a/plugins/downmix/downmix.c b/plugins/downmix/downmix.c index f76538410b..fb29253227 100644 --- a/plugins/downmix/downmix.c +++ b/plugins/downmix/downmix.c @@ -2,7 +2,7 @@ * downmix.c : AC3 downmix module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: downmix.c,v 1.8 2002/04/19 13:56:10 sam Exp $ + * $Id: downmix.c,v 1.9 2002/06/01 12:31:58 sam Exp $ * * Authors: Renaud Dartus * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_downmix.h" #include "ac3_downmix_common.h" @@ -47,7 +47,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("AC3 downmix module") ) ADD_CAPABILITY( DOWNMIX, 50 ) ADD_SHORTCUT( "c" ) - ADD_SHORTCUT( "downmix" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/downmix/downmix3dn.c b/plugins/downmix/downmix3dn.c index 95abe46494..463d95c1f7 100644 --- a/plugins/downmix/downmix3dn.c +++ b/plugins/downmix/downmix3dn.c @@ -2,7 +2,7 @@ * downmix3dn.c : accelerated 3D Now! AC3 downmix module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: downmix3dn.c,v 1.9 2002/04/19 13:56:10 sam Exp $ + * $Id: downmix3dn.c,v 1.10 2002/06/01 12:31:58 sam Exp $ * * Authors: Renaud Dartus * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_downmix.h" #include "ac3_downmix_common.h" @@ -49,7 +49,6 @@ MODULE_INIT_START ADD_REQUIREMENT( 3DNOW ) ADD_SHORTCUT( "3dn" ) ADD_SHORTCUT( "3dnow" ) - ADD_SHORTCUT( "downmix3dn" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/downmix/downmixsse.c b/plugins/downmix/downmixsse.c index dfff31bd4f..a2651e994c 100644 --- a/plugins/downmix/downmixsse.c +++ b/plugins/downmix/downmixsse.c @@ -2,7 +2,7 @@ * downmixsse.c : accelerated SSE AC3 downmix module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: downmixsse.c,v 1.9 2002/04/19 13:56:10 sam Exp $ + * $Id: downmixsse.c,v 1.10 2002/06/01 12:31:58 sam Exp $ * * Authors: Renaud Dartus * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_downmix.h" #include "ac3_downmix_common.h" @@ -48,7 +48,6 @@ MODULE_INIT_START ADD_CAPABILITY( DOWNMIX, 200 ) ADD_REQUIREMENT( SSE ) ADD_SHORTCUT( "sse" ) - ADD_SHORTCUT( "downmixsse" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/dsp/Makefile b/plugins/dsp/Makefile index e6c16ffc86..393faf0a4f 100644 --- a/plugins/dsp/Makefile +++ b/plugins/dsp/Makefile @@ -1 +1 @@ -dsp_SOURCES = dsp.c aout_dsp.c +dsp_SOURCES = dsp.c diff --git a/plugins/dsp/aout_dsp.c b/plugins/dsp/aout_dsp.c deleted file mode 100644 index 316732f15e..0000000000 --- a/plugins/dsp/aout_dsp.c +++ /dev/null @@ -1,254 +0,0 @@ -/***************************************************************************** - * aout_dsp.c : dsp functions library - ***************************************************************************** - * Copyright (C) 1999-2001 VideoLAN - * $Id: aout_dsp.c,v 1.27 2002/04/23 14:16:20 sam Exp $ - * - * Authors: Michel Kaempf - * Samuel Hocevar - * - * 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. - *****************************************************************************/ - -/* TODO: - * - * - an aout_GetFormats() function - * - dsp inline/static - * - make this library portable (see mpg123) - * - */ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#include /* ENOMEM */ -#include /* open(), O_WRONLY */ -#include /* ioctl() */ -#include /* strerror() */ -#include /* write(), close() */ -#include /* "intf_msg.h" */ -#include /* calloc(), malloc(), free() */ - -#include - -/* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED, - * SNDCTL_DSP_GETOSPACE */ -#ifdef HAVE_SOUNDCARD_H -# include -#elif defined( HAVE_SYS_SOUNDCARD_H ) -# include -#elif defined( HAVE_MACHINE_SOUNDCARD_H ) -# include -#endif - -#include "audio_output.h" /* aout_thread_t */ - -/***************************************************************************** - * aout_sys_t: dsp audio output method descriptor - ***************************************************************************** - * This structure is part of the audio output thread descriptor. - * It describes the dsp specific properties of an audio device. - *****************************************************************************/ -typedef struct aout_sys_s -{ - audio_buf_info audio_buf; - - /* Path to the audio output device */ - char * psz_device; - int i_fd; - -} aout_sys_t; - -/***************************************************************************** - * Local prototypes. - *****************************************************************************/ -static int aout_Open ( aout_thread_t *p_aout ); -static int aout_SetFormat ( aout_thread_t *p_aout ); -static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); -static void aout_Play ( aout_thread_t *p_aout, - byte_t *buffer, int i_size ); -static void aout_Close ( aout_thread_t *p_aout ); - -/***************************************************************************** - * Functions exported as capabilities. They are declared as static so that - * we don't pollute the namespace too much. - *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ) -{ - p_function_list->functions.aout.pf_open = aout_Open; - p_function_list->functions.aout.pf_setformat = aout_SetFormat; - p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo; - p_function_list->functions.aout.pf_play = aout_Play; - p_function_list->functions.aout.pf_close = aout_Close; -} - -/***************************************************************************** - * aout_Open: opens the audio device (the digital sound processor) - ***************************************************************************** - * This function opens the dsp as a usual non-blocking write-only file, and - * modifies the p_aout->p_sys->i_fd with the file's descriptor. - *****************************************************************************/ -static int aout_Open( aout_thread_t *p_aout ) -{ - /* Allocate structure */ - p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); - if( p_aout->p_sys == NULL ) - { - intf_ErrMsg("aout error: %s", strerror(ENOMEM) ); - return( 1 ); - } - - /* Initialize some variables */ - if( !(p_aout->p_sys->psz_device = config_GetPszVariable( "dspdev" )) ) - { - intf_ErrMsg( "aout error: don't know which audio device to open" ); - free( p_aout->p_sys ); - return( -1 ); - } - - /* Open the sound device */ - if( (p_aout->p_sys->i_fd = open( p_aout->p_sys->psz_device, O_WRONLY )) - < 0 ) - { - intf_ErrMsg( "aout error: can't open audio device (%s)", - p_aout->p_sys->psz_device ); - free( p_aout->p_sys->psz_device ); - free( p_aout->p_sys ); - return( -1 ); - } - - return( 0 ); -} - -/***************************************************************************** - * aout_SetFormat: resets the dsp and sets its format - ***************************************************************************** - * This functions resets the DSP device, tries to initialize the output - * format with the value contained in the dsp structure, and if this value - * could not be set, the default value returned by ioctl is set. It then - * does the same for the stereo mode, and for the output rate. - *****************************************************************************/ -static int aout_SetFormat( aout_thread_t *p_aout ) -{ - int i_format; - int i_rate; - boolean_t b_stereo; - - /* Reset the DSP device */ - if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ) - { - intf_ErrMsg( "aout error: can't reset audio device (%s)", - p_aout->p_sys->psz_device ); - return( -1 ); - } - - /* Set the output format */ - i_format = p_aout->i_format; - if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0 ) - { - intf_ErrMsg( "aout error: can't set audio output format (%i)", - p_aout->i_format ); - return( -1 ); - } - - if( i_format != p_aout->i_format ) - { - intf_WarnMsg( 2, "aout warning: audio output format not supported (%i)" - ,p_aout->i_format ); - p_aout->i_format = i_format; - } - - /* Set the number of channels */ - b_stereo = ( p_aout->i_channels >= 2 ); - - if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_STEREO, &b_stereo ) < 0 ) - { - intf_ErrMsg( "aout error: can't set number of audio channels (%i)", - p_aout->i_channels ); - return( -1 ); - } - - if( (1 + b_stereo) != p_aout->i_channels ) - { - intf_WarnMsg( 2, "aout warning: %i audio channels not supported", - p_aout->i_channels ); - p_aout->i_channels = 1 + b_stereo; - } - - /* Set the output rate */ - i_rate = p_aout->i_rate; - if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 ) - { - intf_ErrMsg( "aout error: can't set audio output rate (%i)", - p_aout->i_rate ); - return( -1 ); - } - - if( i_rate != p_aout->i_rate ) - { - intf_WarnMsg( 1, "aout warning: audio output rate not supported (%li)", - p_aout->i_rate ); - p_aout->i_rate = i_rate; - } - - return( 0 ); -} - -/***************************************************************************** - * aout_GetBufInfo: buffer status query - ***************************************************************************** - * This function fills in the audio_buf_info structure : - * - returns : number of available fragments (not partially used ones) - * - int fragstotal : total number of fragments allocated - * - int fragsize : size of a fragment in bytes - * - int bytes : available space in bytes (includes partially used fragments) - * Note! 'bytes' could be more than fragments*fragsize - *****************************************************************************/ -static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) -{ - ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_GETOSPACE, - &p_aout->p_sys->audio_buf ); - - /* returns the allocated space in bytes */ - return ( (p_aout->p_sys->audio_buf.fragstotal - * p_aout->p_sys->audio_buf.fragsize) - - p_aout->p_sys->audio_buf.bytes ); -} - -/***************************************************************************** - * aout_Play: plays a sound samples buffer - ***************************************************************************** - * This function writes a buffer of i_length bytes in the dsp - *****************************************************************************/ -static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) -{ - if( p_aout->b_active ) - { - int i_tmp; - i_tmp = write( p_aout->p_sys->i_fd, buffer, i_size ); - if( i_tmp < 0 ) - intf_ErrMsg("aout error: %s", strerror(ENOMEM) ); - - } -} - -/***************************************************************************** - * aout_Close: closes the dsp audio device - *****************************************************************************/ -static void aout_Close( aout_thread_t *p_aout ) -{ - close( p_aout->p_sys->i_fd ); - free( p_aout->p_sys->psz_device ); -} diff --git a/plugins/dsp/dsp.c b/plugins/dsp/dsp.c index 0c2bb0e3c5..582823062c 100644 --- a/plugins/dsp/dsp.c +++ b/plugins/dsp/dsp.c @@ -2,7 +2,7 @@ * dsp.c : OSS /dev/dsp module for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: dsp.c,v 1.16 2002/04/23 14:16:20 sam Exp $ + * $Id: dsp.c,v 1.17 2002/06/01 12:31:58 sam Exp $ * * Authors: Michel Kaempf * Samuel Hocevar @@ -25,15 +25,54 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* malloc(), free() */ -#include /* strdup() */ +#include /* ENOMEM */ +#include /* open(), O_WRONLY */ +#include /* ioctl() */ +#include /* strerror() */ +#include /* write(), close() */ +#include /* calloc(), malloc(), free() */ -#include +#include +#include + +/* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED, + * SNDCTL_DSP_GETOSPACE */ +#ifdef HAVE_SOUNDCARD_H +# include +#elif defined( HAVE_SYS_SOUNDCARD_H ) +# include +#elif defined( HAVE_MACHINE_SOUNDCARD_H ) +# include +#endif + +/***************************************************************************** + * aout_sys_t: dsp audio output method descriptor + ***************************************************************************** + * This structure is part of the audio output thread descriptor. + * It describes the dsp specific properties of an audio device. + *****************************************************************************/ +struct aout_sys_s +{ + audio_buf_info audio_buf; + + /* Path to the audio output device */ + char * psz_device; + int i_fd; +}; + +/***************************************************************************** + * Local prototypes. + *****************************************************************************/ +static void aout_getfunctions ( function_list_t * ); +static int aout_Open ( aout_thread_t * ); +static int aout_SetFormat ( aout_thread_t * ); +static int aout_GetBufInfo ( aout_thread_t *, int ); +static void aout_Play ( aout_thread_t *, byte_t *, int ); +static void aout_Close ( aout_thread_t * ); /***************************************************************************** * Capabilities defined in the other files. *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ); /***************************************************************************** * Build configuration tree. @@ -46,13 +85,181 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("Linux OSS /dev/dsp module") ) ADD_CAPABILITY( AOUT, 100 ) - ADD_SHORTCUT( "dsp" ) MODULE_INIT_STOP MODULE_ACTIVATE_START - _M( aout_getfunctions )( &p_module->p_functions->aout ); + aout_getfunctions( &p_module->p_functions->aout ); MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP +/***************************************************************************** + * Functions exported as capabilities. They are declared as static so that + * we don't pollute the namespace too much. + *****************************************************************************/ +static void aout_getfunctions( function_list_t * p_function_list ) +{ + p_function_list->functions.aout.pf_open = aout_Open; + p_function_list->functions.aout.pf_setformat = aout_SetFormat; + p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo; + p_function_list->functions.aout.pf_play = aout_Play; + p_function_list->functions.aout.pf_close = aout_Close; +} + +/***************************************************************************** + * aout_Open: opens the audio device (the digital sound processor) + ***************************************************************************** + * This function opens the dsp as a usual non-blocking write-only file, and + * modifies the p_aout->p_sys->i_fd with the file's descriptor. + *****************************************************************************/ +static int aout_Open( aout_thread_t *p_aout ) +{ + /* Allocate structure */ + p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); + if( p_aout->p_sys == NULL ) + { + msg_Err( p_aout, "out of memory" ); + return( 1 ); + } + + /* Initialize some variables */ + if( !(p_aout->p_sys->psz_device = config_GetPsz( p_aout, "dspdev" )) ) + { + msg_Err( p_aout, "don't know which audio device to open" ); + free( p_aout->p_sys ); + return( -1 ); + } + + /* Open the sound device */ + if( (p_aout->p_sys->i_fd = open( p_aout->p_sys->psz_device, O_WRONLY )) + < 0 ) + { + msg_Err( p_aout, "cannot open audio device (%s)", + p_aout->p_sys->psz_device ); + free( p_aout->p_sys->psz_device ); + free( p_aout->p_sys ); + return( -1 ); + } + + return( 0 ); +} + +/***************************************************************************** + * aout_SetFormat: resets the dsp and sets its format + ***************************************************************************** + * This functions resets the DSP device, tries to initialize the output + * format with the value contained in the dsp structure, and if this value + * could not be set, the default value returned by ioctl is set. It then + * does the same for the stereo mode, and for the output rate. + *****************************************************************************/ +static int aout_SetFormat( aout_thread_t *p_aout ) +{ + int i_format; + int i_rate; + vlc_bool_t b_stereo; + + /* Reset the DSP device */ + if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ) + { + msg_Err( p_aout, "cannot reset audio device (%s)", + p_aout->p_sys->psz_device ); + return( -1 ); + } + + /* Set the output format */ + i_format = p_aout->i_format; + if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0 ) + { + msg_Err( p_aout, "cannot set audio output format (%i)", + p_aout->i_format ); + return( -1 ); + } + + if( i_format != p_aout->i_format ) + { + msg_Warn( p_aout, "audio output format not supported (%i)", + p_aout->i_format ); + p_aout->i_format = i_format; + } + + /* Set the number of channels */ + b_stereo = ( p_aout->i_channels >= 2 ); + + if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_STEREO, &b_stereo ) < 0 ) + { + msg_Err( p_aout, "cannot set number of audio channels (%i)", + p_aout->i_channels ); + return( -1 ); + } + + if( (1 + b_stereo) != p_aout->i_channels ) + { + msg_Warn( p_aout, "%i audio channels not supported", + p_aout->i_channels ); + p_aout->i_channels = 1 + b_stereo; + } + + /* Set the output rate */ + i_rate = p_aout->i_rate; + if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 ) + { + msg_Err( p_aout, "cannot set audio output rate (%i)", p_aout->i_rate ); + return( -1 ); + } + + if( i_rate != p_aout->i_rate ) + { + msg_Warn( p_aout, "audio output rate not supported (%li)", + p_aout->i_rate ); + p_aout->i_rate = i_rate; + } + + return( 0 ); +} + +/***************************************************************************** + * aout_GetBufInfo: buffer status query + ***************************************************************************** + * This function fills in the audio_buf_info structure : + * - returns : number of available fragments (not partially used ones) + * - int fragstotal : total number of fragments allocated + * - int fragsize : size of a fragment in bytes + * - int bytes : available space in bytes (includes partially used fragments) + * Note! 'bytes' could be more than fragments*fragsize + *****************************************************************************/ +static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) +{ + ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_GETOSPACE, + &p_aout->p_sys->audio_buf ); + + /* returns the allocated space in bytes */ + return ( (p_aout->p_sys->audio_buf.fragstotal + * p_aout->p_sys->audio_buf.fragsize) + - p_aout->p_sys->audio_buf.bytes ); +} + +/***************************************************************************** + * aout_Play: plays a sound samples buffer + ***************************************************************************** + * This function writes a buffer of i_length bytes in the dsp + *****************************************************************************/ +static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) +{ + int i_tmp; + i_tmp = write( p_aout->p_sys->i_fd, buffer, i_size ); + + if( i_tmp < 0 ) + { + msg_Err( p_aout, "write failed (%s)", strerror(errno) ); + } +} + +/***************************************************************************** + * aout_Close: closes the dsp audio device + *****************************************************************************/ +static void aout_Close( aout_thread_t *p_aout ) +{ + close( p_aout->p_sys->i_fd ); + free( p_aout->p_sys->psz_device ); +} diff --git a/plugins/dummy/aout_dummy.c b/plugins/dummy/aout_dummy.c index ffc6d100c2..1e23809c1f 100644 --- a/plugins/dummy/aout_dummy.c +++ b/plugins/dummy/aout_dummy.c @@ -2,7 +2,7 @@ * aout_dummy.c : dummy audio output plugin ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: aout_dummy.c,v 1.20 2002/02/24 22:06:50 sam Exp $ + * $Id: aout_dummy.c,v 1.21 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -26,9 +26,8 @@ *****************************************************************************/ #include -#include - -#include "audio_output.h" /* aout_thread_t */ +#include +#include /***************************************************************************** * vout_dummy_t: dummy video output method descriptor @@ -36,12 +35,11 @@ * This structure is part of the video output thread descriptor. * It describes the dummy specific properties of an output thread. *****************************************************************************/ -typedef struct aout_sys_s +struct aout_sys_s { /* Prevent malloc(0) */ int i_dummy; - -} aout_sys_t; +}; /***************************************************************************** * Local prototypes. diff --git a/plugins/dummy/dummy.c b/plugins/dummy/dummy.c index 471a3f28ce..e58d1c649a 100644 --- a/plugins/dummy/dummy.c +++ b/plugins/dummy/dummy.c @@ -2,7 +2,7 @@ * dummy.c : dummy plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: dummy.c,v 1.20 2002/05/29 10:08:03 gbazin Exp $ + * $Id: dummy.c,v 1.21 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ #include /* malloc(), free() */ #include -#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -62,7 +62,6 @@ MODULE_INIT_START ADD_CAPABILITY( INTF, 0 ) ADD_CAPABILITY( ACCESS, 0 ) ADD_CAPABILITY( DEMUX, 0 ) - ADD_SHORTCUT( "dummy" ) ADD_SHORTCUT( "vlc" ) MODULE_INIT_STOP diff --git a/plugins/dummy/input_dummy.c b/plugins/dummy/input_dummy.c index 12428302d0..f0968cf39d 100644 --- a/plugins/dummy/input_dummy.c +++ b/plugins/dummy/input_dummy.c @@ -2,7 +2,7 @@ * input_dummy.c: dummy input plugin, to manage "vlc:***" special options ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: input_dummy.c,v 1.17 2002/03/02 03:51:23 sam Exp $ + * $Id: input_dummy.c,v 1.18 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -29,24 +29,18 @@ #include #include -#include - -#include "interface.h" -#include "intf_playlist.h" - -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" +#include +#include +#include /***************************************************************************** * Local prototypes *****************************************************************************/ -static int DummyInit ( struct input_thread_s * ); -static int DummyOpen ( struct input_thread_s * ); -static void DummyClose ( struct input_thread_s * ); -static void DummyEnd ( struct input_thread_s * ); -static int DummyDemux ( struct input_thread_s * ); +static int DummyInit ( input_thread_t * ); +static int DummyOpen ( input_thread_t * ); +static void DummyClose ( input_thread_t * ); +static void DummyEnd ( input_thread_t * ); +static int DummyDemux ( input_thread_t * ); /***************************************************************************** * access_sys_t: private input data @@ -113,7 +107,7 @@ static void DummyClose( input_thread_t * p_input ) /***************************************************************************** * DummyInit: initialize the target, ie. parse the command *****************************************************************************/ -static int DummyInit( struct input_thread_s *p_input ) +static int DummyInit( input_thread_t *p_input ) { char * psz_name = p_input->psz_name; int i_len = strlen( psz_name ); @@ -125,7 +119,7 @@ static int DummyInit( struct input_thread_s *p_input ) p_method = malloc( sizeof( struct demux_sys_s ) ); if( p_method == NULL ) { - intf_ErrMsg( "input: out of memory" ); + msg_Err( p_input, "out of memory" ); return( -1 ); } @@ -135,7 +129,7 @@ static int DummyInit( struct input_thread_s *p_input ) /* Check for a "vlc:nop" command */ if( i_len == 3 && !strncasecmp( psz_name, "nop", 3 ) ) { - intf_WarnMsg( 2, "input: command `nop'" ); + msg_Info( p_input, "command `nop'" ); p_method->i_command = COMMAND_NOP; return( 0 ); } @@ -143,7 +137,7 @@ static int DummyInit( struct input_thread_s *p_input ) /* Check for a "vlc:quit" command */ if( i_len == 4 && !strncasecmp( psz_name, "quit", 4 ) ) { - intf_WarnMsg( 2, "input: command `quit'" ); + msg_Info( p_input, "command `quit'" ); p_method->i_command = COMMAND_QUIT; return( 0 ); } @@ -151,7 +145,7 @@ static int DummyInit( struct input_thread_s *p_input ) /* Check for a "vlc:loop" command */ if( i_len == 4 && !strncasecmp( psz_name, "loop", 4 ) ) { - intf_WarnMsg( 2, "input: command `loop'" ); + msg_Info( p_input, "command `loop'" ); p_method->i_command = COMMAND_LOOP; return( 0 ); } @@ -160,13 +154,13 @@ static int DummyInit( struct input_thread_s *p_input ) if( i_len > 6 && !strncasecmp( psz_name, "pause:", 6 ) ) { i_arg = atoi( psz_name + 6 ); - intf_WarnMsg( 2, "input: command `pause %i'", i_arg ); + msg_Info( p_input, "command `pause %i'", i_arg ); p_method->i_command = COMMAND_PAUSE; p_method->expiration = mdate() + (mtime_t)i_arg * (mtime_t)1000000; return( 0 ); } - intf_ErrMsg( "input error: unknown command `%s'", psz_name ); + msg_Err( p_input, "unknown command `%s'", psz_name ); free( p_input->p_demux_data ); p_input->b_error = 1; @@ -176,7 +170,7 @@ static int DummyInit( struct input_thread_s *p_input ) /***************************************************************************** * DummyEnd: end the target, ie. do nothing *****************************************************************************/ -static void DummyEnd( struct input_thread_s *p_input ) +static void DummyEnd( input_thread_t *p_input ) { free( p_input->p_demux_data ); } @@ -184,19 +178,19 @@ static void DummyEnd( struct input_thread_s *p_input ) /***************************************************************************** * DummyDemux: do what the command says *****************************************************************************/ -static int DummyDemux( struct input_thread_s *p_input ) +static int DummyDemux( input_thread_t *p_input ) { struct demux_sys_s * p_method = p_input->p_demux_data; switch( p_method->i_command ) { case COMMAND_QUIT: - p_main->p_intf->b_die = 1; + p_input->p_vlc->b_die = 1; p_input->b_die = 1; break; case COMMAND_LOOP: - intf_PlaylistJumpto( p_main->p_playlist, -1 ); + //playlist_Jumpto( p_input->p_vlc->p_playlist, -1 ); p_input->b_eof = 1; break; diff --git a/plugins/dummy/intf_dummy.c b/plugins/dummy/intf_dummy.c index 19eff6a84f..f7bd63b762 100644 --- a/plugins/dummy/intf_dummy.c +++ b/plugins/dummy/intf_dummy.c @@ -2,7 +2,7 @@ * intf_dummy.c: dummy interface plugin ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: intf_dummy.c,v 1.17 2002/05/19 15:23:35 gbazin Exp $ + * $Id: intf_dummy.c,v 1.18 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,19 +27,17 @@ #include /* malloc(), free() */ #include -#include - -#include "interface.h" +#include +#include /***************************************************************************** * intf_sys_t: description and status of FB interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { /* Prevent malloc(0) */ int i_dummy; - -} intf_sys_t; +}; /***************************************************************************** * Local prototypes. @@ -98,11 +96,8 @@ static void intf_Close( intf_thread_t *p_intf ) *****************************************************************************/ static void intf_Run( intf_thread_t *p_intf ) { - while( !p_intf->b_die ) + while( !p_intf->p_vlc->b_die ) { - /* Manage core vlc functions through the callback */ - p_intf->pf_manage( p_intf ); - /* Wait a bit */ msleep( INTF_IDLE_SLEEP ); } diff --git a/plugins/dummy/null.c b/plugins/dummy/null.c index 1d30a8c171..51d0904004 100644 --- a/plugins/dummy/null.c +++ b/plugins/dummy/null.c @@ -2,7 +2,7 @@ * null.c : NULL module for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: null.c,v 1.6 2002/04/19 13:56:10 sam Exp $ + * $Id: null.c,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include +#include /***************************************************************************** * Build configuration tree. @@ -50,7 +50,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("the Null module that does nothing") ) - ADD_SHORTCUT( "null" ) MODULE_INIT_STOP diff --git a/plugins/dummy/vout_dummy.c b/plugins/dummy/vout_dummy.c index ac190b56a5..631862aa59 100644 --- a/plugins/dummy/vout_dummy.c +++ b/plugins/dummy/vout_dummy.c @@ -2,7 +2,7 @@ * vout_dummy.c: Dummy video output display method for testing purposes ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: vout_dummy.c,v 1.23 2002/05/20 19:02:22 sam Exp $ + * $Id: vout_dummy.c,v 1.24 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* free() */ #include /* strerror() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #define DUMMY_WIDTH 16 #define DUMMY_HEIGHT 16 @@ -43,25 +41,24 @@ * This structure is part of the video output thread descriptor. * It describes the dummy specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { /* Nothing needed here. Maybe stats ? */ /* Prevent malloc(0) */ int i_dummy; - -} vout_sys_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -89,7 +86,7 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -104,9 +101,9 @@ static int vout_Init( vout_thread_t *p_vout ) int i_index, i_chroma; char *psz_chroma; picture_t *p_pic; - boolean_t b_chroma = 0; + vlc_bool_t b_chroma = 0; - psz_chroma = config_GetPszVariable( "dummy-chroma" ); + psz_chroma = config_GetPsz( p_vout, "dummy-chroma" ); if( psz_chroma ) { if( strlen( psz_chroma ) >= 4 ) @@ -127,7 +124,7 @@ static int vout_Init( vout_thread_t *p_vout ) /* Initialize the output structure */ if( b_chroma ) { - intf_WarnMsg( 3, "vout info: forcing chroma 0x%.8x (%4.4s)", + msg_Dbg( p_vout, "forcing chroma 0x%.8x (%4.4s)", i_chroma, (char*)&i_chroma ); p_vout->output.i_chroma = i_chroma; p_vout->output.i_width = p_vout->render.i_width; @@ -166,9 +163,9 @@ static int vout_Init( vout_thread_t *p_vout ) break; } - vout_AllocatePicture( p_pic, p_vout->output.i_width, - p_vout->output.i_height, - p_vout->output.i_chroma ); + vout_AllocatePicture( p_vout, p_pic, p_vout->output.i_width, + p_vout->output.i_height, + p_vout->output.i_chroma ); if( p_pic->i_planes == 0 ) { diff --git a/plugins/dvd/dvd.c b/plugins/dvd/dvd.c index e60b3306b6..4dae73c1af 100644 --- a/plugins/dvd/dvd.c +++ b/plugins/dvd/dvd.c @@ -2,7 +2,7 @@ * dvd.c : DVD input module for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: dvd.c,v 1.31 2002/04/19 13:56:10 sam Exp $ + * $Id: dvd.c,v 1.32 2002/06/01 12:31:58 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include +#include #ifdef GOD_DAMN_DMCA # include @@ -75,7 +75,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("DVD input module, uses libdvdcss") ) ADD_CAPABILITY( ACCESS, 100 ) #endif - ADD_SHORTCUT( "dvd" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -120,8 +119,8 @@ static void ProbeLibDVDCSS( void ) p_libdvdcss = dlopen( *pp_file, RTLD_LAZY ); if( p_libdvdcss != NULL ) { - intf_WarnMsg( 2, "module: builtin module `dvd' found libdvdcss " - "in `%s'", *pp_file ); +//X intf_WarnMsg( 2, "module: builtin module `dvd' found libdvdcss " +//X "in `%s'", *pp_file ); break; } pp_file++; @@ -131,7 +130,7 @@ static void ProbeLibDVDCSS( void ) /* If libdvdcss.so was found, check that it's valid */ if( p_libdvdcss == NULL ) { - intf_ErrMsg( "dvd warning: libdvdcss.so.2 not present" ); +//X intf_ErrMsg( "dvd warning: libdvdcss.so.2 not present" ); } else { @@ -148,8 +147,8 @@ static void ProbeLibDVDCSS( void ) || ____dvdcss_read == NULL || ____dvdcss_readv == NULL || ____dvdcss_error == NULL ) { - intf_ErrMsg( "dvd warning: missing symbols in libdvdcss.so.2, " - "this shouldn't happen !" ); +//X intf_ErrMsg( "dvd warning: missing symbols in libdvdcss.so.2, " +//X "this shouldn't happen !" ); dlclose( p_libdvdcss ); p_libdvdcss = NULL; } @@ -159,10 +158,10 @@ static void ProbeLibDVDCSS( void ) * replacement functions. */ if( p_libdvdcss == NULL ) { - intf_ErrMsg( "dvd warning: no valid libdvdcss found, " - "I will only play unencrypted DVDs" ); - intf_ErrMsg( "dvd warning: get libdvdcss at " - "http://www.videolan.org/libdvdcss/" ); +//X intf_ErrMsg( "dvd warning: no valid libdvdcss found, " +//X "I will only play unencrypted DVDs" ); +//X intf_ErrMsg( "dvd warning: get libdvdcss at " +//X "http://www.videolan.org/libdvdcss/" ); ____dvdcss_open = dummy_dvdcss_open; ____dvdcss_close = dummy_dvdcss_close; diff --git a/plugins/dvd/dvd.h b/plugins/dvd/dvd.h index 00f73605c2..68e22c1219 100644 --- a/plugins/dvd/dvd.h +++ b/plugins/dvd/dvd.h @@ -2,7 +2,7 @@ * dvd.h: thread structure of the DVD plugin ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: dvd.h,v 1.4 2002/05/20 22:45:03 sam Exp $ + * $Id: dvd.h,v 1.5 2002/06/01 12:31:58 sam Exp $ * * Author: Stéphane Borel * @@ -45,7 +45,7 @@ typedef struct thread_dvd_data_s int i_chapter_nb; int i_chapter; - boolean_t b_new_chapter; + vlc_bool_t b_new_chapter; int i_angle_nb; int i_angle; diff --git a/plugins/dvd/dvd_access.c b/plugins/dvd/dvd_access.c index 6cbad86f89..78a80b67b7 100644 --- a/plugins/dvd/dvd_access.c +++ b/plugins/dvd/dvd_access.c @@ -8,7 +8,7 @@ * -dvd_udf to find files ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: dvd_access.c,v 1.19 2002/05/21 13:34:31 gbazin Exp $ + * $Id: dvd_access.c,v 1.20 2002/06/01 12:31:58 sam Exp $ * * Author: Stéphane Borel * @@ -34,7 +34,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -56,11 +57,6 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "dvd.h" #include "dvd_es.h" #include "dvd_seek.h" @@ -73,12 +69,12 @@ *****************************************************************************/ /* called from outside */ -static int DVDOpen ( struct input_thread_s * ); -static void DVDClose ( struct input_thread_s * ); -static int DVDSetArea ( struct input_thread_s *, struct input_area_s * ); -static int DVDSetProgram ( struct input_thread_s *, pgrm_descriptor_t * ); -static ssize_t DVDRead ( struct input_thread_s *, byte_t *, size_t ); -static void DVDSeek ( struct input_thread_s *, off_t ); +static int DVDOpen ( input_thread_t * ); +static void DVDClose ( input_thread_t * ); +static int DVDSetArea ( input_thread_t *, input_area_t * ); +static int DVDSetProgram ( input_thread_t *, pgrm_descriptor_t * ); +static ssize_t DVDRead ( input_thread_t *, byte_t *, size_t ); +static void DVDSeek ( input_thread_t *, off_t ); static char * DVDParse( input_thread_t * ); @@ -108,7 +104,7 @@ void _M( access_getfunctions)( function_list_t * p_function_list ) /***************************************************************************** * DVDOpen: open dvd *****************************************************************************/ -static int DVDOpen( struct input_thread_s *p_input ) +static int DVDOpen( input_thread_t *p_input ) { char * psz_device; thread_dvd_data_t * p_dvd; @@ -118,7 +114,7 @@ static int DVDOpen( struct input_thread_s *p_input ) p_dvd = malloc( sizeof(thread_dvd_data_t) ); if( p_dvd == NULL ) { - intf_ErrMsg( "dvd error: out of memory" ); + msg_Err( p_input, "out of memory" ); return -1; } p_input->p_access_data = (void *)p_dvd; @@ -145,14 +141,14 @@ static int DVDOpen( struct input_thread_s *p_input ) if( p_dvd->dvdhandle == NULL ) { - intf_ErrMsg( "dvd error: dvdcss can't open device" ); + msg_Err( p_input, "dvdcss cannot open device" ); free( p_dvd ); return -1; } if( dvdcss_seek( p_dvd->dvdhandle, 0, DVDCSS_NOFLAGS ) < 0 ) { - intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) ); + msg_Err( p_input, "%s", dvdcss_error( p_dvd->dvdhandle ) ); dvdcss_close( p_dvd->dvdhandle ); free( p_dvd ); return -1; @@ -161,7 +157,7 @@ static int DVDOpen( struct input_thread_s *p_input ) /* Ifo allocation & initialisation */ if( IfoCreate( p_dvd ) < 0 ) { - intf_ErrMsg( "dvd error: allcation error in ifo" ); + msg_Err( p_input, "allcation error in ifo" ); dvdcss_close( p_dvd->dvdhandle ); free( p_dvd ); return -1; @@ -169,7 +165,7 @@ static int DVDOpen( struct input_thread_s *p_input ) if( IfoInit( p_dvd->p_ifo ) < 0 ) { - intf_ErrMsg( "dvd error: fatal failure in ifo" ); + msg_Err( p_input, "fatal failure in ifo" ); IfoDestroy( p_dvd->p_ifo ); dvdcss_close( p_dvd->dvdhandle ); free( p_dvd ); @@ -189,7 +185,7 @@ static int DVDOpen( struct input_thread_s *p_input ) input_InitStream( p_input, sizeof( stream_ps_data_t ) ); #define title_inf p_dvd->p_ifo->vmg.title_inf - intf_WarnMsg( 3, "dvd info: number of titles: %d", title_inf.i_title_nb ); + msg_Dbg( p_input, "number of titles: %d", title_inf.i_title_nb ); #define area p_input->stream.pp_areas /* We start from 1 here since the default area 0 @@ -251,7 +247,7 @@ static int DVDOpen( struct input_thread_s *p_input ) /***************************************************************************** * DVDClose: close dvd *****************************************************************************/ -static void DVDClose( struct input_thread_s *p_input ) +static void DVDClose( input_thread_t *p_input ) { thread_dvd_data_t *p_dvd = (thread_dvd_data_t*)p_input->p_access_data; @@ -303,7 +299,7 @@ static int DVDSetProgram( input_thread_t * p_input, p_dvd->i_angle = p_program->i_number; } #undef title - intf_WarnMsg( 3, "dvd info: angle %d selected", p_dvd->i_angle ); + msg_Dbg( p_input, "angle %d selected", p_dvd->i_angle ); } return 0; @@ -395,7 +391,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) if( IfoTitleSet( p_dvd->p_ifo, p_dvd->i_title ) < 0 ) { - intf_ErrMsg( "dvd error: fatal error in vts ifo" ); + msg_Err( p_input, "fatal error in vts ifo" ); free( p_dvd ); return -1; } @@ -405,8 +401,8 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) p_dvd->i_title_id = vts.title_inf.p_title_start[i_vts_title-1].i_title_id; - intf_WarnMsg( 3, "dvd: title %d vts_title %d pgc %d", - p_dvd->i_title, i_vts_title, p_dvd->i_title_id ); + msg_Dbg( p_input, "title %d vts_title %d pgc %d", + p_dvd->i_title, i_vts_title, p_dvd->i_title_id ); /* title set offset XXX: convert to block values */ p_dvd->i_vts_start = @@ -435,7 +431,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) DVDCSS_SEEK_KEY ); if( i_first < 0 ) { - intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) ); + msg_Err( p_input, "%s", dvdcss_error( p_dvd->dvdhandle ) ); return -1; } @@ -457,8 +453,8 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) DVDSetProgram( p_input, p_input->stream.pp_programs[p_dvd->i_angle-1] ); - intf_WarnMsg( 3, "dvd info: title first %i, last %i, size %i", - i_first, i_last, i_last + 1 - p_dvd->i_vts_lb ); + msg_Dbg( p_input, "title first %i, last %i, size %i", + i_first, i_last, i_last + 1 - p_dvd->i_vts_lb ); IfoPrintTitle( p_dvd ); /* No PSM to read in DVD mode, we already have all information */ @@ -564,7 +560,7 @@ static ssize_t DVDRead( input_thread_t * p_input, } /* EOT */ - intf_WarnMsg( 4, "dvd info: new title" ); + msg_Dbg( p_input, "new title" ); p_dvd->i_title++; DVDSetArea( p_input, p_input->stream.pp_areas[p_dvd->i_title] ); } @@ -609,7 +605,7 @@ static void DVDSeek( input_thread_t * p_input, off_t i_off ) if( dvdcss_seek( p_dvd->dvdhandle, p_dvd->i_vts_start + p_dvd->i_vts_lb, DVDCSS_SEEK_MPEG ) < 0 ) { - intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) ); + msg_Err( p_input, "%s", dvdcss_error( p_dvd->dvdhandle ) ); p_input->b_error = 1; return; } @@ -619,8 +615,8 @@ static void DVDSeek( input_thread_t * p_input, off_t i_off ) p_input->stream.p_selected_area->i_tell = DVDTell; vlc_mutex_unlock( &p_input->stream.stream_lock ); - intf_WarnMsg( 4, "Program Cell: %d Cell: %d Chapter: %d tell %lld", - p_dvd->i_prg_cell, p_dvd->i_map_cell, p_dvd->i_chapter, DVDTell ); + msg_Dbg( p_input, "program cell: %d cell: %d chapter: %d tell %lld", + p_dvd->i_prg_cell, p_dvd->i_map_cell, p_dvd->i_chapter, DVDTell ); return; } @@ -636,7 +632,7 @@ static char * DVDParse( input_thread_t * p_input ) char * psz_device; char * psz_raw; char * psz_next; - boolean_t b_options = 0; + vlc_bool_t b_options = 0; int i_title = 1; int i_chapter = 1; int i_angle = 1; @@ -745,9 +741,8 @@ static char * DVDParse( input_thread_t * p_input ) /* check the raw device */ if( stat( psz_raw, &stat_info ) == -1 ) { - intf_WarnMsg( 3, "dvd warning: cannot stat() raw" - " device `%s' (%s)", - psz_raw, strerror(errno)); + msg_Warn( p_input, "cannot stat() raw device `%s' (%s)", + psz_raw, strerror(errno)); /* put back '@' */ *(psz_raw - 1) = '@'; psz_raw = ""; @@ -759,8 +754,8 @@ static char * DVDParse( input_thread_t * p_input ) #ifndef WIN32 if( !S_ISCHR(stat_info.st_mode) ) { - intf_WarnMsg( 3, "dvd warning: raw device %s is" - " not a valid char device", psz_raw ); + msg_Warn( p_input, "raw device %s is" + " not a valid char device", psz_raw ); /* put back '@' */ *(psz_raw - 1) = '@'; psz_raw = ""; @@ -790,31 +785,31 @@ static char * DVDParse( input_thread_t * p_input ) /* no device and no access specified: we probably don't want DVD */ return NULL; } - psz_device = config_GetPszVariable( "dvd" ); + psz_device = config_GetPsz( p_input, "dvd" ); } #ifndef WIN32 /* check block device */ if( stat( psz_device, &stat_info ) == -1 ) { - intf_ErrMsg( "dvd error: cannot stat() device `%s' (%s)", - psz_device, strerror(errno)); + msg_Err( p_input, "cannot stat() device `%s' (%s)", + psz_device, strerror(errno)); free( psz_device ); return NULL; } if( !S_ISBLK(stat_info.st_mode) && !S_ISCHR(stat_info.st_mode) ) { - intf_WarnMsg( 3, "input: DVD plugin discarded" - " (not a valid block device)" ); + msg_Warn( p_input, + "dvd module discarded (not a valid block device)" ); free( psz_device ); return NULL; } #endif - intf_WarnMsg( 2, "input: dvd=%s raw=%s title=%d chapter=%d angle=%d", - psz_device, psz_raw, p_dvd->i_title, - p_dvd->i_chapter, p_dvd->i_angle ); + msg_Dbg( p_input, "dvd=%s raw=%s title=%d chapter=%d angle=%d", + psz_device, psz_raw, p_dvd->i_title, + p_dvd->i_chapter, p_dvd->i_angle ); return psz_device; } diff --git a/plugins/dvd/dvd_demux.c b/plugins/dvd/dvd_demux.c index 2ebce7b32e..e8153ea9d4 100644 --- a/plugins/dvd/dvd_demux.c +++ b/plugins/dvd/dvd_demux.c @@ -1,7 +1,7 @@ /* dvd_demux.c: DVD demux functions. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: dvd_demux.c,v 1.6 2002/05/20 22:39:36 sam Exp $ + * $Id: dvd_demux.c,v 1.7 2002/06/01 12:31:58 sam Exp $ * * Author: Stéphane Borel * @@ -27,7 +27,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -43,11 +44,6 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - /* how many packets DVDDemux will read in each loop */ #define DVD_READ_ONCE 64 @@ -56,10 +52,10 @@ *****************************************************************************/ /* called from outside */ -static int DVDRewind ( struct input_thread_s * ); -static int DVDDemux ( struct input_thread_s * ); -static int DVDInit ( struct input_thread_s * ); -static void DVDEnd ( struct input_thread_s * ); +static int DVDRewind ( input_thread_t * ); +static int DVDDemux ( input_thread_t * ); +static int DVDInit ( input_thread_t * ); +static void DVDEnd ( input_thread_t * ); void DVDLaunchDecoders( input_thread_t * ); diff --git a/plugins/dvd/dvd_es.c b/plugins/dvd/dvd_es.c index e96fbd9236..f498c25fe8 100644 --- a/plugins/dvd/dvd_es.c +++ b/plugins/dvd/dvd_es.c @@ -1,7 +1,7 @@ /* dvd_es.c: functions to find and select ES ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: dvd_es.c,v 1.11 2002/05/18 14:03:13 gbazin Exp $ + * $Id: dvd_es.c,v 1.12 2002/06/01 12:31:58 sam Exp $ * * Author: Stéphane Borel * @@ -27,7 +27,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -49,11 +50,6 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "dvd.h" #include "dvd_ifo.h" #include "dvd_summary.h" @@ -163,12 +159,11 @@ void DVDReadAudio( input_thread_t * p_input ) break; case 0x06: /* DTS */ i_id = ( ( 0x88 + audio_status.i_position ) << 8 ) | 0xbd; - intf_ErrMsg( "dvd warning: DTS audio not handled yet" - "(0x%x)", i_id ); + msg_Err( p_input, "DTS audio not handled yet (0x%x)", i_id ); break; default: i_id = 0; - intf_ErrMsg( "dvd warning: unknown audio type %.2x", + msg_Err( p_input, "unknown audio type %.2x", vts.manager_inf.p_audio_attr[i-1].i_coding_mode ); } } @@ -260,23 +255,24 @@ void DVDLaunchDecoders( input_thread_t * p_input ) p_dvd = (thread_dvd_data_t*)(p_input->p_access_data); /* Select Video stream (always 0) */ - if( p_main->b_video ) + if( !config_GetInt( p_input, "novideo" ) ) { input_SelectES( p_input, p_input->stream.pp_es[0] ); } /* Select audio stream */ - if( p_main->b_audio && p_dvd->i_audio_nb > 0 ) + if( p_dvd->i_audio_nb > 0 && !config_GetInt( p_input, "noaudio" ) ) { /* For audio: first one if none or a not existing one specified */ - i_audio = config_GetIntVariable( "audio-channel" ); + i_audio = config_GetInt( p_input, "audio-channel" ); if( i_audio <= 0 || i_audio > p_dvd->i_audio_nb ) { - config_PutIntVariable( "audio-channel", 1 ); + config_PutInt( p_input, "audio-channel", 1 ); i_audio = 1; } - if( ( config_GetIntVariable( "audio-type" ) == REQUESTED_AC3 ) ) + if( ( config_GetInt( p_input, "audio-type" ) + == REQUESTED_AC3 ) ) { int i_ac3 = i_audio; while( ( p_input->stream.pp_es[i_ac3]->i_type != @@ -299,13 +295,13 @@ void DVDLaunchDecoders( input_thread_t * p_input ) } /* Select subtitle */ - if( p_main->b_video && p_dvd->i_spu_nb > 0 ) + if( p_dvd->i_spu_nb > 0 && !config_GetInt( p_input, "novideo" ) ) { /* for spu, default is none */ - i_spu = config_GetIntVariable( "spu-channel" ); + i_spu = config_GetInt( p_input, "spu-channel" ); if( i_spu < 0 || i_spu > p_dvd->i_spu_nb ) { - config_PutIntVariable( "spu-channel", 0 ); + config_PutInt( p_input, "spu-channel", 0 ); i_spu = 0; } if( i_spu > 0 ) diff --git a/plugins/dvd/dvd_ifo.c b/plugins/dvd/dvd_ifo.c index 9351286453..0c4f0532a7 100644 --- a/plugins/dvd/dvd_ifo.c +++ b/plugins/dvd/dvd_ifo.c @@ -2,7 +2,7 @@ * dvd_ifo.c: Functions for ifo parsing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: dvd_ifo.c,v 1.47 2002/05/20 22:45:03 sam Exp $ + * $Id: dvd_ifo.c,v 1.48 2002/06/01 12:31:59 sam Exp $ * * Authors: Stéphane Borel * German Tischler @@ -33,7 +33,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H # include @@ -91,7 +91,7 @@ int IfoCreate( thread_dvd_data_t * p_dvd ) p_dvd->p_ifo = malloc( sizeof(ifo_t) ); if( p_dvd->p_ifo == NULL ) { - intf_ErrMsg( "ifo error: unable to allocate memory. aborting" ); +//X intf_Err( p_input, "unable to allocate memory. aborting" ); return -1; } @@ -203,7 +203,7 @@ int IfoInit( ifo_t * p_ifo ) TITINF.p_attr = malloc( TITINF.i_title_nb *sizeof(title_attr_t) ); if( TITINF.p_attr == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoInit" ); +//X intf_Err( p_input, "out of memory in IfoInit" ); return -1; } @@ -257,7 +257,7 @@ int IfoInit( ifo_t * p_ifo ) * sizeof(parental_desc_t) ); if( PARINF.p_parental_desc == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoInit" ); +//X intf_Err( p_input, "out of memory in IfoInit" ); return -1; } @@ -275,7 +275,7 @@ int IfoInit( ifo_t * p_ifo ) * sizeof(parental_mask_t) ); if( PARINF.p_parental_mask == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoInit" ); +//X intf_Err( p_input, "out of memory in IfoInit" ); return -1; } @@ -292,7 +292,7 @@ int IfoInit( ifo_t * p_ifo ) if( PARINF.p_parental_mask[i].ppi_mask[j] == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoInit" ); +//X intf_Err( p_input, "out of memory in IfoInit" ); return -1; } @@ -328,7 +328,7 @@ int IfoInit( ifo_t * p_ifo ) malloc( VTSINF.i_vts_nb * sizeof(u32) ); if( VTSINF.pi_vts_attr_start_byte == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoInit" ); +//X intf_Err( p_input, "out of memory in IfoInit" ); return -1; } @@ -341,7 +341,7 @@ int IfoInit( ifo_t * p_ifo ) VTSINF.p_vts_attr = malloc( VTSINF.i_vts_nb * sizeof(vts_attr_t) ); if( VTSINF.p_vts_attr == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoInit" ); +//X intf_Err( p_input, "out of memory in IfoInit" ); return -1; } @@ -430,7 +430,7 @@ int IfoInit( ifo_t * p_ifo ) p_ifo->vts.b_initialized = 0; - intf_WarnMsg( 2, "ifo info: vmg initialized" ); +//X intf_Warn( p_input, 2, "vmg initialized" ); return 0; } @@ -604,7 +604,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) TITINF.pi_start_byte = malloc( TITINF.i_title_nb * sizeof(u32) ); if( TITINF.pi_start_byte == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" ); +//X intf_Err( p_input, "out of memory in IfoTitleSet" ); return -1; } @@ -618,7 +618,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) * sizeof(title_start_t) ); if( TITINF.p_title_start == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" ); +//X intf_Err( p_input, "out of memory in IfoTitleSet" ); return -1; } @@ -680,7 +680,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) TIMINF.pi_start_byte = malloc( TIMINF.i_nb * sizeof(u32) ); if( TIMINF.pi_start_byte == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" ); +//X intf_Err( p_input, "out of memory in IfoTitleSet" ); return -1; } @@ -692,7 +692,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) TIMINF.p_time_map = malloc( TIMINF.i_nb * sizeof(time_map_t) ); if( TIMINF.p_time_map == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" ); +//X intf_Err( p_input, "out of memory in IfoTitleSet" ); return -1; } @@ -708,7 +708,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) malloc( TIMINF.p_time_map[i].i_entry_nb * sizeof(u32) ); if( TIMINF.p_time_map[i].pi_sector == NULL ) { - intf_ErrMsg( "ifo error: out of memory in IfoTitleSet" ); +//X msg_Err( p_input, "out of memory in IfoTitleSet" ); return -1; } @@ -751,8 +751,8 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) } #undef MGINF - intf_WarnMsg( 4, "ifo info: vts %d initialized", - p_ifo->vmg.title_inf.p_attr[i_title-1].i_title_set_num ); +//X intf_Warn( p_input, 4, "vts %d initialized", +//X p_ifo->vmg.title_inf.p_attr[i_title-1].i_title_set_num ); p_ifo->vts.b_initialized = 1; @@ -974,7 +974,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes if( p_title->command.p_pre_command == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadTitle" ); +//X intf_Err( p_input, "out of memory in ReadTitle" ); return -1; } @@ -998,7 +998,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes if( p_title->command.p_post_command == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadTitle" ); +//X intf_Err( p_input, "out of memory in ReadTitle" ); return -1; } @@ -1022,7 +1022,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes if( p_title->command.p_cell_command == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadTitle" ); +//X intf_Err( p_input, "out of memory in ReadTitle" ); return -1; } @@ -1050,7 +1050,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes if( p_title->chapter_map.pi_start_cell == NULL ) { - intf_ErrMsg( "ifo error: out of memory in Read Title" ); +//X intf_Err( p_input, "out of memory in Read Title" ); return -1; } @@ -1074,7 +1074,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes if( p_title->p_cell_play == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadTitle" ); +//X intf_Err( p_input, "out of memory in ReadTitle" ); return -1; } @@ -1105,7 +1105,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes if( p_title->p_cell_pos == NULL ) { - intf_ErrMsg( "ifo error: out of memory" ); +//X intf_Err( p_input, "out of memory" ); return -1; } @@ -1186,7 +1186,7 @@ static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf, malloc( p_unit_inf->i_title_nb * sizeof(unit_title_t) ); if( p_unit_inf->p_title == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadUnit" ); +//X intf_Err( p_input, "out of memory in ReadUnit" ); return -1; } @@ -1257,7 +1257,7 @@ static int ReadTitleUnit( ifo_t * p_ifo, title_unit_t * p_title_unit, p_title_unit->p_unit = malloc( p_title_unit->i_unit_nb * sizeof(unit_t) ); if( p_title_unit->p_unit == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadTitleUnit" ); +//X intf_Err( p_input, "out of memory in ReadTitleUnit" ); return -1; } @@ -1277,7 +1277,7 @@ static int ReadTitleUnit( ifo_t * p_ifo, title_unit_t * p_title_unit, malloc( p_title_unit->i_unit_nb * sizeof(unit_inf_t) ); if( p_title_unit->p_unit_inf == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadTitleUnit" ); +//X intf_Err( p_input, "out of memory in ReadTitleUnit" ); return -1; } @@ -1337,7 +1337,7 @@ static int ReadCellInf( ifo_t * p_ifo, cell_inf_t * p_cell_inf, int i_block ) malloc( p_cell_inf->i_cell_nb *sizeof(cell_map_t) ); if( p_cell_inf->p_cell_map == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadCellInf" ); +//X intf_Err( p_input, "out of memory in ReadCellInf" ); return -1; } @@ -1387,7 +1387,7 @@ static int ReadVobuMap( ifo_t * p_ifo, vobu_map_t * p_vobu_map, int i_block ) p_vobu_map->pi_vobu_start_sector = malloc( i_max * sizeof(u32) ); if( p_vobu_map->pi_vobu_start_sector == NULL ) { - intf_ErrMsg( "ifo error: out of memory in ReadVobuMap" ); +//X intf_Err( p_input, "out of memory in ReadVobuMap" ); return -1; } @@ -2105,7 +2105,7 @@ static void ReadBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, { if( i_nb > DVD_LB_SIZE ) { - intf_ErrMsg( "ifo error: excessive ReadBytes call (%i)", i_nb ); +//X intf_Err( p_input, "excessive ReadBytes call (%i)", i_nb ); } if( *pp_tmp + i_nb >= p_buf + DVD_LB_SIZE ) @@ -2131,7 +2131,7 @@ static void DumpBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, int i_nb ) { if( i_nb > DVD_LB_SIZE ) { - intf_ErrMsg( "ifo error: excessive DumpBytes call (%i)", i_nb ); +//X intf_Err( p_input, "excessive DumpBytes call (%i)", i_nb ); } *pp_tmp += i_nb; diff --git a/plugins/dvd/dvd_ifo.h b/plugins/dvd/dvd_ifo.h index 1f402b2231..0fbf272113 100644 --- a/plugins/dvd/dvd_ifo.h +++ b/plugins/dvd/dvd_ifo.h @@ -2,7 +2,7 @@ * dvd_ifo.h: Structures for ifo parsing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: dvd_ifo.h,v 1.19 2002/05/20 22:45:03 sam Exp $ + * $Id: dvd_ifo.h,v 1.20 2002/06/01 12:31:59 sam Exp $ * * Author: Stéphane Borel * @@ -520,7 +520,7 @@ typedef struct time_inf_s */ typedef struct vts_s { - boolean_t b_initialized; + vlc_bool_t b_initialized; int i_pos; vts_manager_t manager_inf; vts_title_t title_inf; @@ -541,7 +541,7 @@ typedef struct ifo_s dvdcss_handle dvdhandle; /* File descriptor for the device */ int i_start; /* Offset to video_ts.ifo on the device */ int i_pos; /* Position of stream pointer */ - boolean_t b_error; /* Error Management */ + vlc_bool_t b_error; /* Error Management */ vmg_t vmg; /* Structure described in video_ts */ vts_t vts; /* Vts ifo for current title set */ diff --git a/plugins/dvd/dvd_seek.c b/plugins/dvd/dvd_seek.c index 6816ac9395..37a80f6e69 100644 --- a/plugins/dvd/dvd_seek.c +++ b/plugins/dvd/dvd_seek.c @@ -1,7 +1,7 @@ /* dvd_seek.c: functions to navigate through DVD. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: dvd_seek.c,v 1.10 2002/05/22 21:42:47 sam Exp $ + * $Id: dvd_seek.c,v 1.11 2002/06/01 12:31:59 sam Exp $ * * Author: Stéphane Borel * @@ -27,7 +27,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -49,11 +50,6 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "dvd.h" #include "dvd_seek.h" #include "dvd_ifo.h" @@ -227,8 +223,8 @@ int LbMaxOnce( thread_dvd_data_t * p_dvd ) p_dvd->i_vts_start + p_dvd->i_vts_lb, DVDCSS_SEEK_MPEG ) < 0 ) { - intf_ErrMsg( "dvd error: %s", - dvdcss_error( p_dvd->dvdhandle ) ); +//X intf_ErrMsg( "dvd error: %s", +//X dvdcss_error( p_dvd->dvdhandle ) ); return 0; } @@ -312,12 +308,12 @@ int DVDSetChapter( thread_dvd_data_t * p_dvd, int i_chapter ) p_dvd->i_vts_start + p_dvd->i_vts_lb, DVDCSS_SEEK_MPEG ) < 0 ) { - intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) ); +//X intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) ); return -1; } - intf_WarnMsg( 4, "dvd info: chapter %d prg_cell %d map_cell %d", - i_chapter, p_dvd->i_prg_cell, p_dvd->i_map_cell ); +//X intf_WarnMsg( 4, "dvd info: chapter %d prg_cell %d map_cell %d", +//X i_chapter, p_dvd->i_prg_cell, p_dvd->i_map_cell ); } return i_chapter; diff --git a/plugins/dvd/dvd_summary.c b/plugins/dvd/dvd_summary.c index 95f514b034..45655facee 100644 --- a/plugins/dvd/dvd_summary.c +++ b/plugins/dvd/dvd_summary.c @@ -3,7 +3,7 @@ * found in .ifo. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: dvd_summary.c,v 1.19 2002/05/15 23:53:45 sam Exp $ + * $Id: dvd_summary.c,v 1.20 2002/06/01 12:31:59 sam Exp $ * * Author: Stéphane Borel * @@ -28,7 +28,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H # include @@ -66,11 +66,11 @@ ****************************************************************************/ void IfoPrintTitle( thread_dvd_data_t * p_dvd ) { - intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s", - p_dvd->i_title, p_dvd->i_chapter_nb, - (p_dvd->i_chapter_nb == 1) ? "" : "s", - p_dvd->i_angle_nb, - (p_dvd->i_angle_nb == 1) ? "" : "s" ); +//X intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s", +//X p_dvd->i_title, p_dvd->i_chapter_nb, +//X (p_dvd->i_chapter_nb == 1) ? "" : "s", +//X p_dvd->i_angle_nb, +//X (p_dvd->i_angle_nb == 1) ? "" : "s" ); } /**************************************************************************** @@ -79,39 +79,39 @@ void IfoPrintTitle( thread_dvd_data_t * p_dvd ) #define video p_dvd->p_ifo->vts.manager_inf.video_attr void IfoPrintVideo( thread_dvd_data_t * p_dvd ) { - char* psz_perm_displ[4] = - { - "pan-scan & letterboxed", - "pan-scan", - "letterboxed", - "not specified" - }; - char* psz_source_res[4] = - { - "720x480 ntsc or 720x576 pal", - "704x480 ntsc or 704x576 pal", - "352x480 ntsc or 352x576 pal", - "352x240 ntsc or 352x288 pal" - }; - - intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s", - video.i_compression + 1, - video.i_system ? "pal 625 @50" : "ntsc 525 @60", - video.i_ratio ? (video.i_ratio == 3) ? "16:9" - : "unknown" - : "4:3" ); - - intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s", - psz_perm_displ[video.i_perm_displ], - video.i_line21_1 ? "line21-1 data in GOP" - : "no line21-1 data", - video.i_line21_2 ? "line21-2 data in GOP" - : "no line21-2 data" ); - - intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode", - psz_source_res[video.i_source_res], - video.i_letterboxed ? "" : "not ", - video.i_mode ? "film (625/50 only)" : "camera" ); +//X char* psz_perm_displ[4] = +//X { +//X "pan-scan & letterboxed", +//X "pan-scan", +//X "letterboxed", +//X "not specified" +//X }; +//X char* psz_source_res[4] = +//X { +//X "720x480 ntsc or 720x576 pal", +//X "704x480 ntsc or 704x576 pal", +//X "352x480 ntsc or 352x576 pal", +//X "352x240 ntsc or 352x288 pal" +//X }; + +//X intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s", +//X video.i_compression + 1, +//X video.i_system ? "pal 625 @50" : "ntsc 525 @60", +//X video.i_ratio ? (video.i_ratio == 3) ? "16:9" +//X : "unknown" +//X : "4:3" ); + +//X intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s", +//X psz_perm_displ[video.i_perm_displ], +//X video.i_line21_1 ? "line21-1 data in GOP" +//X : "no line21-1 data", +//X video.i_line21_2 ? "line21-2 data in GOP" +//X : "no line21-2 data" ); + +//X intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode", +//X psz_source_res[video.i_source_res], +//X video.i_letterboxed ? "" : "not ", +//X video.i_mode ? "film (625/50 only)" : "camera" ); } #undef video @@ -125,29 +125,29 @@ void IfoPrintAudio( thread_dvd_data_t * p_dvd, int i ) { if( audio_status.i_available ) { - char* ppsz_mode[8] = - { "AC3", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" }; - char* ppsz_appl_mode[4] = - { "no application specified", "karaoke", "surround sound", "" }; - char* ppsz_quant[4] = - { "16 bits", "20 bits", "24 bits", "drc" }; +//X char* ppsz_mode[8] = +//X { "AC3", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" }; +//X char* ppsz_appl_mode[4] = +//X { "no application specified", "karaoke", "surround sound", "" }; +//X char* ppsz_quant[4] = +//X { "16 bits", "20 bits", "24 bits", "drc" }; - intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, " - "%d%s channel%s, %dHz, %s", i, - DecodeLanguage( audio.i_lang_code ), - ppsz_mode[audio.i_coding_mode & 0x7], - audio.i_num_channels + 1, - audio.i_multichannel_extension ? " ext." : "", - audio.i_num_channels ? "s" : "", - audio.i_sample_freq ? 96000 : 48000, - ppsz_appl_mode[audio.i_appl_mode & 0x3] ); - - intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x", - (audio.i_caption == 1) ? "normal caption" - : (audio.i_caption == 3) ? "directors comments" - : "unknown caption", - ppsz_quant[audio.i_quantization & 0x3], - audio_status.i_position ); +//X intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, " +//X "%d%s channel%s, %dHz, %s", i, +//X DecodeLanguage( audio.i_lang_code ), +//X ppsz_mode[audio.i_coding_mode & 0x7], +//X audio.i_num_channels + 1, +//X audio.i_multichannel_extension ? " ext." : "", +//X audio.i_num_channels ? "s" : "", +//X audio.i_sample_freq ? 96000 : 48000, +//X ppsz_appl_mode[audio.i_appl_mode & 0x3] ); + +//X intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x", +//X (audio.i_caption == 1) ? "normal caption" +//X : (audio.i_caption == 3) ? "directors comments" +//X : "unknown caption", +//X ppsz_quant[audio.i_quantization & 0x3], +//X audio_status.i_position ); } } #undef audio_status @@ -164,14 +164,14 @@ void IfoPrintSpu( thread_dvd_data_t * p_dvd, int i ) { if( spu_status.i_available ) { - intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d " - "prefix %x, modes [%s%s%s%s ]", i, - DecodeLanguage( spu.i_lang_code ), - spu.i_caption, spu.i_prefix, - spu_status.i_position_43 ? " 4:3" : "", - spu_status.i_position_wide ? " wide" : "", - spu_status.i_position_letter ? " letter" : "", - spu_status.i_position_pan ? " pan" : "" ); +//X intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d " +//X "prefix %x, modes [%s%s%s%s ]", i, +//X DecodeLanguage( spu.i_lang_code ), +//X spu.i_caption, spu.i_prefix, +//X spu_status.i_position_43 ? " 4:3" : "", +//X spu_status.i_position_wide ? " wide" : "", +//X spu_status.i_position_letter ? " letter" : "", +//X spu_status.i_position_pan ? " pan" : "" ); } } #undef spu_status diff --git a/plugins/dvd/dvd_udf.c b/plugins/dvd/dvd_udf.c index 85967de440..3ff82f644d 100644 --- a/plugins/dvd/dvd_udf.c +++ b/plugins/dvd/dvd_udf.c @@ -5,7 +5,7 @@ * contains the basic udf handling functions ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: dvd_udf.c,v 1.20 2002/04/03 06:23:08 sam Exp $ + * $Id: dvd_udf.c,v 1.21 2002/06/01 12:31:59 sam Exp $ * * Author: Stéphane Borel * @@ -35,7 +35,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H # include @@ -62,7 +62,7 @@ typedef struct partition_s { - boolean_t b_valid; + vlc_bool_t b_valid; u8 pi_volume_desc[128]; u16 i_flags; u16 i_number; @@ -98,7 +98,7 @@ static int UDFReadLB( dvdcss_handle dvdhandle, off_t i_lba, { if( dvdcss_seek( dvdhandle, i_lba, DVDCSS_NOFLAGS ) < 0 ) { - intf_ErrMsg( "dvd error: block %i not found", i_lba ); +//X intf_ErrMsg( "dvd error: block %i not found", i_lba ); return 0; } @@ -262,7 +262,7 @@ static int UDFLogVolume(u8 * pi_data, char * p_volume_descriptor ) if( i_lb_size != DVD_LB_SIZE ) { - intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size ); +//X intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size ); return 1; } @@ -506,8 +506,8 @@ static int UDFFindPartition( int i_part_nb, struct partition_s *p_partition ) u32 i_MVDS_location; u32 i_MVDS_length; u32 i_last_sector; - boolean_t b_term; - boolean_t b_vol_valid; + vlc_bool_t b_term; + vlc_bool_t b_vol_valid; int i; /* Find Anchor */ @@ -664,7 +664,7 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path ) i_partition = 0; if( !UDFFindPartition( i_partition, &partition ) ) { - intf_ErrMsg( "dvd error: partition 0 not found" ); +//X intf_ErrMsg( "dvd error: partition 0 not found" ); return 0; } @@ -693,26 +693,26 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path ) if( i_tag_id != 256 ) { - intf_ErrMsg( "dvd error: bad UDF descriptor" ); +//X intf_ErrMsg( "dvd error: bad UDF descriptor" ); return 0; } if( root_icb.i_partition != i_partition ) { - intf_ErrMsg( "dvd error: bad UDF partition" ); +//X intf_ErrMsg( "dvd error: bad UDF partition" ); return 0; } /* Find root dir */ if( !UDFMapICB( root_icb, &i_file_type, &file, partition ) ) { - intf_ErrMsg( "dvd error: can't find root dir" ); +//X intf_ErrMsg( "dvd error: can't find root dir" ); return 0; } /* root dir should be dir */ if( i_file_type != 4 ) { - intf_ErrMsg( "dvd error: root dir error" ); +//X intf_ErrMsg( "dvd error: root dir error" ); return 0; } @@ -722,13 +722,13 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path ) { if( !UDFScanDir( file, psz_token, &icb, partition ) ) { - intf_ErrMsg( "dvd error: scan dir error" ); +//X intf_ErrMsg( "dvd error: scan dir error" ); return 0; } if( !UDFMapICB ( icb, &i_file_type, &file, partition ) ) { - intf_ErrMsg( "dvd error: ICB error" ); +//X intf_ErrMsg( "dvd error: ICB error" ); return 0; } diff --git a/plugins/dvdread/dvdread.c b/plugins/dvdread/dvdread.c index 235315f8ce..d78c48cc45 100644 --- a/plugins/dvdread/dvdread.c +++ b/plugins/dvdread/dvdread.c @@ -2,7 +2,7 @@ * dvdread.c : DvdRead input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: dvdread.c,v 1.15 2002/04/19 13:56:10 sam Exp $ + * $Id: dvdread.c,v 1.16 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -46,7 +46,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("DVDRead input module") ) ADD_CAPABILITY( DEMUX, 0 ) ADD_CAPABILITY( ACCESS, 110 ) - ADD_SHORTCUT( "dvdread" ) ADD_SHORTCUT( "dvd" ) MODULE_INIT_STOP diff --git a/plugins/dvdread/input_dvdread.c b/plugins/dvdread/input_dvdread.c index 5d7012f498..31a24e5b3b 100644 --- a/plugins/dvdread/input_dvdread.c +++ b/plugins/dvdread/input_dvdread.c @@ -6,7 +6,7 @@ * It depends on: libdvdread for ifo files and block reading. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: input_dvdread.c,v 1.38 2002/05/14 19:33:54 bozo Exp $ + * $Id: input_dvdread.c,v 1.39 2002/06/01 12:31:59 sam Exp $ * * Author: Stéphane Borel * @@ -34,7 +34,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -67,11 +68,6 @@ #include #include -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "input_dvdread.h" #include "iso_lang.h" @@ -83,17 +79,17 @@ * Local prototypes *****************************************************************************/ /* called from outside */ -static int DvdReadInit ( struct input_thread_s * ); -static void DvdReadEnd ( struct input_thread_s * ); -static int DvdReadDemux ( struct input_thread_s * ); -static int DvdReadRewind ( struct input_thread_s * ); - -static int DvdReadOpen ( struct input_thread_s * ); -static void DvdReadClose ( struct input_thread_s * ); -static int DvdReadSetArea ( struct input_thread_s *, struct input_area_s * ); -static int DvdReadSetProgram( struct input_thread_s *, pgrm_descriptor_t * ); -static int DvdReadRead ( struct input_thread_s *, byte_t *, size_t ); -static void DvdReadSeek ( struct input_thread_s *, off_t ); +static int DvdReadInit ( input_thread_t * ); +static void DvdReadEnd ( input_thread_t * ); +static int DvdReadDemux ( input_thread_t * ); +static int DvdReadRewind ( input_thread_t * ); + +static int DvdReadOpen ( input_thread_t * ); +static void DvdReadClose ( input_thread_t * ); +static int DvdReadSetArea ( input_thread_t *, input_area_t * ); +static int DvdReadSetProgram ( input_thread_t *, pgrm_descriptor_t * ); +static int DvdReadRead ( input_thread_t *, byte_t *, size_t ); +static void DvdReadSeek ( input_thread_t *, off_t ); /* called only from here */ static void DvdReadLauchDecoders( input_thread_t * p_input ); @@ -238,7 +234,7 @@ static int DvdReadRewind( input_thread_t * p_input ) /***************************************************************************** * DvdReadOpen: open libdvdread *****************************************************************************/ -static int DvdReadOpen( struct input_thread_s *p_input ) +static int DvdReadOpen( input_thread_t *p_input ) { char * psz_orig; char * psz_parser; @@ -293,26 +289,25 @@ static int DvdReadOpen( struct input_thread_s *p_input ) free( psz_orig ); return -1; } - psz_source = config_GetPszVariable( "dvd" ); + psz_source = config_GetPsz( p_input, "dvd" ); } if( stat( psz_source, &stat_info ) == -1 ) { - intf_ErrMsg( "input error: cannot stat() source `%s' (%s)", - psz_source, strerror(errno)); + msg_Err( p_input, "cannot stat() source `%s' (%s)", + psz_source, strerror(errno)); return( -1 ); } if( !S_ISBLK(stat_info.st_mode) && !S_ISCHR(stat_info.st_mode) && !S_ISDIR(stat_info.st_mode) ) { - intf_WarnMsg( 3, "input : DvdRead plugin discarded" - " (not a valid source)" ); + msg_Warn( p_input, "dvdread module discarded (not a valid source)" ); return -1; } - intf_WarnMsg( 2, "input: dvdroot=%s title=%d chapter=%d angle=%d", - psz_source, i_title, i_chapter, i_angle ); + msg_Dbg( p_input, "dvdroot=%s title=%d chapter=%d angle=%d", + psz_source, i_title, i_chapter, i_angle ); p_dvdread = DVDOpen( psz_source ); @@ -324,7 +319,7 @@ static int DvdReadOpen( struct input_thread_s *p_input ) if( ! p_dvdread ) { - intf_ErrMsg( "dvdread error: libdvdcss can't open source" ); + msg_Err( p_input, "libdvdcss cannot open source" ); return -1; } @@ -334,7 +329,7 @@ static int DvdReadOpen( struct input_thread_s *p_input ) p_dvd = malloc( sizeof(thread_dvd_data_t) ); if( p_dvd == NULL ) { - intf_ErrMsg( "dvdread error: out of memory" ); + msg_Err( p_input, "out of memory" ); return -1; } @@ -348,11 +343,11 @@ static int DvdReadOpen( struct input_thread_s *p_input ) /* Ifo allocation & initialisation */ if( ! ( p_dvd->p_vmg_file = ifoOpen( p_dvd->p_dvdread, 0 ) ) ) { - intf_ErrMsg( "dvdread error: can't open VMG info" ); + msg_Err( p_input, "cannot open VMG info" ); free( p_dvd ); return -1; } - intf_WarnMsg( 2, "dvdread info: VMG opened" ); + msg_Dbg( p_input, "VMG opened" ); /* Set stream and area data */ vlc_mutex_lock( &p_input->stream.stream_lock ); @@ -373,7 +368,7 @@ static int DvdReadOpen( struct input_thread_s *p_input ) p_input->stream.i_method = INPUT_METHOD_DVD; #define tt_srpt p_dvd->p_vmg_file->tt_srpt - intf_WarnMsg( 2, "dvdread info: number of titles: %d", tt_srpt->nr_of_srpts ); + msg_Dbg( p_input, "number of titles: %d", tt_srpt->nr_of_srpts ); #define area p_input->stream.pp_areas /* We start from 1 here since the default area 0 @@ -427,7 +422,7 @@ static int DvdReadOpen( struct input_thread_s *p_input ) /***************************************************************************** * DvdReadClose: close libdvdread *****************************************************************************/ -static void DvdReadClose( struct input_thread_s *p_input ) +static void DvdReadClose( input_thread_t *p_input ) { thread_dvd_data_t * p_dvd; @@ -462,7 +457,7 @@ static int DvdReadSetProgram( input_thread_t * p_input, p_program->i_number = p_dvd->i_angle; p_input->stream.p_selected_program = p_program; - intf_WarnMsg( 3, "dvd info: angle %d selected", p_dvd->i_angle ); + msg_Dbg( p_input, "angle %d selected", p_dvd->i_angle ); } return 0; @@ -517,7 +512,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) /* Change the default area */ p_input->stream.p_selected_area = p_area; - intf_WarnMsg( 12, "dvdread: open VTS %d, for title %d", + msg_Dbg( p_input, "open VTS %d, for title %d", p_vmg->tt_srpt->title[ p_area->i_id - 1 ].title_set_nr, p_area->i_id ); @@ -525,7 +520,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) if( ! ( p_vts = ifoOpen( p_dvd->p_dvdread, p_vmg->tt_srpt->title[ p_area->i_id - 1 ].title_set_nr ) ) ) { - intf_ErrMsg( "dvdread error: fatal error in vts ifo" ); + msg_Err( p_input, "fatal error in vts ifo" ); ifoClose( p_vmg ); DVDClose( p_dvd->p_dvdread ); return -1; @@ -545,8 +540,8 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) p_area->i_start = LB2OFF( p_dvd->p_cur_pgc->cell_playback[ i_cell ].first_sector ); - intf_WarnMsg( 3, "dvdread: start %d vts_title %d pgc %d pgn %d", - p_area->i_id, p_dvd->i_ttn, pgc_id, pgn ); + msg_Dbg( p_input, "start %d vts_title %d pgc %d pgn %d", + p_area->i_id, p_dvd->i_ttn, pgc_id, pgn ); /* * Find title end @@ -556,8 +551,8 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) p_dvd->i_end_block = p_pgc->cell_playback[ i_cell ].last_sector; p_area->i_size = LB2OFF( p_dvd->i_end_block )- p_area->i_start; - intf_WarnMsg( 12, "dvdread: start %lld size %lld end %d", - p_area->i_start , p_area->i_size, p_dvd->i_end_block ); + msg_Dbg( p_input, "start %lld size %lld end %d", + p_area->i_start , p_area->i_size, p_dvd->i_end_block ); /* * Set properties for current chapter @@ -596,8 +591,8 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) p_vmg->tt_srpt->title[ p_area->i_id - 1 ].title_set_nr, DVD_READ_TITLE_VOBS ) ) ) { - intf_ErrMsg( "dvdread error: can't open title (VTS_%02d_1.VOB)", - p_vmg->tt_srpt->title[p_area->i_id-1].title_set_nr ); + msg_Err( p_input, "cannot open title (VTS_%02d_1.VOB)", + p_vmg->tt_srpt->title[p_area->i_id-1].title_set_nr ); ifoClose( p_vts ); ifoClose( p_vmg ); DVDClose( p_dvd->p_dvdread ); @@ -673,7 +668,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) i_audio_nb++; i_position = ( audio_control & 0x7F00 ) >> 8; - intf_WarnMsg( 12, "dvd audio position %d", i_position ); + msg_Dbg( p_input, "audio position %d", i_position ); switch( p_vts->vtsi_mat->vts_audio_attr[i-1].audio_format ) { case 0x00: /* AC3 */ @@ -716,13 +711,13 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) break; case 0x06: /* DTS */ i_id = ( ( 0x88 + i_position ) << 8 ) | 0xbd; - intf_ErrMsg( "dvd warning: DTS audio not handled yet" - "(0x%x)", i_id ); + msg_Err( p_input, "DTS audio not handled yet" + "(0x%x)", i_id ); break; default: i_id = 0; - intf_ErrMsg( "dvd warning: unknown audio type %.2x", - p_vts->vtsi_mat->vts_audio_attr[i-1].audio_format ); + msg_Err( p_input, "unknown audio type %.2x", + p_vts->vtsi_mat->vts_audio_attr[i-1].audio_format ); } } } @@ -738,7 +733,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) u16 i_id; // IfoPrintSpu( p_dvd, i ); - intf_WarnMsg( 12, "dvd spu %d 0x%02x", i, spu_control ); + msg_Dbg( p_input, "spu %d 0x%02x", i, spu_control ); if( spu_control & 0x80000000 ) { @@ -848,7 +843,7 @@ static int DvdReadRead( input_thread_t * p_input, int i_blocks; int i_read; int i_read_total; - boolean_t b_eot = 0; + vlc_bool_t b_eot = 0; p_dvd = (thread_dvd_data_t *)p_input->p_access_data; p_buf = p_buffer; @@ -873,8 +868,8 @@ static int DvdReadRead( input_thread_t * p_input, if( ( i_read = DVDReadBlocks( p_dvd->p_title, p_dvd->i_next_vobu, 1, p_buf ) ) != 1 ) { - intf_ErrMsg( "dvdread error: read failed for block %d", - p_dvd->i_next_vobu ); + msg_Err( p_input, "read failed for block %d", + p_dvd->i_next_vobu ); return -1; } @@ -917,8 +912,8 @@ static int DvdReadRead( input_thread_t * p_input, i_blocks_once, p_buf ); if( i_read != i_blocks_once ) { - intf_ErrMsg( "dvdread error: read failed for %d/%d blocks at 0x%02x", - i_read, i_blocks_once, p_dvd->i_cur_block ); + msg_Err( p_input, "read failed for %d/%d blocks at 0x%02x", + i_read, i_blocks_once, p_dvd->i_cur_block ); return -1; } @@ -929,7 +924,7 @@ static int DvdReadRead( input_thread_t * p_input, } /* - intf_WarnMsg( 12, "dvdread i_blocks: %d len: %d current: 0x%02x", i_read, p_dvd->i_pack_len, p_dvd->i_cur_block ); + msg_Dbg( p_input, "i_blocks: %d len: %d current: 0x%02x", i_read, p_dvd->i_pack_len, p_dvd->i_cur_block ); */ vlc_mutex_lock( &p_input->stream.stream_lock ); @@ -958,7 +953,7 @@ static int DvdReadRead( input_thread_t * p_input, } /* EOT */ - intf_WarnMsg( 4, "dvd info: new title" ); + msg_Dbg( p_input, "new title" ); DvdReadSetArea( p_input, p_input->stream.pp_areas[ p_input->stream.p_selected_area->i_id+1] ); vlc_mutex_unlock( &p_input->stream.stream_lock ); @@ -1033,7 +1028,7 @@ static void DvdReadSeek( input_thread_t * p_input, off_t i_off ) } /* - intf_WarnMsg(12, "cell %d i_sub_cell %d chapter %d vobu %d cell_sector %d vobu_sector %d sub_cell_sector %d", + msg_Dbg( p_input, "cell %d i_sub_cell %d chapter %d vobu %d cell_sector %d vobu_sector %d sub_cell_sector %d", i_cell, i_sub_cell,i_chapter, i_vobu, p_dvd->p_cur_pgc->cell_playback[i_cell].first_sector, p_dvd->p_vts_file->vts_vobu_admap->vobu_start_sectors[i_vobu], @@ -1138,23 +1133,23 @@ static void DvdReadHandleDSI( thread_dvd_data_t * p_dvd, u8 * p_data ) } #if 0 - intf_WarnMsg( 12, "scr %d lbn 0x%02x vobu_ea %d vob_id %d c_id %d", - p_dvd->dsi_pack.dsi_gi.nv_pck_scr, - p_dvd->dsi_pack.dsi_gi.nv_pck_lbn, - p_dvd->dsi_pack.dsi_gi.vobu_ea, - p_dvd->dsi_pack.dsi_gi.vobu_vob_idn, - p_dvd->dsi_pack.dsi_gi.vobu_c_idn ); - - intf_WarnMsg( 12, "cat 0x%02x ilvu_ea %d ilvu_sa %d size %d", - p_dvd->dsi_pack.sml_pbi.category, - p_dvd->dsi_pack.sml_pbi.ilvu_ea, - p_dvd->dsi_pack.sml_pbi.ilvu_sa, - p_dvd->dsi_pack.sml_pbi.size ); - - intf_WarnMsg( 12, "next_vobu %d next_ilvu1 %d next_ilvu2 %d", - p_dvd->dsi_pack.vobu_sri.next_vobu & 0x7fffffff, - p_dvd->dsi_pack.sml_agli.data[ p_dvd->i_angle - 1 ].address, - p_dvd->dsi_pack.sml_agli.data[ p_dvd->i_angle ].address); + msg_Dbg( p_input, 12, "scr %d lbn 0x%02x vobu_ea %d vob_id %d c_id %d", + p_dvd->dsi_pack.dsi_gi.nv_pck_scr, + p_dvd->dsi_pack.dsi_gi.nv_pck_lbn, + p_dvd->dsi_pack.dsi_gi.vobu_ea, + p_dvd->dsi_pack.dsi_gi.vobu_vob_idn, + p_dvd->dsi_pack.dsi_gi.vobu_c_idn ); + + msg_Dbg( p_input, 12, "cat 0x%02x ilvu_ea %d ilvu_sa %d size %d", + p_dvd->dsi_pack.sml_pbi.category, + p_dvd->dsi_pack.sml_pbi.ilvu_ea, + p_dvd->dsi_pack.sml_pbi.ilvu_sa, + p_dvd->dsi_pack.sml_pbi.size ); + + msg_Dbg( p_input, 12, "next_vobu %d next_ilvu1 %d next_ilvu2 %d", + p_dvd->dsi_pack.vobu_sri.next_vobu & 0x7fffffff, + p_dvd->dsi_pack.sml_agli.data[ p_dvd->i_angle - 1 ].address, + p_dvd->dsi_pack.sml_agli.data[ p_dvd->i_angle ].address); #endif } @@ -1209,23 +1204,24 @@ static void DvdReadLauchDecoders( input_thread_t * p_input ) p_dvd = (thread_dvd_data_t*)(p_input->p_access_data); - if( p_main->b_video ) + if( !config_GetInt( p_input, "novideo" ) ) { input_SelectES( p_input, p_input->stream.pp_es[0] ); } - if( p_main->b_audio ) + if( !config_GetInt( p_input, "noaudio" ) ) { /* For audio: first one if none or a not existing one specified */ - int i_audio = config_GetIntVariable( "audio-channel" ); + int i_audio = config_GetInt( p_input, "audio-channel" ); if( i_audio < 0 /*|| i_audio > i_audio_nb*/ ) { - config_PutIntVariable( "audio-channel", 1 ); + config_PutInt( p_input, "audio-channel", 1 ); i_audio = 1; } if( i_audio > 0/* && i_audio_nb > 0*/ ) { - if( config_GetIntVariable( "audio-type" ) == REQUESTED_AC3 ) + if( config_GetInt( p_input, "audio-type" ) + == REQUESTED_AC3 ) { int i_ac3 = i_audio; while( ( p_input->stream.pp_es[i_ac3]->i_type != @@ -1248,13 +1244,13 @@ static void DvdReadLauchDecoders( input_thread_t * p_input ) } } - if( p_main->b_video ) + if( !config_GetInt( p_input, "novideo" ) ) { /* for spu, default is none */ - int i_spu = config_GetIntVariable( "spu-channel" ); + int i_spu = config_GetInt( p_input, "spu-channel" ); if( i_spu < 0 /*|| i_spu > i_spu_nb*/ ) { - config_PutIntVariable( "spu-channel", 0 ); + config_PutInt( p_input, "spu-channel", 0 ); i_spu = 0; } if( i_spu > 0 /*&& i_spu_nb > 0*/ ) diff --git a/plugins/dvdread/input_dvdread.h b/plugins/dvdread/input_dvdread.h index 12ae4cc00c..2ba1f06c45 100644 --- a/plugins/dvdread/input_dvdread.h +++ b/plugins/dvdread/input_dvdread.h @@ -2,7 +2,7 @@ * input_dvdread.h: thread structure of the DVD plugin ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_dvdread.h,v 1.8 2002/04/03 16:22:23 sam Exp $ + * $Id: input_dvdread.h,v 1.9 2002/06/01 12:31:59 sam Exp $ * * Author: Stéphane Borel * @@ -59,6 +59,6 @@ typedef struct thread_dvd_data_s int i_cur_cell; int i_next_cell; - boolean_t b_eoc; + vlc_bool_t b_eoc; } thread_dvd_data_t; diff --git a/plugins/esd/Makefile b/plugins/esd/Makefile index 39de89de16..b9443245b2 100644 --- a/plugins/esd/Makefile +++ b/plugins/esd/Makefile @@ -1 +1 @@ -esd_SOURCES = esd.c aout_esd.c +esd_SOURCES = esd.c diff --git a/plugins/esd/aout_esd.c b/plugins/esd/aout_esd.c deleted file mode 100644 index 014a20385d..0000000000 --- a/plugins/esd/aout_esd.c +++ /dev/null @@ -1,199 +0,0 @@ -/***************************************************************************** - * aout_esd.c : Esound functions library - ***************************************************************************** - * Copyright (C) 2000-2001 VideoLAN - * $Id: aout_esd.c,v 1.21 2002/02/24 22:06:50 sam Exp $ - * - * Authors: Samuel Hocevar - * - * 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. - *****************************************************************************/ - -/* TODO: - * - * - use the libesd function to get latency when it's not buggy anymore - * - */ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#include /* ENOMEM */ -#include /* open(), O_WRONLY */ -#include /* strerror() */ -#include /* write(), close() */ -#include /* "intf_msg.h" */ -#include /* calloc(), malloc(), free() */ - -#include - -#include - -#include "audio_output.h" /* aout_thread_t */ - -/***************************************************************************** - * aout_sys_t: esd audio output method descriptor - ***************************************************************************** - * This structure is part of the audio output thread descriptor. - * It describes some esd specific variables. - *****************************************************************************/ -typedef struct aout_sys_s -{ - esd_format_t esd_format; - int i_fd; - -} aout_sys_t; - -/***************************************************************************** - * Local prototypes. - *****************************************************************************/ -static int aout_Open ( aout_thread_t *p_aout ); -static int aout_SetFormat ( aout_thread_t *p_aout ); -static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); -static void aout_Play ( aout_thread_t *p_aout, - byte_t *buffer, int i_size ); -static void aout_Close ( aout_thread_t *p_aout ); - -/***************************************************************************** - * Functions exported as capabilities. They are declared as static so that - * we don't pollute the namespace too much. - *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ) -{ - p_function_list->functions.aout.pf_open = aout_Open; - p_function_list->functions.aout.pf_setformat = aout_SetFormat; - p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo; - p_function_list->functions.aout.pf_play = aout_Play; - p_function_list->functions.aout.pf_close = aout_Close; -} - -/***************************************************************************** - * aout_Open: open an esd socket - *****************************************************************************/ -static int aout_Open( aout_thread_t *p_aout ) -{ - /* mpg123 does it this way */ - int i_bits = ESD_BITS16; - int i_mode = ESD_STREAM; - int i_func = ESD_PLAY; - - /* Allocate structure */ - p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); - if( p_aout->p_sys == NULL ) - { - intf_ErrMsg("error: %s", strerror(ENOMEM) ); - return( 1 ); - } - - /* Initialize some variables */ - p_aout->i_rate = esd_audio_rate; /* We use actual esd rate value, not - * initial value */ - - i_bits = ESD_BITS16; - i_mode = ESD_STREAM; - i_func = ESD_PLAY; - p_aout->p_sys->esd_format = (i_bits | i_mode | i_func) & (~ESD_MASK_CHAN); - - if( p_aout->i_channels == 1 ) - { - p_aout->p_sys->esd_format |= ESD_MONO; - } - else - { - p_aout->p_sys->esd_format |= ESD_STEREO; - } - - /* open a socket for playing a stream - * and try to open /dev/dsp if there's no EsounD */ - if ( (p_aout->p_sys->i_fd - = esd_play_stream_fallback(p_aout->p_sys->esd_format, - p_aout->i_rate, NULL, "vlc")) < 0 ) - { - intf_ErrMsg( "aout error: can't open esound socket" - " (format 0x%08x at %ld Hz)", - p_aout->p_sys->esd_format, p_aout->i_rate ); - return( -1 ); - } - - return( 0 ); -} - -/***************************************************************************** - * aout_SetFormat: set the output format - *****************************************************************************/ -static int aout_SetFormat( aout_thread_t *p_aout ) -{ - int i_fd; - - i_fd = esd_open_sound(NULL); - p_aout->i_latency = esd_get_latency(i_fd); - - intf_WarnMsg(2, "aout_esd_latency: %d",p_aout->i_latency); - - return( 0 ); -} - -/***************************************************************************** - * aout_GetBufInfo: buffer status query - *****************************************************************************/ -static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) -{ - /* arbitrary value that should be changed */ - return( i_buffer_limit ); -} - -/***************************************************************************** - * aout_Play: play a sound samples buffer - ***************************************************************************** - * This function writes a buffer of i_length bytes in the socket - *****************************************************************************/ -static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) -{ - int i_amount; - - if (p_aout->p_sys->esd_format & ESD_STEREO) - { - if (p_aout->p_sys->esd_format & ESD_BITS16) - { - i_amount = (44100 * (ESD_BUF_SIZE + 64)) / p_aout->i_rate; - } - else - { - i_amount = (44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate; - } - } - else - { - if (p_aout->p_sys->esd_format & ESD_BITS16) - { - i_amount = (2 * 44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate; - } - else - { - i_amount = (2 * 44100 * (ESD_BUF_SIZE + 256)) / p_aout->i_rate; - } - } - - write( p_aout->p_sys->i_fd, buffer, i_size ); -} - -/***************************************************************************** - * aout_Close: close the Esound socket - *****************************************************************************/ -static void aout_Close( aout_thread_t *p_aout ) -{ - close( p_aout->p_sys->i_fd ); -} - diff --git a/plugins/esd/esd.c b/plugins/esd/esd.c index b35af6a762..d0a8982194 100644 --- a/plugins/esd/esd.c +++ b/plugins/esd/esd.c @@ -2,7 +2,7 @@ * esd.c : EsounD module ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: esd.c,v 1.14 2002/04/19 13:56:10 sam Exp $ + * $Id: esd.c,v 1.15 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,15 +24,38 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* malloc(), free() */ -#include /* strdup() */ +#include /* ENOMEM */ +#include /* open(), O_WRONLY */ +#include /* strerror() */ +#include /* write(), close() */ +#include /* calloc(), malloc(), free() */ -#include +#include +#include + +#include + +/***************************************************************************** + * aout_sys_t: esd audio output method descriptor + ***************************************************************************** + * This structure is part of the audio output thread descriptor. + * It describes some esd specific variables. + *****************************************************************************/ +struct aout_sys_s +{ + esd_format_t esd_format; + int i_fd; +}; /***************************************************************************** - * Capabilities defined in the other files. + * Local prototypes. *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ); +static void aout_getfunctions ( function_list_t * p_function_list ); +static int aout_Open ( aout_thread_t * ); +static int aout_SetFormat ( aout_thread_t * ); +static int aout_GetBufInfo ( aout_thread_t *, int ); +static void aout_Play ( aout_thread_t *, byte_t *, int ); +static void aout_Close ( aout_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -43,14 +66,143 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("EsounD audio module") ) ADD_CAPABILITY( AOUT, 50 ) - ADD_SHORTCUT( "esd" ) ADD_SHORTCUT( "esound" ) MODULE_INIT_STOP MODULE_ACTIVATE_START - _M( aout_getfunctions )( &p_module->p_functions->aout ); + aout_getfunctions( &p_module->p_functions->aout ); MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP +/***************************************************************************** + * Functions exported as capabilities. They are declared as static so that + * we don't pollute the namespace too much. + *****************************************************************************/ +static void aout_getfunctions( function_list_t * p_function_list ) +{ + p_function_list->functions.aout.pf_open = aout_Open; + p_function_list->functions.aout.pf_setformat = aout_SetFormat; + p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo; + p_function_list->functions.aout.pf_play = aout_Play; + p_function_list->functions.aout.pf_close = aout_Close; +} + +/***************************************************************************** + * aout_Open: open an esd socket + *****************************************************************************/ +static int aout_Open( aout_thread_t *p_aout ) +{ + /* mpg123 does it this way */ + int i_bits = ESD_BITS16; + int i_mode = ESD_STREAM; + int i_func = ESD_PLAY; + + /* Allocate structure */ + p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); + if( p_aout->p_sys == NULL ) + { + msg_Err( p_aout, "out of memory" ); + return( 1 ); + } + + /* Initialize some variables */ + p_aout->i_rate = esd_audio_rate; /* We use actual esd rate value, not + * initial value */ + + i_bits = ESD_BITS16; + i_mode = ESD_STREAM; + i_func = ESD_PLAY; + p_aout->p_sys->esd_format = (i_bits | i_mode | i_func) & (~ESD_MASK_CHAN); + + if( p_aout->i_channels == 1 ) + { + p_aout->p_sys->esd_format |= ESD_MONO; + } + else + { + p_aout->p_sys->esd_format |= ESD_STEREO; + } + + /* open a socket for playing a stream + * and try to open /dev/dsp if there's no EsounD */ + if ( (p_aout->p_sys->i_fd + = esd_play_stream_fallback(p_aout->p_sys->esd_format, + p_aout->i_rate, NULL, "vlc")) < 0 ) + { + msg_Err( p_aout, "cannot open esound socket (format 0x%08x at %ld Hz)", + p_aout->p_sys->esd_format, p_aout->i_rate ); + return( -1 ); + } + + return( 0 ); +} + +/***************************************************************************** + * aout_SetFormat: set the output format + *****************************************************************************/ +static int aout_SetFormat( aout_thread_t *p_aout ) +{ + int i_fd; + + i_fd = esd_open_sound(NULL); + p_aout->i_latency = esd_get_latency(i_fd); + + msg_Dbg( p_aout, "aout_esd_latency: %d", p_aout->i_latency ); + + return( 0 ); +} + +/***************************************************************************** + * aout_GetBufInfo: buffer status query + *****************************************************************************/ +static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) +{ + /* arbitrary value that should be changed */ + return( i_buffer_limit ); +} + +/***************************************************************************** + * aout_Play: play a sound samples buffer + ***************************************************************************** + * This function writes a buffer of i_length bytes in the socket + *****************************************************************************/ +static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) +{ + int i_amount; + + if (p_aout->p_sys->esd_format & ESD_STEREO) + { + if (p_aout->p_sys->esd_format & ESD_BITS16) + { + i_amount = (44100 * (ESD_BUF_SIZE + 64)) / p_aout->i_rate; + } + else + { + i_amount = (44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate; + } + } + else + { + if (p_aout->p_sys->esd_format & ESD_BITS16) + { + i_amount = (2 * 44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate; + } + else + { + i_amount = (2 * 44100 * (ESD_BUF_SIZE + 256)) / p_aout->i_rate; + } + } + + write( p_aout->p_sys->i_fd, buffer, i_size ); +} + +/***************************************************************************** + * aout_Close: close the Esound socket + *****************************************************************************/ +static void aout_Close( aout_thread_t *p_aout ) +{ + close( p_aout->p_sys->i_fd ); +} + diff --git a/plugins/fb/fb.c b/plugins/fb/fb.c index 4c098e4675..45a512481f 100644 --- a/plugins/fb/fb.c +++ b/plugins/fb/fb.c @@ -2,7 +2,7 @@ * fb.c : framebuffer plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: fb.c,v 1.18 2002/04/23 14:16:20 sam Exp $ + * $Id: fb.c,v 1.19 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -39,10 +39,8 @@ #include /* VT_* */ #include /* KD* */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -76,7 +74,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("Linux console framebuffer module") ) ADD_CAPABILITY( VOUT, 30 ) - ADD_SHORTCUT( "fb" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -92,7 +89,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the FB specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { /* System informations */ int i_tty; /* tty device handle */ @@ -107,7 +104,7 @@ typedef struct vout_sys_s int i_fd; /* device handle */ struct fb_var_screeninfo old_info; /* original mode informations */ struct fb_var_screeninfo var_info; /* current mode informations */ - boolean_t b_pan; /* does device supports panning ? */ + vlc_bool_t b_pan; /* does device supports panning ? */ struct fb_cmap fb_cmap; /* original colormap */ u16 *p_palette; /* original palette */ @@ -119,8 +116,7 @@ typedef struct vout_sys_s /* Video memory */ byte_t * p_video; /* base adress */ size_t i_page_size; /* page size */ - -} vout_sys_t; +}; /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -163,12 +159,12 @@ static int vout_Create( vout_thread_t *p_vout ) /* Set keyboard settings */ if (tcgetattr(0, &p_vout->p_sys->old_termios) == -1) { - intf_ErrMsg( "intf error: tcgetattr" ); + msg_Err( p_vout, "tcgetattr failed" ); } if (tcgetattr(0, &new_termios) == -1) { - intf_ErrMsg( "intf error: tcgetattr" ); + msg_Err( p_vout, "tcgetattr failed" ); } /* new_termios.c_lflag &= ~ (ICANON | ISIG); @@ -181,7 +177,7 @@ static int vout_Create( vout_thread_t *p_vout ) if (tcsetattr(0, TCSAFLUSH, &new_termios) == -1) { - intf_ErrMsg( "intf error: tcsetattr" ); + msg_Err( p_vout, "tcsetattr failed" ); } ioctl( p_vout->p_sys->i_tty, VT_RELDISP, VT_ACKACQ ); @@ -193,8 +189,7 @@ static int vout_Create( vout_thread_t *p_vout ) if( sigaction( SIGUSR1, &sig_tty, &p_vout->p_sys->sig_usr1 ) || sigaction( SIGUSR2, &sig_tty, &p_vout->p_sys->sig_usr2 ) ) { - intf_ErrMsg( "intf error: can't set up signal handler (%s)", - strerror(errno) ); + msg_Err( p_vout, "cannot set signal handler (%s)", strerror(errno) ); tcsetattr(0, 0, &p_vout->p_sys->old_termios); TextMode( p_vout->p_sys->i_tty ); free( p_vout->p_sys ); @@ -205,8 +200,7 @@ static int vout_Create( vout_thread_t *p_vout ) if( -1 == ioctl( p_vout->p_sys->i_tty, VT_GETMODE, &p_vout->p_sys->vt_mode ) ) { - intf_ErrMsg( "intf error: cant get terminal mode (%s)", - strerror(errno) ); + msg_Err( p_vout, "cannot get terminal mode (%s)", strerror(errno) ); sigaction( SIGUSR1, &p_vout->p_sys->sig_usr1, NULL ); sigaction( SIGUSR2, &p_vout->p_sys->sig_usr2, NULL ); tcsetattr(0, 0, &p_vout->p_sys->old_termios); @@ -222,8 +216,7 @@ static int vout_Create( vout_thread_t *p_vout ) if( -1 == ioctl( p_vout->p_sys->i_tty, VT_SETMODE, &vt_mode ) ) { - intf_ErrMsg( "intf error: can't set terminal mode (%s)", - strerror(errno) ); + msg_Err( p_vout, "cannot set terminal mode (%s)", strerror(errno) ); sigaction( SIGUSR1, &p_vout->p_sys->sig_usr1, NULL ); sigaction( SIGUSR2, &p_vout->p_sys->sig_usr2, NULL ); tcsetattr(0, 0, &p_vout->p_sys->old_termios); @@ -271,7 +264,8 @@ static int vout_Init( vout_thread_t *p_vout ) case 32: p_vout->output.i_chroma = FOURCC_RV32; break; default: - intf_ErrMsg( "vout error: unknown screen depth" ); + msg_Err( p_vout, "unknown screen depth %i", + p_vout->p_sys->var_info.bits_per_pixel ); return 0; } @@ -397,7 +391,7 @@ static int vout_Manage( vout_thread_t *p_vout ) switch( buf ) { case 'q': - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; default: @@ -411,7 +405,7 @@ static int vout_Manage( vout_thread_t *p_vout ) */ if( p_vout->i_changes & VOUT_SIZE_CHANGE ) { - intf_WarnMsg( 3, "vout: reinitializing framebuffer screen" ); + msg_Dbg( p_vout, "reinitializing framebuffer screen" ); p_vout->i_changes &= ~VOUT_SIZE_CHANGE; /* Destroy XImages to change their size */ @@ -420,7 +414,7 @@ static int vout_Manage( vout_thread_t *p_vout ) /* Recreate XImages. If SysInit failed, the thread can't go on. */ if( vout_Init( p_vout ) ) { - intf_ErrMsg("error: cannot reinit framebuffer screen" ); + msg_Err( p_vout, "cannot reinit framebuffer screen" ); return( 1 ); } @@ -469,7 +463,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) } #if 0 -static void vout_SetPalette( p_vout_thread_t p_vout, +static void vout_SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue, u16 *transp ) { struct fb_cmap cmap = { 0, 256, red, green, blue, transp }; @@ -489,9 +483,9 @@ static int OpenDisplay( vout_thread_t *p_vout ) struct fb_fix_screeninfo fix_info; /* framebuffer fix information */ /* Open framebuffer device */ - if( !(psz_device = config_GetPszVariable( FB_DEV_VAR )) ) + if( !(psz_device = config_GetPsz( p_vout, FB_DEV_VAR )) ) { - intf_ErrMsg( "vout error: don't know which fb device to open" ); + msg_Err( p_vout, "don't know which fb device to open" ); return( 1 ); } @@ -499,8 +493,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( p_vout->p_sys->i_fd == -1 ) { - intf_ErrMsg("vout error: can't open %s (%s)", - psz_device, strerror(errno) ); + msg_Err( p_vout, "cannot open %s (%s)", psz_device, strerror(errno) ); free( psz_device ); return( 1 ); } @@ -510,7 +503,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( ioctl( p_vout->p_sys->i_fd, FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) ) { - intf_ErrMsg("vout error: can't get fb info (%s)", strerror(errno) ); + msg_Err( p_vout, "cannot get fb info (%s)", strerror(errno) ); close( p_vout->p_sys->i_fd ); return( 1 ); } @@ -518,7 +511,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( ioctl( p_vout->p_sys->i_fd, FBIOGET_VSCREENINFO, &p_vout->p_sys->old_info ) ) { - intf_ErrMsg("vout error: can't get 2nd fb info (%s)", strerror(errno) ); + msg_Err( p_vout, "cannot get 2nd fb info (%s)", strerror(errno) ); close( p_vout->p_sys->i_fd ); return( 1 ); } @@ -531,7 +524,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( ioctl( p_vout->p_sys->i_fd, FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info ) ) { - intf_ErrMsg(" vout error: can't set fb info (%s)", strerror(errno) ); + msg_Err( p_vout, "cannot set fb info (%s)", strerror(errno) ); close( p_vout->p_sys->i_fd ); return( 1 ); } @@ -541,8 +534,8 @@ static int OpenDisplay( vout_thread_t *p_vout ) || ioctl( p_vout->p_sys->i_fd, FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) ) { - intf_ErrMsg( "vout error: can't get additional fb info (%s)", - strerror(errno) ); + msg_Err( p_vout, "cannot get additional fb info (%s)", + strerror(errno) ); /* Restore fb config */ ioctl( p_vout->p_sys->i_fd, @@ -554,10 +547,10 @@ static int OpenDisplay( vout_thread_t *p_vout ) /* FIXME: if the image is full-size, it gets cropped on the left * because of the xres / xres_virtual slight difference */ - intf_WarnMsg( 3, "vout: %ix%i (virtual %ix%i)", - p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres, - p_vout->p_sys->var_info.xres_virtual, - p_vout->p_sys->var_info.yres_virtual ); + msg_Dbg( p_vout, "%ix%i (virtual %ix%i)", + p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres, + p_vout->p_sys->var_info.xres_virtual, + p_vout->p_sys->var_info.yres_virtual ); p_vout->p_sys->i_height = p_vout->p_sys->var_info.yres; p_vout->p_sys->i_width = p_vout->p_sys->var_info.xres_virtual @@ -598,8 +591,8 @@ static int OpenDisplay( vout_thread_t *p_vout ) break; default: - intf_ErrMsg( "vout error: screen depth %d is not supported", - p_vout->p_sys->var_info.bits_per_pixel ); + msg_Err( p_vout, "screen depth %d is not supported", + p_vout->p_sys->var_info.bits_per_pixel ); /* Restore fb config */ ioctl( p_vout->p_sys->i_fd, @@ -619,8 +612,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( p_vout->p_sys->p_video == ((void*)-1) ) { - intf_ErrMsg( "vout error: can't map video memory (%s)", - strerror(errno) ); + msg_Err( p_vout, "cannot map video memory (%s)", strerror(errno) ); if( p_vout->p_sys->var_info.bits_per_pixel == 8 ) { @@ -635,9 +627,9 @@ static int OpenDisplay( vout_thread_t *p_vout ) return( 1 ); } - intf_WarnMsg( 4, "vout: framebuffer type=%d, visual=%d, ypanstep=%d, " - "ywrap=%d, accel=%d", fix_info.type, fix_info.visual, - fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel ); + msg_Dbg( p_vout, "framebuffer type=%d, visual=%d, ypanstep=%d, " + "ywrap=%d, accel=%d", fix_info.type, fix_info.visual, + fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel ); return( 0 ); } @@ -714,7 +706,7 @@ static void TextMode( int i_tty ) /* return to text mode */ if( -1 == ioctl(i_tty, KDSETMODE, KD_TEXT) ) { - intf_ErrMsg( "intf error: failed ioctl KDSETMODE KD_TEXT" ); +//X msg_Err( p_vout, "failed ioctl KDSETMODE KD_TEXT" ); } } @@ -723,7 +715,7 @@ static void GfxMode( int i_tty ) /* switch to graphic mode */ if( -1 == ioctl(i_tty, KDSETMODE, KD_GRAPHICS) ) { - intf_ErrMsg( "intf error: failed ioctl KDSETMODE KD_GRAPHICS" ); +//X msg_Err( p_vout, "failed ioctl KDSETMODE KD_GRAPHICS" ); } } diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index 8aa6101c5d..2df961fb7f 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -2,7 +2,7 @@ * ffmpeg.c: video decoder using ffmpeg library ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ffmpeg.c,v 1.10 2002/05/18 17:47:46 sam Exp $ + * $Id: ffmpeg.c,v 1.11 2002/06/01 12:31:59 sam Exp $ * * Authors: Laurent Aimar * @@ -26,7 +26,10 @@ *****************************************************************************/ #include /* malloc(), free() */ -#include +#include +#include +#include +#include #ifdef HAVE_UNISTD_H #include /* getpid() */ @@ -39,15 +42,6 @@ # include #endif -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" -#include "input_ext-intf.h" -#include "input_ext-plugins.h" - - #include "vdec_ext-plugins.h" #include "avcodec.h" /* ffmpeg */ #include "ffmpeg.h" @@ -56,7 +50,7 @@ * Local prototypes */ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static int InitThread ( videodec_thread_t * ); static void EndThread ( videodec_thread_t * ); static void DecodeThread ( videodec_thread_t * ); @@ -83,7 +77,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( "ffmpeg video decoder (MSMPEG4v123,MPEG4)" ) ADD_CAPABILITY( DECODER, 70 ) - ADD_SHORTCUT( "ffmpeg" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -224,8 +217,7 @@ static inline void __GetFrame( videodec_thread_t *p_vdec ) p_data = p_pes->p_first; do { - FAST_MEMCPY( p_buffer, - p_data->p_payload_start, + p_vdec->p_fifo->p_vlc->pf_memcpy( p_buffer, p_data->p_payload_start, p_data->p_payload_end - p_data->p_payload_start ); p_buffer += p_data->p_payload_end - p_data->p_payload_start; p_data = p_data->p_next; @@ -249,7 +241,7 @@ static inline void __NextFrame( videodec_thread_t *p_vdec ) /***************************************************************************** * decoder_Run: this function is called just after the thread is created *****************************************************************************/ -static int decoder_Run ( decoder_config_t * p_config ) +static int decoder_Run ( decoder_fifo_t * p_fifo ) { videodec_thread_t *p_vdec; int b_error; @@ -257,19 +249,17 @@ static int decoder_Run ( decoder_config_t * p_config ) if ( (p_vdec = (videodec_thread_t*)malloc( sizeof(videodec_thread_t))) == NULL ) { - intf_ErrMsg( "vdec error: not enough memory " - "for vdec_CreateThread() to create the new thread"); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } memset( p_vdec, 0, sizeof( videodec_thread_t ) ); - p_vdec->p_fifo = p_config->p_decoder_fifo; - p_vdec->p_config = p_config; + p_vdec->p_fifo = p_fifo; if( InitThread( p_vdec ) != 0 ) { - DecoderError( p_config->p_decoder_fifo ); + DecoderError( p_fifo ); return( -1 ); } @@ -304,14 +294,14 @@ static int decoder_Run ( decoder_config_t * p_config ) static int InitThread( videodec_thread_t *p_vdec ) { - if( p_vdec->p_config->p_demux_data != NULL ) + if( p_vdec->p_fifo->p_demux_data != NULL ) { __ParseBitMapInfoHeader( &p_vdec->format, - (byte_t*)p_vdec->p_config->p_demux_data ); + (byte_t*)p_vdec->p_fifo->p_demux_data ); } else { - intf_ErrMsg( "vdec error: cannot get informations" ); + msg_Err( p_vdec->p_fifo, "cannot get information" ); return( -1 ); } @@ -321,14 +311,14 @@ static int InitThread( videodec_thread_t *p_vdec ) avcodec_init(); avcodec_register_all(); b_ffmpeginit = 1; - intf_WarnMsg( 1, "vdec init: library ffmpeg initialised" ); + msg_Dbg( p_vdec->p_fifo, "library ffmpeg initialized" ); } else { - intf_WarnMsg( 1, "vdec init: library ffmpeg already initialised" ); + msg_Dbg( p_vdec->p_fifo, "library ffmpeg already initialized" ); } - switch( p_vdec->p_config->i_type) + switch( p_vdec->p_fifo->i_type ) { #if LIBAVCODEC_BUILD >= 4608 /* what is the true version */ case( MSMPEG4v1_VIDEO_ES): @@ -361,8 +351,8 @@ static int InitThread( videodec_thread_t *p_vdec ) if( !p_vdec->p_codec ) { - intf_ErrMsg( "vdec error: codec not found (%s)", - p_vdec->psz_namecodec ); + msg_Err( p_vdec->p_fifo, "codec not found (%s)", + p_vdec->psz_namecodec ); return( -1 ); } @@ -375,45 +365,34 @@ static int InitThread( videodec_thread_t *p_vdec ) if (avcodec_open(p_vdec->p_context, p_vdec->p_codec) < 0) { - intf_ErrMsg( "vdec error: cannot open codec (%s)", - p_vdec->psz_namecodec ); + msg_Err( p_vdec->p_fifo, "cannot open codec (%s)", + p_vdec->psz_namecodec ); return( -1 ); } else { - intf_WarnMsg( 1, "vdec info: ffmpeg codec (%s) started", - p_vdec->psz_namecodec ); + msg_Dbg( p_vdec->p_fifo, "ffmpeg codec (%s) started", + p_vdec->psz_namecodec ); } - /* create vout */ - p_vdec->p_vout = vout_CreateThread( - NULL, + /* create vout */ + p_vdec->p_vout = vout_CreateThread( p_vdec->p_fifo->p_this, p_vdec->format.i_width, p_vdec->format.i_height, FOURCC_I420, VOUT_ASPECT_FACTOR * p_vdec->format.i_width / p_vdec->format.i_height ); - if( !p_vdec->p_vout ) + if( p_vdec->p_vout == NULL ) { - intf_ErrMsg( "vdec error: can't open vout, aborting" ); + msg_Err( p_vdec->p_fifo, "cannot open vout, aborting" ); avcodec_close( p_vdec->p_context ); - intf_WarnMsg(1, "vdec info: ffmpeg codec (%s) stopped", - p_vdec->psz_namecodec); - return( -1 ); + msg_Dbg( p_vdec->p_fifo, "ffmpeg codec (%s) stopped", + p_vdec->psz_namecodec ); + return -1; } - vlc_mutex_lock( &p_vout_bank->lock ); - if( p_vout_bank->i_count != 0 ) - { - vlc_mutex_unlock( &p_vout_bank->lock ); - vout_DestroyThread( p_vout_bank->pp_vout[ 0 ], NULL ); - vlc_mutex_lock( &p_vout_bank->lock ); - p_vout_bank->i_count--; - } - p_vout_bank->i_count++; - p_vout_bank->pp_vout[0] = p_vdec->p_vout; - vlc_mutex_unlock( &p_vout_bank->lock ); + vlc_object_yield( p_vdec->p_vout ); return( 0 ); } @@ -428,28 +407,20 @@ static void EndThread( videodec_thread_t *p_vdec ) { if( p_vdec == NULL ) { - intf_ErrMsg( "vdec error: cannot free structures" ); + msg_Err( p_vdec->p_fifo, "cannot free structures" ); return; } if( p_vdec->p_context != NULL) { avcodec_close( p_vdec->p_context ); - intf_WarnMsg(1, "vdec info: ffmpeg codec (%s) stopped", - p_vdec->psz_namecodec); - } - - vlc_mutex_lock( &p_vout_bank->lock ); - if( p_vout_bank->i_count != 0 ) - { - vlc_mutex_unlock( &p_vout_bank->lock ); - vout_DestroyThread( p_vout_bank->pp_vout[ 0 ], NULL ); - vlc_mutex_lock( &p_vout_bank->lock ); - p_vout_bank->i_count--; - p_vout_bank->pp_vout[ 0 ] = NULL; + msg_Dbg( p_vdec->p_fifo, "ffmpeg codec (%s) stopped", + p_vdec->psz_namecodec ); } - vlc_mutex_unlock( &p_vout_bank->lock ); + vlc_object_release( p_vdec->p_vout ); + vout_DestroyThread( p_vdec->p_vout ); + free( p_vdec ); } @@ -475,8 +446,8 @@ static void DecodeThread( videodec_thread_t *p_vdec ) if( i_status < 0 ) { - intf_WarnMsg( 2, "vdec error: cannot decode one frame (%d bytes)", - p_vdec->i_framesize ); + msg_Warn( p_vdec->p_fifo, "cannot decode one frame (%d bytes)", + p_vdec->i_framesize ); return; } if( !b_gotpicture ) @@ -509,7 +480,7 @@ static void DecodeThread( videodec_thread_t *p_vdec ) avpicture.linesize[i_plane] ); for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ ) { - FAST_MEMCPY( p_dest, p_src, i_size ); + p_vdec->p_fifo->p_vlc->pf_memcpy( p_dest, p_src, i_size ); p_dest += p_pic->p[i_plane].i_pitch; p_src += avpicture.linesize[i_plane]; } diff --git a/plugins/ffmpeg/ffmpeg.h b/plugins/ffmpeg/ffmpeg.h index 9c8d945c66..a6af1d6b4e 100644 --- a/plugins/ffmpeg/ffmpeg.h +++ b/plugins/ffmpeg/ffmpeg.h @@ -2,7 +2,7 @@ * ffmpeg_vdec.h: video decoder using ffmpeg library ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ffmpeg.h,v 1.2 2002/05/12 06:51:08 fenrir Exp $ + * $Id: ffmpeg.h,v 1.3 2002/06/01 12:31:59 sam Exp $ * * Authors: Laurent Aimar * @@ -39,7 +39,6 @@ typedef struct bitmapinfoheader_s typedef struct videodec_thread_s { - decoder_config_t *p_config; decoder_fifo_t *p_fifo; bitmapinfoheader_t format; diff --git a/plugins/filter/clone.c b/plugins/filter/clone.c index 4b37e663ee..16cf12a063 100644 --- a/plugins/filter/clone.c +++ b/plugins/filter/clone.c @@ -2,7 +2,7 @@ * clone.c : Clone video plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: clone.c,v 1.4 2002/05/28 22:49:25 sam Exp $ + * $Id: clone.c,v 1.5 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -70,12 +68,11 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Clone specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { int i_clones; vout_thread_t **pp_vout; - -} vout_sys_t; +}; /***************************************************************************** * Local prototypes @@ -117,23 +114,22 @@ 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( "vout error: out of memory" ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Look what method was requested */ - p_vout->p_sys->i_clones = config_GetIntVariable( "clone-count" ); + p_vout->p_sys->i_clones = config_GetInt( p_vout, "clone-count" ); p_vout->p_sys->i_clones = __MAX( 1, __MIN( 99, p_vout->p_sys->i_clones ) ); - intf_WarnMsg( 3, "vout info: spawning %i clone(s)", - p_vout->p_sys->i_clones ); + msg_Dbg( p_vout, "spawning %i clone(s)", p_vout->p_sys->i_clones ); p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_clones * sizeof(vout_thread_t *) ); if( p_vout->p_sys->pp_vout == NULL ) { - intf_ErrMsg( "vout error: out of memory" ); + msg_Err( p_vout, "out of memory" ); free( p_vout->p_sys ); return( 1 ); } @@ -159,30 +155,30 @@ static int vout_Init( vout_thread_t *p_vout ) p_vout->output.i_aspect = p_vout->render.i_aspect; /* Try to open the real video output */ - psz_filter = config_GetPszVariable( "filter" ); - config_PutPszVariable( "filter", NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 3, "vout info: spawning the real video outputs" ); + msg_Dbg( p_vout, "spawning the real video outputs" ); for( i_vout = 0; i_vout < p_vout->p_sys->i_clones; i_vout++ ) { p_vout->p_sys->pp_vout[ i_vout ] = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma, p_vout->render.i_aspect ); if( p_vout->p_sys->pp_vout[ i_vout ] == NULL ) { - intf_ErrMsg( "vout error: failed to clone %i vout threads", - p_vout->p_sys->i_clones ); + msg_Err( p_vout, "failed to clone %i vout threads", + p_vout->p_sys->i_clones ); p_vout->p_sys->i_clones = i_vout; RemoveAllVout( p_vout ); - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); return 0; } } - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES ); @@ -276,7 +272,7 @@ static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { - FAST_MEMCPY( p_out, p_in, i_out_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, i_out_pitch ); p_in += i_in_pitch; p_out += i_out_pitch; } @@ -307,8 +303,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) while( p_vout->p_sys->i_clones ) { --p_vout->p_sys->i_clones; - vout_DestroyThread( - p_vout->p_sys->pp_vout[ p_vout->p_sys->i_clones ], NULL ); + vout_DestroyThread( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); } } diff --git a/plugins/filter/deinterlace.c b/plugins/filter/deinterlace.c index 7f6ac16217..4dacaeeced 100644 --- a/plugins/filter/deinterlace.c +++ b/plugins/filter/deinterlace.c @@ -2,7 +2,7 @@ * deinterlace.c : deinterlacer plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: deinterlace.c,v 1.12 2002/05/28 22:49:25 sam Exp $ + * $Id: deinterlace.c,v 1.13 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -75,24 +73,23 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Deinterlace specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { int i_mode; - struct vout_thread_s *p_vout; + vout_thread_t *p_vout; mtime_t last_date; - -} vout_sys_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -122,19 +119,18 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Look what method was requested */ - psz_method = config_GetPszVariable( "deinterlace-mode" ); + psz_method = config_GetPsz( p_vout, "deinterlace-mode" ); if( psz_method == NULL ) { - intf_ErrMsg( "vout error: configuration variable %s empty", - "deinterlace-mode" ); - intf_ErrMsg( "filter error: no valid deinterlace mode provided, " - "using deinterlace:bob" ); + msg_Err( p_vout, "configuration variable %s empty", + "deinterlace-mode" ); + msg_Err( p_vout, "no valid deinterlace mode provided, using 'bob'" ); p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB; } else @@ -149,8 +145,8 @@ static int vout_Create( vout_thread_t *p_vout ) } else { - intf_ErrMsg( "filter error: no valid deinterlace mode provided, " - "using deinterlace:bob" ); + msg_Err( p_vout, "no valid deinterlace mode provided, " + "using 'bob'" ); p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB; } } @@ -191,10 +187,10 @@ static int vout_Init( vout_thread_t *p_vout ) } /* Try to open the real video output, with half the height our images */ - psz_filter = config_GetPszVariable( "filter" ); - config_PutPszVariable( "filter", NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 1, "filter: spawning the real video output" ); + msg_Dbg( p_vout, "spawning the real video output" ); switch( p_vout->render.i_chroma ) { @@ -205,14 +201,14 @@ static int vout_Init( vout_thread_t *p_vout ) { case DEINTERLACE_MODE_BOB: p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->output.i_width, p_vout->output.i_height / 2, p_vout->output.i_chroma, p_vout->output.i_aspect ); break; case DEINTERLACE_MODE_BLEND: p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->output.i_width, p_vout->output.i_height, p_vout->output.i_chroma, p_vout->output.i_aspect ); break; @@ -221,7 +217,7 @@ static int vout_Init( vout_thread_t *p_vout ) case FOURCC_I422: p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->output.i_width, p_vout->output.i_height, FOURCC_I420, p_vout->output.i_aspect ); break; @@ -230,13 +226,13 @@ static int vout_Init( vout_thread_t *p_vout ) break; } - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); /* Everything failed */ if( p_vout->p_sys->p_vout == NULL ) { - intf_ErrMsg( "filter error: can't open vout, aborting" ); + msg_Err( p_vout, "cannot open vout, aborting" ); return( 0 ); } @@ -270,7 +266,7 @@ static void vout_End( vout_thread_t *p_vout ) *****************************************************************************/ static void vout_Destroy( vout_thread_t *p_vout ) { - vout_DestroyThread( p_vout->p_sys->p_vout, NULL ); + vout_DestroyThread( p_vout->p_sys->p_vout ); free( p_vout->p_sys ); } @@ -345,7 +341,8 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic ) case DEINTERLACE_MODE_BOB: for( ; p_out < p_out_end ; ) { - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); p_out += p_pic->p[i_plane].i_pitch; p_in += 2 * p_pic->p[i_plane].i_pitch; @@ -355,7 +352,8 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic ) case DEINTERLACE_MODE_BLEND: if( i_field == 0 ) { - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); p_in += 2 * p_pic->p[i_plane].i_pitch; p_out += p_pic->p[i_plane].i_pitch; } @@ -364,7 +362,8 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic ) for( ; p_out < p_out_end ; ) { - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); p_out += p_pic->p[i_plane].i_pitch; @@ -380,7 +379,8 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic ) if( i_field == 0 ) { p_in -= 2 * p_pic->p[i_plane].i_pitch; - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); } #endif @@ -396,9 +396,11 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic ) { for( ; p_out < p_out_end ; ) { - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); p_out += p_pic->p[i_plane].i_pitch; - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); p_out += p_pic->p[i_plane].i_pitch; p_in += i_increment; } @@ -407,7 +409,8 @@ static void vout_Render ( vout_thread_t *p_vout, picture_t *p_pic ) { for( ; p_out < p_out_end ; ) { - FAST_MEMCPY( p_out, p_in, p_pic->p[i_plane].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_pic->p[i_plane].i_pitch ); p_out += p_pic->p[i_plane].i_pitch; p_in += i_increment; } diff --git a/plugins/filter/distort.c b/plugins/filter/distort.c index bab126e669..caebb9bb4c 100644 --- a/plugins/filter/distort.c +++ b/plugins/filter/distort.c @@ -2,7 +2,7 @@ * distort.c : Misc video effects plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: distort.c,v 1.13 2002/05/28 22:49:25 sam Exp $ + * $Id: distort.c,v 1.14 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -30,10 +30,8 @@ #include /* sin(), cos() */ -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -75,32 +73,29 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Distort specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { int i_mode; - struct vout_thread_s *p_vout; + vout_thread_t *p_vout; /* For the wave mode */ double f_angle; mtime_t last_date; - -} vout_sys_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); - -static void DistortWave ( struct vout_thread_s *, struct picture_s *, - struct picture_s * ); -static void DistortRipple ( struct vout_thread_s *, struct picture_s *, - struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); + +static void DistortWave ( vout_thread_t *, picture_t *, picture_t * ); +static void DistortRipple ( vout_thread_t *, picture_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -130,16 +125,14 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } p_vout->p_sys->i_mode = 0; /* Look what method was requested from command line*/ - if( !(psz_method = psz_method_tmp - = config_GetPszVariable( "filter" )) ) + if( !(psz_method = psz_method_tmp = config_GetPsz( p_vout, "filter" )) ) { - intf_ErrMsg( "vout error: configuration variable %s empty", - "filter" ); + msg_Err( p_vout, "configuration variable %s empty", "filter" ); return( 1 ); } while( *psz_method && *psz_method != ':' ) @@ -161,11 +154,10 @@ static int vout_Create( vout_thread_t *p_vout ) /* No method given in commandline. Look what method was requested in configuration system */ if( !(psz_method = psz_method_tmp - = config_GetPszVariable( "distort-mode" )) ) + = config_GetPsz( p_vout, "distort_mode" )) ) { - intf_ErrMsg( "vout error: configuration variable %s empty " - "using wave", - "distort-mode" ); + msg_Err( p_vout, "configuration variable %s empty, using 'wave'", + "distort_mode" ); p_vout->p_sys->i_mode = DISTORT_MODE_WAVE; } else { @@ -181,8 +173,8 @@ static int vout_Create( vout_thread_t *p_vout ) else { - intf_ErrMsg( "filter error: no valid distort mode provided, " - "using distort:wave" ); + msg_Err( p_vout, "no valid distort mode provided, " + "using wave" ); p_vout->p_sys->i_mode = DISTORT_MODE_WAVE; } } @@ -210,23 +202,23 @@ static int vout_Init( vout_thread_t *p_vout ) p_vout->output.i_aspect = p_vout->render.i_aspect; /* Try to open the real video output */ - psz_filter = config_GetPszVariable( "filter" ); - config_PutPszVariable( "filter", NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 1, "filter: spawning the real video output" ); + msg_Dbg( p_vout, "spawning the real video output" ); p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma, p_vout->render.i_aspect ); - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); /* Everything failed */ if( p_vout->p_sys->p_vout == NULL ) { - intf_ErrMsg( "filter error: can't open vout, aborting" ); + msg_Err( p_vout, "cannot open vout, aborting" ); return( 0 ); } @@ -261,7 +253,7 @@ static void vout_End( vout_thread_t *p_vout ) *****************************************************************************/ static void vout_Destroy( vout_thread_t *p_vout ) { - vout_DestroyThread( p_vout->p_sys->p_vout, NULL ); + vout_DestroyThread( p_vout->p_sys->p_vout ); free( p_vout->p_sys ); } @@ -370,7 +362,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic, { if( i_offset < 0 ) { - FAST_MEMCPY( p_out, p_in - i_offset, + p_vout->p_vlc->pf_memcpy( p_out, p_in - i_offset, p_inpic->p[i_index].i_pitch + i_offset ); p_in += p_inpic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; @@ -378,7 +370,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic, } else { - FAST_MEMCPY( p_out + i_offset, p_in, + p_vout->p_vlc->pf_memcpy( p_out + i_offset, p_in, p_inpic->p[i_index].i_pitch - i_offset ); memset( p_out, black_pixel, i_offset ); p_in += p_inpic->p[i_index].i_pitch; @@ -387,7 +379,8 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic, } else { - FAST_MEMCPY( p_out, p_in, p_inpic->p[i_index].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_inpic->p[i_index].i_pitch ); p_in += p_inpic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; } @@ -425,7 +418,8 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic, p_in = p_inpic->p[i_index].p_pixels; p_out = p_outpic->p[i_index].p_pixels; - FAST_MEMCPY( p_out, p_in, i_first_line * p_inpic->p[i_index].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + i_first_line * p_inpic->p[i_index].i_pitch ); p_in += i_first_line * p_inpic->p[i_index].i_pitch; p_out += i_first_line * p_outpic->p[i_index].i_pitch; @@ -446,7 +440,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic, { if( i_offset < 0 ) { - FAST_MEMCPY( p_out, p_in - i_offset, + p_vout->p_vlc->pf_memcpy( p_out, p_in - i_offset, p_inpic->p[i_index].i_pitch + i_offset ); p_in -= p_inpic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; @@ -454,7 +448,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic, } else { - FAST_MEMCPY( p_out + i_offset, p_in, + p_vout->p_vlc->pf_memcpy( p_out + i_offset, p_in, p_inpic->p[i_index].i_pitch - i_offset ); memset( p_out, black_pixel, i_offset ); p_in -= p_inpic->p[i_index].i_pitch; @@ -463,7 +457,8 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic, } else { - FAST_MEMCPY( p_out, p_in, p_inpic->p[i_index].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_inpic->p[i_index].i_pitch ); p_in -= p_inpic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; } diff --git a/plugins/filter/filter_common.h b/plugins/filter/filter_common.h index 691ded68b7..44d6581f7f 100644 --- a/plugins/filter/filter_common.h +++ b/plugins/filter/filter_common.h @@ -2,7 +2,7 @@ * filter_common.h: Common filter functions ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: filter_common.h,v 1.2 2002/01/04 14:01:34 sam Exp $ + * $Id: filter_common.h,v 1.3 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -43,7 +43,7 @@ } \ \ /* Allocate the picture */ \ - vout_AllocatePicture( p_pic, \ + vout_AllocatePicture( p_vout, p_pic, \ p_vout->output.i_width, \ p_vout->output.i_height, \ p_vout->output.i_chroma ); \ diff --git a/plugins/filter/invert.c b/plugins/filter/invert.c index 341add646a..14110d1f30 100644 --- a/plugins/filter/invert.c +++ b/plugins/filter/invert.c @@ -2,7 +2,7 @@ * invert.c : Invert video plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: invert.c,v 1.11 2002/05/19 12:57:32 gbazin Exp $ + * $Id: invert.c,v 1.12 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -67,22 +65,21 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Invert specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { - struct vout_thread_s *p_vout; - -} vout_sys_t; + vout_thread_t *p_vout; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -110,7 +107,7 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -135,23 +132,23 @@ static int vout_Init( vout_thread_t *p_vout ) p_vout->output.i_aspect = p_vout->render.i_aspect; /* Try to open the real video output */ - psz_filter = config_GetPszVariable( "filter" ); - config_PutPszVariable( "filter", NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 1, "filter: spawning the real video output" ); + msg_Dbg( p_vout, "spawning the real video output" ); p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma, p_vout->render.i_aspect ); - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); /* Everything failed */ if( p_vout->p_sys->p_vout == NULL ) { - intf_ErrMsg( "filter error: can't open vout, aborting" ); + msg_Err( p_vout, "can't open vout, aborting" ); return( 0 ); } @@ -183,7 +180,7 @@ static void vout_End( vout_thread_t *p_vout ) *****************************************************************************/ static void vout_Destroy( vout_thread_t *p_vout ) { - vout_DestroyThread( p_vout->p_sys->p_vout, NULL ); + vout_DestroyThread( p_vout->p_sys->p_vout ); free( p_vout->p_sys ); } diff --git a/plugins/filter/transform.c b/plugins/filter/transform.c index 40e215993c..0c271ed376 100644 --- a/plugins/filter/transform.c +++ b/plugins/filter/transform.c @@ -2,7 +2,7 @@ * transform.c : transform image plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: transform.c,v 1.12 2002/05/28 22:49:25 sam Exp $ + * $Id: transform.c,v 1.13 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -76,24 +74,23 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Transform specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { int i_mode; - boolean_t b_rotation; - struct vout_thread_s *p_vout; - -} vout_sys_t; + vlc_bool_t b_rotation; + vout_thread_t *p_vout; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -123,19 +120,17 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Look what method was requested */ - psz_method = config_GetPszVariable( "transform-type" ); + psz_method = config_GetPsz( p_vout, "transform-type" ); if( psz_method == NULL ) { - intf_ErrMsg( "vout error: configuration variable %s empty", - "transform-type" ); - intf_ErrMsg( "filter error: no valid transform mode provided, " - "using '90'" ); + msg_Err( p_vout, "configuration variable %s empty", "transform-type" ); + msg_Err( p_vout, "no valid transform mode provided, using '90'" ); p_vout->p_sys->i_mode = TRANSFORM_MODE_90; p_vout->p_sys->b_rotation = 1; } @@ -168,8 +163,7 @@ static int vout_Create( vout_thread_t *p_vout ) } else { - intf_ErrMsg( "filter error: no valid transform mode provided, " - "using '90'" ); + msg_Err( p_vout, "no valid transform mode provided, using '90'" ); p_vout->p_sys->i_mode = TRANSFORM_MODE_90; p_vout->p_sys->b_rotation = 1; } @@ -198,15 +192,15 @@ static int vout_Init( vout_thread_t *p_vout ) p_vout->output.i_aspect = p_vout->render.i_aspect; /* Try to open the real video output */ - psz_filter = config_GetPszVariable( "filter" ); - config_PutPszVariable( "filter", NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 1, "filter: spawning the real video output" ); + msg_Dbg( p_vout, "spawning the real video output" ); if( p_vout->p_sys->b_rotation ) { p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->render.i_height, p_vout->render.i_width, p_vout->render.i_chroma, (u64)VOUT_ASPECT_FACTOR * (u64)VOUT_ASPECT_FACTOR @@ -215,18 +209,18 @@ static int vout_Init( vout_thread_t *p_vout ) else { p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout->p_this, p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma, p_vout->render.i_aspect ); } - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); /* Everything failed */ if( p_vout->p_sys->p_vout == NULL ) { - intf_ErrMsg( "filter error: can't open vout, aborting" ); + msg_Err( p_vout, "cannot open vout, aborting" ); return( 0 ); } @@ -257,7 +251,7 @@ static void vout_End( vout_thread_t *p_vout ) *****************************************************************************/ static void vout_Destroy( vout_thread_t *p_vout ) { - vout_DestroyThread( p_vout->p_sys->p_vout, NULL ); + vout_DestroyThread( p_vout->p_sys->p_vout ); free( p_vout->p_sys ); } @@ -387,7 +381,8 @@ static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic ) for( ; p_in < p_in_end ; ) { p_in_end -= p_pic->p[i_index].i_pitch; - FAST_MEMCPY( p_out, p_in_end, p_pic->p[i_index].i_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in_end, + p_pic->p[i_index].i_pitch ); p_out += p_pic->p[i_index].i_pitch; } } diff --git a/plugins/filter/wall.c b/plugins/filter/wall.c index 07f021cf95..c48a37ca3c 100644 --- a/plugins/filter/wall.c +++ b/plugins/filter/wall.c @@ -2,7 +2,7 @@ * wall.c : Wall video plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: wall.c,v 1.20 2002/05/30 08:17:04 gbazin Exp $ + * $Id: wall.c,v 1.21 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -76,20 +74,19 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Wall specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { int i_col; int i_row; int i_vout; struct vout_list_s { - boolean_t b_active; + vlc_bool_t b_active; int i_width; int i_height; - struct vout_thread_s *p_vout; + vout_thread_t *p_vout; } *pp_vout; - -} vout_sys_t; +}; /***************************************************************************** * Local prototypes @@ -99,8 +96,8 @@ static int vout_Init ( vout_thread_t * ); static void vout_End ( vout_thread_t * ); static void vout_Destroy ( vout_thread_t * ); static int vout_Manage ( vout_thread_t * ); -static void vout_Render ( vout_thread_t *, struct picture_s * ); -static void vout_Display ( vout_thread_t *, struct picture_s * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); static void RemoveAllVout ( vout_thread_t *p_vout ); @@ -133,31 +130,31 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Look what method was requested */ - p_vout->p_sys->i_col = config_GetIntVariable( "wall-cols" ); - p_vout->p_sys->i_row = config_GetIntVariable( "wall-rows" ); + p_vout->p_sys->i_col = config_GetInt( p_vout, "wall-cols" ); + p_vout->p_sys->i_row = config_GetInt( p_vout, "wall-rows" ); p_vout->p_sys->i_col = __MAX( 1, __MIN( 15, p_vout->p_sys->i_col ) ); p_vout->p_sys->i_row = __MAX( 1, __MIN( 15, p_vout->p_sys->i_row ) ); - intf_WarnMsg( 3, "filter info: opening a %i x %i wall", - p_vout->p_sys->i_col, p_vout->p_sys->i_row ); + msg_Dbg( p_vout, "opening a %i x %i wall", + p_vout->p_sys->i_col, p_vout->p_sys->i_row ); p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_row * p_vout->p_sys->i_col * sizeof(struct vout_list_s) ); if( p_vout->p_sys->pp_vout == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); free( p_vout->p_sys ); return( 1 ); } - psz_method_tmp = psz_method = config_GetPszVariable( "wall-active" ); + psz_method_tmp = psz_method = config_GetPsz( p_vout, "wall-active" ); /* If no trailing vout are specified, take them all */ if( psz_method == NULL ) @@ -228,10 +225,10 @@ static int vout_Init( vout_thread_t *p_vout ) p_vout->output.i_aspect = p_vout->render.i_aspect; /* Try to open the real video output */ - psz_filter = config_GetPszVariable( "filter" ); - config_PutPszVariable( "filter", NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 1, "filter: spawning the real video outputs" ); + msg_Dbg( p_vout, "spawning the real video outputs" ); p_vout->p_sys->i_vout = 0; @@ -274,17 +271,17 @@ static int vout_Init( vout_thread_t *p_vout ) } p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout = - vout_CreateThread( NULL, i_width, i_height, + vout_CreateThread( p_vout->p_this, i_width, i_height, p_vout->render.i_chroma, p_vout->render.i_aspect * p_vout->render.i_height / i_height * i_width / p_vout->render.i_width ); if( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout == NULL ) { - intf_ErrMsg( "vout error: failed to get %ix%i vout threads", - p_vout->p_sys->i_col, p_vout->p_sys->i_row ); + msg_Err( p_vout, "failed to get %ix%i vout threads", + p_vout->p_sys->i_col, p_vout->p_sys->i_row ); RemoveAllVout( p_vout ); - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); return 0; } @@ -293,7 +290,7 @@ static int vout_Init( vout_thread_t *p_vout ) } } - config_PutPszVariable( "filter", psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES ); @@ -417,7 +414,7 @@ static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { - FAST_MEMCPY( p_out, p_in, i_out_pitch ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, i_out_pitch ); p_in += i_in_pitch; p_out += i_out_pitch; } @@ -466,7 +463,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) if( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].b_active ) { vout_DestroyThread( - p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout, NULL ); + p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); } } } diff --git a/plugins/fx/scope.c b/plugins/fx/scope.c index f154cdfc03..251a1c1a73 100644 --- a/plugins/fx/scope.c +++ b/plugins/fx/scope.c @@ -2,7 +2,7 @@ * scope.c : Scope effect module ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: scope.c,v 1.6 2002/04/19 13:56:11 sam Exp $ + * $Id: scope.c,v 1.7 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,36 +28,39 @@ #include /* strdup() */ #include -#include - -#include "video.h" -#include "video_output.h" - -#include "audio_output.h" /* aout_thread_t */ +#include +#include +#include #define SCOPE_WIDTH 320 #define SCOPE_HEIGHT 240 #define SCOPE_ASPECT (VOUT_ASPECT_FACTOR*SCOPE_WIDTH/SCOPE_HEIGHT) -/***************************************************************************** - * Capabilities defined in the other files. - *****************************************************************************/ -static void aout_getfunctions( function_list_t * p_function_list ); - /***************************************************************************** * aout_sys_t: scope audio output method descriptor ***************************************************************************** * This structure is part of the audio output thread descriptor. * It describes some scope specific variables. *****************************************************************************/ -typedef struct aout_sys_s +struct aout_sys_s { - struct aout_thread_s aout; - struct aout_fifo_s *p_aout_fifo; + aout_thread_t aout; + aout_fifo_t *p_aout_fifo; - struct vout_thread_s *p_vout; + vout_thread_t *p_vout; +}; -} aout_sys_t; +/***************************************************************************** + * Local prototypes. + *****************************************************************************/ +static void aout_getfunctions( function_list_t * p_function_list ); + +static int aout_Open ( aout_thread_t *p_aout ); +static int aout_SetFormat ( aout_thread_t *p_aout ); +static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); +static void aout_Play ( aout_thread_t *p_aout, + byte_t *buffer, int i_size ); +static void aout_Close ( aout_thread_t *p_aout ); /***************************************************************************** * Build configuration tree. @@ -78,16 +81,6 @@ MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP -/***************************************************************************** - * Local prototypes. - *****************************************************************************/ -static int aout_Open ( aout_thread_t *p_aout ); -static int aout_SetFormat ( aout_thread_t *p_aout ); -static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); -static void aout_Play ( aout_thread_t *p_aout, - byte_t *buffer, int i_size ); -static void aout_Close ( aout_thread_t *p_aout ); - /***************************************************************************** * Functions exported as capabilities. They are declared as static so that * we don't pollute the namespace too much. @@ -112,11 +105,11 @@ static int aout_Open( aout_thread_t *p_aout ) p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return -1; } - psz_method = config_GetPszVariable( "aout" ); + psz_method = config_GetPsz( p_aout, "aout" ); if( psz_method ) { if( !*psz_method ) @@ -132,12 +125,12 @@ static int aout_Open( aout_thread_t *p_aout ) /* Open video output */ p_aout->p_sys->p_vout = - vout_CreateThread( NULL, SCOPE_WIDTH, SCOPE_HEIGHT, + vout_CreateThread( p_aout->p_this, SCOPE_WIDTH, SCOPE_HEIGHT, FOURCC_I420, SCOPE_ASPECT ); if( p_aout->p_sys->p_vout == NULL ) { - intf_ErrMsg( "aout scope error: no suitable vout module" ); + msg_Err( p_aout, "no suitable vout module" ); free( p_aout->p_sys ); return -1; } @@ -147,12 +140,13 @@ static int aout_Open( aout_thread_t *p_aout ) p_aout->p_sys->aout.i_rate = p_aout->i_rate; p_aout->p_sys->aout.i_channels = p_aout->i_channels; - p_aout->p_sys->aout.p_module = module_Need( MODULE_CAPABILITY_AOUT, "", - (void *)&p_aout->p_sys->aout ); + p_aout->p_sys->aout.p_module = + module_Need( p_aout, MODULE_CAPABILITY_AOUT, + "", (void *)&p_aout->p_sys->aout ); if( p_aout->p_sys->aout.p_module == NULL ) { - intf_ErrMsg( "aout scope error: no suitable aout module" ); - vout_DestroyThread( p_aout->p_sys->p_vout, NULL ); + msg_Err( p_aout, "no suitable aout module" ); + vout_DestroyThread( p_aout->p_sys->p_vout ); free( p_aout->p_sys ); return -1; } @@ -193,7 +187,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) if( p_aout->p_sys->aout.i_format != p_aout->i_format || p_aout->p_sys->aout.i_channels != p_aout->i_channels ) { - intf_ErrMsg( "aout error: plugin isn't cooperative" ); + msg_Err( p_aout, "plugin is not very cooperative" ); return 0; } @@ -315,7 +309,7 @@ static void aout_Close( aout_thread_t *p_aout ) { p_aout->p_sys->aout.pf_close( &p_aout->p_sys->aout ); module_Unneed( p_aout->p_sys->aout.p_module ); - vout_DestroyThread( p_aout->p_sys->p_vout, NULL ); + vout_DestroyThread( p_aout->p_sys->p_vout ); free( p_aout->p_sys ); } diff --git a/plugins/ggi/ggi.c b/plugins/ggi/ggi.c index ba5735d650..25afcf951f 100644 --- a/plugins/ggi/ggi.c +++ b/plugins/ggi/ggi.c @@ -2,7 +2,7 @@ * ggi.c : GGI plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: ggi.c,v 1.20 2002/04/19 13:56:11 sam Exp $ + * $Id: ggi.c,v 1.21 2002/06/01 12:31:59 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -31,13 +31,9 @@ #include -#include - -#include "video.h" -#include "video_output.h" - -#include "intf_msg.h" -#include "interface.h" +#include +#include +#include /***************************************************************************** * Local prototypes. @@ -72,7 +68,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( "General Graphics Interface video output" ) ADD_CAPABILITY( VOUT, 30 ) - ADD_SHORTCUT( "ggi" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -88,7 +83,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the GGI specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { /* GGI system informations */ ggi_visual_t p_display; /* display device */ @@ -100,8 +95,8 @@ typedef struct vout_sys_s ggi_directbuffer * pp_buffer[2]; /* buffers */ int i_index; - boolean_t b_must_acquire; /* must be acquired before writing */ -} vout_sys_t; + vlc_bool_t b_must_acquire; /* must be acquired before writing */ +}; /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -131,14 +126,14 @@ 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( "vout error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Open and initialize device */ if( OpenDisplay( p_vout ) ) { - intf_ErrMsg( "vout error: can't initialize GGI display" ); + msg_Err( p_vout, "cannot initialize GGI display" ); free( p_vout->p_sys ); return( 1 ); } @@ -180,7 +175,8 @@ int vout_Init( vout_thread_t *p_vout ) case 32: p_vout->output.i_chroma = FOURCC_RV32; break; default: - intf_ErrMsg( "vout error: unknown screen depth" ); + msg_Err( p_vout, "unknown screen depth %i", + p_vout->p_sys->i_bits_per_pixel ); return 0; } @@ -314,7 +310,7 @@ int vout_Manage( vout_thread_t *p_vout ) case 'Q': case GIIUC_Escape: /* FIXME pass message ! */ - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; default: @@ -327,8 +323,16 @@ int vout_Manage( vout_thread_t *p_vout ) switch( event.pbutton.button ) { case GII_PBUTTON_RIGHT: - /* FIXME: need locking ! */ - p_main->p_intf->b_menu_change = 1; + { + intf_thread_t *p_intf; + p_intf = vlc_object_find( p_vout->p_vlc, + VLC_OBJECT_INTF, FIND_CHILD ); + if( p_intf ) + { + p_intf->b_menu_change = 1; + vlc_object_release( p_intf ); + } + } break; } break; @@ -401,27 +405,27 @@ static int OpenDisplay( vout_thread_t *p_vout ) /* Initialize library */ if( ggiInit() ) { - intf_ErrMsg( "vout error: can't initialize GGI library" ); + msg_Err( p_vout, "cannot initialize GGI library" ); return( 1 ); } /* Open display */ - psz_display = config_GetPszVariable( "ggi_display" ); + psz_display = config_GetPsz( p_vout, "ggi_display" ); p_vout->p_sys->p_display = ggiOpen( psz_display, NULL ); if( psz_display ) free( psz_display ); if( p_vout->p_sys->p_display == NULL ) { - intf_ErrMsg( "vout error: can't open GGI default display" ); + msg_Err( p_vout, "cannot open GGI default display" ); ggiExit(); return( 1 ); } /* Find most appropriate mode */ p_vout->p_sys->mode.frames = 2; /* 2 buffers */ - p_vout->p_sys->mode.visible.x = config_GetIntVariable( "width" ); - p_vout->p_sys->mode.visible.y = config_GetIntVariable( "height" ); + p_vout->p_sys->mode.visible.x = config_GetInt( p_vout, "width" ); + p_vout->p_sys->mode.visible.y = config_GetInt( p_vout, "height" ); p_vout->p_sys->mode.virt.x = GGI_AUTO; p_vout->p_sys->mode.virt.y = GGI_AUTO; p_vout->p_sys->mode.size.x = GGI_AUTO; @@ -436,7 +440,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) /* Set mode */ if( ggiSetMode( p_vout->p_sys->p_display, &p_vout->p_sys->mode ) ) { - intf_ErrMsg( "vout error: can't set GGI mode" ); + msg_Err( p_vout, "cannot set GGI mode" ); ggiClose( p_vout->p_sys->p_display ); ggiExit(); return( 1 ); @@ -452,7 +456,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) i_index ); if( p_b[ i_index ] == NULL ) { - intf_ErrMsg( "vout error: double buffering is not possible" ); + msg_Err( p_vout, "double buffering is not possible" ); ggiClose( p_vout->p_sys->p_display ); ggiExit(); return( 1 ); @@ -465,7 +469,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) || ( p_b[ i_index ]->noaccess != 0 ) || ( p_b[ i_index ]->align != 0 ) ) { - intf_ErrMsg( "vout error: incorrect video memory type" ); + msg_Err( p_vout, "incorrect video memory type" ); ggiClose( p_vout->p_sys->p_display ); ggiExit(); return( 1 ); @@ -486,7 +490,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) ggiSetGCBackground(p_vout->p_sys->p_display, ggiMapColor(p_vout->p_sys->p_display,&col_bg)) ) { - intf_ErrMsg( "vout error: can't set colors" ); + msg_Err( p_vout, "cannot set colors" ); ggiClose( p_vout->p_sys->p_display ); ggiExit(); return( 1 ); @@ -497,7 +501,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) p_vout->p_sys->mode.visible.x, p_vout->p_sys->mode.visible.y ) ) { - intf_ErrMsg( "vout error: can't set clipping" ); + msg_Err( p_vout, "cannot set clipping" ); ggiClose( p_vout->p_sys->p_display ); ggiExit(); return( 1 ); @@ -545,7 +549,7 @@ static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue ) /* Set palette */ if( ggiSetPalette( p_vout->p_sys->p_display, 0, 256, colors ) < 0 ) { - intf_ErrMsg( "vout error: failed setting palette" ); + msg_Err( p_vout, "failed setting palette" ); } } diff --git a/plugins/glide/glide.c b/plugins/glide/glide.c index 7a6b60aa35..4e8efa84b3 100644 --- a/plugins/glide/glide.c +++ b/plugins/glide/glide.c @@ -2,7 +2,7 @@ * glide.c : 3dfx Glide plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: glide.c,v 1.14 2002/04/19 13:56:11 sam Exp $ + * $Id: glide.c,v 1.15 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,19 +28,16 @@ #include /* malloc(), free() */ #include +#include +#include +#include + #ifndef __linux__ # include /* for glide ? */ #endif #include #include /* Glide kbhit() and getch() */ -#include - -#include "video.h" -#include "video_output.h" - -#include "interface.h" - #define GLIDE_WIDTH 800 #define GLIDE_HEIGHT 600 #define GLIDE_BITS_PER_PLANE 16 @@ -71,7 +68,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("3dfx Glide module") ) ADD_CAPABILITY( VOUT, 20 ) - ADD_SHORTCUT( "glide" ) ADD_SHORTCUT( "3dfx" ) MODULE_INIT_STOP @@ -88,14 +84,13 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Glide specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { GrLfbInfo_t p_buffer_info; /* back buffer info */ u8* pp_buffer[2]; int i_index; - -} vout_sys_t; +}; /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -123,14 +118,14 @@ 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) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Open and initialize device */ if( OpenDisplay( p_vout ) ) { - intf_ErrMsg("vout error: can't open display"); + msg_Err( p_vout, "cannot open display" ); free( p_vout->p_sys ); return( 1 ); } @@ -231,7 +226,7 @@ int vout_Manage( vout_thread_t *p_vout ) switch( (char)buf ) { case 'q': - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; default: @@ -264,7 +259,7 @@ void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, &p_vout->p_sys->p_buffer_info) == FXFALSE ) { - intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" ); + msg_Err( p_vout, "cannot take 3dfx back buffer lock" ); } } @@ -286,7 +281,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( !grSstQueryHardware(&hwconfig) ) { - intf_ErrMsg( "vout error: can't get 3dfx hardware config" ); + msg_Err( p_vout, "cannot get 3dfx hardware config" ); return( 1 ); } @@ -294,7 +289,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( !grSstWinOpen( 0, resolution, GR_REFRESH_60Hz, GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1 ) ) { - intf_ErrMsg( "vout error: can't open 3dfx screen" ); + msg_Err( p_vout, "cannot open 3dfx screen" ); return( 1 ); } @@ -316,7 +311,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, &p_front_buffer_info) == FXFALSE ) { - intf_ErrMsg( "vout error: can't take 3dfx front buffer lock" ); + msg_Err( p_vout, "cannot take 3dfx front buffer lock" ); grGlideShutdown(); return( 1 ); } @@ -326,7 +321,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, &p_vout->p_sys->p_buffer_info) == FXFALSE ) { - intf_ErrMsg( "vout error: can't take 3dfx back buffer lock" ); + msg_Err( p_vout, "cannot take 3dfx back buffer lock" ); grGlideShutdown(); return( 1 ); } diff --git a/plugins/gtk/fixfiles.sh b/plugins/gtk/fixfiles.sh deleted file mode 100755 index 496fc3c51b..0000000000 --- a/plugins/gtk/fixfiles.sh +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh - -# Run this file after building source with Glade. -# - -for file in gnome_interface.c gtk_interface.c -do - if grep -q "DO NOT EDIT THIS FILE" $file - then - rm -f /tmp/$$.$file.bak - cat > /tmp/$$.$file.bak << EOF -/* This file was created automatically by glade and fixed by fixfiles.sh */ - -#include -EOF - tail +8 $file \ - | sed 's#_("/dev/dvd")#config_GetPszVariable( "dvd" )#' \ - | sed 's#11954#config_GetIntVariable( "frequency" )#' \ - | sed 's#27500#config_GetIntVariable( "symbol-rate" )#' \ - >> /tmp/$$.$file.bak - mv -f /tmp/$$.$file.bak $file - fi -done - -file=gtk_support.h -if grep -q "DO NOT EDIT THIS FILE" $file -then - rm -f /tmp/$$.$file.bak - sed 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by fixfiles.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < $file > /tmp/$$.$file.bak - mv -f /tmp/$$.$file.bak $file -fi - diff --git a/plugins/gtk/gnome.c b/plugins/gtk/gnome.c index a75b226f75..6dd6299ce7 100644 --- a/plugins/gtk/gnome.c +++ b/plugins/gtk/gnome.c @@ -2,7 +2,7 @@ * gnome.c : Gnome plugin for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: gnome.c,v 1.23 2002/05/30 13:39:43 asmax Exp $ + * $Id: gnome.c,v 1.24 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -29,19 +29,11 @@ #include /* strerror() */ #include -#include +#include +#include #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - -#include "video.h" -#include "video_output.h" - #include "gnome_callbacks.h" #include "gnome_interface.h" #include "gnome_support.h" @@ -58,6 +50,11 @@ static void intf_Run ( intf_thread_t *p_intf ); static gint GnomeManage ( gpointer p_data ); +/***************************************************************************** + * Local variables (mutex-protected). + *****************************************************************************/ +static void ** pp_global_data; + /***************************************************************************** * Building configuration tree *****************************************************************************/ @@ -83,6 +80,7 @@ ADD_INTEGER( "gnome-prefs-maxh", 480, NULL, PREFS_MAXH_TEXT, MODULE_CONFIG_STOP MODULE_INIT_START + pp_global_data = p_module->p_vlc->pp_global_data; SET_DESCRIPTION( _("Gnome interface module") ) #ifndef WIN32 if( getenv( "DISPLAY" ) == NULL ) @@ -94,7 +92,6 @@ MODULE_INIT_START { ADD_CAPABILITY( INTF, 100 ) } - ADD_SHORTCUT( "gnome" ) ADD_PROGRAM( "gnome-vlc" ) MODULE_INIT_STOP @@ -115,7 +112,7 @@ MODULE_DEACTIVATE_STOP *****************************************************************************/ void g_atexit( GVoidFunc func ) { - intf_thread_t *p_intf = p_main->p_intf; + intf_thread_t *p_intf = (intf_thread_t *)*pp_global_data; int i_dummy; for( i_dummy = 0; @@ -127,7 +124,7 @@ void g_atexit( GVoidFunc func ) if( i_dummy >= MAX_ATEXIT - 1 ) { - intf_ErrMsg( "intf error: too many atexit() callbacks to register" ); + msg_Err( p_intf, "too many atexit() callbacks to register" ); return; } @@ -155,11 +152,11 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM)); + msg_Err( p_intf, "out of memory" ); return( 1 ); } - p_intf->p_sys->p_sub = intf_MsgSub(); + p_intf->p_sys->p_sub = msg_Subscribe( p_intf->p_this ); /* Initialize Gnome thread */ p_intf->p_sys->b_playing = 0; @@ -167,6 +164,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys->b_window_changed = 0; p_intf->p_sys->b_playlist_changed = 0; + p_intf->p_sys->p_input = NULL; p_intf->p_sys->i_playing = -1; p_intf->p_sys->b_slider_free = 1; @@ -182,7 +180,7 @@ static int intf_Open( intf_thread_t *p_intf ) *****************************************************************************/ static void intf_Close( intf_thread_t *p_intf ) { - intf_MsgUnsub( p_intf->p_sys->p_sub ); + msg_Unsubscribe( p_intf->p_this, p_intf->p_sys->p_sub ); /* Destroy structure */ free( p_intf->p_sys ); @@ -213,7 +211,13 @@ static void intf_Run( intf_thread_t *p_intf ) }; /* Initialize Gnome */ - gnome_init( p_main->psz_arg0, VERSION, i_args, p_args ); + + /* gnome_init will register stuff with g_atexit, so we need to take + * the global lock if we want to be able to intercept the calls */ + vlc_mutex_lock( p_intf->p_vlc->p_global_lock ); + *p_intf->p_vlc->pp_global_data = p_intf; + gnome_init( p_intf->p_vlc->psz_object_name, VERSION, i_args, p_args ); + vlc_mutex_unlock( p_intf->p_vlc->p_global_lock ); /* Create some useful widgets that will certainly be used */ p_intf->p_sys->p_window = create_intf_window( ); @@ -262,6 +266,8 @@ static void intf_Run( intf_thread_t *p_intf ) p_intf->p_sys->f_adj_oldvalue = 0; #undef P_SLIDER + p_intf->p_sys->p_tooltips = gtk_tooltips_new(); + /* We don't create these ones yet because we perhaps won't need them */ p_intf->p_sys->p_about = NULL; p_intf->p_sys->p_modules = NULL; @@ -270,17 +276,20 @@ static void intf_Run( intf_thread_t *p_intf ) p_intf->p_sys->p_network = NULL; p_intf->p_sys->p_sat = NULL; p_intf->p_sys->p_jump = NULL; - p_intf->p_sys->p_tooltips = gtk_tooltips_new(); /* Hide tooltips if the option is set */ - if( !config_GetIntVariable( "gnome-tooltips" ) ) + if( !config_GetInt( p_intf, "gnome-tooltips" ) ) + { gtk_tooltips_disable( p_intf->p_sys->p_tooltips ); + } /* Hide toolbar text of the option is set */ - if( !config_GetIntVariable( "gnome-toolbartext" ) ) + if( !config_GetInt( p_intf, "gnome-toolbartext" ) ) + { gtk_toolbar_set_style( GTK_TOOLBAR(lookup_widget( p_intf->p_sys->p_window, "toolbar" )), GTK_TOOLBAR_ICONS ); + } /* Store p_intf to keep an eye on it */ gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window), @@ -334,11 +343,6 @@ static void intf_Run( intf_thread_t *p_intf ) static gint GnomeManage( gpointer p_data ) { #define p_intf ((intf_thread_t *)p_data) - static GdkColor white = { 0, 0xffff, 0xffff, 0xffff }; - static GdkColor red = { 0, 0xffff, 0x6666, 0x6666 }; - static GdkColor gray = { 0, 0xaaaa, 0xaaaa, 0xaaaa }; - GdkColor *p_color; - int i_start, i_stop; vlc_mutex_lock( &p_intf->change_lock ); @@ -365,27 +369,32 @@ static gint GnomeManage( gpointer p_data ) if( p_intf->p_sys->p_sub->i_start != i_stop ) { + static GdkColor white = { 0, 0xffff, 0xffff, 0xffff }; + static GdkColor gray = { 0, 0xaaaa, 0xaaaa, 0xaaaa }; + static GdkColor yellow = { 0, 0xffff, 0xffff, 0x6666 }; + static GdkColor red = { 0, 0xffff, 0x6666, 0x6666 }; + + static const char * ppsz_type[4] = { ": ", " error: ", " warning: ", + " debug: " }; + static GdkColor * pp_color[4] = { &white, &red, &yellow, &gray }; + for( i_start = p_intf->p_sys->p_sub->i_start; i_start != i_stop; - i_start = (i_start+1) % INTF_MSG_QSIZE ) + i_start = (i_start+1) % VLC_MSG_QSIZE ) { /* Append all messages to log window */ - switch( p_intf->p_sys->p_sub->p_msg[i_start].i_type ) - { - case INTF_MSG_ERR: - p_color = &red; - break; - case INTF_MSG_WARN: - p_color = &gray; - break; - default: - p_color = &white; - break; - } + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, + NULL, p_intf->p_sys->p_sub->p_msg[i_start].psz_module, -1 ); - gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, p_color, - NULL, p_intf->p_sys->p_sub->p_msg[i_start].psz_msg, -1 ); - gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, p_color, + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, + NULL, ppsz_type[p_intf->p_sys->p_sub->p_msg[i_start].i_type], + -1 ); + + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, + pp_color[p_intf->p_sys->p_sub->p_msg[i_start].i_type], NULL, + p_intf->p_sys->p_sub->p_msg[i_start].psz_msg, -1 ); + + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, NULL, "\n", -1 ); } @@ -400,14 +409,32 @@ static gint GnomeManage( gpointer p_data ) /* Update the playlist */ GtkPlayListManage( p_intf ); - if( p_input_bank->pp_input[0] != NULL && !p_intf->b_die ) + /* Update the input */ + if( p_intf->p_sys->p_input != NULL ) { - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + if( p_intf->p_sys->p_input->b_dead ) + { + vlc_object_release( p_intf->p_sys->p_input ); + p_intf->p_sys->p_input = NULL; + } + } + + if( p_intf->p_sys->p_input == NULL ) + { + p_intf->p_sys->p_input = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_INPUT, FIND_CHILD ); + } - if( !p_input_bank->pp_input[0]->b_die ) + if( p_intf->p_sys->p_input ) + { + input_thread_t *p_input = p_intf->p_sys->p_input; + + vlc_mutex_lock( &p_input->stream.stream_lock ); + + if( !p_input->b_die ) { /* New input or stream map change */ - if( p_input_bank->pp_input[0]->stream.b_changed ) + if( p_input->stream.b_changed ) { GtkModeManage( p_intf ); GtkSetupMenus( p_intf ); @@ -415,19 +442,18 @@ static gint GnomeManage( gpointer p_data ) } /* Manage the slider */ - if( p_input_bank->pp_input[0]->stream.b_seekable && - p_intf->p_sys->b_playing ) + if( p_input->stream.b_seekable && p_intf->p_sys->b_playing ) { - float newvalue; - newvalue = p_intf->p_sys->p_adj->value; + float newvalue = p_intf->p_sys->p_adj->value; -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_input->stream.p_selected_area /* If the user hasn't touched the slider since the last time, * then the input can safely change it */ if( newvalue == p_intf->p_sys->f_adj_oldvalue ) { /* Update the value */ - p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = + p_intf->p_sys->p_adj->value = + p_intf->p_sys->f_adj_oldvalue = ( 100. * p_area->i_tell ) / p_area->i_size; gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), @@ -439,9 +465,9 @@ static gint GnomeManage( gpointer p_data ) { off_t i_seek = ( newvalue * p_area->i_size ) / 100; - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); - input_Seek( p_input_bank->pp_input[0], i_seek ); - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_input->stream.stream_lock ); + input_Seek( p_input, i_seek, INPUT_SEEK_SET ); + vlc_mutex_lock( &p_input->stream.stream_lock ); /* Update the old value */ p_intf->p_sys->f_adj_oldvalue = newvalue; @@ -450,25 +476,22 @@ static gint GnomeManage( gpointer p_data ) } if( p_intf->p_sys->i_part != - p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) + p_input->stream.p_selected_area->i_part ) { p_intf->p_sys->b_chapter_update = 1; GtkSetupMenus( p_intf ); } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_input->stream.stream_lock ); } - else if( p_intf->p_sys->b_playing && !p_intf->b_die ) + else if( p_intf->p_sys->b_playing && !p_intf->p_vlc->b_die ) { GtkModeManage( p_intf ); p_intf->p_sys->b_playing = 0; } - /* Manage core vlc functions through the callback */ - p_intf->pf_manage( p_intf ); - - if( p_intf->b_die ) + if( p_intf->p_vlc->b_die ) { vlc_mutex_unlock( &p_intf->change_lock ); diff --git a/plugins/gtk/gnome.glade b/plugins/gtk/gnome.glade index d62ad3066b..d4ebd212ec 100644 --- a/plugins/gtk/gnome.glade +++ b/plugins/gtk/gnome.glade @@ -764,7 +764,7 @@ Sat, 19 May 2001 03:13:28 GMT GNOME_STOCK_BUTTON_PREV - GTK_RELIEF_NONE + GTK_RELIEF_NORMAL 0 False @@ -783,7 +783,7 @@ Sat, 19 May 2001 03:13:23 GMT GNOME_STOCK_BUTTON_NEXT - GTK_RELIEF_NONE + GTK_RELIEF_NORMAL 0 False @@ -859,7 +859,7 @@ Tue, 29 May 2001 13:13:41 GMT GNOME_STOCK_BUTTON_DOWN - GTK_RELIEF_NONE + GTK_RELIEF_NORMAL 0 False @@ -879,7 +879,7 @@ Sat, 19 May 2001 03:13:08 GMT GNOME_STOCK_BUTTON_UP - GTK_RELIEF_NONE + GTK_RELIEF_NORMAL 0 False diff --git a/plugins/gtk/gnome_callbacks.c b/plugins/gtk/gnome_callbacks.c index a5cf9d526f..b40bc703f2 100644 --- a/plugins/gtk/gnome_callbacks.c +++ b/plugins/gtk/gnome_callbacks.c @@ -1,13 +1,39 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include +/***************************************************************************** + * gnome_callbacks.c : GNOME-specific callbacks. + ***************************************************************************** + * Copyright (C) 2000, 2001, 2002 VideoLAN + * $Id: gnome_callbacks.c,v 1.10 2002/06/01 12:31:59 sam Exp $ + * + * Authors: Samuel Hocevar + * Stéphane Borel + * + * 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. + *****************************************************************************/ + +/***************************************************************************** + * Preamble + *****************************************************************************/ +#include +#include #include "gnome_callbacks.h" #include "gnome_interface.h" #include "gnome_support.h" +#include + /* * These wrappers are made necessary by a bug in glade that seems not * to put user_data in c source of menuitems. diff --git a/plugins/gtk/gnome_interface.c b/plugins/gtk/gnome_interface.c index e35bac611d..8c2d665e1d 100644 --- a/plugins/gtk/gnome_interface.c +++ b/plugins/gtk/gnome_interface.c @@ -1,6 +1,6 @@ -/* This file was created automatically by glade and fixed by fixfiles.sh */ +/* This file was created automatically by glade and fixed by bootstrap.sh */ -#include +#include #include #include @@ -542,7 +542,7 @@ create_intf_window (void) gtk_widget_show (vbox8); gnome_app_set_contents (GNOME_APP (intf_window), vbox8); - slider_frame = gtk_frame_new (_("-:--:--")); + slider_frame = gtk_frame_new ("-:--:--"); gtk_widget_ref (slider_frame); gtk_object_set_data_full (GTK_OBJECT (intf_window), "slider_frame", slider_frame, (GtkDestroyNotify) gtk_widget_unref); @@ -599,7 +599,7 @@ create_intf_window (void) gtk_widget_show (label19); gtk_box_pack_start (GTK_BOX (title_chapter_box), label19, FALSE, FALSE, 0); - title_label = gtk_label_new (_("--")); + title_label = gtk_label_new ("--"); gtk_widget_ref (title_label); gtk_object_set_data_full (GTK_OBJECT (intf_window), "title_label", title_label, (GtkDestroyNotify) gtk_widget_unref); @@ -613,7 +613,6 @@ create_intf_window (void) gtk_widget_show (button_title_prev); gtk_box_pack_start (GTK_BOX (title_chapter_box), button_title_prev, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_title_prev, _("Select previous title"), NULL); - gtk_button_set_relief (GTK_BUTTON (button_title_prev), GTK_RELIEF_NONE); button_title_next = gnome_stock_button (GNOME_STOCK_BUTTON_NEXT); gtk_widget_ref (button_title_next); @@ -621,7 +620,6 @@ create_intf_window (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_title_next); gtk_box_pack_start (GTK_BOX (title_chapter_box), button_title_next, FALSE, FALSE, 0); - gtk_button_set_relief (GTK_BUTTON (button_title_next), GTK_RELIEF_NONE); vseparator1 = gtk_vseparator_new (); gtk_widget_ref (vseparator1); @@ -644,7 +642,7 @@ create_intf_window (void) gtk_widget_show (label20); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), label20, FALSE, FALSE, 0); - chapter_label = gtk_label_new (_("---")); + chapter_label = gtk_label_new ("---"); gtk_widget_ref (chapter_label); gtk_object_set_data_full (GTK_OBJECT (intf_window), "chapter_label", chapter_label, (GtkDestroyNotify) gtk_widget_unref); @@ -658,7 +656,6 @@ create_intf_window (void) gtk_widget_show (button_chapter_prev); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), button_chapter_prev, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_chapter_prev, _("Select previous chapter"), NULL); - gtk_button_set_relief (GTK_BUTTON (button_chapter_prev), GTK_RELIEF_NONE); button_chapter_next = gnome_stock_button (GNOME_STOCK_BUTTON_UP); gtk_widget_ref (button_chapter_next); @@ -667,7 +664,6 @@ create_intf_window (void) gtk_widget_show (button_chapter_next); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), button_chapter_next, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_chapter_next, _("Select next chapter"), NULL); - gtk_button_set_relief (GTK_BUTTON (button_chapter_next), GTK_RELIEF_NONE); network_box = gtk_hbox_new (TRUE, 0); gtk_widget_ref (network_box); @@ -1369,7 +1365,7 @@ create_intf_disc (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_name); gtk_box_pack_start (GTK_BOX (hbox1), disc_name, TRUE, TRUE, 0); - gtk_entry_set_text (GTK_ENTRY (disc_name), config_GetPszVariable( "dvd" )); + gtk_entry_set_text (GTK_ENTRY (disc_name), "/dev/dvd"); dialog_action_area4 = GNOME_DIALOG (intf_disc)->action_area; gtk_object_set_data (GTK_OBJECT (intf_disc), "dialog_action_area4", dialog_action_area4); @@ -2320,7 +2316,7 @@ create_intf_open (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (entry1); gtk_box_pack_start (GTK_BOX (hbox6), entry1, TRUE, TRUE, 0); - gtk_entry_set_text (GTK_ENTRY (entry1), config_GetPszVariable( "dvd" )); + gtk_entry_set_text (GTK_ENTRY (entry1), "/dev/dvd"); tab_disc = gtk_label_new (_("Disc")); gtk_widget_ref (tab_disc); @@ -2700,7 +2696,7 @@ create_intf_sat (void) (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5); - sat_freq_adj = gtk_adjustment_new (config_GetIntVariable( "frequency" ), 10000, 12999, 1, 10, 10); + sat_freq_adj = gtk_adjustment_new (11954, 10000, 12999, 1, 10, 10); sat_freq = gtk_spin_button_new (GTK_ADJUSTMENT (sat_freq_adj), 1, 0); gtk_widget_ref (sat_freq); gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_freq", sat_freq, @@ -2751,7 +2747,7 @@ create_intf_sat (void) (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5); - sat_srate_adj = gtk_adjustment_new (config_GetIntVariable( "symbol-rate" ), 1000, 30000, 1, 10, 10); + sat_srate_adj = gtk_adjustment_new (27500, 1000, 30000, 1, 10, 10); sat_srate = gtk_spin_button_new (GTK_ADJUSTMENT (sat_srate_adj), 1, 0); gtk_widget_ref (sat_srate); gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_srate", sat_srate, @@ -2779,13 +2775,13 @@ create_intf_sat (void) gtk_table_attach (GTK_TABLE (table5), sat_fec, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("1/2")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("2/3")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("3/4")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("4/5")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("5/6")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("6/7")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("7/8")); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "1/2"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "2/3"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "3/4"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "4/5"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "5/6"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "6/7"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "7/8"); gtk_combo_set_popdown_strings (GTK_COMBO (sat_fec), sat_fec_items); g_list_free (sat_fec_items); @@ -2794,7 +2790,7 @@ create_intf_sat (void) gtk_object_set_data_full (GTK_OBJECT (intf_sat), "combo_entry4", combo_entry4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo_entry4); - gtk_entry_set_text (GTK_ENTRY (combo_entry4), _("3/4")); + gtk_entry_set_text (GTK_ENTRY (combo_entry4), "3/4"); hbuttonbox2 = GNOME_DIALOG (intf_sat)->action_area; gtk_object_set_data (GTK_OBJECT (intf_sat), "hbuttonbox2", hbuttonbox2); diff --git a/plugins/gtk/gtk.c b/plugins/gtk/gtk.c index fa5d0ccd96..8078afcdc9 100644 --- a/plugins/gtk/gtk.c +++ b/plugins/gtk/gtk.c @@ -2,7 +2,7 @@ * gtk.c : Gtk+ plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: gtk.c,v 1.23 2002/05/30 08:17:04 gbazin Exp $ + * $Id: gtk.c,v 1.24 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -29,19 +29,11 @@ #include /* strerror() */ #include -#include +#include +#include #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - -#include "video.h" -#include "video_output.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" @@ -59,6 +51,11 @@ static void intf_Run ( intf_thread_t *p_intf ); static gint GtkManage ( gpointer p_data ); +/***************************************************************************** + * Local variables (mutex-protected). + *****************************************************************************/ +static void ** pp_global_data; + /***************************************************************************** * Building configuration tree *****************************************************************************/ @@ -77,6 +74,7 @@ ADD_INTEGER( "gtk-prefs-maxh", 480, NULL, PREFS_MAXH_TEXT, PREFS_MAXH_LONGTEXT) MODULE_CONFIG_STOP MODULE_INIT_START + pp_global_data = p_module->p_vlc->pp_global_data; SET_DESCRIPTION( _("Gtk+ interface module") ) #ifndef WIN32 if( getenv( "DISPLAY" ) == NULL ) @@ -88,7 +86,6 @@ MODULE_INIT_START { ADD_CAPABILITY( INTF, 90 ) } - ADD_SHORTCUT( "gtk" ) ADD_PROGRAM( "gvlc" ) MODULE_INIT_STOP @@ -109,7 +106,7 @@ MODULE_DEACTIVATE_STOP *****************************************************************************/ void g_atexit( GVoidFunc func ) { - intf_thread_t *p_intf = p_main->p_intf; + intf_thread_t *p_intf = (intf_thread_t *)*pp_global_data; int i_dummy; for( i_dummy = 0; @@ -121,7 +118,7 @@ void g_atexit( GVoidFunc func ) if( i_dummy >= MAX_ATEXIT - 1 ) { - intf_ErrMsg( "intf error: too many atexit() callbacks to register" ); + msg_Err( p_intf, "too many atexit() callbacks to register" ); return; } @@ -149,11 +146,11 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM)); + msg_Err( p_intf, "out of memory" ); return( 1 ); } - p_intf->p_sys->p_sub = intf_MsgSub(); + p_intf->p_sys->p_sub = msg_Subscribe( p_intf->p_this ); /* Initialize Gtk+ thread */ p_intf->p_sys->b_playing = 0; @@ -161,6 +158,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys->b_window_changed = 0; p_intf->p_sys->b_playlist_changed = 0; + p_intf->p_sys->p_input = NULL; p_intf->p_sys->i_playing = -1; p_intf->p_sys->b_slider_free = 1; @@ -176,7 +174,7 @@ static int intf_Open( intf_thread_t *p_intf ) *****************************************************************************/ static void intf_Close( intf_thread_t *p_intf ) { - intf_MsgUnsub( p_intf->p_sys->p_sub ); + msg_Unsubscribe( p_intf->p_this, p_intf->p_sys->p_sub ); /* Destroy structure */ free( p_intf->p_sys ); @@ -208,7 +206,13 @@ static void intf_Run( intf_thread_t *p_intf ) }; /* Initialize Gtk+ */ + + /* gtk_init will register stuff with g_atexit, so we need to take + * the global lock if we want to be able to intercept the calls */ + vlc_mutex_lock( p_intf->p_vlc->p_global_lock ); + *p_intf->p_vlc->pp_global_data = p_intf; gtk_init( &i_args, &pp_args ); + vlc_mutex_unlock( p_intf->p_vlc->p_global_lock ); /* Create some useful widgets that will certainly be used */ p_intf->p_sys->p_window = create_intf_window(); @@ -269,8 +273,10 @@ static void intf_Run( intf_thread_t *p_intf ) p_intf->p_sys->p_jump = NULL; /* Hide tooltips if the option is set */ - if( !config_GetIntVariable( "gtk-tooltips" ) ) + if( !config_GetInt( p_intf, "gtk-tooltips" ) ) + { gtk_tooltips_disable( p_intf->p_sys->p_tooltips ); + } /* Store p_intf to keep an eye on it */ gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window), @@ -324,11 +330,6 @@ static void intf_Run( intf_thread_t *p_intf ) static gint GtkManage( gpointer p_data ) { #define p_intf ((intf_thread_t *)p_data) - static GdkColor white = { 0, 0xffff, 0xffff, 0xffff }; - static GdkColor red = { 0, 0xffff, 0x6666, 0x6666 }; - static GdkColor gray = { 0, 0xaaaa, 0xaaaa, 0xaaaa }; - GdkColor *p_color; - int i_start, i_stop; vlc_mutex_lock( &p_intf->change_lock ); @@ -354,27 +355,32 @@ static gint GtkManage( gpointer p_data ) if( p_intf->p_sys->p_sub->i_start != i_stop ) { + static GdkColor white = { 0, 0xffff, 0xffff, 0xffff }; + static GdkColor gray = { 0, 0xaaaa, 0xaaaa, 0xaaaa }; + static GdkColor yellow = { 0, 0xffff, 0xffff, 0x6666 }; + static GdkColor red = { 0, 0xffff, 0x6666, 0x6666 }; + + static const char * ppsz_type[4] = { ": ", " error: ", " warning: ", + " debug: " }; + static GdkColor * pp_color[4] = { &white, &red, &yellow, &gray }; + for( i_start = p_intf->p_sys->p_sub->i_start; i_start != i_stop; - i_start = (i_start+1) % INTF_MSG_QSIZE ) + i_start = (i_start+1) % VLC_MSG_QSIZE ) { /* Append all messages to log window */ - switch( p_intf->p_sys->p_sub->p_msg[i_start].i_type ) - { - case INTF_MSG_ERR: - p_color = &red; - break; - case INTF_MSG_WARN: - p_color = &gray; - break; - default: - p_color = &white; - break; - } + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, + NULL, p_intf->p_sys->p_sub->p_msg[i_start].psz_module, -1 ); + + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, + NULL, ppsz_type[p_intf->p_sys->p_sub->p_msg[i_start].i_type], + -1 ); - gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, p_color, - NULL, p_intf->p_sys->p_sub->p_msg[i_start].psz_msg, -1 ); - gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, p_color, + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, + pp_color[p_intf->p_sys->p_sub->p_msg[i_start].i_type], NULL, + p_intf->p_sys->p_sub->p_msg[i_start].psz_msg, -1 ); + + gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, NULL, "\n", -1 ); } @@ -389,14 +395,32 @@ static gint GtkManage( gpointer p_data ) /* Update the playlist */ GtkPlayListManage( p_data ); - if( p_input_bank->pp_input[0] != NULL ) + /* Update the input */ + if( p_intf->p_sys->p_input != NULL ) { - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + if( p_intf->p_sys->p_input->b_dead ) + { + vlc_object_release( p_intf->p_sys->p_input ); + p_intf->p_sys->p_input = NULL; + } + } - if( !p_input_bank->pp_input[0]->b_die ) + if( p_intf->p_sys->p_input == NULL ) + { + p_intf->p_sys->p_input = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_INPUT, FIND_CHILD ); + } + + if( p_intf->p_sys->p_input ) + { + input_thread_t *p_input = p_intf->p_sys->p_input; + + vlc_mutex_lock( &p_input->stream.stream_lock ); + + if( !p_input->b_die ) { /* New input or stream map change */ - if( p_input_bank->pp_input[0]->stream.b_changed ) + if( p_input->stream.b_changed ) { GtkModeManage( p_intf ); GtkSetupMenus( p_intf ); @@ -404,18 +428,18 @@ static gint GtkManage( gpointer p_data ) } /* Manage the slider */ - if( p_input_bank->pp_input[0]->stream.b_seekable && - p_intf->p_sys->b_playing ) + if( p_input->stream.b_seekable && p_intf->p_sys->b_playing ) { float newvalue = p_intf->p_sys->p_adj->value; -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_input->stream.p_selected_area /* If the user hasn't touched the slider since the last time, * then the input can safely change it */ if( newvalue == p_intf->p_sys->f_adj_oldvalue ) { /* Update the value */ - p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = + p_intf->p_sys->p_adj->value = + p_intf->p_sys->f_adj_oldvalue = ( 100. * p_area->i_tell ) / p_area->i_size; gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), @@ -428,36 +452,33 @@ static gint GtkManage( gpointer p_data ) off_t i_seek = ( newvalue * p_area->i_size ) / 100; /* release the lock to be able to seek */ - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); - input_Seek( p_input_bank->pp_input[0], i_seek ); - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_input->stream.stream_lock ); + input_Seek( p_input, i_seek, INPUT_SEEK_SET ); + vlc_mutex_lock( &p_input->stream.stream_lock ); /* Update the old value */ p_intf->p_sys->f_adj_oldvalue = newvalue; } -# undef p_area +#undef p_area } if( p_intf->p_sys->i_part != - p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) + p_input->stream.p_selected_area->i_part ) { p_intf->p_sys->b_chapter_update = 1; GtkSetupMenus( p_intf ); } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_input->stream.stream_lock ); } - else if( p_intf->p_sys->b_playing && !p_intf->b_die ) + else if( p_intf->p_sys->b_playing && !p_intf->p_vlc->b_die ) { GtkModeManage( p_intf ); p_intf->p_sys->b_playing = 0; } - /* Manage core vlc functions through the callback */ - p_intf->pf_manage( p_intf ); - - if( p_intf->b_die ) + if( p_intf->p_vlc->b_die ) { vlc_mutex_unlock( &p_intf->change_lock ); diff --git a/plugins/gtk/gtk_callbacks.c b/plugins/gtk/gtk_callbacks.c index 6b895e1bd5..ca3414b10e 100644 --- a/plugins/gtk/gtk_callbacks.c +++ b/plugins/gtk/gtk_callbacks.c @@ -2,7 +2,7 @@ * gtk_callbacks.c : Callbacks for the Gtk+ plugin. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_callbacks.c,v 1.39 2002/05/18 02:12:20 ipkiss Exp $ + * $Id: gtk_callbacks.c,v 1.40 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -29,7 +29,9 @@ #include /* off_t */ #include -#include +#include +#include +#include #include @@ -37,16 +39,6 @@ #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" -#include "intf_eject.h" - -#include "video.h" -#include "video_output.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" @@ -69,7 +61,7 @@ gboolean GtkExit( GtkWidget *widget, intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); vlc_mutex_lock( &p_intf->change_lock ); - p_intf->b_die = 1; + p_intf->p_vlc->b_die = 1; vlc_mutex_unlock( &p_intf->change_lock ); return TRUE; @@ -108,20 +100,19 @@ gboolean GtkFullscreen( GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - if( p_vout_bank->i_count ) - { - vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock ); - - p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; + intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" ); + vout_thread_t *p_vout; - vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock ); + p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_CHILD ); - return TRUE; - } - else + if( p_vout ) { - return FALSE; + p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + vlc_object_release( p_vout ); + return TRUE; } + + return FALSE; } void GtkWindowDrag( GtkWidget *widget, @@ -133,17 +124,19 @@ void GtkWindowDrag( GtkWidget *widget, guint time, gpointer user_data) { +#if 0 /* PLAYLIST TARASS */ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), "intf_window" ); - int end = p_main->p_playlist->i_size; + int end = p_intf->p_vlc->p_playlist->i_size; GtkDropDataReceived( p_intf, data, info, PLAYLIST_END ); - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_sys->p_input != NULL ) { - /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + /* FIXME: temporary hack */ + p_intf->p_sys->p_input->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, end-1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, end-1 ); +#endif } @@ -185,26 +178,29 @@ gboolean GtkSliderPress( GtkWidget *widget, void GtkTitlePrev( GtkButton * button, gpointer user_data ) { - intf_thread_t * p_intf; - input_area_t * p_area; - int i_id; + intf_thread_t * p_intf; + input_area_t * p_area; + int i_id; p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data ); - i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1; + + i_id = p_intf->p_sys->p_input->stream.p_selected_area->i_id - 1; /* Disallow area 0 since it is used for video_ts.vob */ if( i_id > 0 ) { - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + p_area = p_intf->p_sys->p_input->stream.pp_areas[i_id]; + input_ChangeArea( p_intf->p_sys->p_input, (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); p_intf->p_sys->b_title_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkSetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); } + + vlc_object_release( p_intf->p_sys->p_input ); } @@ -215,19 +211,19 @@ void GtkTitleNext( GtkButton * button, gpointer user_data ) int i_id; p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data ); - i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1; + i_id = p_intf->p_sys->p_input->stream.p_selected_area->i_id + 1; - if( i_id < p_input_bank->pp_input[0]->stream.i_area_nb ) + if( i_id < p_intf->p_sys->p_input->stream.i_area_nb ) { - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + p_area = p_intf->p_sys->p_input->stream.pp_areas[i_id]; + input_ChangeArea( p_intf->p_sys->p_input, (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); p_intf->p_sys->b_title_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkSetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); } } @@ -239,19 +235,19 @@ void GtkChapterPrev( GtkButton * button, gpointer user_data ) input_area_t * p_area; p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data ); - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intf->p_sys->p_input->stream.p_selected_area; if( p_area->i_part > 0 ) { p_area->i_part--; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intf->p_sys->p_input, (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); p_intf->p_sys->b_chapter_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkSetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); } } @@ -262,19 +258,19 @@ void GtkChapterNext( GtkButton * button, gpointer user_data ) input_area_t * p_area; p_intf = GetIntf( GTK_WIDGET(button), (char*)user_data ); - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intf->p_sys->p_input->stream.p_selected_area; if( p_area->i_part < p_area->i_part_nb ) { p_area->i_part++; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intf->p_sys->p_input, (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); p_intf->p_sys->b_chapter_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkSetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); } } @@ -286,7 +282,7 @@ void GtkNetworkJoin( GtkEditable * editable, gpointer user_data ) int i_channel; i_channel = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( editable ) ); -// intf_WarnMsg( 3, "intf info: joining channel %d", i_channel ); +// msg_Dbg( "intf info: joining channel %d", i_channel ); // network_ChannelJoin( i_channel ); } @@ -304,35 +300,35 @@ void GtkChannelGo( GtkButton * button, gpointer user_data ) "network_channel_spinbutton" ) ); i_channel = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( spin ) ); - intf_WarnMsg( 3, "intf info: joining channel %d", i_channel ); + msg_Dbg( p_intf, "joining channel %d", i_channel ); vlc_mutex_lock( &p_intf->change_lock ); - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_sys->p_input != NULL ) { /* end playing item */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_sys->p_input->b_eof = 1; +#if 0 /* PLAYLIST TARASS */ /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->i_index--; + p_intf->p_vlc->p_playlist->b_stopped = 1; - /* FIXME: ugly hack to close input and outputs */ - p_intf->pf_manage( p_intf ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); +#endif } - network_ChannelJoin( i_channel ); + network_ChannelJoin( p_intf->p_this, i_channel ); /* FIXME 2 */ - p_main->p_playlist->b_stopped = 0; - p_intf->pf_manage( p_intf ); +#if 0 /* PLAYLIST TARASS */ + p_intf->p_vlc->p_playlist->b_stopped = 0; +#endif vlc_mutex_unlock( &p_intf->change_lock ); -// input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); +// input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); } @@ -393,37 +389,23 @@ gboolean GtkJumpShow( GtkWidget *widget, void GtkJumpOk( GtkButton *button, gpointer user_data) { - intf_thread_t * p_intf; - off_t i_seek; - off_t i_size; - int i_hours; - int i_minutes; - int i_seconds; - - p_intf = GetIntf( GTK_WIDGET( button ), (char*)user_data ); + intf_thread_t * p_intf = GetIntf( GTK_WIDGET( button ), (char*)user_data ); + int i_hours, i_minutes, i_seconds; #define GET_VALUE( name ) \ gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( gtk_object_get_data( \ GTK_OBJECT( p_intf->p_sys->p_jump ), name ) ) ) - i_hours = GET_VALUE( "jump_hour_spinbutton" ); i_minutes = GET_VALUE( "jump_minute_spinbutton" ); i_seconds = GET_VALUE( "jump_second_spinbutton" ); - #undef GET_VALUE - i_seconds += 60 *i_minutes + 3600* i_hours; - - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); - i_seek = i_seconds * 50 * p_input_bank->pp_input[0]->stream.i_mux_rate; - i_size = p_input_bank->pp_input[0]->stream.p_selected_area->i_size; - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + input_Seek( p_intf, i_seconds + 60 * i_minutes + 3600 * i_hours, + INPUT_SEEK_SECONDS | INPUT_SEEK_SET ); - if( i_seek < i_size ) - { - input_Seek( p_input_bank->pp_input[0], i_seek ); - } - p_main->p_playlist->b_stopped = 0; +#if 0 /* PLAYLIST TARASS */ + p_intf->p_vlc->p_playlist->b_stopped = 0; +#endif gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) ); } @@ -480,8 +462,12 @@ void GtkMessagesActivate( GtkMenuItem * menuitem, gpointer user_data ) gboolean GtkDiscEject ( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { +#if 0 /* PLAYLIST TARASS */ + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + char *psz_device = NULL; char *psz_parser; + char *psz_current = p_intf->p_vlc->p_playlist->current.psz_name; /* * Get the active input @@ -493,39 +479,39 @@ gboolean GtkDiscEject ( GtkWidget *widget, GdkEventButton *event, * Don't really know if I must lock the stuff here, we're using it read-only */ - if (p_main->p_playlist->current.psz_name != NULL) + if( psz_current != NULL ) { - if( !strncmp(p_main->p_playlist->current.psz_name, "dvd:", 4) ) + if( !strncmp(psz_current, "dvd:", 4) ) { - switch( p_main->p_playlist->current.psz_name[4] ) + switch( psz_current[4] ) { case '\0': case '@': - psz_device = config_GetPszVariable( "dvd" ); + psz_device = config_GetPsz( p_intf, "dvd" ); break; default: /* Omit the first 4 characters */ - psz_device = strdup( p_main->p_playlist->current.psz_name + 4 ); + psz_device = strdup( psz_current + 4 ); break; } } - else if( !strncmp(p_main->p_playlist->current.psz_name, "vcd:", 4) ) + else if( !strncmp(psz_current, "vcd:", 4) ) { - switch( p_main->p_playlist->current.psz_name[4] ) + switch( psz_current[4] ) { case '\0': case '@': - psz_device = config_GetPszVariable( "vcd" ); + psz_device = config_GetPsz( p_intf, "vcd" ); break; default: /* Omit the first 4 characters */ - psz_device = strdup( p_main->p_playlist->current.psz_name + 4 ); + psz_device = strdup( psz_current + 4 ); break; } } else { - psz_device = strdup( p_main->p_playlist->current.psz_name ); + psz_device = strdup( psz_current ); } } @@ -546,14 +532,15 @@ gboolean GtkDiscEject ( GtkWidget *widget, GdkEventButton *event, } /* If there's a stream playing, we aren't allowed to eject ! */ - if( p_input_bank->pp_input[0] == NULL ) + if( p_intf->p_sys->p_input == NULL ) { - intf_WarnMsg( 4, "intf: ejecting %s", psz_device ); + msg_Dbg( p_intf, "ejecting %s", psz_device ); - intf_Eject( psz_device ); + intf_Eject( p_intf->p_this, psz_device ); } free(psz_device); +#endif return TRUE; } diff --git a/plugins/gtk/gtk_common.h b/plugins/gtk/gtk_common.h index e3ba537b2a..46bfe95440 100644 --- a/plugins/gtk/gtk_common.h +++ b/plugins/gtk/gtk_common.h @@ -2,7 +2,7 @@ * gtk_common.h: private Gtk+ interface description ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: gtk_common.h,v 1.8 2002/05/18 17:47:46 sam Exp $ + * $Id: gtk_common.h,v 1.9 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * @@ -42,23 +42,23 @@ static inline intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent ) /***************************************************************************** * intf_sys_t: description and status of Gtk+ interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { /* special actions */ - boolean_t b_playing; - boolean_t b_popup_changed; /* display menu ? */ - boolean_t b_window_changed; /* window display toggled ? */ - boolean_t b_playlist_changed; /* playlist display toggled ? */ - boolean_t b_slider_free; /* slider status */ + vlc_bool_t b_playing; + vlc_bool_t b_popup_changed; /* display menu ? */ + vlc_bool_t b_window_changed; /* window display toggled ? */ + vlc_bool_t b_playlist_changed; /* playlist display toggled ? */ + vlc_bool_t b_slider_free; /* slider status */ /* menus handlers */ - boolean_t b_program_update; /* do we need to update programs + vlc_bool_t b_program_update; /* do we need to update programs menu */ - boolean_t b_title_update; /* do we need to update title menus */ - boolean_t b_chapter_update; /* do we need to update + vlc_bool_t b_title_update; /* do we need to update title menus */ + vlc_bool_t b_chapter_update; /* do we need to update chapter menus */ - boolean_t b_audio_update; /* do we need to update audio menus */ - boolean_t b_spu_update; /* do we need to update spu menus */ + vlc_bool_t b_audio_update; /* do we need to update audio menus */ + vlc_bool_t b_spu_update; /* do we need to update spu menus */ /* windows and widgets */ GtkWidget * p_window; /* main window */ @@ -72,7 +72,10 @@ typedef struct intf_sys_s GtkWidget * p_network; /* network stream window */ GtkWidget * p_jump; /* jump window */ - GtkTooltips * p_tooltips; /* tooltips */ + GtkTooltips * p_tooltips; /* tooltips */ + + /* The input thread */ + input_thread_t * p_input; /* The slider */ GtkFrame * p_slider_frame; @@ -82,7 +85,7 @@ typedef struct intf_sys_s /* The messages window */ GtkWidget * p_messages; /* messages window */ GtkText * p_messages_text; /* messages frame */ - intf_subscription_t*p_sub; /* interface subscription */ + msg_subscription_t* p_sub; /* message bank subscription */ /* Playlist management */ int i_playing; /* playlist selected item */ @@ -94,8 +97,7 @@ typedef struct intf_sys_s /* XXX: Ugly kludge, see gtk.c */ void ( *pf_callback[MAX_ATEXIT] ) ( void ); - -} intf_sys_t; +}; /***************************************************************************** * Prototypes diff --git a/plugins/gtk/gtk_control.c b/plugins/gtk/gtk_control.c index 888c907740..ae15adcd33 100644 --- a/plugins/gtk/gtk_control.c +++ b/plugins/gtk/gtk_control.c @@ -2,7 +2,7 @@ * gtk_control.c : functions to handle stream control buttons. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_control.c,v 1.9 2002/01/07 02:12:29 sam Exp $ + * $Id: gtk_control.c,v 1.10 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -28,7 +28,8 @@ #include /* off_t */ #include -#include +#include +#include #ifdef MODULE_NAME_IS_gnome # include @@ -38,12 +39,6 @@ #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" @@ -60,7 +55,6 @@ gboolean GtkControlBack( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - return FALSE; } @@ -69,19 +63,16 @@ gboolean GtkControlStop( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - if( p_input_bank->pp_input[0] != NULL ) - { - /* end playing item */ - p_input_bank->pp_input[0]->b_eof = 1; - - /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + playlist_t *p_playlist; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); + if( p_playlist ) + { + playlist_Stop( p_playlist ); + vlc_object_release( p_playlist ); } return TRUE; @@ -92,36 +83,24 @@ gboolean GtkControlPlay( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - if( p_input_bank->pp_input[0] != NULL ) + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + playlist_t *p_playlist; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); + + if( p_playlist ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); - p_main->p_playlist->b_stopped = 0; + playlist_Play( p_playlist ); + vlc_object_release( p_playlist ); } - else - { - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - - if( p_main->p_playlist->b_stopped ) - { - if( p_main->p_playlist->i_size ) - { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_index ); - } - else - { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - GtkFileOpenShow( widget, event, user_data ); - } - } - else - { - - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - } +#if 0 /* FIXME: deal with this */ + { + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); + GtkFileOpenShow( widget, event, user_data ); } +#endif return TRUE; } @@ -131,13 +110,16 @@ gboolean GtkControlPause( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - if( p_input_bank->pp_input[0] != NULL ) - { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + playlist_t *p_playlist; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + if( p_playlist ) + { + playlist_Pause( p_playlist ); + vlc_object_release( p_playlist ); } return TRUE; @@ -148,14 +130,19 @@ gboolean GtkControlSlow( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - if( p_input_bank->pp_input[0] != NULL ) - { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + playlist_t *p_playlist; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); +#if 0 + if( p_playlist ) + { + playlist_Slow( p_playlist ); + vlc_object_release( p_playlist ); } +#endif return TRUE; } @@ -165,14 +152,19 @@ gboolean GtkControlFast( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - if( p_input_bank->pp_input[0] != NULL ) - { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + playlist_t *p_playlist; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); +#if 0 + if( p_playlist ) + { + playlist_Fast( p_playlist ); + vlc_object_release( p_playlist ); } +#endif return TRUE; } diff --git a/plugins/gtk/gtk_display.c b/plugins/gtk/gtk_display.c index 339085387a..23d2e14dc9 100644 --- a/plugins/gtk/gtk_display.c +++ b/plugins/gtk/gtk_display.c @@ -2,7 +2,7 @@ * gtk_display.c: Gtk+ tools for main interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: gtk_display.c,v 1.22 2002/05/30 08:17:04 gbazin Exp $ + * $Id: gtk_display.c,v 1.23 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -30,7 +30,8 @@ #include /* strerror() */ #include -#include +#include +#include #ifdef MODULE_NAME_IS_gnome # include @@ -38,15 +39,6 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - -#include "video.h" -#include "video_output.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" @@ -67,13 +59,13 @@ void GtkDisplayDate( GtkAdjustment *p_adj ) p_intf = gtk_object_get_data( GTK_OBJECT( p_adj ), "p_intf" ); - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_sys->p_input ) { -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_intf->p_sys->p_input->stream.p_selected_area char psz_time[ OFFSETTOTIME_MAX_SIZE ]; gtk_frame_set_label( GTK_FRAME( p_intf->p_sys->p_slider_frame ), - input_OffsetToTime( p_input_bank->pp_input[0], psz_time, + input_OffsetToTime( p_intf->p_sys->p_input, psz_time, ( p_area->i_size * p_adj->value ) / 100 ) ); #undef p_area } @@ -94,7 +86,7 @@ gint GtkModeManage( intf_thread_t * p_intf ) GtkWidget * p_slider; GtkWidget * p_label; GtkWidget * p_channel; - boolean_t b_control; + vlc_bool_t b_control; #define GETWIDGET( ptr, name ) GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( \ p_intf->p_sys->ptr ) , ( name ) ) ) @@ -120,9 +112,9 @@ gint GtkModeManage( intf_thread_t * p_intf ) b_control = 0; /* show the box related to current input mode */ - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_sys->p_input ) { - switch( p_input_bank->pp_input[0]->stream.i_method & 0xf0 ) + switch( p_intf->p_sys->p_input->stream.i_method & 0xf0 ) { case INPUT_METHOD_FILE: //intf_WarnMsg( 2, "intf info: file method" ); @@ -131,7 +123,7 @@ gint GtkModeManage( intf_thread_t * p_intf ) p_intf->p_sys->p_window ), "label_status" ); gtk_label_set_text( GTK_LABEL( p_label ), - p_input_bank->pp_input[0]->psz_source ); + p_intf->p_sys->p_input->psz_source ); break; case INPUT_METHOD_DISC: //intf_WarnMsg( 2, "intf info: disc method" ); @@ -144,10 +136,10 @@ gint GtkModeManage( intf_thread_t * p_intf ) p_intf->p_sys->p_window ), "network_address_label" ); gtk_label_set_text( GTK_LABEL( p_label ), - p_input_bank->pp_input[0]->psz_source ); + p_intf->p_sys->p_input->psz_source ); p_channel = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_window ), "network_channel_box" ) ); - if( config_GetIntVariable( "network-channel" ) ) + if( config_GetInt( p_intf, "network-channel" ) ) { gtk_widget_show( GTK_WIDGET( p_channel ) ); } @@ -158,18 +150,18 @@ gint GtkModeManage( intf_thread_t * p_intf ) break; default: - intf_WarnMsg( 3, "intf: can't determine input method" ); + msg_Warn( p_intf, "cannot determine input method" ); gtk_widget_show( GTK_WIDGET( p_file_box ) ); p_label = gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_window ), "label_status" ); gtk_label_set_text( GTK_LABEL( p_label ), - p_input_bank->pp_input[0]->psz_source ); + p_intf->p_sys->p_input->psz_source ); break; } /* initialize and show slider for seekable streams */ - if( p_input_bank->pp_input[0]->stream.b_seekable ) + if( p_intf->p_sys->p_input->stream.b_seekable ) { p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = 0; gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), @@ -178,7 +170,7 @@ gint GtkModeManage( intf_thread_t * p_intf ) } /* control buttons for free pace streams */ - b_control = p_input_bank->pp_input[0]->stream.b_pace_control; + b_control = p_intf->p_sys->p_input->stream.b_pace_control; /* get ready for menu regeneration */ p_intf->p_sys->b_program_update = 1; @@ -187,13 +179,13 @@ gint GtkModeManage( intf_thread_t * p_intf ) p_intf->p_sys->b_audio_update = 1; p_intf->p_sys->b_spu_update = 1; p_intf->p_sys->i_part = 0; - - p_input_bank->pp_input[0]->stream.b_changed = 0; - intf_WarnMsg( 3, "intf: stream has changed, refreshing interface" ); + + p_intf->p_sys->p_input->stream.b_changed = 0; + msg_Dbg( p_intf, "stream has changed, refreshing interface" ); } else { - if( config_GetIntVariable( "network-channel" ) ) + if( config_GetInt( p_intf, "network-channel" ) ) { gtk_widget_show( GTK_WIDGET( p_network_box ) ); @@ -245,14 +237,27 @@ gint GtkModeManage( intf_thread_t * p_intf ) /***************************************************************************** * GtkHideTooltips: show or hide the tooltips depending on the configuration * option gnome-tooltips - ***************************************************************************** - * FIXME: we should get the intf as parameter *****************************************************************************/ -void GtkHideTooltips( void ) +void GtkHideTooltips( vlc_object_t *p_this ) { - if( !config_GetIntVariable( "gnome-tooltips" ) ) - gtk_tooltips_disable( p_main->p_intf->p_sys->p_tooltips ); - else gtk_tooltips_enable( p_main->p_intf->p_sys->p_tooltips ); + intf_thread_t *p_intf = vlc_object_find( p_this->p_vlc, + VLC_OBJECT_INTF, FIND_CHILD ); + + if( !p_intf ) + { + return; + } + + if( config_GetInt( p_this, "gnome-tooltips" ) ) + { + gtk_tooltips_enable( p_intf->p_sys->p_tooltips ); + } + else + { + gtk_tooltips_disable( p_intf->p_sys->p_tooltips ); + } + + vlc_object_release( p_intf ); } #ifdef MODULE_NAME_IS_gnome @@ -260,20 +265,29 @@ void GtkHideTooltips( void ) * GtkHideToolbartext: show or hide the tooltips depending on the * configuration option gnome-toolbartext ***************************************************************************** - * FIXME: we should get the intf as parameter * FIXME: GNOME only because of missing icons in gtk interface *****************************************************************************/ -void GtkHideToolbarText( void ) +void GtkHideToolbarText( vlc_object_t *p_this ) { GtkToolbarStyle style; GtkToolbar * p_toolbar; - style = config_GetIntVariable( "gnome-toolbartext" ) + intf_thread_t *p_intf = vlc_object_find( p_this->p_vlc, + VLC_OBJECT_INTF, FIND_CHILD ); + + if( !p_intf ) + { + return; + } + + style = config_GetInt( p_this, "gnome-toolbartext" ) ? GTK_TOOLBAR_BOTH : GTK_TOOLBAR_ICONS; - p_toolbar = GTK_TOOLBAR(lookup_widget( p_main->p_intf->p_sys->p_window, - "toolbar" )); + p_toolbar = GTK_TOOLBAR(lookup_widget( p_intf->p_sys->p_window, + "toolbar" )); gtk_toolbar_set_style( p_toolbar, style ); + + vlc_object_release( p_intf ); } #endif diff --git a/plugins/gtk/gtk_display.h b/plugins/gtk/gtk_display.h index 8a3731a6ac..6666e05f57 100644 --- a/plugins/gtk/gtk_display.h +++ b/plugins/gtk/gtk_display.h @@ -2,7 +2,7 @@ * gtk_dsiplay.h: Gtk+ tools for main interface. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: gtk_display.h,v 1.2 2002/05/04 02:05:03 lool Exp $ + * $Id: gtk_display.h,v 1.3 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -28,6 +28,6 @@ gint GtkModeManage ( intf_thread_t * p_intf ); void GtkDisplayDate ( GtkAdjustment *p_adj ); -void GtkHideTooltips ( void ); -void GtkHideToolbarText ( void ); +void GtkHideTooltips ( vlc_object_t * ); +void GtkHideToolbarText ( vlc_object_t * ); diff --git a/plugins/gtk/gtk_interface.c b/plugins/gtk/gtk_interface.c index 3726a76a68..e26b20b815 100644 --- a/plugins/gtk/gtk_interface.c +++ b/plugins/gtk/gtk_interface.c @@ -1,6 +1,6 @@ -/* This file was created automatically by glade and fixed by fixfiles.sh */ +/* This file was created automatically by glade and fixed by bootstrap.sh */ -#include +#include #include #include @@ -638,7 +638,7 @@ create_intf_window (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_next); - slider_frame = gtk_frame_new (_("-:--:--")); + slider_frame = gtk_frame_new ("-:--:--"); gtk_widget_ref (slider_frame); gtk_object_set_data_full (GTK_OBJECT (intf_window), "slider_frame", slider_frame, (GtkDestroyNotify) gtk_widget_unref); @@ -698,7 +698,7 @@ create_intf_window (void) gtk_widget_show (title); gtk_box_pack_start (GTK_BOX (title_box), title, FALSE, FALSE, 5); - title_label = gtk_label_new (_("--")); + title_label = gtk_label_new ("--"); gtk_widget_ref (title_label); gtk_object_set_data_full (GTK_OBJECT (intf_window), "title_label", title_label, (GtkDestroyNotify) gtk_widget_unref); @@ -742,7 +742,7 @@ create_intf_window (void) gtk_widget_show (chapter); gtk_box_pack_start (GTK_BOX (chapter_box), chapter, FALSE, FALSE, 5); - chapter_label = gtk_label_new (_("---")); + chapter_label = gtk_label_new ("---"); gtk_widget_ref (chapter_label); gtk_object_set_data_full (GTK_OBJECT (intf_window), "chapter_label", chapter_label, (GtkDestroyNotify) gtk_widget_unref); @@ -1592,7 +1592,7 @@ create_intf_disc (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_name); gtk_box_pack_start (GTK_BOX (hbox2), disc_name, TRUE, TRUE, 0); - gtk_entry_set_text (GTK_ENTRY (disc_name), config_GetPszVariable( "dvd" )); + gtk_entry_set_text (GTK_ENTRY (disc_name), "/dev/dvd"); dialog_action_area1 = GTK_DIALOG (intf_disc)->action_area; gtk_object_set_data (GTK_OBJECT (intf_disc), "dialog_action_area1", dialog_action_area1); @@ -2470,7 +2470,7 @@ create_intf_sat (void) gtk_table_set_row_spacings (GTK_TABLE (table3), 5); gtk_table_set_col_spacings (GTK_TABLE (table3), 5); - sat_freq_adj = gtk_adjustment_new (config_GetIntVariable( "frequency" ), 10000, 12999, 1, 10, 10); + sat_freq_adj = gtk_adjustment_new (11954, 10000, 12999, 1, 10, 10); sat_freq = gtk_spin_button_new (GTK_ADJUSTMENT (sat_freq_adj), 1, 0); gtk_widget_ref (sat_freq); gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_freq", sat_freq, @@ -2480,7 +2480,7 @@ create_intf_sat (void) (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); - sat_srate_adj = gtk_adjustment_new (config_GetIntVariable( "symbol-rate" ), 1000, 30000, 1, 10, 10); + sat_srate_adj = gtk_adjustment_new (27500, 1000, 30000, 1, 10, 10); sat_srate = gtk_spin_button_new (GTK_ADJUSTMENT (sat_srate_adj), 1, 0); gtk_widget_ref (sat_srate); gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_srate", sat_srate, @@ -2558,12 +2558,12 @@ create_intf_sat (void) gtk_table_attach (GTK_TABLE (table3), sat_fec, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("1/2")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("2/3")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("3/4")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("4/5")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("5/6")); - sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("7/8")); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "1/2"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "2/3"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "3/4"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "4/5"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "5/6"); + sat_fec_items = g_list_append (sat_fec_items, (gpointer) "7/8"); gtk_combo_set_popdown_strings (GTK_COMBO (sat_fec), sat_fec_items); g_list_free (sat_fec_items); @@ -2572,7 +2572,7 @@ create_intf_sat (void) gtk_object_set_data_full (GTK_OBJECT (intf_sat), "combo_entry1", combo_entry1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo_entry1); - gtk_entry_set_text (GTK_ENTRY (combo_entry1), _("3/4")); + gtk_entry_set_text (GTK_ENTRY (combo_entry1), "3/4"); hbox15 = GTK_DIALOG (intf_sat)->action_area; gtk_object_set_data (GTK_OBJECT (intf_sat), "hbox15", hbox15); diff --git a/plugins/gtk/gtk_menu.c b/plugins/gtk/gtk_menu.c index 4b2787e192..fa01a91615 100644 --- a/plugins/gtk/gtk_menu.c +++ b/plugins/gtk/gtk_menu.c @@ -2,7 +2,7 @@ * gtk_menu.c : functions to handle menu items. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_menu.c,v 1.25 2002/05/12 01:39:36 massiot Exp $ + * $Id: gtk_menu.c,v 1.26 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -29,7 +29,8 @@ #include /* off_t */ #include -#include +#include +#include #ifdef MODULE_NAME_IS_gnome # include @@ -39,16 +40,6 @@ #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - -#include "video.h" -#include "video_output.h" -#include "audio_output.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" @@ -93,7 +84,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf ); GTK_OBJECT( p_intf->p_sys->window ), (menu) ) ); \ p_es = (es_descriptor_t*)user_data; \ \ - input_ToggleES( p_input_bank->pp_input[0], \ + input_ToggleES( p_intf->p_sys->p_input, \ p_es, menuitem->active ); \ \ p_intf->p_sys->b_update = menuitem->active; \ @@ -158,24 +149,24 @@ void GtkPopupNavigationToggle( GtkCheckMenuItem * menuitem, gint i_title = DATA2TITLE( user_data ); gint i_chapter = DATA2CHAPTER( user_data ); - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intf->p_sys->p_input->stream.p_selected_area; - if( p_area != p_input_bank->pp_input[0]->stream.pp_areas[i_title] ) + if( p_area != p_intf->p_sys->p_input->stream.pp_areas[i_title] ) { - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_title]; + p_area = p_intf->p_sys->p_input->stream.pp_areas[i_title]; p_intf->p_sys->b_title_update = 1; } p_area->i_part = i_chapter; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intf->p_sys->p_input, (input_area_t*)p_area ); p_intf->p_sys->b_chapter_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkSetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); } } @@ -189,17 +180,17 @@ void GtkPopupNavigationToggle( GtkCheckMenuItem * menuitem, { \ u16 i_program_id = (ptrdiff_t)user_data; \ \ - input_ChangeProgram( p_input_bank->pp_input[0], i_program_id ); \ + input_ChangeProgram( p_intf->p_sys->p_input, i_program_id ); \ \ p_intf->p_sys->b_program_update = 1; \ \ - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); \ + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); \ GtkSetupMenus( p_intf ); \ - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); \ + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); \ \ p_intf->p_sys->b_program_update = 0; \ \ - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); \ + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); \ } void GtkMenubarProgramToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) @@ -223,16 +214,16 @@ void GtkMenubarTitleToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) if( menuitem->active && !p_intf->p_sys->b_title_update ) { gint i_title = (gint)((long)user_data); - input_ChangeArea( p_input_bank->pp_input[0], - p_input_bank->pp_input[0]->stream.pp_areas[i_title] ); + input_ChangeArea( p_intf->p_sys->p_input, + p_intf->p_sys->p_input->stream.pp_areas[i_title] ); p_intf->p_sys->b_title_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkSetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); p_intf->p_sys->b_title_update = 0; - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); } } @@ -249,25 +240,25 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) GtkWidget * p_popup_menu; p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" ); - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intf->p_sys->p_input->stream.p_selected_area; i_chapter = (gint)((long)user_data); if( menuitem->active && !p_intf->p_sys->b_chapter_update ) { p_area->i_part = i_chapter; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intf->p_sys->p_input, (input_area_t*)p_area ); p_intf->p_sys->b_chapter_update = 1; p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_popup ), "popup_navigation" ) ); - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); GtkTitleMenu( p_intf, p_popup_menu, GtkPopupNavigationToggle ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); p_intf->p_sys->b_chapter_update = 0; - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY ); } } @@ -429,17 +420,17 @@ static gint GtkProgramMenu( gpointer p_data, p_item_active = NULL; /* create a set of program buttons and append them to the container */ - for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_pgrm_number ; i++ ) + for( i = 0 ; i < p_intf->p_sys->p_input->stream.i_pgrm_number ; i++ ) { snprintf( psz_name, GTK_MENU_LABEL_SIZE, "id %d", - p_input_bank->pp_input[0]->stream.pp_programs[i]->i_number ); + p_intf->p_sys->p_input->stream.pp_programs[i]->i_number ); psz_name[GTK_MENU_LABEL_SIZE-1] = '\0'; p_item = gtk_radio_menu_item_new_with_label( p_group, psz_name ); p_group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) ); - if( p_pgrm == p_input_bank->pp_input[0]->stream.pp_programs[i] ) + if( p_pgrm == p_intf->p_sys->p_input->stream.pp_programs[i] ) { /* don't lose p_item when we append into menu */ p_item_active = p_item; @@ -450,7 +441,7 @@ static gint GtkProgramMenu( gpointer p_data, /* setup signal hanling */ gtk_signal_connect( GTK_OBJECT( p_item ), "toggled", GTK_SIGNAL_FUNC( pf_toggle ), - (gpointer)(ptrdiff_t)( p_input_bank->pp_input[0]-> + (gpointer)(ptrdiff_t)( p_intf->p_sys->p_input-> stream.pp_programs[i]->i_number ) ); gtk_menu_append( GTK_MENU( p_menu ), p_item ); @@ -469,7 +460,7 @@ static gint GtkProgramMenu( gpointer p_data, } /* be sure that menu is sensitive if more than 1 program */ - if( p_input_bank->pp_input[0]->stream.i_pgrm_number > 1 ) + if( p_intf->p_sys->p_input->stream.i_pgrm_number > 1 ) { gtk_widget_set_sensitive( p_root, TRUE ); } @@ -541,20 +532,20 @@ static gint GtkLanguageMenus( gpointer p_data, p_item_active = NULL; i_item = 0; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); -#define ES p_input_bank->pp_input[0]->stream.pp_es[i] +#define ES p_intf->p_sys->p_input->stream.pp_es[i] /* create a set of language buttons and append them to the container */ - for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_es_number ; i++ ) + for( i = 0 ; i < p_intf->p_sys->p_input->stream.i_es_number ; i++ ) { if( ( ES->i_cat == i_cat ) && ( !ES->p_pgrm || ES->p_pgrm == - p_input_bank->pp_input[0]->stream.p_selected_program ) ) + p_intf->p_sys->p_input->stream.p_selected_program ) ) { i_item++; strcpy( psz_name, - p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc ); + p_intf->p_sys->p_input->stream.pp_es[i]->psz_desc ); if( psz_name[0] == '\0' ) { snprintf( psz_name, GTK_MENU_LABEL_SIZE, @@ -566,7 +557,7 @@ static gint GtkLanguageMenus( gpointer p_data, p_group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) ); - if( p_es == p_input_bank->pp_input[0]->stream.pp_es[i] ) + if( p_es == p_intf->p_sys->p_input->stream.pp_es[i] ) { /* don't lose p_item when we append into menu */ p_item_active = p_item; @@ -577,13 +568,13 @@ static gint GtkLanguageMenus( gpointer p_data, /* setup signal hanling */ gtk_signal_connect( GTK_OBJECT( p_item ), "toggled", GTK_SIGNAL_FUNC( pf_toggle ), - (gpointer)( p_input_bank->pp_input[0]->stream.pp_es[i] ) ); + (gpointer)( p_intf->p_sys->p_input->stream.pp_es[i] ) ); gtk_menu_append( GTK_MENU( p_menu ), p_item ); } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); /* link the new menu to the menubar item */ gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu ); @@ -655,7 +646,7 @@ static gint GtkTitleMenu( gpointer p_data, p_chapter_submenu = NULL; p_chapter_menu_item = NULL; p_item_active = NULL; - i_title_nb = p_input_bank->pp_input[0]->stream.i_area_nb; + i_title_nb = p_intf->p_sys->p_input->stream.i_area_nb; /* loop on titles */ for( i_title = 1 ; i_title < i_title_nb ; i_title++ ) @@ -679,7 +670,7 @@ static gint GtkTitleMenu( gpointer p_data, } snprintf( psz_name, GTK_MENU_LABEL_SIZE, _("Title %d (%d)"), i_title, - p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb ); + p_intf->p_sys->p_input->stream.pp_areas[i_title]->i_part_nb ); psz_name[ GTK_MENU_LABEL_SIZE - 1 ] = '\0'; #if 0 if( pf_toggle == on_menubar_title_toggle ) @@ -689,8 +680,8 @@ static gint GtkTitleMenu( gpointer p_data, p_title_group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_title_item ) ); - if( p_input_bank->pp_input[0]->stream.pp_areas[i_title] == - p_input_bank->pp_input[0]->stream.p_selected_area ) + if( p_intf->p_sys->p_input->stream.pp_areas[i_title] == + p_intf->p_sys->p_input->stream.p_selected_area ) { p_item_active = p_title_item; } @@ -699,9 +690,9 @@ static gint GtkTitleMenu( gpointer p_data, gtk_signal_connect( GTK_OBJECT( p_title_item ), "toggled", GTK_SIGNAL_FUNC( pf_toggle ), - (gpointer)(p_input_bank->pp_input[0]->stream.pp_areas[i_title]) ); + (gpointer)(p_intf->p_sys->p_input->stream.pp_areas[i_title]) ); - if( p_input_bank->pp_input[0]->stream.i_area_nb > 1 ) + if( p_intf->p_sys->p_input->stream.i_area_nb > 1 ) { /* be sure that menu is sensitive */ gtk_widget_set_sensitive( p_navigation, TRUE ); @@ -715,7 +706,7 @@ static gint GtkTitleMenu( gpointer p_data, #if 1 p_chapter_menu = gtk_menu_new(); i_chapter_nb = - p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb; + p_intf->p_sys->p_input->stream.pp_areas[i_title]->i_part_nb; for( i_chapter = 0 ; i_chapter < i_chapter_nb ; i_chapter++ ) { @@ -750,9 +741,9 @@ static gint GtkTitleMenu( gpointer p_data, GTK_RADIO_MENU_ITEM( p_item ) ); gtk_widget_show( p_item ); -#define p_area p_input_bank->pp_input[0]->stream.pp_areas[i_title] +#define p_area p_intf->p_sys->p_input->stream.pp_areas[i_title] if( ( p_area == - p_input_bank->pp_input[0]->stream.p_selected_area ) && + p_intf->p_sys->p_input->stream.p_selected_area ) && ( p_area->i_part == i_chapter + 1 ) ) { p_item_active = p_item; @@ -787,17 +778,17 @@ static gint GtkTitleMenu( gpointer p_data, gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_title_item ), p_chapter_menu ); - if( p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb > 1 ) + if( p_intf->p_sys->p_input->stream.pp_areas[i_title]->i_part_nb > 1 ) { /* be sure that menu is sensitive */ gtk_widget_set_sensitive( p_navigation, TRUE ); } #else GtkRadioMenu( p_intf, p_title_item, p_chapter_group, _("Chapter"), - p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb, + p_intf->p_sys->p_input->stream.pp_areas[i_title]->i_part_nb, i_title * 100, - p_input_bank->pp_input[0]->stream.p_selected_area->i_part + - p_input_bank->pp_input[0]->stream.p_selected_area->i_id *100, + p_intf->p_sys->p_input->stream.p_selected_area->i_part + + p_intf->p_sys->p_input->stream.p_selected_area->i_id *100, pf_toggle ); #endif @@ -835,7 +826,7 @@ static gint GtkTitleMenu( gpointer p_data, TRUE ); } #if 0 - if( p_input_bank->pp_input[0]->stream.i_area_nb > 1 ) + if( p_intf->p_sys->p_input->stream.i_area_nb > 1 ) { /* be sure that menu is sensitive */ gtk_widget_set_sensitive( p_navigation, TRUE ); @@ -869,13 +860,13 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) { pgrm_descriptor_t * p_pgrm; - if( p_input_bank->pp_input[0]->stream.p_new_program ) + if( p_intf->p_sys->p_input->stream.p_new_program ) { - p_pgrm = p_input_bank->pp_input[0]->stream.p_new_program; + p_pgrm = p_intf->p_sys->p_input->stream.p_new_program; } else { - p_pgrm = p_input_bank->pp_input[0]->stream.p_selected_program; + p_pgrm = p_intf->p_sys->p_input->stream.p_selected_program; } p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( @@ -899,12 +890,12 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_window ), "menubar_title" ) ); GtkRadioMenu( p_intf, p_menubar_menu, NULL, _("Title"), - p_input_bank->pp_input[0]->stream.i_area_nb - 1, - p_input_bank->pp_input[0]->stream.p_selected_area->i_id, + p_intf->p_sys->p_input->stream.i_area_nb - 1, + p_intf->p_sys->p_input->stream.p_selected_area->i_id, GtkMenubarTitleToggle ); snprintf( psz_title, 4, "%d", - p_input_bank->pp_input[0]->stream.p_selected_area->i_id ); + p_intf->p_sys->p_input->stream.p_selected_area->i_id ); psz_title[ 4 ] = '\0'; gtk_label_set_text( p_intf->p_sys->p_label_title, psz_title ); @@ -920,8 +911,8 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) GtkTitleMenu( p_intf, p_popup_menu, GtkPopupNavigationToggle ); #if 0 GtkRadioMenu( p_intf, p_menubar_menu, NULL, _("Title"), - p_input_bank->pp_input[0]->stream.i_area_nb - 1, - p_input_bank->pp_input[0]->stream.p_selected_area->i_id, + p_intf->p_sys->p_input->stream.i_area_nb - 1, + p_intf->p_sys->p_input->stream.p_selected_area->i_id, on_menubar_chapter_toggle ); #endif @@ -929,18 +920,18 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) p_intf->p_sys->p_window ), "menubar_chapter" ) ); GtkRadioMenu( p_intf, p_menubar_menu, NULL, _("Chapter"), - p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, - p_input_bank->pp_input[0]->stream.p_selected_area->i_part, + p_intf->p_sys->p_input->stream.p_selected_area->i_part_nb, + p_intf->p_sys->p_input->stream.p_selected_area->i_part, GtkMenubarChapterToggle ); snprintf( psz_chapter, 4, "%d", - p_input_bank->pp_input[0]->stream.p_selected_area->i_part ); + p_intf->p_sys->p_input->stream.p_selected_area->i_part ); psz_chapter[ 4 ] = '\0'; gtk_label_set_text( p_intf->p_sys->p_label_chapter, psz_chapter ); p_intf->p_sys->i_part = - p_input_bank->pp_input[0]->stream.p_selected_area->i_part; + p_intf->p_sys->p_input->stream.p_selected_area->i_part; p_intf->p_sys->b_chapter_update = 0; } @@ -949,20 +940,20 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) p_audio_es = NULL; p_spu_es = NULL; - for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_selected_es_number ; i++ ) + for( i = 0 ; i < p_intf->p_sys->p_input->stream.i_selected_es_number ; i++ ) { - if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat == AUDIO_ES ) + if( p_intf->p_sys->p_input->stream.pp_selected_es[i]->i_cat == AUDIO_ES ) { - p_audio_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i]; + p_audio_es = p_intf->p_sys->p_input->stream.pp_selected_es[i]; } - if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat == SPU_ES ) + if( p_intf->p_sys->p_input->stream.pp_selected_es[i]->i_cat == SPU_ES ) { - p_spu_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i]; + p_spu_es = p_intf->p_sys->p_input->stream.pp_selected_es[i]; } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); /* audio menus */ if( p_intf->p_sys->b_audio_update ) @@ -1004,7 +995,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) p_intf->p_sys->b_spu_update = 0; } - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock ); return TRUE; } diff --git a/plugins/gtk/gtk_menu.h b/plugins/gtk/gtk_menu.h index 9995000758..de4ee9eff5 100644 --- a/plugins/gtk/gtk_menu.h +++ b/plugins/gtk/gtk_menu.h @@ -2,7 +2,7 @@ * gtk_menu.h: prototypes for menu functions ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: gtk_menu.h,v 1.6 2002/03/26 23:08:40 gbazin Exp $ + * $Id: gtk_menu.h,v 1.7 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -22,9 +22,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -struct intf_thread_s; - -gint GtkSetupMenus( struct intf_thread_s * ); +gint GtkSetupMenus( intf_thread_t * ); /***************************************************************************** * String sizes diff --git a/plugins/gtk/gtk_modules.c b/plugins/gtk/gtk_modules.c index 8a515c6967..bd8b824a53 100644 --- a/plugins/gtk/gtk_modules.c +++ b/plugins/gtk/gtk_modules.c @@ -2,7 +2,7 @@ * gtk_modules.c : functions to build modules configuration boxes. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_modules.c,v 1.7 2001/12/30 07:09:55 sam Exp $ + * $Id: gtk_modules.c,v 1.8 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -28,7 +28,8 @@ #include /* off_t */ #include -#include +#include +#include #ifdef MODULE_NAME_IS_gnome # include @@ -38,12 +39,6 @@ #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" diff --git a/plugins/gtk/gtk_open.c b/plugins/gtk/gtk_open.c index b5443af879..97672fe324 100644 --- a/plugins/gtk/gtk_open.c +++ b/plugins/gtk/gtk_open.c @@ -2,7 +2,7 @@ * gtk_open.c : functions to handle file/disc/network open widgets. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_open.c,v 1.24 2002/05/18 02:12:20 ipkiss Exp $ + * $Id: gtk_open.c,v 1.25 2002/06/01 12:31:59 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -28,7 +28,8 @@ #include /* off_t */ #include -#include +#include +#include #ifdef MODULE_NAME_IS_gnome # include @@ -38,12 +39,6 @@ #include -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" @@ -72,7 +67,7 @@ gboolean GtkFileOpenShow( GtkWidget *widget, gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ), "p_intf", p_intf ); - if( (psz_path = config_GetPszVariable( "search-path" )) ) + if( (psz_path = config_GetPsz( p_intf, "search-path" )) ) gtk_file_selection_set_filename( GTK_FILE_SELECTION( p_intf->p_sys->p_fileopen ), psz_path ); if( psz_path ) free( psz_path ); @@ -93,10 +88,17 @@ void GtkFileOpenCancel( GtkButton * button, gpointer user_data ) void GtkFileOpenOk( GtkButton * button, gpointer user_data ) { intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_fileopen" ); + playlist_t * p_playlist; GtkCList * p_playlist_clist; GtkWidget * p_filesel; gchar * psz_filename; - int i_end = p_main->p_playlist->i_size; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); + if( p_playlist == NULL ) + { + return; + } /* hide the file selector */ p_filesel = gtk_widget_get_toplevel( GTK_WIDGET(button) ); @@ -105,21 +107,24 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data ) /* add the new file to the interface playlist */ psz_filename = gtk_file_selection_get_filename( GTK_FILE_SELECTION( p_filesel ) ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (char*)psz_filename ); + playlist_Add( p_playlist->p_this, 0, (char*)psz_filename ); /* catch the GTK CList */ p_playlist_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); /* update the plugin display */ - GtkRebuildCList( p_playlist_clist, p_main->p_playlist ); + GtkRebuildCList( p_playlist_clist, p_playlist ); + vlc_object_release( p_playlist ); /* end current item, select added item */ - if( p_input_bank->pp_input[0] != NULL ) +#if 0 + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, i_end - 1 ); +#endif } /***************************************************************************** @@ -149,11 +154,13 @@ gboolean GtkDiscOpenShow( GtkWidget *widget, void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data ) { + intf_thread_t * p_intf = GetIntf( GTK_WIDGET(togglebutton), "intf_disc" ); + if( togglebutton->active ) { char *psz_dvd_device; - if( (psz_dvd_device = config_GetPszVariable( "dvd" )) ) + if( (psz_dvd_device = config_GetPsz( p_intf, "dvd" )) ) gtk_entry_set_text( GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), "disc_name" ) ), psz_dvd_device ); @@ -163,11 +170,13 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data ) void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data ) { + intf_thread_t * p_intf = GetIntf( GTK_WIDGET(togglebutton), "intf_disc" ); + if( togglebutton->active ) { char *psz_vcd_device; - if( (psz_vcd_device = config_GetPszVariable( "vcd" )) ) + if( (psz_vcd_device = config_GetPsz( p_intf, "vcd" )) ) gtk_entry_set_text( GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), "disc_name" ) ), psz_vcd_device ); @@ -178,11 +187,18 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data ) void GtkDiscOpenOk( GtkButton * button, gpointer user_data ) { intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_disc" ); + playlist_t * p_playlist; GtkCList * p_playlist_clist; char * psz_device, *psz_source, *psz_method; - int i_end = p_main->p_playlist->i_size; int i_title, i_chapter; + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); + if( p_playlist == NULL ) + { + return; + } + gtk_widget_hide( p_intf->p_sys->p_disc ); psz_device = gtk_entry_get_text( GTK_ENTRY( lookup_widget( GTK_WIDGET(button), "disc_name" ) ) ); @@ -200,7 +216,7 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data ) } else { - intf_ErrMsg( "intf error: unknown disc type toggle button position" ); + msg_Err( p_intf, "unknown disc type toggle button position" ); return; } @@ -225,7 +241,7 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data ) /* Build source name and add it to playlist */ sprintf( psz_source, "%s:%s@%d,%d", psz_method, psz_device, i_title, i_chapter ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source ); + playlist_Add( p_playlist->p_this, 0, psz_source ); free( psz_source ); /* catch the GTK CList */ @@ -233,15 +249,19 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data ) GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); /* update the display */ - GtkRebuildCList( p_playlist_clist, p_main->p_playlist ); + GtkRebuildCList( p_playlist_clist, p_playlist ); /* stop current item, select added item */ - if( p_input_bank->pp_input[0] != NULL ) +#if 0 + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, i_end - 1 ); +#endif + + vlc_object_release( p_playlist ); } @@ -272,9 +292,9 @@ gboolean GtkNetworkOpenShow( GtkWidget *widget, gtk_spin_button_set_value( GTK_SPIN_BUTTON( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_network ), "network_udp_port" ) ), - config_GetIntVariable( "server-port" ) ); + config_GetInt( p_intf, "server-port" ) ); - psz_channel_server = config_GetPszVariable( "channel-server" ); + psz_channel_server = config_GetPsz( p_intf, "channel-server" ); if( psz_channel_server ) gtk_entry_set_text( GTK_ENTRY( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_network ), "network_channel_address" ) ), @@ -283,11 +303,11 @@ gboolean GtkNetworkOpenShow( GtkWidget *widget, gtk_spin_button_set_value( GTK_SPIN_BUTTON( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_network ), "network_channel_port" ) ), - config_GetIntVariable( "channel-port" ) ); + config_GetInt( p_intf, "channel-port" ) ); gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_network ), "network_channel" ), - config_GetIntVariable( "network-channel" ) ); + config_GetInt( p_intf, "network-channel" ) ); } gtk_widget_show( p_intf->p_sys->p_network ); @@ -300,26 +320,35 @@ gboolean GtkNetworkOpenShow( GtkWidget *widget, void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) { intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_network" ); + playlist_t * p_playlist; GtkCList * p_playlist_clist; char * psz_source, *psz_address; unsigned int i_port; - boolean_t b_channel; - int i_end = p_main->p_playlist->i_size; + vlc_bool_t b_channel; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); + if( p_playlist == NULL ) + { + return; + } gtk_widget_hide( p_intf->p_sys->p_network ); // psz_server = gtk_entry_get_text( GTK_ENTRY( lookup_widget( // GTK_WIDGET(button), "network_server" ) ) ); /* select added item */ - if( p_input_bank->pp_input[0] != NULL ) +#if 0 + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } +#endif /* Manage channel server */ b_channel = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), "network_channel" ) ) ); - config_PutIntVariable( "network-channel", b_channel ); + config_PutInt( p_intf, "network-channel", b_channel ); /* Check which option was chosen */ /* UDP */ @@ -335,7 +364,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) lookup_widget( GTK_WIDGET(button), "network_udp_port" ) ) ); if( i_port > 65535 ) { - intf_ErrMsg( "intf error: invalid port %i", i_port ); + msg_Err( p_intf, "invalid port %i", i_port ); } /* Allocate room for "protocol:@:port" */ @@ -349,16 +378,18 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) /* Build source name and add it to playlist */ sprintf( psz_source, "udp:@:%i", i_port ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source ); + playlist_Add( p_playlist->p_this, 0, psz_source ); free( psz_source ); /* catch the GTK CList */ p_playlist_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); /* update the display */ - GtkRebuildCList( p_playlist_clist, p_main->p_playlist ); + GtkRebuildCList( p_playlist_clist, p_playlist ); - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); +#if 0 + intf_PlaylistJumpto( p_playlist, i_end - 1 ); +#endif } /* UDP Multicast */ @@ -375,7 +406,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) lookup_widget( GTK_WIDGET(button), "network_multicast_port" ) ) ); if( i_port > 65535 ) { - intf_ErrMsg( "intf error: invalid port %i", i_port ); + msg_Err( p_intf, "invalid port %i", i_port ); } /* Allocate room for "protocol:@address:port" */ @@ -390,16 +421,18 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) /* Build source name and add it to playlist */ sprintf( psz_source, "udp:@%s:%i", psz_address, i_port ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source ); + playlist_Add( p_playlist->p_this, 0, psz_source ); free( psz_source ); /* catch the GTK CList */ p_playlist_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); /* update the display */ - GtkRebuildCList( p_playlist_clist, p_main->p_playlist ); + GtkRebuildCList( p_playlist_clist, p_playlist ); - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); +#if 0 + intf_PlaylistJumpto( p_playlist, i_end - 1 ); +#endif } /* Channel server */ @@ -409,9 +442,9 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) char * psz_channel; unsigned int i_channel_port; - if( p_main->p_channel == NULL ) + if( p_intf->p_vlc->p_channel == NULL ) { - network_ChannelCreate(); + network_ChannelCreate( p_intf->p_this ); } psz_channel = gtk_entry_get_text( GTK_ENTRY( lookup_widget( @@ -419,10 +452,10 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) i_channel_port = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button), "network_channel_port" ) ) ); - config_PutPszVariable( "channel-server", psz_channel ); + config_PutPsz( p_intf, "channel-server", psz_channel ); if( i_channel_port < 65536 ) { - config_PutIntVariable( "channel-port", i_channel_port ); + config_PutInt( p_intf, "channel-port", i_channel_port ); } p_intf->p_sys->b_playing = 1; @@ -447,22 +480,24 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) /* Build source name and add it to playlist */ sprintf( psz_source, "http://%s", psz_address ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source ); + playlist_Add( p_playlist->p_this, 0, psz_source ); free( psz_source ); /* catch the GTK CList */ p_playlist_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); /* update the display */ - GtkRebuildCList( p_playlist_clist, p_main->p_playlist ); + GtkRebuildCList( p_playlist_clist, p_playlist ); - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); +#if 0 + intf_PlaylistJumpto( p_playlist, i_end - 1 ); +#endif } /* This shouldn't occur */ else { - intf_ErrMsg( "intf error: unknown protocol toggle button position" ); + msg_Err( p_intf, "unknown protocol toggle button position" ); return; } @@ -470,6 +505,8 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data ) if( !b_channel ) { } + + vlc_object_release( p_playlist ); } void GtkNetworkOpenCancel( GtkButton * button, gpointer user_data) @@ -580,12 +617,19 @@ gboolean GtkSatOpenShow( GtkWidget *widget, void GtkSatOpenOk( GtkButton * button, gpointer user_data ) { intf_thread_t * p_intf = GetIntf( GTK_WIDGET(button), "intf_sat" ); + playlist_t * p_playlist; GtkCList * p_playlist_clist; char * psz_source; - int i_end = p_main->p_playlist->i_size; int i_freq, i_srate; int i_fec; - boolean_t b_pol; + vlc_bool_t b_pol; + + p_playlist = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_PLAYLIST, FIND_CHILD ); + if( p_playlist == NULL ) + { + return; + } gtk_widget_hide( p_intf->p_sys->p_sat ); @@ -603,7 +647,7 @@ void GtkSatOpenOk( GtkButton * button, gpointer user_data ) i_fec = strtol( gtk_entry_get_text( GTK_ENTRY( GTK_COMBO( lookup_widget( GTK_WIDGET( button ), "sat_fec" ) )->entry ) ), NULL, 10 ); - + /* Select frequency and symbol rate */ i_freq = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( lookup_widget( @@ -622,7 +666,7 @@ void GtkSatOpenOk( GtkButton * button, gpointer user_data ) /* Build source name and add it to playlist */ sprintf( psz_source, "%s:%d,%d,%d,%d", "satellite", i_freq, b_pol, i_fec, i_srate ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source ); + playlist_Add( p_playlist->p_this, 0, psz_source ); free( psz_source ); /* catch the GTK CList */ @@ -630,15 +674,19 @@ void GtkSatOpenOk( GtkButton * button, gpointer user_data ) GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); /* update the display */ - GtkRebuildCList( p_playlist_clist, p_main->p_playlist ); + GtkRebuildCList( p_playlist_clist, p_playlist ); /* stop current item, select added item */ - if( p_input_bank->pp_input[0] != NULL ) +#if 0 + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, i_end - 1 ); +#endif + + vlc_object_release( p_playlist ); } diff --git a/plugins/gtk/gtk_playlist.c b/plugins/gtk/gtk_playlist.c index 50ac2e5293..e401a06894 100644 --- a/plugins/gtk/gtk_playlist.c +++ b/plugins/gtk/gtk_playlist.c @@ -2,7 +2,7 @@ * gtk_playlist.c : Interface for the playlist dialog ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: gtk_playlist.c,v 1.31 2002/05/22 14:20:41 gbazin Exp $ + * $Id: gtk_playlist.c,v 1.32 2002/06/01 12:31:59 sam Exp $ * * Authors: Pierre Baillet * Stéphane Borel @@ -28,7 +28,8 @@ #include #include -#include +#include +#include #include /* for readdir and stat stuff */ @@ -46,18 +47,17 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" - #include "gtk_callbacks.h" #include "gtk_interface.h" #include "gtk_support.h" #include "gtk_playlist.h" #include "gtk_common.h" +/**************************************************************************** + * Local prototypes + ****************************************************************************/ +static void UrlDecode( char *encoded_path ); + /**************************************************************************** * Playlist window management ****************************************************************************/ @@ -65,6 +65,7 @@ gboolean GtkPlaylistShow( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { +#if 0 /* PLAYLIST TARASS */ intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); if( GTK_WIDGET_VISIBLE( p_intf->p_sys->p_playlist ) ) @@ -77,10 +78,11 @@ gboolean GtkPlaylistShow( GtkWidget *widget, p_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); - GtkRebuildCList( p_clist , p_main->p_playlist ); + GtkRebuildCList( p_clist , p_intf->p_vlc->p_playlist ); gtk_widget_show( p_intf->p_sys->p_playlist ); gdk_window_raise( p_intf->p_sys->p_playlist->window ); } +#endif return TRUE; } @@ -103,13 +105,17 @@ gboolean GtkPlaylistPrev( GtkWidget *widget, GdkEventButton *event, gpointer user_data ) { - if( p_input_bank->pp_input[0] != NULL ) +#if 0 /* PLAYLIST TARASS */ + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + + if( p_intf->p_sys->p_input != NULL ) { /* FIXME: temporary hack */ - intf_PlaylistPrev( p_main->p_playlist ); - intf_PlaylistPrev( p_main->p_playlist ); - p_input_bank->pp_input[0]->b_eof = 1; + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + p_intf->p_sys->p_input->b_eof = 1; } +#endif return TRUE; } @@ -119,11 +125,15 @@ gboolean GtkPlaylistNext( GtkWidget *widget, GdkEventButton *event, gpointer user_data) { - if( p_input_bank->pp_input[0] != NULL ) +#if 0 /* PLAYLIST TARASS */ + intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + + if( p_intf->p_sys->p_input != NULL ) { /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_sys->p_input->b_eof = 1; } +#endif return TRUE; } @@ -166,6 +176,7 @@ void GtkPlaylistDeleteAll( GtkMenuItem * menuitem, gpointer user_data ) void GtkPlaylistDeleteSelected( GtkMenuItem * menuitem, gpointer user_data ) { +#if 0 /* PLAYLIST TARASS */ /* user wants to delete a file in the queue */ GList * p_selection; GtkCList * p_clist; @@ -174,7 +185,7 @@ void GtkPlaylistDeleteSelected( GtkMenuItem * menuitem, gpointer user_data ) /* catch the thread back */ intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), /*(char*)user_data*/"intf_playlist" ); - p_playlist = p_main->p_playlist; + p_playlist = p_intf->p_vlc->p_playlist; /* lock the struct */ vlc_mutex_lock( &p_intf->change_lock ); @@ -197,6 +208,7 @@ void GtkPlaylistDeleteSelected( GtkMenuItem * menuitem, gpointer user_data ) } vlc_mutex_unlock( &p_intf->change_lock ); +#endif } void GtkPlaylistCrop( GtkMenuItem * menuitem, gpointer user_data ) @@ -209,6 +221,7 @@ void GtkPlaylistCrop( GtkMenuItem * menuitem, gpointer user_data ) void GtkPlaylistInvert( GtkMenuItem * menuitem, gpointer user_data ) { +#if 0 /* PLAYLIST TARASS */ playlist_t *p_playlist; GtkCList * p_clist; int * pi_selected; @@ -218,7 +231,7 @@ void GtkPlaylistInvert( GtkMenuItem * menuitem, gpointer user_data ) /* catch the thread back */ intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data ); - p_playlist = p_main->p_playlist; + p_playlist = p_intf->p_vlc->p_playlist; /* lock the struct */ vlc_mutex_lock( &p_intf->change_lock ); @@ -252,6 +265,7 @@ void GtkPlaylistInvert( GtkMenuItem * menuitem, gpointer user_data ) gtk_clist_thaw( p_clist ); vlc_mutex_unlock( &p_intf->change_lock ); +#endif } void GtkPlaylistSelect( GtkMenuItem * menuitem, gpointer user_data) @@ -263,6 +277,7 @@ gboolean GtkPlaylistEvent( GtkWidget * widget, GdkEvent * event, gpointer user_data) { +#if 0 /* PLAYLIST TARASS */ intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); if( ( event->button ).type == GDK_2BUTTON_PRESS ) @@ -278,16 +293,17 @@ gboolean GtkPlaylistEvent( GtkWidget * widget, (event->button).y, &i_row, &i_col ) == 1 ) { /* clicked is in range. */ - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_sys->p_input != NULL ) { /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_sys->p_input->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, i_row - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, i_row - 1 ); } return TRUE; } +#endif return FALSE; } @@ -301,14 +317,12 @@ void GtkPlaylistDragData( GtkWidget *widget, guint time, gpointer user_data ) { - intf_thread_t * p_intf; +#if 0 /* PLAYLIST TARASS */ + intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); GtkCList * p_clist; gint i_row; gint i_col; - int i_end = p_main->p_playlist->i_size; - - /* catch the interface back */ - p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); + int i_end = p_intf->p_vlc->p_playlist->i_size; p_clist = GTK_CLIST( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_playlist ), "playlist_clist" ) ); @@ -324,7 +338,8 @@ void GtkPlaylistDragData( GtkWidget *widget, GtkDropDataReceived( p_intf, data, info, PLAYLIST_END ); } - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, i_end - 1 ); +#endif } @@ -335,6 +350,7 @@ gboolean GtkPlaylistDragMotion( GtkWidget *widget, guint time, gpointer user_data ) { +#if 0 /* PLAYLIST TARASS */ intf_thread_t *p_intf; GtkCList * p_clist; gint i_row; @@ -366,7 +382,8 @@ gboolean GtkPlaylistDragMotion( GtkWidget *widget, color.red = 0xffff; color.blue = 0; color.green = 0; - gtk_clist_set_background( p_clist, p_main->p_playlist->i_index , &color ); + i_row = p_intf->p_vlc->p_playlist->i_index; + gtk_clist_set_background( p_clist, i_row, &color ); if( gtk_clist_get_selection_info( p_clist, x, y, &i_row, &i_col ) == 1) { @@ -378,6 +395,7 @@ gboolean GtkPlaylistDragMotion( GtkWidget *widget, } gtk_clist_thaw( p_clist ); +#endif return TRUE; } @@ -385,6 +403,7 @@ gboolean GtkPlaylistDragMotion( GtkWidget *widget, void GtkDropDataReceived( intf_thread_t * p_intf, GtkSelectionData * p_data, guint i_info, int i_position) { +#if 0 /* PLAYLIST TARASS */ /* first we'll have to split against all the '\n' we have */ gchar * p_protocol; gchar * p_temp; @@ -395,7 +414,7 @@ void GtkDropDataReceived( intf_thread_t * p_intf, /* catch the playlist back */ - playlist_t * p_playlist = p_main->p_playlist; + playlist_t * p_playlist = p_intf->p_vlc->p_playlist; /* if this has been URLencoded, decode it @@ -405,7 +424,7 @@ void GtkDropDataReceived( intf_thread_t * p_intf, */ if( i_info == DROP_ACCEPT_TEXT_URI_LIST ) { - intf_UrlDecode( p_string ); + UrlDecode( p_string ); } /* this cuts string into single file drops */ @@ -440,8 +459,8 @@ void GtkDropDataReceived( intf_thread_t * p_intf, /* eat two '/'s */ p_temp += 2; } - intf_WarnMsg( 4, "playlist: protocol '%s', target '%s'", - p_protocol, p_temp ); + msg_Dbg( p_intf, "playlist protocol '%s', target '%s'", + p_protocol, p_temp ); } else { @@ -479,7 +498,7 @@ void GtkDropDataReceived( intf_thread_t * p_intf, /* lock the interface */ vlc_mutex_lock( &p_intf->change_lock ); - intf_WarnMsg( 4, "List has %d elements", g_list_length( p_files ) ); + msg_Dbg( p_intf, "list has %d elements", g_list_length( p_files ) ); GtkAppendList( p_playlist, i_position, p_files ); /* get the CList and rebuild it. */ @@ -490,30 +509,33 @@ void GtkDropDataReceived( intf_thread_t * p_intf, /* unlock the interface */ vlc_mutex_unlock( &p_intf->change_lock ); } +#endif } void GtkDeleteGListItem( gpointer data, gpointer param ) { +#if 0 /* PLAYLIST TARASS */ int i_cur_row = (long)data; intf_thread_t * p_intf = param; - intf_PlaylistDelete( p_main->p_playlist, i_cur_row ); + intf_PlaylistDelete( p_intf->p_vlc->p_playlist, i_cur_row ); /* are we deleting the current played stream */ if( p_intf->p_sys->i_playing == i_cur_row ) { /* next ! */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_sys->p_input->b_eof = 1; /* this has to set the slider to 0 */ /* step minus one */ p_intf->p_sys->i_playing-- ; - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->i_index-- ; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->i_index-- ; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } +#endif } @@ -558,8 +580,8 @@ GList * GtkReadFiles( gchar * psz_fsname ) { if( GtkHasValidExtension( psz_fsname ) ) { - intf_WarnMsg( 2, "%s is a valid file. Stacking on the playlist", - psz_fsname ); +//X msg_Warn( "%s is a valid file. Stacking on the playlist", +//X psz_fsname ); return g_list_append( NULL, g_strdup( psz_fsname ) ); } else @@ -574,7 +596,7 @@ GList * GtkReadFiles( gchar * psz_fsname ) DIR * p_current_dir = opendir( psz_fsname ); struct dirent * p_dir_content; - intf_WarnMsg( 2, "%s is a folder.", psz_fsname ); +//X msg_Warn( "%s is a folder.", psz_fsname ); if( p_current_dir == NULL ) { @@ -618,6 +640,7 @@ GList * GtkReadFiles( gchar * psz_fsname ) */ int GtkAppendList( playlist_t * p_playlist, int i_pos, GList * p_list ) { +#if 0 /* PLAYLIST TARASS */ guint i_dummy; guint i_length; @@ -632,17 +655,19 @@ int GtkAppendList( playlist_t * p_playlist, int i_pos, GList * p_list ) i_pos==PLAYLIST_END?PLAYLIST_END:( i_pos + i_dummy ), g_list_nth_data( p_list, i_dummy ) ); } +#endif return 0; } /* statis timeouted function */ void GtkPlayListManage( intf_thread_t * p_intf ) { +#if 0 /* PLAYLIST TARASS */ /* this thing really sucks for now :( */ /* TODO speak more with interface/intf_playlist.c */ - playlist_t * p_playlist = p_main->p_playlist ; + playlist_t * p_playlist = p_intf->p_vlc->p_playlist ; GtkCList * p_clist; if( GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) ) @@ -675,10 +700,12 @@ void GtkPlayListManage( intf_thread_t * p_intf ) vlc_mutex_unlock( &p_playlist->change_lock ); } +#endif } void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist ) { +#if 0 /* PLAYLIST TARASS */ int i_dummy; gchar * ppsz_text[2]; GdkColor red; @@ -700,4 +727,41 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist ) gtk_clist_set_background( p_clist, p_playlist->i_index, &red); gtk_clist_thaw( p_clist ); +#endif } + +/* URL-decode a file: URL path, return NULL if it's not what we expect */ +static void UrlDecode( char *encoded_path ) +{ + char *tmp = NULL, *cur = NULL, *ext = NULL; + int realchar; + + if( !encoded_path || *encoded_path == '\0' ) + { + return; + } + + cur = encoded_path ; + + tmp = calloc(strlen(encoded_path) + 1, sizeof(char) ); + + while ( ( ext = strchr(cur, '%') ) != NULL) + { + strncat(tmp, cur, (ext - cur) / sizeof(char)); + ext++; + + if (!sscanf(ext, "%2x", &realchar)) + { + free(tmp); + return; + } + + tmp[strlen(tmp)] = (char)realchar; + + cur = ext + 2; + } + + strcat(tmp, cur); + strcpy(encoded_path,tmp); +} + diff --git a/plugins/gtk/gtk_playlist.h b/plugins/gtk/gtk_playlist.h index a5cecb53eb..ec357d8772 100644 --- a/plugins/gtk/gtk_playlist.h +++ b/plugins/gtk/gtk_playlist.h @@ -2,7 +2,7 @@ * gtk_playlist.h : Playlist functions for the Gtk plugin. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_playlist.h,v 1.5 2001/05/31 03:23:24 sam Exp $ + * $Id: gtk_playlist.h,v 1.6 2002/06/01 12:31:59 sam Exp $ * * Authors: Pierre Baillet * Stéphane Borel @@ -50,13 +50,8 @@ void GtkPlaylistActivate ( GtkMenuItem *, gpointer ); void GtkNextActivate ( GtkMenuItem *, gpointer ); void GtkPrevActivate ( GtkMenuItem *, gpointer ); - -struct intf_thread_s; -struct playlist_s; - -void GtkDropDataReceived ( struct intf_thread_s *, GtkSelectionData *, - guint, int ); -int GtkAppendList ( struct playlist_s *, int, GList * ); -void GtkRebuildCList ( GtkCList *, struct playlist_s * ); -void GtkPlayListManage ( struct intf_thread_s * ); +void GtkDropDataReceived ( intf_thread_t *, GtkSelectionData *, guint, int ); +int GtkAppendList ( playlist_t *, int, GList * ); +void GtkRebuildCList ( GtkCList *, playlist_t * ); +void GtkPlayListManage ( intf_thread_t * ); diff --git a/plugins/gtk/gtk_preferences.c b/plugins/gtk/gtk_preferences.c index eaeb203c96..8e635dec9b 100644 --- a/plugins/gtk/gtk_preferences.c +++ b/plugins/gtk/gtk_preferences.c @@ -2,7 +2,7 @@ * gtk_preferences.c: functions to handle the preferences dialog box. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_preferences.c,v 1.29 2002/05/19 20:26:11 gbazin Exp $ + * $Id: gtk_preferences.c,v 1.30 2002/06/01 12:31:59 sam Exp $ * * Authors: Gildas Bazin * Loïc Minier @@ -34,7 +34,8 @@ #include /* off_t */ #include -#include +#include +#include #ifdef MODULE_NAME_IS_gnome # include @@ -44,8 +45,6 @@ #include -#include "interface.h" - #include "gtk_support.h" #include "gtk_common.h" #include "gtk_preferences.h" @@ -177,12 +176,15 @@ static void GtkCreateConfigDialog( char *psz_module_name, /* Look for the selected module */ - for( p_module = p_module_bank->first ; p_module != NULL ; + for( p_module = p_intf->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { - if( psz_module_name && !strcmp( psz_module_name, p_module->psz_name ) ) + if( psz_module_name + && !strcmp( psz_module_name, p_module->psz_object_name ) ) + { break; + } } if( !p_module ) return; @@ -198,7 +200,9 @@ static void GtkCreateConfigDialog( char *psz_module_name, config_dialog_vbox = GTK_DIALOG(config_dialog)->vbox; #endif - category_max_height = config_GetIntVariable( MODULE_STRING "-prefs-maxh" ); + gtk_object_set_data( GTK_OBJECT(config_dialog), "p_intf", p_intf ); + + category_max_height = config_GetInt( p_intf, MODULE_STRING "-prefs-maxh" ); gtk_window_set_policy( GTK_WINDOW(config_dialog), TRUE, TRUE, FALSE ); gtk_container_set_border_width( GTK_CONTAINER(config_dialog_vbox), 0 ); @@ -305,9 +309,9 @@ static void GtkCreateConfigDialog( char *psz_module_name, { gchar * titles[] = { _("Name"), _("Description") }; - module_clist = - gtk_clist_new_with_titles( 2, titles ); + module_clist = gtk_clist_new_with_titles( 2, titles ); } + gtk_object_set_data( GTK_OBJECT(module_clist), "p_intf", p_intf ); gtk_clist_column_titles_passive( GTK_CLIST(module_clist) ); gtk_clist_set_selection_mode( GTK_CLIST(module_clist), GTK_SELECTION_SINGLE); @@ -317,13 +321,13 @@ static void GtkCreateConfigDialog( char *psz_module_name, { gchar * entry[2]; - for( p_module_bis = p_module_bank->first ; + for( p_module_bis = p_intf->p_vlc->module_bank.first ; p_module_bis != NULL ; p_module_bis = p_module_bis->next ) { if( p_module_bis->i_capabilities & (1 << p_item->i_value) ) { - entry[0] = p_module_bis->psz_name; + entry[0] = p_module_bis->psz_object_name; entry[1] = p_module_bis->psz_longname; gtk_clist_append( GTK_CLIST(module_clist), entry ); } @@ -577,18 +581,20 @@ static void GtkCreateConfigDialog( char *psz_module_name, ****************************************************************************/ void GtkConfigApply( GtkButton * button, gpointer user_data ) { + intf_thread_t *p_intf; GHashTable *hash_table; GtkWidget *apply_button; hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data), "config_hash_table" ); - g_hash_table_foreach_remove( hash_table, GtkSaveHashValue, NULL ); + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(user_data), + "p_intf" ); + g_hash_table_foreach_remove( hash_table, GtkSaveHashValue, (void*)p_intf ); /* change the highlight status of the Apply button */ apply_button = (GtkWidget *)gtk_object_get_data( GTK_OBJECT(user_data), "apply_button" ); gtk_widget_set_sensitive( apply_button, FALSE ); - } void GtkConfigOk( GtkButton * button, gpointer user_data ) @@ -605,8 +611,12 @@ void GtkConfigCancel( GtkButton * button, gpointer user_data ) void GtkConfigSave( GtkButton * button, gpointer user_data ) { + intf_thread_t *p_intf; + + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(user_data), + "p_intf" ); GtkConfigApply( button, user_data ); - config_SaveConfigFile( NULL ); + config_SaveConfigFile( p_intf->p_this, NULL ); } /**************************************************************************** @@ -616,18 +626,22 @@ void GtkConfigSave( GtkButton * button, gpointer user_data ) void GtkModuleHighlighted( GtkCList *module_clist, int row, int column, GdkEventButton *event, gpointer user_data ) { + intf_thread_t *p_intf; GtkWidget *config_button; module_t *p_module; char *psz_name; + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(module_clist), + "p_intf" ); + if( gtk_clist_get_text( GTK_CLIST(module_clist), row, 0, &psz_name ) ) { /* look for module 'psz_name' */ - for( p_module = p_module_bank->first ; + for( p_module = p_intf->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { - if( !strcmp( p_module->psz_name, psz_name ) ) + if( !strcmp( p_module->psz_object_name, psz_name ) ) { gtk_object_set_data( GTK_OBJECT(module_clist), "module_highlighted", p_module ); @@ -659,7 +673,7 @@ void GtkModuleConfigure( GtkButton *button, gpointer user_data ) if( !p_module ) return; p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(button), "p_intf" ); - GtkCreateConfigDialog( p_module->psz_name, (gpointer)p_intf ); + GtkCreateConfigDialog( p_module->psz_object_name, (gpointer)p_intf ); } @@ -677,7 +691,7 @@ void GtkModuleSelected( GtkButton *button, gpointer user_data ) "module_entry" ); if( !p_module ) return; - gtk_entry_set_text( GTK_ENTRY(widget), p_module->psz_name ); + gtk_entry_set_text( GTK_ENTRY(widget), p_module->psz_object_name ); } @@ -686,17 +700,19 @@ void GtkModuleSelected( GtkButton *button, gpointer user_data ) ****************************************************************************/ static void GtkStringChanged( GtkEditable *editable, gpointer user_data ) { + intf_thread_t *p_intf; module_config_t *p_config; - GHashTable *hash_table; GtkWidget *apply_button; + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(editable), + "p_intf" ); hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data), "config_hash_table" ); /* free old p_config */ p_config = (module_config_t *)g_hash_table_lookup( hash_table, (gpointer)editable ); - if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, NULL ); + if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, (void *)p_intf ); p_config = malloc( sizeof(module_config_t) ); p_config->i_type = MODULE_CONFIG_ITEM_STRING; @@ -718,11 +734,13 @@ static void GtkStringChanged( GtkEditable *editable, gpointer user_data ) ****************************************************************************/ static void GtkIntChanged( GtkEditable *editable, gpointer user_data ) { + intf_thread_t *p_intf; module_config_t *p_config; - GHashTable *hash_table; GtkWidget *apply_button; + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(editable), + "p_intf" ); gtk_spin_button_update( GTK_SPIN_BUTTON(editable) ); hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data), @@ -731,7 +749,7 @@ static void GtkIntChanged( GtkEditable *editable, gpointer user_data ) /* free old p_config */ p_config = (module_config_t *)g_hash_table_lookup( hash_table, (gpointer)editable ); - if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, NULL ); + if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, (void *)p_intf ); p_config = malloc( sizeof(module_config_t) ); p_config->i_type = MODULE_CONFIG_ITEM_INTEGER; @@ -754,11 +772,13 @@ static void GtkIntChanged( GtkEditable *editable, gpointer user_data ) ****************************************************************************/ static void GtkFloatChanged( GtkEditable *editable, gpointer user_data ) { + intf_thread_t *p_intf; module_config_t *p_config; - GHashTable *hash_table; GtkWidget *apply_button; + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(editable), + "p_intf" ); gtk_spin_button_update( GTK_SPIN_BUTTON(editable) ); hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data), @@ -767,7 +787,7 @@ static void GtkFloatChanged( GtkEditable *editable, gpointer user_data ) /* free old p_config */ p_config = (module_config_t *)g_hash_table_lookup( hash_table, (gpointer)editable ); - if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, NULL ); + if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, (void *)p_intf ); p_config = malloc( sizeof(module_config_t) ); p_config->i_type = MODULE_CONFIG_ITEM_FLOAT; @@ -786,22 +806,24 @@ static void GtkFloatChanged( GtkEditable *editable, gpointer user_data ) } /**************************************************************************** - * GtkStringChanged: signal called when the user changes a bool value. + * GtkBoolChanged: signal called when the user changes a bool value. ****************************************************************************/ static void GtkBoolChanged( GtkToggleButton *button, gpointer user_data ) { + intf_thread_t *p_intf; module_config_t *p_config; - GHashTable *hash_table; GtkWidget *apply_button; + p_intf = (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(button), + "p_intf" ); hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data), "config_hash_table" ); /* free old p_config */ p_config = (module_config_t *)g_hash_table_lookup( hash_table, (gpointer)button ); - if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, NULL ); + if( p_config ) GtkFreeHashValue( NULL, (gpointer)p_config, (void *)p_intf ); p_config = malloc( sizeof(module_config_t) ); p_config->i_type = MODULE_CONFIG_ITEM_BOOL; @@ -824,8 +846,10 @@ static void GtkBoolChanged( GtkToggleButton *button, gpointer user_data ) static void GtkFreeHashTable( gpointer user_data ) { GHashTable *hash_table = (GHashTable *)user_data; + intf_thread_t *p_intf = + (intf_thread_t *)gtk_object_get_data( GTK_OBJECT(hash_table), "p_intf" ); - g_hash_table_foreach( hash_table, GtkFreeHashValue, NULL ); + g_hash_table_foreach( hash_table, GtkFreeHashValue, (void *)p_intf ); g_hash_table_destroy( hash_table ); } @@ -835,7 +859,7 @@ static void GtkFreeHashTable( gpointer user_data ) ****************************************************************************/ static void GtkFreeHashValue( gpointer key, gpointer value, gpointer user_data) { - module_config_t *p_config = (module_config_t *)value; + module_config_t * p_config = (module_config_t *)value; if( p_config->i_type == MODULE_CONFIG_ITEM_STRING ) if( p_config->psz_value ) g_free( p_config->psz_value ); @@ -849,7 +873,8 @@ static void GtkFreeHashValue( gpointer key, gpointer value, gpointer user_data) static gboolean GtkSaveHashValue( gpointer key, gpointer value, gpointer user_data ) { - module_config_t *p_config = (module_config_t *)value; + intf_thread_t * p_intf = (intf_thread_t *)user_data; + module_config_t * p_config = (module_config_t *)value; switch( p_config->i_type ) { @@ -857,15 +882,15 @@ static gboolean GtkSaveHashValue( gpointer key, gpointer value, case MODULE_CONFIG_ITEM_STRING: case MODULE_CONFIG_ITEM_FILE: case MODULE_CONFIG_ITEM_MODULE: - config_PutPszVariable( p_config->psz_name, - *p_config->psz_value? p_config->psz_value : NULL ); + config_PutPsz( p_intf, p_config->psz_name, + *p_config->psz_value ? p_config->psz_value : NULL ); break; case MODULE_CONFIG_ITEM_INTEGER: case MODULE_CONFIG_ITEM_BOOL: - config_PutIntVariable( p_config->psz_name, p_config->i_value ); + config_PutInt( p_intf, p_config->psz_name, p_config->i_value ); break; case MODULE_CONFIG_ITEM_FLOAT: - config_PutFloatVariable( p_config->psz_name, p_config->f_value ); + config_PutFloat( p_intf, p_config->psz_name, p_config->f_value ); break; } diff --git a/plugins/gtk/gtk_support.h b/plugins/gtk/gtk_support.h index 17b71ecdec..9439da3598 100644 --- a/plugins/gtk/gtk_support.h +++ b/plugins/gtk/gtk_support.h @@ -1,5 +1,5 @@ /* - * This file was created automatically by glade and fixed by fixfiles.sh + * This file was created automatically by glade and fixed by bootstrap.sh */ #ifdef HAVE_CONFIG_H diff --git a/plugins/idct/idct.c b/plugins/idct/idct.c index 128ca8ad24..af1fa323ae 100644 --- a/plugins/idct/idct.c +++ b/plugins/idct/idct.c @@ -2,7 +2,7 @@ * idct.c : C IDCT module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: idct.c,v 1.23 2002/05/18 17:47:46 sam Exp $ + * $Id: idct.c,v 1.24 2002/06/01 12:31:59 sam Exp $ * * Author: Gaël Hendryckx * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "idct.h" #include "block_c.h" @@ -47,7 +47,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("IDCT module") ) ADD_CAPABILITY( IDCT, 50 ) ADD_SHORTCUT( "c" ) - ADD_SHORTCUT( "idct" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/idct/idctaltivec.c b/plugins/idct/idctaltivec.c index 150a7b675d..787ce53396 100644 --- a/plugins/idct/idctaltivec.c +++ b/plugins/idct/idctaltivec.c @@ -1,8 +1,8 @@ /***************************************************************************** - * idctaltivec.c : Altivec IDCT module + * idctaltivec.c : AltiVec IDCT module ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: idctaltivec.c,v 1.24 2002/04/19 13:56:11 sam Exp $ + * $Id: idctaltivec.c,v 1.25 2002/06/01 12:31:59 sam Exp $ * * Authors: Christophe Massiot * @@ -30,7 +30,7 @@ #include #include -#include +#include #include "idct.h" @@ -46,11 +46,10 @@ MODULE_CONFIG_START MODULE_CONFIG_STOP MODULE_INIT_START - SET_DESCRIPTION( _("Altivec IDCT module") ) + SET_DESCRIPTION( _("AltiVec IDCT module") ) ADD_CAPABILITY( IDCT, 200 ) ADD_REQUIREMENT( ALTIVEC ) ADD_SHORTCUT( "altivec" ) - ADD_SHORTCUT( "idctaltivec" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -87,7 +86,7 @@ static void InitIDCT( void ** pp_idct_data ) } /***************************************************************************** - * IDCT in Altivec + * IDCT in AltiVec *****************************************************************************/ #ifndef CAN_COMPILE_C_ALTIVEC diff --git a/plugins/idct/idctclassic.c b/plugins/idct/idctclassic.c index b1e0b8ec35..90dd083867 100644 --- a/plugins/idct/idctclassic.c +++ b/plugins/idct/idctclassic.c @@ -2,7 +2,7 @@ * idctclassic.c : Classic IDCT module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: idctclassic.c,v 1.24 2002/05/18 17:47:46 sam Exp $ + * $Id: idctclassic.c,v 1.25 2002/06/01 12:31:59 sam Exp $ * * Authors: Gaël Hendryckx * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "idct.h" #include "block_c.h" @@ -47,7 +47,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("classic IDCT module") ) ADD_CAPABILITY( IDCT, 100 ) ADD_SHORTCUT( "classic" ) - ADD_SHORTCUT( "idctclassic" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/idct/idctmmx.c b/plugins/idct/idctmmx.c index 9793ce7948..0b0de44bfc 100644 --- a/plugins/idct/idctmmx.c +++ b/plugins/idct/idctmmx.c @@ -2,7 +2,7 @@ * idctmmx.c : MMX IDCT module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: idctmmx.c,v 1.26 2002/05/18 17:47:46 sam Exp $ + * $Id: idctmmx.c,v 1.27 2002/06/01 12:31:59 sam Exp $ * * Authors: Aaron Holtzman * Michel Lespinasse @@ -31,7 +31,7 @@ #include #include -#include +#include #include "mmx.h" @@ -54,7 +54,6 @@ MODULE_INIT_START ADD_CAPABILITY( IDCT, 150 ) ADD_REQUIREMENT( MMX ) ADD_SHORTCUT( "mmx" ) - ADD_SHORTCUT( "imdctmmx" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/idct/idctmmxext.c b/plugins/idct/idctmmxext.c index 36cc717822..19ab685148 100644 --- a/plugins/idct/idctmmxext.c +++ b/plugins/idct/idctmmxext.c @@ -2,7 +2,7 @@ * idctmmxext.c : MMX EXT IDCT module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: idctmmxext.c,v 1.23 2002/05/18 17:47:46 sam Exp $ + * $Id: idctmmxext.c,v 1.24 2002/06/01 12:31:59 sam Exp $ * * Authors: Aaron Holtzman * Michel Lespinasse @@ -31,7 +31,7 @@ #include #include -#include +#include #include "mmx.h" @@ -54,7 +54,6 @@ MODULE_INIT_START ADD_CAPABILITY( IDCT, 200 ) ADD_REQUIREMENT( MMXEXT ) ADD_SHORTCUT( "mmxext" ) - ADD_SHORTCUT( "idctmmxext" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/imdct/ac3_imdct_3dn.c b/plugins/imdct/ac3_imdct_3dn.c index 03e12e8cbe..b79dda37d0 100644 --- a/plugins/imdct/ac3_imdct_3dn.c +++ b/plugins/imdct/ac3_imdct_3dn.c @@ -2,7 +2,7 @@ * ac3_imdct_3dn.c: accelerated 3D Now! ac3 DCT ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_imdct_3dn.c,v 1.10 2002/05/14 18:11:15 sam Exp $ + * $Id: ac3_imdct_3dn.c,v 1.11 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_imdct_common.h" diff --git a/plugins/imdct/ac3_imdct_c.c b/plugins/imdct/ac3_imdct_c.c index d1a58df028..f9f2b97dd0 100644 --- a/plugins/imdct/ac3_imdct_c.c +++ b/plugins/imdct/ac3_imdct_c.c @@ -2,7 +2,7 @@ * ac3_imdct_c.c: ac3 DCT in C ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_imdct_c.c,v 1.5 2001/12/30 07:09:55 sam Exp $ + * $Id: ac3_imdct_c.c,v 1.6 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -30,7 +30,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_imdct_common.h" diff --git a/plugins/imdct/ac3_imdct_common.c b/plugins/imdct/ac3_imdct_common.c index 73a28f5a45..943197f2e9 100644 --- a/plugins/imdct/ac3_imdct_common.c +++ b/plugins/imdct/ac3_imdct_common.c @@ -2,7 +2,7 @@ * ac3_imdct_common.c: common ac3 DCT functions ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_imdct_common.c,v 1.6 2001/12/30 07:09:55 sam Exp $ + * $Id: ac3_imdct_common.c,v 1.7 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -28,7 +28,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_retables.h" diff --git a/plugins/imdct/ac3_imdct_sse.c b/plugins/imdct/ac3_imdct_sse.c index d31f032447..56863afed3 100644 --- a/plugins/imdct/ac3_imdct_sse.c +++ b/plugins/imdct/ac3_imdct_sse.c @@ -2,7 +2,7 @@ * ac3_imdct_sse.c: accelerated SSE ac3 DCT ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_imdct_sse.c,v 1.11 2002/05/14 18:11:15 sam Exp $ + * $Id: ac3_imdct_sse.c,v 1.12 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -28,7 +28,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_imdct_common.h" diff --git a/plugins/imdct/ac3_srfft_3dn.c b/plugins/imdct/ac3_srfft_3dn.c index f7444bfee8..90b9f2c57d 100644 --- a/plugins/imdct/ac3_srfft_3dn.c +++ b/plugins/imdct/ac3_srfft_3dn.c @@ -2,7 +2,7 @@ * ac3_srfft_3dn.c: accelerated 3D Now! ac3 fft functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_srfft_3dn.c,v 1.5 2001/12/30 07:09:55 sam Exp $ + * $Id: ac3_srfft_3dn.c,v 1.6 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_srfft.h" diff --git a/plugins/imdct/ac3_srfft_c.c b/plugins/imdct/ac3_srfft_c.c index 54a0e05e10..8e124a52bb 100644 --- a/plugins/imdct/ac3_srfft_c.c +++ b/plugins/imdct/ac3_srfft_c.c @@ -2,7 +2,7 @@ * ac3_srfft.c: ac3 FFT in C ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_srfft_c.c,v 1.4 2001/12/30 07:09:55 sam Exp $ + * $Id: ac3_srfft_c.c,v 1.5 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -28,7 +28,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_srfft.h" diff --git a/plugins/imdct/ac3_srfft_sse.c b/plugins/imdct/ac3_srfft_sse.c index 917dcae58e..55f6a5bed2 100644 --- a/plugins/imdct/ac3_srfft_sse.c +++ b/plugins/imdct/ac3_srfft_sse.c @@ -2,7 +2,7 @@ * ac3_srfft_sse.c: accelerated SSE ac3 fft functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ac3_srfft_sse.c,v 1.12 2002/05/14 18:11:15 sam Exp $ + * $Id: ac3_srfft_sse.c,v 1.13 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -28,7 +28,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_srfft.h" diff --git a/plugins/imdct/imdct.c b/plugins/imdct/imdct.c index 9e38659f0c..2ebf2844f8 100644 --- a/plugins/imdct/imdct.c +++ b/plugins/imdct/imdct.c @@ -2,7 +2,7 @@ * imdct.c : IMDCT module ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: imdct.c,v 1.9 2002/04/19 13:56:11 sam Exp $ + * $Id: imdct.c,v 1.10 2002/06/01 12:31:59 sam Exp $ * * Authors: Gaël Hendryckx * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_imdct_common.h" @@ -47,7 +47,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("AC3 IMDCT module") ) ADD_CAPABILITY( IMDCT, 50 ) ADD_SHORTCUT( "c" ) - ADD_SHORTCUT( "imdct" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/imdct/imdct3dn.c b/plugins/imdct/imdct3dn.c index 23232b96f2..5ac2b8ebde 100644 --- a/plugins/imdct/imdct3dn.c +++ b/plugins/imdct/imdct3dn.c @@ -2,7 +2,7 @@ * imdct3dn.c : accelerated 3D Now! IMDCT module ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: imdct3dn.c,v 1.11 2002/04/19 13:56:11 sam Exp $ + * $Id: imdct3dn.c,v 1.12 2002/06/01 12:31:59 sam Exp $ * * Authors: Renaud Dartus * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_imdct_common.h" @@ -49,7 +49,6 @@ MODULE_INIT_START ADD_REQUIREMENT( 3DNOW ) ADD_SHORTCUT( "3dn" ) ADD_SHORTCUT( "3dnow" ) - ADD_SHORTCUT( "imdct3dn" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/imdct/imdctsse.c b/plugins/imdct/imdctsse.c index 172f7fa589..448df1a1c1 100644 --- a/plugins/imdct/imdctsse.c +++ b/plugins/imdct/imdctsse.c @@ -2,7 +2,7 @@ * imdctsse.c : accelerated SSE IMDCT module ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: imdctsse.c,v 1.12 2002/04/19 13:56:11 sam Exp $ + * $Id: imdctsse.c,v 1.13 2002/06/01 12:31:59 sam Exp $ * * Authors: Gaël Hendryckx * @@ -27,7 +27,7 @@ #include #include -#include +#include #include "ac3_imdct.h" #include "ac3_imdct_common.h" @@ -48,7 +48,6 @@ MODULE_INIT_START ADD_CAPABILITY( IMDCT, 200 ) ADD_REQUIREMENT( SSE ) ADD_SHORTCUT( "sse" ) - ADD_SHORTCUT( "imdctsse" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/kde/QConfigItem.cpp b/plugins/kde/QConfigItem.cpp index 2d89ab4277..aad1f3ce2b 100644 --- a/plugins/kde/QConfigItem.cpp +++ b/plugins/kde/QConfigItem.cpp @@ -1,5 +1,5 @@ #include "QConfigItem.h" -#include +#include QConfigItem::QConfigItem(QObject *parent, QString name, int iType, int i_val) : QObject(parent, name) { diff --git a/plugins/kde/kde.cpp b/plugins/kde/kde.cpp index 4edc352dff..04fb6262a1 100644 --- a/plugins/kde/kde.cpp +++ b/plugins/kde/kde.cpp @@ -2,7 +2,7 @@ * kde.cpp : KDE plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: kde.cpp,v 1.12 2002/04/19 13:56:11 sam Exp $ + * $Id: kde.cpp,v 1.13 2002/06/01 12:31:59 sam Exp $ * * Authors: Andres Krapf Sun Mar 25 2001 * @@ -62,7 +62,6 @@ MODULE_INIT_START { ADD_CAPABILITY( INTF, 85 ) } - ADD_SHORTCUT( "kde" ) ADD_PROGRAM( "kvlc" ) MODULE_INIT_STOP @@ -131,7 +130,7 @@ KThread::KThread(intf_thread_t *p_intf) } int argc = 1; - char *argv[] = { p_main->psz_arg0, NULL }; + char *argv[] = { p_intf->p_vlc->psz_object_name, NULL }; KCmdLineArgs::init( argc, argv, p_intf->p_sys->p_about ); p_intf->p_sys->p_app = new KApplication(); @@ -160,7 +159,7 @@ int KThread::open(intf_thread_t *p_intf) p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + msg_Err( p_intf, "out of memory" ); return( 1 ); } diff --git a/plugins/kde/kde_common.h b/plugins/kde/kde_common.h index 447fcb23fb..daa3dcd1c6 100644 --- a/plugins/kde/kde_common.h +++ b/plugins/kde/kde_common.h @@ -9,20 +9,12 @@ #ifndef _INTF_PLUGIN_H_ #define _INTF_PLUGIN_H_ -extern "C" -{ #include #include #include #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "intf_playlist.h" -#include "interface.h" -} +#include +#include #endif /* _INTF_PLUGIN_H_ */ diff --git a/plugins/kde/kde_interface.cpp b/plugins/kde/kde_interface.cpp index e4a9679448..6c2996408c 100644 --- a/plugins/kde/kde_interface.cpp +++ b/plugins/kde/kde_interface.cpp @@ -143,7 +143,7 @@ void KInterface::slotFileOpen() if( !url.isEmpty() ) { fileOpenRecent->addURL( url ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, url.path() ); + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, PLAYLIST_END, url.path() ); } slotStatusMsg( i18n( "Ready." ) ); @@ -208,7 +208,7 @@ void KInterface::slotViewStatusBar() void KInterface::slotShowPreferences() { // Do something - KPreferences("main", this, "preferences"); + KPreferences(this->p_intf, "main", this, "preferences"); } void KInterface::slotStatusMsg(const QString &text) @@ -232,7 +232,7 @@ void KInterface::slotManage() /* Update language/chapter menus after user request */ #if 0 - if( p_input_bank->pp_input[0] != NULL && p_intf->p_sys->p_window != NULL && + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL && p_intf->p_sys->p_window != NULL && p_intf->p_sys->b_menus_update ) { // GnomeSetupMenu( p_intf ); @@ -240,8 +240,8 @@ void KInterface::slotManage() #endif /* Manage the slider */ -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area - if( (p_input_bank->pp_input[0] != NULL) && (p_area->i_size != 0 )) +#define p_area p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area + if( (p_intf->p_vlc->p_input_bank->pp_input[0] != NULL) && (p_area->i_size != 0 )) { fSlider->setValue( ( 10000. * p_area->i_tell ) / p_area->i_size ); } @@ -250,7 +250,7 @@ void KInterface::slotManage() /* Manage core vlc functions through the callback */ p_intf->pf_manage(p_intf); - if( p_intf->b_die ) + if( p_intf->p_vlc->b_die ) { p_intf->p_sys->p_app->quit(); } @@ -263,25 +263,25 @@ void KInterface::slotSliderMoved( int position ) // XXX is this locking really useful ? vlc_mutex_lock( &p_intf->change_lock ); - off_t i_seek = ( position * p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 10000; - input_Seek( p_input_bank->pp_input[0], i_seek ); + off_t i_seek = ( position * p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 10000; + input_Seek( p_intf->p_vlc->p_input_bank->pp_input[0]->p_this, i_seek, INPUT_SEEK_SET ); vlc_mutex_unlock( &p_intf->change_lock ); } void KInterface::slotSliderChanged( int position ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { char psz_time[ OFFSETTOTIME_MAX_SIZE ]; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area - statusBar()->changeItem( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 10000 ), ID_DATE ); +#define p_area p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area + statusBar()->changeItem( input_OffsetToTime( p_intf->p_vlc->p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 10000 ), ID_DATE ); #undef p_area - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } } @@ -302,13 +302,13 @@ void KInterface::slotOpenDisk() source += fDiskDialog->chapter(); // add it to playlist - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, source.latin1() ); + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, PLAYLIST_END, source.latin1() ); // Select added item and switch to disk interface - intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 ); - if( p_input_bank->pp_input[0] != NULL ) + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, p_intf->p_vlc->p_playlist->i_size-2 ); + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } } @@ -327,87 +327,87 @@ void KInterface::slotOpenStream() source += QString().setNum( fNetDialog->port() ); // add it to playlist - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, source.latin1() ); - intf_PlaylistJumpto( p_main->p_playlist, p_main->p_playlist->i_size-2 ); + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, PLAYLIST_END, source.latin1() ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, p_intf->p_vlc->p_playlist->i_size-2 ); - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } } void KInterface::slotPlay() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } void KInterface::slotPause() { - if ( p_input_bank->pp_input[0] != NULL ) + if ( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); } } void KInterface::slotStop() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* end playing item */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + p_intf->p_vlc->p_playlist->i_index--; + p_intf->p_vlc->p_playlist->b_stopped = 1; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } void KInterface::slotBackward() { - intf_ErrMsg( "KInterface::slotBackward() - Unimplemented" ); + msg_Err( p_intf, "KInterface::slotBackward() - Unimplemented" ); } void KInterface::slotPrev() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* FIXME: temporary hack */ - intf_PlaylistPrev( p_main->p_playlist ); - intf_PlaylistPrev( p_main->p_playlist ); - p_input_bank->pp_input[0]->b_eof = 1; + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } void KInterface::slotNext() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } void KInterface::slotSlow() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); } } void KInterface::slotFast() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); } } @@ -428,7 +428,7 @@ void KInterface::dropEvent( QDropEvent *event ) if( !(*i).isEmpty() ) { fileOpenRecent->addURL( *i ); - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (*i).path() ); + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, PLAYLIST_END, (*i).path() ); } } } diff --git a/plugins/kde/kde_interface.h b/plugins/kde/kde_interface.h index 4f9ee7dfd4..c3494bf083 100644 --- a/plugins/kde/kde_interface.h +++ b/plugins/kde/kde_interface.h @@ -136,14 +136,13 @@ class KInterface : public KMainWindow /***************************************************************************** * intf_sys_t: description and status of KDE interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { KThread *p_thread; KApplication *p_app; KInterface *p_window; KAboutData *p_about; - -} intf_sys_t; +}; #endif /* _KDE_INTERFACE_H_ */ diff --git a/plugins/kde/kde_menu.cpp b/plugins/kde/kde_menu.cpp index 7fc9b6d4ed..6dd666aadd 100644 --- a/plugins/kde/kde_menu.cpp +++ b/plugins/kde/kde_menu.cpp @@ -29,14 +29,14 @@ void KTitleMenu::regenerateSlot() fLanguageList = new KActionMenu( "Language", 0, this ); int i_item = 0; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); - for( int i = 0 ; i < p_input_bank->pp_input[0]->stream.i_es_number ; i++ ) + for( int i = 0 ; i < fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.i_es_number ; i++ ) { - if( p_input_bank->pp_input[0]->stream.pp_es[i]->i_cat /* == i_cat */ ) + if( fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i]->i_cat /* == i_cat */ ) { i_item++; - QString language( p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc ); + QString language( fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc ); if ( QString::null == language ) { language += i18n( "Language" ); @@ -45,7 +45,7 @@ void KTitleMenu::regenerateSlot() KRadioAction *action = new KRadioAction( language, 0, this, "language_action" ); fLanguageList->insert( action ); - if( /* p_es == */ p_input_bank->pp_input[0]->stream.pp_es[i] ) + if( /* p_es == */ fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i] ) { /* don't lose p_item when we append into menu */ //p_item_active = p_item; @@ -53,7 +53,7 @@ void KTitleMenu::regenerateSlot() } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); #if 0 /* link the new menu to the menubar item */ diff --git a/plugins/kde/kde_pluginsbox.cpp b/plugins/kde/kde_pluginsbox.cpp index 015508212c..bc5f495940 100644 --- a/plugins/kde/kde_pluginsbox.cpp +++ b/plugins/kde/kde_pluginsbox.cpp @@ -1,7 +1,6 @@ #include "kde_pluginsbox.h" #include "kde_preferences.h" -#include #include #include #include @@ -9,11 +8,13 @@ #include #include -KPluginsBox::KPluginsBox(QString text, QString value, QWidget *parent, +KPluginsBox::KPluginsBox(intf_thread_t *p_intf, + QString text, QString value, QWidget *parent, int spacing, KPreferences *pref) : QGroupBox( 1, Vertical, text, parent ) { owner = pref; + this->p_intf = p_intf; QVBox *item_vbox = new QVBox( this ); item_vbox->setSpacing(spacing); @@ -56,7 +57,7 @@ void KPluginsBox::selectClicked() void KPluginsBox::configureClicked() { if (listView->selectedItem()) { - new KPreferences(listView->selectedItem()->text(0), this); + new KPreferences(p_intf, listView->selectedItem()->text(0), this); } } void KPluginsBox::selectionChanged( QListViewItem *item ) diff --git a/plugins/kde/kde_pluginsbox.h b/plugins/kde/kde_pluginsbox.h index da9ea8d807..68bf676322 100644 --- a/plugins/kde/kde_pluginsbox.h +++ b/plugins/kde/kde_pluginsbox.h @@ -9,8 +9,8 @@ class KPluginsBox : public QGroupBox { Q_OBJECT public: - KPluginsBox(QString title, QString value, QWidget *parent, int spacing, - KPreferences *pref); + KPluginsBox(intf_thread_t *p_intf, QString title, QString value, + QWidget *parent, int spacing, KPreferences *pref); ~KPluginsBox(); QListView *getListView(void); @@ -24,6 +24,7 @@ class KPluginsBox : public QGroupBox void selectionChanged(const QString &text); private: + intf_thread_t *p_intf; KListView *listView; QPushButton *configure; QPushButton *selectButton; diff --git a/plugins/kde/kde_preferences.cpp b/plugins/kde/kde_preferences.cpp index 32fa67d5e2..ed8af8897c 100644 --- a/plugins/kde/kde_preferences.cpp +++ b/plugins/kde/kde_preferences.cpp @@ -16,18 +16,16 @@ #include #include #include -#include #include "QConfigItem.h" #include "kde_pluginsbox.h" #include "kde_preferences.h" -#include "interface.h" /* construkt a new configuration window for the given module */ -KPreferences::KPreferences(const char *psz_module_name, QWidget *parent, - const QString &caption) : +KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name, + QWidget *parent, const QString &caption) : KDialogBase ( Tabbed, caption, Ok| Apply|Cancel|User1, Ok, parent, "vlc preferences", true, false, "Save") { @@ -36,8 +34,10 @@ KPreferences::KPreferences(const char *psz_module_name, QWidget *parent, QVBox *category_table = NULL; QString *category_label; + this->p_intf = p_intf; + /* Look for the selected module */ - for( p_module = p_module_bank->first ; p_module != NULL ; + for( p_module = p_intf->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { @@ -80,7 +80,7 @@ KPreferences::KPreferences(const char *psz_module_name, QWidget *parent, vlc_mutex_lock( p_item->p_lock ); KPluginsBox *item_frame = - new KPluginsBox( p_item->psz_text, + new KPluginsBox( p_intf, p_item->psz_text, p_item->psz_value ? p_item->psz_value :"", category_table, spacingHint(), @@ -95,7 +95,7 @@ KPreferences::KPreferences(const char *psz_module_name, QWidget *parent, /* build a list of available plugins */ - for( p_module_bis = p_module_bank->first ; + for( p_module_bis = p_intf->p_vlc->module_bank.first ; p_module_bis != NULL ; p_module_bis = p_module_bis->next ) { if( p_module_bis->i_capabilities & (1 << p_item->i_value)){ @@ -208,7 +208,7 @@ KPreferences::~KPreferences() bool KPreferences::isConfigureable(QString module) { module_t *p_module; - for( p_module = p_module_bank->first ; + for( p_module = p_intf->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { if( !module.compare( p_module->psz_name ) ) { @@ -231,8 +231,8 @@ void KPreferences::slotApply() while ( (obj=it.current()) != 0 ) { ++it; QConfigItem *p_config = (QConfigItem *)obj; - intf_WarnMsg(1, const_cast(p_config->name())); - intf_WarnMsg(1, "%d", p_config->getType()); + msg_Dbg( p_intf, const_cast(p_config->name())); + msg_Dbg( p_intf, "%d", p_config->getType()); switch( p_config->getType() ) { @@ -240,24 +240,19 @@ void KPreferences::slotApply() case MODULE_CONFIG_ITEM_FILE: case MODULE_CONFIG_ITEM_MODULE: if (p_config->sValue()) { - config_PutPszVariable( p_config->name(), - strdup(p_config->sValue().latin1())); + config_PutPsz( p_intf, p_config->name(), + strdup(p_config->sValue().latin1())); } else { - config_PutPszVariable( p_config->name(), NULL ); + config_PutPsz( p_intf, p_config->name(), NULL ); } break; case MODULE_CONFIG_ITEM_INTEGER: case MODULE_CONFIG_ITEM_BOOL: - config_PutIntVariable( p_config->name(), p_config->iValue() ); + config_PutInt( p_intf, p_config->name(), p_config->iValue() ); break; case MODULE_CONFIG_ITEM_FLOAT: - if (config_PutFloatVariable) { - config_PutFloatVariable( p_config->name(), p_config->fValue()); - } - else { - intf_WarnMsg(1, "config_PutFloatVariable not defined"); - } + config_PutFloat( p_intf, p_config->name(), p_config->fValue() ); break; } } @@ -279,5 +274,5 @@ void KPreferences::slotOk() void KPreferences::slotUser1() { slotApply(); - config_SaveConfigFile( NULL ); + config_SaveConfigFile( p_intf->p_this, NULL ); } diff --git a/plugins/kde/kde_preferences.h b/plugins/kde/kde_preferences.h index 8b617f9e38..f80dbb5ec4 100644 --- a/plugins/kde/kde_preferences.h +++ b/plugins/kde/kde_preferences.h @@ -1,5 +1,6 @@ #ifndef _KDE_PREFERENCES_H_ #define _KDE_PREFERENCES_H_ +#include "kde_common.h" #include #include "QConfigItem.h" @@ -7,8 +8,8 @@ class KPreferences : KDialogBase { Q_OBJECT public: - KPreferences( const char *psz_module_name, QWidget *parent, - const QString &caption=QString::null); + KPreferences(intf_thread_t *p_intf, const char *psz_module_name, + QWidget *parent, const QString &caption=QString::null); ~KPreferences(); bool isConfigureable(QString module); @@ -16,5 +17,8 @@ class KPreferences : KDialogBase void slotApply(); void slotOk(); void slotUser1(); + + private: + intf_thread_t *p_intf; }; #endif diff --git a/plugins/lirc/lirc.c b/plugins/lirc/lirc.c index 70702e584d..c246328deb 100644 --- a/plugins/lirc/lirc.c +++ b/plugins/lirc/lirc.c @@ -2,7 +2,7 @@ * lirc.c : lirc plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: lirc.c,v 1.10 2002/04/19 13:56:11 sam Exp $ + * $Id: lirc.c,v 1.11 2002/06/01 12:31:59 sam Exp $ * * Authors: Sigmund Augdal * @@ -29,27 +29,20 @@ #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" -#include "intf_msg.h" -#include "interface.h" -#include "intf_playlist.h" - -#include "video.h" -#include "video_output.h" +#include +#include +#include #include /***************************************************************************** * intf_sys_t: description and status of FB interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { struct lirc_config *config; vlc_mutex_t change_lock; -} intf_sys_t; +}; /***************************************************************************** * Local prototypes. @@ -70,7 +63,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("infrared remote control module") ) ADD_CAPABILITY( INTF, 8 ) - ADD_SHORTCUT( "lirc" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -102,14 +94,14 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg("no mem?"); + msg_Err( p_intf, "out of memory" ); return 1; } i_fd = lirc_init( "vlc", 1 ); if( i_fd == -1 ) { - intf_ErrMsg( "intf error: lirc_init failed" ); + msg_Err( p_intf, "lirc_init failed" ); free( p_intf->p_sys ); return 1; } @@ -119,7 +111,7 @@ static int intf_Open( intf_thread_t *p_intf ) if( lirc_readconfig( NULL, &p_intf->p_sys->config, NULL ) != 0 ) { - intf_ErrMsg( "intf error: lirc_readconfig failed" ); + msg_Err( p_intf, "lirc_readconfig failed" ); lirc_deinit(); free( p_intf->p_sys ); return 1; @@ -150,7 +142,7 @@ static void intf_Run( intf_thread_t *p_intf ) /* Manage core vlc functions through the callback */ p_intf->pf_manage( p_intf ); - while( !p_intf->b_die ) + while( !p_intf->p_vlc->b_die ) { /* Manage core vlc functions through the callback */ p_intf->pf_manage( p_intf ); @@ -167,118 +159,112 @@ static void intf_Run( intf_thread_t *p_intf ) continue; } - while( !p_intf->b_die + while( !p_intf->p_vlc->b_die && lirc_code2char( p_intf->p_sys->config, code, &c ) == 0 && c != NULL ) { if( !strcmp( c, "QUIT" ) ) { - p_intf->b_die = 1; + p_intf->p_vlc->b_die = 1; continue; } if( !strcmp( c, "FULLSCREEN" ) ) { - vlc_mutex_lock( &p_vout_bank->lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_vout_bank->lock ); /* XXX: only fullscreen the first video output */ - if( p_vout_bank->i_count ) + if( p_intf->p_vlc->p_vout_bank->i_count ) { - p_vout_bank->pp_vout[0]->i_changes + p_intf->p_vlc->p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; } - vlc_mutex_unlock( &p_vout_bank->lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_vout_bank->lock ); continue; } - vlc_mutex_lock( &p_input_bank->lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->lock ); if( !strcmp( c, "PLAY" ) ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); - p_main->p_playlist->b_stopped = 0; + p_intf->p_vlc->p_playlist->b_stopped = 0; } else { - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - if( p_main->p_playlist->b_stopped ) + if( p_intf->p_vlc->p_playlist->b_stopped + && p_intf->p_vlc->p_playlist->i_size ) { - if( p_main->p_playlist->i_size ) - { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_index ); - } - else - { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - } + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, + p_intf->p_vlc->p_playlist->i_index ); } else { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } } - else if( p_input_bank->pp_input[0] != NULL ) + else if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { if( !strcmp( c, "PAUSE" ) ) { - input_SetStatus( p_input_bank->pp_input[0], + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } else if( !strcmp( c, "NEXT" ) ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } else if( !strcmp( c, "LAST" ) ) { /* FIXME: temporary hack */ - intf_PlaylistPrev( p_main->p_playlist ); - intf_PlaylistPrev( p_main->p_playlist ); - p_input_bank->pp_input[0]->b_eof = 1; + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } else if( !strcmp( c, "STOP" ) ) { /* end playing item */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + p_intf->p_vlc->p_playlist->i_index--; + p_intf->p_vlc->p_playlist->b_stopped = 1; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } else if( !strcmp( c, "FAST" ) ) { - input_SetStatus( p_input_bank->pp_input[0], + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } else if( !strcmp( c, "SLOW" ) ) { - input_SetStatus( p_input_bank->pp_input[0], + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } - vlc_mutex_unlock( &p_input_bank->lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->lock ); } free( code ); diff --git a/plugins/lpcm_adec/lpcm_adec.c b/plugins/lpcm_adec/lpcm_adec.c index 2e1f464750..0a9e20565f 100644 --- a/plugins/lpcm_adec/lpcm_adec.c +++ b/plugins/lpcm_adec/lpcm_adec.c @@ -1,8 +1,8 @@ /***************************************************************************** - * lpcm_decoder_thread.c: lpcm decoder thread + * lpcm_adec.c: lpcm decoder thread ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: lpcm_adec.c,v 1.15 2002/05/24 12:42:14 gbazin Exp $ + * $Id: lpcm_adec.c,v 1.16 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * Henri Fallon @@ -25,28 +25,24 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* "intf_msg.h" */ #include /* memcpy(), memset() */ #include /* malloc(), free() */ -#include +#include +#include +#include #ifdef HAVE_UNISTD_H # include /* getpid() */ #endif -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" - #include "lpcm_adec.h" /***************************************************************************** * Local prototypes *****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); void DecodeFrame ( lpcmdec_thread_t * ); static int InitThread ( lpcmdec_thread_t * ); static void EndThread ( lpcmdec_thread_t * ); @@ -90,7 +86,7 @@ static int decoder_Probe( u8 *pi_type ) /***************************************************************************** * decoder_Run: the lpcm decoder *****************************************************************************/ -static int decoder_Run( decoder_config_t * p_config ) +static int decoder_Run( decoder_fifo_t * p_fifo ) { lpcmdec_thread_t * p_lpcmdec; @@ -98,20 +94,19 @@ static int decoder_Run( decoder_config_t * p_config ) if( (p_lpcmdec = (lpcmdec_thread_t *)malloc (sizeof(lpcmdec_thread_t)) ) == NULL) { - intf_ErrMsg( "LPCM : error : cannot create lpcmdec_thread_t" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } /* * Initialize the thread properties */ - p_lpcmdec->p_config = p_config; - p_lpcmdec->p_fifo = p_config->p_decoder_fifo; + p_lpcmdec->p_fifo = p_fifo; if( InitThread( p_lpcmdec ) ) { - DecoderError( p_config->p_decoder_fifo ); + DecoderError( p_fifo ); free( p_lpcmdec ); return( -1 ); } @@ -141,12 +136,13 @@ static int InitThread (lpcmdec_thread_t * p_lpcmdec) { /* Init the BitStream */ - InitBitstream( &p_lpcmdec->bit_stream, p_lpcmdec->p_config->p_decoder_fifo, + InitBitstream( &p_lpcmdec->bit_stream, p_lpcmdec->p_fifo, NULL, NULL); /* Creating the audio output fifo */ - p_lpcmdec->p_aout_fifo = aout_CreateFifo( AOUT_FIFO_PCM, 2, 48000, - LPCMDEC_FRAME_SIZE/2, NULL ); + p_lpcmdec->p_aout_fifo = + aout_CreateFifo( p_lpcmdec->p_fifo->p_this, AOUT_FIFO_PCM, + 2, 48000, LPCMDEC_FRAME_SIZE / 2, NULL ); if ( p_lpcmdec->p_aout_fifo == NULL ) { return( -1 ); diff --git a/plugins/lpcm_adec/lpcm_adec.h b/plugins/lpcm_adec/lpcm_adec.h index 6f5f0d970c..de5714196b 100644 --- a/plugins/lpcm_adec/lpcm_adec.h +++ b/plugins/lpcm_adec/lpcm_adec.h @@ -2,7 +2,7 @@ * lpcm_decoder_thread.h : lpcm decoder thread interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: lpcm_adec.h,v 1.1 2001/11/13 12:09:18 henri Exp $ + * $Id: lpcm_adec.h,v 1.2 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -38,7 +38,6 @@ typedef struct lpcmdec_thread_s */ decoder_fifo_t * p_fifo; /* stores the PES stream data */ int sync_ptr; /* sync ptr from lpcm magic header */ - decoder_config_t * p_config; /* * Output properties @@ -53,4 +52,4 @@ typedef struct lpcmdec_thread_s /***************************************************************************** * Prototypes *****************************************************************************/ -vlc_thread_t lpcmdec_CreateThread( decoder_config_t * p_config ); +vlc_thread_t lpcmdec_CreateThread( decoder_fifo_t * p_fifo ); diff --git a/plugins/macosx/aout_macosx.m b/plugins/macosx/aout_macosx.m index 84d15ba530..a7b5b3c48c 100644 --- a/plugins/macosx/aout_macosx.m +++ b/plugins/macosx/aout_macosx.m @@ -2,7 +2,7 @@ * aout_macosx.c : CoreAudio output plugin ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: aout_macosx.m,v 1.4 2002/05/20 10:44:18 massiot Exp $ + * $Id: aout_macosx.m,v 1.5 2002/06/01 12:32:00 sam Exp $ * * Authors: Colin Delacroix * Jon Lech Johansen @@ -27,9 +27,8 @@ *****************************************************************************/ #include -#include - -#include "audio_output.h" /* aout_thread_t */ +#include +#include #include #include @@ -42,7 +41,7 @@ * This structure is part of the audio output thread descriptor. * It describes the CoreAudio specific properties of an output thread. *****************************************************************************/ -typedef struct aout_sys_s +struct aout_sys_s { AudioDeviceID device; // the audio device AudioConverterRef s_converter; // the AudioConverter @@ -53,11 +52,11 @@ typedef struct aout_sys_s Ptr p_buffer; // ptr to the 32 bit float data UInt32 ui_buffer_size; // audio device buffer size - boolean_t b_buffer_data; // available buffer data? + vlc_bool_t b_buffer_data; // available buffer data? vlc_mutex_t mutex_lock; // pthread locks for sync of vlc_cond_t cond_sync; // aout_Play and callback mtime_t clock_diff; // diff between system clock & audio -} aout_sys_t; +}; /***************************************************************************** * Local prototypes. @@ -105,7 +104,7 @@ static int aout_Open( aout_thread_t *p_aout ) p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg( "aout error: %s", strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -120,7 +119,7 @@ static int aout_Open( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: failed to get the device: %d", err ); + msg_Err( p_aout, "failed to get the device: %d", err ); return( -1 ); } @@ -133,7 +132,7 @@ static int aout_Open( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: failed to get device buffer size: %d", err ); + msg_Err( p_aout, "failed to get device buffer size: %d", err ); return( -1 ); } @@ -146,18 +145,18 @@ static int aout_Open( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: failed to get dst stream format: %d", err ); + msg_Err( p_aout, "failed to get dst stream format: %d", err ); return( -1 ); } if( p_aout->p_sys->s_dst_stream_format.mFormatID != kAudioFormatLinearPCM ) { - intf_ErrMsg( "aout error: kAudioFormatLinearPCM required" ); + msg_Err( p_aout, "kAudioFormatLinearPCM required" ); return( -1 ); } /* initialize mutex and cond */ - vlc_mutex_init( &p_aout->p_sys->mutex_lock ); + vlc_mutex_init( p_aout, &p_aout->p_sys->mutex_lock ); vlc_cond_init( &p_aout->p_sys->cond_sync ); /* initialize source stream format */ @@ -167,7 +166,7 @@ static int aout_Open( aout_thread_t *p_aout ) if( CABeginFormat( p_aout ) ) { - intf_ErrMsg( "aout error: CABeginFormat failed" ); + msg_Err( p_aout, "CABeginFormat failed" ); return( -1 ); } @@ -181,20 +180,20 @@ static int aout_SetFormat( aout_thread_t *p_aout ) { if( CAEndFormat( p_aout ) ) { - intf_ErrMsg( "aout error: CAEndFormat failed" ); + msg_Err( p_aout, "CAEndFormat failed" ); return( -1 ); } switch( p_aout->i_format ) { case AOUT_FMT_S8: - intf_ErrMsg( "Audio format (Signed 8) not supported now," - "please report stream" ); + msg_Err( p_aout, + "Signed 8 not supported yet, please report stream" ); return( -1 ); case AOUT_FMT_U8: - intf_ErrMsg( "Audio format (Unsigned 8) not supported now," - "please report stream" ); + msg_Err( p_aout, + "Unsigned 8 not supported yet, please report stream" ); return( -1 ); case AOUT_FMT_S16_LE: @@ -226,8 +225,8 @@ static int aout_SetFormat( aout_thread_t *p_aout ) break; default: - intf_ErrMsg( "Audio format (0x%08x) not supported now," - "please report stream", p_aout->i_format ); + msg_Err( p_aout, "audio format (0x%08x) not supported now," + "please report stream", p_aout->i_format ); return( -1 ); } @@ -253,7 +252,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) if( CABeginFormat( p_aout ) ) { - intf_ErrMsg( "aout error: CABeginFormat failed" ); + msg_Err( p_aout, "CABeginFormat failed" ); return( -1 ); } @@ -299,7 +298,7 @@ static OSStatus CAIOCallback( AudioDeviceID inDevice, else { memset(outOutputData->mBuffers[ 0 ].mData, 0, p_sys->ui_buffer_size); - intf_WarnMsg(1, "aout warning: audio output is starving, expect glitches"); +//X msg_Warn( p_aout, "audio output is starving, expect glitches" ); } /* see aout_Play below */ @@ -312,7 +311,7 @@ static OSStatus CAIOCallback( AudioDeviceID inDevice, } /***************************************************************************** - * aout_Play: plays a sound + * aout_Play: play a sound *****************************************************************************/ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) { @@ -337,7 +336,7 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) if( err != noErr ) { - intf_ErrMsg( "aout error: ConvertBuffer failed: %d", err ); + msg_Err( p_aout, "ConvertBuffer failed: %d", err ); } else { @@ -352,7 +351,7 @@ static void aout_Close( aout_thread_t *p_aout ) { if( CAEndFormat( p_aout ) ) { - intf_ErrMsg( "aout error: CAEndFormat failed" ); + msg_Err( p_aout, "CAEndFormat failed" ); } /* destroy lock and cond */ @@ -372,7 +371,7 @@ static int CABeginFormat( aout_thread_t *p_aout ) if( p_aout->p_sys->b_format ) { - intf_ErrMsg( "aout error: CABeginFormat (b_format)" ); + msg_Err( p_aout, "CABeginFormat (b_format)" ); return( 1 ); } @@ -389,7 +388,7 @@ static int CABeginFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioDeviceSetProperty failed: %d", err ); + msg_Err( p_aout, "AudioDeviceSetProperty failed: %d", err ); return( 1 ); } @@ -398,7 +397,7 @@ static int CABeginFormat( aout_thread_t *p_aout ) if( p_aout->p_sys->p_buffer == nil ) { - intf_ErrMsg( "aout error: failed to allocate audio buffer" ); + msg_Err( p_aout, "failed to allocate audio buffer" ); return( 1 ); } @@ -409,7 +408,7 @@ static int CABeginFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioConverterNew failed: %d", err ); + msg_Err( p_aout, "AudioConverterNew failed: %d", err ); DisposePtr( p_aout->p_sys->p_buffer ); return( 1 ); } @@ -421,7 +420,7 @@ static int CABeginFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioDeviceAddIOProc failed: %d", err ); + msg_Err( p_aout, "AudioDeviceAddIOProc failed: %d", err ); AudioConverterDispose( p_aout->p_sys->s_converter ); DisposePtr( p_aout->p_sys->p_buffer ); return( 1 ); @@ -433,7 +432,7 @@ static int CABeginFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioDeviceStart failed: %d", err ); + msg_Err( p_aout, "AudioDeviceStart failed: %d", err ); AudioConverterDispose( p_aout->p_sys->s_converter ); DisposePtr( p_aout->p_sys->p_buffer ); return( 1 ); @@ -459,7 +458,7 @@ static int CAEndFormat( aout_thread_t *p_aout ) if( !p_aout->p_sys->b_format ) { - intf_ErrMsg( "aout error: CAEndFormat (!b_format)" ); + msg_Err( p_aout, "CAEndFormat (!b_format)" ); return( 1 ); } @@ -469,7 +468,7 @@ static int CAEndFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioDeviceStop failed: %d", err ); + msg_Err( p_aout, "AudioDeviceStop failed: %d", err ); return( 1 ); } @@ -479,7 +478,7 @@ static int CAEndFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioDeviceRemoveIOProc failed: %d", err ); + msg_Err( p_aout, "AudioDeviceRemoveIOProc failed: %d", err ); return( 1 ); } @@ -488,7 +487,7 @@ static int CAEndFormat( aout_thread_t *p_aout ) if( err != noErr ) { - intf_ErrMsg( "aout error: AudioConverterDispose failed: %d", err ); + msg_Err( p_aout, "AudioConverterDispose failed: %d", err ); return( 1 ); } diff --git a/plugins/macosx/intf_controller.m b/plugins/macosx/intf_controller.m index 076e052515..a72ba6ab69 100644 --- a/plugins/macosx/intf_controller.m +++ b/plugins/macosx/intf_controller.m @@ -2,7 +2,7 @@ * intf_controller.c: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: intf_controller.m,v 1.4 2002/05/20 05:20:12 jlj Exp $ + * $Id: intf_controller.m,v 1.5 2002/06/01 12:32:00 sam Exp $ * * Authors: Florian G. Pflug * Jon Lech Johansen @@ -24,10 +24,8 @@ #import -#include - -#include "interface.h" -#include "intf_playlist.h" +#include +#include #include "macosx.h" #include "intf_controller.h" diff --git a/plugins/macosx/intf_macosx.m b/plugins/macosx/intf_macosx.m index 2a897ee6e8..852b5a75ac 100644 --- a/plugins/macosx/intf_macosx.m +++ b/plugins/macosx/intf_macosx.m @@ -2,7 +2,7 @@ * intf_macosx.c: MacOS X interface plugin ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: intf_macosx.m,v 1.1 2002/05/12 20:56:33 massiot Exp $ + * $Id: intf_macosx.m,v 1.2 2002/06/01 12:32:00 sam Exp $ * * Authors: Colin Delacroix * Florian G. Pflug @@ -30,9 +30,8 @@ #include /* for MAXPATHLEN */ #include -#include - -#include "interface.h" +#include +#include #include "macosx.h" @@ -69,7 +68,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys->o_port = [[NSPort port] retain]; p_intf->p_sys->b_mute = 0; p_intf->p_sys->i_part = 0; - p_intf->p_sys->b_disabled_menus = 0; + p_intf->p_sys->b_disabled_menus = 0; [[NSApplication sharedApplication] autorelease]; [NSBundle loadNibNamed: @"MainMenu" owner: NSApp]; diff --git a/plugins/macosx/intf_vlc_wrapper.m b/plugins/macosx/intf_vlc_wrapper.m index 4f508ad367..2c43aea405 100644 --- a/plugins/macosx/intf_vlc_wrapper.m +++ b/plugins/macosx/intf_vlc_wrapper.m @@ -2,7 +2,7 @@ * intf_vlc_wrapper.c: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: intf_vlc_wrapper.m,v 1.7 2002/06/01 11:11:51 sam Exp $ + * $Id: intf_vlc_wrapper.m,v 1.8 2002/06/01 12:32:00 sam Exp $ * * Authors: Florian G. Pflug * Jon Lech Johansen @@ -328,7 +328,8 @@ static Intf_VLCWrapper *o_intf = nil; { if( p_input_bank->pp_input[0] != NULL ) { - input_Seek( p_input_bank->pp_input[0], p_area->i_size * f_position ); + input_Seek( p_input_bank->pp_input[0]->p_this, + p_area->i_size * f_position, INPUT_SEEK_SET ); } } diff --git a/plugins/macosx/macosx.h b/plugins/macosx/macosx.h index 60ab31f2b6..679ac8464b 100644 --- a/plugins/macosx/macosx.h +++ b/plugins/macosx/macosx.h @@ -2,7 +2,7 @@ * macosx.h: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: macosx.h,v 1.9 2002/05/12 01:39:36 massiot Exp $ + * $Id: macosx.h,v 1.10 2002/06/01 12:32:00 sam Exp $ * * Authors: Colin Delacroix * Eugenio Jarosiewicz @@ -33,30 +33,30 @@ /***************************************************************************** * intf_sys_t: description and status of the interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { NSPort *o_port; NSAutoreleasePool *o_pool; - boolean_t b_mute; + vlc_bool_t b_mute; int i_saved_volume; int i_part; - boolean_t b_disabled_menus; -} intf_sys_t; + vlc_bool_t b_disabled_menus; +}; /***************************************************************************** * vout_sys_t: MacOS X video output method descriptor *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { VLCWindow *o_window; NSRect s_rect; int b_pos_saved; - boolean_t b_mouse_moved; - boolean_t b_mouse_pointer_visible; + vlc_bool_t b_mouse_moved; + vlc_bool_t b_mouse_pointer_visible; mtime_t i_time_mouse_last_moved; CodecType i_codec; @@ -65,7 +65,7 @@ typedef struct vout_sys_s MatrixRecordPtr p_matrix; DecompressorComponent img_dc; ImageDescriptionHandle h_img_descr; -} vout_sys_t; +}; /***************************************************************************** * vout_req_t: MacOS X video output request @@ -80,5 +80,5 @@ typedef struct vout_req_s NSConditionLock *o_lock; - struct vout_thread_s *p_vout; + vout_thread_t *p_vout; } vout_req_t; diff --git a/plugins/macosx/macosx.m b/plugins/macosx/macosx.m index 783ee99529..78fffac00d 100644 --- a/plugins/macosx/macosx.m +++ b/plugins/macosx/macosx.m @@ -2,7 +2,7 @@ * macosx.c: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: macosx.m,v 1.1 2002/05/12 20:56:34 massiot Exp $ + * $Id: macosx.m,v 1.2 2002/06/01 12:32:00 sam Exp $ * * Authors: Colin Delacroix * Eugenio Jarosiewicz @@ -30,7 +30,7 @@ #include /* malloc(), free() */ #include -#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -50,7 +50,6 @@ MODULE_INIT_START ADD_CAPABILITY( INTF, 100 ) ADD_CAPABILITY( AOUT, 100 ) ADD_CAPABILITY( VOUT, 100 ) - ADD_SHORTCUT( "macosx" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/macosx/vout_macosx.m b/plugins/macosx/vout_macosx.m index 165d326fb0..6d0fab39ac 100644 --- a/plugins/macosx/vout_macosx.m +++ b/plugins/macosx/vout_macosx.m @@ -29,48 +29,40 @@ #include /* free() */ #include /* strerror() */ -#include - -#include "video.h" -#include "video_output.h" - -#include "interface.h" - #include "macosx.h" #define QT_MAX_DIRECTBUFFERS 10 -typedef struct picture_sys_s +struct picture_sys_s { void *p_info; unsigned int i_size; /* When using I420 output */ PlanarPixmapInfoYUV420 pixmap_i420; - -} picture_sys_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); - -static int CoSendRequest ( struct vout_thread_s *, long i_request ); -static int CoCreateWindow ( struct vout_thread_s * ); -static int CoDestroyWindow ( struct vout_thread_s * ); -static int CoToggleFullscreen ( struct vout_thread_s * ); - -static void QTScaleMatrix ( struct vout_thread_s * ); -static int QTCreateSequence ( struct vout_thread_s * ); -static void QTDestroySequence ( struct vout_thread_s * ); -static int QTNewPicture ( struct vout_thread_s *, struct picture_s * ); -static void QTFreePicture ( struct vout_thread_s *, struct picture_s * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); + +static int CoSendRequest ( vout_thread_t *, long ); +static int CoCreateWindow ( vout_thread_t * ); +static int CoDestroyWindow ( vout_thread_t * ); +static int CoToggleFullscreen ( vout_thread_t * ); + +static void QTScaleMatrix ( vout_thread_t * ); +static int QTCreateSequence ( vout_thread_t * ); +static void QTDestroySequence ( vout_thread_t * ); +static int QTNewPicture ( vout_thread_t *, picture_t * ); +static void QTFreePicture ( vout_thread_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -96,17 +88,17 @@ static int vout_Create( vout_thread_t *p_vout ) { OSErr err; - if( !p_main->p_intf || !p_main->p_intf->p_module || - strcmp( p_main->p_intf->p_module->psz_name, MODULE_STRING ) != 0 ) + if( !p_vout->p_vlc->p_intf || !p_vout->p_vlc->p_intf->p_module || + strcmp( p_vout->p_vlc->p_intf->p_module->psz_name, MODULE_STRING ) != 0 ) { - intf_ErrMsg( "vout error: MacOS X interface module required" ); + msg_Err( p_vout, "MacOS X interface module required" ); return( 1 ); } p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) { - intf_ErrMsg( "vout error: %s", strerror( ENOMEM ) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -124,7 +116,7 @@ static int vout_Create( vout_thread_t *p_vout ) if( ( err = EnterMovies() ) != noErr ) { - intf_ErrMsg( "vout error: EnterMovies failed: %d", err ); + msg_Err( p_vout, "EnterMovies failed: %d", err ); free( p_vout->p_sys->p_matrix ); DisposeHandle( (Handle)p_vout->p_sys->h_img_descr ); free( p_vout->p_sys ); @@ -142,13 +134,13 @@ static int vout_Create( vout_thread_t *p_vout ) } else { - intf_ErrMsg( "vout error: failed to find an appropriate codec" ); + msg_Err( p_vout, "failed to find an appropriate codec" ); } } else { - intf_ErrMsg( "vout error: chroma 0x%08x not supported", - p_vout->render.i_chroma ); + msg_Err( p_vout, "chroma 0x%08x not supported", + p_vout->render.i_chroma ); } if( p_vout->p_sys->img_dc == 0 ) @@ -161,7 +153,7 @@ static int vout_Create( vout_thread_t *p_vout ) if( CoCreateWindow( p_vout ) ) { - intf_ErrMsg( "vout error: unable to create window" ); + msg_Err( p_vout, "unable to create window" ); free( p_vout->p_sys->p_matrix ); DisposeHandle( (Handle)p_vout->p_sys->h_img_descr ); free( p_vout->p_sys ); @@ -193,7 +185,7 @@ static int vout_Init( vout_thread_t *p_vout ) if( QTCreateSequence( p_vout ) ) { - intf_ErrMsg( "vout error: unable to create sequence" ); + msg_Err( p_vout, "unable to create sequence" ); return( 1 ); } @@ -253,7 +245,7 @@ static void vout_Destroy( vout_thread_t *p_vout ) { if( CoDestroyWindow( p_vout ) ) { - intf_ErrMsg( "vout error: unable to destroy window" ); + msg_Err( p_vout, "unable to destroy window" ); } ExitMovies(); @@ -294,7 +286,7 @@ static int vout_Manage( vout_thread_t *p_vout ) if( p_vout->p_sys->b_mouse_moved || p_vout->p_sys->i_time_mouse_last_moved ) { - boolean_t b_change = 0; + vlc_bool_t b_change = 0; if( !p_vout->p_sys->b_mouse_pointer_visible ) { @@ -347,7 +339,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) p_pic->p_sys->i_size, codecFlagUseImageBuffer, &flags, nil ) != noErr ) ) { - intf_ErrMsg( "DecompressSequenceFrameS failed: %d", err ); + msg_Err( p_vout, "DecompressSequenceFrameS failed: %d", err ); } } @@ -374,7 +366,7 @@ static int CoSendRequest( vout_thread_t *p_vout, long i_request ) o_array = [NSArray arrayWithObject: [NSData dataWithBytes: &p_req length: sizeof(void *)]]; o_msg = [[NSPortMessage alloc] - initWithSendPort: p_main->p_intf->p_sys->o_port + initWithSendPort: p_vout->p_vlc->p_intf->p_sys->o_port receivePort: recvPort components: o_array]; @@ -400,7 +392,7 @@ static int CoCreateWindow( vout_thread_t *p_vout ) { if( CoSendRequest( p_vout, VOUT_REQ_CREATE_WINDOW ) ) { - intf_ErrMsg( "CoSendRequest (CREATE_WINDOW) failed" ); + msg_Err( p_vout, "CoSendRequest (CREATE_WINDOW) failed" ); return( 1 ); } @@ -422,7 +414,7 @@ static int CoDestroyWindow( vout_thread_t *p_vout ) if( CoSendRequest( p_vout, VOUT_REQ_DESTROY_WINDOW ) ) { - intf_ErrMsg( "CoSendRequest (DESTROY_WINDOW) failed" ); + msg_Err( p_vout, "CoSendRequest (DESTROY_WINDOW) failed" ); return( 1 ); } @@ -440,7 +432,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) if( CoDestroyWindow( p_vout ) ) { - intf_ErrMsg( "vout error: unable to destroy window" ); + msg_Err( p_vout, "unable to destroy window" ); return( 1 ); } @@ -448,7 +440,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) if( CoCreateWindow( p_vout ) ) { - intf_ErrMsg( "vout error: unable to create window" ); + msg_Err( p_vout, "unable to create window" ); return( 1 ); } @@ -457,7 +449,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) if( QTCreateSequence( p_vout ) ) { - intf_ErrMsg( "vout error: unable to create sequence" ); + msg_Err( p_vout, "unable to create sequence" ); return( 1 ); } @@ -558,7 +550,7 @@ static int QTCreateSequence( vout_thread_t *p_vout ) codecLosslessQuality, p_vout->p_sys->img_dc ) ) ) { - intf_ErrMsg( "DecompressSequenceBeginS failed: %d", err ); + msg_Err( p_vout, "DecompressSequenceBeginS failed: %d", err ); return( 1 ); } @@ -645,9 +637,8 @@ static int QTNewPicture( vout_thread_t *p_vout, picture_t *p_pic ) default: /* Unknown chroma, tell the guy to get lost */ free( p_pic->p_sys ); - intf_ErrMsg( "vout error: never heard of chroma 0x%.8x (%4.4s)", - p_vout->output.i_chroma, - (char*)&p_vout->output.i_chroma ); + msg_Err( p_vout, "never heard of chroma 0x%.8x (%4.4s)", + p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma ); p_pic->i_planes = 0; return( -1 ); } diff --git a/plugins/macosx/vout_vlc_wrapper.m b/plugins/macosx/vout_vlc_wrapper.m index 71cc93fd53..9d93e8d4fd 100644 --- a/plugins/macosx/vout_vlc_wrapper.m +++ b/plugins/macosx/vout_vlc_wrapper.m @@ -2,7 +2,7 @@ * vout_vlc_wrapper.c: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: vout_vlc_wrapper.m,v 1.2 2002/05/18 18:48:24 massiot Exp $ + * $Id: vout_vlc_wrapper.m,v 1.3 2002/06/01 12:32:00 sam Exp $ * * Authors: Jon Lech Johansen * @@ -28,12 +28,9 @@ #include /* free() */ #include /* strerror() */ -#include - -#include "video.h" -#include "video_output.h" - -#include "interface.h" +#include +#include +#include #include "macosx.h" #include "vout_vlc_wrapper.h" @@ -73,8 +70,7 @@ static Vout_VLCWrapper *o_vout = nil; - (void)mouseEvent:(unsigned int)ui_status forVout:(void *)_p_vout { - struct vout_thread_s *p_vout = - (struct vout_thread_s *)_p_vout; + vout_thread_t *p_vout = (vout_thread_t *)_p_vout; if( ui_status & MOUSE_MOVED ) p_vout->p_sys->b_mouse_moved = 1; @@ -102,8 +98,7 @@ static Vout_VLCWrapper *o_vout = nil; { unichar key = 0; - struct vout_thread_s *p_vout = - (struct vout_thread_s *)_p_vout; + vout_thread_t *p_vout = (vout_thread_t *)_p_vout; if( [[o_event characters] length] ) { @@ -117,7 +112,7 @@ static Vout_VLCWrapper *o_vout = nil; break; case 'q': case 'Q': - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; default: diff --git a/plugins/macosx/vout_window.m b/plugins/macosx/vout_window.m index e77a8e4209..447fbf676d 100644 --- a/plugins/macosx/vout_window.m +++ b/plugins/macosx/vout_window.m @@ -2,7 +2,7 @@ * vout_window.c: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: vout_window.m,v 1.1 2002/05/12 20:56:34 massiot Exp $ + * $Id: vout_window.m,v 1.2 2002/06/01 12:32:00 sam Exp $ * * Authors: Jon Lech Johansen * diff --git a/plugins/mad/mad_adec.c b/plugins/mad/mad_adec.c index 0cbefed3a5..092fb615c4 100644 --- a/plugins/mad/mad_adec.c +++ b/plugins/mad/mad_adec.c @@ -26,12 +26,9 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include /***************************************************************************** * Libmad include files * @@ -44,7 +41,7 @@ * Local prototypes *****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static int InitThread ( mad_adec_thread_t * p_mad_adec ); static void EndThread ( mad_adec_thread_t * p_mad_adec ); @@ -62,8 +59,8 @@ void _M( adec_getfunctions )( function_list_t * p_function_list ) *****************************************************************************/ #define DOWNSCALE_TEXT N_("Mad audio downscale routine (fast,mp321)") #define DOWNSCALE_LONGTEXT N_( \ - "Specify the mad audio downscale routine you want to use.\nBy default mad plugins will " \ - "use the fastest routine.") + "Specify the mad audio downscale routine you want to use. By default " \ + "the mad plugin will use the fastest routine.") MODULE_CONFIG_START ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) @@ -73,7 +70,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("libmad MPEG 1/2/3 audio decoder library") ) ADD_CAPABILITY( DECODER, 100 ) - ADD_SHORTCUT( "mad" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -102,32 +98,28 @@ static int decoder_Probe( u8 *pi_type ) /***************************************************************************** * decoder_Run: this function is called just after the thread is created *****************************************************************************/ -static int decoder_Run ( decoder_config_t * p_config ) +static int decoder_Run ( decoder_fifo_t * p_fifo ) { mad_adec_thread_t * p_mad_adec; - intf_WarnMsg( 4, "mad_adec debug: mad_adec thread launched, initializing" ); - /* Allocate the memory needed to store the thread's structure */ p_mad_adec = (mad_adec_thread_t *) malloc(sizeof(mad_adec_thread_t)); if (p_mad_adec == NULL) { - intf_ErrMsg ( "mad_adec error: not enough memory " - "for decoder_Run() to allocate p_mad_adec" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } /* * Initialize the thread properties */ - p_mad_adec->p_config = p_config; - p_mad_adec->p_fifo = p_mad_adec->p_config->p_decoder_fifo; + p_mad_adec->p_fifo = p_fifo; if( InitThread( p_mad_adec ) ) { - intf_ErrMsg( "mad_adec error: could not initialize thread" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "could not initialize thread" ); + DecoderError( p_fifo ); free( p_mad_adec ); return( -1 ); } @@ -135,10 +127,10 @@ static int decoder_Run ( decoder_config_t * p_config ) /* mad decoder thread's main loop */ while ((!p_mad_adec->p_fifo->b_die) && (!p_mad_adec->p_fifo->b_error)) { - intf_ErrMsg( "mad_adec: starting libmad decoder" ); + msg_Dbg( p_mad_adec->p_fifo, "starting libmad decoder" ); if (mad_decoder_run(p_mad_adec->libmad_decoder, MAD_DECODER_MODE_SYNC)==-1) { - intf_ErrMsg( "mad_adec error: libmad decoder returns abnormally"); + msg_Err( p_mad_adec->p_fifo, "libmad decoder returned abnormally" ); DecoderError( p_mad_adec->p_fifo ); EndThread(p_mad_adec); return( -1 ); @@ -170,22 +162,22 @@ static int InitThread( mad_adec_thread_t * p_mad_adec ) */ /* Look what scaling method was requested by the user */ - psz_downscale = config_GetPszVariable( "downscale" ); + psz_downscale = config_GetPsz( p_fifo, "downscale" ); if ( strncmp(psz_downscale,"fast",4)==0 ) { p_mad_adec->audio_scaling = FAST_SCALING; - intf_WarnMsg( 4, "mad_adec debug: downscale fast selected" ); + msg_Dbg( p_fifo, "downscale fast selected" ); } else if ( strncmp(psz_downscale,"mpg321",7)==0 ) { p_mad_adec->audio_scaling = MPG321_SCALING; - intf_WarnMsg( 4, "mad_adec debug: downscale mpg321 selected" ); + msg_Dbg( p_fifo, "downscale mpg321 selected" ); } else { p_mad_adec->audio_scaling = FAST_SCALING; - intf_WarnMsg( 4, "mad_adec debug: downscale default fast selected" ); + msg_Dbg( p_fifo, "downscale default fast selected" ); } if (psz_downscale) free(psz_downscale); @@ -194,8 +186,7 @@ static int InitThread( mad_adec_thread_t * p_mad_adec ) p_mad_adec->libmad_decoder = (struct mad_decoder*) malloc(sizeof(struct mad_decoder)); if (p_mad_adec->libmad_decoder == NULL) { - intf_ErrMsg ( "mad_adec error: not enough memory " - "for decoder_InitThread() to allocate p_mad_adec->libmad_decder" ); + msg_Err( p_mad_adec->p_fifo, "out of memory" ); return -1; } p_mad_adec->i_current_pts = p_mad_adec->i_next_pts = 0; @@ -234,8 +225,6 @@ static int InitThread( mad_adec_thread_t * p_mad_adec ) vlc_mutex_unlock( &p_fifo->data_lock ); p_mad_adec->p_data = p_fifo->p_first->p_first; - intf_WarnMsg( 4, "mad_adec debug: mad decoder thread %p initialized", p_mad_adec); - return( 0 ); } @@ -244,8 +233,6 @@ static int InitThread( mad_adec_thread_t * p_mad_adec ) *****************************************************************************/ static void EndThread (mad_adec_thread_t * p_mad_adec) { - intf_WarnMsg( 4, "mad_adec debug: destroying mad decoder thread %p", p_mad_adec); - /* If the audio output fifo was created, we destroy it */ if (p_mad_adec->p_aout_fifo != NULL) { @@ -260,10 +247,8 @@ static void EndThread (mad_adec_thread_t * p_mad_adec) /* mad_decoder_finish releases the memory allocated inside the struct */ mad_decoder_finish( p_mad_adec->libmad_decoder ); - /* Unlock the modules, p_mad_adec->p_config is released by the decoder subsystem */ + /* Unlock the modules, p_mad_adec->p_fifo is released by the decoder subsystem */ free( p_mad_adec->libmad_decoder ); free( p_mad_adec ); - - intf_WarnMsg( 4, "mad_adec debug: mad decoder thread %p destroyed", p_mad_adec); } diff --git a/plugins/mad/mad_adec.h b/plugins/mad/mad_adec.h index c5214e12b7..3112cc59fe 100644 --- a/plugins/mad/mad_adec.h +++ b/plugins/mad/mad_adec.h @@ -43,7 +43,6 @@ typedef struct mad_adec_thread_s */ decoder_fifo_t * p_fifo; /* stores the PES stream data */ data_packet_t * p_data; - decoder_config_t * p_config; /* Store i_pts for syncing audio frames */ mtime_t i_current_pts, i_next_pts; @@ -59,6 +58,6 @@ typedef struct mad_adec_thread_s /***************************************************************************** * Prototypes *****************************************************************************/ -vlc_thread_t mad_adec_CreateThread( decoder_config_t * p_config ); +vlc_thread_t mad_adec_CreateThread( decoder_fifo_t * p_fifo ); #endif diff --git a/plugins/mad/mad_libmad.c b/plugins/mad/mad_libmad.c index 5806177654..f17abd2c26 100644 --- a/plugins/mad/mad_libmad.c +++ b/plugins/mad/mad_libmad.c @@ -24,12 +24,9 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include - -#include "audio_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include /***************************************************************************** * Libmad includes files @@ -51,12 +48,12 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream) unsigned char *ReadStart; if ( p_mad_adec->p_fifo->b_die == 1 ) { - intf_ErrMsg( "mad_adec error: libmad_input stopping libmad decoder" ); + msg_Err( p_mad_adec->p_fifo, "libmad_input stopping libmad decoder" ); return MAD_FLOW_STOP; } if ( p_mad_adec->p_fifo->b_error == 1 ) { - intf_ErrMsg( "mad_adec error: libmad_input ignoring current audio frame" ); + msg_Err( p_mad_adec->p_fifo, "libmad_input ignoring current audio frame" ); return MAD_FLOW_IGNORE; } @@ -80,8 +77,8 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream) Remaining=p_libmad_stream->bufend-p_libmad_stream->next_frame; if( p_mad_adec->buffer != p_libmad_stream->next_frame ) { - FAST_MEMCPY( p_mad_adec->buffer, p_libmad_stream->next_frame, - Remaining ); + p_mad_adec->p_fifo->p_vlc->pf_memcpy( p_mad_adec->buffer, + p_libmad_stream->next_frame, Remaining ); } ReadStart=p_mad_adec->buffer+Remaining; ReadSize=(MAD_BUFFER_MDLEN)-Remaining; @@ -109,26 +106,26 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream) { ReadSize = p_mad_adec->p_data->p_payload_end - p_mad_adec->p_data->p_payload_start; - FAST_MEMCPY( ReadStart, p_mad_adec->p_data->p_payload_start, - ReadSize ); + p_mad_adec->p_fifo->p_vlc->pf_memcpy( ReadStart, + p_mad_adec->p_data->p_payload_start, ReadSize ); NextDataPacket( p_mad_adec->p_fifo, &p_mad_adec->p_data ); } else { - FAST_MEMCPY( ReadStart, p_mad_adec->p_data->p_payload_start, - ReadSize ); + p_mad_adec->p_fifo->p_vlc->pf_memcpy( ReadStart, + p_mad_adec->p_data->p_payload_start, ReadSize ); p_mad_adec->p_data->p_payload_start += ReadSize; } if ( p_mad_adec->p_fifo->b_die == 1 ) { - intf_ErrMsg( "mad_adec error: libmad_input stopping libmad decoder" ); + msg_Dbg( p_mad_adec->p_fifo, "libmad_input stopping libmad decoder" ); return MAD_FLOW_STOP; } if ( p_mad_adec->p_fifo->b_error == 1 ) { - intf_ErrMsg( "mad_adec error: libmad_input ignoring current audio frame" ); + msg_Err( p_mad_adec->p_fifo, "libmad_input ignoring current audio frame" ); return MAD_FLOW_IGNORE; } @@ -153,7 +150,7 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream) *{ * mad_adec_thread_t *p_mad_adec = (mad_adec_thread_t *) data; * - * intf_ErrMsg( "mad_adec: libmad_header samplerate %d", p_libmad_header->samplerate); + * msg_Err( p_mad_adec->p_fifo, "libmad_header samplerate %d", p_libmad_header->samplerate); * * PrintFrameInfo(p_limad_mad_header) * return MAD_FLOW_CONTINUE; @@ -291,6 +288,7 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header if (p_mad_adec->p_aout_fifo==NULL) { p_mad_adec->p_aout_fifo = aout_CreateFifo( + p_mad_adec->p_fifo->p_this, AOUT_FIFO_PCM, /* fifo type */ 2, /*p_libmad_pcm->channels,*/ /* nr. of channels */ p_libmad_pcm->samplerate, /* frame rate in Hz ?*/ @@ -302,15 +300,17 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header return( -1 ); } - intf_WarnMsg( 4, "mad_adec debug: in libmad_output aout fifo created"); + msg_Dbg( p_mad_adec->p_fifo, "aout fifo created"); } if (p_mad_adec->p_aout_fifo->i_rate != p_libmad_pcm->samplerate) { - intf_ErrMsg( "mad_adec: libmad_output samplerate is changing from [%d] Hz to [%d] Hz, sample size [%d], error_code [%0x]", - p_mad_adec->p_aout_fifo->i_rate, p_libmad_pcm->samplerate, - p_libmad_pcm->length, p_mad_adec->libmad_decoder->sync->stream.error); - p_mad_adec->p_aout_fifo->i_rate = p_libmad_pcm->samplerate; + msg_Warn( p_mad_adec->p_fifo, "samplerate is changing from [%d] Hz " + "to [%d] Hz, sample size [%d], error_code [%0x]", + p_mad_adec->p_aout_fifo->i_rate, p_libmad_pcm->samplerate, + p_libmad_pcm->length, + p_mad_adec->libmad_decoder->sync->stream.error ); + p_mad_adec->p_aout_fifo->i_rate = p_libmad_pcm->samplerate; } if( p_mad_adec->i_current_pts ) @@ -375,7 +375,7 @@ enum mad_flow libmad_output(void *data, struct mad_header const *p_libmad_header /* DEBUG */ /* if (p_libmad_pcm->channels == 1) { - intf_WarnMsg( 4, "mad debug: libmad_output channels [%d]", p_libmad_pcm->channels); + msg_Dbg( p_mad_adec->p_fifo, "libmad_output channels [%d]", p_libmad_pcm->channels); } */ @@ -397,88 +397,88 @@ enum mad_flow libmad_error(void *data, struct mad_stream *p_libmad_stream, struc switch (p_libmad_stream->error) { case MAD_ERROR_BUFLEN: /* input buffer too small (or EOF) */ - intf_ErrMsg("libmad error: input buffer too small (or EOF)"); +//X intf_ErrMsg("libmad error: input buffer too small (or EOF)"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BUFPTR: /* invalid (null) buffer pointer */ - intf_ErrMsg("libmad error: invalid (null) buffer pointer"); +//X intf_ErrMsg("libmad error: invalid (null) buffer pointer"); result = MAD_FLOW_STOP; break; case MAD_ERROR_NOMEM: /* not enough memory */ - intf_ErrMsg("libmad error: invalid (null) buffer pointer"); +//X intf_ErrMsg("libmad error: invalid (null) buffer pointer"); result = MAD_FLOW_STOP; break; case MAD_ERROR_LOSTSYNC: /* lost synchronization */ - intf_ErrMsg("libmad error: lost synchronization"); +//X intf_ErrMsg("libmad error: lost synchronization"); mad_stream_sync(p_libmad_stream); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADLAYER: /* reserved header layer value */ - intf_ErrMsg("libmad error: reserved header layer value"); +//X intf_ErrMsg("libmad error: reserved header layer value"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADBITRATE: /* forbidden bitrate value */ - intf_ErrMsg("libmad error: forbidden bitrate value"); +//X intf_ErrMsg("libmad error: forbidden bitrate value"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADSAMPLERATE: /* reserved sample frequency value */ - intf_ErrMsg("libmad error: reserved sample frequency value"); +//X intf_ErrMsg("libmad error: reserved sample frequency value"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADEMPHASIS: /* reserved emphasis value */ - intf_ErrMsg("libmad error: reserverd emphasis value"); +//X intf_ErrMsg("libmad error: reserverd emphasis value"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADCRC: /* CRC check failed */ - intf_ErrMsg("libmad error: CRC check failed"); +//X intf_ErrMsg("libmad error: CRC check failed"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADBITALLOC: /* forbidden bit allocation value */ - intf_ErrMsg("libmad error: forbidden bit allocation value"); +//X intf_ErrMsg("libmad error: forbidden bit allocation value"); result = MAD_FLOW_IGNORE; break; case MAD_ERROR_BADSCALEFACTOR:/* bad scalefactor index */ - intf_ErrMsg("libmad error: bad scalefactor index"); +//X intf_ErrMsg("libmad error: bad scalefactor index"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADFRAMELEN: /* bad frame length */ - intf_ErrMsg("libmad error: bad frame length"); +//X intf_ErrMsg("libmad error: bad frame length"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADBIGVALUES: /* bad big_values count */ - intf_ErrMsg("libmad error: bad big values count"); +//X intf_ErrMsg("libmad error: bad big values count"); result = MAD_FLOW_IGNORE; break; case MAD_ERROR_BADBLOCKTYPE: /* reserved block_type */ - intf_ErrMsg("libmad error: reserverd block_type"); +//X intf_ErrMsg("libmad error: reserverd block_type"); result = MAD_FLOW_IGNORE; break; case MAD_ERROR_BADSCFSI: /* bad scalefactor selection info */ - intf_ErrMsg("libmad error: bad scalefactor selection info"); +//X intf_ErrMsg("libmad error: bad scalefactor selection info"); result = MAD_FLOW_CONTINUE; break; case MAD_ERROR_BADDATAPTR: /* bad main_data_begin pointer */ - intf_ErrMsg("libmad error: bad main_data_begin pointer"); +//X intf_ErrMsg("libmad error: bad main_data_begin pointer"); result = MAD_FLOW_STOP; break; case MAD_ERROR_BADPART3LEN: /* bad audio data length */ - intf_ErrMsg("libmad error: bad audio data length"); +//X intf_ErrMsg("libmad error: bad audio data length"); result = MAD_FLOW_IGNORE; break; case MAD_ERROR_BADHUFFTABLE: /* bad Huffman table select */ - intf_ErrMsg("libmad error: bad Huffman table select"); +//X intf_ErrMsg("libmad error: bad Huffman table select"); result = MAD_FLOW_IGNORE; break; case MAD_ERROR_BADHUFFDATA: /* Huffman data overrun */ - intf_ErrMsg("libmad error: Huffman data overrun"); +//X intf_ErrMsg("libmad error: Huffman data overrun"); result = MAD_FLOW_IGNORE; break; case MAD_ERROR_BADSTEREO: /* incompatible block_type for JS */ - intf_ErrMsg("libmad error: incompatible block_type for JS"); +//X intf_ErrMsg("libmad error: incompatible block_type for JS"); result = MAD_FLOW_IGNORE; break; default: - intf_ErrMsg("libmad error: unknown error occured stopping decoder"); +//X intf_ErrMsg("libmad error: unknown error occured stopping decoder"); result = MAD_FLOW_STOP; break; } @@ -561,9 +561,9 @@ static void PrintFrameInfo(struct mad_header *Header) break; } - intf_ErrMsg("statistics: %lu kb/s audio mpeg layer %s stream %s crc, " - "%s with %s emphasis at %d Hz sample rate\n", - Header->bitrate,Layer, - Header->flags&MAD_FLAG_PROTECTION?"with":"without", - Mode,Emphasis,Header->samplerate); +//X intf_ErrMsg("statistics: %lu kb/s audio mpeg layer %s stream %s crc, " +//X "%s with %s emphasis at %d Hz sample rate\n", +//X Header->bitrate,Layer, +//X Header->flags&MAD_FLAG_PROTECTION?"with":"without", +//X Mode,Emphasis,Header->samplerate); } diff --git a/plugins/memcpy/memcpy.c b/plugins/memcpy/memcpy.c index 17890df7da..e8c03d0738 100644 --- a/plugins/memcpy/memcpy.c +++ b/plugins/memcpy/memcpy.c @@ -2,7 +2,7 @@ * memcpy.c : classic memcpy module ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: memcpy.c,v 1.8 2002/04/19 13:56:11 sam Exp $ + * $Id: memcpy.c,v 1.9 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ #include #include -#include +#include #undef HAVE_MMX #undef HAVE_MMX2 @@ -67,7 +67,6 @@ MODULE_INIT_START ADD_CAPABILITY( MEMCPY, 50 ) ADD_SHORTCUT( "c" ) ADD_SHORTCUT( "libc" ) - ADD_SHORTCUT( "memcpy" ) #elif defined( MODULE_NAME_IS_memcpy3dn ) SET_DESCRIPTION( _("3D Now! memcpy module") ) ADD_CAPABILITY( MEMCPY, 100 ) diff --git a/plugins/memcpy/memcpyaltivec.c b/plugins/memcpy/memcpyaltivec.c index 44a389d7ff..d3d1a4ddb5 100644 --- a/plugins/memcpy/memcpyaltivec.c +++ b/plugins/memcpy/memcpyaltivec.c @@ -1,8 +1,8 @@ /***************************************************************************** - * memcpyaltivec.c : Altivec memcpy module + * memcpyaltivec.c : AltiVec memcpy module ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: memcpyaltivec.c,v 1.5 2002/04/19 13:56:11 sam Exp $ + * $Id: memcpyaltivec.c,v 1.6 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * @@ -29,7 +29,7 @@ #include #include -#include +#include /***************************************************************************** * Local and extern prototypes. @@ -48,7 +48,6 @@ MODULE_INIT_START ADD_CAPABILITY( MEMCPY, 100 ) ADD_REQUIREMENT( ALTIVEC ) ADD_SHORTCUT( "altivec" ) - ADD_SHORTCUT( "memcpyaltivec" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/mga/mga.c b/plugins/mga/mga.c index 0dbb20ccf4..f26f1df3f0 100644 --- a/plugins/mga/mga.c +++ b/plugins/mga/mga.c @@ -2,7 +2,7 @@ * mga.c : Matrox Graphic Array plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: mga.c,v 1.17 2002/04/19 13:56:11 sam Exp $ + * $Id: mga.c,v 1.18 2002/06/01 12:32:00 sam Exp $ * * Authors: Aaron Holtzman * Samuel Hocevar @@ -33,15 +33,13 @@ #include /* ioctl() */ #include /* PROT_WRITE */ -#include +#include +#include #ifdef SYS_BSD #include /* typedef ushort */ #endif -#include "video.h" -#include "video_output.h" - /***************************************************************************** * Capabilities defined in the other files. *****************************************************************************/ @@ -66,7 +64,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("Matrox Graphic Array video module") ) ADD_CAPABILITY( VOUT, 10 ) - ADD_SHORTCUT( "mga" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -123,19 +120,17 @@ typedef struct mga_vid_config_s } mga_vid_config_t; #endif -typedef struct vout_sys_s +struct vout_sys_s { mga_vid_config_t mga; int i_fd; byte_t * p_video; +}; -} vout_sys_t; - -typedef struct picture_sys_s +struct picture_sys_s { int i_frame; - -} picture_sys_t; +}; #define CEIL32(x) (((x)+31)&~31) @@ -165,14 +160,14 @@ 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("vout error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } p_vout->p_sys->i_fd = open( "/dev/mga_vid", O_RDWR ); if( p_vout->p_sys->i_fd == -1 ) { - intf_ErrMsg( "vout error: can't open MGA driver /dev/mga_vid" ); + msg_Err( p_vout, "cannot open MGA driver /dev/mga_vid" ); free( p_vout->p_sys ); return( 1 ); } @@ -217,18 +212,18 @@ static int vout_Init( vout_thread_t *p_vout ) if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, &p_vout->p_sys->mga) ) { - intf_ErrMsg( "vout error: MGA config ioctl failed" ); + msg_Err( p_vout, "MGA config ioctl failed" ); return -1; } if( p_vout->p_sys->mga.card_type == MGA_G200 ) { - intf_WarnMsg( 3, "vout info: detected MGA G200 (%d MB Ram)", + msg_Dbg( p_vout, "detected MGA G200 (%d MB Ram)", p_vout->p_sys->mga.ram_size ); } else { - intf_WarnMsg( 3, "vout info: detected MGA G400/G450 (%d MB Ram)", + msg_Dbg( p_vout, "detected MGA G400/G450 (%d MB Ram)", p_vout->p_sys->mga.ram_size ); } diff --git a/plugins/mga/xmga.c b/plugins/mga/xmga.c index 83f07a11e9..db0bfb231e 100644 --- a/plugins/mga/xmga.c +++ b/plugins/mga/xmga.c @@ -2,7 +2,7 @@ * xmga.c : X11 MGA plugin for vlc ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: xmga.c,v 1.15 2002/05/30 08:17:04 gbazin Exp $ + * $Id: xmga.c,v 1.16 2002/06/01 12:32:00 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -30,7 +30,9 @@ #include /* free() */ #include /* strerror() */ -#include +#include +#include +#include #ifdef HAVE_MACHINE_PARAM_H /* BSD */ @@ -50,15 +52,8 @@ #include #include -#include "video.h" -#include "video_output.h" - -#include "interface.h" #include "netutils.h" /* network_ChannelJoin */ -#include "stream_control.h" /* needed by input_ext-intf.h... */ -#include "input_ext-intf.h" - //#include "mga.h" /***************************************************************************** @@ -104,19 +99,18 @@ static void ToggleCursor ( vout_thread_t * ); #define DISPLAY_TEXT N_("X11 display name") #define DISPLAY_LONGTEXT N_( \ - "Specify the X11 hardware display you want to use.\nBy default vlc will " \ + "Specify the X11 hardware display you want to use. By default vlc will " \ "use the value of the DISPLAY environment variable.") MODULE_CONFIG_START ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) -ADD_STRING ( "xmga_display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT ) -ADD_BOOL ( "xmga_altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT ) +ADD_STRING ( "xmga-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT ) +ADD_BOOL ( "xmga-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT ) MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("X11 MGA module") ) ADD_CAPABILITY( VOUT, 60 ) - ADD_SHORTCUT( "xmga" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -132,7 +126,7 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the X11 and XVideo specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { /* Internal settings and properties */ Display * p_display; /* display pointer */ @@ -142,7 +136,7 @@ typedef struct vout_sys_s Window window; /* root window */ GC gc; /* graphic context instance handler */ - boolean_t b_shm; /* shared memory extension flag */ + vlc_bool_t b_shm; /* shared memory extension flag */ #ifdef MODULE_NAME_IS_xvideo Window yuv_window; /* sub-window for displaying yuv video @@ -165,7 +159,7 @@ typedef struct vout_sys_s int i_width; /* width of main window */ int i_height; /* height of main window */ - boolean_t b_altfullscreen; /* which fullscreen method */ + vlc_bool_t b_altfullscreen; /* which fullscreen method */ /* Backup of window position and size before fullscreen switch */ int i_width_backup; @@ -185,23 +179,12 @@ typedef struct vout_sys_s BOOL b_ss_dpms; /* DPMS mode */ /* Mouse pointer properties */ - boolean_t b_mouse_pointer_visible; + vlc_bool_t b_mouse_pointer_visible; mtime_t i_time_mouse_last_moved; /* used to auto-hide pointer*/ Cursor blank_cursor; /* the hidden cursor */ mtime_t i_time_button_last_pressed; /* to track dbl-clicks */ Pixmap cursor_pixmap; - -} vout_sys_t; - -/***************************************************************************** - * picture_sys_t: direct buffer method descriptor - ***************************************************************************** - * This structure is part of the picture descriptor, it describes the - * XVideo specific properties of a direct buffer. - *****************************************************************************/ -typedef struct picture_sys_s -{ -} picture_sys_t; +}; /***************************************************************************** * mwmhints_t: window manager hints @@ -229,31 +212,6 @@ typedef struct mwmhints_s # define MAX_DIRECTBUFFERS 2 #endif -/***************************************************************************** - * Seeking function TODO: put this in a generic location ! - *****************************************************************************/ -static inline void vout_Seek( off_t i_seek ) -{ - off_t i_tell; - - vlc_mutex_lock( &p_input_bank->lock ); - if( p_input_bank->pp_input[0] != NULL ) - { -#define S p_input_bank->pp_input[0]->stream - i_tell = S.p_selected_area->i_tell + i_seek * (off_t)50 * S.i_mux_rate; - - i_tell = ( i_tell <= 0 /*S.p_selected_area->i_start*/ ) - ? 0 /*S.p_selected_area->i_start*/ - : ( i_tell >= S.p_selected_area->i_size ) - ? S.p_selected_area->i_size - : i_tell; - - input_Seek( p_input_bank->pp_input[0], i_tell ); -#undef S - } - vlc_mutex_unlock( &p_input_bank->lock ); -} - /***************************************************************************** * Functions exported as capabilities. They are declared as static so that * we don't pollute the namespace too much. @@ -284,19 +242,19 @@ 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( "vout error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Open display, unsing the "display" config variable or the DISPLAY * environment variable */ - psz_display = config_GetPszVariable( "xmga_display" ); + psz_display = config_GetPsz( p_vout, "xmga-display" ); p_vout->p_sys->p_display = XOpenDisplay( psz_display ); if( p_vout->p_sys->p_display == NULL ) /* error */ { - intf_ErrMsg( "vout error: cannot open display %s", - XDisplayName( psz_display ) ); + msg_Err( p_vout, "cannot open display %s", + XDisplayName( psz_display ) ); free( p_vout->p_sys ); if( psz_display ) free( psz_display ); return( 1 ); @@ -313,7 +271,7 @@ static int vout_Create( vout_thread_t *p_vout ) * but also command buttons, subtitles and other indicators */ if( CreateWindow( p_vout ) ) { - intf_ErrMsg( "vout error: cannot create X11 window" ); + msg_Err( p_vout, "cannot create X11 window" ); DestroyCursor( p_vout ); XCloseDisplay( p_vout->p_sys->p_display ); free( p_vout->p_sys ); @@ -389,7 +347,8 @@ static int vout_Init( vout_thread_t *p_vout ) case 32: p_vout->output.i_chroma = FOURCC_RV32; break; default: - intf_ErrMsg( "vout error: unknown screen depth" ); + msg_Err( p_vout, "unknown screen depth %i", + p_vout->p_sys->i_screen_depth ); return( 0 ); } @@ -465,7 +424,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) static int vout_Manage( vout_thread_t *p_vout ) { XEvent xevent; /* X11 event */ - boolean_t b_resized; /* window has been resized */ + vlc_bool_t b_resized; /* window has been resized */ char i_key; /* ISO Latin-1 key */ KeySym x_key_symbol; @@ -492,24 +451,6 @@ static int vout_Manage( vout_thread_t *p_vout ) p_vout->p_sys->i_width = xevent.xconfigure.width; p_vout->p_sys->i_height = xevent.xconfigure.height; } - /* MapNotify event: change window status and disable screen saver */ - else if( xevent.type == MapNotify) - { - if( (p_vout != NULL) && !p_vout->b_active ) - { - DisableXScreenSaver( p_vout ); - p_vout->b_active = 1; - } - } - /* UnmapNotify event: change window status and enable screen saver */ - else if( xevent.type == UnmapNotify ) - { - if( (p_vout != NULL) && p_vout->b_active ) - { - EnableXScreenSaver( p_vout ); - p_vout->b_active = 0; - } - } /* Keyboard event */ else if( xevent.type == KeyPress ) { @@ -518,78 +459,76 @@ static int vout_Manage( vout_thread_t *p_vout ) xevent.xkey.keycode, 0 ); switch( x_key_symbol ) { - case XK_Escape: - p_main->p_intf->b_die = 1; - break; - case XK_Menu: - p_main->p_intf->b_menu_change = 1; - break; - case XK_Left: - vout_Seek( -5 ); - break; - case XK_Right: - vout_Seek( 5 ); - break; - case XK_Up: - vout_Seek( 60 ); - break; - case XK_Down: - vout_Seek( -60 ); - break; - case XK_Home: - input_Seek( p_input_bank->pp_input[0], - p_input_bank->pp_input[0]->stream.p_selected_area->i_start ); - break; - case XK_End: - input_Seek( p_input_bank->pp_input[0], - p_input_bank->pp_input[0]->stream.p_selected_area->i_size ); - break; - case XK_Page_Up: - vout_Seek( 900 ); - break; - case XK_Page_Down: - vout_Seek( -900 ); - break; - case XK_space: - input_SetStatus( p_input_bank->pp_input[0], - INPUT_STATUS_PAUSE ); - break; - - default: - /* "Normal Keys" - * The reason why I use this instead of XK_0 is that - * with XLookupString, we don't have to care about - * keymaps. */ - - if( XLookupString( &xevent.xkey, &i_key, 1, NULL, NULL ) ) + case XK_Escape: + p_vout->p_vlc->b_die = 1; + break; + case XK_Menu: + p_vout->p_vlc->p_intf->b_menu_change = 1; + break; + case XK_Left: + input_Seek( p_vout, -5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Right: + input_Seek( p_vout, 5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Up: + input_Seek( p_vout, 60, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Down: + input_Seek( p_vout, -60, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Home: + input_Seek( p_vout, 0, INPUT_SEEK_BYTES | INPUT_SEEK_SET ); + break; + case XK_End: + input_Seek( p_vout, 0, INPUT_SEEK_BYTES | INPUT_SEEK_END ); + break; + case XK_Page_Up: + input_Seek( p_vout, 900, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Page_Down: + input_Seek( p_vout, -900, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_space: + input_SetStatus( p_input_bank->pp_input[0], + INPUT_STATUS_PAUSE ); + break; + + default: + /* "Normal Keys" + * The reason why I use this instead of XK_0 is that + * with XLookupString, we don't have to care about + * keymaps. */ + + if( XLookupString( &xevent.xkey, &i_key, 1, NULL, NULL ) ) + { + /* FIXME: handle stuff here */ + switch( i_key ) { - /* FIXME: handle stuff here */ - switch( i_key ) - { - case 'q': - case 'Q': - p_main->p_intf->b_die = 1; - break; - case 'f': - case 'F': - p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; - break; - - case '0': network_ChannelJoin( 0 ); break; - case '1': network_ChannelJoin( 1 ); break; - case '2': network_ChannelJoin( 2 ); break; - case '3': network_ChannelJoin( 3 ); break; - case '4': network_ChannelJoin( 4 ); break; - case '5': network_ChannelJoin( 5 ); break; - case '6': network_ChannelJoin( 6 ); break; - case '7': network_ChannelJoin( 7 ); break; - case '8': network_ChannelJoin( 8 ); break; - case '9': network_ChannelJoin( 9 ); break; - - default: - break; - } + case 'q': + case 'Q': + p_vout->p_vlc->b_die = 1; + break; + case 'f': + case 'F': + p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + break; + + case '0': network_ChannelJoin( 0 ); break; + case '1': network_ChannelJoin( 1 ); break; + case '2': network_ChannelJoin( 2 ); break; + case '3': network_ChannelJoin( 3 ); break; + case '4': network_ChannelJoin( 4 ); break; + case '5': network_ChannelJoin( 5 ); break; + case '6': network_ChannelJoin( 6 ); break; + case '7': network_ChannelJoin( 7 ); break; + case '8': network_ChannelJoin( 8 ); break; + case '9': network_ChannelJoin( 9 ); break; + + default: + break; } + } break; } } @@ -614,11 +553,11 @@ static int vout_Manage( vout_thread_t *p_vout ) break; case Button4: - vout_Seek( 15 ); + input_Seek( p_vout, 15, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; case Button5: - vout_Seek( -15 ); + input_Seek( p_vout, -15, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; } } @@ -629,7 +568,7 @@ static int vout_Manage( vout_thread_t *p_vout ) { case Button3: /* FIXME: need locking ! */ - p_main->p_intf->b_menu_change = 1; + p_vout->p_vlc->p_intf->b_menu_change = 1; break; } } @@ -645,7 +584,7 @@ static int vout_Manage( vout_thread_t *p_vout ) /* Other event */ else { - intf_WarnMsg( 3, "vout: unhandled event %d received", xevent.type ); + msg_Warn( p_vout, "unhandled event %d received", xevent.type ); } } @@ -658,7 +597,7 @@ static int vout_Manage( vout_thread_t *p_vout ) if( (xevent.xclient.message_type == p_vout->p_sys->wm_protocols) && (xevent.xclient.data.l[0] == p_vout->p_sys->wm_delete_window ) ) { - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; } } @@ -681,9 +620,8 @@ static int vout_Manage( vout_thread_t *p_vout ) p_vout->i_changes &= ~VOUT_SIZE_CHANGE; - intf_WarnMsg( 3, "vout: video display resized (%dx%d)", - p_vout->p_sys->i_width, - p_vout->p_sys->i_height ); + msg_Dbg( p_vout, "video display resized (%dx%d)", + p_vout->p_sys->i_width, p_vout->p_sys->i_height ); vout_PlacePicture( p_vout, p_vout->p_sys->i_width, p_vout->p_sys->i_height, @@ -733,9 +671,9 @@ static int CreateWindow( vout_thread_t *p_vout ) XGCValues xgcvalues; XEvent xevent; - boolean_t b_expose; - boolean_t b_configure_notify; - boolean_t b_map_notify; + vlc_bool_t b_expose; + vlc_bool_t b_configure_notify; + vlc_bool_t b_map_notify; /* Set main window's size */ p_vout->p_sys->i_width = p_vout->i_window_width; @@ -777,7 +715,7 @@ static int CreateWindow( vout_thread_t *p_vout ) XSetWMNormalHints( p_vout->p_sys->p_display, p_vout->p_sys->window, &xsize_hints ); XSetCommand( p_vout->p_sys->p_display, p_vout->p_sys->window, - p_main->ppsz_argv, p_main->i_argc ); + p_vout->p_vlc->ppsz_argv, p_vout->p_vlc->i_argc ); XStoreName( p_vout->p_sys->p_display, p_vout->p_sys->window, VOUT_TITLE " (XMGA output)" ); @@ -788,7 +726,7 @@ static int CreateWindow( vout_thread_t *p_vout ) &p_vout->p_sys->wm_delete_window, 1 ) ) { /* WM_DELETE_WINDOW is not supported by window manager */ - intf_Msg( "vout error: missing or bad window manager" ); + msg_Err( p_vout, "missing or bad window manager" ); } /* Creation of a graphic context that doesn't generate a GraphicsExpose @@ -872,25 +810,14 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) { /* We know the chroma, allocate a buffer which will be used * directly by the decoder */ - p_pic->p_sys = malloc( sizeof( picture_sys_t ) ); - - if( p_pic->p_sys == NULL ) - { - return -1; - } - - /* XXX */ - switch( p_vout->output.i_chroma ) { /* XXX ?? */ default: /* Unknown chroma, tell the guy to get lost */ - free( p_pic->p_sys ); - intf_ErrMsg( "vout error: never heard of chroma 0x%.8x (%4.4s)", - p_vout->output.i_chroma, - (char*)&p_vout->output.i_chroma ); + msg_Err( p_vout, "never heard of chroma 0x%.8x (%4.4s)", + p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma ); p_pic->i_planes = 0; return -1; } @@ -908,10 +835,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) *****************************************************************************/ static void FreePicture( vout_thread_t *p_vout, picture_t *p_pic ) { - XSync( p_vout->p_sys->p_display, False ); - - free( p_pic->p_sys ); } /***************************************************************************** @@ -935,13 +859,13 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) Window next_parent, parent, *p_dummy, dummy1; unsigned int dummy2, dummy3; - intf_WarnMsg( 3, "vout: entering fullscreen mode" ); + msg_Dbg( p_vout, "entering fullscreen mode" ); /* Only check the fullscreen method when we actually go fullscreen, * because to go back to window mode we need to know in which * fullscreen mode we where */ - p_vout->p_sys->b_altfullscreen = - config_GetIntVariable( "xmga_altfullscreen" ); + p_vout->p_sys->b_altfullscreen = config_GetInt( p_vout, + "xmga-altfullscreen" ); /* Save current window coordinates so they can be restored when * we exit from fullscreen mode. This is the tricky part because @@ -1015,7 +939,7 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) } else { - intf_WarnMsg( 3, "vout: leaving fullscreen mode" ); + msg_Dbg( p_vout, "leaving fullscreen mode" ); i_xpos = p_vout->p_sys->i_xpos_backup; i_ypos = p_vout->p_sys->i_ypos_backup; diff --git a/plugins/motion/motion.c b/plugins/motion/motion.c index 0f80322492..fcaf16b489 100644 --- a/plugins/motion/motion.c +++ b/plugins/motion/motion.c @@ -2,7 +2,7 @@ * motion.c : C motion compensation module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: motion.c,v 1.16 2002/04/19 13:56:11 sam Exp $ + * $Id: motion.c,v 1.17 2002/06/01 12:32:00 sam Exp $ * * Authors: Aaron Holtzman * Michel Lespinasse @@ -28,7 +28,7 @@ #include /* malloc(), free() */ #include -#include +#include /***************************************************************************** * Local and extern prototypes. @@ -45,7 +45,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("motion compensation module") ) ADD_CAPABILITY( MOTION, 50 ) ADD_SHORTCUT( "c" ) - ADD_SHORTCUT( "motion" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/motion/motion3dnow.c b/plugins/motion/motion3dnow.c index 58157aa3ed..fed3ca628e 100644 --- a/plugins/motion/motion3dnow.c +++ b/plugins/motion/motion3dnow.c @@ -2,7 +2,7 @@ * motion3dnow.c : 3D Now! motion compensation module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: motion3dnow.c,v 1.10 2002/05/18 17:47:47 sam Exp $ + * $Id: motion3dnow.c,v 1.11 2002/06/01 12:32:00 sam Exp $ * * Authors: Aaron Holtzman * Michel Lespinasse @@ -28,7 +28,7 @@ #include /* malloc(), free() */ #include -#include +#include #include "mmx.h" @@ -49,7 +49,6 @@ MODULE_INIT_START ADD_REQUIREMENT( 3DNOW ) ADD_SHORTCUT( "3dn" ) ADD_SHORTCUT( "3dnow" ) - ADD_SHORTCUT( "motion3dn" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/motion/motionaltivec.c b/plugins/motion/motionaltivec.c index bd00b57c6a..7fc281decd 100644 --- a/plugins/motion/motionaltivec.c +++ b/plugins/motion/motionaltivec.c @@ -1,8 +1,8 @@ /***************************************************************************** - * motionaltivec.c : Altivec motion compensation module for vlc + * motionaltivec.c : AltiVec motion compensation module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: motionaltivec.c,v 1.12 2002/04/19 13:56:11 sam Exp $ + * $Id: motionaltivec.c,v 1.13 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Lespinasse * Paul Mackerras @@ -31,7 +31,7 @@ #include #include -#include +#include /***************************************************************************** * Local and extern prototypes. @@ -49,7 +49,6 @@ MODULE_INIT_START ADD_CAPABILITY( MOTION, 150 ) ADD_REQUIREMENT( ALTIVEC ) ADD_SHORTCUT( "altivec" ) - ADD_SHORTCUT( "motionaltivec" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -60,7 +59,7 @@ MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP /***************************************************************************** - * Motion compensation in Altivec + * Motion compensation in AltiVec *****************************************************************************/ #ifndef CAN_COMPILE_C_ALTIVEC diff --git a/plugins/motion/motionmmx.c b/plugins/motion/motionmmx.c index b26be1e9bf..490c3a08a4 100644 --- a/plugins/motion/motionmmx.c +++ b/plugins/motion/motionmmx.c @@ -2,7 +2,7 @@ * motionmmx.c : MMX motion compensation module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: motionmmx.c,v 1.17 2002/05/18 17:47:47 sam Exp $ + * $Id: motionmmx.c,v 1.18 2002/06/01 12:32:00 sam Exp $ * * Authors: Aaron Holtzman * Michel Lespinasse @@ -28,7 +28,7 @@ #include /* malloc(), free() */ #include -#include +#include #include "mmx.h" @@ -48,7 +48,6 @@ MODULE_INIT_START ADD_CAPABILITY( MOTION, 150 ) ADD_REQUIREMENT( MMX ) ADD_SHORTCUT( "mmx" ) - ADD_SHORTCUT( "motionmmx" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/motion/motionmmxext.c b/plugins/motion/motionmmxext.c index d87ac1d399..3a2ba36a9c 100644 --- a/plugins/motion/motionmmxext.c +++ b/plugins/motion/motionmmxext.c @@ -2,7 +2,7 @@ * motionmmxext.c : MMX EXT motion compensation module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: motionmmxext.c,v 1.18 2002/05/18 17:47:47 sam Exp $ + * $Id: motionmmxext.c,v 1.19 2002/06/01 12:32:00 sam Exp $ * * Authors: Aaron Holtzman * Michel Lespinasse @@ -28,7 +28,7 @@ #include /* malloc(), free() */ #include -#include +#include #include "mmx.h" @@ -48,7 +48,6 @@ MODULE_INIT_START ADD_CAPABILITY( MOTION, 200 ) ADD_REQUIREMENT( MMXEXT ) ADD_SHORTCUT( "mmxext" ) - ADD_SHORTCUT( "motionmmxext" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/mpeg_adec/adec_layer1.c b/plugins/mpeg_adec/adec_layer1.c index 55e7fe4e84..f279edf4ba 100644 --- a/plugins/mpeg_adec/adec_layer1.c +++ b/plugins/mpeg_adec/adec_layer1.c @@ -2,7 +2,7 @@ * adec_layer1.c: MPEG Layer I audio decoder ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: adec_layer1.c,v 1.6 2002/02/24 22:06:50 sam Exp $ + * $Id: adec_layer1.c,v 1.7 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -25,10 +25,8 @@ #include /* NULL */ #include /* memcpy(), memset() */ -#include - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "mpeg_adec_generic.h" #include "mpeg_adec.h" diff --git a/plugins/mpeg_adec/adec_layer2.c b/plugins/mpeg_adec/adec_layer2.c index b4d9a7c20c..8679b11448 100644 --- a/plugins/mpeg_adec/adec_layer2.c +++ b/plugins/mpeg_adec/adec_layer2.c @@ -2,7 +2,7 @@ * adec_layer2.c: MPEG Layer II audio decoder ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: adec_layer2.c,v 1.6 2002/02/24 22:06:50 sam Exp $ + * $Id: adec_layer2.c,v 1.7 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -25,10 +25,8 @@ #include /* NULL */ #include /* memcpy(), memset() */ -#include - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include #include "mpeg_adec_generic.h" #include "mpeg_adec.h" diff --git a/plugins/mpeg_adec/adec_math.c b/plugins/mpeg_adec/adec_math.c index 75bd38304e..313bd20ae6 100644 --- a/plugins/mpeg_adec/adec_math.c +++ b/plugins/mpeg_adec/adec_math.c @@ -2,7 +2,7 @@ * adec_math.c: Inverse Discrete Cosine Transform and Pulse Code Modulation ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: adec_math.c,v 1.3 2002/03/03 04:37:29 sam Exp $ + * $Id: adec_math.c,v 1.4 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -22,7 +22,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -#include +#include #include "mpeg_adec_generic.h" diff --git a/plugins/mpeg_adec/adec_test.c b/plugins/mpeg_adec/adec_test.c index 6b729ef95b..a9a625636b 100644 --- a/plugins/mpeg_adec/adec_test.c +++ b/plugins/mpeg_adec/adec_test.c @@ -2,7 +2,7 @@ * adec_test.c: MPEG Layer I-II audio decoder test program ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: adec_test.c,v 1.1 2001/11/13 12:09:18 henri Exp $ + * $Id: adec_test.c,v 1.2 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -22,14 +22,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -/* - * TODO : - * - * - optimiser les NeedBits() et les GetBits() du code là où c'est possible ; - * - vlc_cond_signal() / vlc_cond_wait() ; - * - */ - /***************************************************************************** * Preamble *****************************************************************************/ diff --git a/plugins/mpeg_adec/mpeg_adec.c b/plugins/mpeg_adec/mpeg_adec.c index 2d45d2192c..31057f0bce 100644 --- a/plugins/mpeg_adec/mpeg_adec.c +++ b/plugins/mpeg_adec/mpeg_adec.c @@ -2,7 +2,7 @@ * mpeg_adec.c: MPEG audio decoder thread ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: mpeg_adec.c,v 1.23 2002/04/23 23:44:36 fenrir Exp $ + * $Id: mpeg_adec.c,v 1.24 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -30,12 +30,9 @@ #include /* malloc(), free() */ #include -#include - -#include "audio_output.h" /* aout_fifo_t (for audio_decoder.h) */ - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include #include "mpeg_adec_generic.h" #include "mpeg_adec.h" @@ -46,7 +43,7 @@ * Local Prototypes *****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static void EndThread ( adec_thread_t * ); static void DecodeThread ( adec_thread_t * ); @@ -91,24 +88,22 @@ static int decoder_Probe( u8 *pi_type ) /***************************************************************************** * decoder_Run: initialize, go inside main loop, detroy *****************************************************************************/ -static int decoder_Run ( decoder_config_t * p_config ) +static int decoder_Run ( decoder_fifo_t * p_fifo ) { adec_thread_t * p_adec; /* Allocate the memory needed to store the thread's structure */ if ( (p_adec = (adec_thread_t *)malloc (sizeof(adec_thread_t))) == NULL ) { - intf_ErrMsg ( "adec error: not enough memory for" - " adec_CreateThread() to create the new thread" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return 0; } /* * Initialize the thread properties */ - p_adec->p_config = p_config; - p_adec->p_fifo = p_config->p_decoder_fifo; + p_adec->p_fifo = p_fifo; /* * Initilize the banks @@ -121,8 +116,7 @@ static int decoder_Run ( decoder_config_t * p_config ) /* * Initialize bit stream */ - InitBitstream( &p_adec->bit_stream, p_adec->p_config->p_decoder_fifo, - NULL, NULL ); + InitBitstream( &p_adec->bit_stream, p_adec->p_fifo, NULL, NULL ); /* We do not create the audio output fifo now, but it will be created when the first frame is received */ @@ -170,9 +164,9 @@ static void DecodeThread( adec_thread_t * p_adec ) { int i_channels; - if( p_main->b_stereo ) + if( !config_GetInt( p_adec->p_fifo, "mono" ) ) { - intf_WarnMsg( 4, "adec info: setting stereo output" ); + msg_Dbg( p_adec->p_fifo, "setting stereo output" ); i_channels = 2; } else if( sync_info.b_stereo ) @@ -183,11 +177,13 @@ static void DecodeThread( adec_thread_t * p_adec ) { i_channels = 1; } - p_adec->p_aout_fifo = aout_CreateFifo( AOUT_FIFO_PCM, i_channels, - sync_info.sample_rate, ADEC_FRAME_SIZE, NULL ); + p_adec->p_aout_fifo = + aout_CreateFifo( p_adec->p_fifo->p_this, + AOUT_FIFO_PCM, i_channels, + sync_info.sample_rate, ADEC_FRAME_SIZE, NULL ); if( p_adec->p_aout_fifo == NULL) { - intf_ErrMsg( "adec error: failed to create aout fifo" ); + msg_Err( p_adec->p_fifo, "failed to create aout fifo" ); p_adec->p_fifo->b_error = 1; return; } diff --git a/plugins/mpeg_adec/mpeg_adec.h b/plugins/mpeg_adec/mpeg_adec.h index 3034950989..dda5ef9f74 100644 --- a/plugins/mpeg_adec/mpeg_adec.h +++ b/plugins/mpeg_adec/mpeg_adec.h @@ -2,7 +2,7 @@ * mpeg_adec.h : audio decoder thread interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: mpeg_adec.h,v 1.2 2001/12/30 05:38:44 sam Exp $ + * $Id: mpeg_adec.h,v 1.3 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * @@ -37,7 +37,6 @@ typedef struct adec_thread_s /* The bit stream structure handles the PES stream at the bit level */ bit_stream_t bit_stream; int i_read_bits; - decoder_config_t * p_config; /* * Decoder properties @@ -50,7 +49,7 @@ typedef struct adec_thread_s /* * Output properties */ - struct aout_fifo_s * p_aout_fifo; /* stores the decompressed frames */ + aout_fifo_t * p_aout_fifo; /* stores the decompressed frames */ } adec_thread_t; diff --git a/plugins/mpeg_adec/mpeg_adec_generic.c b/plugins/mpeg_adec/mpeg_adec_generic.c index dd666020ff..c0c4a8aa5d 100644 --- a/plugins/mpeg_adec/mpeg_adec_generic.c +++ b/plugins/mpeg_adec/mpeg_adec_generic.c @@ -2,7 +2,7 @@ * adec_generic.c: MPEG audio decoder ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: mpeg_adec_generic.c,v 1.6 2002/01/09 00:33:37 asmax Exp $ + * $Id: mpeg_adec_generic.c,v 1.7 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Michel Lespinasse @@ -25,10 +25,8 @@ #include /* memcpy(), memset() */ -#include - -#include "input_ext-dec.h" -#include "stream_control.h" +#include +#include #include "mpeg_adec_generic.h" #include "mpeg_adec.h" diff --git a/plugins/mpeg_system/mpeg_audio.c b/plugins/mpeg_system/mpeg_audio.c index 2961fd83ed..b7e243bcc0 100644 --- a/plugins/mpeg_system/mpeg_audio.c +++ b/plugins/mpeg_system/mpeg_audio.c @@ -2,7 +2,8 @@ * mpeg_audio.c : mpeg_audio Stream input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: mpeg_audio.c,v 1.8 2002/05/18 17:47:47 sam Exp $ + * $Id: mpeg_audio.c,v 1.9 2002/06/01 12:32:00 sam Exp $ + * * Authors: Laurent Aimar * * This program is free software; you can redistribute it and/or modify @@ -26,21 +27,18 @@ #include /* malloc(), free() */ #include -#include +#include +#include #include -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" /***************************************************************************** * Local prototypes *****************************************************************************/ -static void input_getfunctions( function_list_t * p_function_list ); -static int MPEGAudioDemux ( struct input_thread_s * ); -static int MPEGAudioInit ( struct input_thread_s * ); -static void MPEGAudioEnd ( struct input_thread_s * ); +static void input_getfunctions ( function_list_t * p_function_list ); +static int MPEGAudioDemux ( input_thread_t * ); +static int MPEGAudioInit ( input_thread_t * ); +static void MPEGAudioEnd ( input_thread_t * ); /* TODO: support MPEG-2.5, not difficult */ @@ -374,7 +372,7 @@ static void MPEGAudio_ExtractXingHeader( input_thread_t *p_input, } if( p_xh->i_flags&TOC_FLAG ) { - FAST_MEMCPY( p_xh->i_toc, p_buff, 100 ); + p_input->p_vlc->pf_memcpy( p_xh->i_toc, p_buff, 100 ); p_buff += 100; } if( p_xh->i_flags&VBR_SCALE_FLAG ) @@ -432,19 +430,19 @@ static int MPEGAudioInit( input_thread_t * p_input ) MPEGAUDIO_MAXTESTPOS) ) < (b_forced ? 1 : 2) ) { - intf_WarnMsg( 2,"input: MPEGAudio plug-in discarded" ); + msg_Warn( p_input, "MPEGAudio module discarded" ); return( -1 ); } vlc_mutex_lock( &p_input->stream.stream_lock ); if( input_InitStream( p_input, 0 ) == -1) { - intf_ErrMsg( "input error: cannot init stream" ); + msg_Err( p_input, "cannot init stream" ); return( -1 ); } if( input_AddProgram( p_input, 0, 0) == NULL ) { - intf_ErrMsg( "input error: cannot add program" ); + msg_Err( p_input, "cannot add program" ); return( -1 ); } p_input->stream.pp_programs[0]->b_is_ok = 0; @@ -459,7 +457,7 @@ static int MPEGAudioInit( input_thread_t * p_input ) if( !p_es ) { vlc_mutex_unlock( &p_input->stream.stream_lock ); - intf_ErrMsg( "input error: not enough memory." ); + msg_Err( p_input, "out of memory" ); return( -1 ); } p_es->i_stream_id = 1; @@ -477,7 +475,7 @@ static int MPEGAudioInit( input_thread_t * p_input ) if( !p_mpegaudio ) { - intf_ErrMsg( "input error: not enough memory." ); + msg_Err( p_input, "out of memory" ); return( -1 ); } @@ -505,7 +503,7 @@ static int MPEGAudioInit( input_thread_t * p_input ) /* FIXME FIXME FIXME FIXME FIXME FIXME FIXME */ /* all is ok :)) */ - intf_Msg( "input init: Audio MPEG-%d layer %d %s %dHz %dKb/s %s", + msg_Dbg( p_input, "audio MPEG-%d layer %d %s %dHz %dKb/s %s", mpeg.i_version + 1, mpeg.i_layer +1 , mpegaudio_mode[mpeg.i_mode], @@ -544,7 +542,7 @@ static int MPEGAudioDemux( input_thread_t * p_input ) /* look for a frame */ if( !MPEGAudio_FindFrame( p_input, &i_pos, &mpeg, 4096 ) ) { - intf_WarnMsg( 1, "input error: cannot find next frame"); + msg_Warn( p_input, "cannot find next frame" ); return( 0 ); } @@ -553,7 +551,7 @@ static int MPEGAudioDemux( input_thread_t * p_input ) ||( mpeg.i_layer != p_mpegaudio->mpeg.i_layer ) ||( mpeg.i_samplingfreq != p_mpegaudio->mpeg.i_samplingfreq ) ) { - intf_WarnMsg( 1, "input demux: stream has changed" ); + msg_Dbg( p_input, "stream has changed" ); p_mpegaudio->i_framecount = 0; p_mpegaudio->i_pts = 0; } @@ -569,7 +567,7 @@ static int MPEGAudioDemux( input_thread_t * p_input ) /* create one pes */ if( !(p_pes = input_NewPES( p_input->p_method_data )) ) { - intf_ErrMsg( "input demux: out of memory" ); + msg_Err( p_input, "cannot allocate new PES" ); return( -1 ); } @@ -608,7 +606,7 @@ static int MPEGAudioDemux( input_thread_t * p_input ) if( !p_mpegaudio->p_es->p_decoder_fifo ) { - intf_ErrMsg( "input demux: no audio decoder" ); + msg_Err( p_input, "no audio decoder" ); input_DeletePES( p_input->p_method_data, p_pes ); return( -1 ); /* perhaps not, it's my choice */ } diff --git a/plugins/mpeg_system/mpeg_es.c b/plugins/mpeg_system/mpeg_es.c index 260176f868..565ed291fd 100644 --- a/plugins/mpeg_system/mpeg_es.c +++ b/plugins/mpeg_system/mpeg_es.c @@ -2,7 +2,7 @@ * mpeg_es.c : Elementary Stream input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: mpeg_es.c,v 1.8 2002/04/19 13:56:11 sam Exp $ + * $Id: mpeg_es.c,v 1.9 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * @@ -28,15 +28,11 @@ #include /* strdup() */ #include -#include +#include +#include #include -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - /***************************************************************************** * Constants *****************************************************************************/ @@ -47,9 +43,9 @@ * Local prototypes *****************************************************************************/ static void input_getfunctions( function_list_t * p_function_list ); -static int ESDemux ( struct input_thread_s * ); -static int ESInit ( struct input_thread_s * ); -static void ESEnd ( struct input_thread_s * ); +static int ESDemux ( input_thread_t * ); +static int ESInit ( input_thread_t * ); +static void ESEnd ( input_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -107,7 +103,7 @@ static int ESInit( input_thread_t * p_input ) if( input_Peek( p_input, &p_peek, 4 ) < 4 ) { /* Stream shorter than 4 bytes... */ - intf_ErrMsg( "input error: cannot peek() (mpeg_es)" ); + msg_Err( p_input, "cannot peek()" ); return( -1 ); } @@ -116,11 +112,11 @@ static int ESInit( input_thread_t * p_input ) if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "es", 3 ) ) { /* User forced */ - intf_ErrMsg( "input error: this doesn't look like an MPEG ES stream, continuing" ); + msg_Err( p_input, "this doesn't look like an MPEG ES stream, continuing" ); } else { - intf_WarnMsg( 2, "input: ES plug-in discarded (no startcode)" ); + msg_Warn( p_input, "ES module discarded (no startcode)" ); return( -1 ); } } @@ -129,11 +125,11 @@ static int ESInit( input_thread_t * p_input ) if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "es", 3 ) ) { /* User forced */ - intf_ErrMsg( "input error: this seems to be a system stream (PS plug-in ?), but continuing" ); + msg_Err( p_input, "this seems to be a system stream (PS plug-in ?), but continuing" ); } else { - intf_WarnMsg( 2, "input: ES plug-in discarded (system startcode)" ); + msg_Warn( p_input, "ES module discarded (system startcode)" ); return( -1 ); } } @@ -188,7 +184,7 @@ static int ESDemux( input_thread_t * p_input ) if( p_pes == NULL ) { - intf_ErrMsg("Out of memory"); + msg_Err( p_input, "out of memory" ); input_DeletePacket( p_input->p_method_data, p_data ); return( -1 ); } @@ -210,7 +206,7 @@ static int ESDemux( input_thread_t * p_input ) p_input->stream.p_selected_program, (mtime_t)0 ) == PAUSE_S) ) { - intf_WarnMsg( 2, "synchro reinit" ); + msg_Warn( p_input, "synchro reinit" ); p_pes->i_pts = mdate() + DEFAULT_PTS_DELAY; p_input->stream.p_selected_program->i_synchro_state = SYNCHRO_OK; } diff --git a/plugins/mpeg_system/mpeg_ps.c b/plugins/mpeg_system/mpeg_ps.c index e4dec70d5d..85e43ec325 100644 --- a/plugins/mpeg_system/mpeg_ps.c +++ b/plugins/mpeg_system/mpeg_ps.c @@ -2,7 +2,7 @@ * mpeg_ps.c : Program Stream input module for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: mpeg_ps.c,v 1.14 2002/05/15 22:53:10 jobi Exp $ + * $Id: mpeg_ps.c,v 1.15 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * @@ -28,15 +28,11 @@ #include /* strdup() */ #include -#include +#include +#include #include -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - /***************************************************************************** * Constants *****************************************************************************/ @@ -46,9 +42,9 @@ * Local prototypes *****************************************************************************/ static void input_getfunctions( function_list_t * p_function_list ); -static int PSDemux ( struct input_thread_s * ); -static int PSInit ( struct input_thread_s * ); -static void PSEnd ( struct input_thread_s * ); +static int PSDemux ( input_thread_t * ); +static int PSInit ( input_thread_t * ); +static void PSEnd ( input_thread_t * ); /***************************************************************************** * Build configuration tree. @@ -101,7 +97,7 @@ static int PSInit( input_thread_t * p_input ) if( input_Peek( p_input, &p_peek, 4 ) < 4 ) { /* Stream shorter than 4 bytes... */ - intf_ErrMsg( "input error: cannot peek() (mpeg_ps)" ); + msg_Err( p_input, "cannot peek()" ); return( -1 ); } @@ -110,11 +106,12 @@ static int PSInit( input_thread_t * p_input ) if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ps", 3 ) ) { /* User forced */ - intf_ErrMsg( "input error: this doesn't look like an MPEG PS stream, continuing" ); + msg_Err( p_input, "this does not look like an MPEG PS stream, continuing" ); } else { - intf_WarnMsg( 2, "input error: this doesn't look like an MPEG PS stream, but continuing anyway" ); + msg_Warn( p_input, "this does not look like an MPEG PS stream, " + "but continuing anyway" ); } } else if( *(p_peek + 3) <= 0xb9 ) @@ -122,13 +119,11 @@ static int PSInit( input_thread_t * p_input ) if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ps", 3 ) ) { /* User forced */ - intf_ErrMsg( "input error: this seems to be an elementary stream (ES plug-in ?),"); - intf_ErrMsg( "but continuing" ); + msg_Err( p_input, "this seems to be an elementary stream (ES module?), but continuing" ); } else { - intf_WarnMsg( 2, "input error: this seems to be an elementary stream (ES plug-in ?),"); - intf_WarnMsg( 2, "but continuing" ); + msg_Warn( p_input, "this seems to be an elementary stream (ES module?), but continuing" ); } } @@ -213,11 +208,11 @@ static int PSInit( input_thread_t * p_input ) case MPEG1_AUDIO_ES: case MPEG2_AUDIO_ES: - if( config_GetIntVariable( "audio-channel" ) + if( config_GetInt( p_input, "audio-channel" ) == (p_es->i_id & 0x1F) || - ( config_GetIntVariable( "audio-channel" ) < 0 - && !(p_es->i_id & 0x1F) ) ) - switch( config_GetIntVariable( "audio-type" ) ) + ( config_GetInt( p_input, "audio-channel" ) < 0 + && !(p_es->i_id & 0x1F) ) ) + switch( config_GetInt( p_input, "audio-type" ) ) { case -1: case REQUESTED_MPEG: @@ -226,11 +221,11 @@ static int PSInit( input_thread_t * p_input ) break; case AC3_AUDIO_ES: - if( config_GetIntVariable( "audio-channel" ) + if( config_GetInt( p_input, "audio-channel" ) == ((p_es->i_id & 0xF00) >> 8) || - ( config_GetIntVariable( "audio-channel" ) < 0 - && !((p_es->i_id & 0xF00) >> 8) ) ) - switch( config_GetIntVariable( "audio-type" ) ) + ( config_GetInt( p_input, "audio-channel" ) < 0 + && !((p_es->i_id & 0xF00) >> 8) ) ) + switch( config_GetInt( p_input, "audio-type" ) ) { case -1: case REQUESTED_AC3: @@ -239,7 +234,7 @@ static int PSInit( input_thread_t * p_input ) break; case DVD_SPU_ES: - if( config_GetIntVariable( "spu-channel" ) + if( config_GetInt( p_input, "spu-channel" ) == ((p_es->i_id & 0x1F00) >> 8) ) { input_SelectES( p_input, p_es ); @@ -247,11 +242,11 @@ static int PSInit( input_thread_t * p_input ) break; case LPCM_AUDIO_ES: - if( config_GetIntVariable( "audio-channel" ) + if( config_GetInt( p_input, "audio-channel" ) == ((p_es->i_id & 0x1F00) >> 8) || - ( config_GetIntVariable( "audio-channel" ) < 0 - && !((p_es->i_id & 0x1F00) >> 8) ) ) - switch( config_GetIntVariable( "audio-type" ) ) + ( config_GetInt( p_input, "audio-channel" ) < 0 + && !((p_es->i_id & 0x1F00) >> 8) ) ) + switch( config_GetInt( p_input, "audio-type" ) ) { case -1: case REQUESTED_LPCM: @@ -259,14 +254,11 @@ static int PSInit( input_thread_t * p_input ) } break; } +#undef p_es } - } #endif - if( p_main->b_stats ) - { - input_DumpStream( p_input ); - } + input_DumpStream( p_input ); vlc_mutex_unlock( &p_input->stream.stream_lock ); } else @@ -301,7 +293,6 @@ static int PSDemux( input_thread_t * p_input ) { data_packet_t * p_data; ssize_t i_result; - i_result = input_ReadPS( p_input, &p_data ); if( i_result <= 0 ) diff --git a/plugins/mpeg_system/mpeg_ts.c b/plugins/mpeg_system/mpeg_ts.c index e56dbfe0aa..fc4534fe98 100644 --- a/plugins/mpeg_system/mpeg_ts.c +++ b/plugins/mpeg_system/mpeg_ts.c @@ -2,7 +2,7 @@ * mpeg_ts.c : Transport Stream input module for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: mpeg_ts.c,v 1.13 2002/05/21 01:27:26 sam Exp $ + * $Id: mpeg_ts.c,v 1.14 2002/06/01 12:32:00 sam Exp $ * * Authors: Henri Fallon * Johan Bilien @@ -29,12 +29,8 @@ #include #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" +#include +#include #include "iso_lang.h" @@ -54,24 +50,21 @@ * Local prototypes *****************************************************************************/ static void input_getfunctions( function_list_t * p_function_list ); -static int TSInit ( struct input_thread_s * ); -static void TSEnd ( struct input_thread_s * ); -static int TSDemux ( struct input_thread_s * ); +static int TSInit ( input_thread_t * ); +static void TSEnd ( input_thread_t * ); +static int TSDemux ( input_thread_t * ); #if defined MODULE_NAME_IS_mpeg_ts -static void TSDemuxPSI ( struct input_thread_s *, struct data_packet_s *, - struct es_descriptor_s *, boolean_t ); +static void TSDemuxPSI ( input_thread_t *, data_packet_t *, + es_descriptor_t *, vlc_bool_t ); static void TSDecodePAT( input_thread_t *, es_descriptor_t *); static void TSDecodePMT( input_thread_t *, es_descriptor_t *); #define PSI_CALLBACK TSDemuxPSI #elif defined MODULE_NAME_IS_mpeg_ts_dvbpsi -static void TS_DVBPSI_DemuxPSI - ( struct input_thread_s *, struct data_packet_s *, - struct es_descriptor_s *, boolean_t ); -static void TS_DVBPSI_HandlePAT - ( struct input_thread_s *, dvbpsi_pat_t * ); -static void TS_DVBPSI_HandlePMT - ( struct input_thread_s *, dvbpsi_pmt_t * ); +static void TS_DVBPSI_DemuxPSI ( input_thread_t *, data_packet_t *, + es_descriptor_t *, vlc_bool_t ); +static void TS_DVBPSI_HandlePAT ( input_thread_t *, dvbpsi_pat_t * ); +static void TS_DVBPSI_HandlePMT ( input_thread_t *, dvbpsi_pmt_t * ); #define PSI_CALLBACK TS_DVBPSI_DemuxPSI #endif @@ -134,7 +127,7 @@ static int TSInit( input_thread_t * p_input ) /* Have a peep at the show. */ if( input_Peek( p_input, &p_peek, 1 ) < 1 ) { - intf_ErrMsg( "input error: cannot peek() (mpeg_ts)" ); + msg_Err( p_input, "cannot peek()" ); return( -1 ); } @@ -143,11 +136,11 @@ static int TSInit( input_thread_t * p_input ) if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ts", 3 ) ) { /* User forced */ - intf_ErrMsg( "input error: this doesn't look like a TS stream, continuing" ); + msg_Err( p_input, "this does not look like a TS stream, continuing" ); } else { - intf_WarnMsg( 2, "input: TS plug-in discarded (no sync)" ); + msg_Warn( p_input, "TS module discarded (no sync)" ); return( -1 ); } } @@ -175,7 +168,7 @@ static int TSInit( input_thread_t * p_input ) if( p_stream_data->p_pat_handle == NULL ) { - intf_ErrMsg( "input: ts: could not create PAT decoder" ); + msg_Err( p_input, "could not create PAT decoder" ); return( -1 ); } #endif @@ -244,7 +237,7 @@ static int TSDemux( input_thread_t * p_input ) * DemuxPSI : makes up complete PSI data *****************************************************************************/ static void TSDemuxPSI( input_thread_t * p_input, data_packet_t * p_data, - es_descriptor_t * p_es, boolean_t b_unit_start ) + es_descriptor_t * p_es, vlc_bool_t b_unit_start ) { es_ts_data_t * p_demux_data; @@ -259,8 +252,8 @@ static void TSDemuxPSI( input_thread_t * p_input, data_packet_t * p_data, * (see ISO/IEC 13818 (2.4.4.2) which should be set to 0x00 */ if( (u8)p[0] != 0x00 ) { - intf_WarnMsg( 2, "input: non zero pointer field found, " - "trying to continue" ); + msg_Warn( p_input, + "non-zero pointer field found, trying to continue" ); p+=(u8)p[0]; } else @@ -272,7 +265,7 @@ static void TSDemuxPSI( input_thread_t * p_input, data_packet_t * p_data, if( ((u8)(p[1]) & 0xc0) != 0x80 ) { - intf_WarnMsg( 2, "input: invalid PSI packet" ); + msg_Warn( p_input, "invalid PSI packet" ); p_psi->b_trash = 1; } else @@ -302,14 +295,14 @@ static void TSDemuxPSI( input_thread_t * p_input, data_packet_t * p_data, if( p_psi->i_version_number != (( p[5] >> 1 ) & 0x1f) ) { - intf_WarnMsg( 2, "input: PSI version differs " - "inside same PAT" ); + msg_Warn( p_input, + "PSI version differs inside same PAT" ); p_psi->b_trash = 1; } if( p_psi->i_section_number + 1 != (u8)p[6] ) { - intf_WarnMsg( 2, "input: PSI Section discontinuity, " - "packet lost ?" ); + msg_Warn( p_input, + "PSI Section discontinuity, packet lost?" ); p_psi->b_trash = 1; } else @@ -317,7 +310,7 @@ static void TSDemuxPSI( input_thread_t * p_input, data_packet_t * p_data, } else { - intf_WarnMsg( 2, "input: got unexpected new PSI section" ); + msg_Warn( p_input, "got unexpected new PSI section" ); p_psi->b_trash = 1; } } @@ -352,7 +345,7 @@ static void TSDemuxPSI( input_thread_t * p_input, data_packet_t * p_data, TSDecodePMT( p_input, p_es ); break; default: - intf_WarnMsg(2, "Received unknown PSI in DemuxPSI"); + msg_Warn( p_input, "received unknown PSI in DemuxPSI" ); } } } @@ -388,7 +381,7 @@ static void TSDecodePAT( input_thread_t * p_input, es_descriptor_t * p_es ) int i_section_length, i_program_id, i_pmt_pid; int i_loop, i_current_section; - boolean_t b_changed = 0; + vlc_bool_t b_changed = 0; p_demux_data = (es_ts_data_t *)p_es->p_demux_data; p_stream_data = (stream_ts_data_t *)p_input->stream.p_demux_data; @@ -639,7 +632,7 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) if( !p_input->stream.p_selected_program ) { pgrm_descriptor_t * p_pgrm_to_select; - u16 i_id = (u16)config_GetIntVariable( "program" ); + u16 i_id = (u16)config_GetInt( p_input, "program" ); if( i_id != 0 ) /* if user specified a program */ { @@ -672,7 +665,7 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) static void TS_DVBPSI_DemuxPSI( input_thread_t * p_input, data_packet_t * p_data, es_descriptor_t * p_es, - boolean_t b_unit_start ) + vlc_bool_t b_unit_start ) { es_ts_data_t * p_es_demux_data; pgrm_ts_data_t * p_pgrm_demux_data; @@ -695,7 +688,7 @@ static void TS_DVBPSI_DemuxPSI( input_thread_t * p_input, p_data->p_demux_start ); break; default: - intf_WarnMsg( 2, "Received unknown PSI in DemuxPSI" ); + msg_Warn( p_input, "received unknown PSI in DemuxPSI" ); } input_DeletePacket( p_input->p_method_data, p_data ); @@ -753,7 +746,7 @@ void TS_DVBPSI_HandlePAT( input_thread_t * p_input, dvbpsi_pat_t * p_new_pat ) p_es_demux->p_psi_section = malloc( sizeof( psi_section_t ) ); if ( p_es_demux->p_psi_section == NULL ) { - intf_ErrMsg( "input: ts: could not malloc pmt section" ); + msg_Err( p_input, "out of memory" ); p_input->b_error = 1; return; } @@ -768,7 +761,7 @@ void TS_DVBPSI_HandlePAT( input_thread_t * p_input, dvbpsi_pat_t * p_new_pat ) if( p_pgrm_demux->p_pmt_handle == NULL ) { - intf_ErrMsg( "input: ts: could not create PMT decoder" ); + msg_Err( p_input, "could not create PMT decoder" ); p_input->b_error = 1; return; } @@ -798,7 +791,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) if( p_pgrm == NULL ) { - intf_WarnMsg( 2, "input: ts: PMT of unreferenced program found" ); + msg_Warn( p_input, "PMT of unreferenced program found" ); return; } @@ -816,7 +809,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) (u16)p_es->i_pid, sizeof( es_ts_data_t ) ); if( p_new_es == NULL ) { - intf_ErrMsg( "input: ts: Could not add ES %d", p_es->i_pid ); + msg_Err( p_input, "could not add ES %d", p_es->i_pid ); p_input->b_error = 1; return; } @@ -897,7 +890,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) if( !p_input->stream.p_selected_program ) { pgrm_descriptor_t * p_pgrm_to_select; - u16 i_id = (u16)config_GetIntVariable( "program" ); + u16 i_id = (u16)config_GetInt( p_input, "program" ); if( i_id != 0 ) /* if user specified a program */ { diff --git a/plugins/mpeg_vdec/video_decoder.c b/plugins/mpeg_vdec/video_decoder.c index 18674bf1de..065ee054de 100644 --- a/plugins/mpeg_vdec/video_decoder.c +++ b/plugins/mpeg_vdec/video_decoder.c @@ -2,7 +2,7 @@ * video_decoder.c : video decoder thread ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: video_decoder.c,v 1.9 2002/05/18 17:47:47 sam Exp $ + * $Id: video_decoder.c,v 1.10 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * Michel Lespinasse @@ -29,18 +29,14 @@ #include /* memcpy(), memset() */ #include /* errno */ -#include +#include +#include +#include #ifdef HAVE_UNISTD_H # include /* getpid() */ #endif -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" - #include "vdec_ext-plugins.h" #include "video_decoder.h" #include "vpar_pool.h" @@ -62,32 +58,27 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool ) vdec_thread_t * p_vdec; /* Allocate the memory needed to store the thread's structure */ - if ( (p_vdec = (vdec_thread_t *)malloc( sizeof(vdec_thread_t) )) == NULL ) + p_vdec = vlc_object_create( p_pool->p_vpar->p_fifo, sizeof(vdec_thread_t) ); + if( p_vdec == NULL ) { - intf_ErrMsg("vdec error: not enough memory for vdec_CreateThread() to create the new thread"); - return( NULL ); + msg_Err( p_pool->p_vpar->p_fifo, "out of memory" ); + return NULL; } - /* - * Initialize the thread properties - */ - p_vdec->b_die = 0; - /* * Initialize the parser properties */ p_vdec->p_pool = p_pool; /* Spawn the video decoder thread */ - if ( vlc_thread_create(&p_vdec->thread_id, "video decoder", - (vlc_thread_func_t)RunThread, (void *)p_vdec) ) + if( vlc_thread_create( p_vdec, "video decoder", RunThread, 0 ) ) { - intf_ErrMsg("vdec error: can't spawn video decoder thread"); - free( p_vdec ); + msg_Err( p_vdec, "cannot spawn video decoder thread" ); + vlc_object_destroy( p_vdec ); return( NULL ); } - return( p_vdec ); + return p_vdec; } /***************************************************************************** @@ -104,7 +95,10 @@ void vdec_DestroyThread( vdec_thread_t *p_vdec ) vlc_mutex_unlock( &p_vdec->p_pool->lock ); /* Waiting for the decoder thread to exit */ - vlc_thread_join( p_vdec->thread_id ); + vlc_thread_join( p_vdec ); + + /* Free the object */ + vlc_object_destroy( p_vdec ); } /* following functions are local */ @@ -117,22 +111,19 @@ void vdec_DestroyThread( vdec_thread_t *p_vdec ) *****************************************************************************/ void vdec_InitThread( vdec_thread_t * p_vdec ) { -#if !defined(SYS_BEOS) && !defined(SYS_DARWIN) -# if VDEC_NICE /* Re-nice ourself - otherwise we would steal CPU time from the video * output, which would make a poor display. */ -# if !defined(WIN32) +#if defined( HAVE_NICE ) if( nice(VDEC_NICE) == -1 ) -# else +#elif defined( WIN32 ) if( !SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL ) ) -# endif +#else + if( 0 ) +#endif { - intf_WarnMsg( 2, "vpar warning : couldn't nice() (%s)", - strerror(errno) ); + msg_Warn( p_vdec, "couldn't nice() (%s)", strerror(errno) ); } -# endif -#endif p_vdec->p_idct_data = NULL; @@ -153,19 +144,17 @@ void vdec_EndThread( vdec_thread_t * p_vdec ) { free( p_vdec->p_idct_data ); } - - free( p_vdec ); } /***************************************************************************** * MotionBlock: does one component of the motion compensation *****************************************************************************/ -static inline void MotionBlock( vdec_pool_t * p_pool, boolean_t b_average, +static inline void MotionBlock( vdec_pool_t * p_pool, vlc_bool_t b_average, int i_x_pred, int i_y_pred, yuv_data_t * pp_dest[3], int i_dest_offset, yuv_data_t * pp_src[3], int i_src_offset, int i_stride, int i_height, - boolean_t b_second_half, int i_chroma_format ) + vlc_bool_t b_second_half, int i_chroma_format ) { int i_xy_half; yuv_data_t * p_src1; diff --git a/plugins/mpeg_vdec/video_decoder.h b/plugins/mpeg_vdec/video_decoder.h index e672f23c92..d3d7d880ef 100644 --- a/plugins/mpeg_vdec/video_decoder.h +++ b/plugins/mpeg_vdec/video_decoder.h @@ -2,7 +2,7 @@ * video_decoder.h : video decoder thread ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video_decoder.h,v 1.1 2001/11/13 12:09:18 henri Exp $ + * $Id: video_decoder.h,v 1.2 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * @@ -24,16 +24,12 @@ /***************************************************************************** * Prototypes *****************************************************************************/ -void vdec_InitThread ( struct vdec_thread_s * ); -void vdec_EndThread ( struct vdec_thread_s * ); -void vdec_DecodeMacroblockBW ( struct vdec_thread_s *, - struct macroblock_s * ); -void vdec_DecodeMacroblock420( struct vdec_thread_s *, - struct macroblock_s * ); -void vdec_DecodeMacroblock422( struct vdec_thread_s *, - struct macroblock_s * ); -void vdec_DecodeMacroblock444( struct vdec_thread_s *, - struct macroblock_s * ); -struct vdec_thread_s * vdec_CreateThread( struct vdec_pool_s * ); -void vdec_DestroyThread ( struct vdec_thread_s * ); +void vdec_InitThread ( vdec_thread_t * ); +void vdec_EndThread ( vdec_thread_t * ); +void vdec_DecodeMacroblockBW ( vdec_thread_t *, macroblock_t * ); +void vdec_DecodeMacroblock420( vdec_thread_t *, macroblock_t * ); +void vdec_DecodeMacroblock422( vdec_thread_t *, macroblock_t * ); +void vdec_DecodeMacroblock444( vdec_thread_t *, macroblock_t * ); +vdec_thread_t * vdec_CreateThread ( struct vdec_pool_s * ); +void vdec_DestroyThread ( vdec_thread_t * ); diff --git a/plugins/mpeg_vdec/video_parser.c b/plugins/mpeg_vdec/video_parser.c index ac307c25ad..a9a77cf260 100644 --- a/plugins/mpeg_vdec/video_parser.c +++ b/plugins/mpeg_vdec/video_parser.c @@ -2,7 +2,7 @@ * video_parser.c : video parser thread ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: video_parser.c,v 1.20 2002/05/19 12:57:32 gbazin Exp $ + * $Id: video_parser.c,v 1.21 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * Samuel Hocevar @@ -27,7 +27,9 @@ *****************************************************************************/ #include /* malloc(), free() */ -#include +#include +#include +#include #ifdef HAVE_UNISTD_H #include /* getpid() */ @@ -40,12 +42,6 @@ # include #endif -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" - #include "vdec_ext-plugins.h" #include "vpar_pool.h" #include "video_parser.h" @@ -54,10 +50,10 @@ * Local prototypes */ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static int InitThread ( vpar_thread_t * ); static void EndThread ( vpar_thread_t * ); -static void BitstreamCallback ( bit_stream_t *, boolean_t ); +static void BitstreamCallback ( bit_stream_t *, vlc_bool_t ); /***************************************************************************** * Capabilities @@ -74,16 +70,14 @@ void _M( vdec_getfunctions )( function_list_t * p_function_list ) #define VDEC_IDCT_TEXT N_("IDCT module") #define VDEC_IDCT_LONGTEXT N_( \ "This option allows you to select the IDCT module used by this video " \ - "decoder.\n" \ - "Note that the default behavior is to automatically select the best " \ + "decoder. The default behavior is to automatically select the best " \ "module available.") #define VDEC_MOTION_TEXT N_("motion compensation module") #define VDEC_MOTION_LONGTEXT N_( \ "This option allows you to select the motion compensation module used by "\ - "this video decoder.\n" \ - "Note that the default behavior is to automatically select the best " \ - "module available.") + "this video decoder. The default behavior is to automatically select the "\ + "best module available.") #define VDEC_SMP_TEXT N_("use additional processors") #define VDEC_SMP_LONGTEXT N_( \ @@ -136,25 +130,23 @@ static int decoder_Probe( u8 *pi_type ) /***************************************************************************** * decoder_Run: this function is called just after the thread is created *****************************************************************************/ -static int decoder_Run ( decoder_config_t * p_config ) +static int decoder_Run ( decoder_fifo_t * p_fifo ) { vpar_thread_t * p_vpar; - boolean_t b_error; + vlc_bool_t b_error; /* Allocate the memory needed to store the thread's structure */ if ( (p_vpar = (vpar_thread_t *)malloc( sizeof(vpar_thread_t) )) == NULL ) { - intf_ErrMsg( "vpar error: not enough memory " - "for vpar_CreateThread() to create the new thread"); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } /* * Initialize the thread properties */ - p_vpar->p_fifo = p_config->p_decoder_fifo; - p_vpar->p_config = p_config; + p_vpar->p_fifo = p_fifo; p_vpar->p_vout = NULL; /* @@ -218,14 +210,14 @@ static int InitThread( vpar_thread_t *p_vpar ) /* * Choose the best motion compensation module */ - psz_name = config_GetPszVariable( "mpeg-motion" ); - p_vpar->p_motion_module = module_Need( MODULE_CAPABILITY_MOTION, psz_name, - NULL ); + psz_name = config_GetPsz( p_vpar->p_fifo, "mpeg-motion" ); + p_vpar->p_motion_module = module_Need( p_vpar->p_fifo, + MODULE_CAPABILITY_MOTION, psz_name, NULL ); if( psz_name ) free( psz_name ); if( p_vpar->p_motion_module == NULL ) { - intf_ErrMsg( "vpar error: no suitable motion compensation module" ); + msg_Err( p_vpar->p_fifo, "no suitable motion compensation module" ); free( p_vpar ); return( -1 ); } @@ -237,14 +229,14 @@ static int InitThread( vpar_thread_t *p_vpar ) /* * Choose the best IDCT module */ - psz_name = config_GetPszVariable( "mpeg-idct" ); - p_vpar->p_idct_module = module_Need( MODULE_CAPABILITY_IDCT, psz_name, - NULL ); + psz_name = config_GetPsz( p_vpar->p_fifo, "mpeg-idct" ); + p_vpar->p_idct_module = module_Need( p_vpar->p_fifo, + MODULE_CAPABILITY_IDCT, psz_name, NULL ); if( psz_name ) free( psz_name ); if( p_vpar->p_idct_module == NULL ) { - intf_ErrMsg( "vpar error: no suitable IDCT module" ); + msg_Err( p_vpar->p_fifo, "no suitable IDCT module" ); module_Unneed( p_vpar->p_motion_module ); free( p_vpar ); return( -1 ); @@ -260,7 +252,7 @@ static int InitThread( vpar_thread_t *p_vpar ) #undef f /* Initialize input bitstream */ - InitBitstream( &p_vpar->bit_stream, p_vpar->p_config->p_decoder_fifo, + InitBitstream( &p_vpar->bit_stream, p_vpar->p_fifo, BitstreamCallback, (void *)p_vpar ); /* Initialize parsing data */ @@ -312,6 +304,11 @@ static int InitThread( vpar_thread_t *p_vpar ) *****************************************************************************/ static void EndThread( vpar_thread_t *p_vpar ) { +#ifdef HAVE_SYS_TIMES_H + struct tms cpu_usage; + times( &cpu_usage ); +#endif + /* Release used video buffers. */ if( p_vpar->sequence.p_forward != NULL ) { @@ -328,53 +325,50 @@ static void EndThread( vpar_thread_t *p_vpar ) vout_DestroyPicture( p_vpar->p_vout, p_vpar->picture.p_picture ); } - if( p_main->b_stats ) - { -#ifdef HAVE_SYS_TIMES_H - struct tms cpu_usage; - times( &cpu_usage ); -#endif + /* We are about to die. Reattach video output to p_vlc. */ + vlc_object_unlink( p_vpar->p_vout, p_vpar->p_fifo ); + vlc_object_attach( p_vpar->p_vout, p_vpar->p_fifo->p_vlc ); - intf_StatMsg( "vpar stats: %d loops among %d sequence(s)", - p_vpar->c_loops, p_vpar->c_sequences ); + msg_Dbg( p_vpar->p_fifo, "%d loops among %d sequence(s)", + p_vpar->c_loops, p_vpar->c_sequences ); #ifdef HAVE_SYS_TIMES_H - intf_StatMsg( "vpar stats: cpu usage (user: %d, system: %d)", - cpu_usage.tms_utime, cpu_usage.tms_stime ); + msg_Dbg( p_vpar->p_fifo, "cpu usage (user: %d, system: %d)", + cpu_usage.tms_utime, cpu_usage.tms_stime ); #endif - intf_StatMsg( "vpar stats: Read %d frames/fields (I %d/P %d/B %d)", - p_vpar->pc_pictures[I_CODING_TYPE] - + p_vpar->pc_pictures[P_CODING_TYPE] - + p_vpar->pc_pictures[B_CODING_TYPE], - p_vpar->pc_pictures[I_CODING_TYPE], - p_vpar->pc_pictures[P_CODING_TYPE], - p_vpar->pc_pictures[B_CODING_TYPE] ); - intf_StatMsg( "vpar stats: Decoded %d frames/fields (I %d/P %d/B %d)", - p_vpar->pc_decoded_pictures[I_CODING_TYPE] - + p_vpar->pc_decoded_pictures[P_CODING_TYPE] - + p_vpar->pc_decoded_pictures[B_CODING_TYPE], - p_vpar->pc_decoded_pictures[I_CODING_TYPE], - p_vpar->pc_decoded_pictures[P_CODING_TYPE], - p_vpar->pc_decoded_pictures[B_CODING_TYPE] ); - intf_StatMsg( "vpar stats: Read %d malformed frames/fields (I %d/P %d/B %d)", - p_vpar->pc_malformed_pictures[I_CODING_TYPE] - + p_vpar->pc_malformed_pictures[P_CODING_TYPE] - + p_vpar->pc_malformed_pictures[B_CODING_TYPE], - p_vpar->pc_malformed_pictures[I_CODING_TYPE], - p_vpar->pc_malformed_pictures[P_CODING_TYPE], - p_vpar->pc_malformed_pictures[B_CODING_TYPE] ); + msg_Dbg( p_vpar->p_fifo, "read %d frames/fields (I %d/P %d/B %d)", + p_vpar->pc_pictures[I_CODING_TYPE] + + p_vpar->pc_pictures[P_CODING_TYPE] + + p_vpar->pc_pictures[B_CODING_TYPE], + p_vpar->pc_pictures[I_CODING_TYPE], + p_vpar->pc_pictures[P_CODING_TYPE], + p_vpar->pc_pictures[B_CODING_TYPE] ); + msg_Dbg( p_vpar->p_fifo, "decoded %d frames/fields (I %d/P %d/B %d)", + p_vpar->pc_decoded_pictures[I_CODING_TYPE] + + p_vpar->pc_decoded_pictures[P_CODING_TYPE] + + p_vpar->pc_decoded_pictures[B_CODING_TYPE], + p_vpar->pc_decoded_pictures[I_CODING_TYPE], + p_vpar->pc_decoded_pictures[P_CODING_TYPE], + p_vpar->pc_decoded_pictures[B_CODING_TYPE] ); + msg_Dbg( p_vpar->p_fifo, + "read %d malformed frames/fields (I %d/P %d/B %d)", + p_vpar->pc_malformed_pictures[I_CODING_TYPE] + + p_vpar->pc_malformed_pictures[P_CODING_TYPE] + + p_vpar->pc_malformed_pictures[B_CODING_TYPE], + p_vpar->pc_malformed_pictures[I_CODING_TYPE], + p_vpar->pc_malformed_pictures[P_CODING_TYPE], + p_vpar->pc_malformed_pictures[B_CODING_TYPE] ); #define S p_vpar->sequence - intf_StatMsg( "vpar info: %s stream (%dx%d), %d.%d pi/s", - S.b_mpeg2 ? "MPEG-2" : "MPEG-1", - S.i_width, S.i_height, S.i_frame_rate/1001, - S.i_frame_rate % 1001 ); - intf_StatMsg( "vpar info: %s, %s, matrix_coeff: %d", - S.b_progressive ? "Progressive" : "Non-progressive", - S.i_scalable_mode ? "scalable" : "non-scalable", - S.i_matrix_coefficients ); + msg_Dbg( p_vpar->p_fifo, "%s stream (%dx%d), %d.%d pi/s", + S.b_mpeg2 ? "MPEG-2" : "MPEG-1", + S.i_width, S.i_height, S.i_frame_rate/1001, + S.i_frame_rate % 1001 ); + msg_Dbg( p_vpar->p_fifo, "%s, %s, matrix_coeff: %d", + S.b_progressive ? "Progressive" : "Non-progressive", + S.i_scalable_mode ? "scalable" : "non-scalable", + S.i_matrix_coefficients ); #undef S - } /* Dispose of matrices if they have been allocated. */ if( p_vpar->sequence.intra_quant.b_allocated ) @@ -408,7 +402,7 @@ static void EndThread( vpar_thread_t *p_vpar ) * This function is called by input's NextDataPacket. *****************************************************************************/ static void BitstreamCallback ( bit_stream_t * p_bit_stream, - boolean_t b_new_pes ) + vlc_bool_t b_new_pes ) { vpar_thread_t * p_vpar = (vpar_thread_t *)p_bit_stream->p_callback_arg; diff --git a/plugins/mpeg_vdec/video_parser.h b/plugins/mpeg_vdec/video_parser.h index 5d73496a00..b693630d2b 100644 --- a/plugins/mpeg_vdec/video_parser.h +++ b/plugins/mpeg_vdec/video_parser.h @@ -2,7 +2,7 @@ * video_parser.h : video parser thread ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video_parser.h,v 1.5 2002/05/18 17:47:47 sam Exp $ + * $Id: video_parser.h,v 1.6 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * Jean-Marc Dressler @@ -96,7 +96,7 @@ PROTO_PICD( vpar_PictureData1D ) typedef struct quant_matrix_s { u8 * pi_matrix; - boolean_t b_allocated; + vlc_bool_t b_allocated; /* Has the matrix been allocated by vpar_headers ? */ } quant_matrix_t; @@ -117,10 +117,10 @@ typedef struct sequence_s unsigned int i_matrix_coefficients;/* coeffs of the YUV transform */ int i_chroma_format, i_scalable_mode; int i_chroma_nb_blocks; - boolean_t b_chroma_h_subsampled, b_chroma_v_subsampled; + vlc_bool_t b_chroma_h_subsampled, b_chroma_v_subsampled; int i_frame_rate; /* theoritical frame rate in fps*1001 */ - boolean_t b_mpeg2; /* guess */ - boolean_t b_progressive; /* progressive (ie. + vlc_bool_t b_mpeg2; /* guess */ + vlc_bool_t b_progressive; /* progressive (ie. * non-interlaced) frame */ quant_matrix_t intra_quant, nonintra_quant; quant_matrix_t chroma_intra_quant, chroma_nonintra_quant; @@ -131,15 +131,15 @@ typedef struct sequence_s picture_t * p_backward; /* current backward reference frame */ mtime_t next_pts, next_dts; int i_current_rate; - boolean_t b_expect_discontinuity; /* reset the frame predictors + vlc_bool_t b_expect_discontinuity; /* reset the frame predictors * after the current frame */ /* Copyright extension */ - boolean_t b_copyright_flag; /* Whether the following + vlc_bool_t b_copyright_flag; /* Whether the following information is significant or not. */ u8 i_copyright_id; - boolean_t b_original; + vlc_bool_t b_original; u64 i_copyright_nb; } sequence_t; @@ -153,22 +153,22 @@ typedef struct picture_parsing_s /* Values from the picture_coding_extension. */ int ppi_f_code[2][2]; int i_intra_dc_precision; - boolean_t b_frame_pred_frame_dct, b_q_scale_type; - boolean_t b_intra_vlc_format; - boolean_t b_progressive; + vlc_bool_t b_frame_pred_frame_dct, b_q_scale_type; + vlc_bool_t b_intra_vlc_format; + vlc_bool_t b_progressive; u8 * pi_scan; - boolean_t b_top_field_first, b_concealment_mv; - boolean_t b_repeat_first_field; + vlc_bool_t b_top_field_first, b_concealment_mv; + vlc_bool_t b_repeat_first_field; /* Relative to the current field */ int i_coding_type, i_structure, i_field_width; - boolean_t b_frame_structure; /* i_structure == FRAME_STRUCTURE */ - boolean_t b_current_field; /* i_structure == TOP_FIELD */ - boolean_t b_second_field; + vlc_bool_t b_frame_structure; /* i_structure == FRAME_STRUCTURE */ + vlc_bool_t b_current_field; /* i_structure == TOP_FIELD */ + vlc_bool_t b_second_field; picture_t * p_picture; /* picture buffer from vout */ int i_current_structure; /* current parsed structure of * p_picture (second field ?) */ - boolean_t b_error; /* parsing error, try to recover */ + vlc_bool_t b_error; /* parsing error, try to recover */ /* Given by the video output */ int i_lum_stride, i_chrom_stride; @@ -264,7 +264,7 @@ typedef struct video_synchro_s /* stream context */ unsigned int i_eta_p, i_eta_b; - boolean_t b_dropped_last; /* for special synchros below */ + vlc_bool_t b_dropped_last; /* for special synchros below */ mtime_t backward_pts, current_pts; int i_current_period; /* period to add to the next picture */ int i_backward_period; /* period to add after the next @@ -287,7 +287,7 @@ typedef struct video_synchro_s * Prototypes *****************************************************************************/ void vpar_SynchroInit ( struct vpar_thread_s * p_vpar ); -boolean_t vpar_SynchroChoose ( struct vpar_thread_s * p_vpar, +vlc_bool_t vpar_SynchroChoose ( struct vpar_thread_s * p_vpar, int i_coding_type, int i_structure ); void vpar_SynchroTrash ( struct vpar_thread_s * p_vpar, int i_coding_type, int i_structure ); @@ -317,7 +317,6 @@ typedef struct vpar_thread_s /* Input properties */ decoder_fifo_t * p_fifo; /* PES input fifo */ - decoder_config_t * p_config; /* Output properties */ vout_thread_t * p_vout; /* video output thread */ @@ -338,10 +337,10 @@ typedef struct vpar_thread_s u8 pi_default_nonintra_quant[64]; /* Motion compensation plug-in used and shortcuts */ - struct module_s * p_motion_module; + module_t * p_motion_module; /* IDCT plug-in used and shortcuts */ - struct module_s * p_idct_module; + module_t * p_idct_module; void ( * pf_sparse_idct_add )( dctelem_t *, yuv_data_t *, int, void *, int ); void ( * pf_idct_add ) ( dctelem_t *, yuv_data_t *, int, diff --git a/plugins/mpeg_vdec/vpar_blocks.c b/plugins/mpeg_vdec/vpar_blocks.c index d845233f85..e2fa7111dd 100644 --- a/plugins/mpeg_vdec/vpar_blocks.c +++ b/plugins/mpeg_vdec/vpar_blocks.c @@ -2,7 +2,7 @@ * vpar_blocks.c : blocks parsing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: vpar_blocks.c,v 1.9 2002/05/18 17:47:47 sam Exp $ + * $Id: vpar_blocks.c,v 1.10 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Lespinasse * Aaron Holtzman @@ -28,13 +28,9 @@ *****************************************************************************/ #include /* memset */ -#include - -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include #include "vdec_ext-plugins.h" #include "vpar_pool.h" @@ -231,7 +227,7 @@ store_coeff: if( i_coeff >= 64 ) { /* Illegal, but needed to avoid overflow */ - intf_WarnMsg( 2, "Intra-B14 coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, "intra-B14 coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -283,7 +279,7 @@ store_coeff: } } - intf_WarnMsg( 2, "Intra-B14 coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, "intra-B14 coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -374,7 +370,8 @@ store_coeff: if( i_coeff >= 64 ) { /* Illegal, but needed to avoid overflow */ - intf_WarnMsg( 2, "Intra-B15 coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, + "intra-B15 coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -427,7 +424,7 @@ store_coeff: } } - intf_WarnMsg( 2, "Intra-B15 coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, "intra-B15 coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -535,7 +532,8 @@ coeff_2: if( i_coeff >= 64 ) { /* Illegal, but needed to avoid overflow */ - intf_WarnMsg( 2, "vpar warning: MPEG2NonIntra coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, + "MPEG2NonIntra coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -589,7 +587,7 @@ coeff_2: } } - intf_WarnMsg( 2, "vpar warning: MPEG2NonIntra coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, "MPEG2NonIntra coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -693,7 +691,8 @@ store_coeff: if( i_coeff >= 64 ) { /* Illegal, but needed to avoid overflow */ - intf_WarnMsg( 2, "vpar warning: MPEG1Intra coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, + "MPEG1Intra coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -755,7 +754,7 @@ store_coeff: } } - intf_WarnMsg( 2, "vpar warning: MPEG1Intra coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, "MPEG1Intra coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -848,7 +847,8 @@ coeff_2: if( i_coeff >= 64 ) { /* Illegal, but needed to avoid overflow */ - intf_WarnMsg( 2, "vpar warning: MPEG1NonIntra coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, + "MPEG1NonIntra coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -910,7 +910,7 @@ coeff_2: } } - intf_WarnMsg( 2, "vpar warning: MPEG1NonIntra coeff is out of bound" ); + msg_Warn( p_vpar->p_fifo, "MPEG1NonIntra coeff is out of bounds" ); p_vpar->picture.b_error = 1; break; } @@ -1154,7 +1154,7 @@ static inline int GetDMV( vpar_thread_t * p_vpar ) static void MotionMPEG1( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; int i_offset = p_vpar->mb.i_offset; @@ -1183,7 +1183,7 @@ static void MotionMPEG1( vpar_thread_t * p_vpar, static void MotionMPEG1Reuse( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; int i_offset = p_vpar->mb.i_offset; @@ -1207,7 +1207,7 @@ static void MotionMPEG1Reuse( vpar_thread_t * p_vpar, static void MotionFrameFrame( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; int i_offset = p_vpar->mb.i_offset; @@ -1230,7 +1230,7 @@ static void MotionFrameFrame( vpar_thread_t * p_vpar, static void MotionFrameField( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y, i_field_select; int i_offset = p_vpar->mb.i_offset; @@ -1275,7 +1275,7 @@ static void MotionFrameField( vpar_thread_t * p_vpar, static void MotionFrameDMV( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; int i_dmv_x, i_dmv_y; @@ -1321,7 +1321,7 @@ static void MotionFrameDMV( vpar_thread_t * p_vpar, static void MotionFrameZero( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; @@ -1333,7 +1333,7 @@ static void MotionFrameZero( vpar_thread_t * p_vpar, static void MotionFrameReuse( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; @@ -1347,10 +1347,10 @@ static void MotionFrameReuse( vpar_thread_t * p_vpar, static void MotionFieldField( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; - boolean_t b_field_select; + vlc_bool_t b_field_select; int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; @@ -1373,10 +1373,10 @@ static void MotionFieldField( vpar_thread_t * p_vpar, static void MotionField16x8( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; - boolean_t b_field_select; + vlc_bool_t b_field_select; int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; @@ -1416,13 +1416,13 @@ static void MotionField16x8( vpar_thread_t * p_vpar, static void MotionFieldDMV( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_motion_x, i_motion_y; int i_dmv_x, i_dmv_y; int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; - boolean_t b_current_field = p_vpar->picture.b_current_field; + vlc_bool_t b_current_field = p_vpar->picture.b_current_field; i_motion_x = p_motion->ppi_pmv[0][0] + MotionDelta( p_vpar, p_motion->pi_f_code[0] ); @@ -1453,11 +1453,11 @@ static void MotionFieldDMV( vpar_thread_t * p_vpar, static void MotionFieldZero( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; - boolean_t b_current_field = p_vpar->picture.b_current_field; + vlc_bool_t b_current_field = p_vpar->picture.b_current_field; MOTION_BLOCK( b_average, 0, 0, i_offset, p_motion->pppi_ref[b_current_field], i_offset, i_width, 16, 0 ); @@ -1466,11 +1466,11 @@ static void MotionFieldZero( vpar_thread_t * p_vpar, static void MotionFieldReuse( vpar_thread_t * p_vpar, macroblock_t * p_mb, motion_t * p_motion, - boolean_t b_average ) + vlc_bool_t b_average ) { int i_offset = p_vpar->mb.i_offset; int i_width = p_vpar->picture.i_lum_stride; - boolean_t b_current_field = p_vpar->picture.b_current_field; + vlc_bool_t b_current_field = p_vpar->picture.b_current_field; MOTION_BLOCK( b_average, p_motion->ppi_pmv[0][0], p_motion->ppi_pmv[0][1], i_offset, p_motion->pppi_ref[b_current_field], @@ -1762,7 +1762,7 @@ mb_intra: } static inline void ParseSlice( vpar_thread_t * p_vpar, - u32 i_vert_code, boolean_t b_mpeg2, + u32 i_vert_code, vlc_bool_t b_mpeg2, int i_coding_type, int i_structure ) { int i_lum_offset, i_chrom_offset, i_offset, i_lum_vsize, i_chrom_vsize; @@ -2152,7 +2152,7 @@ static inline void ParseSlice( vpar_thread_t * p_vpar, /***************************************************************************** * PictureData : Parse off all macroblocks (ISO/IEC 13818-2 6.2.3.7) *****************************************************************************/ -static inline void vpar_PictureData( vpar_thread_t * p_vpar, boolean_t b_mpeg2, +static inline void vpar_PictureData( vpar_thread_t * p_vpar, vlc_bool_t b_mpeg2, int i_coding_type, int i_structure ) { u32 i_dummy; diff --git a/plugins/mpeg_vdec/vpar_headers.c b/plugins/mpeg_vdec/vpar_headers.c index 5479852f1d..ac738402c4 100644 --- a/plugins/mpeg_vdec/vpar_headers.c +++ b/plugins/mpeg_vdec/vpar_headers.c @@ -2,7 +2,7 @@ * vpar_headers.c : headers parsing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: vpar_headers.c,v 1.22 2002/05/30 13:58:17 gbazin Exp $ + * $Id: vpar_headers.c,v 1.23 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * Stéphane Borel @@ -28,13 +28,9 @@ #include /* free() */ #include /* memcpy(), memset() */ -#include - -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include #include "vdec_ext-plugins.h" #include "vpar_pool.h" @@ -118,8 +114,7 @@ u8 pi_scan[2][64] ATTR_ALIGN(16) = * ReferenceUpdate : Update the reference pointers when we have a new picture *****************************************************************************/ static void inline ReferenceUpdate( vpar_thread_t * p_vpar, - int i_coding_type, - picture_t * p_newref ) + int i_coding_type, picture_t * p_newref ) { if( i_coding_type != B_CODING_TYPE ) { @@ -150,8 +145,8 @@ static void inline ReferenceUpdate( vpar_thread_t * p_vpar, * ReferenceReplace : Replace the last reference pointer when we destroy * a picture *****************************************************************************/ -static void inline ReferenceReplace( vpar_thread_t * p_vpar, int i_coding_type, - picture_t * p_newref ) +static void inline ReferenceReplace( vpar_thread_t * p_vpar, + int i_coding_type, picture_t * p_newref ) { if( i_coding_type != B_CODING_TYPE ) { @@ -180,7 +175,7 @@ static inline void LoadMatrix( vpar_thread_t * p_vpar, /* Allocate a piece of memory to load the matrix. */ if( (p_matrix->pi_matrix = (u8 *)malloc( 64*sizeof(u8) )) == NULL ) { - intf_ErrMsg( "vpar error: allocation error in LoadMatrix()" ); + msg_Err( p_vpar->p_fifo, "out of memory" ); p_vpar->p_fifo->b_error = 1; return; } @@ -264,27 +259,23 @@ int vpar_ParseHeader( vpar_thread_t * p_vpar ) p_vpar->c_sequences++; SequenceHeader( p_vpar ); return 0; - break; case GROUP_START_CODE: GroupHeader( p_vpar ); return 0; - break; case PICTURE_START_CODE: PictureHeader( p_vpar ); return 0; - break; case SEQUENCE_END_CODE: - intf_WarnMsg(3, "vpar warning: sequence end code received"); - + msg_Dbg( p_vpar->p_fifo, "sequence end code received" ); if( p_vpar->sequence.p_backward != NULL ) + { p_vpar->sequence.p_backward->b_force = 1; + } ReferenceUpdate( p_vpar, I_CODING_TYPE, NULL ); - return 1; - break; default: break; @@ -426,10 +417,10 @@ static void SequenceHeader( vpar_thread_t * p_vpar ) } /* check whether the input gives a particular aspect ratio */ - if( p_vpar->p_config->p_demux_data - && ( *(int*)(p_vpar->p_config->p_demux_data) & 0x7 ) ) + if( p_vpar->p_fifo->p_demux_data + && ( *(int*)(p_vpar->p_fifo->p_demux_data) & 0x7 ) ) { - i_aspect = *(int*)(p_vpar->p_config->p_demux_data); + i_aspect = *(int*)(p_vpar->p_fifo->p_demux_data); } /* Store calculated aspect ratio */ @@ -495,46 +486,39 @@ static void SequenceHeader( vpar_thread_t * p_vpar ) /* Extension and User data */ ExtensionAndUserData( p_vpar ); - /* XXX: The vout request and fifo opening will eventually be here */ - /* Spawn a video output if there is none */ - vlc_mutex_lock( &p_vout_bank->lock ); + + p_vpar->p_vout = vlc_object_find( p_vpar->p_fifo->p_vlc, VLC_OBJECT_VOUT, + FIND_CHILD ); - if( p_vout_bank->i_count != 0 ) + if( p_vpar->p_vout ) { - /* Take the first video output FIXME: take the best one */ - p_vpar->p_vout = p_vout_bank->pp_vout[ 0 ]; - if( p_vpar->p_vout->render.i_width != p_vpar->sequence.i_width || p_vpar->p_vout->render.i_height != p_vpar->sequence.i_height || p_vpar->p_vout->render.i_chroma != ChromaToFourCC( p_vpar->sequence.i_chroma_format ) || p_vpar->p_vout->render.i_aspect != p_vpar->sequence.i_aspect ) { - p_vout_bank->pp_vout[ 0 ] = NULL; - p_vout_bank->i_count--; - vlc_mutex_unlock( &p_vout_bank->lock ); - vout_DestroyThread( p_vpar->p_vout, NULL ); - vlc_mutex_lock( &p_vout_bank->lock ); - - /* XXX: race condition here if p_vout_bank->i_count was updated */ - if( p_vout_bank->i_count ) - { - vlc_mutex_unlock( &p_vout_bank->lock ); - intf_ErrMsg( "vpar error: can't open vout, aborting" ); - p_vpar->p_fifo->b_error = 1; - return; - } + /* We are not interested in this format, close this vout */ + vlc_object_unlink_all( p_vpar->p_vout ); + vlc_object_release( p_vpar->p_vout ); + vout_DestroyThread( p_vpar->p_vout ); + p_vpar->p_vout = NULL; + } + else + { + /* This video output is cool! Hijack it. */ + vlc_object_unlink_all( p_vpar->p_vout ); + vlc_object_attach( p_vpar->p_vout, p_vpar->p_fifo ); + vlc_object_release( p_vpar->p_vout ); } } - if( p_vout_bank->i_count == 0 ) + if( p_vpar->p_vout == NULL ) { - intf_WarnMsg( 1, "vpar: no vout present, spawning one" ); - - vlc_mutex_unlock( &p_vout_bank->lock ); + msg_Dbg( p_vpar->p_fifo, "no vout present, spawning one" ); - p_vpar->p_vout = vout_CreateThread( - NULL, p_vpar->sequence.i_width, + p_vpar->p_vout = vout_CreateThread( p_vpar->p_fifo->p_this, + p_vpar->sequence.i_width, p_vpar->sequence.i_height, ChromaToFourCC( p_vpar->sequence.i_chroma_format ), p_vpar->sequence.i_aspect ); @@ -542,18 +526,11 @@ static void SequenceHeader( vpar_thread_t * p_vpar ) /* Everything failed */ if( p_vpar->p_vout == NULL ) { - intf_ErrMsg( "vpar error: can't open vout, aborting" ); + msg_Err( p_vpar->p_fifo, "cannot open vout, aborting" ); p_vpar->p_fifo->b_error = 1; return; } - - vlc_mutex_lock( &p_vout_bank->lock ); - - p_vout_bank->pp_vout[ p_vout_bank->i_count ] = p_vpar->p_vout; - p_vout_bank->i_count++; } - - vlc_mutex_unlock( &p_vout_bank->lock ); } /***************************************************************************** @@ -572,7 +549,7 @@ static void GroupHeader( vpar_thread_t * p_vpar ) static void PictureHeader( vpar_thread_t * p_vpar ) { int i_structure, i_previous_coding_type; - boolean_t b_parsable = 0; + vlc_bool_t b_parsable = 0; /* Retrieve the PTS. */ CurrentPTS( &p_vpar->bit_stream, &p_vpar->sequence.next_pts, @@ -696,7 +673,7 @@ static void PictureHeader( vpar_thread_t * p_vpar ) p_vpar->picture.i_current_structure = 0; - intf_WarnMsg( 2, "Odd number of field pictures." ); + msg_Warn( p_vpar->p_fifo, "odd number of field pictures" ); } else { @@ -867,7 +844,7 @@ static void PictureHeader( vpar_thread_t * p_vpar ) p_vpar->picture.i_field_width = p_vpar->sequence.i_width << ( 1 - p_vpar->picture.b_frame_structure ); - if( !p_vpar->p_config->p_stream_ctrl->b_grayscale ) + if( !p_vpar->p_fifo->p_stream_ctrl->b_grayscale ) { switch( p_vpar->sequence.i_chroma_format ) { diff --git a/plugins/mpeg_vdec/vpar_pool.c b/plugins/mpeg_vdec/vpar_pool.c index d34223bfc9..e9bef016f6 100644 --- a/plugins/mpeg_vdec/vpar_pool.c +++ b/plugins/mpeg_vdec/vpar_pool.c @@ -2,7 +2,7 @@ * vpar_pool.c : management of the pool of decoder threads ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: vpar_pool.c,v 1.8 2002/04/25 21:52:42 sam Exp $ + * $Id: vpar_pool.c,v 1.9 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * @@ -27,13 +27,9 @@ #include /* memcpy(), memset() */ #include /* realloc() */ -#include - -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include #include "vdec_ext-plugins.h" #include "vpar_pool.h" @@ -60,7 +56,7 @@ void vpar_InitPool( vpar_thread_t * p_vpar ) int j; /* Initialize mutex and cond. */ - vlc_mutex_init( &p_vpar->pool.lock ); + vlc_mutex_init( p_vpar->p_fifo, &p_vpar->pool.lock ); vlc_cond_init( &p_vpar->pool.wait_empty ); vlc_cond_init( &p_vpar->pool.wait_undecoded ); @@ -75,17 +71,19 @@ void vpar_InitPool( vpar_thread_t * p_vpar ) /* Initialize fake video decoder structure (used when * decoder == parser). */ - if ( (p_vpar->pool.p_vdec = - (vdec_thread_t *)malloc( sizeof(vdec_thread_t) )) == NULL ) + p_vpar->pool.p_vdec = vlc_object_create( p_vpar->p_fifo, + sizeof(vdec_thread_t) ); + if ( p_vpar->pool.p_vdec == NULL ) { - intf_ErrMsg("vdec error: not enough memory for vdec_CreateThread() to create the new thread"); + msg_Err( p_vpar->p_fifo, "out of memory" ); p_vpar->p_fifo->b_error = 1; return; } - p_vpar->pool.p_vdec->b_die = 0; p_vpar->pool.p_vdec->p_pool = &p_vpar->pool; vdec_InitThread( p_vpar->pool.p_vdec ); + vlc_object_attach( p_vpar->pool.p_vdec, p_vpar->p_fifo ); + for( j = 0; j < 12; j++ ) { p_vpar->pool.mb.p_idcts[j].pi_block = @@ -107,7 +105,7 @@ void vpar_SpawnPool( vpar_thread_t * p_vpar ) int i_new_smp; stream_ctrl_t * p_control; - p_control = p_vpar->p_config->p_stream_ctrl; + p_control = p_vpar->p_fifo->p_stream_ctrl; vlc_mutex_lock( &p_control->control_lock ); i_new_smp = p_control->i_smp; vlc_mutex_unlock( &p_control->control_lock ); @@ -127,6 +125,7 @@ void vpar_SpawnPool( vpar_thread_t * p_vpar ) { int j; + vlc_object_unlink_all( p_vpar->pool.pp_vdec[i] ); vdec_DestroyThread( p_vpar->pool.pp_vdec[i] ); for( j = 0; j < 12; j++ ) @@ -173,6 +172,7 @@ void vpar_SpawnPool( vpar_thread_t * p_vpar ) } p_vpar->pool.pp_vdec[i] = vdec_CreateThread( &p_vpar->pool ); + vlc_object_attach( p_vpar->pool.pp_vdec[i], p_vpar->p_fifo ); } } @@ -218,6 +218,7 @@ void vpar_EndPool( vpar_thread_t * p_vpar ) { int j; + vlc_object_unlink_all( p_vpar->pool.pp_vdec[i] ); vdec_DestroyThread( p_vpar->pool.pp_vdec[i] ); for( j = 0; j < 12; j++ ) @@ -234,7 +235,9 @@ void vpar_EndPool( vpar_thread_t * p_vpar ) } /* Free fake video decoder (used when parser == decoder). */ + vlc_object_unlink_all( p_vpar->pool.p_vdec ); vdec_EndThread( p_vpar->pool.p_vdec ); + vlc_object_destroy( p_vpar->pool.p_vdec ); /* Destroy lock and cond. */ vlc_mutex_destroy( &p_vpar->pool.lock ); diff --git a/plugins/mpeg_vdec/vpar_pool.h b/plugins/mpeg_vdec/vpar_pool.h index 599811aa7a..c0f922702b 100644 --- a/plugins/mpeg_vdec/vpar_pool.h +++ b/plugins/mpeg_vdec/vpar_pool.h @@ -2,7 +2,7 @@ * vpar_pool.h : video parser/video decoders communication ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: vpar_pool.h,v 1.2 2002/05/18 17:47:47 sam Exp $ + * $Id: vpar_pool.h,v 1.3 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * @@ -27,7 +27,9 @@ * This structure is used for the communication between the parser and the * decoders. *****************************************************************************/ -typedef struct vdec_pool_s +typedef struct vdec_pool_s vdec_pool_t; + +struct vdec_pool_s { /* Locks */ vlc_mutex_t lock; /* Structure data lock */ @@ -60,17 +62,15 @@ typedef struct vdec_pool_s struct vdec_thread_s * p_vdec; /* Fake video decoder */ /* Pointers to usual pool functions */ - void (* pf_wait_pool) ( struct vdec_pool_s * ); - macroblock_t * (* pf_new_mb) ( struct vdec_pool_s * ); - void (* pf_free_mb) ( struct vdec_pool_s *, - struct macroblock_s * ); - void (* pf_decode_mb) ( struct vdec_pool_s *, - struct macroblock_s * ); + void (* pf_wait_pool) ( vdec_pool_t * ); + macroblock_t * (* pf_new_mb) ( vdec_pool_t * ); + void (* pf_free_mb) ( vdec_pool_t *, macroblock_t * ); + void (* pf_decode_mb) ( vdec_pool_t *, macroblock_t * ); /* Pointer to the decoding function - used for B&W switching */ void (* pf_vdec_decode) ( struct vdec_thread_s *, - struct macroblock_s * ); - boolean_t b_bw; /* Current value for B&W */ + macroblock_t * ); + vlc_bool_t b_bw; /* Current value for B&W */ /* Access to the plug-ins needed by the video decoder thread */ void ( * pf_idct_init ) ( void ** ); @@ -78,20 +78,20 @@ typedef struct vdec_pool_s int, int ); struct vpar_thread_s * p_vpar; -} vdec_pool_t; +}; /***************************************************************************** * Prototypes *****************************************************************************/ -void vpar_InitPool( struct vpar_thread_s * ); -void vpar_SpawnPool( struct vpar_thread_s * ); -void vpar_EndPool( struct vpar_thread_s * ); +void vpar_InitPool ( struct vpar_thread_s * ); +void vpar_SpawnPool ( struct vpar_thread_s * ); +void vpar_EndPool ( struct vpar_thread_s * ); /***************************************************************************** * vpar_GetMacroblock: In a vdec thread, get the next available macroblock *****************************************************************************/ static inline macroblock_t * vpar_GetMacroblock( vdec_pool_t * p_pool, - boolean_t * pb_die ) + volatile vlc_bool_t * pb_die ) { macroblock_t * p_mb; diff --git a/plugins/mpeg_vdec/vpar_synchro.c b/plugins/mpeg_vdec/vpar_synchro.c index 6f97a4f70b..e0a437e7db 100644 --- a/plugins/mpeg_vdec/vpar_synchro.c +++ b/plugins/mpeg_vdec/vpar_synchro.c @@ -2,7 +2,7 @@ * vpar_synchro.c : frame dropping routines ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: vpar_synchro.c,v 1.9 2002/04/23 14:16:20 sam Exp $ + * $Id: vpar_synchro.c,v 1.10 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * Samuel Hocevar @@ -97,13 +97,9 @@ #include /* free() */ #include /* memcpy(), memset() */ -#include - -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" +#include +#include +#include #include "vdec_ext-plugins.h" #include "vpar_pool.h" @@ -112,7 +108,7 @@ /* * Local prototypes */ -static int SynchroType( void ); +static int SynchroType( vlc_object_t * ); /* Error margins */ #define DELTA (int)(0.075*CLOCK_FREQ) @@ -125,7 +121,7 @@ static int SynchroType( void ); *****************************************************************************/ void vpar_SynchroInit( vpar_thread_t * p_vpar ) { - p_vpar->synchro.i_type = SynchroType(); + p_vpar->synchro.i_type = SynchroType( p_vpar->p_fifo->p_this ); /* We use a fake stream pattern, which is often right. */ p_vpar->synchro.i_n_p = p_vpar->synchro.i_eta_p = DEFAULT_NB_P; @@ -143,8 +139,8 @@ void vpar_SynchroInit( vpar_thread_t * p_vpar ) /***************************************************************************** * vpar_SynchroChoose : Decide whether we will decode a picture or not *****************************************************************************/ -boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type, - int i_structure ) +vlc_bool_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type, + int i_structure ) { /* For clarity reasons, we separated the special synchros code from the * mathematical synchro */ @@ -206,7 +202,7 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type, /* VPAR_SYNCHRO_DEFAULT */ mtime_t now, period, tau_yuv; mtime_t pts = 0; - boolean_t b_decode = 0; + vlc_bool_t b_decode = 0; now = mdate(); period = 1000000 * 1001 / p_vpar->sequence.i_frame_rate @@ -243,8 +239,8 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type, b_decode = (pts - now) > (TAU_PRIME(I_CODING_TYPE) + DELTA); } if( !b_decode ) - intf_WarnMsg( 1, "vpar synchro warning: trashing I (%lld)", - pts - now); + msg_Warn( p_vpar->p_fifo, + "synchro trashing I (%lld)", pts - now ); break; case P_CODING_TYPE: @@ -380,16 +376,16 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, if( p_vpar->synchro.i_eta_p && p_vpar->synchro.i_eta_p != p_vpar->synchro.i_n_p ) { - intf_WarnMsg( 3, "vpar info: stream periodicity changed " - "from P[%d] to P[%d]", - p_vpar->synchro.i_n_p, p_vpar->synchro.i_eta_p ); + msg_Warn( p_vpar->p_fifo, + "stream periodicity changed from P[%d] to P[%d]", + p_vpar->synchro.i_n_p, p_vpar->synchro.i_eta_p ); p_vpar->synchro.i_n_p = p_vpar->synchro.i_eta_p; } p_vpar->synchro.i_eta_p = p_vpar->synchro.i_eta_b = 0; - if( p_main->b_stats && p_vpar->synchro.i_type == VPAR_SYNCHRO_DEFAULT ) + if( p_vpar->synchro.i_type == VPAR_SYNCHRO_DEFAULT ) { - intf_Msg( "vpar synchro stats: I(%lld) P(%lld)[%d] B(%lld)[%d] YUV(%lld) : trashed %d:%d/%d", + msg_Dbg( p_vpar->p_fifo, "I(%lld) P(%lld)[%d] B(%lld)[%d] YUV(%lld) : trashed %d:%d/%d", p_vpar->synchro.p_tau[I_CODING_TYPE], p_vpar->synchro.p_tau[P_CODING_TYPE], p_vpar->synchro.i_n_p, @@ -410,9 +406,9 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, if( p_vpar->synchro.i_eta_b && p_vpar->synchro.i_eta_b != p_vpar->synchro.i_n_b ) { - intf_WarnMsg( 3, "vpar info: stream periodicity changed " - "from B[%d] to B[%d]", - p_vpar->synchro.i_n_b, p_vpar->synchro.i_eta_b ); + msg_Warn( p_vpar->p_fifo, + "stream periodicity changed from B[%d] to B[%d]", + p_vpar->synchro.i_n_b, p_vpar->synchro.i_eta_b ); p_vpar->synchro.i_n_b = p_vpar->synchro.i_eta_b; } p_vpar->synchro.i_eta_b = 0; @@ -440,10 +436,10 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, || p_vpar->synchro.current_pts - p_vpar->sequence.next_pts > PTS_THRESHOLD ) { - intf_WarnMsg( 2, - "vpar synchro warning: pts != current_date (%lld)", - p_vpar->synchro.current_pts - - p_vpar->sequence.next_pts ); + msg_Warn( p_vpar->p_fifo, + "vpar synchro warning: pts != current_date (%lld)", + p_vpar->synchro.current_pts + - p_vpar->sequence.next_pts ); } p_vpar->synchro.current_pts = p_vpar->sequence.next_pts; p_vpar->sequence.next_pts = 0; @@ -462,19 +458,19 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, || p_vpar->synchro.backward_pts - p_vpar->sequence.next_dts > PTS_THRESHOLD) ) { - intf_WarnMsg( 2, - "vpar synchro warning: backward_pts != dts (%lld)", - p_vpar->sequence.next_dts - - p_vpar->synchro.backward_pts ); + msg_Warn( p_vpar->p_fifo, "backward_pts != dts (%lld)", + p_vpar->sequence.next_dts + - p_vpar->synchro.backward_pts ); } if( p_vpar->synchro.backward_pts - p_vpar->synchro.current_pts > PTS_THRESHOLD || p_vpar->synchro.current_pts - p_vpar->synchro.backward_pts > PTS_THRESHOLD ) { - intf_WarnMsg( 2, - "vpar synchro warning: backward_pts != current_pts (%lld)", - p_vpar->synchro.current_pts - p_vpar->synchro.backward_pts ); + msg_Warn( p_vpar->p_fifo, + "backward_pts != current_pts (%lld)", + p_vpar->synchro.current_pts + - p_vpar->synchro.backward_pts ); } p_vpar->synchro.current_pts = p_vpar->synchro.backward_pts; p_vpar->synchro.backward_pts = 0; @@ -486,10 +482,9 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, || p_vpar->synchro.current_pts - p_vpar->sequence.next_dts > PTS_THRESHOLD ) { - intf_WarnMsg( 2, - "vpar synchro warning: dts != current_pts (%lld)", - p_vpar->synchro.current_pts - - p_vpar->sequence.next_dts ); + msg_Warn( p_vpar->p_fifo, "dts != current_pts (%lld)", + p_vpar->synchro.current_pts + - p_vpar->sequence.next_dts ); } /* By definition of a DTS. */ p_vpar->synchro.current_pts = p_vpar->sequence.next_dts; @@ -511,8 +506,8 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, { /* We cannot be _that_ late, something must have happened, reinit * the dates. */ - intf_WarnMsg( 2, "PTS << now (%lld), resetting", - now - p_vpar->synchro.current_pts - DEFAULT_PTS_DELAY ); + msg_Warn( p_vpar->p_fifo, "PTS << now (%lld), resetting", + now - p_vpar->synchro.current_pts - DEFAULT_PTS_DELAY ); p_vpar->synchro.current_pts = now + DEFAULT_PTS_DELAY; } if( p_vpar->synchro.backward_pts @@ -531,10 +526,10 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, ***************************************************************************** * This function is called at initialization. *****************************************************************************/ -static int SynchroType( void ) +static int SynchroType( vlc_object_t *p_this ) { char psz_synchro_tmp[5]; - char * psz_synchro = config_GetPszVariable( "vpar-synchro" ); + char * psz_synchro = config_GetPsz( p_this, "vpar-synchro" ); if( psz_synchro == NULL ) { diff --git a/plugins/network/ipv4.c b/plugins/network/ipv4.c index e2429f31b3..7c1b76c2df 100644 --- a/plugins/network/ipv4.c +++ b/plugins/network/ipv4.c @@ -2,7 +2,7 @@ * ipv4.c: IPv4 network abstraction layer ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: ipv4.c,v 1.12 2002/05/04 15:49:56 sam Exp $ + * $Id: ipv4.c,v 1.13 2002/06/01 12:32:00 sam Exp $ * * Authors: Christophe Massiot * Mathias Kretschmer @@ -32,7 +32,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H # include @@ -65,7 +65,7 @@ * Local prototypes *****************************************************************************/ static void getfunctions( function_list_t * ); -static int NetworkOpen( struct network_socket_s * ); +static int NetworkOpen( vlc_object_t *, network_socket_t * ); /***************************************************************************** * Build configuration tree. @@ -76,7 +76,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("IPv4 network abstraction layer") ) ADD_CAPABILITY( NETWORK, 50 ) - ADD_SHORTCUT( "ipv4" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -126,7 +125,7 @@ static int BuildAddr( struct sockaddr_in * p_socket, /* We have a fqdn, try to find its address */ if ( (p_hostent = gethostbyname( psz_address )) == NULL ) { - intf_ErrMsg( "BuildLocalAddr: unknown host %s", psz_address ); +//X intf_ErrMsg( "BuildLocalAddr: unknown host %s", psz_address ); return( -1 ); } @@ -151,7 +150,7 @@ static int BuildAddr( struct sockaddr_in * p_socket, * Its use leads to great confusion and is currently discouraged. * This function returns -1 in case of error. *****************************************************************************/ -static int OpenUDP( network_socket_t * p_socket ) +static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket ) { char * psz_bind_addr = p_socket->psz_bind_addr; int i_bind_port = p_socket->i_bind_port; @@ -166,14 +165,14 @@ static int OpenUDP( network_socket_t * p_socket ) if( i_bind_port == 0 ) { - i_bind_port = config_GetIntVariable( "server-port" ); + i_bind_port = config_GetInt( p_this, "server-port" ); } /* Open a SOCK_DGRAM (UDP) socket, in the AF_INET domain, automatic (0) * protocol */ if( (i_handle = socket( AF_INET, SOCK_DGRAM, 0 )) == -1 ) { - intf_ErrMsg( "ipv4 error: cannot create socket (%s)", strerror(errno) ); + msg_Err( p_this, "cannot create socket (%s)", strerror(errno) ); return( -1 ); } @@ -182,8 +181,8 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, SOL_SOCKET, SO_REUSEADDR, (void *) &i_opt, sizeof( i_opt ) ) == -1 ) { - intf_ErrMsg( "ipv4 error: cannot configure socket (SO_REUSEADDR: %s)", - strerror(errno)); + msg_Err( p_this, "cannot configure socket (SO_REUSEADDR: %s)", + strerror(errno)); close( i_handle ); return( -1 ); } @@ -194,9 +193,8 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, SOL_SOCKET, SO_RCVBUF, (void *) &i_opt, sizeof( i_opt ) ) == -1 ) { - intf_WarnMsg( 1, - "ipv4 warning: cannot configure socket (SO_RCVBUF: %s)", - strerror(errno)); + msg_Warn( p_this, "cannot configure socket (SO_RCVBUF: %s)", + strerror(errno)); } /* Check if we really got what we have asked for, because Linux, etc. @@ -207,13 +205,13 @@ static int OpenUDP( network_socket_t * p_socket ) if( getsockopt( i_handle, SOL_SOCKET, SO_RCVBUF, (void*) &i_opt, &i_opt_size ) == -1 ) { - intf_WarnMsg( 1, "ipv4 warning: cannot query socket (SO_RCVBUF: %s)", - strerror(errno)); + msg_Warn( p_this, "cannot query socket (SO_RCVBUF: %s)", + strerror(errno) ); } else if( i_opt < 0x80000 ) { - intf_WarnMsg( 1, "ipv4 warning: socket buffer size is 0x%x" - " instead of 0x%x", i_opt, 0x80000 ); + msg_Warn( p_this, "socket buffer size is 0x%x instead of 0x%x", + i_opt, 0x80000 ); } @@ -241,7 +239,7 @@ static int OpenUDP( network_socket_t * p_socket ) /* Bind it */ if( bind( i_handle, (struct sockaddr *)&sock, sizeof( sock ) ) < 0 ) { - intf_ErrMsg( "ipv4 error: cannot bind socket (%s)", strerror(errno) ); + msg_Err( p_this, "cannot bind socket (%s)", strerror(errno) ); close( i_handle ); return( -1 ); } @@ -253,9 +251,8 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, SOL_SOCKET, SO_BROADCAST, (void*) &i_opt, sizeof( i_opt ) ) == -1 ) { - intf_WarnMsg( 1, - "ipv4 warning: cannot configure socket (SO_BROADCAST: %s)", - strerror(errno)); + msg_Warn( p_this, "cannot configure socket (SO_BROADCAST: %s)", + strerror(errno) ); } } @@ -280,8 +277,8 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&imr, sizeof(struct ip_mreq) ) == -1 ) { - intf_ErrMsg( "ipv4 error: failed to join IP multicast group (%s)", - strerror(errno) ); + msg_Err( p_this, "failed to join IP multicast group (%s)", + strerror(errno) ); close( i_handle ); return( -1 ); } @@ -292,7 +289,7 @@ static int OpenUDP( network_socket_t * p_socket ) /* Build socket for remote connection */ if ( BuildAddr( &sock, psz_server_addr, i_server_port ) == -1 ) { - intf_ErrMsg( "ipv4 error: cannot build remote address" ); + msg_Err( p_this, "cannot build remote address" ); close( i_handle ); return( -1 ); } @@ -301,8 +298,7 @@ static int OpenUDP( network_socket_t * p_socket ) if( connect( i_handle, (struct sockaddr *) &sock, sizeof( sock ) ) == (-1) ) { - intf_ErrMsg( "ipv4 error: cannot connect socket (%s)", - strerror(errno) ); + msg_Err( p_this, "cannot connect socket (%s)", strerror(errno) ); close( i_handle ); return( -1 ); } @@ -321,7 +317,7 @@ static int OpenUDP( network_socket_t * p_socket ) * Other parameters are ignored. * This function returns -1 in case of error. *****************************************************************************/ -static int OpenTCP( network_socket_t * p_socket ) +static int OpenTCP( vlc_object_t * p_this, network_socket_t * p_socket ) { char * psz_server_addr = p_socket->psz_server_addr; int i_server_port = p_socket->i_server_port; @@ -338,7 +334,7 @@ static int OpenTCP( network_socket_t * p_socket ) * protocol */ if( (i_handle = socket( AF_INET, SOCK_STREAM, 0 )) == -1 ) { - intf_ErrMsg( "ipv4 error: cannot create socket (%s)", strerror(errno) ); + msg_Err( p_this, "cannot create socket (%s)", strerror(errno) ); return( -1 ); } @@ -353,8 +349,7 @@ static int OpenTCP( network_socket_t * p_socket ) if( connect( i_handle, (struct sockaddr *) &sock, sizeof( sock ) ) == (-1) ) { - intf_ErrMsg( "ipv4 error: cannot connect socket (%s)", - strerror(errno) ); + msg_Err( p_this, "cannot connect socket (%s)", strerror(errno) ); close( i_handle ); return( -1 ); } @@ -368,14 +363,14 @@ static int OpenTCP( network_socket_t * p_socket ) /***************************************************************************** * NetworkOpen: wrapper around OpenUDP and OpenTCP *****************************************************************************/ -static int NetworkOpen( network_socket_t * p_socket ) +static int NetworkOpen( vlc_object_t * p_this, network_socket_t * p_socket ) { if( p_socket->i_type == NETWORK_UDP ) { - return OpenUDP( p_socket ); + return OpenUDP( p_this, p_socket ); } else { - return OpenTCP( p_socket ); + return OpenTCP( p_this, p_socket ); } } diff --git a/plugins/network/ipv6.c b/plugins/network/ipv6.c index 135fe411e4..de178fd293 100644 --- a/plugins/network/ipv6.c +++ b/plugins/network/ipv6.c @@ -2,7 +2,7 @@ * ipv6.c: IPv6 network abstraction layer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: ipv6.c,v 1.8 2002/05/21 06:55:48 gbazin Exp $ + * $Id: ipv6.c,v 1.9 2002/06/01 12:32:00 sam Exp $ * * Authors: Alexis Guillard * Christophe Massiot @@ -32,7 +32,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H # include @@ -66,7 +66,7 @@ static const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}}; * Local prototypes *****************************************************************************/ static void getfunctions( function_list_t * ); -static int NetworkOpen( struct network_socket_s * ); +static int NetworkOpen( network_socket_t * ); /***************************************************************************** * Build configuration tree. @@ -77,7 +77,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("IPv6 network abstraction layer") ) ADD_CAPABILITY( NETWORK, 40 ) - ADD_SHORTCUT( "ipv6" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -174,7 +173,7 @@ static int BuildAddr( struct sockaddr_in6 * p_socket, /* We have a fqdn, try to find its address */ if ( (p_hostent = gethostbyname2( psz_address, AF_INET6 )) == NULL ) { - intf_ErrMsg( "ipv6 error: unknown host %s", psz_address ); +//X intf_ErrMsg( "ipv6 error: unknown host %s", psz_address ); return( -1 ); } @@ -194,7 +193,7 @@ static int BuildAddr( struct sockaddr_in6 * p_socket, _freeaddrinfo( res ); #else - intf_ErrMsg( "ipv6 error: IPv6 address %s is invalid", psz_address ); +//X intf_ErrMsg( "ipv6 error: IPv6 address %s is invalid", psz_address ); return( -1 ); #endif } @@ -231,14 +230,14 @@ static int OpenUDP( network_socket_t * p_socket ) if( i_bind_port == 0 ) { - i_bind_port = config_GetIntVariable( "server-port" ); +//X i_bind_port = config_GetInt( "server-port" ); } /* Open a SOCK_DGRAM (UDP) socket, in the AF_INET6 domain, automatic (0) * protocol */ if( (i_handle = socket( AF_INET6, SOCK_DGRAM, 0 )) == -1 ) { - intf_ErrMsg( "ipv6 error: cannot create socket (%s)", strerror(errno) ); +//X intf_ErrMsg( "ipv6 error: cannot create socket (%s)", strerror(errno) ); return( -1 ); } @@ -247,7 +246,7 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, SOL_SOCKET, SO_REUSEADDR, (void *) &i_opt, sizeof( i_opt ) ) == -1 ) { - intf_ErrMsg( "ipv6 error: cannot configure socket (SO_REUSEADDR: %s)", +//X intf_ErrMsg( "ipv6 error: cannot configure socket (SO_REUSEADDR: %s)", strerror(errno)); close( i_handle ); return( -1 ); @@ -259,7 +258,7 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, SOL_SOCKET, SO_RCVBUF, (void *) &i_opt, sizeof( i_opt ) ) == -1 ) { - intf_WarnMsg( 1, +//X intf_WarnMsg( 1, "ipv6 warning: cannot configure socket (SO_RCVBUF: %s)", strerror(errno)); } @@ -272,12 +271,12 @@ static int OpenUDP( network_socket_t * p_socket ) if( getsockopt( i_handle, SOL_SOCKET, SO_RCVBUF, (void*) &i_opt, &i_opt_size ) == -1 ) { - intf_WarnMsg( 1, "ipv6 warning: cannot query socket (SO_RCVBUF: %s)", - strerror(errno)); +//X intf_WarnMsg( 1, "ipv6 warning: cannot query socket (SO_RCVBUF: %s)", +//X strerror(errno)); } else if( i_opt < 0x80000 ) { - intf_WarnMsg( 1, "ipv6 warning: socket buffer size is 0x%x" +//X intf_WarnMsg( 1, "ipv6 warning: socket buffer size is 0x%x" " instead of 0x%x", i_opt, 0x80000 ); } @@ -291,7 +290,7 @@ static int OpenUDP( network_socket_t * p_socket ) /* Bind it */ if( bind( i_handle, (struct sockaddr *)&sock, sizeof( sock ) ) < 0 ) { - intf_ErrMsg( "ipv6 error: cannot bind socket (%s)", strerror(errno) ); +//X intf_ErrMsg( "ipv6 error: cannot bind socket (%s)", strerror(errno) ); close( i_handle ); return( -1 ); } @@ -303,9 +302,9 @@ static int OpenUDP( network_socket_t * p_socket ) if( setsockopt( i_handle, SOL_SOCKET, SO_BROADCAST, (void*) &i_opt, sizeof( i_opt ) ) == -1 ) { - intf_WarnMsg( 1, - "ipv6 warning: cannot configure socket (SO_BROADCAST: %s)", - strerror(errno)); +//X intf_WarnMsg( 1, +//X "ipv6 warning: cannot configure socket (SO_BROADCAST: %s)", +//X strerror(errno)); } } @@ -317,7 +316,7 @@ static int OpenUDP( network_socket_t * p_socket ) /* Build socket for remote connection */ if ( BuildAddr( &sock, psz_server_addr, i_server_port ) == -1 ) { - intf_ErrMsg( "ipv6 error: cannot build remote address" ); +//X intf_ErrMsg( "ipv6 error: cannot build remote address" ); close( i_handle ); return( -1 ); } @@ -326,8 +325,8 @@ static int OpenUDP( network_socket_t * p_socket ) if( connect( i_handle, (struct sockaddr *) &sock, sizeof( sock ) ) == (-1) ) { - intf_ErrMsg( "ipv6 error: cannot connect socket (%s)", - strerror(errno) ); +//X intf_ErrMsg( "ipv6 error: cannot connect socket (%s)", +//X strerror(errno) ); close( i_handle ); return( -1 ); } @@ -363,7 +362,7 @@ static int OpenTCP( network_socket_t * p_socket ) * protocol */ if( (i_handle = socket( AF_INET6, SOCK_STREAM, 0 )) == -1 ) { - intf_ErrMsg( "ipv6 error: cannot create socket (%s)", strerror(errno) ); +//X intf_ErrMsg( "ipv6 error: cannot create socket (%s)", strerror(errno) ); return( -1 ); } @@ -378,7 +377,7 @@ static int OpenTCP( network_socket_t * p_socket ) if( connect( i_handle, (struct sockaddr *) &sock, sizeof( sock ) ) == (-1) ) { - intf_ErrMsg( "ipv6 error: cannot connect socket (%s)", +//X intf_ErrMsg( "ipv6 error: cannot connect socket (%s)", strerror(errno) ); close( i_handle ); return( -1 ); diff --git a/plugins/qnx/aout_qnx.c b/plugins/qnx/aout_qnx.c index 8a892ee829..13c9fce064 100644 --- a/plugins/qnx/aout_qnx.c +++ b/plugins/qnx/aout_qnx.c @@ -26,21 +26,19 @@ *****************************************************************************/ #include /* ENOMEM */ #include /* strerror() */ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ -#include - -#include +#include +#include -#include "audio_output.h" /* aout_thread_t */ +#include -typedef struct aout_sys_s +struct aout_sys_s { snd_pcm_t * p_pcm_handle; int i_card; int i_device; -} aout_sys_t; +}; /***************************************************************************** * Local prototypes @@ -78,8 +76,7 @@ static int aout_Open( aout_thread_t *p_aout ) p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg( "aout error: unable to allocate memory (%s)", - strerror( ENOMEM ) ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -89,8 +86,8 @@ static int aout_Open( aout_thread_t *p_aout ) &p_aout->p_sys->i_device, SND_PCM_OPEN_PLAYBACK ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to open audio device (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to open audio device (%s)", + snd_strerror( i_ret ) ); free( p_aout->p_sys ); return( 1 ); } @@ -99,8 +96,7 @@ static int aout_Open( aout_thread_t *p_aout ) if( ( i_ret = snd_pcm_plugin_set_disable( p_aout->p_sys->p_pcm_handle, PLUGIN_DISABLE_MMAP ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to disable mmap (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to disable mmap (%s)", snd_strerror(i_ret) ); aout_Close( p_aout ); free( p_aout->p_sys ); return( 1 ); @@ -130,8 +126,8 @@ static int aout_SetFormat( aout_thread_t *p_aout ) if( ( i_ret = snd_pcm_plugin_info( p_aout->p_sys->p_pcm_handle, &pi ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to get plugin info (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to get plugin info (%s)", + snd_strerror( i_ret ) ); return( 1 ); } @@ -168,8 +164,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) if( ( i_ret = snd_pcm_plugin_params( p_aout->p_sys->p_pcm_handle, &pp ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to set parameters (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to set parameters (%s)", snd_strerror(i_ret) ); return( 1 ); } @@ -177,8 +172,8 @@ static int aout_SetFormat( aout_thread_t *p_aout ) if( ( i_ret = snd_pcm_plugin_prepare( p_aout->p_sys->p_pcm_handle, SND_PCM_CHANNEL_PLAYBACK ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to prepare channel (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to prepare channel (%s)", + snd_strerror( i_ret ) ); return( 1 ); } @@ -203,8 +198,8 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) if( ( i_ret = snd_pcm_plugin_status( p_aout->p_sys->p_pcm_handle, &status ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to get device status (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to get device status (%s)", + snd_strerror( i_ret ) ); return( -1 ); } @@ -216,8 +211,8 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) if( ( i_ret = snd_pcm_plugin_prepare( p_aout->p_sys->p_pcm_handle, SND_PCM_CHANNEL_PLAYBACK ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to prepare channel (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to prepare channel (%s)", + snd_strerror( i_ret ) ); } break; } @@ -238,8 +233,7 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) (void *) buffer, (size_t) i_size ) ) <= 0 ) { - intf_ErrMsg( "aout error: unable to write data (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to write data (%s)", snd_strerror(i_ret) ); } } @@ -252,8 +246,8 @@ static void aout_Close( aout_thread_t *p_aout ) if( ( i_ret = snd_pcm_close( p_aout->p_sys->p_pcm_handle ) ) < 0 ) { - intf_ErrMsg( "aout error: unable to close audio device (%s)", - snd_strerror( i_ret ) ); + msg_Err( p_aout, "unable to close audio device (%s)", + snd_strerror( i_ret ) ); } free( p_aout->p_sys ); diff --git a/plugins/qnx/qnx.c b/plugins/qnx/qnx.c index faabc79be5..2f679ed4a5 100644 --- a/plugins/qnx/qnx.c +++ b/plugins/qnx/qnx.c @@ -26,10 +26,7 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include /***************************************************************************** * Capabilities defined in the other files. @@ -47,7 +44,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("QNX RTOS module") ) ADD_CAPABILITY( VOUT, 100 ) ADD_CAPABILITY( AOUT, 50 ) - ADD_SHORTCUT( "qnx" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/qnx/vout_qnx.c b/plugins/qnx/vout_qnx.c index a55c420fb5..a33298aa68 100644 --- a/plugins/qnx/vout_qnx.c +++ b/plugins/qnx/vout_qnx.c @@ -33,12 +33,9 @@ #include #include -#include - -#include "video.h" -#include "video_output.h" - -#include "interface.h" +#include +#include +#include /***************************************************************************** * vout_sys_t: video output QNX method descriptor @@ -55,7 +52,7 @@ #define MODE_VIDEO_MEM 2 #define MODE_VIDEO_OVERLAY 3 -typedef struct vout_sys_s +struct vout_sys_s { /* video mode */ int i_mode; @@ -87,7 +84,7 @@ typedef struct vout_sys_s PhDim_t old_dim; PhDim_t screen_dim; PhRect_t frame; -} vout_sys_t; +}; /***************************************************************************** @@ -96,7 +93,7 @@ typedef struct vout_sys_s * This structure is part of the picture descriptor, it describes the * XVideo specific properties of a direct buffer. *****************************************************************************/ -typedef struct picture_sys_s +struct picture_sys_s { /* [shared] memory blit */ PhImage_t * p_image; @@ -104,24 +101,23 @@ typedef struct picture_sys_s /* video memory blit and video overlay */ PdOffscreenContext_t * p_ctx[3]; /* 0: y, 1: u, 2: v */ char * p_buf[3]; - -} picture_sys_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -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 * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); static void vout_Render ( vout_thread_t *, picture_t * ); static void vout_Display ( vout_thread_t *, picture_t * ); -static int QNXInitDisplay ( struct vout_thread_s * ); -static int QNXCreateWnd ( struct vout_thread_s * ); -static int QNXDestroyWnd ( struct vout_thread_s * ); +static int QNXInitDisplay ( vout_thread_t * ); +static int QNXCreateWnd ( vout_thread_t * ); +static int QNXDestroyWnd ( vout_thread_t * ); static int NewPicture ( vout_thread_t *, picture_t *, int ); static void FreePicture ( vout_thread_t *, picture_t * ); @@ -155,7 +151,7 @@ static int vout_Create( vout_thread_t *p_vout ) /* init connection to photon */ if( PtInit( "/dev/photon" ) != 0 ) { - intf_ErrMsg( "vout error: unable to connect to photon" ); + msg_Err( p_vout, "unable to connect to photon" ); return( 1 ); } @@ -163,17 +159,15 @@ 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( "vout error: %s", strerror( ENOMEM ) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) ); - p_vout->b_fullscreen = - config_GetIntVariable( "fullscreen" ); - p_vout->p_sys->i_mode = - config_GetIntVariable( "overlay" ) ? - MODE_NORMAL_OVERLAY : MODE_VIDEO_MEM; + p_vout->b_fullscreen = config_GetInt( p_vout, "fullscreen" ); + p_vout->p_sys->i_mode = config_GetInt( p_vout, "overlay" ) ? + MODE_NORMAL_OVERLAY : MODE_VIDEO_MEM; p_vout->p_sys->dim.w = p_vout->i_window_width; p_vout->p_sys->dim.h = p_vout->i_window_height; @@ -309,9 +303,9 @@ static void vout_Destroy( vout_thread_t *p_vout ) *****************************************************************************/ static int vout_Manage( vout_thread_t *p_vout ) { - int i_ev, i_buflen; + int i_ev, i_buflen; PhEvent_t *p_event; - boolean_t b_repos = 0; + vlc_bool_t b_repos = 0; if (p_vout->b_die == 1) { @@ -322,7 +316,7 @@ static int vout_Manage( vout_thread_t *p_vout ) i_buflen = sizeof( PhEvent_t ) * 4; if( ( p_event = malloc( i_buflen ) ) == NULL ) { - intf_ErrMsg( "vout error: %s", strerror( ENOMEM ) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -337,7 +331,7 @@ static int vout_Manage( vout_thread_t *p_vout ) i_buflen = PhGetMsgSize( p_event ); if( ( p_event = realloc( p_event, i_buflen ) ) == NULL ) { - intf_ErrMsg( "vout error: %s", strerror( ENOMEM ) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } } @@ -352,7 +346,7 @@ static int vout_Manage( vout_thread_t *p_vout ) switch( p_ev->event_f ) { case Ph_WM_CLOSE: - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; case Ph_WM_MOVE: @@ -382,7 +376,7 @@ static int vout_Manage( vout_thread_t *p_vout ) { case Pk_q: case Pk_Q: - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; case Pk_f: @@ -473,14 +467,14 @@ static int vout_Manage( vout_thread_t *p_vout ) vout_End( p_vout ); if( vout_Init( p_vout ) ) { - intf_ErrMsg( "vout error: cannot resize display" ); + msg_Err( p_vout, "cannot resize display" ); return( 1 ); } } #endif - intf_Msg( "vout: video display resized (%dx%d)", - p_vout->p_sys->dim.w, p_vout->p_sys->dim.h ); + msg_Dbg( p_vout, "video display resized (%dx%d)", + p_vout->p_sys->dim.w, p_vout->p_sys->dim.h ); } /* @@ -536,7 +530,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) /***************************************************************************** * QNXInitDisplay: check screen resolution, depth, amount of video ram, etc *****************************************************************************/ -static int QNXInitDisplay( p_vout_thread_t p_vout ) +static int QNXInitDisplay( vout_thread_t * p_vout ) { PgHWCaps_t hwcaps; PgDisplaySettings_t cfg; @@ -545,21 +539,21 @@ static int QNXInitDisplay( p_vout_thread_t p_vout ) /* get graphics card hw capabilities */ if( PgGetGraphicsHWCaps( &hwcaps ) != 0 ) { - intf_ErrMsg( "vout error: unable to get gfx card capabilities" ); + msg_Err( p_vout, "unable to get gfx card capabilities" ); return( 1 ); } /* get current video mode */ if( PgGetVideoMode( &cfg ) != 0 ) { - intf_ErrMsg( "vout error: unable to get current video mode" ); + msg_Err( p_vout, "unable to get current video mode" ); return( 1 ); } /* get video mode info */ if( PgGetVideoModeInfo( cfg.mode, &minfo ) != 0 ) { - intf_ErrMsg( "vout error: unable to get info for video mode" ); + msg_Err( p_vout, "unable to get info for video mode" ); return( 1 ); } @@ -569,7 +563,7 @@ static int QNXInitDisplay( p_vout_thread_t p_vout ) if( p_vout->p_sys->i_mode == MODE_VIDEO_OVERLAY && !( minfo.mode_capabilities1 & PgVM_MODE_CAP1_VIDEO_OVERLAY ) ) { - intf_ErrMsg( "vout error: no overlay support detected" ); + msg_Err( p_vout, "no overlay support detected" ); p_vout->p_sys->i_mode = MODE_NORMAL_MEM; } @@ -581,7 +575,7 @@ static int QNXInitDisplay( p_vout_thread_t p_vout ) if( ( p_vout->p_sys->p_channel = PgCreateVideoChannel( Pg_VIDEO_CHANNEL_SCALER, 0 ) ) == NULL ) { - intf_ErrMsg( "vout error: unable to create video channel" ); + msg_Err( p_vout, "unable to create video channel" ); printf("errno = %d\n", errno); p_vout->p_sys->i_mode = MODE_NORMAL_MEM; } @@ -609,7 +603,7 @@ static int QNXInitDisplay( p_vout_thread_t p_vout ) if( p_vout->p_sys->i_vc_format == 0 ) { - intf_ErrMsg( "vout error: need YV12, YUY2 or RGB8888 overlay" ); + msg_Warn( p_vout, "need YV12, YUY2 or RGB8888 overlay" ); p_vout->p_sys->i_mode = MODE_NORMAL_MEM; } @@ -679,7 +673,7 @@ static int QNXInitDisplay( p_vout_thread_t p_vout ) /***************************************************************************** * QNXCreateWnd: create and realize the main window *****************************************************************************/ -static int QNXCreateWnd( p_vout_thread_t p_vout ) +static int QNXCreateWnd( vout_thread_t * p_vout ) { PtArg_t args[8]; PhPoint_t pos = { 0, 0 }; @@ -718,14 +712,14 @@ static int QNXCreateWnd( p_vout_thread_t p_vout ) p_vout->p_sys->p_window = PtCreateWidget( PtWindow, Pt_NO_PARENT, 7, args); if( p_vout->p_sys->p_window == NULL ) { - intf_ErrMsg( "vout error: unable to create window" ); + msg_Err( p_vout, "unable to create window" ); return( 1 ); } /* realize the window widget */ if( PtRealizeWidget( p_vout->p_sys->p_window ) != 0 ) { - intf_ErrMsg( "vout error: unable to realize window widget" ); + msg_Err( p_vout, "unable to realize window widget" ); PtDestroyWidget( p_vout->p_sys->p_window ); return( 1 ); } @@ -734,7 +728,7 @@ static int QNXCreateWnd( p_vout_thread_t p_vout ) if( PtWindowFrameSize( NULL, p_vout->p_sys->p_window, &p_vout->p_sys->frame ) != 0 ) { - intf_ErrMsg( "vout error: unable to get window frame size" ); + msg_Err( p_vout, "unable to get window frame size" ); PtDestroyWidget( p_vout->p_sys->p_window ); return( 1 ); } @@ -745,7 +739,7 @@ static int QNXCreateWnd( p_vout_thread_t p_vout ) /***************************************************************************** * QNXDestroyWnd: unrealize and destroy the main window *****************************************************************************/ -static int QNXDestroyWnd( p_vout_thread_t p_vout ) +static int QNXDestroyWnd( vout_thread_t * p_vout ) { /* destroy the window widget */ PtUnrealizeWidget( p_vout->p_sys->p_window ); @@ -786,7 +780,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index ) p_vout->p_sys->dim.w, p_vout->p_sys->dim.h, p_vout->p_sys->i_img_type, NULL, 0, p_vout->p_sys->i_mode == MODE_SHARED_MEM ) ) ) { - intf_ErrMsg( "vout error: cannot create image" ); + msg_Err( p_vout, "cannot create image" ); free( p_pic->p_sys ); return( -1 ); } @@ -816,7 +810,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index ) p_vout->p_sys->dim.w, p_vout->p_sys->dim.h, Pg_OSC_MEM_PAGE_ALIGN) ) == NULL ) { - intf_ErrMsg( "vout error: unable to create offscreen context" ); + msg_Err( p_vout, "unable to create offscreen context" ); free( p_pic->p_sys ); return( -1 ); } @@ -825,7 +819,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index ) if( ( p_pic->p_sys->p_buf[0] = PdGetOffscreenContextPtr ( p_pic->p_sys->p_ctx[0] ) ) == NULL ) { - intf_ErrMsg( "vout error: unable to get offscreen context ptr" ); + msg_Err( p_vout, "unable to get offscreen context ptr" ); PhDCRelease ( p_pic->p_sys->p_ctx[0] ); p_pic->p_sys->p_ctx[0] = NULL; free( p_pic->p_sys ); @@ -872,7 +866,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index ) p_pic->p_sys->p_buf[Y_PLANE] = PdGetOffscreenContextPtr( p_pic->p_sys->p_ctx[Y_PLANE] ); if( p_pic->p_sys->p_buf[Y_PLANE] == NULL ) { - intf_ErrMsg( "vout error: unable to get video channel ctx ptr" ); + msg_Err( p_vout, "unable to get video channel ctx ptr" ); return( 1 ); } @@ -887,7 +881,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index ) if( p_pic->p_sys->p_buf[U_PLANE] == NULL || p_pic->p_sys->p_buf[V_PLANE] == NULL ) { - intf_ErrMsg( "vout error: unable to get video channel ctx ptr" ); + msg_Err( p_vout, "unable to get video channel ctx ptr" ); return( 1 ); } @@ -921,7 +915,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index ) if( p_pic->p_sys->p_buf[U_PLANE] == NULL || p_pic->p_sys->p_buf[V_PLANE] == NULL ) { - intf_ErrMsg( "vout error: unable to get video channel ctx ptr" ); + msg_Err( p_vout, "unable to get video channel ctx ptr" ); return( 1 ); } @@ -1142,7 +1136,7 @@ static int ResizeOverlayOutput(vout_thread_t *p_vout) if( i_ret == -1 ) { - intf_ErrMsg( "vout error: unable to configure video channel" ); + msg_Err( p_vout, "unable to configure video channel" ); return( 1 ); } diff --git a/plugins/qt/intf_qt.cpp b/plugins/qt/intf_qt.cpp index 329aa41135..ad36ebdf4c 100644 --- a/plugins/qt/intf_qt.cpp +++ b/plugins/qt/intf_qt.cpp @@ -2,7 +2,7 @@ * intf_qt.cpp: Qt interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: intf_qt.cpp,v 1.13 2002/04/04 15:35:09 sam Exp $ + * $Id: intf_qt.cpp,v 1.14 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -21,9 +21,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -extern "C" -{ - /***************************************************************************** * Preamble *****************************************************************************/ @@ -32,15 +29,8 @@ extern "C" #include /* strerror() */ #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "intf_playlist.h" -#include "interface.h" - -} /* extern "C" */ +#include +#include #include #include @@ -114,8 +104,7 @@ private slots: void DateDisplay ( int ); void About ( void ); - void Unimplemented( void ) { intf_WarnMsg( 1, "intf warning: " - "unimplemented function" ); }; + void Unimplemented( void ) { msg_Warn( p_intf, "unimplemented" ); }; private: intf_thread_t *p_intf; @@ -136,12 +125,11 @@ private: /***************************************************************************** * intf_sys_t: description and status of Qt interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { QApplication *p_app; IntfWindow *p_window; - -} intf_sys_t; +}; /***************************************************************************** * Local prototypes. @@ -178,7 +166,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + msg_Err( p_intf, "out of memory" ); return( 1 ); } @@ -365,15 +353,15 @@ IntfWindow::~IntfWindow( void ) *****************************************************************************/ void IntfWindow::DateDisplay( int i_range ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { char psz_time[ OFFSETTOTIME_MAX_SIZE ]; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); - p_date->setText( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, - ( p_input_bank->pp_input[0]->stream.p_selected_area->i_size * i_range ) + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); + p_date->setText( input_OffsetToTime( p_intf->p_vlc->p_input_bank->pp_input[0], psz_time, + ( p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_size * i_range ) / SLIDER_MAX ) ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } } @@ -394,7 +382,8 @@ void IntfWindow::FileOpen( void ) } else { - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, file.latin1() ); + intf_PlaylistAdd( p_intf->p_vlc->p_playlist, + PLAYLIST_END, file.latin1() ); } } @@ -424,12 +413,14 @@ void IntfWindow::About( void ) *****************************************************************************/ void IntfWindow::Manage( void ) { + input_thread_t *p_input = vlc_object_find_input( p_intf ); + /* Manage the slider */ - if( p_input_bank->pp_input[0] != NULL && p_input_bank->pp_input[0]->stream.b_seekable ) + if( p_input != NULL && p_input->stream.b_seekable ) { int i_value = p_slider->value(); -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_input->stream.p_selected_area /* If the user hasn't touched the slider since the last time, * then the input can safely change it */ if( i_value == p_slider->oldvalue() ) @@ -445,7 +436,7 @@ void IntfWindow::Manage( void ) { off_t i_seek = ( i_value * p_area->i_size ) / SLIDER_MAX; - input_Seek( p_input_bank->pp_input[0], i_seek ); + input_Seek( p_input, i_seek, INPUT_SEEK_SET ); /* Update the old value */ p_slider->setOldValue( i_value ); @@ -453,6 +444,11 @@ void IntfWindow::Manage( void ) #undef p_area } + if( p_input != NULL ) + { + vlc_object_release( p_input ); + } + /* If the "display popup" flag has changed, popup the context menu */ if( p_intf->b_menu_change ) { @@ -460,7 +456,7 @@ void IntfWindow::Manage( void ) p_intf->b_menu_change = 0; } - if( p_intf->b_die ) + if( p_intf->p_vlc->b_die ) { qApp->quit(); } @@ -474,9 +470,9 @@ void IntfWindow::Manage( void ) *****************************************************************************/ void IntfWindow::PlaybackPlay( void ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } @@ -485,9 +481,9 @@ void IntfWindow::PlaybackPlay( void ) *****************************************************************************/ void IntfWindow::PlaybackPause( void ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); } } @@ -496,9 +492,9 @@ void IntfWindow::PlaybackPause( void ) *****************************************************************************/ void IntfWindow::PlaybackSlow( void ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); } } @@ -507,9 +503,9 @@ void IntfWindow::PlaybackSlow( void ) *****************************************************************************/ void IntfWindow::PlaybackFast( void ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); } } @@ -518,12 +514,12 @@ void IntfWindow::PlaybackFast( void ) *****************************************************************************/ void IntfWindow::PlaylistPrev( void ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* FIXME: temporary hack */ - intf_PlaylistPrev( p_main->p_playlist ); - intf_PlaylistPrev( p_main->p_playlist ); - p_input_bank->pp_input[0]->b_eof = 1; + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + intf_PlaylistPrev( p_intf->p_vlc->p_playlist ); + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } @@ -532,10 +528,10 @@ void IntfWindow::PlaylistPrev( void ) *****************************************************************************/ void IntfWindow::PlaylistNext( void ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } diff --git a/plugins/qt/qt.cpp b/plugins/qt/qt.cpp index 3716783ad7..057cd081ca 100644 --- a/plugins/qt/qt.cpp +++ b/plugins/qt/qt.cpp @@ -2,7 +2,7 @@ * qt.cpp : Qt plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: qt.cpp,v 1.10 2002/04/19 13:56:11 sam Exp $ + * $Id: qt.cpp,v 1.11 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,10 +27,10 @@ #include /* malloc(), free() */ #include +#include + extern "C" { -#include - /***************************************************************************** * Capabilities defined in the other files. *****************************************************************************/ @@ -55,7 +55,6 @@ MODULE_INIT_START ADD_CAPABILITY( INTF, 80 ) } ADD_PROGRAM( "qvlc" ) - ADD_SHORTCUT( "qt" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/satellite/input_satellite.c b/plugins/satellite/input_satellite.c index 509fa93cfa..0fa0316039 100644 --- a/plugins/satellite/input_satellite.c +++ b/plugins/satellite/input_satellite.c @@ -27,7 +27,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -42,11 +43,6 @@ # include #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "satellite_tools.h" #define SATELLITE_READ_ONCE 3 @@ -89,10 +85,10 @@ static int SatelliteOpen( input_thread_t * p_input ) int i_fd = 0; int i_freq = 0; int i_srate = 0; - boolean_t b_pol = 0; + vlc_bool_t b_pol = 0; int i_fec = 0; float f_fec = 1./2; - boolean_t b_diseqc; + vlc_bool_t b_diseqc; int i_lnb_lof1; int i_lnb_lof2; int i_lnb_slof; @@ -111,7 +107,7 @@ static int SatelliteOpen( input_thread_t * p_input ) if( *psz_next ) { psz_parser = psz_next + 1; - b_pol = (boolean_t)strtol( psz_parser, &psz_next, 10 ); + b_pol = (vlc_bool_t)strtol( psz_parser, &psz_next, 10 ); if( *psz_next ) { psz_parser = psz_next + 1; @@ -127,48 +123,44 @@ static int SatelliteOpen( input_thread_t * p_input ) if( i_freq > 12999 || i_freq < 10000 ) { - intf_WarnMsg( 1, "input: satellite: invalid frequency, using "\ - "default one" ); - i_freq = config_GetIntVariable( "frequency" ); + msg_Warn( p_input, "invalid frequency, using default one" ); + i_freq = config_GetInt( p_input, "frequency" ); if( i_freq > 12999 || i_freq < 10000 ) { - intf_ErrMsg( "input: satellite: invalid default frequency" ); + msg_Err( p_input, "invalid default frequency" ); return -1; } } if( i_srate > 30000 || i_srate < 1000 ) { - intf_WarnMsg( 1, "input: satellite: invalid symbol rate, using "\ - "default one" ); - i_srate = config_GetIntVariable( "symbol-rate" ); + msg_Warn( p_input, "invalid symbol rate, using default one" ); + i_srate = config_GetInt( p_input, "symbol-rate" ); if( i_srate > 30000 || i_srate < 1000 ) { - intf_ErrMsg( "input: satellite: invalid default symbol rate" ); + msg_Err( p_input, "invalid default symbol rate" ); return -1; } } if( b_pol && b_pol != 1 ) { - intf_WarnMsg( 1, "input: satellite: invalid polarization, using "\ - "default one" ); - b_pol = config_GetIntVariable( "polarization" ); - fprintf(stderr, "%d\n", b_pol); + msg_Warn( p_input, "invalid polarization, using default one" ); + b_pol = config_GetInt( p_input, "polarization" ); if( b_pol && b_pol != 1 ) { - intf_ErrMsg( "input: satellite: invalid default polarization" ); + msg_Err( p_input, "invalid default polarization" ); return -1; } } if( i_fec > 7 || i_fec < 1 ) { - intf_WarnMsg( 1, "input: satellite: invalid FEC, using default one " ); - i_fec = config_GetIntVariable( "fec" ); + msg_Warn( p_input, "invalid FEC, using default one" ); + i_fec = config_GetInt( p_input, "fec" ); if( i_fec > 7 || i_fec < 1 ) { - intf_ErrMsg( "input: satellite: invalid default FEC" ); + msg_Err( p_input, "invalid default FEC" ); return -1; } } @@ -207,81 +199,74 @@ static int SatelliteOpen( input_thread_t * p_input ) if( p_satellite == NULL ) { - intf_ErrMsg( "input: satellite: Out of memory" ); + msg_Err( p_input, "out of memory" ); return -1; } p_input->p_access_data = (void *)p_satellite; /* Open the DVR device */ - - intf_WarnMsg( 2, "input: opening file `%s'", DVR); + msg_Dbg( p_input, "opening DVR device `%s'", DVR ); if( (p_satellite->i_handle = open( DVR, /*O_NONBLOCK | O_LARGEFILE*/0 )) == (-1) ) { - intf_ErrMsg( "input error: cannot open file (%s)", strerror(errno) ); + msg_Warn( p_input, "cannot open `%s' (%s)", DVR, strerror(errno) ); free( p_satellite ); return -1; } /* Get antenna configuration options */ - b_diseqc = config_GetIntVariable( "diseqc" ); - i_lnb_lof1 = config_GetIntVariable( "lnb-lof1" ); - i_lnb_lof2 = config_GetIntVariable( "lnb-lof2" ); - i_lnb_slof = config_GetIntVariable( "lnb-slof" ); + b_diseqc = config_GetInt( p_input, "diseqc" ); + i_lnb_lof1 = config_GetInt( p_input, "lnb-lof1" ); + i_lnb_lof2 = config_GetInt( p_input, "lnb-lof2" ); + i_lnb_slof = config_GetInt( p_input, "lnb-slof" ); /* Initialize the Satellite Card */ - intf_WarnMsg( 2, "Initializing Sat Card with Freq: %d, Pol: %d, "\ - "FEC: %03f, Srate: %d", - i_freq, b_pol, f_fec, i_srate ); + msg_Dbg( p_input, "initializing Sat Card with Freq: %d, Pol: %d, " + "FEC: %03f, Srate: %d", i_freq, b_pol, f_fec, i_srate ); if ( ioctl_SECControl( i_freq * 1000, b_pol, i_lnb_slof * 1000, b_diseqc ) < 0 ) { - intf_ErrMsg("input: satellite: An error occured when controling SEC"); + msg_Err( p_input, "an error occured when controling SEC" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; } - intf_WarnMsg( 3, "Initializing Frontend device" ); + msg_Dbg( p_input, "initializing frontend device" ); switch (ioctl_SetQPSKFrontend ( i_freq * 1000, i_srate* 1000, f_fec, i_lnb_lof1 * 1000, i_lnb_lof2 * 1000, i_lnb_slof * 1000)) { case -2: - intf_ErrMsg( "input: satellite: Frontend returned"\ - "an unexpected event" ); + msg_Err( p_input, "frontend returned an unexpected event" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; break; case -3: - intf_ErrMsg( "input: satellite: Frontend returned"\ - "no event" ); + msg_Err( p_input, "frontend returned no event" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; break; case -4: - intf_ErrMsg( "input: satellite: Frontend: time out"\ - "when polling for event" ); + msg_Err( p_input, "frontend: timeout when polling for event" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; break; case -5: - intf_ErrMsg( "input: satellite: An error occured when polling"\ - "Frontend device" ); + msg_Err( p_input, "an error occured when polling frontend device" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; break; case -1: - intf_ErrMsg( "input: satellite: Frontend returned"\ - "a failure event" ); + msg_Err( p_input, "frontend returned a failure event" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; @@ -290,12 +275,11 @@ static int SatelliteOpen( input_thread_t * p_input ) break; } - intf_WarnMsg( 3, " Setting filter on PAT " ); + msg_Dbg( p_input, "setting filter on PAT" ); if ( ioctl_SetDMXFilter( 0, &i_fd, 3 ) < 0 ) { - intf_ErrMsg( "input: satellite: An error occured when setting"\ - "filter on PAT" ); + msg_Err( p_input, "an error occured when setting filter on PAT" ); close( p_satellite->i_handle ); free( p_satellite ); return -1; @@ -303,8 +287,7 @@ static int SatelliteOpen( input_thread_t * p_input ) if( input_InitStream( p_input, sizeof( stream_ts_data_t ) ) == -1 ) { - intf_ErrMsg( "input: satellite: Not enough memory to allow stream"\ - "structure" ); + msg_Err( p_input, "could not initialize stream structure" ); close( p_satellite->i_handle ); free( p_satellite ); return( -1 ); @@ -366,8 +349,8 @@ static ssize_t SatelliteRead( input_thread_t * p_input, byte_t * p_buffer, { if ( p_input->stream.pp_programs[i]->pp_es[0]->i_demux_fd == 0 ) { - intf_WarnMsg( 2, "input: satellite: setting filter on pmt pid %d", - p_input->stream.pp_programs[i]->pp_es[0]->i_id); + msg_Dbg( p_input, "setting filter on pmt pid %d", + p_input->stream.pp_programs[i]->pp_es[0]->i_id ); ioctl_SetDMXFilter( p_input->stream.pp_programs[i]->pp_es[0]->i_id, &p_input->stream.pp_programs[i]->pp_es[0]->i_demux_fd, 3 ); @@ -426,7 +409,7 @@ int SatelliteSetProgram( input_thread_t * p_input, { case MPEG1_VIDEO_ES: case MPEG2_VIDEO_ES: - if ( p_main->b_video ) + if ( !config_GetInt( p_input, "novideo" ) ) { ioctl_SetDMXFilter( p_es->i_id, &p_es->i_demux_fd, 1); input_SelectES( p_input , p_es ); @@ -434,7 +417,7 @@ int SatelliteSetProgram( input_thread_t * p_input, break; case MPEG1_AUDIO_ES: case MPEG2_AUDIO_ES: - if ( p_main->b_audio ) + if ( !config_GetInt( p_input, "noaudio" ) ) { ioctl_SetDMXFilter( p_es->i_id, &p_es->i_demux_fd, 2); input_SelectES( p_input , p_es ); diff --git a/plugins/satellite/satellite.c b/plugins/satellite/satellite.c index a8f6aac042..81a2a17445 100644 --- a/plugins/satellite/satellite.c +++ b/plugins/satellite/satellite.c @@ -26,7 +26,7 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -77,7 +77,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("satellite input module") ) ADD_CAPABILITY( ACCESS, 0 ) - ADD_SHORTCUT( "satellite" ) ADD_SHORTCUT( "sat" ) MODULE_INIT_STOP diff --git a/plugins/sdl/aout_sdl.c b/plugins/sdl/aout_sdl.c index f7476a3796..4db795f303 100644 --- a/plugins/sdl/aout_sdl.c +++ b/plugins/sdl/aout_sdl.c @@ -2,7 +2,7 @@ * aout_sdl.c : audio sdl functions library ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: aout_sdl.c,v 1.28 2002/05/31 21:37:42 massiot Exp $ + * $Id: aout_sdl.c,v 1.29 2002/06/01 12:32:00 sam Exp $ * * Authors: Michel Kaempf * Samuel Hocevar @@ -30,15 +30,13 @@ #include /* open(), O_WRONLY */ #include /* strerror() */ #include /* write(), close() */ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ -#include +#include +#include #include SDL_INCLUDE_FILE -#include "audio_output.h" /* aout_thread_t */ - /***************************************************************************** * aout_sys_t: dsp audio output method descriptor ***************************************************************************** @@ -49,14 +47,13 @@ /* the overflow limit is used to prevent the fifo from growing too big */ #define OVERFLOWLIMIT 100000 -typedef struct aout_sys_s +struct aout_sys_s { byte_t * audio_buf; int i_audio_end; - boolean_t b_active; - -} aout_sys_t; + vlc_bool_t b_active; +}; /***************************************************************************** * Local prototypes. @@ -103,7 +100,7 @@ static int aout_Open( aout_thread_t *p_aout ) if( p_aout->p_sys == NULL ) { - intf_ErrMsg( "aout error: %s", strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -120,7 +117,7 @@ static int aout_Open( aout_thread_t *p_aout ) #endif ) < 0 ) { - intf_ErrMsg( "aout error: can't initialize SDL (%s)", SDL_GetError() ); + msg_Err( p_aout, "cannot initialize SDL (%s)", SDL_GetError() ); free( p_aout->p_sys ); return( 1 ); } @@ -150,7 +147,7 @@ static int aout_Open( aout_thread_t *p_aout ) */ if( SDL_OpenAudio( &desired, NULL ) < 0 ) { - intf_ErrMsg( "aout error: SDL_OpenAudio failed (%s)", SDL_GetError() ); + msg_Err( p_aout, "SDL_OpenAudio failed (%s)", SDL_GetError() ); SDL_QuitSubSystem( SDL_INIT_AUDIO ); free( p_aout->p_sys ); return( -1 ); @@ -267,11 +264,11 @@ static void aout_Close( aout_thread_t *p_aout ) *****************************************************************************/ static void aout_SDLCallback( void *userdata, byte_t *stream, int len ) { - struct aout_sys_s * p_sys = userdata; + aout_sys_t * p_sys = userdata; if( p_sys->i_audio_end > OVERFLOWLIMIT ) { - intf_ErrMsg( "aout error: aout_SDLCallback overflowed" ); +//X msg_Err( p_aout, "aout_SDLCallback overflowed" ); free( p_sys->audio_buf ); p_sys->audio_buf = NULL; diff --git a/plugins/sdl/sdl.c b/plugins/sdl/sdl.c index f21f91a540..ed8c90d80f 100644 --- a/plugins/sdl/sdl.c +++ b/plugins/sdl/sdl.c @@ -2,7 +2,7 @@ * sdl.c : SDL plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: sdl.c,v 1.20 2002/04/19 13:56:11 sam Exp $ + * $Id: sdl.c,v 1.21 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * Pierre Baillet @@ -29,12 +29,7 @@ #include /* malloc(), free() */ #include -#include - -#include "audio_output.h" - -#include "video.h" -#include "video_output.h" +#include /***************************************************************************** * Capabilities defined in the other files. @@ -52,7 +47,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("Simple DirectMedia Layer module") ) ADD_CAPABILITY( AOUT, 40 ) ADD_CAPABILITY( VOUT, 100 ) - ADD_SHORTCUT( "sdl" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/sdl/vout_sdl.c b/plugins/sdl/vout_sdl.c index 9c0a19020c..cdc141dd5c 100644 --- a/plugins/sdl/vout_sdl.c +++ b/plugins/sdl/vout_sdl.c @@ -2,7 +2,7 @@ * vout_sdl.c: SDL video output display method ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: vout_sdl.c,v 1.91 2002/05/18 17:47:47 sam Exp $ + * $Id: vout_sdl.c,v 1.92 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * Pierre Baillet @@ -30,7 +30,9 @@ #include /* free() */ #include /* strerror() */ -#include +#include +#include +#include #include #ifndef WIN32 @@ -41,14 +43,6 @@ #include "netutils.h" -#include "video.h" -#include "video_output.h" - -#include "interface.h" - -#include "stream_control.h" /* needed by input_ext-intf.h... */ -#include "input_ext-intf.h" - #define SDL_MAX_DIRECTBUFFERS 10 #define SDL_DEFAULT_BPP 16 @@ -58,7 +52,7 @@ * This structure is part of the video output thread descriptor. * It describes the SDL specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { SDL_Surface * p_display; /* display device */ @@ -71,12 +65,11 @@ typedef struct vout_sys_s /* For RGB output */ int i_surfaces; - boolean_t b_cursor; - boolean_t b_cursor_autohidden; + vlc_bool_t b_cursor; + vlc_bool_t b_cursor_autohidden; mtime_t i_lastmoved; mtime_t i_lastpressed; /* to track dbl-clicks */ - -} vout_sys_t; +}; /***************************************************************************** * picture_sys_t: direct buffer method descriptor @@ -84,52 +77,26 @@ typedef struct vout_sys_s * This structure is part of the picture descriptor, it describes the * SDL specific properties of a direct buffer. *****************************************************************************/ -typedef struct picture_sys_s +struct picture_sys_s { SDL_Overlay *p_overlay; - -} picture_sys_t; - -/***************************************************************************** - * Seeking function TODO: put this in a generic location ! - *****************************************************************************/ -static inline void vout_Seek( off_t i_seek ) -{ - off_t i_tell; - - vlc_mutex_lock( &p_input_bank->lock ); - if( p_input_bank->pp_input[0] != NULL ) - { -#define S p_input_bank->pp_input[0]->stream - i_tell = S.p_selected_area->i_tell + i_seek * (off_t)50 * S.i_mux_rate; - - i_tell = ( i_tell <= 0 /*S.p_selected_area->i_start*/ ) - ? 0 /*S.p_selected_area->i_start*/ - : ( i_tell >= S.p_selected_area->i_size ) - ? S.p_selected_area->i_size - : i_tell; - - input_Seek( p_input_bank->pp_input[0], i_tell ); -#undef S - } - vlc_mutex_unlock( &p_input_bank->lock ); -} +}; /***************************************************************************** * Local prototypes. *****************************************************************************/ -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 * ); -static void vout_Render ( struct vout_thread_s *, struct picture_s * ); -static void vout_Display ( struct vout_thread_s *, struct picture_s * ); - -static int OpenDisplay ( struct vout_thread_s * ); -static void CloseDisplay ( struct vout_thread_s * ); -static int NewPicture ( struct vout_thread_s *, struct picture_s * ); -static void SetPalette ( struct vout_thread_s *, u16 *, u16 *, u16 * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); + +static int OpenDisplay ( vout_thread_t * ); +static void CloseDisplay ( vout_thread_t * ); +static int NewPicture ( vout_thread_t *, picture_t * ); +static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -168,12 +135,12 @@ 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( "vout error: can't create p_sys (%s)", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } #ifdef HAVE_SETENV - psz_method = config_GetPszVariable( "vout" ); + psz_method = config_GetPsz( p_vout, "vout" ); if( psz_method ) { while( *psz_method && *psz_method != ':' ) @@ -201,7 +168,7 @@ static int vout_Create( vout_thread_t *p_vout ) #endif ) < 0 ) { - intf_ErrMsg( "vout error: can't initialize SDL (%s)", SDL_GetError() ); + msg_Err( p_vout, "cannot initialize SDL (%s)", SDL_GetError() ); free( p_vout->p_sys ); return( 1 ); } @@ -212,7 +179,7 @@ static int vout_Create( vout_thread_t *p_vout ) if( OpenDisplay( p_vout ) ) { - intf_ErrMsg( "vout error: can't set up SDL (%s)", SDL_GetError() ); + msg_Err( p_vout, "cannot set up SDL (%s)", SDL_GetError() ); SDL_QuitSubSystem( SDL_INIT_VIDEO ); free( p_vout->p_sys ); return( 1 ); @@ -370,7 +337,16 @@ static int vout_Manage( vout_thread_t *p_vout ) switch( event.button.button ) { case SDL_BUTTON_RIGHT: - p_main->p_intf->b_menu_change = 1; + { + intf_thread_t *p_intf; + p_intf = vlc_object_find( p_vout->p_vlc, VLC_OBJECT_INTF, + FIND_CHILD ); + if( p_intf ) + { + p_intf->b_menu_change = 1; + vlc_object_release( p_intf ); + } + } break; } break; @@ -390,17 +366,17 @@ static int vout_Manage( vout_thread_t *p_vout ) break; case 4: - vout_Seek( 15 ); + input_Seek( p_vout, 15, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; case 5: - vout_Seek( -15 ); + input_Seek( p_vout, -15, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; } break; case SDL_QUIT: - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; case SDL_KEYDOWN: /* if a key is pressed */ @@ -414,12 +390,12 @@ static int vout_Manage( vout_thread_t *p_vout ) } else { - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; } break; case SDLK_q: /* quit */ - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; break; case SDLK_f: /* switch to fullscreen */ @@ -447,35 +423,44 @@ static int vout_Manage( vout_thread_t *p_vout ) break; case SDLK_MENU: - p_main->p_intf->b_menu_change = 1; + { + intf_thread_t *p_intf; + p_intf = vlc_object_find( p_vout->p_vlc, VLC_OBJECT_INTF, + FIND_CHILD ); + if( p_intf ) + { + p_intf->b_menu_change = 1; + vlc_object_release( p_intf ); + } + } break; case SDLK_LEFT: - vout_Seek( -5 ); + input_Seek( p_vout, -5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; case SDLK_RIGHT: - vout_Seek( 5 ); + input_Seek( p_vout, 5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; case SDLK_UP: - vout_Seek( 60 ); + input_Seek( p_vout, 60, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; case SDLK_DOWN: - vout_Seek( -60 ); + input_Seek( p_vout, -60, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; - case SDLK_F10: network_ChannelJoin( 0 ); break; - case SDLK_F1: network_ChannelJoin( 1 ); break; - case SDLK_F2: network_ChannelJoin( 2 ); break; - case SDLK_F3: network_ChannelJoin( 3 ); break; - case SDLK_F4: network_ChannelJoin( 4 ); break; - case SDLK_F5: network_ChannelJoin( 5 ); break; - case SDLK_F6: network_ChannelJoin( 6 ); break; - case SDLK_F7: network_ChannelJoin( 7 ); break; - case SDLK_F8: network_ChannelJoin( 8 ); break; - case SDLK_F9: network_ChannelJoin( 9 ); break; + case SDLK_F10: network_ChannelJoin( p_vout->p_this, 0 ); break; + case SDLK_F1: network_ChannelJoin( p_vout->p_this, 1 ); break; + case SDLK_F2: network_ChannelJoin( p_vout->p_this, 2 ); break; + case SDLK_F3: network_ChannelJoin( p_vout->p_this, 3 ); break; + case SDLK_F4: network_ChannelJoin( p_vout->p_this, 4 ); break; + case SDLK_F5: network_ChannelJoin( p_vout->p_this, 5 ); break; + case SDLK_F6: network_ChannelJoin( p_vout->p_this, 6 ); break; + case SDLK_F7: network_ChannelJoin( p_vout->p_this, 7 ); break; + case SDLK_F8: network_ChannelJoin( p_vout->p_this, 8 ); break; + case SDLK_F9: network_ChannelJoin( p_vout->p_this, 9 ); break; default: break; @@ -505,9 +490,8 @@ static int vout_Manage( vout_thread_t *p_vout ) */ if( p_vout->i_changes & VOUT_SIZE_CHANGE ) { - intf_WarnMsg( 3, "vout: video display resized (%dx%d)", - p_vout->p_sys->i_width, - p_vout->p_sys->i_height ); + msg_Dbg( p_vout, "video display resized (%dx%d)", + p_vout->p_sys->i_width, p_vout->p_sys->i_height ); CloseDisplay( p_vout ); OpenDisplay( p_vout ); @@ -597,7 +581,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) SDL_DEFAULT_BPP, i_flags ); if( i_bpp == 0 ) { - intf_ErrMsg( "vout error: no video mode available" ); + msg_Err( p_vout, "no video mode available" ); return( 1 ); } @@ -607,7 +591,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( p_vout->p_sys->p_display == NULL ) { - intf_ErrMsg( "vout error: cannot set video mode" ); + msg_Err( p_vout, "cannot set video mode" ); return( 1 ); } @@ -669,9 +653,8 @@ static int OpenDisplay( vout_thread_t *p_vout ) if( p_vout->p_sys->p_overlay == NULL ) { - intf_WarnMsg( 3, "vout warning: no SDL overlay for 0x%.8x (%4.4s)", - p_vout->render.i_chroma, - (char*)&p_vout->render.i_chroma ); + msg_Warn( p_vout, "no SDL overlay for 0x%.8x (%4.4s)", + p_vout->render.i_chroma, (char*)&p_vout->render.i_chroma ); switch( p_vout->p_sys->p_display->format->BitsPerPixel ) { @@ -692,7 +675,8 @@ static int OpenDisplay( vout_thread_t *p_vout ) p_vout->output.i_chroma = FOURCC_RV32; break; default: - intf_ErrMsg( "vout error: unknown screen depth" ); + msg_Err( p_vout, "unknown screen depth %i", + p_vout->p_sys->p_display->format->BitsPerPixel ); SDL_UnlockSurface( p_vout->p_sys->p_display ); SDL_FreeSurface( p_vout->p_sys->p_display ); return( -1 ); @@ -898,7 +882,7 @@ static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue ) /* Set palette */ if( SDL_SetColors( p_vout->p_sys->p_display, colors, 0, 256 ) == 0 ) { - intf_ErrMsg( "vout error: failed setting palette" ); + msg_Err( p_vout, "failed setting palette" ); } } diff --git a/plugins/spudec/spu_decoder.c b/plugins/spudec/spu_decoder.c index 58893d737f..d7d0da2e96 100644 --- a/plugins/spudec/spu_decoder.c +++ b/plugins/spudec/spu_decoder.c @@ -2,7 +2,7 @@ * spu_decoder.c : spu decoder thread ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: spu_decoder.c,v 1.24 2002/05/24 12:42:14 gbazin Exp $ + * $Id: spu_decoder.c,v 1.25 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * Rudolf Cornelissen @@ -28,7 +28,9 @@ #include /* malloc(), free() */ #include /* memcpy(), memset() */ -#include +#include +#include +#include #ifdef HAVE_UNISTD_H # include /* getpid() */ @@ -38,19 +40,13 @@ # include #endif -#include "video.h" -#include "video_output.h" - -#include "stream_control.h" -#include "input_ext-dec.h" - #include "spu_decoder.h" /***************************************************************************** * Local prototypes *****************************************************************************/ static int decoder_Probe ( u8 * ); -static int decoder_Run ( decoder_config_t * ); +static int decoder_Run ( decoder_fifo_t * ); static int InitThread ( spudec_thread_t * ); static void EndThread ( spudec_thread_t * ); @@ -58,7 +54,7 @@ static int SyncPacket ( spudec_thread_t * ); static void ParsePacket ( spudec_thread_t * ); static int ParseControlSequences( spudec_thread_t *, subpicture_t * ); static int ParseRLE ( spudec_thread_t *, subpicture_t *, u8 * ); -static void RenderSPU ( const vout_thread_t *, picture_t *, +static void RenderSPU ( vout_thread_t *, picture_t *, const subpicture_t * ); /***************************************************************************** @@ -102,20 +98,17 @@ static int decoder_Probe( u8 *pi_type ) /***************************************************************************** * decoder_Run: this function is called just after the thread is created *****************************************************************************/ -static int decoder_Run( decoder_config_t * p_config ) +static int decoder_Run( decoder_fifo_t * p_fifo ) { spudec_thread_t * p_spudec; - intf_WarnMsg( 3, "spudec: thread launched. Initializing ..." ); - /* Allocate the memory needed to store the thread's structure */ p_spudec = (spudec_thread_t *)malloc( sizeof(spudec_thread_t) ); if ( p_spudec == NULL ) { - intf_ErrMsg( "spudec error: not enough memory " - "for spudec_CreateThread() to create the new thread" ); - DecoderError( p_config->p_decoder_fifo ); + msg_Err( p_fifo, "out of memory" ); + DecoderError( p_fifo ); return( -1 ); } @@ -123,10 +116,7 @@ static int decoder_Run( decoder_config_t * p_config ) * Initialize the thread properties */ p_spudec->p_vout = NULL; - - p_spudec->p_config = p_config; - - p_spudec->p_fifo = p_config->p_decoder_fifo; + p_spudec->p_fifo = p_fifo; /* * Initialize thread and free configuration @@ -151,21 +141,15 @@ static int decoder_Run( decoder_config_t * p_config ) if( p_spudec->p_fifo->b_error ) { DecoderError( p_spudec->p_fifo ); - } - - { - boolean_t b_error = p_spudec->p_fifo->b_error; /* End of thread */ EndThread( p_spudec ); - - if( b_error ) - { - return( -1 ); - } + return -1; } - - return( 0 ); + + /* End of thread */ + EndThread( p_spudec ); + return 0; } /* following functions are local */ @@ -180,29 +164,29 @@ static int decoder_Run( decoder_config_t * p_config ) static int InitThread( spudec_thread_t *p_spudec ) { /* Find an available video output */ - vlc_mutex_lock( &p_vout_bank->lock ); - - while( p_vout_bank->i_count == 0 ) + do { - vlc_mutex_unlock( &p_vout_bank->lock ); - if( p_spudec->p_fifo->b_die || p_spudec->p_fifo->b_error ) { - return( -1 ); + return -1; + } + + p_spudec->p_vout = vlc_object_find( p_spudec->p_fifo, VLC_OBJECT_VOUT, + FIND_CHILD ); + + if( p_spudec->p_vout ) + { + break; } msleep( VOUT_OUTMEM_SLEEP ); - vlc_mutex_lock( &p_vout_bank->lock ); } + while( 1 ); - /* Take the first video output FIXME: take the best one */ - p_spudec->p_vout = p_vout_bank->pp_vout[ 0 ]; - vlc_mutex_unlock( &p_vout_bank->lock ); - InitBitstream( &p_spudec->bit_stream, - p_spudec->p_config->p_decoder_fifo, NULL, NULL ); + InitBitstream( &p_spudec->bit_stream, p_spudec->p_fifo, NULL, NULL ); /* Mark thread as running and return */ - return( 0 ); + return 0; } /***************************************************************************** @@ -276,19 +260,19 @@ static void ParsePacket( spudec_thread_t *p_spudec ) u8 * p_src; unsigned int i_offset; - intf_WarnMsg( 3, "spudec: trying to gather a 0x%.2x long subtitle", - p_spudec->i_spu_size ); + msg_Dbg( p_spudec->p_fifo, "trying to gather a 0x%.2x long subtitle", + p_spudec->i_spu_size ); /* We cannot display a subpicture with no date */ if( p_spudec->p_fifo->p_first->i_pts == 0 ) { - intf_WarnMsg( 3, "spudec error: subtitle without a date" ); + msg_Warn( p_spudec->p_fifo, "subtitle without a date" ); return; } /* Allocate the subpicture internal data. */ p_spu = vout_CreateSubPicture( p_spudec->p_vout, MEMORY_SUBPICTURE, - sizeof( struct subpicture_sys_s ) + sizeof( subpicture_sys_t ) + p_spudec->i_rle_size * 4 ); /* Rationale for the "p_spudec->i_rle_size * 4": we are going to * expand the RLE stuff so that we won't need to read nibbles later @@ -302,8 +286,7 @@ static void ParsePacket( spudec_thread_t *p_spudec ) /* Fill the p_spu structure */ p_spu->pf_render = RenderSPU; - p_spu->p_sys->p_data = (u8*)p_spu->p_sys - + sizeof( struct subpicture_sys_s ); + p_spu->p_sys->p_data = (u8*)p_spu->p_sys + sizeof( subpicture_sys_t ); p_spu->p_sys->b_palette = 0; /* Get display time now. If we do it later, we may miss the PTS. */ @@ -314,7 +297,7 @@ static void ParsePacket( spudec_thread_t *p_spudec ) if( p_src == NULL ) { - intf_ErrMsg( "spudec error: could not allocate p_src" ); + msg_Err( p_spudec->p_fifo, "out of memory" ); vout_DestroySubPicture( p_spudec->p_vout, p_spu ); return; } @@ -362,9 +345,9 @@ static void ParsePacket( spudec_thread_t *p_spudec ) return; } - intf_WarnMsg( 3, "spudec: total size: 0x%x, RLE offsets: 0x%x 0x%x", - p_spudec->i_spu_size, - p_spu->p_sys->pi_offset[0], p_spu->p_sys->pi_offset[1] ); + msg_Dbg( p_spudec->p_fifo, "total size: 0x%x, RLE offsets: 0x%x 0x%x", + p_spudec->i_spu_size, + p_spu->p_sys->pi_offset[0], p_spu->p_sys->pi_offset[1] ); /* SPU is finished - we can ask the video output to display it */ vout_DisplaySubPicture( p_spudec->p_vout, p_spu ); @@ -396,7 +379,7 @@ static int ParseControlSequences( spudec_thread_t *p_spudec, int i; /* XXX: temporary variables */ - boolean_t b_force_display = 0; + vlc_bool_t b_force_display = 0; /* Initialize the structure */ p_spu->i_start = p_spu->i_stop = 0; @@ -447,15 +430,15 @@ static int ParseControlSequences( spudec_thread_t *p_spudec, case SPU_CMD_SET_PALETTE: /* 03xxxx (palette) */ - if( p_spudec->p_config->p_demux_data && - *(int*)p_spudec->p_config->p_demux_data == 0xBeeF ) + if( p_spudec->p_fifo->p_demux_data && + *(int*)p_spudec->p_fifo->p_demux_data == 0xBeeF ) { u32 i_color; p_spu->p_sys->b_palette = 1; for( i = 0; i < 4 ; i++ ) { - i_color = ((u32*)((char*)p_spudec->p_config-> + i_color = ((u32*)((char*)p_spudec->p_fifo-> p_demux_data + sizeof(int)))[ GetBits(&p_spudec->bit_stream, 4) ]; @@ -520,8 +503,8 @@ static int ParseControlSequences( spudec_thread_t *p_spudec, default: /* xx (unknown command) */ - intf_ErrMsg( "spudec error: unknown command 0x%.2x", - i_command ); + msg_Err( p_spudec->p_fifo, "unknown command 0x%.2x", + i_command ); return( 1 ); } @@ -538,21 +521,21 @@ static int ParseControlSequences( spudec_thread_t *p_spudec, /* Check that the next sequence index matches the current one */ if( i_next_seq != i_cur_seq ) { - intf_ErrMsg( "spudec error: index mismatch (0x%.4x != 0x%.4x)", - i_next_seq, i_cur_seq ); + msg_Err( p_spudec->p_fifo, "index mismatch (0x%.4x != 0x%.4x)", + i_next_seq, i_cur_seq ); return( 1 ); } if( i_index > p_spudec->i_spu_size ) { - intf_ErrMsg( "spudec error: uh-oh, we went too far (0x%.4x > 0x%.4x)", - i_index, p_spudec->i_spu_size ); + msg_Err( p_spudec->p_fifo, "uh-oh, we went too far (0x%.4x > 0x%.4x)", + i_index, p_spudec->i_spu_size ); return( 1 ); } if( !p_spu->i_start ) { - intf_ErrMsg( "spudec error: no `start display' command" ); + msg_Err( p_spudec->p_fifo, "no `start display' command" ); } if( !p_spu->i_stop ) @@ -575,9 +558,9 @@ static int ParseControlSequences( spudec_thread_t *p_spudec, /* More than one padding byte - this is very strange, but * we can deal with it */ default: - intf_WarnMsg( 2, "spudec warning: %i padding bytes, we usually " - "get 0 or 1 of them", - p_spudec->i_spu_size - i_index ); + msg_Warn( p_spudec->p_fifo, + "%i padding bytes, we usually get 0 or 1 of them", + p_spudec->i_spu_size - i_index ); while( i_index < p_spudec->i_spu_size ) { @@ -590,9 +573,9 @@ static int ParseControlSequences( spudec_thread_t *p_spudec, if( b_force_display ) { - intf_ErrMsg( "spudec: \"force display\" command" ); - intf_ErrMsg( "spudec: send mail to if you " - "want to help debugging this" ); + msg_Err( p_spudec->p_fifo, "\"force display\" command" ); + msg_Err( p_spudec->p_fifo, "send mail to if you " + "want to help debugging this" ); } /* Successfully parsed ! */ @@ -622,8 +605,8 @@ static int ParseRLE( spudec_thread_t *p_spudec, unsigned int pi_table[ 2 ]; unsigned int *pi_offset; - boolean_t b_empty_top = 1, - b_empty_bottom = 0; + vlc_bool_t b_empty_top = 1, + b_empty_bottom = 0; unsigned int i_skipped_top = 0, i_skipped_bottom = 0; @@ -665,8 +648,8 @@ static int ParseRLE( spudec_thread_t *p_spudec, else { /* We have a boo boo ! */ - intf_ErrMsg( "spudec error: unknown RLE code " - "0x%.4x", i_code ); + msg_Err( p_spudec->p_fifo, "unknown RLE code " + "0x%.4x", i_code ); return( 1 ); } } @@ -676,9 +659,9 @@ static int ParseRLE( spudec_thread_t *p_spudec, if( ( (i_code >> 2) + i_x + i_y * i_width ) > i_height * i_width ) { - intf_ErrMsg( "spudec error: out of bounds, %i at (%i,%i) is " - "out of %ix%i", - i_code >> 2, i_x, i_y, i_width, i_height ); + msg_Err( p_spudec->p_fifo, + "out of bounds, %i at (%i,%i) is out of %ix%i", + i_code >> 2, i_x, i_y, i_width, i_height ); return( 1 ); } @@ -722,8 +705,8 @@ static int ParseRLE( spudec_thread_t *p_spudec, /* Check that we didn't go too far */ if( i_x > i_width ) { - intf_ErrMsg( "spudec error: i_x overflowed, %i > %i", - i_x, i_width ); + msg_Err( p_spudec->p_fifo, "i_x overflowed, %i > %i", + i_x, i_width ); return( 1 ); } @@ -740,9 +723,9 @@ static int ParseRLE( spudec_thread_t *p_spudec, /* We shouldn't get any padding bytes */ if( i_y < i_height ) { - intf_ErrMsg( "spudec: padding bytes found in RLE sequence" ); - intf_ErrMsg( "spudec: send mail to if you " - "want to help debugging this" ); + msg_Err( p_spudec->p_fifo, "padding bytes found in RLE sequence" ); + msg_Err( p_spudec->p_fifo, "send mail to if you " + "want to help debugging this" ); /* Skip them just in case */ while( i_y < i_height ) @@ -754,8 +737,8 @@ static int ParseRLE( spudec_thread_t *p_spudec, return( 1 ); } - intf_WarnMsg( 3, "spudec: valid subtitle, size: %ix%i, position: %i,%i", - p_spu->i_width, p_spu->i_height, p_spu->i_x, p_spu->i_y ); + msg_Dbg( p_spudec->p_fifo, "valid subtitle, size: %ix%i, position: %i,%i", + p_spu->i_width, p_spu->i_height, p_spu->i_x, p_spu->i_y ); /* Crop if necessary */ if( i_skipped_top || i_skipped_bottom ) @@ -763,8 +746,8 @@ static int ParseRLE( spudec_thread_t *p_spudec, p_spu->i_y += i_skipped_top; p_spu->i_height -= i_skipped_top + i_skipped_bottom; - intf_WarnMsg( 3, "spudec: cropped to: %ix%i, position: %i,%i", - p_spu->i_width, p_spu->i_height, p_spu->i_x, p_spu->i_y ); + msg_Dbg( p_spudec->p_fifo, "cropped to: %ix%i, position: %i,%i", + p_spu->i_width, p_spu->i_height, p_spu->i_x, p_spu->i_y ); } /* Handle color if no palette was found */ @@ -819,8 +802,9 @@ static int ParseRLE( spudec_thread_t *p_spudec, p_spu->p_sys->pi_yuv[i_shade][2] = 0x80; } - intf_WarnMsg( 3, "spudec: using custom palette (border %i, inner %i, " - "shade %i)", i_border, i_inner, i_shade ); + msg_Dbg( p_spudec->p_fifo, + "using custom palette (border %i, inner %i, shade %i)", + i_border, i_inner, i_shade ); } return( 0 ); @@ -834,7 +818,7 @@ static int ParseRLE( spudec_thread_t *p_spudec, * and again. Most sanity checks are already done so that this routine can be * as fast as possible. *****************************************************************************/ -static void RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic, +static void RenderSPU( vout_thread_t *p_vout, picture_t *p_pic, const subpicture_t *p_spu ) { /* Common variables */ @@ -1196,7 +1180,7 @@ static void RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic, default: - intf_ErrMsg( "vout error: unknown chroma, can't render SPU" ); + msg_Err( p_vout, "unknown chroma, can't render SPU" ); break; } } diff --git a/plugins/spudec/spu_decoder.h b/plugins/spudec/spu_decoder.h index 24f3ca7aff..c67cc9d80c 100644 --- a/plugins/spudec/spu_decoder.h +++ b/plugins/spudec/spu_decoder.h @@ -2,7 +2,7 @@ * spu_decoder.h : sub picture unit decoder thread interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: spu_decoder.h,v 1.4 2002/05/18 17:47:47 sam Exp $ + * $Id: spu_decoder.h,v 1.5 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -typedef struct subpicture_sys_s +struct subpicture_sys_s { mtime_t i_pts; /* presentation timestamp */ @@ -29,11 +29,10 @@ typedef struct subpicture_sys_s void *p_data; /* Color information */ - boolean_t b_palette; + vlc_bool_t b_palette; u8 pi_alpha[4]; u8 pi_yuv[4][3]; - -} subpicture_sys_t; +}; /***************************************************************************** * spudec_thread_t : sub picture unit decoder thread descriptor @@ -51,7 +50,6 @@ typedef struct spudec_thread_s decoder_fifo_t * p_fifo; /* stores the PES stream data */ /* The bit stream structure handles the PES stream at the bit level */ bit_stream_t bit_stream; - decoder_config_t * p_config; /* * Output properties @@ -102,5 +100,5 @@ static inline unsigned int AddNibble( unsigned int i_code, /***************************************************************************** * Prototypes *****************************************************************************/ -vlc_thread_t spudec_CreateThread( decoder_config_t * p_config ); +vlc_thread_t spudec_CreateThread( decoder_fifo_t * p_fifo ); diff --git a/plugins/text/logger.c b/plugins/text/logger.c index 00dae538fd..c926dee122 100644 --- a/plugins/text/logger.c +++ b/plugins/text/logger.c @@ -2,7 +2,7 @@ * logger.c : file logging plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: logger.c,v 1.9 2002/05/22 14:20:41 gbazin Exp $ + * $Id: logger.c,v 1.10 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -30,22 +30,42 @@ #include /* ENOMEM */ #include -#include +#include +#include -#include "interface.h" +#define MODE_TEXT 0 +#define MODE_HTML 1 -#define LOG_FILE "vlc.log" +#define LOG_FILE "vlc-log.txt" #define LOG_STRING( msg, file ) fwrite( msg, strlen( msg ), 1, file ); +#define TEXT_HEADER "-- logger module started --\n" +#define TEXT_FOOTER "-- logger module stopped --\n" + +#define HTML_HEADER \ + "\n" \ + " \n" \ + " vlc log\n" \ + " \n" \ + " \n" \ + "
\n" \
+    "      -- logger module started --\n"
+#define HTML_FOOTER \
+    "      -- logger module stopped --\n" \
+    "    
\n" \ + " \n" \ + "\n" + /***************************************************************************** * intf_sys_t: description and status of log interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { - FILE * p_file; /* The log file */ - intf_subscription_t *p_sub; + int i_mode; -} intf_sys_t; + FILE * p_file; /* The log file */ + msg_subscription_t *p_sub; +}; /***************************************************************************** * Local prototypes. @@ -55,18 +75,22 @@ 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 ); -static void FlushQueue ( intf_subscription_t *, FILE * ); +static void FlushQueue ( msg_subscription_t *, FILE *, int ); +static void TextPrint ( const msg_item_t *, FILE * ); +static void HtmlPrint ( const msg_item_t *, FILE * ); /***************************************************************************** * Build configuration tree. *****************************************************************************/ MODULE_CONFIG_START + ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) + ADD_STRING( "logfile", NULL, NULL, N_("log filename"), N_("Specify the log filename.") ) + ADD_STRING( "logmode", NULL, NULL, N_("log format"), N_("Specify the log format. Available choices are \"text\" (default) and \"html\"") ) MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("file logging interface module") ) ADD_CAPABILITY( INTF, 1 ) - ADD_SHORTCUT( "logger" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -92,67 +116,95 @@ static void intf_getfunctions( function_list_t * p_function_list ) *****************************************************************************/ static int intf_Open( intf_thread_t *p_intf ) { - char *psz_filename_tmp, *psz_filename; + char *psz_mode, *psz_file; #ifdef WIN32 AllocConsole(); freopen( "CONOUT$", "w", stdout ); freopen( "CONOUT$", "w", stderr ); freopen( "CONIN$", "r", stdin ); - intf_Msg( VERSION_MESSAGE ); - intf_Msg( _("\nUsing the logger interface plugin...") ); + msg_Info( p_intf, VERSION_MESSAGE ); + msg_Info( p_intf, _("\nUsing the logger interface plugin...") ); #endif /* Allocate instance and initialize some members */ p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + msg_Err( p_intf, "out of memory" ); return -1; } - if( !(psz_filename = psz_filename_tmp - = config_GetPszVariable( "intf" )) ) + psz_mode = config_GetPsz( p_intf, "logmode" ); + if( psz_mode ) { - intf_ErrMsg( "intf error: configuration variable intf empty" ); - return -1; - } + if( !strcmp( psz_mode, "text" ) ) + { + p_intf->p_sys->i_mode = MODE_TEXT; + } + else if( !strcmp( psz_mode, "html" ) ) + { + p_intf->p_sys->i_mode = MODE_HTML; + } + else + { + msg_Err( p_intf, "invalid log mode `%s', using `text'", psz_mode ); + p_intf->p_sys->i_mode = MODE_TEXT; + } - while( *psz_filename && *psz_filename != ':' ) - { - psz_filename++; + free( psz_mode ); } - - if( *psz_filename == ':' ) + else { - psz_filename++; + msg_Warn( p_intf, "no log mode specified, using `text'" ); + p_intf->p_sys->i_mode = MODE_TEXT; } - else + + psz_file = config_GetPsz( p_intf, "logfile" ); + if( !psz_file ) { - intf_ErrMsg( "intf error: no log filename provided, using `%s'", - LOG_FILE ); - psz_filename = LOG_FILE; + switch( p_intf->p_sys->i_mode ) + { + case MODE_HTML: + psz_file = strdup( "vlc-log.html" ); + break; + case MODE_TEXT: + default: + psz_file = strdup( "vlc-log.txt" ); + break; + } + + msg_Warn( p_intf, "no log filename provided, using `%s'", psz_file ); } /* Open the log file and remove any buffering for the stream */ - intf_WarnMsg( 1, "intf: opening logfile `%s'", psz_filename ); - p_intf->p_sys->p_file = fopen( psz_filename, "wt" ); + msg_Dbg( p_intf, "opening logfile `%s'", psz_file ); + p_intf->p_sys->p_file = fopen( psz_file, "wt" ); setvbuf( p_intf->p_sys->p_file, NULL, _IONBF, 0 ); - p_intf->p_sys->p_sub = intf_MsgSub(); + p_intf->p_sys->p_sub = msg_Subscribe( p_intf->p_this ); if( p_intf->p_sys->p_file == NULL ) { - intf_ErrMsg( "intf error: error opening logfile `%s'", psz_filename ); + msg_Err( p_intf, "error opening logfile `%s'", psz_file ); free( p_intf->p_sys ); - intf_MsgUnsub( p_intf->p_sys->p_sub ); - free( psz_filename_tmp ); + msg_Unsubscribe( p_intf->p_this, p_intf->p_sys->p_sub ); + free( psz_file ); return -1; } - free( psz_filename_tmp ); + free( psz_file ); - LOG_STRING( "-- log plugin started --\n", p_intf->p_sys->p_file ); + switch( p_intf->p_sys->i_mode ) + { + case MODE_HTML: + LOG_STRING( HTML_HEADER, p_intf->p_sys->p_file ); + break; + case MODE_TEXT: + default: + LOG_STRING( TEXT_HEADER, p_intf->p_sys->p_file ); + break; + } return 0; } @@ -163,10 +215,20 @@ static int intf_Open( intf_thread_t *p_intf ) static void intf_Close( intf_thread_t *p_intf ) { /* Flush the queue and unsubscribe from the message queue */ - FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file ); - intf_MsgUnsub( p_intf->p_sys->p_sub ); + FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file, + p_intf->p_sys->i_mode ); + msg_Unsubscribe( p_intf->p_this, p_intf->p_sys->p_sub ); - LOG_STRING( "-- log plugin stopped --\n", p_intf->p_sys->p_file ); + switch( p_intf->p_sys->i_mode ) + { + case MODE_HTML: + LOG_STRING( HTML_FOOTER, p_intf->p_sys->p_file ); + break; + case MODE_TEXT: + default: + LOG_STRING( TEXT_FOOTER, p_intf->p_sys->p_file ); + break; + } /* Close the log file */ fclose( p_intf->p_sys->p_file ); @@ -183,11 +245,10 @@ static void intf_Close( intf_thread_t *p_intf ) *****************************************************************************/ static void intf_Run( intf_thread_t *p_intf ) { - while( !p_intf->b_die ) + while( !p_intf->p_vlc->b_die ) { - p_intf->pf_manage( p_intf ); - - FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file ); + FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file, + p_intf->p_sys->i_mode ); msleep( INTF_IDLE_SLEEP ); } @@ -196,10 +257,9 @@ static void intf_Run( intf_thread_t *p_intf ) /***************************************************************************** * FlushQueue: flush the message queue into the log file *****************************************************************************/ -static void FlushQueue( intf_subscription_t *p_sub, FILE *p_file ) +static void FlushQueue( msg_subscription_t *p_sub, FILE *p_file, int i_mode ) { int i_start, i_stop; - char *psz_msg; vlc_mutex_lock( p_sub->p_lock ); i_stop = *p_sub->pi_stop; @@ -210,11 +270,18 @@ static void FlushQueue( intf_subscription_t *p_sub, FILE *p_file ) /* Append all messages to log file */ for( i_start = p_sub->i_start; i_start != i_stop; - i_start = (i_start+1) % INTF_MSG_QSIZE ) + i_start = (i_start+1) % VLC_MSG_QSIZE ) { - psz_msg = p_sub->p_msg[i_start].psz_msg; - LOG_STRING( psz_msg, p_file ); - LOG_STRING( "\n", p_file ); + switch( i_mode ) + { + case MODE_HTML: + HtmlPrint( &p_sub->p_msg[i_start], p_file ); + break; + case MODE_TEXT: + default: + TextPrint( &p_sub->p_msg[i_start], p_file ); + break; + } } vlc_mutex_lock( p_sub->p_lock ); @@ -223,3 +290,28 @@ static void FlushQueue( intf_subscription_t *p_sub, FILE *p_file ) } } +static const char *ppsz_type[4] = { ": ", " error: ", + " warning: ", " debug: " }; + +static void TextPrint( const msg_item_t *p_msg, FILE *p_file ) +{ + LOG_STRING( p_msg->psz_module, p_file ); + LOG_STRING( ppsz_type[p_msg->i_type], p_file ); + LOG_STRING( p_msg->psz_msg, p_file ); + LOG_STRING( "\n", p_file ); +} + +static void HtmlPrint( const msg_item_t *p_msg, FILE *p_file ) +{ + static const char *ppsz_color[4] = { "", + "", + "", + "" }; + + LOG_STRING( p_msg->psz_module, p_file ); + LOG_STRING( ppsz_type[p_msg->i_type], p_file ); + LOG_STRING( ppsz_color[p_msg->i_type], p_file ); + LOG_STRING( p_msg->psz_msg, p_file ); + LOG_STRING( "\n", p_file ); +} + diff --git a/plugins/text/ncurses.c b/plugins/text/ncurses.c index 14265b209c..be236d0a53 100644 --- a/plugins/text/ncurses.c +++ b/plugins/text/ncurses.c @@ -2,7 +2,7 @@ * ncurses.c : NCurses plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ncurses.c,v 1.15 2002/05/13 17:57:46 sam Exp $ + * $Id: ncurses.c,v 1.16 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -32,42 +32,33 @@ #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" -#include "intf_eject.h" - -#include "video.h" -#include "video_output.h" +#include +#include +#include /***************************************************************************** * Local prototypes. *****************************************************************************/ -static void intf_getfunctions ( function_list_t * p_function_list ); -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 ); - -static void ncurses_Fullscreen ( void ); -static void ncurses_Play ( void ); -static void ncurses_Stop ( void ); -static void ncurses_Next ( void ); -static void ncurses_Eject ( void ); -static void ncurses_Pause ( void ); -static void ncurses_TitlePrev ( void ); -static void ncurses_TitleNext ( void ); -static void ncurses_ChapterPrev ( void ); -static void ncurses_ChapterNext ( void ); - -static int ncurses_handleKey ( intf_thread_t *p_intf, int i_key ); -static void ncurses_draw ( time_t *t_last_refresh, - intf_thread_t *p_intf ); -static int ncurses_printFullLine ( const char *p_fmt, ... ); -static void ncurses_manageSlider ( intf_thread_t *p_intf ); +static void intf_getfunctions ( function_list_t * ); +static int intf_Open ( intf_thread_t * ); +static void intf_Close ( intf_thread_t * ); +static void intf_Run ( intf_thread_t * ); + +static void FullScreen ( intf_thread_t * ); +static void Play ( intf_thread_t * ); +static void Stop ( intf_thread_t * ); +static void Next ( intf_thread_t * ); +static void Eject ( intf_thread_t * ); +static void Pause ( intf_thread_t * ); +static void PrevTitle ( intf_thread_t * ); +static void NextTitle ( intf_thread_t * ); +static void PrevChapter ( intf_thread_t * ); +static void NextChapter ( intf_thread_t * ); + +static int HandleKey ( intf_thread_t *, int ); +static void Redraw ( intf_thread_t *, time_t * ); +static int PrintFullLine ( const char *p_fmt, ... ); +static void ManageSlider ( intf_thread_t * ); /***************************************************************************** * Building configuration tree @@ -79,7 +70,6 @@ MODULE_INIT_START SET_DESCRIPTION( _("ncurses interface module") ) ADD_CAPABILITY( INTF, 10 ) ADD_SHORTCUT( "curses" ) - ADD_SHORTCUT( "ncurses" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -92,15 +82,14 @@ MODULE_DEACTIVATE_STOP /***************************************************************************** * intf_sys_t: description and status of ncurses interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { /* special actions */ vlc_mutex_t change_lock; /* the change lock */ - float f_slider_state; - float f_slider_state_old; - -} intf_sys_t; + float f_slider_state; + float f_slider_state_old; +}; /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -122,7 +111,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + msg_Err( p_intf, "out of memory" ); return( 1 ); } @@ -170,7 +159,7 @@ static void intf_Run( intf_thread_t *p_intf ) */ t_last_refresh = ( time( 0 ) - 1); - while( !p_intf->b_die ) + while( !p_intf->p_vlc->b_die ) { p_intf->pf_manage( p_intf ); @@ -179,11 +168,11 @@ static void intf_Run( intf_thread_t *p_intf ) while( (i_key = getch()) != -1 ) { /* - * ncurses_HandleKey returns 1 if the screen needs to be redrawn + * HandleKey returns 1 if the screen needs to be redrawn */ - if ( ncurses_handleKey( p_intf, i_key ) ) + if ( HandleKey( p_intf, i_key ) ) { - ncurses_draw( &t_last_refresh, p_intf ); + Redraw( p_intf, &t_last_refresh ); } } @@ -192,16 +181,15 @@ static void intf_Run( intf_thread_t *p_intf ) */ if ( (time(0) - t_last_refresh) >= 1 ) { - ncurses_manageSlider ( p_intf ); - ncurses_draw( &t_last_refresh, p_intf ); + ManageSlider ( p_intf ); + Redraw( p_intf, &t_last_refresh ); } } } /* following functions are local */ -static int -ncurses_handleKey( intf_thread_t *p_intf, int i_key ) +static int HandleKey( intf_thread_t *p_intf, int i_key ) { switch( i_key ) { @@ -211,53 +199,53 @@ ncurses_handleKey( intf_thread_t *p_intf, int i_key ) return 0; case 'f': - ncurses_Fullscreen(); + FullScreen( p_intf ); return 1; case 'p': - ncurses_Play(); + Play( p_intf ); return 1; case ' ': - ncurses_Pause(); + Pause( p_intf ); return 1; case 's': - ncurses_Stop(); + Stop( p_intf ); return 1; case 'n': - ncurses_Next(); + Next( p_intf ); return 1; case 'e': - ncurses_Eject(); + Eject( p_intf ); return 1; case '[': - ncurses_TitlePrev (); + PrevTitle( p_intf ); break; case ']': - ncurses_TitleNext (); + NextTitle( p_intf ); break; case '<': - ncurses_ChapterPrev (); + PrevChapter( p_intf ); break; case '>': - ncurses_ChapterNext (); + NextChapter( p_intf ); break; case KEY_RIGHT: p_intf->p_sys->f_slider_state += 100; - ncurses_manageSlider ( p_intf ); + ManageSlider ( p_intf ); break; case KEY_LEFT: p_intf->p_sys->f_slider_state--; - ncurses_manageSlider ( p_intf ); + ManageSlider ( p_intf ); break; /* @@ -274,8 +262,7 @@ ncurses_handleKey( intf_thread_t *p_intf, int i_key ) return 0; } -static int -ncurses_printFullLine ( const char *p_fmt, ... ) +static int PrintFullLine ( const char *p_fmt, ... ) { va_list vl_args; char * p_buf = NULL; @@ -287,7 +274,7 @@ ncurses_printFullLine ( const char *p_fmt, ... ) if ( p_buf == NULL ) { - intf_ErrMsg ( "intf error: %s", strerror ( ENOMEM ) ); +//X msg_Err( p_input, "intf error: %s", strerror ( ENOMEM ) ); return ( -1 ); } @@ -314,14 +301,14 @@ ncurses_printFullLine ( const char *p_fmt, ... ) } static void -ncurses_draw ( time_t *t_last_refresh , intf_thread_t *p_intf ) +Redraw ( intf_thread_t *p_intf, time_t *t_last_refresh ) { int row = 0; move ( row, 0 ); attrset ( A_REVERSE ); - ncurses_printFullLine( VOUT_TITLE " (ncurses interface)" ); + PrintFullLine( VOUT_TITLE " (ncurses interface)" ); attroff ( A_REVERSE ); row++; @@ -329,11 +316,11 @@ ncurses_draw ( time_t *t_last_refresh , intf_thread_t *p_intf ) row++; move ( row, 0 ); - if ( p_input_bank->pp_input[0] != NULL ) + if ( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - ncurses_printFullLine ( " DVD Chapter:%3d DVD Title:%3d", - p_input_bank->pp_input[0]->stream.p_selected_area->i_part, - p_input_bank->pp_input[0]->stream.p_selected_area->i_id ); + PrintFullLine ( " DVD Chapter:%3d DVD Title:%3d", + p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part, + p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id ); } row++; @@ -358,18 +345,16 @@ ncurses_draw ( time_t *t_last_refresh , intf_thread_t *p_intf ) *t_last_refresh = time( 0 ); } -static void -ncurses_Fullscreen ( void ) +static void FullScreen( intf_thread_t *p_intf ) { - vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_vout_bank->pp_vout[0]->change_lock ); - p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; + p_intf->p_vlc->p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; - vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_vout_bank->pp_vout[0]->change_lock ); } -static void -ncurses_Eject ( void ) +static void Eject ( intf_thread_t *p_intf ) { char *psz_device = NULL; char *psz_parser; @@ -384,39 +369,39 @@ ncurses_Eject ( void ) * Don't really know if I must lock the stuff here, we're using it read-only */ - if (p_main->p_playlist->current.psz_name != NULL) + if( p_intf->p_vlc->p_playlist->current.psz_name != NULL) { - if( !strncmp(p_main->p_playlist->current.psz_name, "dvd:", 4) ) + if( !strncmp(p_intf->p_vlc->p_playlist->current.psz_name, "dvd:", 4) ) { - switch( p_main->p_playlist->current.psz_name[4] ) + switch( p_intf->p_vlc->p_playlist->current.psz_name[4] ) { case '\0': case '@': - psz_device = config_GetPszVariable( "dvd_device" ); + psz_device = config_GetPsz( p_intf, "dvd_device" ); break; default: /* Omit the first 4 characters */ - psz_device = strdup( p_main->p_playlist->current.psz_name + 4 ); + psz_device = strdup( p_intf->p_vlc->p_playlist->current.psz_name + 4 ); break; } } - else if( !strncmp(p_main->p_playlist->current.psz_name, "vcd:", 4) ) + else if( !strncmp(p_intf->p_vlc->p_playlist->current.psz_name, "vcd:", 4) ) { - switch( p_main->p_playlist->current.psz_name[4] ) + switch( p_intf->p_vlc->p_playlist->current.psz_name[4] ) { case '\0': case '@': - psz_device = config_GetPszVariable( "vcd_device" ); + psz_device = config_GetPsz( p_intf, "vcd_device" ); break; default: /* Omit the first 4 characters */ - psz_device = strdup( p_main->p_playlist->current.psz_name + 4 ); + psz_device = strdup( p_intf->p_vlc->p_playlist->current.psz_name + 4 ); break; } } else { - psz_device = strdup( p_main->p_playlist->current.psz_name ); + psz_device = strdup( p_intf->p_vlc->p_playlist->current.psz_name ); } } @@ -437,122 +422,117 @@ ncurses_Eject ( void ) } /* If there's a stream playing, we aren't allowed to eject ! */ - if( p_input_bank->pp_input[0] == NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] == NULL ) { - intf_WarnMsg( 4, "intf: ejecting %s", psz_device ); +//X msg_Dbg( p_input, "ejecting %s", psz_device ); - intf_Eject( psz_device ); + intf_Eject( p_intf->p_this, psz_device ); } free(psz_device); return; } -static void -ncurses_Play ( void ) +static void Play ( intf_thread_t *p_intf ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); - p_main->p_playlist->b_stopped = 0; + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + p_intf->p_vlc->p_playlist->b_stopped = 0; } else { - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - if( p_main->p_playlist->b_stopped ) + if( p_intf->p_vlc->p_playlist->b_stopped ) { - if( p_main->p_playlist->i_size ) + if( p_intf->p_vlc->p_playlist->i_size ) { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_index ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); + intf_PlaylistJumpto( p_intf->p_vlc->p_playlist, + p_intf->p_vlc->p_playlist->i_index ); } else { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } else { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } } -static void -ncurses_Pause ( void ) +static void Pause ( intf_thread_t *p_intf ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - if ( p_input_bank->pp_input[0]->i_status & INPUT_STATUS_PLAY ) + if ( p_intf->p_vlc->p_input_bank->pp_input[0]->i_status & INPUT_STATUS_PLAY ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); + p_intf->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } else { - ncurses_Play (); + Play ( p_intf ); } } } -static void -ncurses_Stop ( void ) +static void Stop ( intf_thread_t *p_intf ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* end playing item */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intf->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + p_intf->p_vlc->p_playlist->i_index--; + p_intf->p_vlc->p_playlist->b_stopped = 1; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); } } -static void -ncurses_Next ( void ) +static void Next ( intf_thread_t *p_intf ) { int i_id; input_area_t * p_area; - i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id+1; + i_id = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id+1; - if ( i_id < p_input_bank->pp_input[0]->stream.i_area_nb ) + if ( i_id < p_intf->p_vlc->p_input_bank->pp_input[0]->stream.i_area_nb ) { - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; + p_area = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_id]; - input_ChangeArea( p_input_bank->pp_input[0], + input_ChangeArea( p_intf->p_vlc->p_input_bank->pp_input[0], (input_area_t *) p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } -static void -ncurses_manageSlider ( intf_thread_t *p_intf ) +static void ManageSlider ( intf_thread_t *p_intf ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); - if( p_input_bank->pp_input[0]->stream.b_seekable && - p_input_bank->pp_input[0]->i_status & INPUT_STATUS_PLAY ) + if( p_intf->p_vlc->p_input_bank->pp_input[0]->stream.b_seekable && + p_intf->p_vlc->p_input_bank->pp_input[0]->i_status & INPUT_STATUS_PLAY ) { float newvalue = p_intf->p_sys->f_slider_state; -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area /* If the user hasn't touched the slider since the last time, * then the input can safely change it */ @@ -570,9 +550,9 @@ ncurses_manageSlider ( intf_thread_t *p_intf ) off_t i_seek = ( newvalue * p_area->i_size ) / 100; /* release the lock to be able to seek */ - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); - input_Seek( p_input_bank->pp_input[0], i_seek ); - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); + input_Seek( p_intf->p_vlc->p_input_bank->pp_input[0]->p_this, i_seek, INPUT_SEEK_SET ); + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); /* Update the old value */ p_intf->p_sys->f_slider_state_old = newvalue; @@ -580,73 +560,70 @@ ncurses_manageSlider ( intf_thread_t *p_intf ) # undef p_area } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } } -static void -ncurses_TitlePrev ( void ) +static void PrevTitle ( intf_thread_t *p_intf ) { input_area_t * p_area; int i_id; - i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1; + i_id = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1; /* Disallow area 0 since it is used for video_ts.vob */ if ( i_id > 0 ) { - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + p_area = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_id]; + input_ChangeArea( p_intf->p_vlc->p_input_bank->pp_input[0], (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } -static void -ncurses_TitleNext ( void ) +static void NextTitle ( intf_thread_t *p_intf ) { input_area_t * p_area; int i_id; - i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1; + i_id = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1; - if ( i_id < p_input_bank->pp_input[0]->stream.i_area_nb ) + if ( i_id < p_intf->p_vlc->p_input_bank->pp_input[0]->stream.i_area_nb ) { - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + p_area = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_id]; + input_ChangeArea( p_intf->p_vlc->p_input_bank->pp_input[0], (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } -static void -ncurses_ChapterPrev ( void ) +static void PrevChapter ( intf_thread_t *p_intf ) { input_area_t * p_area; - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area; if ( p_area->i_part > 0 ) { p_area->i_part--; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intf->p_vlc->p_input_bank->pp_input[0], (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } -static void -ncurses_ChapterNext ( void ) +static void NextChapter( intf_thread_t *p_intf ) { input_area_t * p_area; - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area; if ( p_area->i_part < p_area->i_part_nb ) { p_area->i_part++; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intf->p_vlc->p_input_bank->pp_input[0], (input_area_t*)p_area ); - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intf->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } } + diff --git a/plugins/text/rc.c b/plugins/text/rc.c index 3be278adb1..05efdea453 100644 --- a/plugins/text/rc.c +++ b/plugins/text/rc.c @@ -2,7 +2,7 @@ * rc.c : remote control stdin/stdout plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: rc.c,v 1.14 2002/05/19 15:23:35 gbazin Exp $ + * $Id: rc.c,v 1.15 2002/06/01 12:32:00 sam Exp $ * * Authors: Peter Surda * @@ -24,8 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include - #include /* malloc(), free() */ #include @@ -33,6 +31,10 @@ #include #include +#include +#include +#include + #ifdef HAVE_UNISTD_H # include #endif @@ -46,23 +48,13 @@ #include /* select() */ #endif -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "intf_playlist.h" -#include "interface.h" - -#include "video.h" -#include "video_output.h" - /***************************************************************************** * intf_sys_t: description and status of rc interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { vlc_mutex_t change_lock; - -} intf_sys_t; +}; #define MAX_LINE_LENGTH 256 @@ -83,7 +75,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("remote control interface module") ) ADD_CAPABILITY( INTF, 20 ) - ADD_SHORTCUT( "rc" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -116,7 +107,7 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + msg_Err( p_intf, "out of memory" ); return( 1 ); } @@ -125,10 +116,10 @@ static int intf_Open( intf_thread_t *p_intf ) freopen( "CONOUT$", "w", stdout ); freopen( "CONOUT$", "w", stderr ); freopen( "CONIN$", "r", stdin ); - intf_Msg( VERSION_MESSAGE ); + printf( VERSION_MESSAGE "\n" ); #endif - intf_Msg( "rc: remote control interface initialized, `h' for help" ); + printf( "remote control interface initialized, `h' for help\n" ); return( 0 ); } @@ -149,47 +140,22 @@ static void intf_Close( intf_thread_t *p_intf ) *****************************************************************************/ static void intf_Run( intf_thread_t *p_intf ) { - char p_cmd[ MAX_LINE_LENGTH + 1 ]; - int i_cmd_pos; - boolean_t b_complete = 0; - - int i_dummy; - off_t i_oldpos = 0; - off_t i_newpos; - fd_set fds; /* stdin changed? */ + char p_buffer[ MAX_LINE_LENGTH + 1 ]; + vlc_bool_t b_complete = 0; + + int i_dummy; + off_t i_oldpos = 0; + off_t i_newpos; + fd_set fds; /* stdin changed? */ struct timeval tv; /* how long to wait */ - double f_cpos; - double f_ratio = 1; + double f_ratio = 1; + + input_thread_t *p_input; while( !p_intf->b_die ) { - vlc_mutex_lock( &p_input_bank->lock ); -#define S p_input_bank->pp_input[0]->stream - if( p_input_bank->pp_input[0] != NULL ) - { - /* Get position */ - vlc_mutex_lock( &S.stream_lock ); - if( !p_input_bank->pp_input[0]->b_die && S.i_mux_rate ) - { - f_ratio = 1.0 / ( 50 * S.i_mux_rate ); - i_newpos = S.p_selected_area->i_tell * f_ratio; - - if( i_oldpos != i_newpos ) - { - i_oldpos = i_newpos; - intf_Msg( "rc: pos: %li s / %li s", (long int)i_newpos, - (long int)( f_ratio * - S.p_selected_area->i_size ) ); - } - } - vlc_mutex_unlock( &S.stream_lock ); - } -#undef S - vlc_mutex_unlock( &p_input_bank->lock ); - b_complete = 0; - i_cmd_pos = 0; /* Check stdin */ tv.tv_sec = 0; @@ -197,79 +163,98 @@ static void intf_Run( intf_thread_t *p_intf ) FD_ZERO( &fds ); FD_SET( STDIN_FILENO, &fds ); - if( select( 32, &fds, NULL, NULL, &tv ) ) + i_dummy = select( 32, &fds, NULL, NULL, &tv ); + if( i_dummy > 0 ) { + int i_size = 0; + while( !p_intf->b_die - && i_cmd_pos < MAX_LINE_LENGTH - && read( STDIN_FILENO, p_cmd + i_cmd_pos, 1 ) > 0 - && p_cmd[ i_cmd_pos ] != '\r' - && p_cmd[ i_cmd_pos ] != '\n' ) + && i_size < MAX_LINE_LENGTH + && read( STDIN_FILENO, p_buffer + i_size, 1 ) > 0 + && p_buffer[ i_size ] != '\r' + && p_buffer[ i_size ] != '\n' ) { - i_cmd_pos++; + i_size++; } - if( i_cmd_pos == MAX_LINE_LENGTH - || p_cmd[ i_cmd_pos ] == '\r' - || p_cmd[ i_cmd_pos ] == '\n' ) + if( i_size == MAX_LINE_LENGTH + || p_buffer[ i_size ] == '\r' + || p_buffer[ i_size ] == '\n' ) { - p_cmd[ i_cmd_pos ] = 0; + p_buffer[ i_size ] = 0; b_complete = 1; } } - vlc_mutex_lock( &p_input_bank->lock ); + /* Manage the input part */ + p_input = vlc_object_find( p_intf->p_vlc, + VLC_OBJECT_INPUT, FIND_CHILD ); + + if( p_input ) + { + /* Get position */ + vlc_mutex_lock( &p_input->stream.stream_lock ); + if( !p_input->b_die && p_input->stream.i_mux_rate ) + { +#define A p_input->stream.p_selected_area + f_ratio = 1.0 / ( 50 * p_input->stream.i_mux_rate ); + i_newpos = A->i_tell * f_ratio; + + if( i_oldpos != i_newpos ) + { + i_oldpos = i_newpos; + printf( "pos: %li s / %li s\n", (long int)i_newpos, + (long int)(f_ratio * A->i_size) ); + } +#undef S + } + vlc_mutex_unlock( &p_input->stream.stream_lock ); + } /* Is there something to do? */ if( b_complete == 1 ) { - switch( p_cmd[ 0 ] ) + char *p_cmd = p_buffer; + + switch( p_cmd[0] ) { case 'a': case 'A': - if( p_cmd[ 1 ] == ' ' ) + if( p_cmd[1] == ' ' ) { - intf_PlaylistAdd( p_main->p_playlist, - PLAYLIST_END, p_cmd + 2 ); - if( p_input_bank->pp_input[0] != NULL ) - { - p_input_bank->pp_input[0]->b_eof = 1; - } - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_size - 2 ); +// playlist_Add( p_intf->p_this, PLAYLIST_END, p_cmd + 2 ); +// playlist_Jumpto( p_intf->p_vlc->p_playlist, +// p_intf->p_vlc->p_playlist->i_size-2 ); } break; + case 'd': + case 'D': + vlc_dumpstructure( p_intf->p_vlc ); + break; + case 'p': case 'P': - if( p_input_bank->pp_input[0] != NULL ) + if( p_input ) { - input_SetStatus( p_input_bank->pp_input[0], - INPUT_STATUS_PAUSE ); + input_SetStatus( p_input, INPUT_STATUS_PAUSE ); } break; case 'f': case 'F': - vlc_mutex_lock( &p_vout_bank->lock ); - /* XXX: only fullscreen the first video output */ - if( p_vout_bank->i_count ) + if( p_input ) { - p_vout_bank->pp_vout[0]->i_changes - |= VOUT_FULLSCREEN_CHANGE; - } - vlc_mutex_unlock( &p_vout_bank->lock ); - break; + vout_thread_t *p_vout; + p_vout = vlc_object_find( p_input, + VLC_OBJECT_VOUT, FIND_CHILD ); - case 'm': - case 'M': -#if 0 - double picratio = p_intf->p_input->p_default_vout->i_width - / p_intf->p_input->p_default_vout->i_height; - if (picratio - p_intf->p_input->p_default_vout->i_width=800 - p_intf->p_input->p_default_vout->i_changes |= - VOUT_FULLSCREEN_CHANGE; -#endif + if( p_vout ) + { + p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + vlc_object_release( p_vout ); + } + } break; case 's': @@ -279,12 +264,12 @@ static void intf_Run( intf_thread_t *p_intf ) case 'q': case 'Q': - p_intf->b_die = 1; + p_intf->p_vlc->b_die = 1; break; case 'r': case 'R': - if( p_input_bank->pp_input[0] != NULL ) + if( p_input ) { for( i_dummy = 1; i_dummy < MAX_LINE_LENGTH && p_cmd[ i_dummy ] >= '0' @@ -295,9 +280,8 @@ static void intf_Run( intf_thread_t *p_intf ) } p_cmd[ i_dummy ] = 0; - f_cpos = atof( p_cmd + 1 ); - input_Seek( p_input_bank->pp_input[0], - (off_t) (f_cpos / f_ratio) ); + input_Seek( p_input, (off_t)atoi( p_cmd + 1 ), + INPUT_SEEK_SECONDS | INPUT_SEEK_SET ); /* rcreseek(f_cpos); */ } break; @@ -305,25 +289,27 @@ static void intf_Run( intf_thread_t *p_intf ) case '?': case 'h': case 'H': - intf_Msg( "rc: help for remote control commands" ); - intf_Msg( "rc: h help" ); - intf_Msg( "rc: a XYZ append XYZ to playlist" ); - intf_Msg( "rc: p toggle pause" ); - intf_Msg( "rc: f toggle fullscreen" ); - intf_Msg( "rc: r X seek in seconds, for instance `r 3.5'" ); - intf_Msg( "rc: q quit" ); - intf_Msg( "rc: end of help" ); + printf( "help for remote control commands\n" ); + printf( "h . . . . . . . . . . . . . . . . . . . . . help\n" ); + printf( "a XYZ . . . . . . . . . . append XYZ to playlist\n" ); + printf( "p . . . . . . . . . . . . . . . . . toggle pause\n" ); + printf( "f . . . . . . . . . . . . . . toggle fullscreen\n" ); + printf( "r X . . . seek in seconds, for instance `r 3.5'\n" ); + printf( "q . . . . . . . . . . . . . . . . . . . . . quit\n" ); + printf( "end of help\n" ); break; default: - intf_Msg( "rc: unknown command `%s'", p_cmd ); + printf( "unknown command `%s'\n", p_cmd ); break; } } - vlc_mutex_unlock( &p_input_bank->lock ); + if( p_input ) + { + vlc_object_release( p_input ); + } - p_intf->pf_manage( p_intf ); msleep( INTF_IDLE_SLEEP ); } } diff --git a/plugins/vcd/cdrom_tools.c b/plugins/vcd/cdrom_tools.c index e2cb9df563..5fea483fe3 100644 --- a/plugins/vcd/cdrom_tools.c +++ b/plugins/vcd/cdrom_tools.c @@ -2,7 +2,7 @@ * cdrom_tools.c: cdrom tools ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: cdrom_tools.c,v 1.4 2002/04/27 02:20:32 jobi Exp $ + * $Id: cdrom_tools.c,v 1.5 2002/06/01 12:32:00 sam Exp $ * * Author: Johan Bilien * Jon Lech Johansen @@ -28,7 +28,7 @@ #include #include -#include +#include #ifdef HAVE_UNISTD_H # include @@ -83,7 +83,7 @@ int ioctl_GetTrackCount( int i_fd, const char *psz_dev ) if( ( pTOC = getTOC( psz_dev ) ) == NULL ) { - intf_ErrMsg( "vcd error: failed to get the TOC" ); +//X intf_ErrMsg( "vcd error: failed to get the TOC" ); return( -1 ); } @@ -97,7 +97,7 @@ int ioctl_GetTrackCount( int i_fd, const char *psz_dev ) if( ioctl( i_fd, CDIOREADTOCHEADER, &tochdr ) == -1 ) { - intf_ErrMsg( "vcd error: could not read TOCHDR" ); +//X intf_ErrMsg( "vcd error: could not read TOCHDR" ); return -1; } @@ -109,7 +109,7 @@ int ioctl_GetTrackCount( int i_fd, const char *psz_dev ) /* First we read the TOC header */ if( ioctl( i_fd, CDROMREADTOCHDR, &tochdr ) == -1 ) { - intf_ErrMsg( "vcd error: could not read TOCHDR" ); +//X intf_ErrMsg( "vcd error: could not read TOCHDR" ); return -1; } @@ -136,7 +136,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) if( ( pTOC = getTOC( psz_dev ) ) == NULL ) { - intf_ErrMsg( "vcd error: failed to get the TOC" ); +//X intf_ErrMsg( "vcd error: failed to get the TOC" ); return( NULL ); } @@ -146,7 +146,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) p_sectors = malloc( (i_tracks + 1) * sizeof(int) ); if( p_sectors == NULL ) { - intf_ErrMsg( "vcd error: could not allocate p_sectors" ); +//X intf_ErrMsg( "vcd error: could not allocate p_sectors" ); freeTOC( pTOC ); return NULL; } @@ -169,7 +169,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) if( i_leadout == -1 ) { - intf_ErrMsg( "vcd error: leadout not found" ); +//X intf_ErrMsg( "vcd error: leadout not found" ); free( p_sectors ); freeTOC( pTOC ); return( NULL ); @@ -188,7 +188,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) p_sectors = malloc( (i_tracks + 1) * sizeof(int) ); if( p_sectors == NULL ) { - intf_ErrMsg( "vcd error: could not allocate p_sectors" ); +//X intf_ErrMsg( "vcd error: could not allocate p_sectors" ); return NULL; } @@ -198,7 +198,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) toc_entries.data = (struct cd_toc_entry *) malloc( toc_entries.data_len ); if( toc_entries.data == NULL ) { - intf_ErrMsg( "vcd error: not enoug memory" ); +//X intf_ErrMsg( "vcd error: not enoug memory" ); free( p_sectors ); return NULL; } @@ -206,7 +206,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) /* Read the TOC */ if( ioctl( i_fd, CDIOREADTOCENTRYS, &toc_entries ) == -1 ) { - intf_ErrMsg( "vcd error: could not read the TOC" ); +//X intf_ErrMsg( "vcd error: could not read the TOC" ); free( p_sectors ); free( toc_entries.data ); return NULL; @@ -224,7 +224,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) /* First we read the TOC header */ if( ioctl( i_fd, CDROMREADTOCHDR, &tochdr ) == -1 ) { - intf_ErrMsg( "vcd error: could not read TOCHDR" ); +//X intf_ErrMsg( "vcd error: could not read TOCHDR" ); return NULL; } @@ -233,7 +233,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) p_sectors = malloc( (i_tracks + 1) * sizeof(int) ); if( p_sectors == NULL ) { - intf_ErrMsg( "vcd error: could not allocate p_sectors" ); +//X intf_ErrMsg( "vcd error: could not allocate p_sectors" ); return NULL; } @@ -246,7 +246,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) if( ioctl( i_fd, CDROMREADTOCENTRY, &tocent ) == -1 ) { - intf_ErrMsg( "vcd error: could not read TOCENTRY" ); +//X intf_ErrMsg( "vcd error: could not read TOCENTRY" ); free( p_sectors ); return NULL; } @@ -281,7 +281,7 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer ) if( ioctl( i_fd, DKIOCCDREAD, &cd_read ) == -1 ) { - intf_ErrMsg( "vcd error: could not read block %d", i_sector ); +//X intf_ErrMsg( "vcd error: could not read block %d", i_sector ); return( -1 ); } @@ -291,19 +291,19 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer ) if( ioctl( i_fd, CDRIOCSETBLOCKSIZE, &i_size ) == -1 ) { - intf_ErrMsg( "vcd error: Could not set block size" ); +//X intf_ErrMsg( "vcd error: Could not set block size" ); return( -1 ); } if( lseek( i_fd, i_sector * VCD_SECTOR_SIZE, SEEK_SET ) == -1 ) { - intf_ErrMsg( "vcd error: Could not lseek to sector %d", i_sector ); +//X intf_ErrMsg( "vcd error: Could not lseek to sector %d", i_sector ); return( -1 ); } if( read( i_fd, p_block, VCD_SECTOR_SIZE ) == -1 ) { - intf_ErrMsg( "vcd error: Could not read sector %d", i_sector ); +//X intf_ErrMsg( "vcd error: Could not read sector %d", i_sector ); return( -1 ); } @@ -318,14 +318,14 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer ) if( ioctl(i_fd, CDROMREADRAW, p_block) == -1 ) { - intf_ErrMsg( "vcd error: could not read block %i from disc", - i_sector ); +//X intf_ErrMsg( "vcd error: could not read block %i from disc", +//X i_sector ); return( -1 ); } #endif /* We don't want to keep the header of the read sector */ - FAST_MEMCPY( p_buffer, p_block + VCD_DATA_START, VCD_DATA_SIZE ); + memcpy( p_buffer, p_block + VCD_DATA_START, VCD_DATA_SIZE ); return( 0 ); } @@ -347,7 +347,7 @@ CDTOC *getTOC( const char *psz_dev ) if( psz_dev == NULL ) { - intf_ErrMsg( "vcd error: invalid device path" ); +//X intf_ErrMsg( "vcd error: invalid device path" ); return( NULL ); } @@ -364,7 +364,7 @@ CDTOC *getTOC( const char *psz_dev ) /* get port for IOKit communication */ if( ( ret = IOMasterPort( MACH_PORT_NULL, &port ) ) != KERN_SUCCESS ) { - intf_ErrMsg( "vcd error: IOMasterPort: 0x%08x", ret ); +//X intf_ErrMsg( "vcd error: IOMasterPort: 0x%08x", ret ); return( NULL ); } @@ -373,7 +373,7 @@ CDTOC *getTOC( const char *psz_dev ) port, IOBSDNameMatching( port, 0, psz_devname ), &iterator ) ) != KERN_SUCCESS ) { - intf_ErrMsg( "vcd error: IOServiceGetMatchingServices: 0x%08x", ret ); +//X intf_ErrMsg( "vcd error: IOServiceGetMatchingServices: 0x%08x", ret ); return( NULL ); } @@ -387,8 +387,8 @@ CDTOC *getTOC( const char *psz_dev ) if( ( ret = IORegistryEntryGetParentIterator( service, kIOServicePlane, &iterator ) ) != KERN_SUCCESS ) { - intf_ErrMsg( "vcd error: " \ - "IORegistryEntryGetParentIterator: 0x%08x", ret ); +//X intf_ErrMsg( "vcd error: " +//X "IORegistryEntryGetParentIterator: 0x%08x", ret ); IOObjectRelease( service ); return( NULL ); } @@ -400,7 +400,7 @@ CDTOC *getTOC( const char *psz_dev ) if( service == NULL ) { - intf_ErrMsg( "vcd error: search for kIOCDMediaClass came up empty" ); +//X intf_ErrMsg( "vcd error: search for kIOCDMediaClass came up empty" ); return( NULL ); } @@ -408,8 +408,8 @@ CDTOC *getTOC( const char *psz_dev ) if( ( ret = IORegistryEntryCreateCFProperties( service, &properties, kCFAllocatorDefault, kNilOptions ) ) != KERN_SUCCESS ) { - intf_ErrMsg( "vcd error: " \ - " IORegistryEntryCreateCFProperties: 0x%08x", ret ); +//X intf_ErrMsg( "vcd error: " +//X " IORegistryEntryCreateCFProperties: 0x%08x", ret ); IOObjectRelease( service ); return( NULL ); } @@ -431,7 +431,7 @@ CDTOC *getTOC( const char *psz_dev ) } else { - intf_ErrMsg( "vcd error: CFDictionaryGetValue failed" ); +//X intf_ErrMsg( "vcd error: CFDictionaryGetValue failed" ); } CFRelease( properties ); diff --git a/plugins/vcd/input_vcd.c b/plugins/vcd/input_vcd.c index 98361bef28..c263b7148b 100644 --- a/plugins/vcd/input_vcd.c +++ b/plugins/vcd/input_vcd.c @@ -26,7 +26,8 @@ #include #include -#include +#include +#include #ifdef HAVE_UNISTD_H # include @@ -48,11 +49,6 @@ # include "input_iovec.h" #endif -#include "stream_control.h" -#include "input_ext-intf.h" -#include "input_ext-dec.h" -#include "input_ext-plugins.h" - #include "input_vcd.h" #include "cdrom_tools.h" @@ -65,12 +61,12 @@ *****************************************************************************/ /* called from outside */ -static int VCDOpen ( struct input_thread_s *); -static void VCDClose ( struct input_thread_s *); -static int VCDRead ( struct input_thread_s *, byte_t *, size_t ); -static void VCDSeek ( struct input_thread_s *, off_t ); -static int VCDSetArea ( struct input_thread_s *, struct input_area_s * ); -static int VCDSetProgram ( struct input_thread_s *, pgrm_descriptor_t * ); +static int VCDOpen ( input_thread_t *); +static void VCDClose ( input_thread_t *); +static int VCDRead ( input_thread_t *, byte_t *, size_t ); +static void VCDSeek ( input_thread_t *, off_t ); +static int VCDSetArea ( input_thread_t *, input_area_t * ); +static int VCDSetProgram ( input_thread_t *, pgrm_descriptor_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -95,7 +91,7 @@ void _M( access_getfunctions )( function_list_t * p_function_list ) /***************************************************************************** * VCDOpen: open vcd *****************************************************************************/ -static int VCDOpen( struct input_thread_s *p_input ) +static int VCDOpen( input_thread_t *p_input ) { char * psz_orig; char * psz_parser; @@ -147,22 +143,21 @@ static int VCDOpen( struct input_thread_s *p_input ) free( psz_orig ); return -1; } - psz_source = config_GetPszVariable( "vcd" ); + psz_source = config_GetPsz( p_input, "vcd" ); } /* test the type of file given */ if( stat( psz_source, &stat_info ) == -1 ) { - intf_ErrMsg( "input: vcd: cannot stat() source `%s' (%s)", - psz_source, strerror(errno)); + msg_Err( p_input, "cannot stat() source `%s' (%s)", + psz_source, strerror(errno)); return( -1 ); } if( !S_ISBLK(stat_info.st_mode) && !S_ISCHR(stat_info.st_mode)) { - intf_WarnMsg( 3, "input : VCD plugin discarded" - " (not a valid drive)" ); + msg_Warn( p_input, "vcd module discarded (not a valid drive)" ); return -1; } @@ -171,7 +166,7 @@ static int VCDOpen( struct input_thread_s *p_input ) if( p_vcd == NULL ) { - intf_ErrMsg( "vcd error: out of memory" ); + msg_Err( p_input, "out of memory" ); return -1; } @@ -193,7 +188,7 @@ static int VCDOpen( struct input_thread_s *p_input ) if( p_vcd->i_handle == -1 ) { - intf_ErrMsg( "input: vcd: Could not open %s\n", psz_source ); + msg_Err( p_input, "could not open %s\n", psz_source ); free (p_vcd); return -1; } @@ -203,14 +198,14 @@ static int VCDOpen( struct input_thread_s *p_input ) psz_source ); if( p_vcd->nb_tracks < 0 ) { - intf_ErrMsg( "input: vcd: was unable to count tracks" ); + msg_Err( p_input, "unable to count tracks" ); close( p_vcd->i_handle ); free( p_vcd ); return -1; } else if( p_vcd->nb_tracks <= 1 ) { - intf_ErrMsg( "input: vcd: no movie tracks found" ); + msg_Err( p_input, "no movie tracks found" ); close( p_vcd->i_handle ); free( p_vcd ); return -1; @@ -220,7 +215,7 @@ static int VCDOpen( struct input_thread_s *p_input ) psz_source ); if( p_vcd->p_sectors == NULL ) { - input_BuffersEnd( p_input->p_method_data ); + input_BuffersEnd( p_input, p_input->p_method_data ); close( p_vcd->i_handle ); free( p_vcd ); return -1; @@ -270,7 +265,7 @@ static int VCDOpen( struct input_thread_s *p_input ) /***************************************************************************** * VCDClose: closes vcd *****************************************************************************/ -static void VCDClose( struct input_thread_s *p_input ) +static void VCDClose( input_thread_t *p_input ) { thread_vcd_data_t *p_vcd = (thread_vcd_data_t *)p_input->p_access_data; @@ -306,8 +301,7 @@ static int VCDRead( input_thread_t * p_input, byte_t * p_buffer, if ( ioctl_ReadSector( p_vcd->i_handle, p_vcd->i_sector, p_buffer + i_index * VCD_DATA_SIZE ) < 0 ) { - intf_ErrMsg( "input: vcd: could not read sector %d\n", - p_vcd->i_sector ); + msg_Err( p_input, "could not read sector %d", p_vcd->i_sector ); return -1; } @@ -322,7 +316,7 @@ static int VCDRead( input_thread_t * p_input, byte_t * p_buffer, p_area = p_input->stream.pp_areas[ p_input->stream.p_selected_area->i_id + 1 ]; - intf_WarnMsg( 4, "input: vcd info: new title" ); + msg_Dbg( p_input, "new title" ); p_area->i_part = 1; VCDSetArea( p_input, p_area ); @@ -336,13 +330,12 @@ static int VCDRead( input_thread_t * p_input, byte_t * p_buffer, if ( ioctl_ReadSector( p_vcd->i_handle, p_vcd->i_sector, p_last_sector ) < 0 ) { - intf_ErrMsg( "input: vcd: could not read sector %d\n", - p_vcd->i_sector ); + msg_Err( p_input, "could not read sector %d", p_vcd->i_sector ); return -1; } - FAST_MEMCPY( p_buffer + i_blocks * VCD_DATA_SIZE, - p_last_sector, i_len % VCD_DATA_SIZE ); + p_input->p_vlc->pf_memcpy( p_buffer + i_blocks * VCD_DATA_SIZE, + p_last_sector, i_len % VCD_DATA_SIZE ); i_read += i_len % VCD_DATA_SIZE; } diff --git a/plugins/vcd/input_vcd.h b/plugins/vcd/input_vcd.h index 71a15658a7..f65db77098 100644 --- a/plugins/vcd/input_vcd.h +++ b/plugins/vcd/input_vcd.h @@ -2,7 +2,7 @@ * input_vcd.h: thread structure of the VCD plugin ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_vcd.h,v 1.2 2001/12/19 23:19:20 sam Exp $ + * $Id: input_vcd.h,v 1.3 2002/06/01 12:32:00 sam Exp $ * * Author: Johan Bilien * @@ -31,7 +31,7 @@ typedef struct thread_vcd_data_s int i_track; /* Current track */ int i_sector; /* Current Sector */ int * p_sectors; /* Track sectors */ - boolean_t b_end_of_track; /* If the end of track was reached */ + vlc_bool_t b_end_of_track; /* If the end of track was reached */ } thread_vcd_data_t; diff --git a/plugins/vcd/vcd.c b/plugins/vcd/vcd.c index 1b3147cfa9..7b1e369a3a 100644 --- a/plugins/vcd/vcd.c +++ b/plugins/vcd/vcd.c @@ -2,7 +2,7 @@ * vcd.c : VCD input module for vlc ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: vcd.c,v 1.11 2002/05/22 12:50:21 jobi Exp $ + * $Id: vcd.c,v 1.12 2002/06/01 12:32:00 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,7 +27,7 @@ #include /* malloc(), free() */ #include /* strdup() */ -#include +#include /***************************************************************************** * Capabilities defined in the other files. @@ -43,7 +43,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("VCD input module") ) ADD_CAPABILITY( ACCESS, 80 ) - ADD_SHORTCUT( "vcd" ) ADD_SHORTCUT( "svcd" ) MODULE_INIT_STOP diff --git a/plugins/win32/about.cpp b/plugins/win32/about.cpp index e3b9bfc659..fbe4a915b8 100644 --- a/plugins/win32/about.cpp +++ b/plugins/win32/about.cpp @@ -23,9 +23,8 @@ #include #pragma hdrstop -#include - -#include "interface.h" +#include +#include #include "about.h" #include "win32_common.h" @@ -34,7 +33,7 @@ //#pragma package(smart_init) #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; //--------------------------------------------------------------------------- __fastcall TAboutDlg::TAboutDlg( TComponent* Owner ) diff --git a/plugins/win32/control.cpp b/plugins/win32/control.cpp index 1a0ff337f3..6dbdc03029 100644 --- a/plugins/win32/control.cpp +++ b/plugins/win32/control.cpp @@ -22,17 +22,12 @@ #include -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" +#include +#include #include "win32_common.h" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; /**************************************************************************** * Control functions: this is where the functions are defined @@ -49,18 +44,18 @@ bool ControlBack( TObject *Sender ) bool ControlStop( TObject *Sender ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* end playing item */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + p_intfGlobal->p_vlc->p_playlist->i_index--; + p_intfGlobal->p_vlc->p_playlist->b_stopped = 1; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); } @@ -70,32 +65,32 @@ bool ControlStop( TObject *Sender ) bool ControlPlay( TObject *Sender ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); - p_main->p_playlist->b_stopped = 0; + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + p_intfGlobal->p_vlc->p_playlist->b_stopped = 0; } else { - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); - if( p_main->p_playlist->b_stopped ) + if( p_intfGlobal->p_vlc->p_playlist->b_stopped ) { - if( p_main->p_playlist->i_size ) + if( p_intfGlobal->p_vlc->p_playlist->i_size ) { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - intf_PlaylistJumpto( p_main->p_playlist, - p_main->p_playlist->i_index ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); + intf_PlaylistJumpto( p_intfGlobal->p_vlc->p_playlist, + p_intfGlobal->p_vlc->p_playlist->i_index ); } else { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); p_intfGlobal->p_sys->p_window->MenuOpenFileClick( Sender ); } } else { - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); } } @@ -106,13 +101,13 @@ bool ControlPlay( TObject *Sender ) bool ControlPause( TObject *Sender ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); + p_intfGlobal->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); } return true; @@ -121,13 +116,13 @@ bool ControlPause( TObject *Sender ) bool ControlSlow( TObject *Sender ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); + p_intfGlobal->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); } return true; @@ -136,13 +131,13 @@ bool ControlSlow( TObject *Sender ) bool ControlFast( TObject *Sender ) { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->b_stopped = 0; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); + p_intfGlobal->p_vlc->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); } return true; diff --git a/plugins/win32/disc.cpp b/plugins/win32/disc.cpp index 75630a3b34..a285071425 100644 --- a/plugins/win32/disc.cpp +++ b/plugins/win32/disc.cpp @@ -23,13 +23,8 @@ #include #pragma hdrstop -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" +#include +#include #include "disc.h" #include "win32_common.h" @@ -39,7 +34,7 @@ #pragma link "CSPIN" #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; //--------------------------------------------------------------------------- __fastcall TDiscDlg::TDiscDlg( TComponent* Owner ) @@ -69,7 +64,7 @@ void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender ) void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender ) { AnsiString Device, Source, Method, Title, Chapter; - int i_end = p_main->p_playlist->i_size; + int i_end = p_intfGlobal->p_vlc->p_playlist->i_size; Hide(); @@ -91,18 +86,20 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender ) /* Build source name and add it to playlist */ Source = Method + ":" + Device + "@" + Title + "," + Chapter; - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, Source.c_str() ); + intf_PlaylistAdd( p_intfGlobal->p_vlc->p_playlist, + PLAYLIST_END, Source.c_str() ); /* update the display */ - p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_main->p_playlist ); + p_intfGlobal->p_sys->p_playlist-> + UpdateGrid( p_intfGlobal->p_vlc->p_playlist ); /* stop current item, select added item */ - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + intf_PlaylistJumpto( p_intfGlobal->p_vlc->p_playlist, i_end - 1 ); } //--------------------------------------------------------------------------- void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender ) @@ -112,11 +109,11 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender ) if( RadioGroupType->ItemIndex == 0 ) { - psz_device = config_GetPszVariable( "dvd" ); + psz_device = config_GetPsz( p_intfGlobal, "dvd" ); } else { - psz_device = config_GetPszVariable( "vcd" ); + psz_device = config_GetPsz( p_intfGlobal, "vcd" ); } if( psz_device ) diff --git a/plugins/win32/intf_win32.cpp b/plugins/win32/intf_win32.cpp index 5efa16852a..5f89bf8161 100644 --- a/plugins/win32/intf_win32.cpp +++ b/plugins/win32/intf_win32.cpp @@ -28,18 +28,14 @@ #include /* ENOMEM */ #include /* strerror() */ -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" +#include +#include #include "mainframe.h" #include "menu.h" #include "win32_common.h" -struct intf_thread_s *p_intfGlobal; +intf_thread_t *p_intfGlobal; /***************************************************************************** * Local prototypes. @@ -70,13 +66,13 @@ static int intf_Open( intf_thread_t *p_intf ) p_intf->p_sys = (intf_sys_s *) malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + msg_Err( p_intf, "out of memory" ); return( 1 ); }; p_intfGlobal = p_intf; - p_intf->p_sys->p_sub = intf_MsgSub(); + p_intf->p_sys->p_sub = msg_Subscribe( p_intf->p_this ); /* Initialize Win32 thread */ p_intf->p_sys->b_playing = 0; @@ -92,7 +88,7 @@ static int intf_Open( intf_thread_t *p_intf ) *****************************************************************************/ static void intf_Close( intf_thread_t *p_intf ) { - intf_MsgUnsub( p_intf->p_sys->p_sub ); + msg_Unsubscribe( p_intf->p_this, p_intf->p_sys->p_sub ); /* Destroy structure */ free( p_intf->p_sys ); @@ -144,14 +140,14 @@ int Win32Manage( intf_thread_t *p_intf ) /* Update the playlist */ p_intf->p_sys->p_playlist->Manage( p_intf ); - if( p_input_bank->pp_input[0] != NULL ) + if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL ) { - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); - if( !p_input_bank->pp_input[0]->b_die ) + if( !p_intf->p_vlc->p_input_bank->pp_input[0]->b_die ) { /* New input or stream map change */ - if( p_input_bank->pp_input[0]->stream.b_changed ) + if( p_intf->p_vlc->p_input_bank->pp_input[0]->stream.b_changed ) { p_intf->p_sys->p_window->ModeManage(); SetupMenus( p_intf ); @@ -159,13 +155,13 @@ int Win32Manage( intf_thread_t *p_intf ) } /* Manage the slider */ - if( p_input_bank->pp_input[0]->stream.b_seekable && + if( p_intf->p_vlc->p_input_bank->pp_input[0]->stream.b_seekable && p_intf->p_sys->b_playing ) { TTrackBar * TrackBar = p_intf->p_sys->p_window->TrackBar; off_t NewValue = TrackBar->Position; -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area /* If the user hasn't touched the slider since the last time, * then the input can safely change it */ if( NewValue == p_intf->p_sys->OldValue ) @@ -183,9 +179,9 @@ int Win32Manage( intf_thread_t *p_intf ) (off_t)SLIDER_MAX_VALUE; /* release the lock to be able to seek */ - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); - input_Seek( p_input_bank->pp_input[0], i_seek ); - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); + input_Seek( p_intf->p_vlc->p_input_bank->pp_input[0]->p_this, i_seek, INPUT_SEEK_SET ); + vlc_mutex_lock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); /* Update the old value */ p_intf->p_sys->OldValue = NewValue; @@ -198,16 +194,16 @@ int Win32Manage( intf_thread_t *p_intf ) } if( p_intf->p_sys->i_part != - p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) + p_intf->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) { // p_intf->p_sys->b_chapter_update = 1; SetupMenus( p_intf ); } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } - else if( p_intf->p_sys->b_playing && !p_intf->b_die ) + else if( p_intf->p_sys->b_playing && !p_intf->p_vlc->b_die ) { p_intf->p_sys->p_window->ModeManage(); p_intf->p_sys->b_playing = 0; @@ -216,7 +212,7 @@ int Win32Manage( intf_thread_t *p_intf ) /* Manage core vlc functions through the callback */ p_intf->pf_manage( p_intf ); - if( p_intf->b_die ) + if( p_intf->p_vlc->b_die ) { vlc_mutex_unlock( &p_intf->change_lock ); diff --git a/plugins/win32/mainframe.cpp b/plugins/win32/mainframe.cpp index 2f265c9265..a056b70a41 100644 --- a/plugins/win32/mainframe.cpp +++ b/plugins/win32/mainframe.cpp @@ -23,17 +23,9 @@ #include #pragma hdrstop -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "video.h" -#include "video_output.h" - -#include "interface.h" -#include "intf_playlist.h" -#include "intf_eject.h" +#include +#include +#include #include "mainframe.h" #include "menu.h" @@ -53,7 +45,7 @@ #pragma link "CSPIN" #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; extern int Win32Manage( intf_thread_t *p_intf ); //--------------------------------------------------------------------------- @@ -99,21 +91,21 @@ void __fastcall TMainFrameDlg::TrackBarChange( TObject *Sender ) * the stream. It is called whenever the slider changes its value. * The lock has to be taken before the function is called */ -// vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); +// vlc_mutex_lock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { -#define p_area p_input_bank->pp_input[0]->stream.p_selected_area +#define p_area p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area char psz_time[ OFFSETTOTIME_MAX_SIZE ]; off_t Value = TrackBar->Position; GroupBoxSlider->Caption = - input_OffsetToTime( p_input_bank->pp_input[0], psz_time, + input_OffsetToTime( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], psz_time, ( p_area->i_size * Value ) / (off_t)SLIDER_MAX_VALUE ); #undef p_area } -// vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); +// vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } //--------------------------------------------------------------------------- void __fastcall TMainFrameDlg::FormClose( TObject *Sender, @@ -122,7 +114,7 @@ void __fastcall TMainFrameDlg::FormClose( TObject *Sender, intf_thread_t *p_intf = p_intfGlobal; vlc_mutex_lock( &p_intf->change_lock ); - p_intf->b_die = 1; + p_intf->p_vlc->b_die = 1; vlc_mutex_unlock( &p_intf->change_lock ); /* we don't destroy the form immediatly */ @@ -136,25 +128,25 @@ void __fastcall TMainFrameDlg::FormClose( TObject *Sender, ****************************************************************************/ void __fastcall TMainFrameDlg::MenuOpenFileClick( TObject *Sender ) { - int i_end = p_main->p_playlist->i_size; + int i_end = p_intfGlobal->p_vlc->p_playlist->i_size; AnsiString FileName; if( OpenDialog1->Execute() ) { /* add the new file to the interface playlist */ FileName = OpenDialog1->FileName; - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, + intf_PlaylistAdd( p_intfGlobal->p_vlc->p_playlist, PLAYLIST_END, (char*)FileName.c_str() ); /* update the plugin display */ - p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_main->p_playlist ); + p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_intfGlobal->p_vlc->p_playlist ); /* end current item, select added item */ - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + intf_PlaylistJumpto( p_intfGlobal->p_vlc->p_playlist, i_end - 1 ); }; } //--------------------------------------------------------------------------- @@ -192,13 +184,13 @@ void __fastcall TMainFrameDlg::MenuHideinterfaceClick( TObject *Sender ) //--------------------------------------------------------------------------- void __fastcall TMainFrameDlg::MenuFullscreenClick( TObject *Sender ) { - if( p_vout_bank->i_count ) + if( p_intfGlobal->p_vlc->p_vout_bank->i_count ) { - vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_vout_bank->pp_vout[0]->change_lock ); - p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; + p_intfGlobal->p_vlc->p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; - vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_vout_bank->pp_vout[0]->change_lock ); } } //--------------------------------------------------------------------------- @@ -211,7 +203,7 @@ void __fastcall TMainFrameDlg::MenuPlaylistClick( TObject *Sender ) } else { - p_playlist->UpdateGrid( p_main->p_playlist ); + p_playlist->UpdateGrid( p_intfGlobal->p_vlc->p_playlist ); p_playlist->Show(); } } @@ -308,14 +300,14 @@ void __fastcall TMainFrameDlg::ToolButtonEjectClick( TObject *Sender ) * If it's neither a VCD nor a DVD, then return */ - if( p_main->p_playlist->current.psz_name != NULL ) + if( p_intfGlobal->p_vlc->p_playlist->current.psz_name != NULL ) { - if( strncmp( p_main->p_playlist->current.psz_name, "dvd", 3 ) - || strncmp( p_main->p_playlist->current.psz_name, "vcd", 3 ) ) + if( strncmp( p_intfGlobal->p_vlc->p_playlist->current.psz_name, "dvd", 3 ) + || strncmp( p_intfGlobal->p_vlc->p_playlist->current.psz_name, "vcd", 3 ) ) { /* Determine the device name by omitting the first 4 characters * and keeping 3 characters */ - Device = strdup( ( p_main->p_playlist->current.psz_name + 4 ) ); + Device = strdup( ( p_intfGlobal->p_vlc->p_playlist->current.psz_name + 4 ) ); Device = Device.SubString( 1, 2 ); } } @@ -439,10 +431,12 @@ void __fastcall TMainFrameDlg::PopupNetworkStreamClick( TObject *Sender ) void __fastcall TMainFrameDlg::ButtonTitlePrevClick( TObject *Sender ) { intf_thread_t * p_intf; + input_bank_t * p_input_bank; input_area_t * p_area; int i_id; p_intf = p_intfGlobal; + p_input_bank = p_intf->p_vlc->p_input_bank; i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1; /* Disallow area 0 since it is used for video_ts.vob */ @@ -463,10 +457,12 @@ void __fastcall TMainFrameDlg::ButtonTitlePrevClick( TObject *Sender ) void __fastcall TMainFrameDlg::ButtonTitleNextClick( TObject *Sender ) { intf_thread_t * p_intf; + input_bank_t * p_input_bank; input_area_t * p_area; int i_id; p_intf = p_intfGlobal; + p_input_bank = p_intf->p_vlc->p_input_bank; i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1; if( i_id < p_input_bank->pp_input[0]->stream.i_area_nb ) @@ -486,6 +482,7 @@ void __fastcall TMainFrameDlg::ButtonTitleNextClick( TObject *Sender ) void __fastcall TMainFrameDlg::ButtonChapterPrevClick( TObject *Sender ) { intf_thread_t * p_intf = p_intfGlobal; + input_bank_t * p_input_bank = p_intf->p_vlc->p_input_bank; input_area_t * p_area; p_area = p_input_bank->pp_input[0]->stream.p_selected_area; @@ -507,6 +504,7 @@ void __fastcall TMainFrameDlg::ButtonChapterPrevClick( TObject *Sender ) void __fastcall TMainFrameDlg::ButtonChapterNextClick( TObject *Sender ) { intf_thread_t * p_intf = p_intfGlobal; + input_bank_t * p_input_bank = p_intf->p_vlc->p_input_bank; input_area_t * p_area; p_area = p_input_bank->pp_input[0]->stream.p_selected_area; @@ -533,10 +531,11 @@ void __fastcall TMainFrameDlg::ButtonChapterNextClick( TObject *Sender ) void __fastcall TMainFrameDlg::ButtonGoClick( TObject *Sender ) { intf_thread_t *p_intf = p_intfGlobal; + input_bank_t *p_input_bank = p_intf->p_vlc->p_input_bank; int i_channel; i_channel = SpinEditChannel->Value; - intf_WarnMsg( 3, "intf info: joining channel %d", i_channel ); + msg_Dbg( p_intf, "joining channel %d", i_channel ); vlc_mutex_lock( &p_intf->change_lock ); if( p_input_bank->pp_input[0] != NULL ) @@ -545,21 +544,21 @@ void __fastcall TMainFrameDlg::ButtonGoClick( TObject *Sender ) p_input_bank->pp_input[0]->b_eof = 1; /* update playlist */ - vlc_mutex_lock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intf->p_vlc->p_playlist->change_lock ); - p_main->p_playlist->i_index--; - p_main->p_playlist->b_stopped = 1; + p_intf->p_vlc->p_playlist->i_index--; + p_intf->p_vlc->p_playlist->b_stopped = 1; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_intf->p_vlc->p_playlist->change_lock ); /* FIXME: ugly hack to close input and outputs */ p_intf->pf_manage( p_intf ); } - network_ChannelJoin( i_channel ); + network_ChannelJoin( p_intf->p_this, i_channel ); /* FIXME 2 */ - p_main->p_playlist->b_stopped = 0; + p_intf->p_vlc->p_playlist->b_stopped = 0; p_intf->pf_manage( p_intf ); vlc_mutex_unlock( &p_intf->change_lock ); @@ -578,6 +577,7 @@ void __fastcall TMainFrameDlg::ButtonGoClick( TObject *Sender ) void __fastcall TMainFrameDlg::ModeManage() { intf_thread_t * p_intf = p_intfGlobal; + input_bank_t * p_input_bank = p_intf->p_vlc->p_input_bank; TGroupBox * ActiveGB; int i_Height; bool b_control; @@ -611,7 +611,7 @@ void __fastcall TMainFrameDlg::ModeManage() GroupBoxNetwork->Visible = true; ActiveGB = GroupBoxNetwork; LabelServer->Caption = p_input_bank->pp_input[0]->psz_source; - if( config_GetIntVariable( "network-channel" ) ) + if( config_GetInt( p_intf, "network-channel" ) ) { LabelChannel->Visible = true; } @@ -621,7 +621,7 @@ void __fastcall TMainFrameDlg::ModeManage() } break; default: - intf_WarnMsg( 3, "intf: can't determine input method" ); + msg_Warn( p_intf, "cannot determine input method" ); GroupBoxFile->Visible = true; ActiveGB = GroupBoxFile; LabelFileName->Caption = p_input_bank->pp_input[0]->psz_source; @@ -650,13 +650,13 @@ void __fastcall TMainFrameDlg::ModeManage() p_intf->p_sys->i_part = 0; p_input_bank->pp_input[0]->stream.b_changed = 0; - intf_WarnMsg( 3, "intf: stream has changed, refreshing interface" ); + msg_Dbg( p_intf, "stream has changed, refreshing interface" ); } else { i_Height = StatusBar->Height + ToolBar->Height + 47; - if( config_GetIntVariable( "network-channel" ) ) + if( config_GetInt( p_intf, "network-channel" ) ) { GroupBoxNetwork->Visible = true; LabelChannel->Visible = true; diff --git a/plugins/win32/menu.cpp b/plugins/win32/menu.cpp index e8c4958e50..51ef04e8aa 100644 --- a/plugins/win32/menu.cpp +++ b/plugins/win32/menu.cpp @@ -23,13 +23,8 @@ #include //#pragma hdrstop -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" +#include +#include #include "menu.h" #include "win32_common.h" @@ -38,7 +33,7 @@ /**************************************************************************** * Local Prototypes ****************************************************************************/ -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; static TMenuItem *Index2Item( TMenuItem *, int, bool ); static int Item2Index( TMenuItem *, TMenuItem * ); @@ -105,9 +100,9 @@ static void __fastcall LangChange( TMenuItem *RootCurrent, TMenuItem *Item, } else { - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); - p_es = p_input_bank->pp_input[0]->stream.pp_es[i_es]; - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); + p_es = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i_es]; + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } /* find the current ES */ @@ -123,8 +118,8 @@ static void __fastcall LangChange( TMenuItem *RootCurrent, TMenuItem *Item, } /* exchange them */ - input_ToggleES( p_input_bank->pp_input[0], p_es_old, false ); - input_ToggleES( p_input_bank->pp_input[0], p_es, true ); + input_ToggleES( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], p_es_old, false ); + input_ToggleES( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], p_es, true ); Item->Checked = true; Index2Item( RootOther, i_index + 1, true )->Checked = true; @@ -142,7 +137,7 @@ static void __fastcall ProgramChange( TMenuItem *Item, TMenuItem *RootOther ) int i_program = Item->Tag; /* toggle the program */ - input_ChangeProgram( p_input_bank->pp_input[0], (u16)i_program ); + input_ChangeProgram( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], (u16)i_program ); /* check selected menu items */ Item->Checked = true; @@ -151,13 +146,13 @@ static void __fastcall ProgramChange( TMenuItem *Item, TMenuItem *RootOther ) /* update audio/subtitles menus */ p_intf->p_sys->b_audio_update = 1; p_intf->p_sys->b_spu_update = 1; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); SetupMenus( p_intf ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); p_intf->p_sys->b_audio_update = 0; p_intf->p_sys->b_spu_update = 0; - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } @@ -222,10 +217,10 @@ void __fastcall TMainFrameDlg::PopupNavigationClick( TObject *Sender ) int i_title = DATA2TITLE( Item->Tag ); int i_chapter = DATA2CHAPTER( Item->Tag ); - p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_title]; + p_area = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_title]; p_area->i_part = i_chapter; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], (input_area_t*)p_area ); Item->Checked = true; ItemTitle = Index2Item( MenuTitle, i_title - 1, false ); @@ -237,14 +232,14 @@ void __fastcall TMainFrameDlg::PopupNavigationClick( TObject *Sender ) else { /* new title => we must rebuild the chapter menu */ - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); RadioMenu( MenuChapter, "Chapter", - p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, i_chapter, MenuChapterClick ); - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); } - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } /* @@ -257,13 +252,13 @@ void __fastcall TMainFrameDlg::MenuTitleClick( TObject *Sender ) TMenuItem * ItemTitle; int i_title = Item->Tag; - input_ChangeArea( p_input_bank->pp_input[0], - p_input_bank->pp_input[0]->stream.pp_areas[i_title] ); + input_ChangeArea( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_title] ); Item->Checked = true; ItemTitle = Index2Item( PopupNavigation, i_title - 1, false ); Index2Item( ItemTitle, 0, false )->Checked = true; - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } /* @@ -278,16 +273,16 @@ void __fastcall TMainFrameDlg::MenuChapterClick( TObject *Sender ) int i_title; int i_chapter = Item->Tag; - p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area; p_area->i_part = i_chapter; - input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + input_ChangeArea( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], (input_area_t*)p_area ); - i_title = p_input_bank->pp_input[0]->stream.p_selected_area->i_id; + i_title = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id; ItemTitle = Index2Item( PopupNavigation, i_title - 1, false ); Index2Item( ItemTitle, i_chapter - 1, false )->Checked = true; - input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + input_SetStatus( p_intfGlobal->p_vlc->p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); } @@ -410,10 +405,10 @@ static void __fastcall ProgramMenu( TMenuItem * Root, ItemActive = NULL; /* create a set of program buttons and append them to the container */ - for( i = 0; i < p_input_bank->pp_input[0]->stream.i_pgrm_number; i++ ) + for( i = 0; i < p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.i_pgrm_number; i++ ) { Name.sprintf( "id %d", - p_input_bank->pp_input[0]->stream.pp_programs[i]->i_number ); + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_programs[i]->i_number ); Item = new TMenuItem( Root ); Item->Caption = Name; @@ -425,7 +420,7 @@ static void __fastcall ProgramMenu( TMenuItem * Root, * It will be used in the callback. */ Item->Tag = i + 1; - if( p_pgrm == p_input_bank->pp_input[0]->stream.pp_programs[i] ) + if( p_pgrm == p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_programs[i] ) { /* don't lose Item when we append into menu */ ItemActive = Item; @@ -442,7 +437,7 @@ static void __fastcall ProgramMenu( TMenuItem * Root, } /* be sure that menu is enabled if more than 1 program */ - if( p_input_bank->pp_input[0]->stream.i_pgrm_number > 1 ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.i_pgrm_number > 1 ) { Root->Enabled = true; } @@ -490,19 +485,19 @@ static void __fastcall LanguageMenu( TMenuItem * Root, es_descriptor_t * p_es, ItemActive = NULL; i_item = 0; - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); -#define ES p_input_bank->pp_input[0]->stream.pp_es[i] +#define ES p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i] /* create a set of language buttons and append them to the Root */ - for( i = 0; i < p_input_bank->pp_input[0]->stream.i_es_number; i++ ) + for( i = 0; i < p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.i_es_number; i++ ) { if( ( ES->i_cat == i_cat ) && ( !ES->p_pgrm || ES->p_pgrm == - p_input_bank->pp_input[0]->stream.p_selected_program ) ) + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_program ) ) { i_item++; - Name = p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc; + Name = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc; if( Name.IsEmpty() ) { Name.sprintf( "Language %d", i_item ); @@ -514,7 +509,7 @@ static void __fastcall LanguageMenu( TMenuItem * Root, es_descriptor_t * p_es, Item->Caption = Name; Item->Tag = i; - if( p_es == p_input_bank->pp_input[0]->stream.pp_es[i] ) + if( p_es == p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i] ) { /* don't lose Item when we append into menu */ ItemActive = Item; @@ -527,7 +522,7 @@ static void __fastcall LanguageMenu( TMenuItem * Root, es_descriptor_t * p_es, } #undef ES - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); /* check currently selected item */ if( ItemActive != NULL ) @@ -570,7 +565,7 @@ static void __fastcall NavigationMenu( TMenuItem * Root, Root->Clear(); ItemActive = NULL; - i_title_nb = p_input_bank->pp_input[0]->stream.i_area_nb; + i_title_nb = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.i_area_nb; /* loop on titles */ for( i_title = 1; i_title < i_title_nb; i_title++ ) @@ -591,7 +586,7 @@ static void __fastcall NavigationMenu( TMenuItem * Root, } Name.sprintf( "Title %d (%d)", i_title, - p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb ); + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb ); { TitleItem = new TMenuItem( Root ); @@ -600,7 +595,7 @@ static void __fastcall NavigationMenu( TMenuItem * Root, TitleItem->Caption = Name; i_chapter_nb = - p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb; /* loop on chapters */ for( i_chapter = 0; i_chapter < i_chapter_nb; i_chapter++ ) @@ -631,9 +626,9 @@ static void __fastcall NavigationMenu( TMenuItem * Root, * ChapterItem, since we will need them in the callback */ ChapterItem->Tag = (int)POS2DATA( i_title, i_chapter + 1 ); -#define p_area p_input_bank->pp_input[0]->stream.pp_areas[i_title] +#define p_area p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_title] if( ( p_area == - p_input_bank->pp_input[0]->stream.p_selected_area ) && + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area ) && ( p_area->i_part == i_chapter + 1 ) ) { ItemActive = ChapterItem; @@ -658,7 +653,7 @@ static void __fastcall NavigationMenu( TMenuItem * Root, TitleItem->Add( ChapterGroup ); } - if( p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb > 1 ) { /* be sure that menu is sensitive */ @@ -713,13 +708,13 @@ int __fastcall SetupMenus( intf_thread_t * p_intf ) { pgrm_descriptor_t * p_pgrm; - if( p_input_bank->pp_input[0]->stream.p_new_program ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_new_program ) { - p_pgrm = p_input_bank->pp_input[0]->stream.p_new_program; + p_pgrm = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_new_program; } else { - p_pgrm = p_input_bank->pp_input[0]->stream.p_selected_program; + p_pgrm = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_program; } ProgramMenu( p_window->MenuProgram, p_pgrm, @@ -734,13 +729,13 @@ int __fastcall SetupMenus( intf_thread_t * p_intf ) { RadioMenu( p_window->MenuTitle, "Title", //why "-1" ? - p_input_bank->pp_input[0]->stream.i_area_nb - 1, - p_input_bank->pp_input[0]->stream.p_selected_area->i_id, + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.i_area_nb - 1, + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id, p_window->MenuTitleClick ); AnsiString CurrentTitle; CurrentTitle.sprintf( "%d", - p_input_bank->pp_input[0]->stream.p_selected_area->i_id ); + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_id ); p_window->LabelTitleCurrent->Caption = CurrentTitle; p_intf->p_sys->b_title_update = 0; @@ -749,8 +744,8 @@ int __fastcall SetupMenus( intf_thread_t * p_intf ) if( p_intf->p_sys->b_chapter_update ) { RadioMenu( p_window->MenuChapter, "Chapter", - p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, - p_input_bank->pp_input[0]->stream.p_selected_area->i_part, + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part, p_window->MenuChapterClick ); NavigationMenu( p_window->PopupNavigation, @@ -758,11 +753,11 @@ int __fastcall SetupMenus( intf_thread_t * p_intf ) AnsiString CurrentChapter; CurrentChapter.sprintf( "%d", - p_input_bank->pp_input[0]->stream.p_selected_area->i_part ); + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part ); p_window->LabelChapterCurrent->Caption = CurrentChapter; p_intf->p_sys->i_part = - p_input_bank->pp_input[0]->stream.p_selected_area->i_part; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.p_selected_area->i_part; p_intf->p_sys->b_chapter_update = 0; } @@ -771,24 +766,24 @@ int __fastcall SetupMenus( intf_thread_t * p_intf ) p_audio_es = NULL; p_spu_es = NULL; - for( i = 0; i < p_input_bank->pp_input[0]->stream.i_selected_es_number; i++ ) + for( i = 0; i < p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.i_selected_es_number; i++ ) { - if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat == AUDIO_ES ) { - p_audio_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i]; + p_audio_es = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_selected_es[i]; p_intfGlobal->p_sys->p_audio_es_old = p_audio_es; } - if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat == SPU_ES ) { - p_spu_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i]; + p_spu_es = p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.pp_selected_es[i]; p_intfGlobal->p_sys->p_spu_es_old = p_spu_es; } } - vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); /* audio menus */ if( p_intf->p_sys->b_audio_update ) @@ -812,7 +807,7 @@ int __fastcall SetupMenus( intf_thread_t * p_intf ) p_intf->p_sys->b_spu_update = 0; } - vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock ); return true; } diff --git a/plugins/win32/menu.h b/plugins/win32/menu.h index ef84a92769..5c4ca32c8d 100644 --- a/plugins/win32/menu.h +++ b/plugins/win32/menu.h @@ -20,9 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -struct intf_thread_s; - -int __fastcall SetupMenus( struct intf_thread_s * ); +int __fastcall SetupMenus( intf_thread_t * ); /***************************************************************************** * Convert user_data structures to title and chapter information diff --git a/plugins/win32/messages.cpp b/plugins/win32/messages.cpp index d39c0b9c9c..49077b318e 100644 --- a/plugins/win32/messages.cpp +++ b/plugins/win32/messages.cpp @@ -23,9 +23,8 @@ #include #pragma hdrstop -#include - -#include "interface.h" +#include +#include #include "win32_common.h" #include "messages.h" @@ -34,7 +33,7 @@ #pragma package(smart_init) #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; //--------------------------------------------------------------------------- __fastcall TMessagesDlg::TMessagesDlg( TComponent* Owner ) @@ -60,7 +59,7 @@ void __fastcall TMessagesDlg::FormShow( TObject *Sender ) //--------------------------------------------------------------------------- void __fastcall TMessagesDlg::UpdateLog() { - intf_subscription_t *p_sub = p_intfGlobal->p_sys->p_sub; + msg_subscription_t *p_sub = p_intfGlobal->p_sys->p_sub; int i_start, i_stop, i_del, i_count; int i_max_lines; @@ -72,15 +71,15 @@ void __fastcall TMessagesDlg::UpdateLog() { for( i_start = p_sub->i_start; i_start != i_stop; - i_start = (i_start+1) % INTF_MSG_QSIZE ) + i_start = (i_start+1) % VLC_MSG_QSIZE ) { /* Append all messages to log window */ switch( p_sub->p_msg[i_start].i_type ) { - case INTF_MSG_ERR: + case VLC_MSG_ERR: RichEditMessages->SelAttributes->Color = clRed; break; - case INTF_MSG_WARN: + case VLC_MSG_WARN: RichEditMessages->SelAttributes->Color = clBlack; break; default: diff --git a/plugins/win32/network.cpp b/plugins/win32/network.cpp index 24ad2bb806..4b70502f96 100644 --- a/plugins/win32/network.cpp +++ b/plugins/win32/network.cpp @@ -23,13 +23,8 @@ #include #pragma hdrstop -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" +#include +#include #include "network.h" #include "win32_common.h" @@ -41,7 +36,7 @@ #pragma link "CSPIN" #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; //--------------------------------------------------------------------------- __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner ) @@ -52,24 +47,24 @@ __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner ) OldRadioValue = 0; /* server port */ - SpinEditUDPPort->Value = config_GetIntVariable( "server-port" ); - SpinEditMulticastPort->Value = config_GetIntVariable( "server-port" ); + SpinEditUDPPort->Value = config_GetInt( p_intfGlobal, "server-port" ); + SpinEditMulticastPort->Value = config_GetInt( p_intfGlobal, "server-port" ); /* channel server */ - if( config_GetIntVariable( "network-channel" ) ) + if( config_GetInt( p_intfGlobal, "network-channel" ) ) { RadioButtonCS->Checked = true; RadioButtonCSEnter( RadioButtonCS ); } - psz_channel_server = config_GetPszVariable( "channel-server" ); + psz_channel_server = config_GetPsz( p_intfGlobal, "channel-server" ); if( psz_channel_server ) { ComboBoxCSAddress->Text = psz_channel_server; free( psz_channel_server ); } - SpinEditCSPort->Value = config_GetIntVariable( "channel-port" ); + SpinEditCSPort->Value = config_GetInt( p_intfGlobal, "channel-port" ); } //--------------------------------------------------------------------------- void __fastcall TNetworkDlg::FormShow( TObject *Sender ) @@ -95,14 +90,14 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender ) AnsiString Channel = ComboBoxCSAddress->Text; unsigned int i_channel_port = SpinEditCSPort->Value; unsigned int i_port; - int i_end = p_main->p_playlist->i_size; + int i_end = p_intfGlobal->p_vlc->p_playlist->i_size; Hide(); /* select added item */ - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } /* Check which option was chosen */ @@ -126,7 +121,7 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender ) /* UDP Multicast */ case 1: - config_PutIntVariable( "network-channel", FALSE ); + config_PutInt( p_intfGlobal, "network-channel", FALSE ); Address = ComboBoxMulticastAddress->Text; i_port = SpinEditMulticastPort->Value; @@ -143,9 +138,9 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender ) /* Channel server */ case 2: - config_PutIntVariable( "network-channel", TRUE ); - config_PutPszVariable( "channel-server", Channel.c_str() ); - config_PutIntVariable( "channel-port", i_channel_port ); + config_PutInt( p_intfGlobal, "network-channel", TRUE ); + config_PutPsz( p_intfGlobal, "channel-server", Channel.c_str() ); + config_PutInt( p_intfGlobal, "channel-port", i_channel_port ); if( p_main->p_channel == NULL ) { @@ -157,7 +152,7 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender ) /* HTTP */ case 3: - config_PutIntVariable( "network-channel", FALSE ); + config_PutInt( p_intfGlobal, "network-channel", FALSE ); Address = EditHTTPURL->Text; /* Build source name with a basic test */ diff --git a/plugins/win32/playlist.cpp b/plugins/win32/playlist.cpp index aa90ac75b9..3d9fa6dd7f 100644 --- a/plugins/win32/playlist.cpp +++ b/plugins/win32/playlist.cpp @@ -23,13 +23,8 @@ #include #pragma hdrstop -#include - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "interface.h" -#include "intf_playlist.h" +#include +#include #include "playlist.h" #include "win32_common.h" @@ -38,7 +33,7 @@ //#pragma package(smart_init) #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; //--------------------------------------------------------------------------- __fastcall TPlaylistDlg::TPlaylistDlg( TComponent* Owner ) @@ -112,13 +107,13 @@ void __fastcall TPlaylistDlg::ListViewPlaylistDblClick( TObject *Sender ) } /* stop current item, select the good one */ - if( ( p_input_bank->pp_input[0] != NULL ) && + if( ( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) && ( Item->Index != p_intfGlobal->p_sys->i_playing ) ) { /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } - intf_PlaylistJumpto( p_main->p_playlist, Item->Index - 1 ); + intf_PlaylistJumpto( p_intfGlobal->p_vlc->p_playlist, Item->Index - 1 ); } } //--------------------------------------------------------------------------- @@ -186,7 +181,7 @@ void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender ) { /* user wants to delete a file in the queue */ int i_pos; - playlist_t *p_playlist = p_main->p_playlist; + playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist; /* lock the struct */ vlc_mutex_lock( &p_intfGlobal->change_lock ); @@ -209,7 +204,7 @@ void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender ) void __fastcall TPlaylistDlg::MenuDeleteAllClick( TObject *Sender ) { int i_pos; - playlist_t *p_playlist = p_main->p_playlist; + playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist; /* lock the struct */ vlc_mutex_lock( &p_intfGlobal->change_lock ); @@ -230,7 +225,7 @@ void __fastcall TPlaylistDlg::MenuSelectionInvertClick( TObject *Sender ) { #define NOT( var ) ( (var) ? false : true ) int i_pos; - playlist_t *p_playlist = p_main->p_playlist; + playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist; TListItems *Items = ListViewPlaylist->Items; /* delete the items from the last to the first */ @@ -324,7 +319,7 @@ void __fastcall TPlaylistDlg::UpdateGrid( playlist_t * p_playlist ) //--------------------------------------------------------------------------- void __fastcall TPlaylistDlg::Manage( intf_thread_t * p_intf ) { - playlist_t *p_playlist = p_main->p_playlist ; + playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist ; vlc_mutex_lock( &p_playlist->change_lock ); @@ -341,41 +336,41 @@ void __fastcall TPlaylistDlg::Manage( intf_thread_t * p_intf ) //--------------------------------------------------------------------------- void __fastcall TPlaylistDlg::DeleteItem( int i_pos ) { - intf_PlaylistDelete( p_main->p_playlist, i_pos ); + intf_PlaylistDelete( p_intfGlobal->p_vlc->p_playlist, i_pos ); /* are we deleting the current played stream */ if( p_intfGlobal->p_sys->i_playing == i_pos ) { /* next ! */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; /* this has to set the slider to 0 */ /* step minus one */ p_intfGlobal->p_sys->i_playing-- ; - vlc_mutex_lock( &p_main->p_playlist->change_lock ); - p_main->p_playlist->i_index-- ; - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_lock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); + p_intfGlobal->p_vlc->p_playlist->i_index-- ; + vlc_mutex_unlock( &p_intfGlobal->p_vlc->p_playlist->change_lock ); } } //--------------------------------------------------------------------------- void __fastcall TPlaylistDlg::Previous() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* FIXME: temporary hack */ - intf_PlaylistPrev( p_main->p_playlist ); - intf_PlaylistPrev( p_main->p_playlist ); - p_input_bank->pp_input[0]->b_eof = 1; + intf_PlaylistPrev( p_intfGlobal->p_vlc->p_playlist ); + intf_PlaylistPrev( p_intfGlobal->p_vlc->p_playlist ); + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } //--------------------------------------------------------------------------- void __fastcall TPlaylistDlg::Next() { - if( p_input_bank->pp_input[0] != NULL ) + if( p_intfGlobal->p_vlc->p_input_bank->pp_input[0] != NULL ) { /* FIXME: temporary hack */ - p_input_bank->pp_input[0]->b_eof = 1; + p_intfGlobal->p_vlc->p_input_bank->pp_input[0]->b_eof = 1; } } //--------------------------------------------------------------------------- diff --git a/plugins/win32/playlist.h b/plugins/win32/playlist.h index 3b9e932968..d5fc114737 100644 --- a/plugins/win32/playlist.h +++ b/plugins/win32/playlist.h @@ -32,9 +32,6 @@ #include #include -struct playlist_s; -struct intf_thread_s; - //--------------------------------------------------------------------------- class TPlaylistDlg : public TForm { @@ -86,8 +83,8 @@ private: // User declarations char * __fastcall rindex( char *s, char c ); public: // User declarations __fastcall TPlaylistDlg( TComponent* Owner ); - void __fastcall UpdateGrid( struct playlist_s * p_playlist ); - void __fastcall Manage( struct intf_thread_s * p_intf ); + void __fastcall UpdateGrid( playlist_t * p_playlist ); + void __fastcall Manage( intf_thread_t * p_intf ); void __fastcall DeleteItem( int i_pos ); void __fastcall Previous(); void __fastcall Next(); diff --git a/plugins/win32/preferences.cpp b/plugins/win32/preferences.cpp index aecdf5f60d..f7d9afbf0c 100644 --- a/plugins/win32/preferences.cpp +++ b/plugins/win32/preferences.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * preferences.h: the "Preferences" dialog box + * preferences.cpp: the "Preferences" dialog box ***************************************************************************** * Copyright (C) 2002 VideoLAN * @@ -26,9 +26,8 @@ #include /* malloc(), free() */ #include /* strcmp */ -#include - -#include "interface.h" +#include +#include #include "preferences.h" #include "win32_common.h" @@ -38,7 +37,7 @@ #pragma link "CSPIN" #pragma resource "*.dfm" -extern struct intf_thread_s *p_intfGlobal; +extern intf_thread_t *p_intfGlobal; /**************************************************************************** @@ -191,7 +190,7 @@ void __fastcall TGroupBoxPlugin::ListViewSelectItem( TObject *Sender, if( Name != "" ) { /* look for module 'Name' */ - for( p_module = p_module_bank->first ; + for( p_module = p_intfGlobal->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { @@ -273,6 +272,10 @@ __fastcall TGroupBoxInteger::TGroupBoxInteger( TComponent* Owner, SpinEdit = CreateSpinEdit( this, 16, 164, 24, 21, -1, 100000, p_config->i_value ); + /* init updown */ + UpDown = CreateUpDown( this, -1, 32767, p_config->i_value, false ); + UpDown->Associate = Edit; + /* vertical alignment */ Height = LabelDesc->Height + 24; LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4; @@ -374,7 +377,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) TListItem *ListItem; /* Look for the selected module */ - for( p_module = p_module_bank->first ; p_module != NULL ; + for( p_module = p_intfGlobal->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { if( psz_module_name && !strcmp( psz_module_name, p_module->psz_name ) ) @@ -420,7 +423,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) ADD_PANEL; /* build a list of available plugins */ - for( p_module_plugins = p_module_bank->first ; + for( p_module_plugins = p_intfGlobal->p_vlc->module_bank.first ; p_module_plugins != NULL ; p_module_plugins = p_module_plugins->next ) { @@ -526,7 +529,7 @@ void __fastcall TPreferencesDlg::ButtonApplyClick( TObject *Sender ) void __fastcall TPreferencesDlg::ButtonSaveClick( TObject *Sender ) { ButtonApplyClick( Sender ); - config_SaveConfigFile( NULL ); + config_SaveConfigFile( p_intfGlobal->p_this, NULL ); } //--------------------------------------------------------------------------- void __fastcall TPreferencesDlg::ButtonCancelClick( TObject *Sender ) @@ -541,12 +544,13 @@ void __fastcall TPreferencesDlg::SaveValue( module_config_t *p_config ) case MODULE_CONFIG_ITEM_STRING: case MODULE_CONFIG_ITEM_FILE: case MODULE_CONFIG_ITEM_MODULE: - config_PutPszVariable( p_config->psz_name, - *p_config->psz_value ? p_config->psz_value : NULL ); + config_PutPsz( p_intfGlobal, p_config->psz_name, + *p_config->psz_value ? p_config->psz_value : NULL ); break; case MODULE_CONFIG_ITEM_INTEGER: case MODULE_CONFIG_ITEM_BOOL: - config_PutIntVariable( p_config->psz_name, p_config->i_value ); + config_PutInt( p_intfGlobal, p_config->psz_name, + p_config->i_value ); break; } } diff --git a/plugins/win32/waveout.c b/plugins/win32/waveout.c index 8dfd2b94a0..a09a0700ec 100644 --- a/plugins/win32/waveout.c +++ b/plugins/win32/waveout.c @@ -2,7 +2,7 @@ * waveout.c : Windows waveOut plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: waveout.c,v 1.7 2002/04/19 13:56:11 sam Exp $ + * $Id: waveout.c,v 1.8 2002/06/01 12:32:00 sam Exp $ * * Authors: Gildas Bazin * @@ -28,18 +28,27 @@ #include /* open(), O_WRONLY */ #include /* strerror() */ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ -#include -#include +#include +#include -#include "audio_output.h" /* aout_thread_t */ +#include /***************************************************************************** - * Capabilities defined in the other files. + * Local prototypes. *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ); +static void aout_getfunctions( function_list_t * p_function_list ); + +static int aout_Open ( aout_thread_t *p_aout ); +static int aout_SetFormat ( aout_thread_t *p_aout ); +static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); +static void aout_Play ( aout_thread_t *p_aout, + byte_t *buffer, int i_size ); +static void aout_Close ( aout_thread_t *p_aout ); + +/* local functions */ +static int OpenWaveOutDevice( aout_thread_t *p_aout ); /***************************************************************************** * Building configuration tree @@ -50,11 +59,10 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("Win32 waveOut extension module") ) ADD_CAPABILITY( AOUT, 250 ) - ADD_SHORTCUT( "waveout" ) MODULE_INIT_STOP MODULE_ACTIVATE_START - _M( aout_getfunctions )( &p_module->p_functions->aout ); + aout_getfunctions( &p_module->p_functions->aout ); MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START @@ -69,7 +77,7 @@ MODULE_DEACTIVATE_STOP #define NUMBUF 3 /* We use triple buffering to be on the safe side */ -typedef struct aout_sys_s +struct aout_sys_s { HWAVEOUT h_waveout; /* handle to waveout instance */ @@ -80,27 +88,13 @@ typedef struct aout_sys_s int i_current_buffer; DWORD dw_counter; /* Number of bytes played since beginning */ - -} aout_sys_t; - -/***************************************************************************** - * Local prototypes. - *****************************************************************************/ -static int aout_Open ( aout_thread_t *p_aout ); -static int aout_SetFormat ( aout_thread_t *p_aout ); -static int aout_GetBufInfo ( aout_thread_t *p_aout, int i_buffer_info ); -static void aout_Play ( aout_thread_t *p_aout, - byte_t *buffer, int i_size ); -static void aout_Close ( aout_thread_t *p_aout ); - -/* local functions */ -static int OpenWaveOutDevice( aout_thread_t *p_aout ); +}; /***************************************************************************** * Functions exported as capabilities. They are declared as static so that * we don't pollute the namespace too much. *****************************************************************************/ -void _M( aout_getfunctions )( function_list_t * p_function_list ) +static void aout_getfunctions( function_list_t * p_function_list ) { p_function_list->functions.aout.pf_open = aout_Open; p_function_list->functions.aout.pf_setformat = aout_SetFormat; @@ -118,14 +112,12 @@ static int aout_Open( aout_thread_t *p_aout ) { int i; - intf_WarnMsg( 3, "aout: waveOut aout_Open "); - - /* Allocate structure */ + /* Allocate structure */ p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->p_sys == NULL ) { - intf_ErrMsg( "aout error: %s", strerror(ENOMEM) ); + msg_Err( p_aout, "out of memory" ); return( 1 ); } @@ -148,7 +140,7 @@ static int aout_Open( aout_thread_t *p_aout ) *****************************************************************************/ static int aout_SetFormat( aout_thread_t *p_aout ) { - intf_WarnMsg( 3, "aout: WaveOut aout_SetFormat "); + msg_Dbg( p_aout, "aout_SetFormat" ); /* Check if the format has changed */ @@ -160,7 +152,7 @@ static int aout_SetFormat( aout_thread_t *p_aout ) if( waveOutClose( p_aout->p_sys->h_waveout ) != MMSYSERR_NOERROR ) { - intf_ErrMsg( "aout error: waveOutClose failed" ); + msg_Err( p_aout, "waveOutClose failed" ); } return OpenWaveOutDevice( p_aout ); @@ -183,14 +175,14 @@ static int aout_GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) if( (waveOutGetPosition(p_aout->p_sys->h_waveout, &mmtime, sizeof(MMTIME))) != MMSYSERR_NOERROR || (mmtime.wType != TIME_BYTES) ) { - intf_WarnMsg( 3, "aout: aout_GetBufInfo waveOutGetPosition failed"); + msg_Warn( p_aout, "waveOutGetPosition failed" ); return i_buffer_limit; } #if 0 - intf_WarnMsg( 3, "aout: waveOut aout_GetBufInfo: %i", - p_aout->p_sys->dw_counter - mmtime.u.cb ); + msg_Dbg( p_aout, "aout_GetBufInfo: %i", + p_aout->p_sys->dw_counter - mmtime.u.cb ); #endif return (p_aout->p_sys->dw_counter - mmtime.u.cb); @@ -213,7 +205,7 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *p_buffer, int i_size ) realloc( p_aout->p_sys->waveheader[current_buffer].lpData, i_size ); if( !p_aout->p_sys->waveheader[current_buffer].lpData ) { - intf_ErrMsg( "aout error: aou_Play couldn't alloc buffer" ); + msg_Err( p_aout, "could not allocate buffer" ); return; } p_aout->p_sys->waveheader[current_buffer].dwBufferLength = i_size; @@ -224,19 +216,19 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *p_buffer, int i_size ) sizeof(WAVEHDR) ); if( result != MMSYSERR_NOERROR ) { - intf_ErrMsg( "aout error: waveOutPrepareHeader failed" ); + msg_Err( p_aout, "waveOutPrepareHeader failed" ); return; } /* Send the buffer the waveOut queue */ - FAST_MEMCPY( p_aout->p_sys->waveheader[current_buffer].lpData, - p_buffer, i_size ); + p_aout->p_vlc->pf_memcpy( p_aout->p_sys->waveheader[current_buffer].lpData, + p_buffer, i_size ); result = waveOutWrite( p_aout->p_sys->h_waveout, &p_aout->p_sys->waveheader[current_buffer], sizeof(WAVEHDR) ); if( result != MMSYSERR_NOERROR ) { - intf_ErrMsg( "aout error: waveOutWrite failed" ); + msg_Err( p_aout, "waveOutWrite failed" ); return; } @@ -252,15 +244,13 @@ static void aout_Close( aout_thread_t *p_aout ) { int i; - intf_WarnMsg( 3, "aout: waveOut aout_Close "); - /* Before calling waveOutClose we must reset the device */ waveOutReset( p_aout->p_sys->h_waveout ); /* Close the device */ if( waveOutClose( p_aout->p_sys->h_waveout ) != MMSYSERR_NOERROR ) { - intf_ErrMsg( "aout error: waveOutClose failed" ); + msg_Err( p_aout, "waveOutClose failed" ); } /* Deallocate memory */ @@ -302,7 +292,7 @@ static int OpenWaveOutDevice( aout_thread_t *p_aout ) 0 /*callback*/, 0 /*callback data*/, CALLBACK_NULL ); if( result != MMSYSERR_NOERROR ) { - intf_ErrMsg( "aout error: waveOutOpen failed" ); + msg_Err( p_aout, "waveOutOpen failed" ); return( 1 ); } diff --git a/plugins/win32/win32.cpp b/plugins/win32/win32.cpp index 0943846368..26eb1b9a3d 100644 --- a/plugins/win32/win32.cpp +++ b/plugins/win32/win32.cpp @@ -26,7 +26,7 @@ #include /* malloc(), free() */ #include -#include +#include #include "win32.h" /* Borland specific */ @@ -54,7 +54,6 @@ MODULE_INIT_START ADD_CAPABILITY( INTF, 100 ) ADD_SHORTCUT( "win" ) ADD_SHORTCUT( "win32" ) - ADD_SHORTCUT( "intfwin" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/plugins/win32/win32_common.h b/plugins/win32/win32_common.h index 3d6bee564f..f9810419d8 100644 --- a/plugins/win32/win32_common.h +++ b/plugins/win32/win32_common.h @@ -41,21 +41,21 @@ typedef struct es_descriptor_s es_descriptor_t; /***************************************************************************** * intf_sys_t: description and status of Win32 interface *****************************************************************************/ -typedef struct intf_sys_s +struct intf_sys_s { /* special actions */ - boolean_t b_playing; - boolean_t b_popup_changed; /* display popup menu ? */ - boolean_t b_slider_free; /* slider status */ + vlc_bool_t b_playing; + vlc_bool_t b_popup_changed; /* display popup menu ? */ + vlc_bool_t b_slider_free; /* slider status */ /* menus handlers */ - boolean_t b_program_update; /* do we need to update programs + vlc_bool_t b_program_update; /* do we need to update programs menu */ - boolean_t b_title_update; /* do we need to update title menus */ - boolean_t b_chapter_update; /* do we need to update chapter + vlc_bool_t b_title_update; /* do we need to update title menus */ + vlc_bool_t b_chapter_update; /* do we need to update chapter menus */ - boolean_t b_audio_update; /* do we need to update audio menus */ - boolean_t b_spu_update; /* do we need to update spu menus */ + vlc_bool_t b_audio_update; /* do we need to update audio menus */ + vlc_bool_t b_spu_update; /* do we need to update spu menus */ /* windows and widgets */ TMainFrameDlg * p_window; /* main window */ @@ -71,7 +71,7 @@ typedef struct intf_sys_s /* The messages window */ TMessagesDlg * p_messages; /* messages window */ - intf_subscription_t*p_sub; /* interface subscription */ + msg_subscription_t* p_sub; /* message bank subscription */ /* Playlist management */ int i_playing; /* playlist selected item */ @@ -84,6 +84,5 @@ typedef struct intf_sys_s /* Language information */ es_descriptor_t * p_audio_es_old; es_descriptor_t * p_spu_es_old; - -} intf_sys_t; +}; diff --git a/plugins/x11/x11.c b/plugins/x11/x11.c index 73fe7dcd80..84caebae11 100644 --- a/plugins/x11/x11.c +++ b/plugins/x11/x11.c @@ -2,7 +2,7 @@ * x11.c : X11 plugin for vlc ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: x11.c,v 1.17 2002/05/30 08:17:04 gbazin Exp $ + * $Id: x11.c,v 1.18 2002/06/01 12:32:00 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -29,7 +29,7 @@ #include /* malloc(), free() */ #include /* strerror() */ -#include +#include #include "xcommon.h" @@ -48,7 +48,7 @@ #define DISPLAY_TEXT N_("X11 display name") #define DISPLAY_LONGTEXT N_( \ - "Specify the X11 hardware display you want to use.\nBy default vlc will " \ + "Specify the X11 hardware display you want to use. By default vlc will " \ "use the value of the DISPLAY environment variable.") MODULE_CONFIG_START @@ -60,7 +60,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("X11 module") ) ADD_CAPABILITY( VOUT, 50 ) - ADD_SHORTCUT( "x11" ) MODULE_INIT_STOP MODULE_ACTIVATE_START @@ -70,35 +69,3 @@ MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP -#if 0 -/***************************************************************************** - * vout_SetPalette: sets an 8 bpp palette - ***************************************************************************** - * This function sets the palette given as an argument. It does not return - * anything, but could later send information on which colors it was unable - * to set. - *****************************************************************************/ -static void vout_SetPalette( p_vout_thread_t p_vout, - u16 *red, u16 *green, u16 *blue, u16 *transp ) -{ - int i, j; - XColor p_colors[255]; - - /* allocate palette */ - for( i = 0, j = 255; i < 255; i++, j-- ) - { - /* kludge: colors are indexed reversely because color 255 seems - * to be reserved for black even if we try to set it to white */ - p_colors[ i ].pixel = j; - p_colors[ i ].pad = 0; - p_colors[ i ].flags = DoRed | DoGreen | DoBlue; - p_colors[ i ].red = red[ j ]; - p_colors[ i ].blue = blue[ j ]; - p_colors[ i ].green = green[ j ]; - } - - XStoreColors( p_vout->p_sys->p_display, - p_vout->p_sys->colormap, p_colors, 256 ); -} -#endif - diff --git a/plugins/x11/xcommon.c b/plugins/x11/xcommon.c index 3bd30502ba..8571da19e3 100644 --- a/plugins/x11/xcommon.c +++ b/plugins/x11/xcommon.c @@ -2,7 +2,7 @@ * xcommon.c: Functions common to the X11 and XVideo plugins ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: xcommon.c,v 1.35 2002/05/29 10:08:03 gbazin Exp $ + * $Id: xcommon.c,v 1.36 2002/06/01 12:32:00 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -31,7 +31,9 @@ #include /* free() */ #include /* strerror() */ -#include +#include +#include +#include #ifdef HAVE_MACHINE_PARAM_H /* BSD */ @@ -63,16 +65,10 @@ # include #endif -#include "video.h" -#include "video_output.h" #include "xcommon.h" -#include "interface.h" #include "netutils.h" /* network_ChannelJoin */ -#include "stream_control.h" /* needed by input_ext-intf.h... */ -#include "input_ext-intf.h" - #ifdef MODULE_NAME_IS_xvideo # define IMAGE_TYPE XvImage # define EXTRA_ARGS int i_xvport, int i_chroma @@ -106,9 +102,11 @@ static void DestroyWindow ( vout_thread_t * ); static int NewPicture ( vout_thread_t *, picture_t * ); static void FreePicture ( vout_thread_t *, picture_t * ); -static IMAGE_TYPE *CreateImage ( Display *, EXTRA_ARGS, int, int ); +static IMAGE_TYPE *CreateImage ( vout_thread_t *, + Display *, EXTRA_ARGS, int, int ); #ifdef HAVE_SYS_SHM_H -static IMAGE_TYPE *CreateShmImage ( Display *, EXTRA_ARGS_SHM, int, int ); +static IMAGE_TYPE *CreateShmImage ( vout_thread_t *, + Display *, EXTRA_ARGS_SHM, int, int ); #endif static void ToggleFullScreen ( vout_thread_t * ); @@ -121,8 +119,8 @@ static void DestroyCursor ( vout_thread_t * ); static void ToggleCursor ( vout_thread_t * ); #ifdef MODULE_NAME_IS_xvideo -static int XVideoGetPort ( Display *, u32, u32 * ); -static void XVideoReleasePort ( Display *, int ); +static int XVideoGetPort ( vout_thread_t *, u32, u32 * ); +static void XVideoReleasePort ( vout_thread_t *, int ); #endif #ifdef MODULE_NAME_IS_x11 @@ -135,7 +133,7 @@ static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); * This structure is part of the video output thread descriptor. * It describes the X11 and XVideo specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { /* Internal settings and properties */ Display * p_display; /* display pointer */ @@ -147,7 +145,7 @@ typedef struct vout_sys_s Window video_window; /* sub-window for displaying video */ #ifdef HAVE_SYS_SHM_H - boolean_t b_shm; /* shared memory extension flag */ + vlc_bool_t b_shm; /* shared memory extension flag */ #endif #ifdef MODULE_NAME_IS_xvideo @@ -166,7 +164,7 @@ typedef struct vout_sys_s int i_width; /* width of main window */ int i_height; /* height of main window */ - boolean_t b_altfullscreen; /* which fullscreen method */ + vlc_bool_t b_altfullscreen; /* which fullscreen method */ /* Backup of window position and size before fullscreen switch */ int i_width_backup; @@ -188,13 +186,12 @@ typedef struct vout_sys_s #endif /* Mouse pointer properties */ - boolean_t b_mouse_pointer_visible; + vlc_bool_t b_mouse_pointer_visible; mtime_t i_time_mouse_last_moved; /* used to auto-hide pointer*/ Cursor blank_cursor; /* the hidden cursor */ mtime_t i_time_button_last_pressed; /* to track dbl-clicks */ Pixmap cursor_pixmap; - -} vout_sys_t; +}; /***************************************************************************** * picture_sys_t: direct buffer method descriptor @@ -202,15 +199,14 @@ typedef struct vout_sys_s * This structure is part of the picture descriptor, it describes the * XVideo specific properties of a direct buffer. *****************************************************************************/ -typedef struct picture_sys_s +struct picture_sys_s { IMAGE_TYPE * p_image; #ifdef HAVE_SYS_SHM_H XShmSegmentInfo shminfo; /* shared memory zone information */ #endif - -} picture_sys_t; +}; /***************************************************************************** * mwmhints_t: window manager hints @@ -238,31 +234,6 @@ typedef struct mwmhints_s # define MAX_DIRECTBUFFERS 2 #endif -/***************************************************************************** - * Seeking function TODO: put this in a generic location ! - *****************************************************************************/ -static inline void vout_Seek( off_t i_seek ) -{ - off_t i_tell; - - vlc_mutex_lock( &p_input_bank->lock ); - if( p_input_bank->pp_input[0] != NULL ) - { -#define S p_input_bank->pp_input[0]->stream - i_tell = S.p_selected_area->i_tell + i_seek * (off_t)50 * S.i_mux_rate; - - i_tell = ( i_tell <= 0 /*S.p_selected_area->i_start*/ ) - ? 0 /*S.p_selected_area->i_start*/ - : ( i_tell >= S.p_selected_area->i_size ) - ? S.p_selected_area->i_size - : i_tell; - - input_Seek( p_input_bank->pp_input[0], i_tell ); -#undef S - } - vlc_mutex_unlock( &p_input_bank->lock ); -} - /***************************************************************************** * Functions exported as capabilities. They are declared as static so that * we don't pollute the namespace too much. @@ -287,31 +258,31 @@ void _M( vout_getfunctions )( function_list_t * p_function_list ) *****************************************************************************/ static int vout_Create( vout_thread_t *p_vout ) { - char * psz_display; + char * psz_display; #ifdef MODULE_NAME_IS_xvideo - char * psz_chroma; - u32 i_chroma = 0; - boolean_t b_chroma = 0; + char * psz_chroma; + u32 i_chroma = 0; + vlc_bool_t b_chroma = 0; #endif /* Allocate structure */ p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) { - intf_ErrMsg( "vout error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } /* Open display, unsing the "display" config variable or the DISPLAY * environment variable */ - psz_display = config_GetPszVariable( MODULE_STRING "-display" ); + psz_display = config_GetPsz( p_vout, MODULE_STRING "-display" ); p_vout->p_sys->p_display = XOpenDisplay( psz_display ); if( p_vout->p_sys->p_display == NULL ) /* error */ { - intf_ErrMsg( "vout error: cannot open display %s", - XDisplayName( psz_display ) ); + msg_Err( p_vout, "cannot open display %s", + XDisplayName( psz_display ) ); free( p_vout->p_sys ); if( psz_display ) free( psz_display ); return( 1 ); @@ -321,7 +292,7 @@ static int vout_Create( vout_thread_t *p_vout ) p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display ); #ifdef MODULE_NAME_IS_xvideo - psz_chroma = config_GetPszVariable( "xvideo-chroma" ); + psz_chroma = config_GetPsz( p_vout, "xvideo-chroma" ); if( psz_chroma ) { if( strlen( psz_chroma ) >= 4 ) @@ -339,8 +310,8 @@ static int vout_Create( vout_thread_t *p_vout ) if( b_chroma ) { - intf_WarnMsg( 3, "vout info: forcing chroma 0x%.8x (%4.4s)", - i_chroma, (char*)&i_chroma ); + msg_Dbg( p_vout, "forcing chroma 0x%.8x (%4.4s)", + i_chroma, (char*)&i_chroma ); } else { @@ -348,8 +319,7 @@ static int vout_Create( vout_thread_t *p_vout ) } /* Check that we have access to an XVideo port providing this chroma */ - p_vout->p_sys->i_xvport = XVideoGetPort( p_vout->p_sys->p_display, - i_chroma, + p_vout->p_sys->i_xvport = XVideoGetPort( p_vout, i_chroma, &p_vout->output.i_chroma ); if( p_vout->p_sys->i_xvport < 0 ) { @@ -365,16 +335,14 @@ static int vout_Create( vout_thread_t *p_vout ) /* It failed, but it's not completely lost ! We try to open an * XVideo port for an YUY2 picture. We'll need to do an YUV * conversion, but at least it has got scaling. */ - p_vout->p_sys->i_xvport = XVideoGetPort( p_vout->p_sys->p_display, - FOURCC_YUY2, + p_vout->p_sys->i_xvport = XVideoGetPort( p_vout, FOURCC_YUY2, &p_vout->output.i_chroma ); if( p_vout->p_sys->i_xvport < 0 ) { /* It failed, but it's not completely lost ! We try to open an * XVideo port for a simple 16bpp RGB picture. We'll need to do * an YUV conversion, but at least it has got scaling. */ - p_vout->p_sys->i_xvport = XVideoGetPort( p_vout->p_sys->p_display, - FOURCC_RV16, + p_vout->p_sys->i_xvport = XVideoGetPort( p_vout, FOURCC_RV16, &p_vout->output.i_chroma ); if( p_vout->p_sys->i_xvport < 0 ) { @@ -395,7 +363,7 @@ static int vout_Create( vout_thread_t *p_vout ) * but also command buttons, subtitles and other indicators */ if( CreateWindow( p_vout ) ) { - intf_ErrMsg( "vout error: cannot create X11 window" ); + msg_Err( p_vout, "cannot create X11 window" ); DestroyCursor( p_vout ); XCloseDisplay( p_vout->p_sys->p_display ); free( p_vout->p_sys ); @@ -405,7 +373,7 @@ static int vout_Create( vout_thread_t *p_vout ) /* Open and initialize device. */ if( InitDisplay( p_vout ) ) { - intf_ErrMsg( "vout error: cannot initialize X11 display" ); + msg_Err( p_vout, "cannot initialize X11 display" ); DestroyCursor( p_vout ); DestroyWindow( p_vout ); XCloseDisplay( p_vout->p_sys->p_display ); @@ -443,7 +411,7 @@ static void vout_Destroy( vout_thread_t *p_vout ) XFreeColormap( p_vout->p_sys->p_display, p_vout->p_sys->colormap ); } #else - XVideoReleasePort( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport ); + XVideoReleasePort( p_vout, p_vout->p_sys->i_xvport ); #endif DestroyCursor( p_vout ); @@ -507,7 +475,8 @@ static int vout_Init( vout_thread_t *p_vout ) case 32: p_vout->output.i_chroma = FOURCC_RV24; break; default: - intf_ErrMsg( "vout error: unknown screen depth" ); + msg_Err( p_vout, "unknown screen depth %i", + p_vout->p_sys->i_screen_depth ); return( 0 ); } @@ -651,24 +620,6 @@ static int vout_Manage( vout_thread_t *p_vout ) p_vout->p_sys->i_height = xevent.xconfigure.height; } } - /* MapNotify event: change window status and disable screen saver */ - else if( xevent.type == MapNotify) - { - if( (p_vout != NULL) && !p_vout->b_active ) - { - DisableXScreenSaver( p_vout ); - p_vout->b_active = 1; - } - } - /* UnmapNotify event: change window status and enable screen saver */ - else if( xevent.type == UnmapNotify ) - { - if( (p_vout != NULL) && p_vout->b_active ) - { - EnableXScreenSaver( p_vout ); - p_vout->b_active = 0; - } - } /* Keyboard event */ else if( xevent.type == KeyPress ) { @@ -677,85 +628,91 @@ static int vout_Manage( vout_thread_t *p_vout ) xevent.xkey.keycode, 0 ); switch( x_key_symbol ) { - case XK_Escape: - if( p_vout->b_fullscreen ) - { - p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; - } - else - { - p_main->p_intf->b_die = 1; - } - break; - case XK_Menu: - p_main->p_intf->b_menu_change = 1; - break; - case XK_Left: - vout_Seek( -5 ); - break; - case XK_Right: - vout_Seek( 5 ); - break; - case XK_Up: - vout_Seek( 60 ); - break; - case XK_Down: - vout_Seek( -60 ); - break; - case XK_Home: - input_Seek( p_input_bank->pp_input[0], - p_input_bank->pp_input[0]->stream.p_selected_area->i_start ); - break; - case XK_End: - input_Seek( p_input_bank->pp_input[0], - p_input_bank->pp_input[0]->stream.p_selected_area->i_size ); - break; - case XK_Page_Up: - vout_Seek( 900 ); - break; - case XK_Page_Down: - vout_Seek( -900 ); - break; - case XK_space: - input_SetStatus( p_input_bank->pp_input[0], - INPUT_STATUS_PAUSE ); - break; - - default: - /* "Normal Keys" - * The reason why I use this instead of XK_0 is that - * with XLookupString, we don't have to care about - * keymaps. */ - - if( XLookupString( &xevent.xkey, &i_key, 1, NULL, NULL ) ) + case XK_Escape: + if( p_vout->b_fullscreen ) + { + p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + } + else + { + p_vout->p_vlc->b_die = 1; + } + break; + case XK_Menu: + { + intf_thread_t *p_intf; + p_intf = vlc_object_find( p_vout->p_vlc, VLC_OBJECT_INTF, + FIND_CHILD ); + if( p_intf ) { - /* FIXME: handle stuff here */ - switch( i_key ) - { - case 'q': - case 'Q': - p_main->p_intf->b_die = 1; - break; - case 'f': - case 'F': - p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; - break; - - case '0': network_ChannelJoin( 0 ); break; - case '1': network_ChannelJoin( 1 ); break; - case '2': network_ChannelJoin( 2 ); break; - case '3': network_ChannelJoin( 3 ); break; - case '4': network_ChannelJoin( 4 ); break; - case '5': network_ChannelJoin( 5 ); break; - case '6': network_ChannelJoin( 6 ); break; - case '7': network_ChannelJoin( 7 ); break; - case '8': network_ChannelJoin( 8 ); break; - case '9': network_ChannelJoin( 9 ); break; - - default: - break; - } + p_intf->b_menu_change = 1; + vlc_object_release( p_intf ); } + } + break; + case XK_Left: + input_Seek( p_vout, -5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Right: + input_Seek( p_vout, 5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Up: + input_Seek( p_vout, 60, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Down: + input_Seek( p_vout, -60, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Home: + input_Seek( p_vout, 0, INPUT_SEEK_BYTES | INPUT_SEEK_SET ); + break; + case XK_End: + input_Seek( p_vout, 0, INPUT_SEEK_BYTES | INPUT_SEEK_END ); + break; + case XK_Page_Up: + input_Seek( p_vout, 900, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_Page_Down: + input_Seek( p_vout, -900, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); + break; + case XK_space: + input_SetStatus( p_vout, INPUT_STATUS_PAUSE ); + break; + + default: + /* "Normal Keys" + * The reason why I use this instead of XK_0 is that + * with XLookupString, we don't have to care about + * keymaps. */ + + if( XLookupString( &xevent.xkey, &i_key, 1, NULL, NULL ) ) + { + /* FIXME: handle stuff here */ + switch( i_key ) + { + case 'q': + case 'Q': + p_vout->p_vlc->b_die = 1; + break; + case 'f': + case 'F': + p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + break; + + case '0': network_ChannelJoin(p_vout->p_this,0); break; + case '1': network_ChannelJoin(p_vout->p_this,1); break; + case '2': network_ChannelJoin(p_vout->p_this,2); break; + case '3': network_ChannelJoin(p_vout->p_this,3); break; + case '4': network_ChannelJoin(p_vout->p_this,4); break; + case '5': network_ChannelJoin(p_vout->p_this,5); break; + case '6': network_ChannelJoin(p_vout->p_this,6); break; + case '7': network_ChannelJoin(p_vout->p_this,7); break; + case '8': network_ChannelJoin(p_vout->p_this,8); break; + case '9': network_ChannelJoin(p_vout->p_this,9); break; + + default: + break; + } + } break; } } @@ -771,18 +728,20 @@ static int vout_Manage( vout_thread_t *p_vout ) /* detect double-clicks */ if( ( ((XButtonEvent *)&xevent)->time - p_vout->p_sys->i_time_button_last_pressed ) < 300 ) + { p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + } p_vout->p_sys->i_time_button_last_pressed = ((XButtonEvent *)&xevent)->time; break; case Button4: - vout_Seek( 15 ); + input_Seek( p_vout, 15, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; case Button5: - vout_Seek( -15 ); + input_Seek( p_vout, -15, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); break; } } @@ -792,8 +751,16 @@ static int vout_Manage( vout_thread_t *p_vout ) switch( ((XButtonEvent *)&xevent)->button ) { case Button3: - /* FIXME: need locking ! */ - p_main->p_intf->b_menu_change = 1; + { + intf_thread_t *p_intf; + p_intf = vlc_object_find( p_vout->p_vlc, + VLC_OBJECT_INTF, FIND_CHILD ); + if( p_intf ) + { + p_intf->b_menu_change = 1; + vlc_object_release( p_intf ); + } + } break; } } @@ -814,7 +781,7 @@ static int vout_Manage( vout_thread_t *p_vout ) /* Other event */ else { - intf_WarnMsg( 3, "vout: unhandled event %d received", xevent.type ); + msg_Warn( p_vout, "unhandled event %d received", xevent.type ); } } @@ -829,14 +796,16 @@ static int vout_Manage( vout_thread_t *p_vout ) if( ((XExposeEvent *)&xevent)->count == 0 ) { /* (if this is the last a collection of expose events...) */ - if( p_input_bank->pp_input[0] != NULL ) +#if 0 + if( p_vout->p_vlc->p_input_bank->pp_input[0] != NULL ) { - if( PAUSE_S == - p_input_bank->pp_input[0]->stream.control.i_status ) + if( PAUSE_S == p_vout->p_vlc->p_input_bank->pp_input[0] + ->stream.control.i_status ) { /* XVideoDisplay( p_vout )*/; } } +#endif } } } @@ -850,7 +819,7 @@ static int vout_Manage( vout_thread_t *p_vout ) if( (xevent.xclient.message_type == p_vout->p_sys->wm_protocols) && (xevent.xclient.data.l[0] == p_vout->p_sys->wm_delete_window ) ) { - p_main->p_intf->b_die = 1; + p_vout->p_vlc->b_die = 1; } } @@ -864,7 +833,6 @@ static int vout_Manage( vout_thread_t *p_vout ) } - /* * Size change * @@ -877,9 +845,8 @@ static int vout_Manage( vout_thread_t *p_vout ) p_vout->i_changes &= ~VOUT_SIZE_CHANGE; - intf_WarnMsg( 3, "vout: video display resized (%dx%d)", - p_vout->p_sys->i_width, - p_vout->p_sys->i_height ); + msg_Dbg( p_vout, "video display resized (%dx%d)", + p_vout->p_sys->i_width, p_vout->p_sys->i_height ); #ifdef MODULE_NAME_IS_x11 /* We need to signal the vout thread about the size change because it @@ -941,9 +908,9 @@ static int CreateWindow( vout_thread_t *p_vout ) XGCValues xgcvalues; XEvent xevent; - boolean_t b_expose; - boolean_t b_configure_notify; - boolean_t b_map_notify; + vlc_bool_t b_expose; + vlc_bool_t b_configure_notify; + vlc_bool_t b_map_notify; /* Set main window's size */ p_vout->p_sys->i_width = p_vout->i_window_width; @@ -984,8 +951,11 @@ static int CreateWindow( vout_thread_t *p_vout ) * window's name, and accepted protocols */ XSetWMNormalHints( p_vout->p_sys->p_display, p_vout->p_sys->window, &xsize_hints ); + /* XXX: DISABLED! makes browsers crash */ +#if 0 XSetCommand( p_vout->p_sys->p_display, p_vout->p_sys->window, - p_main->ppsz_argv, p_main->i_argc ); + p_vout->p_vlc->ppsz_argv, p_vout->p_vlc->i_argc ); +#endif XStoreName( p_vout->p_sys->p_display, p_vout->p_sys->window, #ifdef MODULE_NAME_IS_x11 VOUT_TITLE " (X11 output)" @@ -1000,7 +970,7 @@ static int CreateWindow( vout_thread_t *p_vout ) &p_vout->p_sys->wm_delete_window, 1 ) ) { /* WM_DELETE_WINDOW is not supported by window manager */ - intf_Msg( "vout error: missing or bad window manager" ); + msg_Warn( p_vout, "missing or bad window manager" ); } /* Creation of a graphic context that doesn't generate a GraphicsExpose @@ -1065,7 +1035,7 @@ static int CreateWindow( vout_thread_t *p_vout ) #endif /* Create video output sub-window. */ - p_vout->p_sys->video_window = XCreateSimpleWindow( + p_vout->p_sys->video_window = XCreateSimpleWindow( p_vout->p_sys->p_display, p_vout->p_sys->window, 0, 0, p_vout->p_sys->i_width, @@ -1075,7 +1045,7 @@ static int CreateWindow( vout_thread_t *p_vout ) p_vout->p_sys->i_screen ), WhitePixel( p_vout->p_sys->p_display, p_vout->p_sys->i_screen ) ); - + XSetWindowBackground( p_vout->p_sys->p_display, p_vout->p_sys->video_window, BlackPixel( p_vout->p_sys->p_display, @@ -1088,7 +1058,6 @@ static int CreateWindow( vout_thread_t *p_vout ) /* make sure the video window will be centered in the next vout_Manage() */ p_vout->i_changes |= VOUT_SIZE_CHANGE; - /* If the cursor was formerly blank than blank it again */ if( !p_vout->p_sys->b_mouse_pointer_visible ) { @@ -1142,10 +1111,9 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) { /* Create image using XShm extension */ p_pic->p_sys->p_image = - CreateShmImage( p_vout->p_sys->p_display, + CreateShmImage( p_vout, p_vout->p_sys->p_display, # ifdef MODULE_NAME_IS_xvideo - p_vout->p_sys->i_xvport, - p_vout->output.i_chroma, + p_vout->p_sys->i_xvport, p_vout->output.i_chroma, # else p_vout->p_sys->p_visual, p_vout->p_sys->i_screen_depth, @@ -1158,10 +1126,9 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) { /* Create image without XShm extension */ p_pic->p_sys->p_image = - CreateImage( p_vout->p_sys->p_display, + CreateImage( p_vout, p_vout->p_sys->p_display, #ifdef MODULE_NAME_IS_xvideo - p_vout->p_sys->i_xvport, - p_vout->output.i_chroma, + p_vout->p_sys->i_xvport, p_vout->output.i_chroma, #else p_vout->p_sys->p_visual, p_vout->p_sys->i_screen_depth, @@ -1358,9 +1325,8 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) /* Unknown chroma, tell the guy to get lost */ IMAGE_FREE( p_pic->p_sys->p_image ); free( p_pic->p_sys ); - intf_ErrMsg( "vout error: never heard of chroma 0x%.8x (%4.4s)", - p_vout->output.i_chroma, - (char*)&p_vout->output.i_chroma ); + msg_Err( p_vout, "never heard of chroma 0x%.8x (%4.4s)", + p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma ); p_pic->i_planes = 0; return -1; } @@ -1388,8 +1354,8 @@ static void FreePicture( vout_thread_t *p_vout, picture_t *p_pic ) shmctl( p_pic->p_sys->shminfo.shmid, IPC_RMID, 0 ); if( shmdt( p_pic->p_sys->shminfo.shmaddr ) ) { - intf_ErrMsg( "vout error: cannot detach shared memory (%s)", - strerror(errno) ); + msg_Err( p_vout, "cannot detach shared memory (%s)", + strerror(errno) ); } } else @@ -1408,7 +1374,6 @@ static void FreePicture( vout_thread_t *p_vout, picture_t *p_pic ) * ToggleFullScreen: Enable or disable full screen mode ***************************************************************************** * This function will switch between fullscreen and window mode. - * *****************************************************************************/ static void ToggleFullScreen ( vout_thread_t *p_vout ) { @@ -1424,13 +1389,13 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) Window next_parent, parent, *p_dummy, dummy1; unsigned int dummy2, dummy3; - intf_WarnMsg( 3, "vout: entering fullscreen mode" ); + msg_Dbg( p_vout, "entering fullscreen mode" ); /* Only check the fullscreen method when we actually go fullscreen, * because to go back to window mode we need to know in which * fullscreen mode we where */ p_vout->p_sys->b_altfullscreen = - config_GetIntVariable( MODULE_STRING "-altfullscreen" ); + config_GetInt( p_vout, MODULE_STRING "-altfullscreen" ); /* Save current window coordinates so they can be restored when * we exit from fullscreen mode. This is the tricky part because @@ -1504,7 +1469,7 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) } else { - intf_WarnMsg( 3, "vout: leaving fullscreen mode" ); + msg_Dbg( p_vout, "leaving fullscreen mode" ); i_xpos = p_vout->p_sys->i_xpos_backup; i_ypos = p_vout->p_sys->i_ypos_backup; @@ -1757,52 +1722,54 @@ static void ToggleCursor( vout_thread_t *p_vout ) /***************************************************************************** * XVideoGetPort: get YUV12 port *****************************************************************************/ -static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) +static int XVideoGetPort( vout_thread_t *p_vout, + u32 i_chroma, u32 *pi_newchroma ) { XvAdaptorInfo *p_adaptor; unsigned int i; int i_adaptor, i_num_adaptors, i_requested_adaptor; int i_selected_port; - switch( XvQueryExtension( dpy, &i, &i, &i, &i, &i ) ) + switch( XvQueryExtension( p_vout->p_sys->p_display, &i, &i, &i, &i, &i ) ) { case Success: break; case XvBadExtension: - intf_WarnMsg( 3, "vout error: XvBadExtension" ); + msg_Warn( p_vout, "XvBadExtension" ); return( -1 ); case XvBadAlloc: - intf_WarnMsg( 3, "vout error: XvBadAlloc" ); + msg_Warn( p_vout, "XvBadAlloc" ); return( -1 ); default: - intf_WarnMsg( 3, "vout error: XvQueryExtension failed" ); + msg_Warn( p_vout, "XvQueryExtension failed" ); return( -1 ); } - switch( XvQueryAdaptors( dpy, DefaultRootWindow( dpy ), + switch( XvQueryAdaptors( p_vout->p_sys->p_display, + DefaultRootWindow( p_vout->p_sys->p_display ), &i_num_adaptors, &p_adaptor ) ) { case Success: break; case XvBadExtension: - intf_WarnMsg( 3, "vout error: XvBadExtension for XvQueryAdaptors" ); + msg_Warn( p_vout, "XvBadExtension for XvQueryAdaptors" ); return( -1 ); case XvBadAlloc: - intf_WarnMsg( 3, "vout error: XvBadAlloc for XvQueryAdaptors" ); + msg_Warn( p_vout, "XvBadAlloc for XvQueryAdaptors" ); return( -1 ); default: - intf_WarnMsg( 3, "vout error: XvQueryAdaptors failed" ); + msg_Warn( p_vout, "XvQueryAdaptors failed" ); return( -1 ); } i_selected_port = -1; - i_requested_adaptor = config_GetIntVariable( "xvideo-adaptor" ); + i_requested_adaptor = config_GetInt( p_vout, "xvideo-adaptor" ); for( i_adaptor = 0; i_adaptor < i_num_adaptors; ++i_adaptor ) { @@ -1825,7 +1792,8 @@ static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) } /* Check that adaptor supports our requested format... */ - p_formats = XvListImageFormats( dpy, p_adaptor[i_adaptor].base_id, + p_formats = XvListImageFormats( p_vout->p_sys->p_display, + p_adaptor[i_adaptor].base_id, &i_num_formats ); for( i_format = 0; @@ -1854,7 +1822,8 @@ static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) && ( i_selected_port == -1 ); i_port++ ) { - if( XvGrabPort( dpy, i_port, CurrentTime ) == Success ) + if( XvGrabPort( p_vout->p_sys->p_display, i_port, CurrentTime ) + == Success ) { i_selected_port = i_port; *pi_newchroma = p_formats[ i_format ].id; @@ -1868,33 +1837,31 @@ static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) } /* If we found a port, print information about it */ - intf_WarnMsg( 3, "vout: found adaptor %i, port %i, " - "image format 0x%x (%4.4s) %s", - i_adaptor, i_selected_port, - p_formats[ i_format ].id, - (char *)&p_formats[ i_format ].id, - ( p_formats[ i_format ].format - == XvPacked ) ? "packed" : "planar" ); + msg_Dbg( p_vout, "adaptor %i, port %i, format 0x%x (%4.4s) %s", + i_adaptor, i_selected_port, p_formats[ i_format ].id, + (char *)&p_formats[ i_format ].id, + ( p_formats[ i_format ].format == XvPacked ) ? + "packed" : "planar" ); #if 0 - intf_WarnMsg( 10, " encoding list:" ); + msg_Dbg( p_vout, " encoding list:" ); - if( XvQueryEncodings( dpy, i_selected_port, + if( XvQueryEncodings( p_vout->p_sys->p_display, i_selected_port, &i_num_encodings, &p_enc ) != Success ) { - intf_WarnMsg( 10, " XvQueryEncodings failed" ); + msg_Dbg( p_vout, " XvQueryEncodings failed" ); continue; } for( i_enc = 0; i_enc < i_num_encodings; i_enc++ ) { - intf_WarnMsg( 10, " id=%ld, name=%s, size=%ldx%ld," - " numerator=%d, denominator=%d", - p_enc[i_enc].encoding_id, p_enc[i_enc].name, - p_enc[i_enc].width, p_enc[i_enc].height, - p_enc[i_enc].rate.numerator, - p_enc[i_enc].rate.denominator ); + msg_Dbg( p_vout, " id=%ld, name=%s, size=%ldx%ld," + " numerator=%d, denominator=%d", + p_enc[i_enc].encoding_id, p_enc[i_enc].name, + p_enc[i_enc].width, p_enc[i_enc].height, + p_enc[i_enc].rate.numerator, + p_enc[i_enc].rate.denominator ); } if( p_enc != NULL ) @@ -1902,13 +1869,13 @@ static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) XvFreeEncodingInfo( p_enc ); } - intf_WarnMsg( 10, " attribute list:" ); - p_attr = XvQueryPortAttributes( dpy, i_selected_port, + msg_Dbg( p_vout, " attribute list:" ); + p_attr = XvQueryPortAttributes( p_vout->p_sys->p_display, + i_selected_port, &i_num_attributes ); for( i_attr = 0; i_attr < i_num_attributes; i_attr++ ) { - intf_WarnMsg( 10, - " name=%s, flags=[%s%s ], min=%i, max=%i", + msg_Dbg( p_vout, " name=%s, flags=[%s%s ], min=%i, max=%i", p_attr[i_attr].name, (p_attr[i_attr].flags & XvGettable) ? " get" : "", (p_attr[i_attr].flags & XvSettable) ? " set" : "", @@ -1938,14 +1905,14 @@ static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) { if( i_requested_adaptor == -1 ) { - intf_WarnMsg( 3, "vout: no free XVideo port found for format " - "0x%.8x (%4.4s)", i_chroma, (char*)&i_chroma ); + msg_Warn( p_vout, "no free XVideo port found for format " + "0x%.8x (%4.4s)", i_chroma, (char*)&i_chroma ); } else { - intf_WarnMsg( 3, "vout: XVideo adaptor %i does not have a free " - "XVideo port for format 0x%.8x (%4.4s)", - i_requested_adaptor, i_chroma, (char*)&i_chroma ); + msg_Warn( p_vout, "XVideo adaptor %i does not have a free " + "XVideo port for format 0x%.8x (%4.4s)", + i_requested_adaptor, i_chroma, (char*)&i_chroma ); } } @@ -1955,9 +1922,9 @@ static int XVideoGetPort( Display *dpy, u32 i_chroma, u32 *pi_newchroma ) /***************************************************************************** * XVideoReleasePort: release YUV12 port *****************************************************************************/ -static void XVideoReleasePort( Display *dpy, int i_port ) +static void XVideoReleasePort( vout_thread_t *p_vout, int i_port ) { - XvUngrabPort( dpy, i_port, CurrentTime ); + XvUngrabPort( p_vout->p_sys->p_display, i_port, CurrentTime ); } #endif @@ -1987,7 +1954,7 @@ static int InitDisplay( vout_thread_t *p_vout ) if( !p_vout->p_sys->b_shm ) #endif { - intf_WarnMsg( 1, "vout warning: XShm video extension is unavailable" ); + msg_Warn( p_vout, "XShm video extension is unavailable" ); } #ifdef MODULE_NAME_IS_xvideo @@ -2019,7 +1986,7 @@ static int InitDisplay( vout_thread_t *p_vout ) &xvisual_template, &i_count ); if( p_xvisual == NULL ) { - intf_ErrMsg( "vout error: no PseudoColor visual available" ); + msg_Err( p_vout, "no PseudoColor visual available" ); return( 1 ); } p_vout->p_sys->i_bytes_per_pixel = 1; @@ -2039,7 +2006,7 @@ static int InitDisplay( vout_thread_t *p_vout ) &xvisual_template, &i_count ); if( p_xvisual == NULL ) { - intf_ErrMsg( "vout error: no TrueColor visual available" ); + msg_Err( p_vout, "no TrueColor visual available" ); return( 1 ); } @@ -2085,7 +2052,8 @@ static int InitDisplay( vout_thread_t *p_vout ) * document by J.Corbet and K.Packard. Most of the parameters were copied from * there. See http://ftp.xfree86.org/pub/XFree86/4.0/doc/mit-shm.TXT *****************************************************************************/ -static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM, +static IMAGE_TYPE * CreateShmImage( vout_thread_t *p_vout, + Display* p_display, EXTRA_ARGS_SHM, int i_width, int i_height ) { IMAGE_TYPE *p_image; @@ -2100,7 +2068,7 @@ static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM, #endif if( p_image == NULL ) { - intf_ErrMsg( "vout error: image creation failed." ); + msg_Err( p_vout, "image creation failed" ); return( NULL ); } @@ -2109,8 +2077,8 @@ static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM, p_shm->shmid = shmget( IPC_PRIVATE, DATA_SIZE(p_image), IPC_CREAT | 0776 ); if( p_shm->shmid < 0 ) { - intf_ErrMsg( "vout error: cannot allocate shared image data (%s)", - strerror( errno ) ); + msg_Err( p_vout, "cannot allocate shared image data (%s)", + strerror( errno ) ); IMAGE_FREE( p_image ); return( NULL ); } @@ -2119,8 +2087,8 @@ static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM, p_shm->shmaddr = p_image->data = shmat( p_shm->shmid, 0, 0 ); if(! p_shm->shmaddr ) { - intf_ErrMsg( "vout error: cannot attach shared memory (%s)", - strerror(errno)); + msg_Err( p_vout, "cannot attach shared memory (%s)", + strerror(errno)); IMAGE_FREE( p_image ); shmctl( p_shm->shmid, IPC_RMID, 0 ); return( NULL ); @@ -2132,7 +2100,7 @@ static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM, /* Attach shared memory segment to X server */ if( XShmAttach( p_display, p_shm ) == False ) { - intf_ErrMsg( "vout error: cannot attach shared memory to X server" ); + msg_Err( p_vout, "cannot attach shared memory to X server" ); IMAGE_FREE( p_image ); shmctl( p_shm->shmid, IPC_RMID, 0 ); shmdt( p_shm->shmaddr ); @@ -2159,7 +2127,8 @@ static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM, ***************************************************************************** * Create a simple image used as a buffer. *****************************************************************************/ -static IMAGE_TYPE * CreateImage( Display *p_display, EXTRA_ARGS, +static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout, + Display *p_display, EXTRA_ARGS, int i_width, int i_height ) { byte_t * p_data; /* image data storage zone */ @@ -2178,7 +2147,7 @@ static IMAGE_TYPE * CreateImage( Display *p_display, EXTRA_ARGS, #endif if( !p_data ) { - intf_ErrMsg( "vout error: %s", strerror(ENOMEM)); + msg_Err( p_vout, "out of memory" ); return( NULL ); } @@ -2209,7 +2178,7 @@ static IMAGE_TYPE * CreateImage( Display *p_display, EXTRA_ARGS, #endif if( p_image == NULL ) { - intf_ErrMsg( "vout error: XCreateImage() failed" ); + msg_Err( p_vout, "XCreateImage() failed" ); free( p_data ); return( NULL ); } diff --git a/plugins/x11/xvideo.c b/plugins/x11/xvideo.c index 1864c005bd..fe9abdaaf1 100644 --- a/plugins/x11/xvideo.c +++ b/plugins/x11/xvideo.c @@ -2,7 +2,7 @@ * xvideo.c : Xvideo plugin for vlc ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: xvideo.c,v 1.13 2002/05/30 08:17:04 gbazin Exp $ + * $Id: xvideo.c,v 1.14 2002/06/01 12:32:01 sam Exp $ * * Authors: Shane Harper * Vincent Seguin @@ -30,7 +30,7 @@ #include /* malloc(), free() */ #include /* strerror() */ -#include +#include #include "xcommon.h" @@ -53,7 +53,7 @@ #define DISPLAY_TEXT N_("X11 display name") #define DISPLAY_LONGTEXT N_( \ - "Specify the X11 hardware display you want to use.\nBy default vlc will " \ + "Specify the X11 hardware display you want to use. By default vlc will " \ "use the value of the DISPLAY environment variable.") #define CHROMA_TEXT N_("XVimage chroma format") @@ -72,7 +72,6 @@ MODULE_CONFIG_STOP MODULE_INIT_START SET_DESCRIPTION( _("XVideo extension module") ) ADD_CAPABILITY( VOUT, 150 ) - ADD_SHORTCUT( "xvideo" ) MODULE_INIT_STOP MODULE_ACTIVATE_START diff --git a/po/POTFILES.in b/po/POTFILES.in index aec0260999..164792dbcb 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,5 @@ -src/interface/main.c +src/libvlc.c +src/libvlc.h src/misc/configuration.c plugins/a52/a52.c plugins/aa/aa.c diff --git a/po/de.po b/po/de.po index 6dd504dd76..c921d2b28a 100644 --- a/po/de.po +++ b/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vlc 0.73.3\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2002-04-18 23:38+0100\n" "Last-Translator: Thomas Graf \n" "Language-Team: LANGUAGE \n" @@ -14,102 +14,232 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "Usage: %s [Optionen] [Parameter] [Date]...\n" + +#. Print module name +#: src/libvlc.c:828 +#, fuzzy, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "%s Modul Optionen:\n" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "text" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "zahl" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "gleitpunktzahl" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +#, fuzzy +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" +"\n" +"Abspielliste Elemente:\n" +" *.mpg, *.vob MPEG-1/2 Dateien\n" +" [dvd:][Gerät][@Raw_Gerät][@[title][,[Kapitel][,Winkel]]]\n" +" DVD Gerät\n" +" [vcd:][Gerät][@[Titel][,[Kapitel]]\n" +" VCD Gerät\n" +" udpstream:[@[][:]]\n" +" UDP stream gesendet von VLS\n" +" vlc:loop Abspielen der Abspielliste endlos " +"wiederholen\n" +" vlc:pause Abspielen von Abspiellistenelemten " +"pausieren\n" +" vlc:quit \tVLC beenden" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +#, fuzzy +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" +"\n" +"Drück die Eingabetaste um weiterzufahren..." + +#. Usage +#: src/libvlc.c:959 +#, fuzzy, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "Usage: %s [Optionen] [Parameter] [Date]...\n" + +#: src/libvlc.c:962 +#, fuzzy +msgid "[module] [description]\n" +msgstr "[Modul] [Beschreibung]" + +#: src/libvlc.c:1003 +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: de.po,v 1.10 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 msgid "interface module" msgstr "Oberfläche Modul" -#: src/interface/main.c:97 +#: src/libvlc.h:34 #, fuzzy msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." msgstr "" "Diese Option erlaubt Dir die Standard Oberfläche festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode verwendet." -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" -msgstr "Warnstufe (oder benutz -v, -vv, usw...)" +#: src/libvlc.h:38 +msgid "be verbose" +msgstr "" + +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." +msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:42 +msgid "be quiet" +msgstr "" + +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." msgstr "" -"Erhöhen der Warnstufe erlaubt es Dir Debug-Meldungen zu sehen welche Dir " -"helfen können ein Problem zu lösen." -#: src/interface/main.c:106 -msgid "output statistics" -msgstr "Ausgabestatistiken" +#: src/libvlc.h:46 +#, fuzzy +msgid "color messages" +msgstr "Meldungen" -#: src/interface/main.c:108 +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -"Aktivieren des Statusmodus wird deine Logkonsole mit verschiedenene " -"Statistikmeldungen überfluten." -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "Standard Suchpfad" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" "Diese Option erlaubt Dir den Standard Suchpfad für Dateien festzulegen." -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "Audio Ausgabe Modul" -#: src/interface/main.c:118 +#: src/libvlc.h:58 +#, fuzzy msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" "Diese Option erlaubt Dir den Audio Ausgabemodus festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode ausgewählt." -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +#, fuzzy +msgid "enable audio" msgstr "Audio deaktivieren" -#: src/interface/main.c:124 +#: src/libvlc.h:64 +#, fuzzy msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" "Dies wird die Audio Ausgabe komplett deaktivieren. Die Audiodekodierung wird " "ebenfalls deaktiviert, dadurch kann Prozessorzeit gespart werden." -#: src/interface/main.c:128 -msgid "mono audio" +#: src/libvlc.h:67 +#, fuzzy +msgid "force mono audio" msgstr "Mono Audio" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "Dies wird Audio Mono Ausgabe forcieren." -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "Audio Ausgabelautstärke" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "Du kannst hier die standard Lautstärke zwischen 0 und 1024 festlegen." -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "Audio Ausgabeformat" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -133,23 +263,24 @@ msgstr "" "7 -> mpeg2 audio (unsupported)\n" "8 -> ac3 pass-through" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "Audio Ausgabefrequenz (Hz)" -#: src/interface/main.c:151 +#: src/libvlc.h:90 +#, fuzzy msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" "Hiermit kannst du die standard Audio Ausgabefrequenz festlegen.\n" "Normale Werte sind 48000, 44100, 32000, 22050, 16000, 11025, 8000" -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "Audio Desynchronisation ausgleichen (in ms)" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." @@ -157,242 +288,247 @@ msgstr "" "Diese Option erlaubt Dir die Audio Ausgabe zu verzögern. Dies kann hilfreich " "sein wenn du eine Verzögerung zwischen Video und Audio feststellst." -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "Video Ausgabe Modul" -#: src/interface/main.c:161 +#: src/libvlc.h:100 +#, fuzzy msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" "Diese Option erlaubt Dir den standard Video Ausgabemodus festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode ausgewählt." -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +#, fuzzy +msgid "enable video" msgstr "Video deaktivieren" -#: src/interface/main.c:167 +#: src/libvlc.h:106 +#, fuzzy msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" "Dies wird die Video Ausgabe komplett deaktivieren. Die Videodekodierung wird " "ebenfalls deaktiviert, dadurch kann Prozessorzeit gespart werden." -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "Video Breite" -#: src/interface/main.c:178 +#: src/libvlc.h:116 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "Video Höhe" -#: src/interface/main.c:183 +#: src/libvlc.h:121 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "Graustufen Videoausgabe" -#: src/interface/main.c:192 +#: src/libvlc.h:130 +#, fuzzy msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" "Dies wird die Farbendekodierung komplett deaktivieren, dadurch kann " "Prozessorzeit gespart werden." -#: src/interface/main.c:195 +#: src/libvlc.h:133 msgid "fullscreen video output" msgstr "Vollbild Videoausgabe" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" "Wenn diese Option aktiviert ist, wird vlc immer im Vollbildmodus starten" -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" -msgstr "Hardware Beschleuning für Video Ausgabe deaktivieren" +#: src/libvlc.h:138 +#, fuzzy +msgid "overlay video output" +msgstr "Graustufen Videoausgabe" -#: src/interface/main.c:202 +#: src/libvlc.h:140 +#, fuzzy msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" "Standardmässig wird vlc versuchen die Vorteile (Overlay Erweiterungen) " "deiner Grafikkarte zu nutzen." -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "SPU Position forcieren" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "Video Filter Modul" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 msgid "server port" msgstr "Server Port" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 msgid "enable network channel mode" msgstr "Netzwerk Kanal Modus aktivieren" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 msgid "channel server address" msgstr "Kanal Server Adresse" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 msgid "channel server port" msgstr "Kanal Server Port" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 msgid "network interface" msgstr "Netzwerk Schnittstelle" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 msgid "choose program (SID)" msgstr "Programm wählen (SID)" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "Wähl das Programm indem du eine Service ID eingibst" -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "Audio wählen" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 msgid "choose channel" msgstr "Kanal wählen" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 msgid "choose subtitles" msgstr "Untertitel wählen" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "DVD Gerät" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "VCD Gerät" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "IPv6 forcieren" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "IPv4 forcieren" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "MPEG Audio Dekoder wählen" -#: src/interface/main.c:275 +#: src/libvlc.h:213 #, fuzzy msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " @@ -401,11 +537,11 @@ msgstr "" "Diese Option erlaubt Dir den Audio Ausgabemodus festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode ausgewählt." -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "AC3 Audio Dekoder wählen" -#: src/interface/main.c:280 +#: src/libvlc.h:218 #, fuzzy msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " @@ -414,99 +550,123 @@ msgstr "" "Diese Option erlaubt Dir den Audio Ausgabemodus festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode ausgewählt." -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +#, fuzzy +msgid "enable CPU MMX support" msgstr "MMX Unterstützung deaktivieren" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +#, fuzzy +msgid "enable CPU 3D Now! support" msgstr "3D Now! Unterstützung deaktivieren" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +#, fuzzy +msgid "enable CPU MMX EXT support" msgstr "MMX EXT Unterstützung deaktivieren." -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +#, fuzzy +msgid "enable CPU SSE support" msgstr "SSE Unterstüzung deaktivieren" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +#, fuzzy +msgid "enable CPU AltiVec support" msgstr "AltiVec Unterstützung deaktiveren" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "Abspielliste aufrufen beim Starten" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +#, fuzzy +msgid "enqueue items in playlist" msgstr "Standardmässig in die Abspielliste einreihen" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "Abspielliste endlos abspielen" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "Speicherkopier Modul" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +#, fuzzy +msgid "access module" +msgstr "Oberfläche Modul" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +#, fuzzy +msgid "demux module" +msgstr "Hilfe Modul" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -514,216 +674,144 @@ msgid "" msgstr "" #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "Oberfläche" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "Eingabe" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "Dekoder" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "Prozessor" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "Abspielliste" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "Sonstiges" -#: src/interface/main.c:432 +#: src/libvlc.h:378 msgid "main program" msgstr "Hauptprogramm" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "Hilfetext anzeigen" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "Detailierter Hilfetext anzeigen" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "Liste allen verfügbaren Plugins ausgeben" -#: src/interface/main.c:452 -msgid "print help on module " +#: src/libvlc.h:396 +#, fuzzy +msgid "print help on module" msgstr "Hilfe über Modul ausgeben" -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "Versionsinformationen ausgeben." -#: src/interface/main.c:603 -msgid "help module" -msgstr "Hilfe Modul" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "Usage: %s [Optionen] [Parameter] [Date]...\n" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "%s Modul Optionen:\n" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "text" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "zahl" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "gleitpunktzahl" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" -"\n" -"Abspielliste Elemente:\n" -" *.mpg, *.vob MPEG-1/2 Dateien\n" -" [dvd:][Gerät][@Raw_Gerät][@[title][,[Kapitel][,Winkel]]]\n" -" DVD Gerät\n" -" [vcd:][Gerät][@[Titel][,[Kapitel]]\n" -" VCD Gerät\n" -" udpstream:[@[][:]]\n" -" UDP stream gesendet von VLS\n" -" vlc:loop Abspielen der Abspielliste endlos " -"wiederholen\n" -" vlc:pause Abspielen von Abspiellistenelemten " -"pausieren\n" -" vlc:quit \tVLC beenden" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" -"\n" -"Drück die Eingabetaste um weiterzufahren..." - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "[Modul] [Beschreibung]" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." -msgstr "" +#: src/libvlc.h:401 +#, fuzzy +msgid "print build information" +msgstr "Versionsinformationen ausgeben." -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "boolesch" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "a52 ATSC A/52 aka AC-3 Audio Dekoder Modul" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "ACII-Art Video Ausgabemodul" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "AC3 downmix Modul" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "AC3 IMDCT Modul" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "Software AC3 Dekoder" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "SPDIF pass-through AC3 Dekoder" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "HTTP Zugriff Modul" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "Raw UDP Zugriff Modul" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "ALSA Audio Modul" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "aRts Audio MOdul" @@ -731,48 +819,48 @@ msgstr "aRts Audio MOdul" msgid "BeOS standard API module" msgstr "BeOS Standard API Modul" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 Umwandlungen" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 Umwandlungen" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "Wandlungen von " -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr "zu " -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "MXX Wandlungen von " #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -780,7 +868,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "DirectX Erweiterung Modul" @@ -792,11 +880,11 @@ msgstr "3D Now! AC3 downmix Modul" msgid "SSE AC3 downmix module" msgstr "SSE AC3 downmix Modul" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "OSS dsp Gerät" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "Linux OSS /dev/dsp Modul" @@ -813,7 +901,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "Dummy Funktions Modul" @@ -841,95 +929,147 @@ msgstr "[dvdread:][Ger msgid "DVDRead input module" msgstr "DVDRead Eingabe Modul" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "EsounD Audio Modul" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "Frambuffer Gerät" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "Linux Konsolen Framebuffer Modul" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +#, fuzzy +msgid "Deinterlace mode" +msgstr "Oberfläche Modul" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "Deinterlacing Modul" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +#, fuzzy +msgid "distort mode" +msgstr "Netzwerk" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "Verschiedene Videoeffekt Module" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "Umkehren Video Modul" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "Bildtransformations Modul" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "Bildwand Video Modul" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "Scope Effekt Modul" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "X11 Display Name" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." msgstr "" -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +#, fuzzy +msgid "show tooltips" msgstr "Tooltips verstecken" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +#, fuzzy +msgid "Show tooltips for configuration options." msgstr "Keine Tooltips für Konfigurationsoptionen anzeigen" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "Maximale Höhe des Konfigurationsfenster" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." msgstr "Du kannst die maximale Höhe des Konfigurationsfesnter festlegen." -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "Gtk+ Oberfläche Modul" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "Gnome Benutzeroberfläche Modul" @@ -942,35 +1082,35 @@ msgstr "VideoLAN Client" msgid "_File" msgstr "_Datei" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "Datei _öffnen..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "Datei öffnen" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "_DVD/VCD laden..." #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "DVD/VCD laden" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "_Netzwerk Stream..." #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "Netzwerk Stream laden" @@ -1004,7 +1144,7 @@ msgstr "Oberfl msgid "Hide the main interface window" msgstr "Hauptfenster verstecken" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "_Vollbild" @@ -1062,17 +1202,17 @@ msgstr "_Einstellungen" msgid "A_udio" msgstr "A_udio" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "Audio Kanal festlegen" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "_Untertitel" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "Untertitel festlegen" @@ -1097,14 +1237,14 @@ msgstr "_ msgid "About this application" msgstr "_Über diese Applikation" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "Datei" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1122,7 +1262,7 @@ msgstr "Sat" msgid "Open a Satellite Card" msgstr "Abspielisten Fenster öffnen" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "Zurück" @@ -1131,7 +1271,7 @@ msgstr "Zur msgid "Go Backward" msgstr "Zurück gehen" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "Stop" @@ -1144,7 +1284,7 @@ msgstr "Stream stoppen" msgid "Eject" msgstr "Auswerfen" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "Abspielen" @@ -1153,7 +1293,7 @@ msgstr "Abspielen" msgid "Play Stream" msgstr "Stream abspielen" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "Pause" @@ -1162,7 +1302,7 @@ msgstr "Pause" msgid "Pause Stream" msgstr "Stream pausieren" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "Langsam" @@ -1171,7 +1311,7 @@ msgstr "Langsam" msgid "Play Slower" msgstr "Langsamer abspielen" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "Schnell" @@ -1184,7 +1324,7 @@ msgstr "Schneller abspielen" msgid "Open Playlist" msgstr "Abspielliste öffnen" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1194,7 +1334,7 @@ msgstr "Vorher" msgid "Previous File" msgstr "Vorherige Datei" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1204,27 +1344,15 @@ msgstr "N msgid "Next File" msgstr "Nächste Datei" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "-:--:--" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "Titel:" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "--" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "Kapitel:" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "---" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "Kein Server" @@ -1232,7 +1360,7 @@ msgstr "Kein Server" msgid "Channel:" msgstr "Kanal:" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "Los!" @@ -1240,28 +1368,28 @@ msgstr "Los!" msgid "_Play" msgstr "_Play" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "Oberfläche ein/ausschalten" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "_Springen" -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "Programm" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "_Navigation" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "_Audio" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "Playlist..." @@ -1269,7 +1397,7 @@ msgstr "Playlist..." msgid "About" msgstr "Über uns" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - das VideoLAN Team" @@ -1283,7 +1411,7 @@ msgid "" "http://www.videolan.org/" msgstr "" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1294,7 +1422,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "OK" @@ -1302,39 +1430,39 @@ msgstr "OK" msgid "Select File" msgstr "Datei festlegen" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "DVD/VCD öffnen" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "DVD/VCD Typ" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "DVD" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "VCD" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "Startposition" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "Kapitel" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "Titel" @@ -1344,7 +1472,7 @@ msgstr "Ger #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "Abbrechen" @@ -1352,43 +1480,43 @@ msgstr "Abbrechen" msgid "Open Network" msgstr "Netzwerk öffnen" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 #, fuzzy msgid "Network mode" msgstr "Netzwerk" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 #, fuzzy msgid "Channel server " msgstr "Kanal Server" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "HTTP" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "Port" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "Adresse" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1400,37 +1528,37 @@ msgstr "Springen" msgid "Go to:" msgstr "Gehe zu:" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "s." -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "m:" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "h:" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "Hinzufügen" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "Netzwerk" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "URL" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "Löschen" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "Alle" @@ -1438,7 +1566,7 @@ msgstr "Alle" msgid "Selected" msgstr "Selektiert" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "Selektion" @@ -1454,71 +1582,46 @@ msgstr "_Umkehren" msgid "_Select" msgstr "_Festlegen" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "Dauer" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "Meldungen" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "Satelliten Karte öffnen" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "Frequenz" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "Polarisation" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "Vertikal" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "Horizontal" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "Titel wählen" @@ -1531,43 +1634,43 @@ msgstr "Kapitel w msgid "Select previous title" msgstr "Vorheriger Titel festlegen" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "Vorheriges Kapitel festlegen" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "Nächstes Kapitel festlegen" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "Netzwerk Kanal:" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 msgid "Toggle fullscreen mode" msgstr "Vollbildmodus ändern" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "Geh direkt zum " -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "Durch Titel und Kapitel navigieren" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "Datei öffnen" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "Module" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." @@ -1575,106 +1678,102 @@ msgstr "" "Der Module Manager ist noch nicht implementiert. Versuch es in einer " "späteren Version nochmals." -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "Gerätename:" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "Netzwerk Stream" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "Element" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "Kürzen" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "Umkehren" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "Auswählen" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "Spring zu:" -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "Stream öffnen" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "Protokoll" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "Stream abspielen" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "RTP" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "Server" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "Broadcast" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "Kanäle" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "Kanal Server" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "Name" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Description" msgstr "Beschreibung" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "Konfigurieren" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 msgid "Selected:" msgstr "Selektiert:" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 msgid "Save" msgstr "Speichern" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "Übernehmen" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, c-format msgid "Title %d (%d)" msgstr "Titel %d (%d)" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, c-format msgid "Chapter %d" msgstr "Kapitel %d" @@ -1682,12 +1781,13 @@ msgstr "Kapitel %d" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "IDCT Modul" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +#, fuzzy +msgid "AltiVec IDCT module" msgstr "AltiVec IDCT Modul" #: plugins/idct/idctclassic.c:47 @@ -1714,11 +1814,11 @@ msgstr "SSE AC3 IMDCT Modul" msgid "KDE interface module" msgstr "KDE Öberflace Modul" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "Infrarot Fernbedienung Modul" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "linearer PCM Audio Dekoder" @@ -1729,17 +1829,17 @@ msgstr "MaxOS X Oberfl #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "libmad MPEG 1/2/3 Audio Dekoder Bibliothek" @@ -1747,15 +1847,15 @@ msgstr "libmad MPEG 1/2/3 Audio Dekoder Bibliothek" msgid "libc memcpy module" msgstr "libc Speicherkopier Modul" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "3D Now! Speicherkopier Modul" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "MMX Speicherkopier Modul" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "MMX EXT Speicherkopier Modul" @@ -1763,18 +1863,18 @@ msgstr "MMX EXT Speicherkopier Modul" msgid "AltiVec memcpy module" msgstr "AltiVec Speicherkopier Modul" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "Matrox Graphic Array Video Ausgabe" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "Alternativer Vollbildmodus" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1791,11 +1891,17 @@ msgstr "" "2) Den Window Manager nicht beachten, damit wird es jedoch unmöglich andere " "Fenster über dem Ausgabefenster zu haben." -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "X11 MGA Modul" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "Motion Compensation Modul" @@ -1815,64 +1921,61 @@ msgstr "MMX Motion Compensation Modul" msgid "MMXEXT motion compensation module" msgstr "MMXEXT Motion Compensation Modul" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "MPEG I/II layer 1/2 Audio Dekoder" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "ISO 13818-2 MPEG Elementarz Stream Eingabe" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "ISO 13818-1 MPEG Program Stream Eingabe" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "ISO 13818-1 MPEG Transport Stream Eingabe" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 #, fuzzy msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "ISO 13818-1 MPEG Transport Stream Eingabe" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 #, fuzzy msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" "Diese Option erlaubt Dir die Standard Oberfläche festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode verwendet." -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 #, fuzzy msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" "Diese Option erlaubt Dir den standard Video Ausgabemodus festzulegen.\n" "Merke Dir, standardmässig wird die beste Methode ausgewählt." -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "Benutz zusätzliche Prozessoren" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "Synchro Algorithmus focieren {I|I+|IP|IP+|IPB}" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1880,7 +1983,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "MPEG I/II Video Dekoder Modul" @@ -1892,7 +1995,7 @@ msgstr "IPv4 Netzwerk Abstraktionsschicht" msgid "IPv6 network abstraction layer" msgstr "IPv6 Netzwerk Abstraktionsschict" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "QNX RTOS Modul" @@ -1943,29 +2046,46 @@ msgstr "Antenne lnb_slof (kHz)" msgid "satellite input module" msgstr "Satellit Eingabe Modul" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "SDL (Simple DirectMedia Layer) Modul" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "DVD Untertitel Dekoder Modul" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "Datei Logger Oberflächen Modul" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "NCurses Oberfläche Modul" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "Fernbedienung Schnittstelle Modul" @@ -1973,11 +2093,24 @@ msgstr "Fernbedienung Schnittstelle Modul" msgid "VCD input module" msgstr "VCD Eingabe Modul" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "Win32 waveOut Erweiterung Modul" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "Win32 Oberfläche Modul" @@ -2015,6 +2148,38 @@ msgstr "" msgid "XVideo extension module" msgstr "XVideo Erweiterung Modul" +#~ msgid "disable hardware acceleration for the video output" +#~ msgstr "Hardware Beschleuning für Video Ausgabe deaktivieren" + +#~ msgid "-:--:--" +#~ msgstr "-:--:--" + +#~ msgid "--" +#~ msgstr "--" + +#~ msgid "---" +#~ msgstr "---" + +#~ msgid "output statistics" +#~ msgstr "Ausgabestatistiken" + +#~ msgid "" +#~ "Enabling the stats mode will flood your log console with various " +#~ "statistics messages." +#~ msgstr "" +#~ "Aktivieren des Statusmodus wird deine Logkonsole mit verschiedenene " +#~ "Statistikmeldungen überfluten." + +#~ msgid "warning level (or use -v, -vv, etc...)" +#~ msgstr "Warnstufe (oder benutz -v, -vv, usw...)" + +#~ msgid "" +#~ "Increasing the warning level will allow you to see more debug messages " +#~ "and can sometimes help you to troubleshoot a problem." +#~ msgstr "" +#~ "Erhöhen der Warnstufe erlaubt es Dir Debug-Meldungen zu sehen welche Dir " +#~ "helfen können ein Problem zu lösen." + #, fuzzy #~ msgid "" #~ "This option allows you to select the video filter module that vlc will " diff --git a/po/en_GB.po b/po/en_GB.po index f74c723df1..813b922512 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-30 13:40+0200\n" "PO-Revision-Date: 2002-04-22 09:56+0200\n" "Last-Translator: Samuel Hocevar \n" "Language-Team: LANGUAGE \n" @@ -13,96 +13,206 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 +#: src/libvlc.c:247 +msgid "help module" +msgstr "" + +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "" + +#. Print module name +#: src/libvlc.c:826 +#, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "" + +#. We could also have "=<" here +#: src/libvlc.c:858 src/misc/configuration.c:777 +msgid "string" +msgstr "" + +#: src/libvlc.c:861 src/misc/configuration.c:762 +msgid "integer" +msgstr "" + +#: src/libvlc.c:864 src/misc/configuration.c:769 +msgid "float" +msgstr "" + +#: src/libvlc.c:897 +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" + +#: src/libvlc.c:918 src/libvlc.c:967 src/libvlc.c:991 src/libvlc.c:1010 +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" + +#. Usage +#: src/libvlc.c:941 +#, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "" + +#: src/libvlc.c:944 +msgid "[module] [description]\n" +msgstr "" + +#: src/libvlc.c:985 +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" +"This programme comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at École Centrale, Paris.\n" + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: en_GB.po,v 1.5 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 msgid "interface module" msgstr "" -#: src/interface/main.c:97 +#: src/libvlc.h:34 msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." msgstr "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behaviour is to automatically select the best module " +"This option allows you to select the interface used by vlc. " +"The default behaviour is to automatically select the best module " "available." -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" +#: src/libvlc.h:38 +msgid "be verbose" msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." msgstr "" -#: src/interface/main.c:106 -msgid "output statistics" +#: src/libvlc.h:42 +msgid "be quiet" msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" + +#: src/libvlc.h:46 +msgid "color messages" +msgstr "" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "" -#: src/interface/main.c:118 -msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +#: src/libvlc.h:58 +#, fuzzy +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behaviour is to automatically select the best method " +"This option allows you to select the audio audio output method used by vlc. " +"The default behaviour is to automatically select the best method " "available." -#: src/interface/main.c:122 +#: src/libvlc.h:62 msgid "disable audio" msgstr "" -#: src/interface/main.c:124 +#: src/libvlc.h:64 msgid "" "This will completely disable the audio output. The audio decoding stage " "shouldn't even be done, so it can allow you to save some processing power." msgstr "" -#: src/interface/main.c:128 +#: src/libvlc.h:68 msgid "mono audio" msgstr "" -#: src/interface/main.c:129 +#: src/libvlc.h:69 msgid "This will force a mono audio output" msgstr "" -#: src/interface/main.c:131 +#: src/libvlc.h:71 msgid "audio output volume" msgstr "" -#: src/interface/main.c:133 +#: src/libvlc.h:73 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "" -#: src/interface/main.c:136 +#: src/libvlc.h:76 msgid "audio output format" msgstr "" -#: src/interface/main.c:138 +#: src/libvlc.h:78 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -116,93 +226,92 @@ msgid "" "8 -> ac3 pass-through" msgstr "" -#: src/interface/main.c:149 +#: src/libvlc.h:89 msgid "audio output frequency (Hz)" msgstr "" -#: src/interface/main.c:151 +#: src/libvlc.h:91 msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" -#: src/interface/main.c:154 +#: src/libvlc.h:94 msgid "compensate desynchronization of audio (in ms)" msgstr "" -#: src/interface/main.c:156 +#: src/libvlc.h:96 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." msgstr "" -#: src/interface/main.c:159 +#: src/libvlc.h:99 msgid "video output module" msgstr "" -#: src/interface/main.c:161 +#: src/libvlc.h:101 msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behaviour is to automatically select the best method " +"This option allows you to select the video output method used by vlc. " +"The default behaviour is to automatically select the best method " "available." -#: src/interface/main.c:165 +#: src/libvlc.h:105 msgid "disable video" msgstr "" -#: src/interface/main.c:167 +#: src/libvlc.h:107 msgid "" "This will completely disable the video output. The video decoding stage " "shouldn't even be done, so it can allow you to save some processing power." msgstr "" -#: src/interface/main.c:171 +#: src/libvlc.h:111 msgid "display identifier" msgstr "" -#: src/interface/main.c:173 +#: src/libvlc.h:113 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:116 msgid "video width" msgstr "" -#: src/interface/main.c:178 +#: src/libvlc.h:118 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -#: src/interface/main.c:181 +#: src/libvlc.h:121 msgid "video height" msgstr "" -#: src/interface/main.c:183 +#: src/libvlc.h:123 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -#: src/interface/main.c:186 +#: src/libvlc.h:126 msgid "zoom video" msgstr "" -#: src/interface/main.c:188 +#: src/libvlc.h:128 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:130 msgid "grayscale video output" msgstr "greyscale video output" -#: src/interface/main.c:192 +#: src/libvlc.h:132 msgid "" "Using this option, vlc will not decode the color information from the video " "(this can also allow you to save some processing power)." @@ -210,272 +319,272 @@ msgstr "" "Using this option, vlc will not decode the colour information from the video " "(this can also allow you to save some processing power)." -#: src/interface/main.c:195 +#: src/libvlc.h:135 msgid "fullscreen video output" msgstr "" -#: src/interface/main.c:197 +#: src/libvlc.h:137 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" -#: src/interface/main.c:200 +#: src/libvlc.h:140 msgid "disable hardware acceleration for the video output" msgstr "" -#: src/interface/main.c:202 +#: src/libvlc.h:142 msgid "" "By default vlc will try to take advantage of the overlay capabilities of you " "graphics card." msgstr "" -#: src/interface/main.c:205 +#: src/libvlc.h:145 msgid "force SPU position" msgstr "" -#: src/interface/main.c:207 +#: src/libvlc.h:147 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:150 msgid "video filter module" msgstr "" -#: src/interface/main.c:212 +#: src/libvlc.h:152 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:156 msgid "server port" msgstr "" -#: src/interface/main.c:218 +#: src/libvlc.h:158 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:160 msgid "enable network channel mode" msgstr "" -#: src/interface/main.c:222 +#: src/libvlc.h:162 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:164 msgid "channel server address" msgstr "" -#: src/interface/main.c:226 +#: src/libvlc.h:166 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:168 msgid "channel server port" msgstr "" -#: src/interface/main.c:230 +#: src/libvlc.h:170 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:172 msgid "network interface" msgstr "" -#: src/interface/main.c:234 +#: src/libvlc.h:174 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:177 msgid "choose program (SID)" msgstr "choose programme (SID)" -#: src/interface/main.c:239 +#: src/libvlc.h:179 msgid "Choose the program to select by giving its Service ID." msgstr "Choose the programme to select by giving its Service ID." -#: src/interface/main.c:241 +#: src/libvlc.h:181 msgid "choose audio" msgstr "" -#: src/interface/main.c:243 +#: src/libvlc.h:183 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:185 msgid "choose channel" msgstr "" -#: src/interface/main.c:247 +#: src/libvlc.h:187 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:190 msgid "choose subtitles" msgstr "" -#: src/interface/main.c:252 +#: src/libvlc.h:192 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:195 msgid "DVD device" msgstr "" -#: src/interface/main.c:257 +#: src/libvlc.h:197 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:199 msgid "VCD device" msgstr "" -#: src/interface/main.c:261 +#: src/libvlc.h:201 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:203 msgid "force IPv6" msgstr "" -#: src/interface/main.c:265 +#: src/libvlc.h:205 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:208 msgid "force IPv4" msgstr "" -#: src/interface/main.c:270 +#: src/libvlc.h:210 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:213 msgid "choose MPEG audio decoder" msgstr "" -#: src/interface/main.c:275 +#: src/libvlc.h:215 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." msgstr "" -#: src/interface/main.c:278 +#: src/libvlc.h:218 msgid "choose AC3 audio decoder" msgstr "" -#: src/interface/main.c:280 +#: src/libvlc.h:220 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." msgstr "" -#: src/interface/main.c:283 +#: src/libvlc.h:223 msgid "disable CPU's MMX support" msgstr "" -#: src/interface/main.c:285 +#: src/libvlc.h:225 msgid "" "If your processor supports the MMX instructions set but you don't want vlc " "to use them, you can use this option." msgstr "" -#: src/interface/main.c:288 +#: src/libvlc.h:228 msgid "disable CPU's 3D Now! support" msgstr "" -#: src/interface/main.c:290 +#: src/libvlc.h:230 msgid "" "If your processor supports the 3D Now! instructions set but you don't want " "vlc to use them, you can use this option." msgstr "" -#: src/interface/main.c:293 +#: src/libvlc.h:233 msgid "disable CPU's MMX EXT support" msgstr "" -#: src/interface/main.c:295 +#: src/libvlc.h:235 msgid "" "If your processor supports the MMX EXT instructions set but you don't want " "vlc to use them, you can use this option." msgstr "" -#: src/interface/main.c:298 +#: src/libvlc.h:238 msgid "disable CPU's SSE support" msgstr "" -#: src/interface/main.c:300 +#: src/libvlc.h:240 msgid "" "If your processor supports the SSE instructions set but you don't want vlc " "to use them, you can use this option." msgstr "" -#: src/interface/main.c:303 +#: src/libvlc.h:243 msgid "disable CPU's AltiVec support" msgstr "" -#: src/interface/main.c:305 +#: src/libvlc.h:245 msgid "" "If your processor supports the AltiVec instructions set but you don't want " "vlc to use them, you can use this option." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:248 msgid "launch playlist on startup" msgstr "" -#: src/interface/main.c:310 +#: src/libvlc.h:250 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 +#: src/libvlc.h:252 msgid "enqueue playlist as default" msgstr "" -#: src/interface/main.c:314 +#: src/libvlc.h:254 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:257 msgid "loop playlist on end" msgstr "" -#: src/interface/main.c:319 +#: src/libvlc.h:259 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:262 msgid "memory copy module" msgstr "" -#: src/interface/main.c:324 +#: src/libvlc.h:264 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:267 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "" -#: src/interface/main.c:329 +#: src/libvlc.h:269 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -483,204 +592,141 @@ msgid "" msgstr "" #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:291 msgid "Interface" msgstr "" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: plugins/directx/directx.c:56 src/libvlc.h:299 msgid "Audio" msgstr "" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:310 msgid "Video" msgstr "" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:323 msgid "Input" msgstr "" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:342 msgid "Decoders" msgstr "" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:347 msgid "CPU" msgstr "" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:355 msgid "Playlist" msgstr "" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:72 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 src/libvlc.h:361 msgid "Miscellaneous" msgstr "" -#: src/interface/main.c:432 +#: src/libvlc.h:373 msgid "main program" msgstr "main programme" -#: src/interface/main.c:446 +#: src/libvlc.h:387 msgid "print help" msgstr "" -#: src/interface/main.c:448 +#: src/libvlc.h:389 msgid "print detailed help" msgstr "" -#: src/interface/main.c:450 +#: src/libvlc.h:391 msgid "print a list of available modules" msgstr "" -#: src/interface/main.c:452 +#: src/libvlc.h:393 msgid "print help on module " msgstr "" -#: src/interface/main.c:455 +#: src/libvlc.h:396 msgid "print version information" msgstr "" -#: src/interface/main.c:603 -msgid "help module" -msgstr "" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" +#: src/libvlc.h:398 +msgid "print build information" msgstr "" -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." -msgstr "" -"This programme comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at École Centrale, Paris." - -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:762 msgid "boolean" msgstr "" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 +#: plugins/a52/a52.c:72 msgid "disable A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "" @@ -688,48 +734,48 @@ msgstr "" msgid "BeOS standard API module" msgstr "" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr "" -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 +#: plugins/directx/directx.c:41 msgid "Disable hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" "Don't try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 +#: plugins/directx/directx.c:45 msgid "Use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -737,7 +783,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:60 msgid "DirectX extension module" msgstr "" @@ -749,11 +795,11 @@ msgstr "" msgid "SSE AC3 downmix module" msgstr "" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "" @@ -770,7 +816,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "" @@ -798,95 +844,143 @@ msgstr "" msgid "DVDRead input module" msgstr "" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +msgid "Deinterlace mode" +msgstr "" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +msgid "distort mode" +msgstr "" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." msgstr "" -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 msgid "hide tooltips" msgstr "" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 msgid "Do not show tooltips for configuration options." msgstr "" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:66 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:68 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." msgstr "" -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:80 msgid "Gtk+ interface module" msgstr "" -#: plugins/gtk/gnome.c:66 +#: plugins/gtk/gnome.c:63 msgid "hide text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 +#: plugins/gtk/gnome.c:64 msgid "Do not show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:83 msgid "Gnome interface module" msgstr "" @@ -899,35 +993,35 @@ msgstr "" msgid "_File" msgstr "" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "" #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "" #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "" #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "" @@ -961,7 +1055,7 @@ msgstr "" msgid "Hide the main interface window" msgstr "" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "" @@ -1018,17 +1112,17 @@ msgstr "" msgid "A_udio" msgstr "" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "" @@ -1053,14 +1147,14 @@ msgstr "" msgid "About this application" msgstr "" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1078,7 +1172,7 @@ msgstr "" msgid "Open a Satellite Card" msgstr "" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "" @@ -1087,7 +1181,7 @@ msgstr "" msgid "Go Backward" msgstr "Go Backwards" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "" @@ -1100,7 +1194,7 @@ msgstr "" msgid "Eject" msgstr "" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "" @@ -1109,7 +1203,7 @@ msgstr "" msgid "Play Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "" @@ -1118,7 +1212,7 @@ msgstr "" msgid "Pause Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "" @@ -1127,7 +1221,7 @@ msgstr "" msgid "Play Slower" msgstr "" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "" @@ -1140,7 +1234,7 @@ msgstr "" msgid "Open Playlist" msgstr "" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1150,7 +1244,7 @@ msgstr "" msgid "Previous File" msgstr "" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1160,27 +1254,15 @@ msgstr "" msgid "Next File" msgstr "" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "" @@ -1188,7 +1270,7 @@ msgstr "" msgid "Channel:" msgstr "" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "" @@ -1196,28 +1278,28 @@ msgstr "" msgid "_Play" msgstr "" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "" -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "Programme" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "" @@ -1225,7 +1307,7 @@ msgstr "" msgid "About" msgstr "" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "" @@ -1239,7 +1321,7 @@ msgid "" "http://www.videolan.org/" msgstr "" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1248,7 +1330,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:523 msgid "OK" msgstr "" @@ -1256,39 +1338,39 @@ msgstr "" msgid "Select File" msgstr "" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:788 +#: plugins/gtk/gtk_menu.c:923 msgid "Chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:893 +#: plugins/gtk/gtk_menu.c:914 msgid "Title" msgstr "" @@ -1298,7 +1380,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:535 msgid "Cancel" msgstr "" @@ -1306,41 +1388,41 @@ msgstr "" msgid "Open Network" msgstr "" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 msgid "Network mode" msgstr "" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 msgid "Channel server " msgstr "" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1352,37 +1434,37 @@ msgstr "" msgid "Go to:" msgstr "" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "" -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "" @@ -1390,7 +1472,7 @@ msgstr "" msgid "Selected" msgstr "" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "" @@ -1406,71 +1488,46 @@ msgstr "" msgid "_Select" msgstr "" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "" @@ -1483,148 +1540,144 @@ msgstr "" msgid "Select previous title" msgstr "" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 msgid "Toggle fullscreen mode" msgstr "" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "Switch programme" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." msgstr "" -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:361 msgid "Select" msgstr "" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "" -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:307 msgid "Name" msgstr "" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:307 msgid "Description" msgstr "" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:350 msgid "Configure" msgstr "" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:373 msgid "Selected:" msgstr "" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:514 plugins/gtk/gtk_preferences.c:531 msgid "Save" msgstr "" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:527 msgid "Apply" msgstr "" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:514 msgid "None" msgstr "" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:673 #, c-format msgid "Title %d (%d)" msgstr "" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:736 #, c-format msgid "Chapter %d" msgstr "" @@ -1632,12 +1685,12 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "" #: plugins/idct/idctclassic.c:47 @@ -1664,11 +1717,11 @@ msgstr "" msgid "KDE interface module" msgstr "" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "" @@ -1679,17 +1732,17 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "" @@ -1697,15 +1750,15 @@ msgstr "" msgid "libc memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "" @@ -1713,18 +1766,18 @@ msgstr "" msgid "AltiVec memcpy module" msgstr "" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1734,11 +1787,17 @@ msgid "" "show on top of the video." msgstr "" -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "" @@ -1758,65 +1817,62 @@ msgstr "" msgid "MMXEXT motion compensation module" msgstr "" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" "This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behaviour is to automatically select the best module " +"decoder. " +"The default behaviour is to automatically select the best module " "available." -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behaviour is to automatically select the best module " +"video decoder. " +"The default behaviour is to automatically select the best module " "available." -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1824,7 +1880,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "" @@ -1836,7 +1892,7 @@ msgstr "" msgid "IPv6 network abstraction layer" msgstr "" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "" @@ -1883,29 +1939,46 @@ msgstr "" msgid "satellite input module" msgstr "" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "" @@ -1913,7 +1986,7 @@ msgstr "" msgid "VCD input module" msgstr "" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "" @@ -1921,7 +1994,7 @@ msgstr "" msgid "Win32 interface module" msgstr "" -#: plugins/x11/x11.c:61 +#: plugins/x11/x11.c:62 msgid "X11 module" msgstr "" diff --git a/po/fr.po b/po/fr.po index 66c1404d6a..a1b840f07b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2001-12-10 13:32+0100\n" "Last-Translator: Samuel Hocevar \n" "Language-Team: LANGUAGE \n" @@ -13,49 +13,178 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: src/interface/main.c:95 +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "Utilisation: %s [options] [paramètres] [fichier]...\n" + +#. Print module name +#: src/libvlc.c:828 +#, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "" +"options du module %s :\n" +"\n" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "chaîne" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "entier" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "flottant" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" +"\n" +"Éléments d'une playlist :\n" +" *.mpg, *.vob fichiers MPEG-1/2 standards\n" +" [dvd:][device][@raw_device][@[titre][,[chapitre][,angle]]]\n" +" périphérique DVD\n" +" [vcd:][device][@[titre][,[chapitre]]\n" +" périphérique VCD\n" +" udpstream:[@[][:]]\n" +" flux UDP envoyé par VLS\n" +" vlc:loop fait boucler la playlist\n" +" vlc:pause fait une pause dans la playlist\n" +" vlc:quit quitter VLC\n" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" +"\n" +"Appuyez sur ENTRÉE pour continuer...\n" + +#. Usage +#: src/libvlc.c:959 +#, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "" +"Utilisation: %s [options] [paramètres] [fichier]...\n" +"\n" + +#: src/libvlc.c:962 +msgid "[module] [description]\n" +msgstr "[module] [description]\n" + +#: src/libvlc.c:1003 +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" +"Ce programme est fourni SANS AUCUNE GARANTIE, tel que permis par la loi.\n" +"Vous pouvez le redistribuer selon les termes de la GNU General Public " +"License ;\n" +"voir le fichier COPYING pour plus de détails.\n" +"Écrit par l'équipe VideoLAN à l'École Centrale, Paris.\n" + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: fr.po,v 1.13 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 msgid "interface module" msgstr "module d'interface" -#: src/interface/main.c:97 +#: src/libvlc.h:34 msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." +msgstr "" +"Cette option permet de choisir l'interface utilisée par vlc. Le comportement " +"par défaut est de choisir automatiquement le meilleur module disponible." + +#: src/libvlc.h:38 +msgid "be verbose" msgstr "" -"Cette option permet de choisir l'interface utilisée par vlc.\n" -"Le comportement par défaut est de choisir automatiquement le meilleur module " -"disponible." -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" -msgstr "niveau de messages (au lieu de -v, -vv, etc.)" +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." +msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:42 +msgid "be quiet" msgstr "" -"En augmentant le niveau de messages, plus d'informations seront affichées et " -"pourront éventuellement servir à résoudre des problèmes." -#: src/interface/main.c:106 -msgid "output statistics" -msgstr "statistiques de sortie" +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:46 +msgid "color messages" +msgstr "messages en couleur" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -"En mode stats, la console de messages contiendra diverses informations " -"statistiques." -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "chemin de recherche par défaut de l'interface" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." @@ -63,54 +192,54 @@ msgstr "" "Cette option permet de choisir le chemin par défaut que l'interface " "utilisera pour ouvrir un fichier." -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "module de sortie audio" -#: src/interface/main.c:118 +#: src/libvlc.h:58 msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" -"Cette option permet de choisir le module de sortie audio utilisée par vlc.\n" +"Cette option permet de choisir le module de sortie audio utilisée par vlc. " "Le comportement par défaut est de choisir automatiquement le meilleur module " "disponible." -#: src/interface/main.c:122 -msgid "disable audio" -msgstr "désactiver l'audio" +#: src/libvlc.h:62 +msgid "enable audio" +msgstr "activer l'audio" -#: src/interface/main.c:124 +#: src/libvlc.h:64 +#, fuzzy msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" "Cette option désactive complètement la sortie audio. Le décodage des pistes " "audio ne sera pas non plus fait, afin d'économiser du temps processeur." -#: src/interface/main.c:128 -msgid "mono audio" -msgstr "sortie audio mono" +#: src/libvlc.h:67 +msgid "force mono audio" +msgstr "forcer la sortie audio mono" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "Cette option force une sortie audio mono" -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "volume de la sortie audio" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "Vous pouvez spécifier ici le volume de la sortie audio, de 0 à 1024." -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "format de sortie audio" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -134,23 +263,23 @@ msgstr "" "7 -> audio MPEG-2 (non supporté)\n" "8 -> AC3 pass-through" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "fréquence de la sortie audio (Hz)" -#: src/interface/main.c:151 +#: src/libvlc.h:90 msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" -"Vous pouvez forcer la fréquence de sortie audio.\n" -"Des valeurs courantes sont 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"Vous pouvez forcer la fréquence de sortie audio. Des valeurs courantes sont " +"48000, 44100, 32000, 22050, 16000, 11025, 8000." -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "compenser la désynchronisation de l'audio (en ms)" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." @@ -158,248 +287,252 @@ msgstr "" "Cette option permet de retarder la sortie audio. Cela peut être utile si " "vous remarquez un décalage entre l'audio et la vidéo." -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "module de sortie vidéo" -#: src/interface/main.c:161 +#: src/libvlc.h:100 msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" -"Cette option permet de choisir le module de sortie audio utilisée par vlc.\n" +"Cette option permet de choisir le module de sortie vidéo utilisée par vlc. " "Le comportement par défaut est de choisir automatiquement le meilleur module " "disponible." -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +#, fuzzy +msgid "enable video" msgstr "désactiver la vidéo" -#: src/interface/main.c:167 +#: src/libvlc.h:106 +#, fuzzy msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" "Cette option désactive complètement la sortie audio. Le décodage des pistes " "audio ne sera pas non plus fait, afin d'économiser du temps processeur." -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "identificateur de display" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "largeur de la sortie vidéo" -#: src/interface/main.c:178 +#: src/libvlc.h:116 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -"Vous pouvez forcer la largeur de l'image ici.\n" -"Notez que par défaut vlc s'adaptera aux propriétés de la vidéo." +"Vous pouvez forcer la largeur de l'image ici. Par défaut vlc s'adaptera aux " +"propriétés de la vidéo." -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "hauteur de la sortie vidéo" -#: src/interface/main.c:183 +#: src/libvlc.h:121 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -"Vous pouvez forcer la hauteur de l'image ici.\n" -"Notez que par défaut vlc s'adaptera aux propriétés de la vidéo." +"Vous pouvez forcer la hauteur de l'image ici. Par défaut vlc s'adaptera aux " +"propriétés de la vidéo." -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "agrandir l'image" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "Vous pouvez agrandir l'image d'un facteur spécifié." -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "sortie vidéo en niveaux de gris" -#: src/interface/main.c:192 +#: src/libvlc.h:130 +#, fuzzy msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" "En activant cette option, vlc ne décodera pas l'information de couleur " "présente dans la vidéo, ce qui permet d'économiser du temps processeur." -#: src/interface/main.c:195 +#: src/libvlc.h:133 msgid "fullscreen video output" msgstr "sortie vidéo en plein écran" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" "Lorsque cette option est activée, vlc lancera toujours la vidéo en mode " "plein écran." -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" -msgstr "désactiver l'accélération matérielle de l'affichage" +#: src/libvlc.h:138 +#, fuzzy +msgid "overlay video output" +msgstr "sortie vidéo en overlay" -#: src/interface/main.c:202 +#: src/libvlc.h:140 +#, fuzzy msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" "Par défaut vlc tentera d'utiliser les capacités d'overlay de votre carte " "vidéo." -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "forcer la position des sous-titres" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "module de filtre vidéo" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 msgid "server port" msgstr "port serveur" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 msgid "enable network channel mode" msgstr "activer le mode canal réseau" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 msgid "channel server address" msgstr "adresse du serveur de canaux" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 msgid "channel server port" msgstr "port du serveur de canaux" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 msgid "network interface" msgstr "interface réseau" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 msgid "choose program (SID)" msgstr "choisir le programme (SID)" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "Choisit le programme à sélectionner en fournissant son Service ID." -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "choisir la piste audio" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 msgid "choose channel" msgstr "choisir le canal réseau" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 msgid "choose subtitles" msgstr "choisir la piste de sous-titres" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "périphérique DVD" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "périphérique VCD" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "forcer l'utilisation d'IPv6" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "forcer l'utilisation d'IPv4" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "choisir le décodeur MPEG audio" -#: src/interface/main.c:275 +#: src/libvlc.h:213 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." @@ -407,11 +540,11 @@ msgstr "" "Cette option permet de choisir le module de décodage MPEG audio utilisé par " "vlc. Les choix habituels sont builtin et mad." -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "choisir le décodeur AC3 audio" -#: src/interface/main.c:280 +#: src/libvlc.h:218 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." @@ -419,99 +552,115 @@ msgstr "" "Cette option permet de choisir le module de décodage AC3 audio utilisé par " "vlc. Les choix habituels sont builtin et a52." -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" -msgstr "désactiver le support MMX du processeur" +#: src/libvlc.h:221 +msgid "enable CPU MMX support" +msgstr "activer le support MMX du processeur" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" -msgstr "désactiver le support 3D Now! du processeur" +#: src/libvlc.h:226 +msgid "enable CPU 3D Now! support" +msgstr "activer le support 3D Now! du processeur" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" -msgstr "désactiver le support MMX EXT du processeur" +#: src/libvlc.h:231 +msgid "enable CPU MMX EXT support" +msgstr "activer le support MMX EXT du processeur" -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" -msgstr "désactiver le support SSE du processeur" +#: src/libvlc.h:236 +msgid "enable CPU SSE support" +msgstr "activer le support SSE du processeur" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" -msgstr "désactiver le support AltiVec du processeur" +#: src/libvlc.h:241 +msgid "enable CPU AltiVec support" +msgstr "activer le support AltiVec du processeur" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "lancer la playlist au démarrage" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +msgid "enqueue items in playlist" msgstr "ajouter les fichiers en fin de playlist" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "boucler en fin de playlist" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "module de copie mémoire" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +msgid "access module" +msgstr "module d'accès" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +msgid "demux module" +msgstr "module de démultiplexage" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "implémentation pthread rapide pour NT/2K/XP (développeurs uniquement)" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -522,219 +671,142 @@ msgstr "" "avec laquelle vous pouvez rencontrer des problèmes." #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "Interface" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "Audio" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "Vidéo" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "Entrée" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "Décodeurs" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "Processeur" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "Playlist" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "Divers" -#: src/interface/main.c:432 +#: src/libvlc.h:378 msgid "main program" msgstr "programme principal" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "afficher l'aide" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "afficher l'aide détaillée" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "afficher la liste des modules disponibles" -#: src/interface/main.c:452 -msgid "print help on module " -msgstr "afficher l'aide du module " +#: src/libvlc.h:396 +msgid "print help on module" +msgstr "afficher l'aide du module" -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "afficher le nom et la version du logiciel" -#: src/interface/main.c:603 -msgid "help module" -msgstr "module d'aide" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "Utilisation: %s [options] [paramètres] [fichier]...\n" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "options du module %s :\n" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "chaîne" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "entier" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "flottant" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" -"\n" -"Éléments d'une playlist :\n" -" *.mpg, *.vob fichiers MPEG-1/2 standards\n" -" [dvd:][device][@raw_device][@[titre][,[chapitre][,angle]]]\n" -" périphérique DVD\n" -" [vcd:][device][@[titre][,[chapitre]]\n" -" périphérique VCD\n" -" udpstream:[@[][:]]\n" -" flux UDP envoyé par VLS\n" -" vlc:loop fait boucler la playlist\n" -" vlc:pause fait une pause dans la playlist\n" -" vlc:quit quitter VLC" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" -"\n" -"Appuyez sur ENTRÉE pour continuer..." +#: src/libvlc.h:401 +msgid "print build information" +msgstr "afficher les informations de compilation du logiciel" -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "[module] [description]" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." -msgstr "" -"Ce programme est fourni SANS AUCUNE GARANTIE, tel que permis par la loi.\n" -"Vous pouvez le redistribuer selon les termes de la GNU General Public " -"License ;\n" -"voir le fichier COPYING pour plus de détails.\n" -"Écrit par l'équipe VideoLAN à l'École Centrale, Paris." - -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "booléen" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "module de décodage son ATSC A/52 (ou AC-3)" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "module vidéo en art ASCII" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "module de remultiplexage AC3" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "module d'IMDCT AC3" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "décodeur AC3 logiciel" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "décodeur AC3 SPDIF pour carte de décodage" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "lecture standard d'un système de fichiers" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "module d'accès HTTP" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "module d'accès UDP" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "module audio ALSA" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "module audio aRts" @@ -742,48 +814,48 @@ msgstr "module audio aRts" msgid "BeOS standard API module" msgstr "module utilisant l'API standard BeOS" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "conversions de I420,IYUV,YV12 vers RGB,RV15,RV16,RV24,RV32" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "conversions MMX de I420,IYUV,YV12 vers RV15,RV16,RV24,RV32" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "conversions de " -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr " vers " -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "conversions MMX de " #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -791,7 +863,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "module audio et vidéo pour l'extension DirectX" @@ -803,11 +875,11 @@ msgstr "module de remultiplexage AC3 optimis msgid "SSE AC3 downmix module" msgstr "module de remultiplexage AC3 optimisé SSE" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "périphérique dsp OSS" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "module pour le /dev/dsp OSS de Linux" @@ -824,7 +896,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "module de fonctions qui ne font rien" @@ -852,52 +924,100 @@ msgstr "[dvdread:][device][@[titre][,[chapitre][,angle]]]" msgid "DVDRead input module" msgstr "module d'entrée DVD, utilise la libdvdread" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "module audio EsounD" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "périphérique du framebuffer" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "module vidéo pour le framebuffer de Linux" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +msgid "Deinterlace mode" +msgstr "Mode de désentrelacement" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "au choix, 'bob' ou 'blend'" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "module de désentrelacement" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +msgid "distort mode" +msgstr "mode de distortion" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "au choix, \"wave\" ou \"ripple\"" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "module d'effets vidéo variés" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "module d'inversion vidéo" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "module vidéo de transformation d'image" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "module vidéo de murs d'images" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "module audio d'oscilloscope" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "nom du display X11" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." @@ -905,26 +1025,26 @@ msgstr "" "Spécifier le display X11 que vous désirez utiliser.\n" "Par défaut vlc utilisera la valeur de la variable d'environnement DISPLAY." -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "module vidéo Glide pour cartes 3dfx" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" -msgstr "cacher les bulles d'aide" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +msgid "show tooltips" +msgstr "afficher les bulles d'aide" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." -msgstr "Ne montre pas les bulles d'aide pour les options de configuration" +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +msgid "Show tooltips for configuration options." +msgstr "Affiche des bulles d'aide pour les options de configuration" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "hauteur maximale des fenêtres de configuration" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." @@ -932,19 +1052,19 @@ msgstr "" "Vous pouvez spécifier la hauteur maximale qu'occuperont les fenêtres de " "configuration dans le menu préférences." -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "module d'interface Gtk+" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "module d'interface Gnome" @@ -957,35 +1077,35 @@ msgstr "Client VideoLAN" msgid "_File" msgstr "_Fichier" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "_Ouvrir fichier..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "Ouvre un Fichier" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "Ouvrir _disque..." #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "Ouvre un DVD ou un VCD" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "Flux réseau..." #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "Sélectionne un flux réseau" @@ -1019,7 +1139,7 @@ msgstr "Cac_her l'interface" msgid "Hide the main interface window" msgstr "Cache la fenêtre d'interface" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "Plein écran" @@ -1076,17 +1196,17 @@ msgstr "_Param msgid "A_udio" msgstr "A_udio" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "Sélectionner la piste audio" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "_Sous-titres" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "Sélectionner la piste de sous-titres" @@ -1111,14 +1231,14 @@ msgstr " msgid "About this application" msgstr "À propos de cette application" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "Fichier" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1136,7 +1256,7 @@ msgstr "Sat" msgid "Open a Satellite Card" msgstr "Ouvrir une carte satellite" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "Retour" @@ -1145,7 +1265,7 @@ msgstr "Retour" msgid "Go Backward" msgstr "Retour arrière" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "Stop" @@ -1158,7 +1278,7 @@ msgstr "Arr msgid "Eject" msgstr "Éjecte" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "Joue" @@ -1167,7 +1287,7 @@ msgstr "Joue" msgid "Play Stream" msgstr "Jouer le flux" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "Pause" @@ -1176,7 +1296,7 @@ msgstr "Pause" msgid "Pause Stream" msgstr "Pauser le flux" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "Ralenti" @@ -1185,7 +1305,7 @@ msgstr "Ralenti" msgid "Play Slower" msgstr "Jouer plus lentement" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "Accéléré" @@ -1198,7 +1318,7 @@ msgstr "Jouer plus rapidement" msgid "Open Playlist" msgstr "Ouvre la playlist" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1208,7 +1328,7 @@ msgstr "Pr msgid "Previous File" msgstr "Fichier précédent" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1218,27 +1338,15 @@ msgstr "Suiv." msgid "Next File" msgstr "Fichier suivant" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "Titre:" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "Chapitre:" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "Pas de serveur" @@ -1246,7 +1354,7 @@ msgstr "Pas de serveur" msgid "Channel:" msgstr "Canal :" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "Go!" @@ -1254,28 +1362,28 @@ msgstr "Go!" msgid "_Play" msgstr "_Lecture" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "Cacher/montrer l'_interface" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "_Sauter à..." -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "Programme" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "_Navigation" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "_Audio" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "Playlist..." @@ -1283,7 +1391,7 @@ msgstr "Playlist..." msgid "About" msgstr "À propos" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - l'équipe VideoLAN" @@ -1299,7 +1407,7 @@ msgstr "" "l'équipe VideoLAN \n" "http://www.videolan.org/" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1310,7 +1418,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "Valider" @@ -1318,39 +1426,39 @@ msgstr "Valider" msgid "Select File" msgstr "Sélectionner le fichier" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "Ouvrir disque" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "Type de disque" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "DVD" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "VCD" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "Position de départ" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "Chapitre" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "Titre" @@ -1360,7 +1468,7 @@ msgstr "Nom du device" #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "Annuler" @@ -1368,41 +1476,41 @@ msgstr "Annuler" msgid "Open Network" msgstr "Lecture réseau" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 msgid "Network mode" msgstr "Mode réseau" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 msgid "Channel server " msgstr "Serveur de canaux" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "HTTP" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "Port" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "Adresse" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1414,37 +1522,37 @@ msgstr "Aller msgid "Go to:" msgstr "Aller à :" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "s." -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "m:" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "h:" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "Ajouter" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "Réseau" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "Url" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "Supprimer" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "Tous" @@ -1452,7 +1560,7 @@ msgstr "Tous" msgid "Selected" msgstr "Sélectionné" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "Sélection" @@ -1468,71 +1576,46 @@ msgstr "_Inverser" msgid "_Select" msgstr "_Sélectionner" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "Durée" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "Messages" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "Ouvrir une carte satellite" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "Paramètres du transpondeur" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "Débit symbole" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "Fréquence" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "Polarisation" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "Verticale" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "Horizontale" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "FEC" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "Choisir le titre" @@ -1545,43 +1628,43 @@ msgstr "Choisir le chapitre" msgid "Select previous title" msgstr "Sélectionner le titre précédent" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "Sélectionner le chapitre précédent" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "Sélectionner le chapitre suivant" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "Canal réseau:" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 msgid "Toggle fullscreen mode" msgstr "Mode fenêtré/plein écran" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "Aller directement à un endroit spécifié" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "Changer de programme" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "Naviguer à travers les titres et les chapitres" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "Ouvrir un fichier" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "Modules" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." @@ -1589,106 +1672,102 @@ msgstr "" "Désolé, le gestionnaire de modules ne fonctionne pas encore. Veuillez " "réessayer dans une prochaine version" -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "Nom du périphérique :" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "Flux réseau" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "Élément" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "Rogner" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "Inverser" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "Sélectionner" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "Aller à : " -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "Ouvrir un flux" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "Protocole" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "Flux UDP" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "RTP" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "Serveur" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "Broadcast" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "Canaux" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "Serveur de canaux" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "Nom" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Description" msgstr "Description" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "Configurer" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 msgid "Selected:" msgstr "Sélectionné :" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 msgid "Save" msgstr "Enregistrer" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "Appliquer" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "Aucun" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, c-format msgid "Title %d (%d)" msgstr "Titre %d (%d)" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, c-format msgid "Chapter %d" msgstr "Chapitre %d" @@ -1696,12 +1775,12 @@ msgstr "Chapitre %d" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "module d'IDCT" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "module d'IDCT optimisé AltiVec" #: plugins/idct/idctclassic.c:47 @@ -1728,11 +1807,11 @@ msgstr "module d'IMDCT AC3 optimis msgid "KDE interface module" msgstr "module d'interface KDE" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "module de contrôle infra-rouge à distance" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "décodeur audio pour PCM linéaire" @@ -1743,19 +1822,19 @@ msgstr "module MacOS X de son, vid #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -"Spécifier la routine de downscale audio que mad utilisera.\n" -"Par défaut le module mad utilisera la routine la plus rapide." +"Spécifier la routine de downscale audio que mad utilisera. Par défaut le " +"module mad utilisera la routine la plus rapide." -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "librairie de décodage libmad MPEG 1/2/3" @@ -1763,15 +1842,15 @@ msgstr "librairie de d msgid "libc memcpy module" msgstr "module de memcpy pour libc" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "module de memcpy optimisé 3D Now!" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "module de memcpy optimisé MMX" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "module de memcpy optimisé MMMEXT" @@ -1779,18 +1858,18 @@ msgstr "module de memcpy optimis msgid "AltiVec memcpy module" msgstr "module de memcpy optimisé AltiVec" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "module vidéo Matrox Graphic Array" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "mode plein écran spécial" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1807,11 +1886,19 @@ msgstr "" "2) Ne pas utiliser du tout le gestionnaire de fenêtres, mais plus rien ne " "sera affichable au-dessus de la vidéo." -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" +"Spécifier le display X11 que vous désirez utiliser. Par défaut vlc utilisera " +"la valeur de la variable d'environnement DISPLAY." + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "module MGA X11" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "module de compensation de mouvement" @@ -1831,65 +1918,60 @@ msgstr "module de compensation de mouvement optimis msgid "MMXEXT motion compensation module" msgstr "module de compensation de mouvement optimisé MMXEXT" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "décodeur MPEG I/II layer 1/2" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "entrée ISO 13818-2 MPEG Elementary Stream" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "entrée ISO 13818-1 MPEG Program Stream" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "entrée ISO 13818-1 MPEG Transport Stream" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "entrée ISO 13818-1 MPEG Transport Stream (libdvbpsi)" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" -"Cette option permet de choisir le module IDCT utilisé par ce décodeur " -"vidéo.\n" +"Cette option permet de choisir le module IDCT utilisé par ce décodeur vidéo. " "Le comportement par défaut est de choisir automatiquement le meilleur module " "disponible." -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" "Cette option permet de choisir le module de compensation de mouvement " -"utilisépar ce décodeur vidéo.\n" -"Le comportement par défaut est de choisir automatiquement le meilleur module " -"disponible." +"utilisépar ce décodeur vidéo. Le comportement par défaut est de choisir " +"automatiquement le meilleur module disponible." -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "utiliser des processeurs supplémentaires" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "forcer l'algorithme de synchro {I|I+|IP|IP+|IPB}" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1897,7 +1979,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "module décodeur vidéo MPEG I/II" @@ -1909,7 +1991,7 @@ msgstr "couche d'abstraction de r msgid "IPv6 network abstraction layer" msgstr "couche d'abstraction de réseau IPv6" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "module RTOS QNX" @@ -1956,29 +2038,46 @@ msgstr "lnb_slof de l'antenne (kHz)" msgid "satellite input module" msgstr "module d'entrée satellite" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "module Simple DirectMedia Layer" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "module décodeur de sous-sitres DVD" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "module d'interface fichier journal" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "module d'interface ncurses" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "module d'interface commande à distance" @@ -1986,11 +2085,24 @@ msgstr "module d'interface commande msgid "VCD input module" msgstr "module d'entrée VCD" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "module d'extension waveOut Win32" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "module d'interface Win32" @@ -2028,6 +2140,29 @@ msgstr "" msgid "XVideo extension module" msgstr "module d'extension XVideo" +#~ msgid "disable hardware acceleration for the video output" +#~ msgstr "désactiver l'accélération matérielle de l'affichage" + +#~ msgid "output statistics" +#~ msgstr "statistiques de sortie" + +#~ msgid "" +#~ "Enabling the stats mode will flood your log console with various " +#~ "statistics messages." +#~ msgstr "" +#~ "En mode stats, la console de messages contiendra diverses informations " +#~ "statistiques." + +#~ msgid "warning level (or use -v, -vv, etc...)" +#~ msgstr "niveau de messages (au lieu de -v, -vv, etc.)" + +#~ msgid "" +#~ "Increasing the warning level will allow you to see more debug messages " +#~ "and can sometimes help you to troubleshoot a problem." +#~ msgstr "" +#~ "En augmentant le niveau de messages, plus d'informations seront affichées " +#~ "et pourront éventuellement servir à résoudre des problèmes." + #, fuzzy #~ msgid "" #~ "This option allows you to select the video filter module that vlc will " diff --git a/po/ja.po b/po/ja.po index 64592ed584..415bc8b182 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2002-04-02 03:22+0900\n" "Last-Translator: Fumio Nakayama \n" "Language-Team: LANGUAGE \n" @@ -12,91 +12,202 @@ msgstr "" "Content-Type: text/plain; charset=euc-jp\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "" + +#. Print module name +#: src/libvlc.c:828 +#, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" + +#. Usage +#: src/libvlc.c:959 +#, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "" + +#: src/libvlc.c:962 +msgid "[module] [description]\n" +msgstr "" + +#: src/libvlc.c:1003 +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: ja.po,v 1.9 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 #, fuzzy msgid "interface module" msgstr "Á´²èÌÌɽ¼¨¤ÎÀÚÂؤ¨" -#: src/interface/main.c:97 +#: src/libvlc.h:34 msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." msgstr "" -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" +#: src/libvlc.h:38 +msgid "be verbose" msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." msgstr "" -#: src/interface/main.c:106 -msgid "output statistics" +#: src/libvlc.h:42 +msgid "be quiet" msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" + +#: src/libvlc.h:46 +#, fuzzy +msgid "color messages" +msgstr "¥á¥Ã¥»¡¼¥¸" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "" -#: src/interface/main.c:118 +#: src/libvlc.h:58 msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +msgid "enable audio" msgstr "" -#: src/interface/main.c:124 +#: src/libvlc.h:64 msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" -#: src/interface/main.c:128 -msgid "mono audio" +#: src/libvlc.h:67 +msgid "force mono audio" msgstr "" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "" -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "" -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -110,369 +221,385 @@ msgid "" "8 -> ac3 pass-through" msgstr "" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "" -#: src/interface/main.c:151 +#: src/libvlc.h:90 msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." msgstr "" -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "" -#: src/interface/main.c:161 +#: src/libvlc.h:100 msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +msgid "enable video" msgstr "" -#: src/interface/main.c:167 +#: src/libvlc.h:106 msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "" -#: src/interface/main.c:178 +#: src/libvlc.h:116 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "" -#: src/interface/main.c:183 +#: src/libvlc.h:121 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "" -#: src/interface/main.c:192 +#: src/libvlc.h:130 msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" -#: src/interface/main.c:195 +#: src/libvlc.h:133 msgid "fullscreen video output" msgstr "" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" +#: src/libvlc.h:138 +msgid "overlay video output" msgstr "" -#: src/interface/main.c:202 +#: src/libvlc.h:140 msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 #, fuzzy msgid "server port" msgstr "¥µ¡¼¥Ð¡¼¤¬¤¢¤ê¤Þ¤»¤ó!!" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 #, fuzzy msgid "enable network channel mode" msgstr "ÄÌ¿®¥Á¥ã¥ó¥Í¥ë:" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 #, fuzzy msgid "channel server address" msgstr "¥Á¥ã¥ó¥Í¥ë¥µ¡¼¥Ð¡¼" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 #, fuzzy msgid "channel server port" msgstr "¥Á¥ã¥ó¥Í¥ë¥µ¡¼¥Ð¡¼" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 #, fuzzy msgid "network interface" msgstr "¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò±£¤¹(_H)" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 #, fuzzy msgid "choose program (SID)" msgstr "¥×¥í¥°¥é¥à¤ÎÁªÂò" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "" -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 #, fuzzy msgid "choose channel" msgstr "¥Á¥ã¥×¥¿¡¼¤ÎÁªÂò" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 #, fuzzy msgid "choose subtitles" msgstr "¥¿¥¤¥È¥ë¤ÎÁªÂò" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "" -#: src/interface/main.c:275 +#: src/libvlc.h:213 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." msgstr "" -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "" -#: src/interface/main.c:280 +#: src/libvlc.h:218 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." msgstr "" -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +msgid "enable CPU MMX support" msgstr "" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +msgid "enable CPU 3D Now! support" msgstr "" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +msgid "enable CPU MMX EXT support" msgstr "" -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +msgid "enable CPU SSE support" msgstr "" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +msgid "enable CPU AltiVec support" msgstr "" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +msgid "enqueue items in playlist" msgstr "" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +#, fuzzy +msgid "access module" +msgstr "Á´²èÌÌɽ¼¨¤ÎÀÚÂؤ¨" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +msgid "demux module" +msgstr "" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -480,204 +607,147 @@ msgid "" msgstr "" #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 #, fuzzy msgid "Interface" msgstr "¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Îɽ¼¨ÀÚÂؤ¨(_I)" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 #, fuzzy msgid "Audio" msgstr "½ÐÎϲ»À¼(_A)" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 #, fuzzy msgid "Video" msgstr "ɽ¼¨(_V)" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "¥ê¥¹¥È" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "" -#: src/interface/main.c:432 +#: src/libvlc.h:378 #, fuzzy msgid "main program" msgstr "¥×¥í¥°¥é¥à¤ÎÀÚÂؤ¨" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "" -#: src/interface/main.c:452 -msgid "print help on module " -msgstr "" +#: src/libvlc.h:396 +#, fuzzy +msgid "print help on module" +msgstr "Á´²èÌÌɽ¼¨¤ÎÀÚÂؤ¨" -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "" -#: src/interface/main.c:603 -msgid "help module" -msgstr "" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." +#: src/libvlc.h:401 +msgid "print build information" msgstr "" -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "" @@ -685,49 +755,49 @@ msgstr "" msgid "BeOS standard API module" msgstr "" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 #, fuzzy msgid " to " msgstr "¥¸¥ã¥ó¥×" -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -735,7 +805,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "" @@ -747,11 +817,11 @@ msgstr "" msgid "SSE AC3 downmix module" msgstr "" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "" @@ -768,7 +838,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "" @@ -796,95 +866,145 @@ msgstr "" msgid "DVDRead input module" msgstr "" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +#, fuzzy +msgid "Deinterlace mode" +msgstr "Á´²èÌÌɽ¼¨¤ÎÀÚÂؤ¨" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +#, fuzzy +msgid "distort mode" +msgstr "¥Í¥Ã¥È¥ï¡¼¥¯" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." msgstr "" -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +msgid "show tooltips" msgstr "" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +msgid "Show tooltips for configuration options." msgstr "" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." msgstr "" -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "" @@ -897,35 +1017,35 @@ msgstr "VideoLAN msgid "_File" msgstr "¥Õ¥¡¥¤¥ë(_F)" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤¯(_O)..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "¥Ç¥£¥¹¥¯¤ò³«¤¯(_D)..." #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "DVD¤Þ¤¿¤ÏVCD¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "¥Í¥Ã¥È¥ï¡¼¥¯¥¹¥È¥ê¡¼¥à(_N)..." #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "¥Í¥Ã¥È¥ï¡¼¥¯¥¹¥È¥ê¡¼¥à¤òÁªÂò¤¹¤ë" @@ -961,7 +1081,7 @@ msgstr " msgid "Hide the main interface window" msgstr "¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò±£¤¹" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "Á´²èÌ̲½(_F)" @@ -1020,17 +1140,17 @@ msgstr " msgid "A_udio" msgstr "½ÐÎϲ»À¼(_u)" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "²»À¼¥Á¥ã¥ó¥Í¥ë¤ÎÁªÂò" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "»úËë(_S)" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 #, fuzzy msgid "Select subtitles channel" @@ -1056,14 +1176,14 @@ msgstr "VideoLAN msgid "About this application" msgstr "¤³¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "¥Õ¥¡¥¤¥ë" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1081,7 +1201,7 @@ msgstr " msgid "Open a Satellite Card" msgstr "±ÒÀ±ÄÌ¿®¥«¡¼¥É¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "µÕž" @@ -1091,7 +1211,7 @@ msgstr " msgid "Go Backward" msgstr "µÕžºÆÀ¸" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "Ää»ß" @@ -1104,7 +1224,7 @@ msgstr " msgid "Eject" msgstr "¼è½Ð¤·" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "ºÆÀ¸" @@ -1113,7 +1233,7 @@ msgstr " msgid "Play Stream" msgstr "¥¹¥È¥ê¡¼¥à¤ÎºÆÀ¸" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "°ì»þÄä»ß" @@ -1122,7 +1242,7 @@ msgstr " msgid "Pause Stream" msgstr "¥¹¥È¥ê¡¼¥à¤Î°ì»þÄä»ß" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "¥¹¥í¡¼" @@ -1131,7 +1251,7 @@ msgstr " msgid "Play Slower" msgstr "¥¹¥í¡¼ºÆÀ¸" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "ÁáÁ÷¤ê" @@ -1144,7 +1264,7 @@ msgstr " msgid "Open Playlist" msgstr "¥×¥ì¥¤¥ê¥¹¥È¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1154,7 +1274,7 @@ msgstr " msgid "Previous File" msgstr "Á°¤Î¥Õ¥¡¥¤¥ë" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1164,27 +1284,15 @@ msgstr " msgid "Next File" msgstr "¼¡¤Î¥Õ¥¡¥¤¥ë" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "¥¿¥¤¥È¥ë:" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "¥Á¥ã¥×¥¿¡¼:" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "¥µ¡¼¥Ð¡¼Ìµ¤·" @@ -1193,7 +1301,7 @@ msgstr " msgid "Channel:" msgstr "¥Á¥ã¥ó¥Í¥ë: " -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "" @@ -1201,30 +1309,30 @@ msgstr "" msgid "_Play" msgstr "ºÆÀ¸(_P)" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 #, fuzzy msgid "Toggle _Interface" msgstr "¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Îɽ¼¨ÀÚÂؤ¨(_I)" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "¥¸¥ã¥ó¥×(_J)..." -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "¥×¥í¥°¥é¥à" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "¥Ê¥Ó¥²¡¼¥·¥ç¥ó(_N)" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 #, fuzzy msgid "_Audio" msgstr "½ÐÎϲ»À¼(_A)" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "¥×¥ì¥¤¥ê¥¹¥È..." @@ -1232,7 +1340,7 @@ msgstr " msgid "About" msgstr "VideoLAN¤Ë¤Ä¤¤¤Æ" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "" @@ -1246,7 +1354,7 @@ msgid "" "http://www.videolan.org/" msgstr "" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1257,7 +1365,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "" @@ -1265,39 +1373,39 @@ msgstr "" msgid "Select File" msgstr "¥Õ¥¡¥¤¥ë¤ÎÁªÂò" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "¥Ç¥£¥¹¥¯¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "¥Ç¥£¥¹¥¯¤Î¼ïÎà" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "ºÆÀ¸³«»Ï¤Î°ÌÃÖ" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "¥Á¥ã¥×¥¿¡¼" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "¥¿¥¤¥È¥ë" @@ -1307,7 +1415,7 @@ msgstr " #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "¥­¥ã¥ó¥»¥ë" @@ -1315,43 +1423,43 @@ msgstr " msgid "Open Network" msgstr "¥Í¥Ã¥È¥ï¡¼¥¯¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 #, fuzzy msgid "Network mode" msgstr "¥Í¥Ã¥È¥ï¡¼¥¯" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 #, fuzzy msgid "Channel server " msgstr "¥Á¥ã¥ó¥Í¥ë¥µ¡¼¥Ð¡¼:" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "¥Ý¡¼¥ÈÈÖ¹æ" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "¥Û¥¹¥È̾/¥¢¥É¥ì¥¹" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1364,37 +1472,37 @@ msgstr " msgid "Go to:" msgstr "¥¸¥ã¥ó¥×" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "ÉÃ" -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "ʬ" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "»þ" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "ÄɲÃ" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "¥Í¥Ã¥È¥ï¡¼¥¯" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "URL" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "ºï½ü" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "¤¹¤Ù¤Æ" @@ -1402,7 +1510,7 @@ msgstr " msgid "Selected" msgstr "ÁªÂòºÑ¤ß" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "ÁªÂò" @@ -1418,72 +1526,47 @@ msgstr "" msgid "_Select" msgstr "ÁªÂò(_S)" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 #, fuzzy msgid "Duration" msgstr "¶ËÀ­" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "¥á¥Ã¥»¡¼¥¸" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "±ÒÀ±ÄÌ¿®¥«¡¼¥É¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "žÁ÷¤Ë´Ø¤¹¤ëÀßÄê" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "¥·¥ó¥Ü¥ë¥ì¡¼¥È" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "¼þÇÈ¿ô" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "¶ËÀ­" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "¿âľ" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "¿åÊ¿" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 #, fuzzy msgid "Choose title" @@ -1498,46 +1581,46 @@ msgstr " msgid "Select previous title" msgstr "Á°¤Î¥¿¥¤¥È¥ë¤òÁªÂò" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "Á°¤Î¥Á¥ã¥×¥¿¡¼¤òÁªÂò" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "¼¡¤Î¥Á¥ã¥×¥¿¡¼¤òÁªÂò" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 #, fuzzy msgid "Network Channel:" msgstr "¥Á¥ã¥ó¥Í¥ë: " -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 #, fuzzy msgid "Toggle fullscreen mode" msgstr "Á´²èÌÌɽ¼¨¤ÎÀÚÂؤ¨" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 #, fuzzy msgid "Switch program" msgstr "¥×¥í¥°¥é¥à¤Î½ªÎ»" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "¥¿¥¤¥È¥ë/¥Á¥ã¥×¥¿¡¼¤«¤é¥Ê¥Ó¥²¡¼¥È" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "¥â¥¸¥å¡¼¥ë" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." @@ -1545,111 +1628,107 @@ msgstr "" "»ÄÇ°¤Ê¤¬¤é¡¢¥â¥¸¥å¡¼¥ë¥Þ¥Í¡¼¥¸¥ã¤Îµ¡Ç½¤Ï¤Þ¤À¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£\n" "¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Ç¼Â¹Ô¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£" -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "¥Ç¥Ð¥¤¥¹¤Î¥Ñ¥¹:" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "¥Í¥Ã¥È¥ï¡¼¥¯¥¹¥È¥ê¡¼¥à" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "¹àÌÜ" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "ÁªÂò" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 #, fuzzy msgid "Jump to: " msgstr "¥¸¥ã¥ó¥×" -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "¥¹¥È¥ê¡¼¥à¤ò³«¤¯" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "¥×¥í¥È¥³¥ë" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "UDP¥¹¥È¥ê¡¼¥à" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "¥µ¡¼¥Ð¡¼" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "¥Ö¥í¡¼¥É¥­¥ã¥¹¥È" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "¥Á¥ã¥ó¥Í¥ë" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 #, fuzzy msgid "Channel server" msgstr "¥Á¥ã¥ó¥Í¥ë¥µ¡¼¥Ð¡¼:" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 #, fuzzy msgid "Description" msgstr "¶ËÀ­" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 #, fuzzy msgid "Selected:" msgstr "ÁªÂòºÑ¤ß" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 #, fuzzy msgid "Save" msgstr "¥µ¡¼¥Ð¡¼" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, fuzzy, c-format msgid "Title %d (%d)" msgstr "¥¿¥¤¥È¥ë: " -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, fuzzy, c-format msgid "Chapter %d" msgstr "¥Á¥ã¥×¥¿¡¼" @@ -1657,12 +1736,12 @@ msgstr " #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "" #: plugins/idct/idctclassic.c:47 @@ -1689,11 +1768,11 @@ msgstr "" msgid "KDE interface module" msgstr "" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "" @@ -1704,17 +1783,17 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "" @@ -1722,15 +1801,15 @@ msgstr "" msgid "libc memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "" @@ -1738,19 +1817,19 @@ msgstr "" msgid "AltiVec memcpy module" msgstr "" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 #, fuzzy msgid "alternate fullscreen method" msgstr "Á´²èÌÌɽ¼¨¤ÎÀÚÂؤ¨" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1760,11 +1839,17 @@ msgid "" "show on top of the video." msgstr "" -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "" @@ -1784,57 +1869,54 @@ msgstr "" msgid "MMXEXT motion compensation module" msgstr "" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1842,7 +1924,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "" @@ -1854,7 +1936,7 @@ msgstr "" msgid "IPv6 network abstraction layer" msgstr "" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "" @@ -1901,29 +1983,46 @@ msgstr "" msgid "satellite input module" msgstr "" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "" @@ -1931,11 +2030,24 @@ msgstr "" msgid "VCD input module" msgstr "" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "" diff --git a/po/nl.po b/po/nl.po index 147ee36099..6bf70de988 100644 --- a/po/nl.po +++ b/po/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2002-04-20 16:58GMT\n" "Last-Translator: Jean-Paul Saman \n" "Language-Team: Nederlands \n" @@ -14,102 +14,237 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.8\n" -#: src/interface/main.c:95 +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "Gebruik: %s [opties] [parameters] [file] ...\n" + +#. Print module name +#: src/libvlc.c:828 +#, fuzzy, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "%s module opties:\n" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +#, fuzzy +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" +"\n" +"Speellijst items:\n" +" *.mpg, *.vob \tgewone MPEG-1/2 bestanden\n" +" [dvd:][apparaat[@raw_device][@[titel][,[hoofdstuk][,hoek]]]\n" +" \tDVD apparaat\n" +" [vcd:][apparaat][@[titel][,[hoofdstuk]]\n" +" \tVCD apparaat\n" +" udpstream:[@[][:]]\n" +" \tUDP stream verzonde daar VLS\n" +" vlc:loop \tspeel de speellijst in een loop\n" +" vlc:pause \tpauzeer speellijst items\n" +" vlc:quit \tstop VLC" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +#, fuzzy +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" +"\n" +"Druk op RETURN om verder te gaan..." + +#. Usage +#: src/libvlc.c:959 +#, fuzzy, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "Gebruik: %s [opties] [parameters] [file] ...\n" + +#: src/libvlc.c:962 +#, fuzzy +msgid "[module] [description]\n" +msgstr "[module] [beschrijving]" + +#: src/libvlc.c:1003 +#, fuzzy +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" +"Dit programma wordt verspreid ZONDER ENIG GARANTIE, tot zover door de wet is " +"toegestaan.\n" +"Het programma mag verspreid worden onder verplichtingen van de GNU General " +"Public License;\n" +"zie het bestand COPYING voor details.\n" +"Geschreven door het VideoLAN team at Ecole Centrale, Paris." + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: nl.po,v 1.10 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 msgid "interface module" msgstr "interface module" -#: src/interface/main.c:97 +#: src/libvlc.h:34 #, fuzzy msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." msgstr "" "Via deze optie kan de interface die vlc gebruikt geselecteerd worden.\n" "Noot: Standaard wordt automatisch de beste beschikbare methode gekozen." -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" -msgstr "waarschuwings niveau (of gebruik -v, -vv, etc...)" +#: src/libvlc.h:38 +msgid "be verbose" +msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." +msgstr "" + +#: src/libvlc.h:42 +msgid "be quiet" msgstr "" -"Het verhogen van het waarschuwings niveau toont meer debug boodschappen " -"enkan soms helpen het probleem op te lossen." -#: src/interface/main.c:106 -msgid "output statistics" -msgstr "statistieken" +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:46 +#, fuzzy +msgid "color messages" +msgstr "Boodschappen" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -"De statistiek mode genereert verschillende statistische boodschappen op het " -"scherm. " -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "interface standaard zoekpad" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" "Stel het standaard zoekpad in waar de interface naar bestanden moet zoeken." -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "audio output module" -#: src/interface/main.c:118 +#: src/libvlc.h:58 +#, fuzzy msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" "Deze optie selecteert de audio output methode, die gebruikt wordt door vlc.\n" "Noot: Standaard wordt automatisch de best beschikbare methode gekozen." -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +#, fuzzy +msgid "enable audio" msgstr "schakel audio uit" -#: src/interface/main.c:124 +#: src/libvlc.h:64 +#, fuzzy msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" "Schakel alle audio output uit. De audio decoding stap wordt overgeslagen, " "dit bespaart zelfs wat rekenkracht." -#: src/interface/main.c:128 -msgid "mono audio" -msgstr "" +#: src/libvlc.h:67 +#, fuzzy +msgid "force mono audio" +msgstr "selecteer audio" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "Dit zal mono audio output forceren." -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "De standaard audio output volume is instellen tussen 0 en 1024." -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "audio output formaat" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -133,23 +268,24 @@ msgstr "" "7 -> mpeg2 audio (unsupported)\n" "8 -> ac3 pass-through" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "audio output frequentie (Hz)" -#: src/interface/main.c:151 +#: src/libvlc.h:90 +#, fuzzy msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" "Forceer de audio output frequentie hier:\n" "Gebruikelijke waarden zijn: 48000, 44100, 32000, 22050, 16000, 11025, 8000." -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "compenseer audio desynchronisatie (in ms)" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." @@ -157,249 +293,256 @@ msgstr "" "Vertraag de audio output, deze optie is handig als audio en video niet " "synchroon lopen." -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "video output module" -#: src/interface/main.c:161 +#: src/libvlc.h:100 +#, fuzzy msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" "Selecteer de video output methode die vlc gebruikt.\n" "Noot: Standaard wordt automatisch de best beschikbare methode gekozen." -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +#, fuzzy +msgid "enable video" msgstr "schakel video uit" -#: src/interface/main.c:167 +#: src/libvlc.h:106 +#, fuzzy msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" "Schakel de video volledig uit. De video decoding stap wordt overgeslagen. Op " "deze manier kan er op rekenkracht bespaard worden." -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "beeldscherm identificatie" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "video breedte" -#: src/interface/main.c:178 +#: src/libvlc.h:116 +#, fuzzy msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" "Forceer video breedte hier:\n" "Noot: Standaard probeert vlc zich aan de video karakteristieken aan te " "passen." -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "video hoogte" -#: src/interface/main.c:183 +#: src/libvlc.h:121 +#, fuzzy msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" "Forceer de video hoogte hier:\n" "Noot: Standaard zal vlc zich aan de video karakteristieken aan passen." -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "grijswaarden video output" -#: src/interface/main.c:192 +#: src/libvlc.h:130 +#, fuzzy msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" "Het gebruiken van deze optie resulteert in de afwezigheid van kleuren. (Dit " "kan rekenkracht besparen.)" -#: src/interface/main.c:195 +#: src/libvlc.h:133 #, fuzzy msgid "fullscreen video output" msgstr "Volledig scherm kleur diepte:" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" "Als deze optie gebruikt wordt, dan zal vlc een video altijd op volledige " "scherm grote afspelen." -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" -msgstr "schakel hardware versnelling voor video output uit." +#: src/libvlc.h:138 +#, fuzzy +msgid "overlay video output" +msgstr "grijswaarden video output" -#: src/interface/main.c:202 +#: src/libvlc.h:140 +#, fuzzy msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" "Standaard probeert vlc snelheids winst te halen uit het gebruik van overlay " "mogelijkheden van de aanwezige grafische kaart." -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "forceer SPU positie" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 msgid "server port" msgstr "server poort:" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 msgid "enable network channel mode" msgstr "schakel netwerk kanaal mode in" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 msgid "channel server address" msgstr "Kanaal server adres:" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 msgid "channel server port" msgstr "Kanaal server poort:" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 msgid "network interface" msgstr "netwerk interface" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 msgid "choose program (SID)" msgstr "selecteer programma (SID)" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "Selecteer een programma door middel van zijn bekende Service ID." -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "selecteer audio" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 msgid "choose channel" msgstr "selecteer een kanaal" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 msgid "choose subtitles" msgstr "selecteer een ondertitel" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "DVD apparaat" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "VCD apparaat" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "forceer IPv6" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "forceer IPv4" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "selecteer MPEG audio decoder" -#: src/interface/main.c:275 +#: src/libvlc.h:213 #, fuzzy msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " @@ -408,11 +551,11 @@ msgstr "" "Deze optie selecteert de audio output methode, die gebruikt wordt door vlc.\n" "Noot: Standaard wordt automatisch de best beschikbare methode gekozen." -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "selecteer AC3 audio decoder" -#: src/interface/main.c:280 +#: src/libvlc.h:218 #, fuzzy msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " @@ -421,99 +564,123 @@ msgstr "" "Deze optie selecteert de audio output methode, die gebruikt wordt door vlc.\n" "Noot: Standaard wordt automatisch de best beschikbare methode gekozen." -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +#, fuzzy +msgid "enable CPU MMX support" msgstr "schakel CPU's MMU support uit" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +#, fuzzy +msgid "enable CPU 3D Now! support" msgstr "schakel CPU's 3D Now! support uit" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +#, fuzzy +msgid "enable CPU MMX EXT support" msgstr "schakel CPU's MMX EXT support uit" -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +#, fuzzy +msgid "enable CPU SSE support" msgstr "schakel CPU's SSE support uit" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +#, fuzzy +msgid "enable CPU AltiVec support" msgstr "schakel CPU's AltiVec support uit" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "lanceer speellijst bij opstarten" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +#, fuzzy +msgid "enqueue items in playlist" msgstr "standaard in wachtrij plaatsen" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "begin voor aan na einde speellijst" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "geheugen kopieer module" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +#, fuzzy +msgid "access module" +msgstr "interface module" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +#, fuzzy +msgid "demux module" +msgstr "help module" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "snelle pthread op NT/2K/XP (alleen ontwikkelaars)" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -525,220 +692,144 @@ msgstr "" "optreden met deze snellere implementatie." #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "Speellijst" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "Overige" -#: src/interface/main.c:432 +#: src/libvlc.h:378 msgid "main program" msgstr "hoofd programma" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "print help" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "print gedetailleerde help" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "print een lijst van beschikbare modules" -#: src/interface/main.c:452 -msgid "print help on module " +#: src/libvlc.h:396 +#, fuzzy +msgid "print help on module" msgstr "print help over module " -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "print versie informatie" -#: src/interface/main.c:603 -msgid "help module" -msgstr "help module" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "Gebruik: %s [opties] [parameters] [file] ...\n" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "%s module opties:\n" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" -"\n" -"Speellijst items:\n" -" *.mpg, *.vob \tgewone MPEG-1/2 bestanden\n" -" [dvd:][apparaat[@raw_device][@[titel][,[hoofdstuk][,hoek]]]\n" -" \tDVD apparaat\n" -" [vcd:][apparaat][@[titel][,[hoofdstuk]]\n" -" \tVCD apparaat\n" -" udpstream:[@[][:]]\n" -" \tUDP stream verzonde daar VLS\n" -" vlc:loop \tspeel de speellijst in een loop\n" -" vlc:pause \tpauzeer speellijst items\n" -" vlc:quit \tstop VLC" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" -"\n" -"Druk op RETURN om verder te gaan..." - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "[module] [beschrijving]" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." -msgstr "" -"Dit programma wordt verspreid ZONDER ENIG GARANTIE, tot zover door de wet is " -"toegestaan.\n" -"Het programma mag verspreid worden onder verplichtingen van de GNU General " -"Public License;\n" -"zie het bestand COPYING voor details.\n" -"Geschreven door het VideoLAN team at Ecole Centrale, Paris." +#: src/libvlc.h:401 +#, fuzzy +msgid "print build information" +msgstr "print versie informatie" -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "Standaard filesysteem bestand lezen" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "" @@ -746,48 +837,48 @@ msgstr "" msgid "BeOS standard API module" msgstr "" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversies" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversies" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "conversies van" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr " naar" -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "MMX conversies van " #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -795,7 +886,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "DirectX extensie module" @@ -807,11 +898,11 @@ msgstr "" msgid "SSE AC3 downmix module" msgstr "" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "OSS dsp apparaat" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "" @@ -828,7 +919,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "dummy functie module" @@ -856,52 +947,102 @@ msgstr "[dvdread:][device][@[titel][,[hoofdstuk][,hoek]]]" msgid "DVDRead input module" msgstr "" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +#, fuzzy +msgid "Deinterlace mode" +msgstr "interface module" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +#, fuzzy +msgid "distort mode" +msgstr "Netwerk" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "overige video effecten module" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "inverteer video module" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "image transformatie module" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "image muur video module" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "X11 scherm naam" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." @@ -909,26 +1050,28 @@ msgstr "" "Specificeer de X11 hardware scherm dat je wilt gebruiken.\n" "Standaard zal vlc de waarde uit de DISPLAY omgevings variable gebruiken." -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +#, fuzzy +msgid "show tooltips" msgstr "verschuil tooltips" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +#, fuzzy +msgid "Show tooltips for configuration options." msgstr "Laat geen tooltips voor configuratie opties zien." -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "maximum hoofte voor de configuratie schermen" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." @@ -936,19 +1079,19 @@ msgstr "" "De maximum hoogte voor de configuratie schermen voor het voorkeuren menu is " "in te stellen." -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "" @@ -961,35 +1104,35 @@ msgstr "" msgid "_File" msgstr "_Bestand" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "_Open Bestand..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "Open een bestand" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "Open _Disk..." #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "Open een DVD of VCD" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "_Netwerk Stream..." #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "Selecteer een Netwerk Stream" @@ -1024,7 +1167,7 @@ msgstr "_Verstop interface" msgid "Hide the main interface window" msgstr "Verstop het hoofdscherm" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "_Volledig Scherm" @@ -1082,17 +1225,17 @@ msgstr "_Instellingen" msgid "A_udio" msgstr "A_udio" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "Selecteer een audio kanaal" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "_Ondertitels" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "Selecteer ondertitel kanaal" @@ -1117,14 +1260,14 @@ msgstr "_Informatie..." msgid "About this application" msgstr "Informatie over de applicatie" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "Bestand" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1142,7 +1285,7 @@ msgstr "Sateliet" msgid "Open a Satellite Card" msgstr "Open een sateliet kaartt speellijst scherm" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "Terug" @@ -1151,7 +1294,7 @@ msgstr "Terug" msgid "Go Backward" msgstr "Ga Terug" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "Stop" @@ -1164,7 +1307,7 @@ msgstr "Stop Stream" msgid "Eject" msgstr "" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "Start" @@ -1173,7 +1316,7 @@ msgstr "Start" msgid "Play Stream" msgstr "Start Stream" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "Pauze" @@ -1182,7 +1325,7 @@ msgstr "Pauze" msgid "Pause Stream" msgstr "Pauzeer Stream" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "Langzaam" @@ -1191,7 +1334,7 @@ msgstr "Langzaam" msgid "Play Slower" msgstr "Speel langzamer" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "Snel" @@ -1204,7 +1347,7 @@ msgstr "Speel Sneller" msgid "Open Playlist" msgstr "Open Speellijst" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1214,7 +1357,7 @@ msgstr "Vorige" msgid "Previous File" msgstr "Vorig Bestand" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1224,27 +1367,15 @@ msgstr "Volgende" msgid "Next File" msgstr "Volgend Bestand" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "Titel:" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "Hoofdstuk:" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "Geen server" @@ -1252,7 +1383,7 @@ msgstr "Geen server" msgid "Channel:" msgstr "Kanaal:" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "Ga!" @@ -1260,29 +1391,29 @@ msgstr "Ga!" msgid "_Play" msgstr "S_peel" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 #, fuzzy msgid "Toggle _Interface" msgstr "Optie _Interface" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "_Spring..." -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "Programma" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "_Navigeer" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "_Audio" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "Speellijst..." @@ -1290,7 +1421,7 @@ msgstr "Speellijst..." msgid "About" msgstr "Informatie" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - het VideoLAN Team" @@ -1306,7 +1437,7 @@ msgstr "" "Het VideoLAN team \n" "http://www.videolan.org/" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1317,7 +1448,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "" @@ -1325,39 +1456,39 @@ msgstr "" msgid "Select File" msgstr "Selecteer Bestand" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "Open Disk" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "Disk type" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "DVD" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "VCD" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "Start positie" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "Hoofdstuk" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "Titel" @@ -1367,7 +1498,7 @@ msgstr "Apparaat naam" #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "Annuleer" @@ -1375,43 +1506,43 @@ msgstr "Annuleer" msgid "Open Network" msgstr "Open Netwerk" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 #, fuzzy msgid "Network mode" msgstr "Netwerk" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 #, fuzzy msgid "Channel server " msgstr "Kanaal server" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "Poort" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "Adres" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1423,37 +1554,37 @@ msgstr "Spring" msgid "Go to:" msgstr "Ga naar:" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "" -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "Voeg toe" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "Netwerk" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "Verwijder" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "Allemaal" @@ -1461,7 +1592,7 @@ msgstr "Allemaal" msgid "Selected" msgstr "Geselecteerd" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "Selectie" @@ -1477,71 +1608,46 @@ msgstr "_Inverteer" msgid "_Select" msgstr "_Selecteer" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "Duur" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "Boodschappen" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "Open Sateliet kaart" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "Transponder instellingen" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "Frequentie" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "Polarisatie" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "Vertikaal" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "Horizontaal" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "Kies een title" @@ -1554,150 +1660,146 @@ msgstr "Kies een hoofdstuk" msgid "Select previous title" msgstr "Selecteer vorige titel" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "Selecteer vorig hoofdstuk" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "Selecteer volgend hoofdstuk" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "Netwerk Kanalen:" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 #, fuzzy msgid "Toggle fullscreen mode" msgstr "Optie: volledig scherm" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "Ga! rechtstreeks naar gespecificeerd punt" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "Verander van Programma" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "Navigeer door titels en hoofdstukken" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "Open een bestand" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." msgstr "" "Sorry, de module manager is nog niet functioneel. Probeer een latere versie." -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "Apparaat naam:" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "Netwerk Stream" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "Onderdeel" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "Verklein" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "Inverteer" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "Selecteer" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "Spring naar: " -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "Broadcast" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "Kanalen" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "Kanaal server" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "Naam" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Description" msgstr "Beschrijving" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "Configureer" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 msgid "Selected:" msgstr "Geselecteerd:" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 msgid "Save" msgstr "Bewaar" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "Voer uit" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "Geen" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, c-format msgid "Title %d (%d)" msgstr "Titel: %d (%d)" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, c-format msgid "Chapter %d" msgstr "Hoofdstuk %d" @@ -1705,12 +1807,12 @@ msgstr "Hoofdstuk %d" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "" #: plugins/idct/idctclassic.c:47 @@ -1737,11 +1839,11 @@ msgstr "" msgid "KDE interface module" msgstr "" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "infrarood remote control module" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "" @@ -1752,20 +1854,20 @@ msgstr "MacOS X interface, sound en video module" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 #, fuzzy msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" "Specificeer de X11 hardware scherm dat je wilt gebruiken.\n" "Standaard zal vlc de waarde uit de DISPLAY omgevings variable gebruiken." -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "" @@ -1773,15 +1875,15 @@ msgstr "" msgid "libc memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "" @@ -1789,18 +1891,18 @@ msgstr "" msgid "AltiVec memcpy module" msgstr "" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "alternatief:volledig scherm methode" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1816,11 +1918,20 @@ msgstr "" "2) Omzeil de window manager kompleet, echter dan zal er niks bovenop de " "video te zien zijn." -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +#, fuzzy +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" +"Specificeer de X11 hardware scherm dat je wilt gebruiken.\n" +"Standaard zal vlc de waarde uit de DISPLAY omgevings variable gebruiken." + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "motion compensatie module" @@ -1840,63 +1951,60 @@ msgstr "MMX motion compensatie module" msgid "MMXEXT motion compensation module" msgstr "MMXEXT motion compensatie module" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 #, fuzzy msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" "Via deze optie kan de interface die vlc gebruikt geselecteerd worden.\n" "Noot: Standaard wordt automatisch de beste beschikbare methode gekozen." -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 #, fuzzy msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" "Selecteer de video output methode die vlc gebruikt.\n" "Noot: Standaard wordt automatisch de best beschikbare methode gekozen." -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "gebruik extra processors" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "forceer synchronisatie algorithme {I|I+|IP|IP+|IPB}" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1904,7 +2012,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "" @@ -1916,7 +2024,7 @@ msgstr "IPv4 network abstractie laag" msgid "IPv6 network abstraction layer" msgstr "IPv6 network abstractie laag" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "" @@ -1967,29 +2075,46 @@ msgstr "antenne lnb_slof (kHz)" msgid "satellite input module" msgstr "sateliet input module" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "" @@ -1997,11 +2122,24 @@ msgstr "" msgid "VCD input module" msgstr "" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "Win32 waveOut extensie module" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "" @@ -2038,6 +2176,29 @@ msgstr "" msgid "XVideo extension module" msgstr "XVideo extensie module" +#~ msgid "disable hardware acceleration for the video output" +#~ msgstr "schakel hardware versnelling voor video output uit." + +#~ msgid "output statistics" +#~ msgstr "statistieken" + +#~ msgid "" +#~ "Enabling the stats mode will flood your log console with various " +#~ "statistics messages." +#~ msgstr "" +#~ "De statistiek mode genereert verschillende statistische boodschappen op " +#~ "het scherm. " + +#~ msgid "warning level (or use -v, -vv, etc...)" +#~ msgstr "waarschuwings niveau (of gebruik -v, -vv, etc...)" + +#~ msgid "" +#~ "Increasing the warning level will allow you to see more debug messages " +#~ "and can sometimes help you to troubleshoot a problem." +#~ msgstr "" +#~ "Het verhogen van het waarschuwings niveau toont meer debug boodschappen " +#~ "enkan soms helpen het probleem op te lossen." + #, fuzzy #~ msgid "" #~ "This option allows you to select the video filter module that vlc will " diff --git a/po/no.po b/po/no.po index f0404f6672..f69c711337 100644 --- a/po/no.po +++ b/po/no.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: vlc-cvs\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2002-28-02 23.35+0100\n" "Last-Translator: Sigmund Augdal .\n" "Language-Team: LANGUAGE \n" @@ -13,91 +13,202 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "" + +#. Print module name +#: src/libvlc.c:828 +#, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" + +#. Usage +#: src/libvlc.c:959 +#, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "" + +#: src/libvlc.c:962 +msgid "[module] [description]\n" +msgstr "" + +#: src/libvlc.c:1003 +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: no.po,v 1.9 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 #, fuzzy msgid "interface module" msgstr "Standard grensesnitt: " -#: src/interface/main.c:97 +#: src/libvlc.h:34 msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." msgstr "" -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" +#: src/libvlc.h:38 +msgid "be verbose" msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." msgstr "" -#: src/interface/main.c:106 -msgid "output statistics" +#: src/libvlc.h:42 +msgid "be quiet" msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" + +#: src/libvlc.h:46 +#, fuzzy +msgid "color messages" +msgstr "Beskjeder" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "" -#: src/interface/main.c:118 +#: src/libvlc.h:58 msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +msgid "enable audio" msgstr "" -#: src/interface/main.c:124 +#: src/libvlc.h:64 msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" -#: src/interface/main.c:128 -msgid "mono audio" +#: src/libvlc.h:67 +msgid "force mono audio" msgstr "" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "" -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "" -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -111,376 +222,394 @@ msgid "" "8 -> ac3 pass-through" msgstr "" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "" -#: src/interface/main.c:151 +#: src/libvlc.h:90 msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." msgstr "" -#: src/interface/main.c:159 +#: src/libvlc.h:98 #, fuzzy msgid "video output module" msgstr "Standard grensesnitt: " -#: src/interface/main.c:161 +#: src/libvlc.h:100 msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +msgid "enable video" msgstr "" -#: src/interface/main.c:167 +#: src/libvlc.h:106 msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "" -#: src/interface/main.c:178 +#: src/libvlc.h:116 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "" -#: src/interface/main.c:183 +#: src/libvlc.h:121 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -#: src/interface/main.c:186 +#: src/libvlc.h:124 #, fuzzy msgid "zoom video" msgstr "xvideo" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "" -#: src/interface/main.c:192 +#: src/libvlc.h:130 msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" -#: src/interface/main.c:195 +#: src/libvlc.h:133 #, fuzzy msgid "fullscreen video output" msgstr "Fullskjermdybde:" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" -msgstr "" +#: src/libvlc.h:138 +#, fuzzy +msgid "overlay video output" +msgstr "Fullskjermdybde:" -#: src/interface/main.c:202 +#: src/libvlc.h:140 msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 #, fuzzy msgid "video filter module" msgstr "Standard grensesnitt: " -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 #, fuzzy msgid "server port" msgstr "Ingen tjener !" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 #, fuzzy msgid "enable network channel mode" msgstr "Nettverkskanal:" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 #, fuzzy msgid "channel server address" msgstr "Kanaltjener:" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 #, fuzzy msgid "channel server port" msgstr "Kanaltjener:" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 #, fuzzy msgid "network interface" msgstr "_Gjem grensesnitt" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 #, fuzzy msgid "choose program (SID)" msgstr "Avslutt programmet" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "" -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 #, fuzzy msgid "choose channel" msgstr "Velg Kapittel" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 #, fuzzy msgid "choose subtitles" msgstr "Velg tittel" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "" -#: src/interface/main.c:275 +#: src/libvlc.h:213 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." msgstr "" -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "" -#: src/interface/main.c:280 +#: src/libvlc.h:218 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." msgstr "" -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +msgid "enable CPU MMX support" msgstr "" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +msgid "enable CPU 3D Now! support" msgstr "" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +msgid "enable CPU MMX EXT support" msgstr "" -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +msgid "enable CPU SSE support" msgstr "" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +msgid "enable CPU AltiVec support" msgstr "" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 #, fuzzy msgid "launch playlist on startup" msgstr "Kjør ved oppstart" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 +#: src/libvlc.h:250 #, fuzzy -msgid "enqueue playlist as default" +msgid "enqueue items in playlist" msgstr "Legg til i kø som standard" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 #, fuzzy msgid "loop playlist on end" msgstr "Gå tilbake til start ved slutten av Spillelisten" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +#, fuzzy +msgid "access module" +msgstr "Standard grensesnitt: " + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +#, fuzzy +msgid "demux module" +msgstr "Standard grensesnitt: " + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -488,202 +617,144 @@ msgid "" msgstr "" #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "Grensesnitt" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "Lyd" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "Video" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "Spilleliste" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "" -#: src/interface/main.c:432 +#: src/libvlc.h:378 #, fuzzy msgid "main program" msgstr "Avslutt programmet" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "" -#: src/interface/main.c:452 -msgid "print help on module " -msgstr "" - -#: src/interface/main.c:455 -msgid "print version information" -msgstr "" - -#: src/interface/main.c:603 +#: src/libvlc.h:396 #, fuzzy -msgid "help module" +msgid "print help on module" msgstr "Standard grensesnitt: " -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" - -#: src/interface/main.c:1080 -msgid "[module] [description]" +#: src/libvlc.h:399 +msgid "print version information" msgstr "" -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." +#: src/libvlc.h:401 +msgid "print build information" msgstr "" -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "" @@ -691,49 +762,49 @@ msgstr "" msgid "BeOS standard API module" msgstr "" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 #, fuzzy msgid " to " msgstr "Hopp til: " -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -741,7 +812,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "" @@ -753,11 +824,11 @@ msgstr "" msgid "SSE AC3 downmix module" msgstr "" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "" @@ -774,7 +845,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "" @@ -802,99 +873,149 @@ msgstr "" msgid "DVDRead input module" msgstr "" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 #, fuzzy msgid "framebuffer device" msgstr "Standardenhet:" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +#, fuzzy +msgid "Deinterlace mode" +msgstr "Standard grensesnitt: " + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 #, fuzzy msgid "deinterlacing module" msgstr "Standard grensesnitt: " -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +#, fuzzy +msgid "distort mode" +msgstr "Nettverk" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 #, fuzzy msgid "invert video module" msgstr "Standard grensesnitt: " -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." msgstr "" -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +msgid "show tooltips" msgstr "" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +msgid "Show tooltips for configuration options." msgstr "" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." msgstr "" -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 #, fuzzy msgid "Gtk+ interface module" msgstr "Standard grensesnitt: " -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "" @@ -907,35 +1028,35 @@ msgstr "VideoLAN Client" msgid "_File" msgstr "_Fil" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "_Åpne fil..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "Åpne en fil" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "Åpne en _disk" #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "Åpne en DVD eller VCD" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "_Nettverksstrøm" #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "Velg en nettverksstrøm" @@ -972,7 +1093,7 @@ msgstr "_Gjem grensesnitt" msgid "Hide the main interface window" msgstr "Skjul grensesnittvinduet" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "_Fullskjerm" @@ -1034,17 +1155,17 @@ msgstr "_Innstillinger" msgid "A_udio" msgstr "_Lyd" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "Velg lydkanal" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "_Teksting" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 #, fuzzy msgid "Select subtitles channel" @@ -1070,14 +1191,14 @@ msgstr "_Om..." msgid "About this application" msgstr "Om dette programmet" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "Fil" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1096,7 +1217,7 @@ msgstr "" msgid "Open a Satellite Card" msgstr "Åpne spilleliste-vinduet" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "Tilbake" @@ -1106,7 +1227,7 @@ msgstr "Tilbake" msgid "Go Backward" msgstr "Gå tilbake" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "Stopp" @@ -1120,7 +1241,7 @@ msgstr "Stopp str msgid "Eject" msgstr "Åpne Disk" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "Spill" @@ -1129,7 +1250,7 @@ msgstr "Spill" msgid "Play Stream" msgstr "Spill strøm" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "Pause" @@ -1138,7 +1259,7 @@ msgstr "Pause" msgid "Pause Stream" msgstr "Pause strøm" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "Sakte" @@ -1147,7 +1268,7 @@ msgstr "Sakte" msgid "Play Slower" msgstr "Spill saktere" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "Fort" @@ -1160,7 +1281,7 @@ msgstr "Spill fortere" msgid "Open Playlist" msgstr "Åpne Spilleliste" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1170,7 +1291,7 @@ msgstr "Forrige" msgid "Previous File" msgstr "Forrige fil" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1180,27 +1301,15 @@ msgstr "Neste" msgid "Next File" msgstr "Neste fil" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "-:--:--" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "Tittel:" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "--" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "Kapittel:" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "---" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "Ingen tjener" @@ -1209,7 +1318,7 @@ msgstr "Ingen tjener" msgid "Channel:" msgstr "Kanaler: " -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "Gå!" @@ -1217,29 +1326,29 @@ msgstr "G msgid "_Play" msgstr "_Spill" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "Grensesnitt" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "_Hopp..." -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 #, fuzzy msgid "Program" msgstr "Avslutt programmet" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "_Navigasjon" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "_Lyd" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "Spilleliste..." @@ -1247,7 +1356,7 @@ msgstr "Spilleliste..." msgid "About" msgstr "Om" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 #, fuzzy msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team" @@ -1262,7 +1371,7 @@ msgid "" "http://www.videolan.org/" msgstr "" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1273,7 +1382,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "OK" @@ -1281,39 +1390,39 @@ msgstr "OK" msgid "Select File" msgstr "Velg fil" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "Åpne Disk" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "Disktype" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "DVD" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "VCD" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "Startposisjon" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "Kapittel" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "Tittel" @@ -1323,7 +1432,7 @@ msgstr "Navn p #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "Avbryt" @@ -1331,43 +1440,43 @@ msgstr "Avbryt" msgid "Open Network" msgstr "Åpne nettverk" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 #, fuzzy msgid "Network mode" msgstr "Nettverk" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 #, fuzzy msgid "Channel server " msgstr "Kanaltjener:" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "HTTP" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "Port" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "Adresse" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1379,37 +1488,37 @@ msgstr "Hopp" msgid "Go to:" msgstr "Gå til:" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "s." -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "m:" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "h:" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "Legg til" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "Nettverk" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "Url" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "Slett" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "Alle" @@ -1417,7 +1526,7 @@ msgstr "Alle" msgid "Selected" msgstr "Valgte" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "Valg" @@ -1433,74 +1542,49 @@ msgstr "_Invertert" msgid "_Select" msgstr "_Valgt" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "Varighet" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "Beskjeder" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 #, fuzzy msgid "Open Satellite Card" msgstr "Åpne spilleliste-vinduet" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 #, fuzzy msgid "Frequency" msgstr "Frekvens:" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 #, fuzzy msgid "Polarization" msgstr "_Navigasjon" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 #, fuzzy msgid "Choose title" @@ -1515,46 +1599,46 @@ msgstr "Velg Kapittel" msgid "Select previous title" msgstr "Velg forrige tittel" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "Velg forrige kapittel" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "Velg neste Kapittel" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 #, fuzzy msgid "Network Channel:" msgstr "Kanaler:" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 #, fuzzy msgid "Toggle fullscreen mode" msgstr "Fullskjerm" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "Fikk direkte så spesifisert punkt" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 #, fuzzy msgid "Switch program" msgstr "Avslutt programmet" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "Navigere gjennom tittler og kapittler" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "Åpne fil" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "Moduler" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." @@ -1562,113 +1646,109 @@ msgstr "" "Beklager, modul håndtereren virker ikke ennå. Vennligst prøv på nytt i en " "senere versjon." -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "Enhets navn:" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "Nettverksstrøm" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "Ting" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "Crop?" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "Inverter" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "Velg" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 #, fuzzy msgid "Jump to: " msgstr "Hopp til: " -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 #, fuzzy msgid "Open Stream" msgstr "Stopp strøm" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "Protokoll" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 #, fuzzy msgid "UDP stream" msgstr "Spill strøm" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "RTP" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "Tjener" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "Kringkasting" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "Kanaler" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 #, fuzzy msgid "Channel server" msgstr "Kanaltjener:" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 #, fuzzy msgid "Description" msgstr "Varighet" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 #, fuzzy msgid "Selected:" msgstr "Valgte" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 #, fuzzy msgid "Save" msgstr "Tjener" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "Bruk" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, fuzzy, c-format msgid "Title %d (%d)" msgstr "Tittel: " -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, fuzzy, c-format msgid "Chapter %d" msgstr "Kapittel" @@ -1676,12 +1756,12 @@ msgstr "Kapittel" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "" #: plugins/idct/idctclassic.c:47 @@ -1709,11 +1789,11 @@ msgstr "" msgid "KDE interface module" msgstr "Standard grensesnitt: " -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "" @@ -1724,17 +1804,17 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "" @@ -1742,15 +1822,15 @@ msgstr "" msgid "libc memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "" @@ -1758,19 +1838,19 @@ msgstr "" msgid "AltiVec memcpy module" msgstr "" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 #, fuzzy msgid "alternate fullscreen method" msgstr "Fullskjerm" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1780,11 +1860,17 @@ msgid "" "show on top of the video." msgstr "" -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "" @@ -1804,57 +1890,54 @@ msgstr "" msgid "MMXEXT motion compensation module" msgstr "" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1862,7 +1945,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "" @@ -1874,7 +1957,7 @@ msgstr "" msgid "IPv6 network abstraction layer" msgstr "" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "" @@ -1922,31 +2005,48 @@ msgstr "" msgid "satellite input module" msgstr "" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 #, fuzzy msgid "file logging interface module" msgstr "Standard grensesnitt: " -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 #, fuzzy msgid "ncurses interface module" msgstr "Standard grensesnitt: " -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 #, fuzzy msgid "remote control interface module" msgstr "Standard grensesnitt: " @@ -1955,11 +2055,24 @@ msgstr "Standard grensesnitt: " msgid "VCD input module" msgstr "" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 #, fuzzy msgid "Win32 interface module" msgstr "Standard grensesnitt: " @@ -1995,6 +2108,18 @@ msgstr "" msgid "XVideo extension module" msgstr "" +#~ msgid "-:--:--" +#~ msgstr "-:--:--" + +#~ msgid "--" +#~ msgstr "--" + +#~ msgid "---" +#~ msgstr "---" + +#~ msgid "/dev/dvd" +#~ msgstr "/dev/dvd" + #~ msgid "TS" #~ msgstr "TS" @@ -2059,9 +2184,6 @@ msgstr "" #~ msgid "Choose angle" #~ msgstr "Velg vinkel" -#~ msgid "/dev/dvd" -#~ msgstr "/dev/dvd" - #~ msgid "Preferences" #~ msgstr "Innstillinger" diff --git a/po/pl.po b/po/pl.po index e2fd6ac1f9..263bb66917 100644 --- a/po/pl.po +++ b/po/pl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: vlc\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2002-05-26 18:31+0200\n" "Last-Translator: Arkadiusz Lipiec \n" "Language-Team: polish \n" @@ -13,49 +13,180 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "U¿ycie: %s [opcje] [parametry] [plik]...\n" + +#. Print module name +#: src/libvlc.c:828 +#, fuzzy, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "opcje modu³u %s:\n" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "napis" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "liczba ca³kowita" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "liczba zmiennoprz." + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +#, fuzzy +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" +"\n" +"Obiekty listy odtwarzania:\n" +" *.mpg, *.vob zwyk³e pliki MPEG-1/2\n" +" [dvd:][urz±dzenie][@urzadzenie_surowe][@[tytu³][,[rozdzia³][,k±t]]]\n" +" urzadzenie DVD\n" +" [vcd:][urz±dzenie][@[tytu³][,[rozdzia³]]\n" +" urz±dzenie VCD\n" +" udpstream:[@[][:]]\n" +" strumieñ UDP wysy³any przez VLS\n" +" vlc:loop wykonywanie pêtli listy odtwarzania\n" +" vlc:pause zatrzymanie odtwarzania obiektów listy\n" +" vlc:quit wyj¶cie z VLC" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +#, fuzzy +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" +"\n" +"Naci¶nij klawisz ENTER aby kontynuowaæ..." + +#. Usage +#: src/libvlc.c:959 +#, fuzzy, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" +msgstr "U¿ycie: %s [opcje] [parametry] [plik]...\n" + +#: src/libvlc.c:962 +#, fuzzy +msgid "[module] [description]\n" +msgstr "[modu³] [opis]" + +#: src/libvlc.c:1003 +#, fuzzy +msgid "" +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" +msgstr "" +"Ten program jest dostarczany BEZ ¯ADNEJ GWARANCJI, w granicach dozwolonych\n" +"przez prawo. Mo¿na go rozpowszechniaæ na zasadach licencji GNU General\n" +"Public License; zajrzyj do pliku COPYING aby uzyskaæ wiêcej szczegó³ów.\n" +"Program napisany przez zespó³ VideoLAN na uczelni Ecole Centrale, Pary¿." + +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: pl.po,v 1.2 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 msgid "interface module" msgstr "modu³ interfejsu" -#: src/interface/main.c:97 +#: src/libvlc.h:34 +#, fuzzy msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." msgstr "" "Ta opcja umo¿liwia wybranie interfejsu u¿ywanego przez vlc.\n" "Zauwa¿, ¿e domy¶lnym zachowaniem jest automatyczny wybór najlepszego " "dostêpnego modu³u." -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" -msgstr "poziom ostrzegania (lub u¿yj -v, -vv, itd...)" +#: src/libvlc.h:38 +msgid "be verbose" +msgstr "" -#: src/interface/main.c:103 -msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." +msgstr "" + +#: src/libvlc.h:42 +msgid "be quiet" +msgstr "" + +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." msgstr "" -"Zwiêkszanie poziomu ostrzegania pozwoli na wy¶wietlenie wiêksze ilo¶ci " -"komunikatów o b³êdach oraz mo¿e czasem pomóc rozwi±zaæ problem." -#: src/interface/main.c:106 -msgid "output statistics" -msgstr "statystyki wyj¶ciowe" +#: src/libvlc.h:46 +#, fuzzy +msgid "color messages" +msgstr "Komunikaty" -#: src/interface/main.c:108 +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -"W³±czenie trybu statystyk zape³ni dziennik konsoli ró¿nymi komunikatami " -"statystycznymi." -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "domy¶lna ¶cie¿ka wyszukiwania interfejsu" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." @@ -63,57 +194,60 @@ msgstr "" "Ta opcja umo¿liwia ustawienie domy¶lnej ¶cie¿ki, któr± interfejs bêdzie " "otwiera³ w poszukiwaniu pliku." -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "modu³ wyj¶ciowy d¼wiêku" -#: src/interface/main.c:118 +#: src/libvlc.h:58 +#, fuzzy msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" "Ta opcja umo¿liwia wybranie metody wyj¶ciowej d¼wiêku u¿ywanej przez vlc.\n" "Zauwa¿, ¿e domy¶lnym zachowaniem jest automatyczne wybranie najlepszej " "dostêpnej metody." -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +#, fuzzy +msgid "enable audio" msgstr "wy³±czenie d¼wiêku" -#: src/interface/main.c:124 +#: src/libvlc.h:64 +#, fuzzy msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" "Ta opcja powoduje ca³kowite wy³±czenie wyj¶cia d¼wiêku. Etap dekodowania " "d¼wiêku nie zostanie wykonany, wiêc bêdzie mo¿na zaoszczêdziæ trochê mocy " "procesora." -#: src/interface/main.c:128 -msgid "mono audio" +#: src/libvlc.h:67 +#, fuzzy +msgid "force mono audio" msgstr "d¼wiêk mono" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "Ta opcja wymusza wyj¶cie d¼wiêku w trybie mono" -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "g³o¶no¶æ wyj¶cia d¼wiêku" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "" "Mo¿na ustawiæ domy¶lny poziom g³o¶no¶ci wyj¶cia d¼wiêku w zakresie od 0 do " "1024." -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "format wyj¶ciowy d¼wiêku" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -137,23 +271,24 @@ msgstr "" "7 -> d¼wiêk mpeg2 (nieobs³ugiwane)\n" "8 -> ac3 pass-through" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "czêstotliwo¶æ wyj¶ciowa d¼wiêku (Hz)" -#: src/interface/main.c:151 +#: src/libvlc.h:90 +#, fuzzy msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" "W tym miejscu mo¿na wymusiæ czêstotliwo¶æ wyj¶ciow± d¼wiêku.\n" "Czêstymi warto¶ciami s± 48000, 44100, 32000, 22050, 16000, 11025, 8000." -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "kompensacja rozsynchronizowania d¼wiêku (w ms)" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." @@ -161,124 +296,132 @@ msgstr "" "Ta opcja umo¿liwia opó¼nienie wyj¶cia d¼wiêku. To mo¿e byæ u¿yteczne w razie " "wystêpowania opó¼nieñ miêdzy d¼wiêkiem a obrazem." -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "modu³ wyj¶ciowy obrazu" -#: src/interface/main.c:161 +#: src/libvlc.h:100 +#, fuzzy msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" "Ta opcja umo¿liwia wybranie metody wyj¶ciowej obrazu u¿ywanej przez vlc.\n" "Nale¿y zauwa¿yæ, ¿e domy¶lne zachowanie to automatyczny wybór najlepszej " "dostêpnej metody." -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +#, fuzzy +msgid "enable video" msgstr "wy³±czony obraz" -#: src/interface/main.c:167 +#: src/libvlc.h:106 +#, fuzzy msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" "Ta opcja ca³kowicie wy³±cza wyj¶cie obrazu. Etap dekodowania obrazu nie " "powinien byæ wykonany, wiêc mo¿na bêdzie zaoszczêdziæ trochê mocy procesora." -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "identyfikator ekranu" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "Lokalny port ekranu u¿ywany przez X11 do rysowania. Na przyk³ad :0.1." -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "szeroko¶æ obrazu" -#: src/interface/main.c:178 +#: src/libvlc.h:116 +#, fuzzy msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" "Mo¿na wymusiæ w tym miejscu szeroko¶æ obrazu.\n" "Zauwa¿, ¿e domy¶lnie vlc zaadoptuje charakterystyki obrazu." -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "wysoko¶æ obrazu" -#: src/interface/main.c:183 +#: src/libvlc.h:121 +#, fuzzy msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" "Mo¿na wymusiæ w tym miejscu wysoko¶æ obrazu.\n" "Zauwa¿, ¿e domy¶lnie vlc zaadoptuje charakterystyki obrazu." -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "skalowanie obrazu" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "Mo¿na skalowaæ obraz o okre¶lony wspó³czynnik." -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "wyj¶cie obrazu w skali szaro¶ci" -#: src/interface/main.c:192 +#: src/libvlc.h:130 +#, fuzzy msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" "Uzywaj±c tej opcji vlc nie bêdzie dekodowa³ informacji o kolorze z obrazu " "(pozwala to tak¿e na oszczêdzenie trochê mocy procesora)." -#: src/interface/main.c:195 +#: src/libvlc.h:133 msgid "fullscreen video output" msgstr "wyj¶cie pe³noekranowe obrazu" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" "Po w³±czeniu tej opcji, vlc zawsze wy¶wietli obraz w trybie pe³noekranowym." -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" -msgstr "wy³±czona akceleracja sprzêtowa dla wyj¶cia obrazu" +#: src/libvlc.h:138 +#, fuzzy +msgid "overlay video output" +msgstr "wyj¶cie obrazu w skali szaro¶ci" -#: src/interface/main.c:202 +#: src/libvlc.h:140 +#, fuzzy msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" "Domy¶lnie vlc bêdzie próbowaæ wykorzystaæ w³a¶ciwo¶ci karty graficznej." -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "wymuszanie pozycji SPU" -#: src/interface/main.c:207 +#: src/libvlc.h:145 +#, fuzzy msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" "Mo¿na u¿yæ tej opcji do umieszczania podtytu³ów pod filmem, zamiast nad nim. " "Wypróbuj ró¿ne pozycje." -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "modu³ filtru obrazu" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." @@ -286,45 +429,45 @@ msgstr "" "Ta opcja umo¿liwia dodawanie filtrów polepszaj±cych jako¶æ obrazu, np. filtr " "przeciwko migotaniu, lub klonowanie zak³óceñ obrazu." -#: src/interface/main.c:216 +#: src/libvlc.h:154 msgid "server port" msgstr "port serwera" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "Port serwera u¿ywany dla strumieni UDP. Domy¶lnie 1234." -#: src/interface/main.c:220 +#: src/libvlc.h:158 msgid "enable network channel mode" msgstr "w³±czenie trybu kana³ów sieciowych" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "Aktywowanie tej opcji umo¿liwia u¿ywanie serwera kana³ów VideoLAN." -#: src/interface/main.c:224 +#: src/libvlc.h:162 msgid "channel server address" msgstr "adres serwera kana³ów" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "Tutaj nale¿y podaæ adres serwera kana³ów VideoLAN." -#: src/interface/main.c:228 +#: src/libvlc.h:166 msgid "channel server port" msgstr "port serwera kana³ów" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" "Tutaj nale¿y okre¶liæ port na którym uruchomiony jest serwer kana³ów " "VideoLAN." -#: src/interface/main.c:232 +#: src/libvlc.h:170 msgid "network interface" msgstr "interfejs sieciowy" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." @@ -332,27 +475,27 @@ msgstr "" "Je¶li istnieje kilka interfejsów sieciowych na komputerze i u¿ywane jest " "rozwi±zanie VLAN, mo¿na wskazaæ który interfejs bêdzie u¿ywany." -#: src/interface/main.c:237 +#: src/libvlc.h:175 msgid "choose program (SID)" msgstr "wybierz program (SID)" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "Wybierz program podaj±c jego identyfikator us³ugi." -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "wybierz d¼wiêk" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "Podaj domy¶lny typ d¼wiêku u¿ywany przy odtwarzaniu DVD." -#: src/interface/main.c:245 +#: src/libvlc.h:183 msgid "choose channel" msgstr "wybierz kana³" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." @@ -360,11 +503,11 @@ msgstr "" "Podaj numer strumienia kana³u d¼wiekowego u¿ywany przy odtwarzaniu DVD (od 1 " "do n)." -#: src/interface/main.c:250 +#: src/libvlc.h:188 msgid "choose subtitles" msgstr "wybierz podtytu³y" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." @@ -372,27 +515,27 @@ msgstr "" "Podaj numer strumienia kana³u podtytu³ów u¿ywanego przy odtwarzaniu DVD (od " "1 do n)." -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "urz±dzenie DVD" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "Domy¶lnie u¿ywane urz±dzenie DVD." -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "urz±dzenie VCD" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "Domy¶lnie u¿ywane urz±dzenie VCD." -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "wymu¶ IPv6" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." @@ -400,11 +543,11 @@ msgstr "" "Zaznaczenie tej opcji powoduje, ¿e IPv6 bêdzie u¿ywany domy¶lnie dla " "wszystkich po³±czeñ UDP i HTTP." -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "wymu¶ IPv4" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." @@ -412,11 +555,11 @@ msgstr "" "Zaznaczenie tej opcji powoduje, ¿e IPv4 bêdzie u¿ywany domy¶lnie dla " "wszystkich po³±czeñ UDP i HTTP." -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "wybór dekodera d¼wiêku MPEG" -#: src/interface/main.c:275 +#: src/libvlc.h:213 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." @@ -424,11 +567,11 @@ msgstr "" "Ta opcja umozliwia wybranie u¿ywanego dekodera d¼wiêku MPEG. Normalne opcje " "wyboru to wbudowana i szalona." -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "wybierz dekoder d¼wiêku AC3" -#: src/interface/main.c:280 +#: src/libvlc.h:218 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." @@ -436,81 +579,92 @@ msgstr "" "Ta opcja umo¿liwia wybranie u¿ywanego dekodera d¼wiêku AC3/A52. Zwyk³e opcje " "wyboru s± wbudowana i a52." -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +#, fuzzy +msgid "enable CPU MMX support" msgstr "wy³±czona obs³uga MMX procesora" -#: src/interface/main.c:285 +#: src/libvlc.h:223 +#, fuzzy msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" "Je¶li procesor obs³uguje zbiór istrukcji MMX lecz nie chcesz aby vlc ich " "u¿ywa³, mo¿na u¿yæ tej opcji." -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +#, fuzzy +msgid "enable CPU 3D Now! support" msgstr "wy³±czona obs³uga 3D Now!" -#: src/interface/main.c:290 +#: src/libvlc.h:228 +#, fuzzy msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" "Je¶li procesor obs³uguje zbiór istrukcji 3D Now! lecz nie chcesz aby vlc ich " "u¿ywa³, mo¿na u¿yæ tej opcji." -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +#, fuzzy +msgid "enable CPU MMX EXT support" msgstr "wy³±czona obs³uga MMX EXT" -#: src/interface/main.c:295 +#: src/libvlc.h:233 +#, fuzzy msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" "Je¶li procesor obs³uguje rozszerzony zbiór istrukcji MMX lecz nie chcesz aby " "vlc ich u¿ywa³, mo¿na u¿yæ tej opcji." -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +#, fuzzy +msgid "enable CPU SSE support" msgstr "wy³±czona obs³uga SSE" -#: src/interface/main.c:300 +#: src/libvlc.h:238 +#, fuzzy msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" "Je¶li procesor obs³uguje zbiór istrukcji SSE lecz nie chcesz aby vlc ich " "u¿ywa³, mo¿na u¿yæ tej opcji." -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +#, fuzzy +msgid "enable CPU AltiVec support" msgstr "wy³±czona obs³uga AltiVec" -#: src/interface/main.c:305 +#: src/libvlc.h:243 +#, fuzzy msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" "Je¶li procesor obs³uguje zbiór istrukcji AltiVec lecz nie chcesz aby vlc ich " "u¿ywa³, mo¿na u¿yæ tej opcji." -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "w³±czanie listy odtwarzania przy uruchamianiu" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" "Je¶li vlc ma w³±czaæ odtwarzanie po uruchomieniu wówczas nale¿y zaznaczyæ t± " "opcjê." -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +#, fuzzy +msgid "enqueue items in playlist" msgstr "domy¶lne kolejkowanie listy odtwarzania" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." @@ -518,11 +672,11 @@ msgstr "" "Je¶li vlc ma dodawaæ pliki do listy odtwarzania po ich otwarciu wówczas " "nale¿y zaznaczyæ t± opcjê." -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "zapêtlanie listy odtwarzania" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." @@ -530,11 +684,11 @@ msgstr "" "Je¶li vlc ma odtwarzaæ w nieskoñczono¶æ listê odtwarzania wówczas nale¿y " "zaznaczyæ t± opcjê." -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "modu³ kopiowania pamiêci" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." @@ -542,11 +696,29 @@ msgstr "" "Mo¿na wybraæ który z modu³ów kopiowania pamiêci ma byæ u¿ywany. Domy¶lnie " "vlc wybierze najszybszy obs³ugiwany przez sprzêt modu³." -#: src/interface/main.c:327 +#: src/libvlc.h:265 +#, fuzzy +msgid "access module" +msgstr "modu³ interfejsu" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +#, fuzzy +msgid "demux module" +msgstr "modu³ pomocy" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "szybkie w±tki pthread na NT/2K/Xp (tylko programi¶ci)" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -557,175 +729,103 @@ msgstr "" "napotkaæ problemy." #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "Interfejs" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "D¼wiêk" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "Obraz" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "Wej¶cie" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "Dekodery" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "CPU" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "Lista odtwarzania" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "Ró¿ne" -#: src/interface/main.c:432 +#: src/libvlc.h:378 msgid "main program" msgstr "g³ówny program" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "wy¶wietl pomoc" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "wy¶wietl pomoc szczegó³ow±" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "wy¶wietl listê dostêpnych modu³ów" -#: src/interface/main.c:452 -msgid "print help on module " +#: src/libvlc.h:396 +#, fuzzy +msgid "print help on module" msgstr "wy¶wietl pomoc na temat modu³u " -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "Wy¶wietl informacje o wersji" -#: src/interface/main.c:603 -msgid "help module" -msgstr "modu³ pomocy" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "U¿ycie: %s [opcje] [parametry] [plik]...\n" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "opcje modu³u %s:\n" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "napis" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "liczba ca³kowita" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "liczba zmiennoprz." - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" -"\n" -"Obiekty listy odtwarzania:\n" -" *.mpg, *.vob zwyk³e pliki MPEG-1/2\n" -" [dvd:][urz±dzenie][@urzadzenie_surowe][@[tytu³][,[rozdzia³][,k±t]]]\n" -" urzadzenie DVD\n" -" [vcd:][urz±dzenie][@[tytu³][,[rozdzia³]]\n" -" urz±dzenie VCD\n" -" udpstream:[@[][:]]\n" -" strumieñ UDP wysy³any przez VLS\n" -" vlc:loop wykonywanie pêtli listy odtwarzania\n" -" vlc:pause zatrzymanie odtwarzania obiektów listy\n" -" vlc:quit wyj¶cie z VLC" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" -"\n" -"Naci¶nij klawisz ENTER aby kontynuowaæ..." - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "[modu³] [opis]" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." -msgstr "" -"Ten program jest dostarczany BEZ ¯ADNEJ GWARANCJI, w granicach dozwolonych\n" -"przez prawo. Mo¿na go rozpowszechniaæ na zasadach licencji GNU General\n" -"Public License; zajrzyj do pliku COPYING aby uzyskaæ wiêcej szczegó³ów.\n" -"Program napisany przez zespó³ VideoLAN na uczelni Ecole Centrale, Pary¿." +#: src/libvlc.h:401 +#, fuzzy +msgid "print build information" +msgstr "Wy¶wietl informacje o wersji" -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "zm. logiczna" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +#, fuzzy +msgid "A/52 dynamic range compression" msgstr "wy³±czona kompresja dynamicznego zakresu A/52" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 +#, fuzzy msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" "Kompresja dynamicznego zakresu wyg³adza g³o¶ne d¼wiêki, za¶ ciche czyni " "g³o¶niejszymi, tak wiêc mo¿na ³atwiej ods³uchiwaæ strumienia w g³o¶nym " @@ -733,47 +833,47 @@ msgstr "" "Je¶li zostanie wy³±czona kompresja dynamicznego zakresu bêdzie to lepiej " "pasuj±ca opcja w przypadku sali kinowej lub pokoju akustycznego." -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "modu³ dekodera d¼wiêku a52 ATSC A/52 aka AC-3" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "modu³ wyj¶ciowy obrazu ASCII-art" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "modu³ AC3 downmix" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "modu³ AC3 IMDCT" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "dekoder programowy AC3" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "dekoder SPDIF przez AC3" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "CZytanie standartowego pliku systemowego" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "wtyczna dostêpu HTTP" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "wtyczka dostêpu przez surowe UDP" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "modu³ d¼wiêkowy ALSA" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "modu³ d¼wiêkowy aRts" @@ -781,50 +881,53 @@ msgstr "modu msgid "BeOS standard API module" msgstr "modu³ standardowy API BeOS" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "konwersje z I420,IYUV,YV12 do RGB,RV15,RV16,RV24,RV32" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "konwersje z MMX I420,IYUV,YV12 do RV15,RV16,RV24,RV32" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "konwersje z " -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr " do " -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "konwersje MMX z " #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +#, fuzzy +msgid "use hardware YUV->RGB conversions" msgstr "Wy³±czona konwersja sprzêtowa YUV->RGB" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 +#, fuzzy msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" "Nie próbuj u¿ywaæ akceleracji sprzêtowej dla konwersji YUV->RGB. Ta opcja " "nie przynosi ¿adnych efektów w trybie overlay." -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +#, fuzzy +msgid "use video buffers in system memory" msgstr "U¿ywanie buforów obrazu w pamiêci systemowej" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -836,7 +939,7 @@ msgstr "" "akceleracji sprzêtowej (jak przeskalowywanie lub konwersje YUV->RGB). Ta " "opcja nie przynosi ¿adnych efektów w trybie overlay." -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "modu³ rozszerzeñ DirectX" @@ -848,11 +951,11 @@ msgstr "modu msgid "SSE AC3 downmix module" msgstr "modu³ SSE AC3 downmix" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "urz±dzenie OSS dsp" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "modu³ linux OSS /dev/dsp" @@ -872,7 +975,7 @@ msgstr "" "chroma zamiast próby zwiêkszania wydajno¶ci przez u¿ycie najbardziej " "wydajnego formatu." -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "modu³ fikcyjnych funkcji" @@ -900,52 +1003,102 @@ msgstr "[dvdread:][urzadzenie][@[tytu msgid "DVDRead input module" msgstr "modu³ wej¶ciowy DVDRead" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "modu³ d¼wiêku EsounD" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "urz±dzenie bufora ramek" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "modu³ bufora ramek konsoli linuksowej" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +#, fuzzy +msgid "Deinterlace mode" +msgstr "modu³ interfejsu" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "modu³ przeplotu" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +#, fuzzy +msgid "distort mode" +msgstr "Tryb sieci" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "ró¿ne modu³y efektów obrazu" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "modu³ odwracania obrazu" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "modu³ transformacji obrazu" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "modu³ ¶ciany obrazu (image wall)" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "modu³ efektu zasiêgu" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "nazwa ekranu X11" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." @@ -953,26 +1106,28 @@ msgstr "" "Okre¶la u¿ywany ekran sprzêtowy X11.\n" "Domy¶lnie vlc u¿yje warto¶ci ze zmiennej ¶rodowiskowej DISPLAY." -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "modu³ 3dfx Glide" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +#, fuzzy +msgid "show tooltips" msgstr "ukrywanie podpowiedzi" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +#, fuzzy +msgid "Show tooltips for configuration options." msgstr "Podpowiedzi dla opcji konfiguracji nie maj± byæ wy¶wietlane." -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "maksymalna wysoko¶æ okien konfiguracji" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." @@ -980,19 +1135,21 @@ msgstr "" "Mo¿na ustawiæ maksymalny rozmiar, jaki bêd± mog³y mieæ okna konfiguracji w " "menu preferencji." -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "Modu³ interfejsu Gtk+" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +#, fuzzy +msgid "show text on toolbar buttons" msgstr "ukrywanie tekstu na przyciskach" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +#, fuzzy +msgid "Show the text below icons on the toolbar." msgstr "Ukrywanie tekstu pod ikonami paska narzêdziowego." -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "modu³ interfejsu Gnome" @@ -1005,35 +1162,35 @@ msgstr "Klient VideoLAN" msgid "_File" msgstr "_Plik" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "_Otwórz plik..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "Otwiera plik" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "Otwórz _p³ytê..." #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "Otwiera DVD lub VCD" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "_Strumieñ sieciowy..." #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "Wybiera strumieñ sieciowy" @@ -1067,7 +1224,7 @@ msgstr "U_kryj interfejs" msgid "Hide the main interface window" msgstr "Ukrywa g³ówne okno interfejsu" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "Pe³_ny ekran" @@ -1124,17 +1281,17 @@ msgstr "U_stawienia" msgid "A_udio" msgstr "A_udio" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "Wybiera kana³ d¼wiêkowy" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "_Podtytu³y" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "Wybiera kana³ podtytu³ów" @@ -1159,14 +1316,14 @@ msgstr "_Informacje o..." msgid "About this application" msgstr "Informacje dotycz±ce tej aplikacji" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "Plik" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1184,7 +1341,7 @@ msgstr "Satelita" msgid "Open a Satellite Card" msgstr "Otwiera kartê satelitarn±" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "Wstecz" @@ -1193,7 +1350,7 @@ msgstr "Wstecz" msgid "Go Backward" msgstr "Przechodzi wstecz" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "Zatrzymaj" @@ -1206,7 +1363,7 @@ msgstr "Zatrzymuje strumie msgid "Eject" msgstr "Wysuñ" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "Odtwórz" @@ -1215,7 +1372,7 @@ msgstr "Odtw msgid "Play Stream" msgstr "Odtwarza strumieñ" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "Wstrzymaj" @@ -1224,7 +1381,7 @@ msgstr "Wstrzymaj" msgid "Pause Stream" msgstr "Wstrzymuje strumieñ" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "Zwolnij" @@ -1233,7 +1390,7 @@ msgstr "Zwolnij" msgid "Play Slower" msgstr "Zwalnia odtwarzanie" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "Przyspiesz" @@ -1246,7 +1403,7 @@ msgstr "Przyspiesza odtwarzanie" msgid "Open Playlist" msgstr "Otwórz listê" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1256,7 +1413,7 @@ msgstr "Poprz" msgid "Previous File" msgstr "Poprzedni plik" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1266,27 +1423,15 @@ msgstr "Nast" msgid "Next File" msgstr "Nastêpny plik" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "-:--:--" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "Tytu³:" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "--" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "Rozdzia³:" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "---" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "Brak serwera" @@ -1294,7 +1439,7 @@ msgstr "Brak serwera" msgid "Channel:" msgstr "Kana³:" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "Naprzód!" @@ -1302,28 +1447,28 @@ msgstr "Naprz msgid "_Play" msgstr "_Odtwarzaj" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "Prze³±cz _Interfejs" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "_Skocz..." -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "Program" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "_Nawigacja" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "_D¼wiêk" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "Lista odtwarzania..." @@ -1331,7 +1476,7 @@ msgstr "Lista odtwarzania..." msgid "About" msgstr "Informacje o..." -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - Zespó³ VideoLAN" @@ -1347,7 +1492,7 @@ msgstr "" "Zespó³ VideoLAN \n" "http://www.videolan.org/" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1358,7 +1503,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "OK" @@ -1366,39 +1511,39 @@ msgstr "OK" msgid "Select File" msgstr "Wybierz plik" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "Otwóz p³ytê" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "Typ p³yty" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "DVD" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "VCD" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "Pozycja pocz±tkowa" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "Rozdzia³" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "Tytu³" @@ -1408,7 +1553,7 @@ msgstr "Nazwa urz #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "Anuluj" @@ -1416,41 +1561,41 @@ msgstr "Anuluj" msgid "Open Network" msgstr "Otwórz sieæ" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 msgid "Network mode" msgstr "Tryb sieci" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "UDP" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "UDP Multicast" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 msgid "Channel server " msgstr "Serwer kana³u " -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "HTTP" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "Port" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "Adres" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "URL" @@ -1462,37 +1607,37 @@ msgstr "Skocz" msgid "Go to:" msgstr "Przejd¼ do:" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "s." -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "m:" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "h:" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "Dodaj" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "Sieæ" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "Url" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "Usuñ" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "Wszysko" @@ -1500,7 +1645,7 @@ msgstr "Wszysko" msgid "Selected" msgstr "Zaznaczone" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "Wybór" @@ -1516,71 +1661,46 @@ msgstr "_Odwr msgid "_Select" msgstr "_Wybierz" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "Czas trwania" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "Komunikaty" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "Otwórz kartê satelitarn±" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "Ustawienia transpondera" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "Szybko¶æ symboliczna" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "Czêstotliwo¶æ" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "Polaryzacja" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "Pionowa" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "Pozioma" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "FEC" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "1/2" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "2/3" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "3/4" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "4/5" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "5/6" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "7/8" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "Wybierz tytu³" @@ -1593,43 +1713,43 @@ msgstr "Wybierz rozdzia msgid "Select previous title" msgstr "Wybierz poprzedni tytu³" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "Wybierz poprzedni rozdzia³" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "Wybierz nastêpny rozdzia³" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "Kana³ sieciowy:" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 msgid "Toggle fullscreen mode" msgstr "Prze³±cz tryb pe³noekranowy" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "Pobierz bezpo¶rednio wybrany punkt" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "Prze³±cz program" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "Nawigacja przez tytu³y i rozdzia³y" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "Otwórz plik" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "Modu³y" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." @@ -1637,106 +1757,102 @@ msgstr "" "Przepraszamy, mened¿er modu³ów jeszcze nie jest funkcjonalny. Spróbuj u¿yæ " "funkcji pó¼niejszej wersji programu." -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "Nazwa urz±dzenia:" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "Strumieñ sieciowy" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "Obiekt" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "Usuñ" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "Odwróæ" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "Wybierz" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "Skocz do:" -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "Otwórz strumieñ" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "Protokó³" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "strumieñ UDP" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "RPT" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "Serwer" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "Rozg³aszanie" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "Kana³y" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "Serwer kana³ów" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "6/7" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "Nazwa" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Description" msgstr "Opis" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "Skonfiguruj" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 msgid "Selected:" msgstr "Wybrano:" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 msgid "Save" msgstr "Zapisz" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "Zastosuj" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "Nic" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, c-format msgid "Title %d (%d)" msgstr "Tytu³ %d (%d)" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, c-format msgid "Chapter %d" msgstr "Rozdzia³ %d" @@ -1744,12 +1860,13 @@ msgstr "Rozdzia #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "modu³ IDCT" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +#, fuzzy +msgid "AltiVec IDCT module" msgstr "modu³ Altivec IDCT" #: plugins/idct/idctclassic.c:47 @@ -1776,11 +1893,11 @@ msgstr "modu msgid "KDE interface module" msgstr "modu³ interfejsu KDE" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "modu³ zdalnego sterowania w podczerwieni" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "dekoder liniowy PCM d¼wiêku" @@ -1791,17 +1908,20 @@ msgstr "modu #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 +#, fuzzy msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" +"Okre¶la u¿ywany ekran sprzêtowy X11.\n" +"Domy¶lnie vlc u¿yje warto¶ci ze zmiennej ¶rodowiskowej DISPLAY." -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "biblioteka dekodera d¼wiêku libmad MPEG 1/2/3" @@ -1809,15 +1929,15 @@ msgstr "biblioteka dekodera d msgid "libc memcpy module" msgstr "modu³ libc memcpy" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "modu³ 3D Now! memcpy" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "modu³ MMX memcpy" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "modu³ MMX EXT memcpy" @@ -1825,18 +1945,18 @@ msgstr "modu msgid "AltiVec memcpy module" msgstr "modu³ AltiVec memcpy" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "modu³ obrazu Matrox Graphic Array" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "alternatywna metoda pe³noekranowa" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1852,11 +1972,20 @@ msgstr "" "2) Ca³kowite pominiêcie mened¿era okien, lecz wówczas nic nie bêdzie mog³o " "byæ wy¶wietlane na górze obrazu." -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +#, fuzzy +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" +"Okre¶la u¿ywany ekran sprzêtowy X11.\n" +"Domy¶lnie vlc u¿yje warto¶ci ze zmiennej ¶rodowiskowej DISPLAY." + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "modu³ X11 MGA" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "modu³ kompensacji ruchu" @@ -1876,54 +2005,53 @@ msgstr "modu msgid "MMXEXT motion compensation module" msgstr "modu³ kompensacji ruchu MMXEXT" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "dekoder d¼wiêku MPEG warstwa I/II" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "Elementarne wej¶cie strumienia ISO 13818-2 MPEG" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "Programowe wej¶cie strumienia ISO 13818-1 MPEG" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "Wej¶cie transportu strumienia ISO 13818-1 MPEG" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "Wej¶cie transportu strumienia ISO 13818-1 MPEG (libdvbpsi)" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 +#, fuzzy msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" "Ta opcja umo¿liwia wybranie modu³u IDCT u¿ywanego przez ten dekoder obrazu.\n" "Nale¿y zauwa¿yæ, ¿e domy¶lnym zachowaniem jest automatyczny wybór " "najlepszego dostêpnego modu³u." -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 +#, fuzzy msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" "Ta opcja umo¿liwia wybranie modu³u kompensacji ruchu u¿ywanego przez ten " "dekoder obrazu.\n" "Nale¿y zauwa¿yæ, ¿e domy¶lnym zachowaniem jest automatyczny wybór " "najlepszego dostêpnego modu³u." -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "u¿ywanie dodatkowych procesorów" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." @@ -1931,11 +2059,11 @@ msgstr "" "Tek dekoder obrazu przynosi korzy¶ci przy komputerze wieloprocesorowym.Je¶li " "posiadasz taki, mo¿na tutaj okre¶liæ liczbê procesorów." -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "wymuszanie algorytmu synchronizacji {I|I+|IP|IP+|IPB}" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1946,7 +2074,7 @@ msgstr "" "wybór typów dekodowanego obrazu. Nale¿y zwróciæ uwagê, ¿e wybranie wiêcej " "obrazów ni¿ procesor jest zdolny zdekodowaæ nie daje niczego." -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "modu³ dekodera obrazu MPEG I/II" @@ -1958,7 +2086,7 @@ msgstr "sieciowa warstwa abstrakcji IPv4" msgid "IPv6 network abstraction layer" msgstr "sieciowa warstwa abstrakcji IPv6" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "modu³ QNX RTOS" @@ -2005,29 +2133,46 @@ msgstr "antena lnb_slof (kHz)" msgid "satellite input module" msgstr "modu³ wej¶cia satelity" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "modu³ Simple DirectMedia Layer (SDL)" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "modu³ dekodera podtytu³ów DVD" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "modu³ interfejsu zapisu do pliku" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "modu³ interfejsu ncurses" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "modu³ interfejsu sterowania zdalnego" @@ -2035,11 +2180,24 @@ msgstr "modu msgid "VCD input module" msgstr "modu³ wej¶cia VCD" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "modu³ rozszerzenia waveOut Win32" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "modu³ interfejsu Win32" @@ -2078,3 +2236,56 @@ msgstr "" #: plugins/x11/xvideo.c:73 msgid "XVideo extension module" msgstr "modu³ rozszerzenia XVideo" + +#~ msgid "disable hardware acceleration for the video output" +#~ msgstr "wy³±czona akceleracja sprzêtowa dla wyj¶cia obrazu" + +#~ msgid "-:--:--" +#~ msgstr "-:--:--" + +#~ msgid "--" +#~ msgstr "--" + +#~ msgid "---" +#~ msgstr "---" + +#~ msgid "1/2" +#~ msgstr "1/2" + +#~ msgid "2/3" +#~ msgstr "2/3" + +#~ msgid "3/4" +#~ msgstr "3/4" + +#~ msgid "4/5" +#~ msgstr "4/5" + +#~ msgid "5/6" +#~ msgstr "5/6" + +#~ msgid "7/8" +#~ msgstr "7/8" + +#~ msgid "6/7" +#~ msgstr "6/7" + +#~ msgid "warning level (or use -v, -vv, etc...)" +#~ msgstr "poziom ostrzegania (lub u¿yj -v, -vv, itd...)" + +#~ msgid "" +#~ "Increasing the warning level will allow you to see more debug messages " +#~ "and can sometimes help you to troubleshoot a problem." +#~ msgstr "" +#~ "Zwiêkszanie poziomu ostrzegania pozwoli na wy¶wietlenie wiêksze ilo¶ci " +#~ "komunikatów o b³êdach oraz mo¿e czasem pomóc rozwi±zaæ problem." + +#~ msgid "output statistics" +#~ msgstr "statystyki wyj¶ciowe" + +#~ msgid "" +#~ "Enabling the stats mode will flood your log console with various " +#~ "statistics messages." +#~ msgstr "" +#~ "W³±czenie trybu statystyk zape³ni dziennik konsoli ró¿nymi komunikatami " +#~ "statystycznymi." diff --git a/po/ru.po b/po/ru.po index af61a35add..ba1ef2ca60 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-vlc\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: 2001-02-19 19:58+03:00\n" "Last-Translator: Valek Filippov \n" "Language-Team: Russian \n" @@ -14,90 +14,200 @@ msgstr "" "Content-Type: text/plain; charset=koi8-r\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 -msgid "interface module" +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "" + +#. Print module name +#: src/libvlc.c:828 +#, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" + +#. Usage +#: src/libvlc.c:959 +#, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" msgstr "" -#: src/interface/main.c:97 +#: src/libvlc.c:962 +msgid "[module] [description]\n" +msgstr "" + +#: src/libvlc.c:1003 msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" msgstr "" -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: ru.po,v 1.9 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 +msgid "interface module" msgstr "" -#: src/interface/main.c:103 +#: src/libvlc.h:34 msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." +msgstr "" + +#: src/libvlc.h:38 +msgid "be verbose" msgstr "" -#: src/interface/main.c:106 -msgid "output statistics" +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:42 +msgid "be quiet" +msgstr "" + +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" + +#: src/libvlc.h:46 +msgid "color messages" +msgstr "" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "" -#: src/interface/main.c:118 +#: src/libvlc.h:58 msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +msgid "enable audio" msgstr "" -#: src/interface/main.c:124 +#: src/libvlc.h:64 msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" -#: src/interface/main.c:128 -msgid "mono audio" +#: src/libvlc.h:67 +msgid "force mono audio" msgstr "" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "" -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "" -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -111,361 +221,376 @@ msgid "" "8 -> ac3 pass-through" msgstr "" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "" -#: src/interface/main.c:151 +#: src/libvlc.h:90 msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." msgstr "" -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "" -#: src/interface/main.c:161 +#: src/libvlc.h:100 msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +msgid "enable video" msgstr "" -#: src/interface/main.c:167 +#: src/libvlc.h:106 msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "" -#: src/interface/main.c:178 +#: src/libvlc.h:116 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "" -#: src/interface/main.c:183 +#: src/libvlc.h:121 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "" -#: src/interface/main.c:192 +#: src/libvlc.h:130 msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" -#: src/interface/main.c:195 +#: src/libvlc.h:133 msgid "fullscreen video output" msgstr "" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" +#: src/libvlc.h:138 +msgid "overlay video output" msgstr "" -#: src/interface/main.c:202 +#: src/libvlc.h:140 msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 msgid "server port" msgstr "" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 msgid "enable network channel mode" msgstr "" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 msgid "channel server address" msgstr "" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 msgid "channel server port" msgstr "" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 msgid "network interface" msgstr "" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 msgid "choose program (SID)" msgstr "" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "" -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 msgid "choose channel" msgstr "" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 msgid "choose subtitles" msgstr "" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "" -#: src/interface/main.c:275 +#: src/libvlc.h:213 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." msgstr "" -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "" -#: src/interface/main.c:280 +#: src/libvlc.h:218 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." msgstr "" -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +msgid "enable CPU MMX support" msgstr "" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +msgid "enable CPU 3D Now! support" msgstr "" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +msgid "enable CPU MMX EXT support" msgstr "" -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +msgid "enable CPU SSE support" msgstr "" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +msgid "enable CPU AltiVec support" msgstr "" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +msgid "enqueue items in playlist" msgstr "" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +msgid "access module" +msgstr "" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +msgid "demux module" +msgstr "" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -473,200 +598,142 @@ msgid "" msgstr "" #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "óÐÉÓÏË ÄÌÑ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "" -#: src/interface/main.c:432 +#: src/libvlc.h:378 msgid "main program" msgstr "" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "" -#: src/interface/main.c:452 -msgid "print help on module " +#: src/libvlc.h:396 +msgid "print help on module" msgstr "" -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "" -#: src/interface/main.c:603 -msgid "help module" -msgstr "" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" -msgstr "" - -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." +#: src/libvlc.h:401 +msgid "print build information" msgstr "" -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "" @@ -674,48 +741,48 @@ msgstr "" msgid "BeOS standard API module" msgstr "" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr "" -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -723,7 +790,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "" @@ -735,11 +802,11 @@ msgstr "" msgid "SSE AC3 downmix module" msgstr "" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "" @@ -756,7 +823,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "" @@ -784,95 +851,144 @@ msgstr "" msgid "DVDRead input module" msgstr "" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +msgid "Deinterlace mode" +msgstr "" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +#, fuzzy +msgid "distort mode" +msgstr "ïÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." msgstr "" -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +msgid "show tooltips" msgstr "" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +msgid "Show tooltips for configuration options." msgstr "" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." msgstr "" -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "" @@ -885,38 +1001,38 @@ msgstr " msgid "_File" msgstr "" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "ïÔËÒÙÔØ ÆÁÊÌ..." #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 #, fuzzy msgid "Open a File" msgstr "ïÔËÒÙÔØ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 #, fuzzy msgid "Open _Disc..." msgstr "ïÔËÒÙÔØ ÆÁÊÌ..." #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 #, fuzzy msgid "_Network Stream..." msgstr "ïÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "" @@ -951,7 +1067,7 @@ msgstr "" msgid "Hide the main interface window" msgstr "ïÔËÒÙÔØ ÏËÎÏ ÓÐÉÓËÁ ÄÌÑ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "" @@ -1010,17 +1126,17 @@ msgstr "" msgid "A_udio" msgstr "" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "" @@ -1046,7 +1162,7 @@ msgstr " msgid "About this application" msgstr "" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 #, fuzzy @@ -1054,7 +1170,7 @@ msgid "File" msgstr "óÌÅÄÕÀÝÉÊ ÆÁÊÌ" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1074,7 +1190,7 @@ msgstr "" msgid "Open a Satellite Card" msgstr "ïÔËÒÙÔØ ÏËÎÏ ÓÐÉÓËÁ ÄÌÑ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "îÁÚÁÄ" @@ -1084,7 +1200,7 @@ msgstr " msgid "Go Backward" msgstr "÷ÅÒÎÕÔØÓÑ ÎÁÚÁÄ" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "óÔÏÐ" @@ -1097,7 +1213,7 @@ msgstr " msgid "Eject" msgstr "" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "÷ÏÓÐÒ." @@ -1106,7 +1222,7 @@ msgstr " msgid "Play Stream" msgstr "÷ÏÓÐÒÏÉÚ×ÅÓÔÉ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "ðÁÕÚÁ" @@ -1115,7 +1231,7 @@ msgstr " msgid "Pause Stream" msgstr "ðÒÉÏÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "íÅÄÌÅÎÎÏ" @@ -1124,7 +1240,7 @@ msgstr " msgid "Play Slower" msgstr "÷ÏÓÐÒÏÉÚ×ÏÄÉÔØ ÍÅÄÌÅÎÎÅÅ" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "âÙÓÔÒÏ" @@ -1137,7 +1253,7 @@ msgstr " msgid "Open Playlist" msgstr "ïÔËÒÙÔØ ÓÐÉÓÏË ÄÌÑ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1147,7 +1263,7 @@ msgstr " msgid "Previous File" msgstr "ðÒÅÄÙÄÕÝÉÊ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1157,27 +1273,15 @@ msgstr " msgid "Next File" msgstr "óÌÅÄÕÀÝÉÊ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "" @@ -1185,7 +1289,7 @@ msgstr "" msgid "Channel:" msgstr "" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "" @@ -1193,28 +1297,28 @@ msgstr "" msgid "_Play" msgstr "÷ÏÓÐÒ." -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "" -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "óÐÉÓÏË ÄÌÑ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ..." @@ -1222,7 +1326,7 @@ msgstr " msgid "About" msgstr "" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "" @@ -1236,7 +1340,7 @@ msgid "" "http://www.videolan.org/" msgstr "" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1247,7 +1351,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "" @@ -1256,40 +1360,40 @@ msgstr "" msgid "Select File" msgstr "óÌÅÄÕÀÝÉÊ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 #, fuzzy msgid "Open Disc" msgstr "ïÔËÒÙÔØ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "" @@ -1299,7 +1403,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "" @@ -1308,42 +1412,42 @@ msgstr "" msgid "Open Network" msgstr "ïÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 #, fuzzy msgid "Network mode" msgstr "ïÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 msgid "Channel server " msgstr "" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1355,37 +1459,37 @@ msgstr "" msgid "Go to:" msgstr "" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "" -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "" @@ -1393,7 +1497,7 @@ msgstr "" msgid "Selected" msgstr "" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "" @@ -1409,72 +1513,47 @@ msgstr "" msgid "_Select" msgstr "" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 #, fuzzy msgid "Open Satellite Card" msgstr "ïÔËÒÙÔØ ÏËÎÏ ÓÐÉÓËÁ ÄÌÑ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "" @@ -1488,43 +1567,43 @@ msgstr "" msgid "Select previous title" msgstr "ðÒÅÄÙÄÕÝÉÊ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 msgid "Toggle fullscreen mode" msgstr "" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "ïÔËÒÙÔØ ÆÁÊÌ" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "íÏÄÕÌÉ" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." @@ -1532,109 +1611,105 @@ msgstr "" "éÚ×ÉÎÉÔÅ, ÄÉÓÐÅÔÞÅÒ ÍÏÄÕÌÅÊ ÐÏËÁ ÎÅ ÆÕÎËÃÉÏÎÁÌÅÎ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÐÒÏÂÕÊÔÅ × " "ÓÌÅÄÕÀÝÉÈ ×ÅÒÓÉÑÈ." -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 #, fuzzy msgid "Network Stream" msgstr "ïÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "" -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 #, fuzzy msgid "Open Stream" msgstr "ïÓÔÁÎÏ×ÉÔØ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 #, fuzzy msgid "UDP stream" msgstr "÷ÏÓÐÒÏÉÚ×ÅÓÔÉ ÐÏÔÏË" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Description" msgstr "" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 msgid "Selected:" msgstr "" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 msgid "Save" msgstr "" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, c-format msgid "Title %d (%d)" msgstr "" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, c-format msgid "Chapter %d" msgstr "" @@ -1642,12 +1717,12 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "" #: plugins/idct/idctclassic.c:47 @@ -1674,11 +1749,11 @@ msgstr "" msgid "KDE interface module" msgstr "" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "" @@ -1689,17 +1764,17 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "" @@ -1707,15 +1782,15 @@ msgstr "" msgid "libc memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "" @@ -1723,18 +1798,18 @@ msgstr "" msgid "AltiVec memcpy module" msgstr "" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1744,11 +1819,17 @@ msgid "" "show on top of the video." msgstr "" -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "" @@ -1768,57 +1849,54 @@ msgstr "" msgid "MMXEXT motion compensation module" msgstr "" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1826,7 +1904,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "" @@ -1838,7 +1916,7 @@ msgstr "" msgid "IPv6 network abstraction layer" msgstr "" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "" @@ -1885,29 +1963,46 @@ msgstr "" msgid "satellite input module" msgstr "" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "" @@ -1915,11 +2010,24 @@ msgstr "" msgid "VCD input module" msgstr "" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "" diff --git a/po/vlc.pot b/po/vlc.pot index 76cf220c31..4ee56cb6eb 100644 --- a/po/vlc.pot +++ b/po/vlc.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-05-27 20:31+0200\n" +"POT-Creation-Date: 2002-05-31 11:45+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -14,90 +14,200 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/interface/main.c:95 -msgid "interface module" +#: src/libvlc.c:270 +#, c-format +msgid "Usage: %s [options] [parameters] [file]...\n" +msgstr "" + +#. Print module name +#: src/libvlc.c:828 +#, c-format +msgid "" +"%s module options:\n" +"\n" +msgstr "" + +#. We could also have "=<" here +#: src/libvlc.c:848 src/misc/configuration.c:794 +msgid "string" +msgstr "" + +#: src/libvlc.c:851 src/misc/configuration.c:779 +msgid "integer" +msgstr "" + +#: src/libvlc.c:854 src/misc/configuration.c:786 +msgid "float" +msgstr "" + +#: src/libvlc.c:860 +msgid " (default: enabled)" +msgstr "" + +#: src/libvlc.c:861 +msgid " (default: disabled)" +msgstr "" + +#: src/libvlc.c:915 +msgid "" +"\n" +"Playlist items:\n" +" *.mpg, *.vob plain MPEG-1/2 files\n" +" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" +" DVD device\n" +" [vcd:][device][@[title][,[chapter]]\n" +" VCD device\n" +" udpstream:[@[][:]]\n" +" UDP stream sent by VLS\n" +" vlc:loop loop execution of the playlist\n" +" vlc:pause pause execution of playlist items\n" +" vlc:quit quit VLC\n" +msgstr "" + +#: src/libvlc.c:936 src/libvlc.c:985 src/libvlc.c:1009 src/libvlc.c:1028 +msgid "" +"\n" +"Press the RETURN key to continue...\n" +msgstr "" + +#. Usage +#: src/libvlc.c:959 +#, c-format +msgid "" +"Usage: %s [options] [parameters] [file]...\n" +"\n" msgstr "" -#: src/interface/main.c:97 +#: src/libvlc.c:962 +msgid "[module] [description]\n" +msgstr "" + +#: src/libvlc.c:1003 msgid "" -"This option allows you to select the interface used by vlc.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This program comes with NO WARRANTY, to the extent permitted by law.\n" +"You may redistribute it under the terms of the GNU General Public License;\n" +"see the file named COPYING for details.\n" +"Written by the VideoLAN team at Ecole Centrale, Paris.\n" msgstr "" -#: src/interface/main.c:101 -msgid "warning level (or use -v, -vv, etc...)" +#. **************************************************************************** +#. * libvlc.h: main libvlc header +#. ***************************************************************************** +#. * Copyright (C) 1998-2002 VideoLAN +#. * $Id: vlc.pot,v 1.9 2002/06/01 12:32:01 sam Exp $ +#. * +#. * Authors: Vincent Seguin +#. * Samuel Hocevar +#. * Gildas Bazin +#. * +#. * 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. +#. **************************************************************************** +#. **************************************************************************** +#. * Configuration options for the main program. Each module will also separatly +#. * define its own configuration options. +#. * Look into configuration.h if you need to know more about the following +#. * macros. +#. **************************************************************************** +#: src/libvlc.h:32 +msgid "interface module" msgstr "" -#: src/interface/main.c:103 +#: src/libvlc.h:34 msgid "" -"Increasing the warning level will allow you to see more debug messages and " -"can sometimes help you to troubleshoot a problem." +"This option allows you to select the interface used by vlc. The default " +"behavior is to automatically select the best module available." +msgstr "" + +#: src/libvlc.h:38 +msgid "be verbose" msgstr "" -#: src/interface/main.c:106 -msgid "output statistics" +#: src/libvlc.h:40 +msgid "This options activates the output of information messages." msgstr "" -#: src/interface/main.c:108 +#: src/libvlc.h:42 +msgid "be quiet" +msgstr "" + +#: src/libvlc.h:44 +msgid "This options turns off all warning and information messages." +msgstr "" + +#: src/libvlc.h:46 +msgid "color messages" +msgstr "" + +#: src/libvlc.h:48 msgid "" -"Enabling the stats mode will flood your log console with various statistics " -"messages." +"When this option is turned on, the messages sent to the console will be " +"colorized. Your terminal needs Linux color support for this to work." msgstr "" -#: src/interface/main.c:111 +#: src/libvlc.h:51 msgid "interface default search path" msgstr "" -#: src/interface/main.c:113 +#: src/libvlc.h:53 msgid "" "This option allows you to set the default path that the interface will open " "when looking for a file." msgstr "" -#: src/interface/main.c:116 +#: src/libvlc.h:56 msgid "audio output module" msgstr "" -#: src/interface/main.c:118 +#: src/libvlc.h:58 msgid "" -"This option allows you to select the audio audio output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the audio audio output method used by vlc. " +"The default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:122 -msgid "disable audio" +#: src/libvlc.h:62 +msgid "enable audio" msgstr "" -#: src/interface/main.c:124 +#: src/libvlc.h:64 msgid "" -"This will completely disable the audio output. The audio decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the audio output. In this case the audio decoding " +"stage won't be done, and it will save some processing power." msgstr "" -#: src/interface/main.c:128 -msgid "mono audio" +#: src/libvlc.h:67 +msgid "force mono audio" msgstr "" -#: src/interface/main.c:129 +#: src/libvlc.h:68 msgid "This will force a mono audio output" msgstr "" -#: src/interface/main.c:131 +#: src/libvlc.h:70 msgid "audio output volume" msgstr "" -#: src/interface/main.c:133 +#: src/libvlc.h:72 msgid "" "You can set the default audio output volume here, in a range from 0 to 1024." msgstr "" -#: src/interface/main.c:136 +#: src/libvlc.h:75 msgid "audio output format" msgstr "" -#: src/interface/main.c:138 +#: src/libvlc.h:77 msgid "" "You can force the audio output format here.\n" "0 -> 16 bits signed native endian (default)\n" @@ -111,361 +221,376 @@ msgid "" "8 -> ac3 pass-through" msgstr "" -#: src/interface/main.c:149 +#: src/libvlc.h:88 msgid "audio output frequency (Hz)" msgstr "" -#: src/interface/main.c:151 +#: src/libvlc.h:90 msgid "" -"You can force the audio output frequency here.\n" -"Common values are 48000, 44100, 32000, 22050, 16000, 11025, 8000." +"You can force the audio output frequency here. Common values are 48000, " +"44100, 32000, 22050, 16000, 11025, 8000." msgstr "" -#: src/interface/main.c:154 +#: src/libvlc.h:93 msgid "compensate desynchronization of audio (in ms)" msgstr "" -#: src/interface/main.c:156 +#: src/libvlc.h:95 msgid "" "This option allows you to delay the audio output. This can be handy if you " "notice a lag between the video and the audio." msgstr "" -#: src/interface/main.c:159 +#: src/libvlc.h:98 msgid "video output module" msgstr "" -#: src/interface/main.c:161 +#: src/libvlc.h:100 msgid "" -"This option allows you to select the video output method used by vlc.\n" -"Note that the default behavior is to automatically select the best method " -"available." +"This option allows you to select the video output method used by vlc. The " +"default behavior is to automatically select the best method available." msgstr "" -#: src/interface/main.c:165 -msgid "disable video" +#: src/libvlc.h:104 +msgid "enable video" msgstr "" -#: src/interface/main.c:167 +#: src/libvlc.h:106 msgid "" -"This will completely disable the video output. The video decoding stage " -"shouldn't even be done, so it can allow you to save some processing power." +"You can completely disable the video output. In this case the video decoding " +"stage won't be done, which will save some processing power." msgstr "" -#: src/interface/main.c:171 +#: src/libvlc.h:109 msgid "display identifier" msgstr "" -#: src/interface/main.c:173 +#: src/libvlc.h:111 msgid "" "This is the local display port that will be used for X11 drawing. For " "instance :0.1." msgstr "" -#: src/interface/main.c:176 +#: src/libvlc.h:114 msgid "video width" msgstr "" -#: src/interface/main.c:178 +#: src/libvlc.h:116 msgid "" -"You can enforce the video width here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video width here. By default vlc will adapt to the video " +"characteristics." msgstr "" -#: src/interface/main.c:181 +#: src/libvlc.h:119 msgid "video height" msgstr "" -#: src/interface/main.c:183 +#: src/libvlc.h:121 msgid "" -"You can enforce the video height here.\n" -"Note that by default vlc will adapt to the video characteristics." +"You can enforce the video height here. By default vlc will adapt to the " +"video characteristics." msgstr "" -#: src/interface/main.c:186 +#: src/libvlc.h:124 msgid "zoom video" msgstr "" -#: src/interface/main.c:188 +#: src/libvlc.h:126 msgid "You can zoom the video by the specified factor." msgstr "" -#: src/interface/main.c:190 +#: src/libvlc.h:128 msgid "grayscale video output" msgstr "" -#: src/interface/main.c:192 +#: src/libvlc.h:130 msgid "" -"Using this option, vlc will not decode the color information from the video " -"(this can also allow you to save some processing power)." +"When enabled, the color information from the video won't be decoded (this " +"can also allow you to save some processing power)." msgstr "" -#: src/interface/main.c:195 +#: src/libvlc.h:133 msgid "fullscreen video output" msgstr "" -#: src/interface/main.c:197 +#: src/libvlc.h:135 msgid "" "If this option is enabled, vlc will always start a video in fullscreen mode." msgstr "" -#: src/interface/main.c:200 -msgid "disable hardware acceleration for the video output" +#: src/libvlc.h:138 +msgid "overlay video output" msgstr "" -#: src/interface/main.c:202 +#: src/libvlc.h:140 msgid "" -"By default vlc will try to take advantage of the overlay capabilities of you " -"graphics card." +"If enabled, vlc will try to take advantage of the overlay capabilities of " +"you graphics card." msgstr "" -#: src/interface/main.c:205 +#: src/libvlc.h:143 msgid "force SPU position" msgstr "" -#: src/interface/main.c:207 +#: src/libvlc.h:145 msgid "" -"You can use this option to place the sub-titles under the movie, instead of " +"You can use this option to place the subtitles under the movie, instead of " "over the movie. Try several positions." msgstr "" -#: src/interface/main.c:210 +#: src/libvlc.h:148 msgid "video filter module" msgstr "" -#: src/interface/main.c:212 +#: src/libvlc.h:150 msgid "" "This will allow you to add a post-processing filter to enhance the picture " "quality, for instance deinterlacing, or to clone or distort the video window." msgstr "" -#: src/interface/main.c:216 +#: src/libvlc.h:154 msgid "server port" msgstr "" -#: src/interface/main.c:218 +#: src/libvlc.h:156 msgid "This is the port used for UDP streams. By default, we chose 1234." msgstr "" -#: src/interface/main.c:220 +#: src/libvlc.h:158 msgid "enable network channel mode" msgstr "" -#: src/interface/main.c:222 +#: src/libvlc.h:160 msgid "Activate this option if you want to use the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:224 +#: src/libvlc.h:162 msgid "channel server address" msgstr "" -#: src/interface/main.c:226 +#: src/libvlc.h:164 msgid "Indicate here the address of the VideoLAN Channel Server." msgstr "" -#: src/interface/main.c:228 +#: src/libvlc.h:166 msgid "channel server port" msgstr "" -#: src/interface/main.c:230 +#: src/libvlc.h:168 msgid "Indicate here the port on which the VideoLAN Channel Server runs." msgstr "" -#: src/interface/main.c:232 +#: src/libvlc.h:170 msgid "network interface" msgstr "" -#: src/interface/main.c:234 +#: src/libvlc.h:172 msgid "" "If you have several interfaces on your Linux machine and use the VLAN " "solution, you may indicate here which interface to use." msgstr "" -#: src/interface/main.c:237 +#: src/libvlc.h:175 msgid "choose program (SID)" msgstr "" -#: src/interface/main.c:239 +#: src/libvlc.h:177 msgid "Choose the program to select by giving its Service ID." msgstr "" -#: src/interface/main.c:241 +#: src/libvlc.h:179 msgid "choose audio" msgstr "" -#: src/interface/main.c:243 +#: src/libvlc.h:181 msgid "Give the default type of audio you want to use in a DVD." msgstr "" -#: src/interface/main.c:245 +#: src/libvlc.h:183 msgid "choose channel" msgstr "" -#: src/interface/main.c:247 +#: src/libvlc.h:185 msgid "" "Give the stream number of the audio channel you want to use in a DVD (from 1 " "to n)." msgstr "" -#: src/interface/main.c:250 +#: src/libvlc.h:188 msgid "choose subtitles" msgstr "" -#: src/interface/main.c:252 +#: src/libvlc.h:190 msgid "" "Give the stream number of the subtitle channel you want to use in a DVD " "(from 1 to n)." msgstr "" -#: src/interface/main.c:255 +#: src/libvlc.h:193 msgid "DVD device" msgstr "" -#: src/interface/main.c:257 +#: src/libvlc.h:195 msgid "This is the default DVD device to use." msgstr "" -#: src/interface/main.c:259 +#: src/libvlc.h:197 msgid "VCD device" msgstr "" -#: src/interface/main.c:261 +#: src/libvlc.h:199 msgid "This is the default VCD device to use." msgstr "" -#: src/interface/main.c:263 +#: src/libvlc.h:201 msgid "force IPv6" msgstr "" -#: src/interface/main.c:265 +#: src/libvlc.h:203 msgid "" "If you check this box, IPv6 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:268 +#: src/libvlc.h:206 msgid "force IPv4" msgstr "" -#: src/interface/main.c:270 +#: src/libvlc.h:208 msgid "" "If you check this box, IPv4 will be used by default for all UDP and HTTP " "connections." msgstr "" -#: src/interface/main.c:273 +#: src/libvlc.h:211 msgid "choose MPEG audio decoder" msgstr "" -#: src/interface/main.c:275 +#: src/libvlc.h:213 msgid "" "This allows you to select the MPEG audio decoder you want to use. Common " "choices are builtin and mad." msgstr "" -#: src/interface/main.c:278 +#: src/libvlc.h:216 msgid "choose AC3 audio decoder" msgstr "" -#: src/interface/main.c:280 +#: src/libvlc.h:218 msgid "" "This allows you to select the AC3/A52 audio decoder you want to use. Common " "choices are builtin and a52." msgstr "" -#: src/interface/main.c:283 -msgid "disable CPU's MMX support" +#: src/libvlc.h:221 +msgid "enable CPU MMX support" msgstr "" -#: src/interface/main.c:285 +#: src/libvlc.h:223 msgid "" -"If your processor supports the MMX instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the MMX instructions set, vlc can take advantage " +"of them." msgstr "" -#: src/interface/main.c:288 -msgid "disable CPU's 3D Now! support" +#: src/libvlc.h:226 +msgid "enable CPU 3D Now! support" msgstr "" -#: src/interface/main.c:290 +#: src/libvlc.h:228 msgid "" -"If your processor supports the 3D Now! instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the 3D Now! instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:293 -msgid "disable CPU's MMX EXT support" +#: src/libvlc.h:231 +msgid "enable CPU MMX EXT support" msgstr "" -#: src/interface/main.c:295 +#: src/libvlc.h:233 msgid "" -"If your processor supports the MMX EXT instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the MMX EXT instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:298 -msgid "disable CPU's SSE support" +#: src/libvlc.h:236 +msgid "enable CPU SSE support" msgstr "" -#: src/interface/main.c:300 +#: src/libvlc.h:238 msgid "" -"If your processor supports the SSE instructions set but you don't want vlc " -"to use them, you can use this option." +"If your processor supports the SSE instructions set, vlc can take can take " +"advantage of them." msgstr "" -#: src/interface/main.c:303 -msgid "disable CPU's AltiVec support" +#: src/libvlc.h:241 +msgid "enable CPU AltiVec support" msgstr "" -#: src/interface/main.c:305 +#: src/libvlc.h:243 msgid "" -"If your processor supports the AltiVec instructions set but you don't want " -"vlc to use them, you can use this option." +"If your processor supports the AltiVec instructions set, vlc can take " +"advantage of them." msgstr "" -#: src/interface/main.c:308 +#: src/libvlc.h:246 msgid "launch playlist on startup" msgstr "" -#: src/interface/main.c:310 +#: src/libvlc.h:248 msgid "If you want vlc to start playing on startup, then enable this option." msgstr "" -#: src/interface/main.c:312 -msgid "enqueue playlist as default" +#: src/libvlc.h:250 +msgid "enqueue items in playlist" msgstr "" -#: src/interface/main.c:314 +#: src/libvlc.h:252 msgid "" "If you want vlc to add items to the playlist as you open them, then enable " "this option." msgstr "" -#: src/interface/main.c:317 +#: src/libvlc.h:255 msgid "loop playlist on end" msgstr "" -#: src/interface/main.c:319 +#: src/libvlc.h:257 msgid "" "If you want vlc to keep playing the playlist indefinitely then enable this " "option." msgstr "" -#: src/interface/main.c:322 +#: src/libvlc.h:260 msgid "memory copy module" msgstr "" -#: src/interface/main.c:324 +#: src/libvlc.h:262 msgid "" "You can select wich memory copy module you want to use. By default vlc will " "select the fastest one supported by your hardware." msgstr "" -#: src/interface/main.c:327 +#: src/libvlc.h:265 +msgid "access module" +msgstr "" + +#: src/libvlc.h:267 +msgid "This is a legacy entry to let you configure access modules" +msgstr "" + +#: src/libvlc.h:269 +msgid "demux module" +msgstr "" + +#: src/libvlc.h:271 +msgid "This is a legacy entry to let you configure demux modules" +msgstr "" + +#: src/libvlc.h:273 msgid "fast pthread on NT/2K/XP (developpers only)" msgstr "" -#: src/interface/main.c:329 +#: src/libvlc.h:275 msgid "" "On Windows NT/2K/XP we use a slow but correct pthread implementation, you " "can also use this faster implementation but you might experience problems " @@ -473,200 +598,142 @@ msgid "" msgstr "" #. Interface options -#: src/interface/main.c:351 +#: src/libvlc.h:297 msgid "Interface" msgstr "" #. Audio options -#: plugins/directx/directx.c:61 src/interface/main.c:358 +#: src/libvlc.h:305 msgid "Audio" msgstr "" #. Video options -#: plugins/directx/directx.c:58 src/interface/main.c:369 +#: plugins/directx/directx.c:53 src/libvlc.h:315 msgid "Video" msgstr "" #. Input options -#: plugins/satellite/satellite.c:66 src/interface/main.c:382 +#: plugins/satellite/satellite.c:66 src/libvlc.h:328 msgid "Input" msgstr "" #. Decoder options -#: src/interface/main.c:401 +#: src/libvlc.h:347 msgid "Decoders" msgstr "" #. CPU options -#: src/interface/main.c:406 +#: src/libvlc.h:352 msgid "CPU" msgstr "" #. Playlist options -#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1828 -#: plugins/gtk/gnome_interface.c:1852 plugins/gtk/gtk_interface.c:611 -#: plugins/gtk/gtk_interface.c:2105 src/interface/main.c:414 +#: plugins/gtk/gnome_interface.c:506 plugins/gtk/gnome_interface.c:1824 +#: plugins/gtk/gnome_interface.c:1848 plugins/gtk/gtk_interface.c:611 +#: plugins/gtk/gtk_interface.c:2105 src/libvlc.h:360 msgid "Playlist" msgstr "" #. Misc options -#: plugins/a52/a52.c:84 plugins/ac3_adec/ac3_adec.c:77 plugins/dsp/dsp.c:42 -#: plugins/fb/fb.c:72 plugins/ggi/ggi.c:68 plugins/gtk/gnome.c:75 -#: plugins/gtk/gtk.c:74 plugins/mad/mad_adec.c:69 plugins/mga/xmga.c:111 -#: plugins/mpeg_vdec/video_parser.c:101 plugins/x11/x11.c:55 -#: plugins/x11/xvideo.c:65 src/interface/main.c:420 +#: plugins/a52/a52.c:81 plugins/ac3_adec/ac3_adec.c:72 plugins/dsp/dsp.c:81 +#: plugins/dummy/dummy.c:51 plugins/fb/fb.c:70 plugins/filter/deinterlace.c:50 +#: plugins/filter/distort.c:50 plugins/filter/transform.c:51 +#: plugins/filter/wall.c:45 plugins/ggi/ggi.c:64 plugins/gtk/gnome.c:73 +#: plugins/gtk/gtk.c:71 plugins/mad/mad_adec.c:66 plugins/mga/xmga.c:106 +#: plugins/mpeg_vdec/video_parser.c:95 plugins/text/logger.c:86 +#: plugins/win32/win32.cpp:48 plugins/x11/x11.c:55 plugins/x11/xvideo.c:65 +#: src/libvlc.h:366 msgid "Miscellaneous" msgstr "" -#: src/interface/main.c:432 +#: src/libvlc.h:378 msgid "main program" msgstr "" -#: src/interface/main.c:446 +#: src/libvlc.h:390 msgid "print help" msgstr "" -#: src/interface/main.c:448 +#: src/libvlc.h:392 msgid "print detailed help" msgstr "" -#: src/interface/main.c:450 +#: src/libvlc.h:394 msgid "print a list of available modules" msgstr "" -#: src/interface/main.c:452 -msgid "print help on module " +#: src/libvlc.h:396 +msgid "print help on module" msgstr "" -#: src/interface/main.c:455 +#: src/libvlc.h:399 msgid "print version information" msgstr "" -#: src/interface/main.c:603 -msgid "help module" -msgstr "" - -#. Usage -#: src/interface/main.c:627 src/interface/main.c:1077 -#, c-format -msgid "Usage: %s [options] [parameters] [file]...\n" -msgstr "" - -#. print module name -#: src/interface/main.c:964 -#, c-format -msgid "%s module options:\n" +#: src/libvlc.h:401 +msgid "print build information" msgstr "" -#. We could also have "=<" here -#: src/interface/main.c:995 src/misc/configuration.c:743 -msgid "string" -msgstr "" - -#: src/interface/main.c:998 src/misc/configuration.c:727 -msgid "integer" -msgstr "" - -#: src/interface/main.c:1001 src/misc/configuration.c:735 -msgid "float" -msgstr "" - -#: src/interface/main.c:1034 -msgid "" -"\n" -"Playlist items:\n" -" *.mpg, *.vob plain MPEG-1/2 files\n" -" [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]\n" -" DVD device\n" -" [vcd:][device][@[title][,[chapter]]\n" -" VCD device\n" -" udpstream:[@[][:]]\n" -" UDP stream sent by VLS\n" -" vlc:loop loop execution of the playlist\n" -" vlc:pause pause execution of playlist items\n" -" vlc:quit quit VLC" -msgstr "" - -#: src/interface/main.c:1054 src/interface/main.c:1103 -#: src/interface/main.c:1127 -msgid "" -"\n" -"Press the RETURN key to continue..." -msgstr "" - -#: src/interface/main.c:1080 -msgid "[module] [description]" -msgstr "" - -#: src/interface/main.c:1121 -msgid "" -"This program comes with NO WARRANTY, to the extent permitted by law.\n" -"You may redistribute it under the terms of the GNU General Public License;\n" -"see the file named COPYING for details.\n" -"Written by the VideoLAN team at Ecole Centrale, Paris." -msgstr "" - -#: src/misc/configuration.c:727 +#: src/misc/configuration.c:779 msgid "boolean" msgstr "" #. **************************************************************************** #. * Build configuration structure. #. **************************************************************************** -#: plugins/a52/a52.c:75 -msgid "disable A/52 dynamic range compression" +#: plugins/a52/a52.c:72 +msgid "A/52 dynamic range compression" msgstr "" -#: plugins/a52/a52.c:77 +#: plugins/a52/a52.c:74 msgid "" "Dynamic range compression makes the loud sounds softer, and the soft sounds " "louder, so you can more easily listen to the stream in a noisy environment " -"without disturbing anyone.\n" -"If you disable the dynamic range compression the playback will be more " -"adapted to a movie theater or a listening room." +"without disturbing anyone. If you disable the dynamic range compression the " +"playback will be more adapted to a movie theater or a listening room." msgstr "" -#: plugins/a52/a52.c:89 +#: plugins/a52/a52.c:86 msgid "a52 ATSC A/52 aka AC-3 audio decoder module" msgstr "" -#: plugins/aa/aa.c:52 +#: plugins/aa/aa.c:50 msgid "ASCII-art video output module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:79 plugins/downmix/downmix.c:47 +#: plugins/ac3_adec/ac3_adec.c:74 plugins/downmix/downmix.c:47 msgid "AC3 downmix module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:81 plugins/imdct/imdct.c:47 +#: plugins/ac3_adec/ac3_adec.c:76 plugins/imdct/imdct.c:47 msgid "AC3 IMDCT module" msgstr "" -#: plugins/ac3_adec/ac3_adec.c:85 +#: plugins/ac3_adec/ac3_adec.c:80 msgid "software AC3 decoder" msgstr "" -#: plugins/ac3_spdif/ac3_spdif.c:119 +#: plugins/ac3_spdif/ac3_spdif.c:116 msgid "SPDIF pass-through AC3 decoder" msgstr "" -#: plugins/access/file.c:60 +#: plugins/access/file.c:56 msgid "Standard filesystem file reading" msgstr "" -#: plugins/access/http.c:75 +#: plugins/access/http.c:71 msgid "HTTP access plug-in" msgstr "" -#: plugins/access/udp.c:62 +#: plugins/access/udp.c:58 msgid "Raw UDP access plug-in" msgstr "" -#: plugins/alsa/alsa.c:58 +#: plugins/alsa/alsa.c:56 msgid "ALSA audio module" msgstr "" -#: plugins/arts/arts.c:43 +#: plugins/arts/arts.c:65 msgid "aRts audio module" msgstr "" @@ -674,48 +741,48 @@ msgstr "" msgid "BeOS standard API module" msgstr "" -#: plugins/chroma/i420_rgb.c:64 +#: plugins/chroma/i420_rgb.c:62 msgid "I420,IYUV,YV12 to RGB,RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_rgb.c:68 +#: plugins/chroma/i420_rgb.c:66 msgid "MMX I420,IYUV,YV12 to RV15,RV16,RV24,RV32 conversions" msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_yuy2.c:71 -#: plugins/chroma/i422_yuy2.c:70 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_yuy2.c:69 +#: plugins/chroma/i422_yuy2.c:68 msgid "conversions from " msgstr "" -#: plugins/chroma/i420_ymga.c:57 plugins/chroma/i420_ymga.c:60 -#: plugins/chroma/i420_yuy2.c:71 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:70 plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:55 plugins/chroma/i420_ymga.c:58 +#: plugins/chroma/i420_yuy2.c:69 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:68 plugins/chroma/i422_yuy2.c:71 msgid " to " msgstr "" -#: plugins/chroma/i420_ymga.c:60 plugins/chroma/i420_yuy2.c:74 -#: plugins/chroma/i422_yuy2.c:73 +#: plugins/chroma/i420_ymga.c:58 plugins/chroma/i420_yuy2.c:72 +#: plugins/chroma/i422_yuy2.c:71 msgid "MMX conversions from " msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/directx/directx.c:46 -msgid "Disable hardware YUV->RGB conversions" +#: plugins/directx/directx.c:41 +msgid "use hardware YUV->RGB conversions" msgstr "" -#: plugins/directx/directx.c:48 +#: plugins/directx/directx.c:43 msgid "" -"Don't try to use hardware acceleration for YUV->RGB conversions. This option " +"Try to use hardware acceleration for YUV->RGB conversions. This option " "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:50 -msgid "Use video buffers in system memory" +#: plugins/directx/directx.c:45 +msgid "use video buffers in system memory" msgstr "" -#: plugins/directx/directx.c:52 +#: plugins/directx/directx.c:47 msgid "" "Create video buffers in system memory instead of video memory. This isn't " "recommended as usually using video memory allows to benefit from more " @@ -723,7 +790,7 @@ msgid "" "doesn't have any effect when using overlays." msgstr "" -#: plugins/directx/directx.c:65 +#: plugins/directx/directx.c:59 msgid "DirectX extension module" msgstr "" @@ -735,11 +802,11 @@ msgstr "" msgid "SSE AC3 downmix module" msgstr "" -#: plugins/dsp/dsp.c:43 +#: plugins/dsp/dsp.c:82 msgid "OSS dsp device" msgstr "" -#: plugins/dsp/dsp.c:47 +#: plugins/dsp/dsp.c:86 msgid "Linux OSS /dev/dsp module" msgstr "" @@ -756,7 +823,7 @@ msgid "" "instead of trying to improve performances by using the most efficient one." msgstr "" -#: plugins/dummy/dummy.c:56 +#: plugins/dummy/dummy.c:57 msgid "dummy functions module" msgstr "" @@ -784,95 +851,143 @@ msgstr "" msgid "DVDRead input module" msgstr "" -#: plugins/esd/esd.c:44 +#: plugins/esd/esd.c:67 msgid "EsounD audio module" msgstr "" -#: plugins/fb/fb.c:73 +#: plugins/fb/fb.c:71 msgid "framebuffer device" msgstr "" -#: plugins/fb/fb.c:77 +#: plugins/fb/fb.c:75 msgid "Linux console framebuffer module" msgstr "" -#: plugins/filter/deinterlace.c:55 +#: plugins/filter/deinterlace.c:51 +msgid "Deinterlace mode" +msgstr "" + +#: plugins/filter/deinterlace.c:52 +msgid "one of 'bob' and 'blend'" +msgstr "" + +#: plugins/filter/deinterlace.c:56 msgid "deinterlacing module" msgstr "" -#: plugins/filter/distort.c:55 +#: plugins/filter/distort.c:51 +msgid "distort mode" +msgstr "" + +#: plugins/filter/distort.c:52 +msgid "one of \"wave\" and \"ripple\"" +msgstr "" + +#: plugins/filter/distort.c:56 msgid "miscellaneous video effects module" msgstr "" -#: plugins/filter/invert.c:50 +#: plugins/filter/invert.c:48 msgid "invert video module" msgstr "" -#: plugins/filter/transform.c:56 +#: plugins/filter/transform.c:52 +msgid "Transform type" +msgstr "" + +#: plugins/filter/transform.c:53 +msgid "One of '90', '180', '270', 'hflip' and 'vflip'" +msgstr "" + +#: plugins/filter/transform.c:57 msgid "image transformation module" msgstr "" +#: plugins/filter/wall.c:46 +msgid "Number of columns" +msgstr "" + +#: plugins/filter/wall.c:47 +msgid "" +"Select the number of horizontal videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:49 +msgid "Number of rows" +msgstr "" + #: plugins/filter/wall.c:50 +msgid "Select the number of vertical videowindows in which to split the video" +msgstr "" + +#: plugins/filter/wall.c:52 +msgid "Active windows" +msgstr "" + +#: plugins/filter/wall.c:53 +msgid "comma separated list of active windows, defaults to all" +msgstr "" + +#: plugins/filter/wall.c:57 msgid "image wall video module" msgstr "" -#: plugins/fx/scope.c:69 +#: plugins/fx/scope.c:72 msgid "scope effect module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/ggi/ggi.c:62 plugins/mga/xmga.c:105 plugins/x11/x11.c:49 +#: plugins/ggi/ggi.c:58 plugins/mga/xmga.c:100 plugins/x11/x11.c:49 #: plugins/x11/xvideo.c:54 msgid "X11 display name" msgstr "" -#: plugins/ggi/ggi.c:63 plugins/mga/xmga.c:107 plugins/x11/x11.c:51 -#: plugins/x11/xvideo.c:56 +#: plugins/ggi/ggi.c:59 msgid "" "Specify the X11 hardware display you want to use.\n" "By default vlc will use the value of the DISPLAY environment variable." msgstr "" -#: plugins/glide/glide.c:72 +#: plugins/glide/glide.c:69 msgid "3dfx Glide module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/gtk/gnome.c:64 plugins/gtk/gtk.c:65 -msgid "hide tooltips" +#: plugins/gtk/gnome.c:61 plugins/gtk/gtk.c:62 +msgid "show tooltips" msgstr "" -#: plugins/gtk/gnome.c:65 plugins/gtk/gtk.c:66 -msgid "Do not show tooltips for configuration options." +#: plugins/gtk/gnome.c:62 plugins/gtk/gtk.c:63 +msgid "Show tooltips for configuration options." msgstr "" -#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:68 +#: plugins/gtk/gnome.c:67 plugins/gtk/gtk.c:65 msgid "maximum height for the configuration windows" msgstr "" -#: plugins/gtk/gnome.c:71 plugins/gtk/gtk.c:70 +#: plugins/gtk/gnome.c:69 plugins/gtk/gtk.c:67 msgid "" "You can set the maximum height that the configuration windows in the " "preferences menu will occupy." msgstr "" -#: plugins/gtk/gtk.c:82 +#: plugins/gtk/gtk.c:78 msgid "Gtk+ interface module" msgstr "" -#: plugins/gtk/gnome.c:66 -msgid "hide text on toolbar buttons" +#: plugins/gtk/gnome.c:64 +msgid "show text on toolbar buttons" msgstr "" -#: plugins/gtk/gnome.c:67 -msgid "Do not show the text below icons on the toolbar." +#: plugins/gtk/gnome.c:65 +msgid "Show the text below icons on the toolbar." msgstr "" -#: plugins/gtk/gnome.c:85 +#: plugins/gtk/gnome.c:84 msgid "Gnome interface module" msgstr "" @@ -885,35 +1000,35 @@ msgstr "" msgid "_File" msgstr "" -#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:804 +#: plugins/gtk/gnome_interface.c:19 plugins/gtk/gnome_interface.c:800 #: plugins/gtk/gtk_interface.c:153 plugins/gtk/gtk_interface.c:1155 msgid "_Open File..." msgstr "" #: plugins/gtk/gnome_interface.c:20 plugins/gtk/gnome_interface.c:367 -#: plugins/gtk/gnome_interface.c:805 plugins/gtk/gtk_interface.c:161 +#: plugins/gtk/gnome_interface.c:801 plugins/gtk/gtk_interface.c:161 #: plugins/gtk/gtk_interface.c:483 plugins/gtk/gtk_interface.c:1163 msgid "Open a File" msgstr "" -#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:811 +#: plugins/gtk/gnome_interface.c:26 plugins/gtk/gnome_interface.c:807 #: plugins/gtk/gtk_interface.c:168 plugins/gtk/gtk_interface.c:1167 msgid "Open _Disc..." msgstr "" #: plugins/gtk/gnome_interface.c:27 plugins/gtk/gnome_interface.c:379 -#: plugins/gtk/gnome_interface.c:812 plugins/gtk/gtk_interface.c:176 +#: plugins/gtk/gnome_interface.c:808 plugins/gtk/gtk_interface.c:176 #: plugins/gtk/gtk_interface.c:494 plugins/gtk/gtk_interface.c:1175 msgid "Open a DVD or VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:818 +#: plugins/gtk/gnome_interface.c:33 plugins/gtk/gnome_interface.c:814 #: plugins/gtk/gtk_interface.c:183 plugins/gtk/gtk_interface.c:1179 msgid "_Network Stream..." msgstr "" #: plugins/gtk/gnome_interface.c:34 plugins/gtk/gnome_interface.c:391 -#: plugins/gtk/gnome_interface.c:819 plugins/gtk/gtk_interface.c:191 +#: plugins/gtk/gnome_interface.c:815 plugins/gtk/gtk_interface.c:191 #: plugins/gtk/gtk_interface.c:505 plugins/gtk/gtk_interface.c:1187 msgid "Select a Network Stream" msgstr "" @@ -947,7 +1062,7 @@ msgstr "" msgid "Hide the main interface window" msgstr "" -#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:882 +#: plugins/gtk/gnome_interface.c:62 plugins/gtk/gnome_interface.c:878 #: plugins/gtk/gtk_interface.c:271 plugins/gtk/gtk_interface.c:1049 msgid "_Fullscreen" msgstr "" @@ -1004,17 +1119,17 @@ msgstr "" msgid "A_udio" msgstr "" -#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:926 +#: plugins/gtk/gnome_interface.c:119 plugins/gtk/gnome_interface.c:922 #: plugins/gtk/gtk_interface.c:396 msgid "Select audio channel" msgstr "" -#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:932 +#: plugins/gtk/gnome_interface.c:125 plugins/gtk/gnome_interface.c:928 #: plugins/gtk/gtk_interface.c:400 plugins/gtk/gtk_interface.c:1125 msgid "_Subtitles" msgstr "" -#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:933 +#: plugins/gtk/gnome_interface.c:126 plugins/gtk/gnome_interface.c:929 #: plugins/gtk/gtk_interface.c:409 msgid "Select subtitles channel" msgstr "" @@ -1039,14 +1154,14 @@ msgstr "" msgid "About this application" msgstr "" -#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1718 +#: plugins/gtk/gnome_interface.c:366 plugins/gtk/gnome_interface.c:1714 #: plugins/gtk/gtk_interface.c:482 plugins/gtk/gtk_interface.c:2141 #: plugins/gtk/gtk_interface.c:2258 msgid "File" msgstr "" #: plugins/gtk/gnome_interface.c:378 plugins/gtk/gnome_interface.c:581 -#: plugins/gtk/gnome_interface.c:1711 plugins/gtk/gnome_interface.c:2325 +#: plugins/gtk/gnome_interface.c:1707 plugins/gtk/gnome_interface.c:2321 #: plugins/gtk/gtk_interface.c:493 plugins/gtk/gtk_interface.c:680 #: plugins/gtk/gtk_interface.c:2134 msgid "Disc" @@ -1064,7 +1179,7 @@ msgstr "" msgid "Open a Satellite Card" msgstr "" -#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:853 +#: plugins/gtk/gnome_interface.c:416 plugins/gtk/gnome_interface.c:849 #: plugins/gtk/gtk_interface.c:528 plugins/gtk/gtk_interface.c:1004 msgid "Back" msgstr "" @@ -1073,7 +1188,7 @@ msgstr "" msgid "Go Backward" msgstr "" -#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:846 +#: plugins/gtk/gnome_interface.c:429 plugins/gtk/gnome_interface.c:842 #: plugins/gtk/gtk_interface.c:540 plugins/gtk/gtk_interface.c:997 msgid "Stop" msgstr "" @@ -1086,7 +1201,7 @@ msgstr "" msgid "Eject" msgstr "" -#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:832 +#: plugins/gtk/gnome_interface.c:453 plugins/gtk/gnome_interface.c:828 #: plugins/gtk/gtk_interface.c:562 msgid "Play" msgstr "" @@ -1095,7 +1210,7 @@ msgstr "" msgid "Play Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:839 +#: plugins/gtk/gnome_interface.c:465 plugins/gtk/gnome_interface.c:835 #: plugins/gtk/gtk_interface.c:573 plugins/gtk/gtk_interface.c:989 msgid "Pause" msgstr "" @@ -1104,7 +1219,7 @@ msgstr "" msgid "Pause Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:860 +#: plugins/gtk/gnome_interface.c:480 plugins/gtk/gnome_interface.c:856 #: plugins/gtk/gtk_interface.c:587 plugins/gtk/gtk_interface.c:1012 msgid "Slow" msgstr "" @@ -1113,7 +1228,7 @@ msgstr "" msgid "Play Slower" msgstr "" -#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:867 +#: plugins/gtk/gnome_interface.c:493 plugins/gtk/gnome_interface.c:863 #: plugins/gtk/gtk_interface.c:599 plugins/gtk/gtk_interface.c:1020 msgid "Fast" msgstr "" @@ -1126,7 +1241,7 @@ msgstr "" msgid "Open Playlist" msgstr "" -#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:897 +#: plugins/gtk/gnome_interface.c:518 plugins/gtk/gnome_interface.c:893 #: plugins/gtk/gtk_interface.c:622 plugins/gtk/gtk_interface.c:708 #: plugins/gtk/gtk_interface.c:752 plugins/gtk/gtk_interface.c:1073 msgid "Prev" @@ -1136,7 +1251,7 @@ msgstr "" msgid "Previous File" msgstr "" -#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:890 +#: plugins/gtk/gnome_interface.c:530 plugins/gtk/gnome_interface.c:886 #: plugins/gtk/gtk_interface.c:633 plugins/gtk/gtk_interface.c:716 #: plugins/gtk/gtk_interface.c:760 plugins/gtk/gtk_interface.c:1066 msgid "Next" @@ -1146,27 +1261,15 @@ msgstr "" msgid "Next File" msgstr "" -#: plugins/gtk/gnome_interface.c:545 plugins/gtk/gtk_interface.c:641 -msgid "-:--:--" -msgstr "" - #: plugins/gtk/gnome_interface.c:595 plugins/gtk/gtk_interface.c:694 msgid "Title:" msgstr "" -#: plugins/gtk/gnome_interface.c:602 plugins/gtk/gtk_interface.c:701 -msgid "--" -msgstr "" - -#: plugins/gtk/gnome_interface.c:640 plugins/gtk/gtk_interface.c:738 +#: plugins/gtk/gnome_interface.c:638 plugins/gtk/gtk_interface.c:738 msgid "Chapter:" msgstr "" -#: plugins/gtk/gnome_interface.c:647 plugins/gtk/gtk_interface.c:745 -msgid "---" -msgstr "" - -#: plugins/gtk/gnome_interface.c:678 plugins/gtk/gtk_interface.c:775 +#: plugins/gtk/gnome_interface.c:674 plugins/gtk/gtk_interface.c:775 msgid "No server" msgstr "" @@ -1174,7 +1277,7 @@ msgstr "" msgid "Channel:" msgstr "" -#: plugins/gtk/gnome_interface.c:707 plugins/gtk/gtk_interface.c:804 +#: plugins/gtk/gnome_interface.c:703 plugins/gtk/gtk_interface.c:804 msgid "Go!" msgstr "" @@ -1182,28 +1285,28 @@ msgstr "" msgid "_Play" msgstr "" -#: plugins/gtk/gnome_interface.c:875 plugins/gtk/gtk_interface.c:1038 +#: plugins/gtk/gnome_interface.c:871 plugins/gtk/gtk_interface.c:1038 msgid "Toggle _Interface" msgstr "" -#: plugins/gtk/gnome_interface.c:904 plugins/gtk/gtk_interface.c:1082 +#: plugins/gtk/gnome_interface.c:900 plugins/gtk/gtk_interface.c:1082 msgid "_Jump..." msgstr "" -#: plugins/gtk/gnome_interface.c:911 plugins/gtk/gtk_interface.c:1091 +#: plugins/gtk/gnome_interface.c:907 plugins/gtk/gtk_interface.c:1091 msgid "Program" msgstr "" -#: plugins/gtk/gnome_interface.c:918 plugins/gtk/gtk_interface.c:1101 +#: plugins/gtk/gnome_interface.c:914 plugins/gtk/gtk_interface.c:1101 msgid "_Navigation" msgstr "" -#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:925 +#: plugins/gtk/gnome_interface.c:118 plugins/gtk/gnome_interface.c:921 #: plugins/gtk/gtk_interface.c:1113 msgid "_Audio" msgstr "" -#: plugins/gtk/gnome_interface.c:941 plugins/gtk/gtk_interface.c:1208 +#: plugins/gtk/gnome_interface.c:937 plugins/gtk/gtk_interface.c:1208 msgid "Playlist..." msgstr "" @@ -1211,7 +1314,7 @@ msgstr "" msgid "About" msgstr "" -#: plugins/gtk/gnome_interface.c:1122 plugins/gtk/gtk_interface.c:1345 +#: plugins/gtk/gnome_interface.c:1118 plugins/gtk/gtk_interface.c:1345 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team" msgstr "" @@ -1225,7 +1328,7 @@ msgid "" "http://www.videolan.org/" msgstr "" -#: plugins/gtk/gnome_interface.c:1124 plugins/gtk/gtk_interface.c:1371 +#: plugins/gtk/gnome_interface.c:1120 plugins/gtk/gtk_interface.c:1371 msgid "" "This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and " "MPEG 2 files from a file or from a network source." @@ -1234,7 +1337,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1386 plugins/gtk/gtk_interface.c:1609 #: plugins/gtk/gtk_interface.c:1915 plugins/gtk/gtk_interface.c:2046 #: plugins/gtk/gtk_interface.c:2277 plugins/gtk/gtk_interface.c:2383 -#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:522 +#: plugins/gtk/gtk_interface.c:2589 plugins/gtk/gtk_preferences.c:526 msgid "OK" msgstr "" @@ -1242,39 +1345,39 @@ msgstr "" msgid "Select File" msgstr "" -#: plugins/gtk/gnome_interface.c:1249 plugins/gtk/gtk_interface.c:1464 +#: plugins/gtk/gnome_interface.c:1245 plugins/gtk/gtk_interface.c:1464 msgid "Open Disc" msgstr "" -#: plugins/gtk/gnome_interface.c:1265 plugins/gtk/gnome_interface.c:2215 +#: plugins/gtk/gnome_interface.c:1261 plugins/gtk/gnome_interface.c:2211 #: plugins/gtk/gtk_interface.c:1488 msgid "Disc type" msgstr "" -#: plugins/gtk/gnome_interface.c:1279 plugins/gtk/gnome_interface.c:2230 +#: plugins/gtk/gnome_interface.c:1275 plugins/gtk/gnome_interface.c:2226 #: plugins/gtk/gtk_interface.c:1502 msgid "DVD" msgstr "" -#: plugins/gtk/gnome_interface.c:1287 plugins/gtk/gnome_interface.c:2238 +#: plugins/gtk/gnome_interface.c:1283 plugins/gtk/gnome_interface.c:2234 #: plugins/gtk/gtk_interface.c:1510 msgid "VCD" msgstr "" -#: plugins/gtk/gnome_interface.c:1295 plugins/gtk/gnome_interface.c:2246 +#: plugins/gtk/gnome_interface.c:1291 plugins/gtk/gnome_interface.c:2242 #: plugins/gtk/gtk_interface.c:1518 msgid "Starting position" msgstr "" -#: plugins/gtk/gnome_interface.c:1322 plugins/gtk/gnome_interface.c:2273 -#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:796 -#: plugins/gtk/gtk_menu.c:931 +#: plugins/gtk/gnome_interface.c:1318 plugins/gtk/gnome_interface.c:2269 +#: plugins/gtk/gtk_interface.c:1555 plugins/gtk/gtk_menu.c:787 +#: plugins/gtk/gtk_menu.c:922 msgid "Chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:1312 plugins/gtk/gnome_interface.c:2263 -#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:901 -#: plugins/gtk/gtk_menu.c:922 +#: plugins/gtk/gnome_interface.c:1308 plugins/gtk/gnome_interface.c:2259 +#: plugins/gtk/gtk_interface.c:1565 plugins/gtk/gtk_menu.c:892 +#: plugins/gtk/gtk_menu.c:913 msgid "Title" msgstr "" @@ -1284,7 +1387,7 @@ msgstr "" #: plugins/gtk/gtk_interface.c:1616 plugins/gtk/gtk_interface.c:1922 #: plugins/gtk/gtk_interface.c:2053 plugins/gtk/gtk_interface.c:2284 -#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:534 +#: plugins/gtk/gtk_interface.c:2596 plugins/gtk/gtk_preferences.c:538 msgid "Cancel" msgstr "" @@ -1292,41 +1395,41 @@ msgstr "" msgid "Open Network" msgstr "" -#: plugins/gtk/gnome_interface.c:1455 plugins/gtk/gtk_interface.c:1694 +#: plugins/gtk/gnome_interface.c:1451 plugins/gtk/gtk_interface.c:1694 msgid "Network mode" msgstr "" -#: plugins/gtk/gnome_interface.c:1471 plugins/gtk/gtk_interface.c:1710 +#: plugins/gtk/gnome_interface.c:1467 plugins/gtk/gtk_interface.c:1710 msgid "UDP" msgstr "" -#: plugins/gtk/gnome_interface.c:1481 plugins/gtk/gtk_interface.c:1720 +#: plugins/gtk/gnome_interface.c:1477 plugins/gtk/gtk_interface.c:1720 msgid "UDP Multicast" msgstr "" -#: plugins/gtk/gnome_interface.c:1491 plugins/gtk/gtk_interface.c:1730 +#: plugins/gtk/gnome_interface.c:1487 plugins/gtk/gtk_interface.c:1730 msgid "Channel server " msgstr "" -#: plugins/gtk/gnome_interface.c:1501 plugins/gtk/gnome_interface.c:2370 +#: plugins/gtk/gnome_interface.c:1497 plugins/gtk/gnome_interface.c:2366 #: plugins/gtk/gtk_interface.c:1740 msgid "HTTP" msgstr "" -#: plugins/gtk/gnome_interface.c:1511 plugins/gtk/gnome_interface.c:1597 -#: plugins/gtk/gnome_interface.c:1609 plugins/gtk/gnome_interface.c:2420 -#: plugins/gtk/gnome_interface.c:2525 plugins/gtk/gtk_interface.c:1750 +#: plugins/gtk/gnome_interface.c:1507 plugins/gtk/gnome_interface.c:1593 +#: plugins/gtk/gnome_interface.c:1605 plugins/gtk/gnome_interface.c:2416 +#: plugins/gtk/gnome_interface.c:2521 plugins/gtk/gtk_interface.c:1750 #: plugins/gtk/gtk_interface.c:1836 plugins/gtk/gtk_interface.c:1848 msgid "Port" msgstr "" -#: plugins/gtk/gnome_interface.c:1521 plugins/gtk/gnome_interface.c:1533 -#: plugins/gtk/gnome_interface.c:2410 plugins/gtk/gtk_interface.c:1760 +#: plugins/gtk/gnome_interface.c:1517 plugins/gtk/gnome_interface.c:1529 +#: plugins/gtk/gnome_interface.c:2406 plugins/gtk/gtk_interface.c:1760 #: plugins/gtk/gtk_interface.c:1772 msgid "Address" msgstr "" -#: plugins/gtk/gnome_interface.c:1543 plugins/gtk/gtk_interface.c:1782 +#: plugins/gtk/gnome_interface.c:1539 plugins/gtk/gtk_interface.c:1782 msgid "URL" msgstr "" @@ -1338,37 +1441,37 @@ msgstr "" msgid "Go to:" msgstr "" -#: plugins/gtk/gnome_interface.c:2047 plugins/gtk/gtk_interface.c:1996 +#: plugins/gtk/gnome_interface.c:2043 plugins/gtk/gtk_interface.c:1996 msgid "s." msgstr "" -#: plugins/gtk/gnome_interface.c:2062 plugins/gtk/gtk_interface.c:2011 +#: plugins/gtk/gnome_interface.c:2058 plugins/gtk/gtk_interface.c:2011 msgid "m:" msgstr "" -#: plugins/gtk/gnome_interface.c:2077 plugins/gtk/gtk_interface.c:2026 +#: plugins/gtk/gnome_interface.c:2073 plugins/gtk/gtk_interface.c:2026 msgid "h:" msgstr "" -#: plugins/gtk/gnome_interface.c:1789 plugins/gtk/gtk_interface.c:2120 +#: plugins/gtk/gnome_interface.c:1785 plugins/gtk/gtk_interface.c:2120 msgid "Add" msgstr "" -#: plugins/gtk/gnome_interface.c:1725 plugins/gtk/gnome_interface.c:2540 +#: plugins/gtk/gnome_interface.c:1721 plugins/gtk/gnome_interface.c:2536 #: plugins/gtk/gtk_interface.c:2148 msgid "Network" msgstr "" -#: plugins/gtk/gnome_interface.c:1732 plugins/gtk/gnome_interface.c:1871 +#: plugins/gtk/gnome_interface.c:1728 plugins/gtk/gnome_interface.c:1867 #: plugins/gtk/gtk_interface.c:2155 msgid "Url" msgstr "" -#: plugins/gtk/gnome_interface.c:1796 plugins/gtk/gtk_interface.c:2162 +#: plugins/gtk/gnome_interface.c:1792 plugins/gtk/gtk_interface.c:2162 msgid "Delete" msgstr "" -#: plugins/gtk/gnome_interface.c:1744 plugins/gtk/gtk_interface.c:2176 +#: plugins/gtk/gnome_interface.c:1740 plugins/gtk/gtk_interface.c:2176 msgid "All" msgstr "" @@ -1376,7 +1479,7 @@ msgstr "" msgid "Selected" msgstr "" -#: plugins/gtk/gnome_interface.c:1803 plugins/gtk/gtk_interface.c:2190 +#: plugins/gtk/gnome_interface.c:1799 plugins/gtk/gtk_interface.c:2190 msgid "Selection" msgstr "" @@ -1392,71 +1495,46 @@ msgstr "" msgid "_Select" msgstr "" -#: plugins/gtk/gnome_interface.c:1878 plugins/gtk/gtk_interface.c:2265 +#: plugins/gtk/gnome_interface.c:1874 plugins/gtk/gtk_interface.c:2265 msgid "Duration" msgstr "" -#: plugins/gtk/gnome_interface.c:2582 plugins/gtk/gtk_interface.c:2355 +#: plugins/gtk/gnome_interface.c:2578 plugins/gtk/gtk_interface.c:2355 msgid "Messages" msgstr "" -#: plugins/gtk/gnome_interface.c:2660 plugins/gtk/gtk_interface.c:2432 +#: plugins/gtk/gnome_interface.c:2656 plugins/gtk/gtk_interface.c:2432 msgid "Open Satellite Card" msgstr "" -#: plugins/gtk/gnome_interface.c:2676 plugins/gtk/gtk_interface.c:2456 +#: plugins/gtk/gnome_interface.c:2672 plugins/gtk/gtk_interface.c:2456 msgid "Transponder settings" msgstr "" -#: plugins/gtk/gnome_interface.c:2744 plugins/gtk/gtk_interface.c:2493 +#: plugins/gtk/gnome_interface.c:2740 plugins/gtk/gtk_interface.c:2493 msgid "Symbol Rate" msgstr "" -#: plugins/gtk/gnome_interface.c:2693 plugins/gtk/gtk_interface.c:2503 +#: plugins/gtk/gnome_interface.c:2689 plugins/gtk/gtk_interface.c:2503 msgid "Frequency" msgstr "" -#: plugins/gtk/gnome_interface.c:2713 plugins/gtk/gtk_interface.c:2513 +#: plugins/gtk/gnome_interface.c:2709 plugins/gtk/gtk_interface.c:2513 msgid "Polarization" msgstr "" -#: plugins/gtk/gnome_interface.c:2733 plugins/gtk/gtk_interface.c:2523 +#: plugins/gtk/gnome_interface.c:2729 plugins/gtk/gtk_interface.c:2523 msgid "Vertical" msgstr "" -#: plugins/gtk/gnome_interface.c:2723 plugins/gtk/gtk_interface.c:2533 +#: plugins/gtk/gnome_interface.c:2719 plugins/gtk/gtk_interface.c:2533 msgid "Horizontal" msgstr "" -#: plugins/gtk/gnome_interface.c:2764 plugins/gtk/gtk_interface.c:2543 +#: plugins/gtk/gnome_interface.c:2760 plugins/gtk/gtk_interface.c:2543 msgid "FEC" msgstr "" -#: plugins/gtk/gnome_interface.c:2782 plugins/gtk/gtk_interface.c:2561 -msgid "1/2" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2783 plugins/gtk/gtk_interface.c:2562 -msgid "2/3" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2784 plugins/gtk/gnome_interface.c:2797 -#: plugins/gtk/gtk_interface.c:2563 plugins/gtk/gtk_interface.c:2575 -msgid "3/4" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2785 plugins/gtk/gtk_interface.c:2564 -msgid "4/5" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2786 plugins/gtk/gtk_interface.c:2565 -msgid "5/6" -msgstr "" - -#: plugins/gtk/gnome_interface.c:2788 plugins/gtk/gtk_interface.c:2566 -msgid "7/8" -msgstr "" - #: plugins/gtk/gnome_interface.c:78 msgid "Choose title" msgstr "" @@ -1469,148 +1547,144 @@ msgstr "" msgid "Select previous title" msgstr "" -#: plugins/gtk/gnome_interface.c:660 +#: plugins/gtk/gnome_interface.c:658 msgid "Select previous chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:669 +#: plugins/gtk/gnome_interface.c:666 msgid "Select next chapter" msgstr "" -#: plugins/gtk/gnome_interface.c:692 +#: plugins/gtk/gnome_interface.c:688 msgid "Network Channel:" msgstr "" -#: plugins/gtk/gnome_interface.c:883 +#: plugins/gtk/gnome_interface.c:879 msgid "Toggle fullscreen mode" msgstr "" -#: plugins/gtk/gnome_interface.c:905 +#: plugins/gtk/gnome_interface.c:901 msgid "Got directly so specified point" msgstr "" -#: plugins/gtk/gnome_interface.c:912 +#: plugins/gtk/gnome_interface.c:908 msgid "Switch program" msgstr "" -#: plugins/gtk/gnome_interface.c:919 +#: plugins/gtk/gnome_interface.c:915 msgid "Navigate through titles and chapters" msgstr "" -#: plugins/gtk/gnome_interface.c:1138 +#: plugins/gtk/gnome_interface.c:1134 msgid "Open File" msgstr "" -#: plugins/gtk/gnome_interface.c:1175 +#: plugins/gtk/gnome_interface.c:1171 msgid "Modules" msgstr "" -#: plugins/gtk/gnome_interface.c:1183 +#: plugins/gtk/gnome_interface.c:1179 msgid "" "Sorry, the module manager isn't functional yet. Please retry in a later " "version." msgstr "" -#: plugins/gtk/gnome_interface.c:1359 plugins/gtk/gnome_interface.c:2310 +#: plugins/gtk/gnome_interface.c:1355 plugins/gtk/gnome_interface.c:2306 msgid "Device name:" msgstr "" -#: plugins/gtk/gnome_interface.c:1446 +#: plugins/gtk/gnome_interface.c:1442 msgid "Network Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:1751 +#: plugins/gtk/gnome_interface.c:1747 msgid "Item" msgstr "" -#: plugins/gtk/gnome_interface.c:1763 +#: plugins/gtk/gnome_interface.c:1759 msgid "Crop" msgstr "" -#: plugins/gtk/gnome_interface.c:1770 +#: plugins/gtk/gnome_interface.c:1766 msgid "Invert" msgstr "" -#: plugins/gtk/gnome_interface.c:1777 plugins/gtk/gtk_preferences.c:360 +#: plugins/gtk/gnome_interface.c:1773 plugins/gtk/gtk_preferences.c:364 msgid "Select" msgstr "" -#: plugins/gtk/gnome_interface.c:2030 +#: plugins/gtk/gnome_interface.c:2026 msgid "Jump to: " msgstr "" -#: plugins/gtk/gnome_interface.c:2184 +#: plugins/gtk/gnome_interface.c:2180 msgid "Open Stream" msgstr "" -#: plugins/gtk/gnome_interface.c:2347 +#: plugins/gtk/gnome_interface.c:2343 msgid "Protocol" msgstr "" -#: plugins/gtk/gnome_interface.c:2362 +#: plugins/gtk/gnome_interface.c:2358 msgid "UDP stream" msgstr "" -#: plugins/gtk/gnome_interface.c:2378 +#: plugins/gtk/gnome_interface.c:2374 msgid "RTP" msgstr "" -#: plugins/gtk/gnome_interface.c:2386 +#: plugins/gtk/gnome_interface.c:2382 msgid "Server" msgstr "" -#: plugins/gtk/gnome_interface.c:2455 plugins/gtk/gnome_interface.c:2470 +#: plugins/gtk/gnome_interface.c:2451 plugins/gtk/gnome_interface.c:2466 msgid "Broadcast" msgstr "" -#: plugins/gtk/gnome_interface.c:2490 +#: plugins/gtk/gnome_interface.c:2486 msgid "Channels" msgstr "" -#: plugins/gtk/gnome_interface.c:2505 +#: plugins/gtk/gnome_interface.c:2501 msgid "Channel server" msgstr "" -#: plugins/gtk/gnome_interface.c:2787 -msgid "6/7" -msgstr "" - -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Name" msgstr "" -#: plugins/gtk/gtk_preferences.c:306 +#: plugins/gtk/gtk_preferences.c:310 msgid "Description" msgstr "" -#: plugins/gtk/gtk_preferences.c:349 +#: plugins/gtk/gtk_preferences.c:353 msgid "Configure" msgstr "" #. add new label -#: plugins/gtk/gtk_preferences.c:372 +#: plugins/gtk/gtk_preferences.c:376 msgid "Selected:" msgstr "" -#: plugins/gtk/gtk_preferences.c:513 plugins/gtk/gtk_preferences.c:530 +#: plugins/gtk/gtk_preferences.c:517 plugins/gtk/gtk_preferences.c:534 msgid "Save" msgstr "" -#: plugins/gtk/gtk_preferences.c:526 +#: plugins/gtk/gtk_preferences.c:530 msgid "Apply" msgstr "" #. special case for "off" item -#: plugins/gtk/gtk_menu.c:522 +#: plugins/gtk/gtk_menu.c:513 msgid "None" msgstr "" -#: plugins/gtk/gtk_menu.c:681 +#: plugins/gtk/gtk_menu.c:672 #, c-format msgid "Title %d (%d)" msgstr "" -#: plugins/gtk/gtk_menu.c:744 +#: plugins/gtk/gtk_menu.c:735 #, c-format msgid "Chapter %d" msgstr "" @@ -1618,12 +1692,12 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:74 +#: plugins/idct/idct.c:47 plugins/mpeg_vdec/video_parser.c:70 msgid "IDCT module" msgstr "" #: plugins/idct/idctaltivec.c:49 -msgid "Altivec IDCT module" +msgid "AltiVec IDCT module" msgstr "" #: plugins/idct/idctclassic.c:47 @@ -1650,11 +1724,11 @@ msgstr "" msgid "KDE interface module" msgstr "" -#: plugins/lirc/lirc.c:71 +#: plugins/lirc/lirc.c:64 msgid "infrared remote control module" msgstr "" -#: plugins/lpcm_adec/lpcm_adec.c:71 +#: plugins/lpcm_adec/lpcm_adec.c:67 msgid "linear PCM audio decoder" msgstr "" @@ -1665,17 +1739,17 @@ msgstr "" #. **************************************************************************** #. * Build configuration tree. #. **************************************************************************** -#: plugins/mad/mad_adec.c:63 +#: plugins/mad/mad_adec.c:60 msgid "Mad audio downscale routine (fast,mp321)" msgstr "" -#: plugins/mad/mad_adec.c:65 +#: plugins/mad/mad_adec.c:62 msgid "" -"Specify the mad audio downscale routine you want to use.\n" -"By default mad plugins will use the fastest routine." +"Specify the mad audio downscale routine you want to use. By default the mad " +"plugin will use the fastest routine." msgstr "" -#: plugins/mad/mad_adec.c:74 +#: plugins/mad/mad_adec.c:71 msgid "libmad MPEG 1/2/3 audio decoder library" msgstr "" @@ -1683,15 +1757,15 @@ msgstr "" msgid "libc memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:72 +#: plugins/memcpy/memcpy.c:71 msgid "3D Now! memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:80 +#: plugins/memcpy/memcpy.c:79 msgid "MMX memcpy module" msgstr "" -#: plugins/memcpy/memcpy.c:86 +#: plugins/memcpy/memcpy.c:85 msgid "MMX EXT memcpy module" msgstr "" @@ -1699,18 +1773,18 @@ msgstr "" msgid "AltiVec memcpy module" msgstr "" -#: plugins/mga/mga.c:67 +#: plugins/mga/mga.c:65 msgid "Matrox Graphic Array video module" msgstr "" #. **************************************************************************** #. * Building configuration tree #. **************************************************************************** -#: plugins/mga/xmga.c:96 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 +#: plugins/mga/xmga.c:91 plugins/x11/x11.c:40 plugins/x11/xvideo.c:45 msgid "alternate fullscreen method" msgstr "" -#: plugins/mga/xmga.c:98 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 +#: plugins/mga/xmga.c:93 plugins/x11/x11.c:42 plugins/x11/xvideo.c:47 msgid "" "There are two ways to make a fullscreen window, unfortunately each one has " "its drawbacks.\n" @@ -1720,11 +1794,17 @@ msgid "" "show on top of the video." msgstr "" -#: plugins/mga/xmga.c:117 +#: plugins/mga/xmga.c:102 plugins/x11/x11.c:51 plugins/x11/xvideo.c:56 +msgid "" +"Specify the X11 hardware display you want to use. By default vlc will use " +"the value of the DISPLAY environment variable." +msgstr "" + +#: plugins/mga/xmga.c:112 msgid "X11 MGA module" msgstr "" -#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:81 +#: plugins/motion/motion.c:45 plugins/mpeg_vdec/video_parser.c:76 msgid "motion compensation module" msgstr "" @@ -1744,57 +1824,54 @@ msgstr "" msgid "MMXEXT motion compensation module" msgstr "" -#: plugins/mpeg_adec/mpeg_adec.c:69 +#: plugins/mpeg_adec/mpeg_adec.c:66 msgid "MPEG I/II layer 1/2 audio decoder" msgstr "" -#: plugins/mpeg_system/mpeg_es.c:61 +#: plugins/mpeg_system/mpeg_es.c:57 msgid "ISO 13818-2 MPEG Elementary Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ps.c:60 +#: plugins/mpeg_system/mpeg_ps.c:56 msgid "ISO 13818-1 MPEG Program Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:86 +#: plugins/mpeg_system/mpeg_ts.c:79 msgid "ISO 13818-1 MPEG Transport Stream input" msgstr "" -#: plugins/mpeg_system/mpeg_ts.c:90 +#: plugins/mpeg_system/mpeg_ts.c:83 msgid "ISO 13818-1 MPEG Transport Stream input (libdvbpsi)" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:76 +#: plugins/mpeg_vdec/video_parser.c:72 msgid "" -"This option allows you to select the IDCT module used by this video " -"decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"This option allows you to select the IDCT module used by this video decoder. " +"The default behavior is to automatically select the best module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:83 +#: plugins/mpeg_vdec/video_parser.c:78 msgid "" "This option allows you to select the motion compensation module used by this " -"video decoder.\n" -"Note that the default behavior is to automatically select the best module " -"available." +"video decoder. The default behavior is to automatically select the best " +"module available." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:88 +#: plugins/mpeg_vdec/video_parser.c:82 msgid "use additional processors" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:90 +#: plugins/mpeg_vdec/video_parser.c:84 msgid "" "This video decoder can benefit from a multiprocessor computer. If you have " "one, you can specify the number of processors here." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:93 +#: plugins/mpeg_vdec/video_parser.c:87 msgid "force synchro algorithm {I|I+|IP|IP+|IPB}" msgstr "" -#: plugins/mpeg_vdec/video_parser.c:95 +#: plugins/mpeg_vdec/video_parser.c:89 msgid "" "This allows you to force the synchro algorithm, by directly selecting the " "types of picture you want to decode. Please bear in mind that if you select " @@ -1802,7 +1879,7 @@ msgid "" "anything." msgstr "" -#: plugins/mpeg_vdec/video_parser.c:112 +#: plugins/mpeg_vdec/video_parser.c:106 msgid "MPEG I/II video decoder module" msgstr "" @@ -1814,7 +1891,7 @@ msgstr "" msgid "IPv6 network abstraction layer" msgstr "" -#: plugins/qnx/qnx.c:47 +#: plugins/qnx/qnx.c:44 msgid "QNX RTOS module" msgstr "" @@ -1861,29 +1938,46 @@ msgstr "" msgid "satellite input module" msgstr "" -#: plugins/sdl/sdl.c:52 +#: plugins/sdl/sdl.c:47 msgid "Simple DirectMedia Layer module" msgstr "" -#: plugins/spudec/spu_decoder.c:80 +#: plugins/spudec/spu_decoder.c:76 msgid "DVD subtitles decoder module" msgstr "" -#: plugins/text/logger.c:67 +#: plugins/text/logger.c:87 +msgid "log filename" +msgstr "" + +#: plugins/text/logger.c:87 +msgid "Specify the log filename." +msgstr "" + +#: plugins/text/logger.c:88 +msgid "log format" +msgstr "" + +#: plugins/text/logger.c:88 +msgid "" +"Specify the log format. Available choices are \"text\" (default) and \"html\"" +msgstr "" + +#: plugins/text/logger.c:92 msgid "file logging interface module" msgstr "" -#: plugins/text/logger.c:103 +#: plugins/text/logger.c:127 msgid "" "\n" "Using the logger interface plugin..." msgstr "" -#: plugins/text/ncurses.c:79 +#: plugins/text/ncurses.c:70 msgid "ncurses interface module" msgstr "" -#: plugins/text/rc.c:84 +#: plugins/text/rc.c:76 msgid "remote control interface module" msgstr "" @@ -1891,11 +1985,24 @@ msgstr "" msgid "VCD input module" msgstr "" -#: plugins/win32/waveout.c:51 +#: plugins/win32/waveout.c:60 msgid "Win32 waveOut extension module" msgstr "" -#: plugins/win32/win32.cpp:45 +#. **************************************************************************** +#. * Build configuration tree. +#. **************************************************************************** +#: plugins/win32/win32.cpp:42 +msgid "maximum number of lines in the log window" +msgstr "" + +#: plugins/win32/win32.cpp:44 +msgid "" +"You can set the maximum number of lines that the log window will display. " +"Enter -1 if you want to keep all messages." +msgstr "" + +#: plugins/win32/win32.cpp:53 msgid "Win32 interface module" msgstr "" diff --git a/src/audio_output/aout_ext-dec.c b/src/audio_output/aout_ext-dec.c index 69cec97084..b867b44742 100644 --- a/src/audio_output/aout_ext-dec.c +++ b/src/audio_output/aout_ext-dec.c @@ -2,7 +2,7 @@ * aout_ext-dec.c : exported fifo management functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: aout_ext-dec.c,v 1.15 2002/05/18 15:51:37 gbazin Exp $ + * $Id: aout_ext-dec.c,v 1.16 2002/06/01 12:32:01 sam Exp $ * * Authors: Michel Kaempf * Cyril Deguet @@ -25,68 +25,53 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ #include -#include +#include #include "audio_output.h" /***************************************************************************** * aout_CreateFifo *****************************************************************************/ -aout_fifo_t * aout_CreateFifo( int i_format, int i_channels, int i_rate, - int i_frame_size, void *p_buffer ) +aout_fifo_t * aout_CreateFifo( vlc_object_t *p_this, int i_format, + int i_channels, int i_rate, int i_frame_size, + void *p_buffer ) { aout_thread_t *p_aout; aout_fifo_t *p_fifo = NULL; int i_index; /* Spawn an audio output if there is none */ - vlc_mutex_lock( &p_aout_bank->lock ); + p_aout = vlc_object_find( p_this->p_vlc, VLC_OBJECT_AOUT, FIND_CHILD ); - if( p_aout_bank->i_count == 0 ) + if( p_aout ) { - intf_WarnMsg( 1, "aout: no aout present, spawning one" ); - - p_aout = aout_CreateThread( NULL, i_channels, i_rate ); - - /* Everything failed */ - if( p_aout == NULL ) + if( p_aout->fifo[0].i_format != i_format ) { - vlc_mutex_unlock( &p_aout_bank->lock ); - return NULL; + msg_Dbg( p_this, "changing aout type" ); + vlc_object_unlink_all( p_aout ); + vlc_object_release( p_aout ); + aout_DestroyThread( p_aout ); + p_aout = NULL; } - - p_aout_bank->pp_aout[ p_aout_bank->i_count ] = p_aout; - p_aout_bank->i_count++; } - /* temporary hack to switch output type (mainly for spdif) - * FIXME: to be adapted when several output are available */ - else if( p_aout_bank->pp_aout[0]->fifo[0].i_format != i_format ) - { - intf_WarnMsg( 1, "aout: changing aout type" ); - aout_DestroyThread( p_aout_bank->pp_aout[0], NULL ); - - p_aout = aout_CreateThread( NULL, i_channels, i_rate ); + if( p_aout == NULL ) + { + msg_Dbg( p_this, "no aout present, spawning one" ); + p_aout = aout_CreateThread( p_this, i_channels, i_rate ); /* Everything failed */ if( p_aout == NULL ) { - vlc_mutex_unlock( &p_aout_bank->lock ); return NULL; } - - p_aout_bank->pp_aout[0] = p_aout; - } - else - { - /* Take the first audio output FIXME: take the best one */ - p_aout = p_aout_bank->pp_aout[ 0 ]; } + /* temporary hack to switch output type (mainly for spdif) + * FIXME: to be adapted when several output are available */ /* Take the fifos lock */ vlc_mutex_lock( &p_aout->fifos_lock ); @@ -103,10 +88,9 @@ aout_fifo_t * aout_CreateFifo( int i_format, int i_channels, int i_rate, if( p_fifo == NULL ) { - intf_ErrMsg( "aout error: no fifo available" ); + msg_Err( p_aout, "no fifo available" ); vlc_mutex_unlock( &p_aout->fifos_lock ); - vlc_mutex_unlock( &p_aout_bank->lock ); - return( NULL ); + return NULL; } /* Initialize the new fifo structure */ @@ -132,11 +116,10 @@ aout_fifo_t * aout_CreateFifo( int i_format, int i_channels, int i_rate, * ( AOUT_FIFO_SIZE + 1 ) ); if ( p_fifo->date == NULL ) { - intf_ErrMsg( "aout error: cannot create fifo data" ); + msg_Err( p_aout, "out of memory" ); p_fifo->i_format = AOUT_FIFO_NONE; vlc_mutex_unlock( &p_aout->fifos_lock ); - vlc_mutex_unlock( &p_aout_bank->lock ); - return( NULL ); + return NULL; } p_fifo->buffer = (u8 *)p_fifo->date + sizeof(mtime_t) @@ -157,24 +140,21 @@ aout_fifo_t * aout_CreateFifo( int i_format, int i_channels, int i_rate, break; default: - intf_ErrMsg( "aout error: unknown fifo type 0x%x", - p_fifo->i_format ); + msg_Err( p_aout, "unknown fifo type 0x%x", p_fifo->i_format ); p_fifo->i_format = AOUT_FIFO_NONE; vlc_mutex_unlock( &p_aout->fifos_lock ); - vlc_mutex_unlock( &p_aout_bank->lock ); - return( NULL ); + return NULL; } /* Release the fifos lock */ vlc_mutex_unlock( &p_aout->fifos_lock ); - vlc_mutex_unlock( &p_aout_bank->lock ); - intf_WarnMsg( 2, "aout info: fifo #%i allocated, %i channels, rate %li, " + msg_Dbg( p_aout, "fifo #%i allocated, %i channels, rate %li, " "frame size %i", p_fifo->i_fifo, p_fifo->i_channels, p_fifo->i_rate, p_fifo->i_frame_size ); /* Return the pointer to the fifo structure */ - return( p_fifo ); + return p_fifo; } /***************************************************************************** @@ -182,7 +162,7 @@ aout_fifo_t * aout_CreateFifo( int i_format, int i_channels, int i_rate, *****************************************************************************/ void aout_DestroyFifo( aout_fifo_t * p_fifo ) { - intf_WarnMsg( 2, "aout info: fifo #%i destroyed", p_fifo->i_fifo ); +//X intf_Warn( p_fifo, 2, "fifo #%i destroyed", p_fifo->i_fifo ); vlc_mutex_lock( &p_fifo->data_lock ); p_fifo->b_die = 1; diff --git a/src/audio_output/aout_pcm.c b/src/audio_output/aout_pcm.c index fc1abe7d2d..1404de2cfb 100644 --- a/src/audio_output/aout_pcm.c +++ b/src/audio_output/aout_pcm.c @@ -2,7 +2,7 @@ * aout_pcm.c: PCM audio output functions ***************************************************************************** * Copyright (C) 1999-2002 VideoLAN - * $Id: aout_pcm.c,v 1.7 2002/05/19 00:34:54 massiot Exp $ + * $Id: aout_pcm.c,v 1.8 2002/06/01 12:32:01 sam Exp $ * * Authors: Michel Kaempf * Cyril Deguet @@ -25,11 +25,10 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ #include -#include +#include #include "audio_output.h" #include "aout_pcm.h" @@ -55,8 +54,7 @@ void aout_PCMThread( aout_thread_t * p_aout ) #if defined(WIN32) if( !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL) ) - intf_WarnMsg( 2, "aout warning: couldn't change priority of" - "aout_PCMThread()" ); + msg_Warn( p_aout, "could not change priority of aout_PCMThread()" ); #endif /* As the s32_buffer was created with calloc(), we don't have to set this @@ -132,7 +130,7 @@ void aout_PCMThread( aout_thread_t * p_aout ) p_aout->date = mdate() + ((((mtime_t)((i_units + p_aout->i_latency) / p_aout->i_channels)) * 1000000) / - ((mtime_t)p_aout->i_rate)) + p_main->i_desync; + ((mtime_t)p_aout->i_rate)) + p_aout->p_vlc->i_desync; p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, i_buffer_limit ); @@ -146,7 +144,7 @@ void aout_PCMThread( aout_thread_t * p_aout ) p_aout->date = mdate() + ((((mtime_t)((i_units + p_aout->i_latency / 2) / p_aout->i_channels)) * 1000000) / - ((mtime_t)p_aout->i_rate)) + p_main->i_desync; + ((mtime_t)p_aout->i_rate)) + p_aout->p_vlc->i_desync; p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, i_buffer_limit * 2 ); @@ -174,7 +172,7 @@ void aout_PCMThread( aout_thread_t * p_aout ) /***************************************************************************** * InitializeIncrement: change i_x/i_y to i_a+i_b/i_c *****************************************************************************/ -static inline void InitializeIncrement( aout_increment_t * p_inc, +static inline void InitializeIncrement( aout_increment_t *p_inc, int i_x, int i_y ) { p_inc->i_r = -i_y; @@ -193,7 +191,7 @@ static inline void InitializeIncrement( aout_increment_t * p_inc, /***************************************************************************** * UpdateIncrement *****************************************************************************/ -static inline void UpdateIncrement( aout_increment_t * p_inc, int * pi_integer ) +static inline void UpdateIncrement( aout_increment_t *p_inc, int *pi_integer ) { if( (p_inc->i_r += p_inc->i_b) >= 0 ) { @@ -253,7 +251,7 @@ static void FillBuffer( aout_thread_t * p_aout, aout_fifo_t * p_fifo ) } else { - intf_ErrMsg( "aout error: unsupported number of channels" ); + msg_Err( p_aout, "unsupported number of channels" ); } UpdateIncrement(&p_fifo->unit_increment, &p_fifo->i_unit); diff --git a/src/audio_output/aout_spdif.c b/src/audio_output/aout_spdif.c index 58d0e7bde2..79c69a694f 100644 --- a/src/audio_output/aout_spdif.c +++ b/src/audio_output/aout_spdif.c @@ -2,7 +2,7 @@ * aout_spdif.c: AC3 passthrough output ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: aout_spdif.c,v 1.28 2002/05/18 08:50:54 stef Exp $ + * $Id: aout_spdif.c,v 1.29 2002/06/01 12:32:01 sam Exp $ * * Authors: Michel Kaempf * Stéphane Borel @@ -25,11 +25,10 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ #include /* memset() */ -#include +#include #ifdef HAVE_UNISTD_H # include @@ -155,7 +154,7 @@ void aout_SpdifThread( aout_thread_t * p_aout ) } else { - intf_WarnMsg( 3, "aout warning: empty spdif fifo" ); + msg_Warn( p_aout, "empty spdif fifo" ); while( AOUT_FIFO_ISEMPTY( p_aout->fifo[i_fifo] ) && !p_aout->b_die && !p_aout->fifo[i_fifo].b_die ) diff --git a/src/audio_output/audio_output.c b/src/audio_output/audio_output.c index e959734e42..8caf9b8a52 100644 --- a/src/audio_output/audio_output.c +++ b/src/audio_output/audio_output.c @@ -2,7 +2,7 @@ * audio_output.c : audio output thread ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: audio_output.c,v 1.84 2002/04/23 14:16:20 sam Exp $ + * $Id: audio_output.c,v 1.85 2002/06/01 12:32:01 sam Exp $ * * Authors: Michel Kaempf * Cyril Deguet @@ -25,11 +25,10 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ #include -#include +#include #ifdef HAVE_UNISTD_H # include /* getpid() */ @@ -49,58 +48,28 @@ *****************************************************************************/ static int aout_SpawnThread ( aout_thread_t * p_aout ); -/***************************************************************************** - * aout_InitBank: initialize the audio output bank. - *****************************************************************************/ -void aout_InitBank ( void ) -{ - p_aout_bank->i_count = 0; - - vlc_mutex_init( &p_aout_bank->lock ); -} - -/***************************************************************************** - * aout_EndBank: empty the audio output bank. - ***************************************************************************** - * This function ends all unused audio outputs and empties the bank in - * case of success. - *****************************************************************************/ -void aout_EndBank ( void ) -{ - /* Ask all remaining audio outputs to die */ - while( p_aout_bank->i_count ) - { - aout_DestroyThread( - p_aout_bank->pp_aout[ --p_aout_bank->i_count ], NULL ); - } - - vlc_mutex_destroy( &p_aout_bank->lock ); -} - /***************************************************************************** * aout_CreateThread: initialize audio thread *****************************************************************************/ -aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate ) +aout_thread_t *aout_CreateThread( vlc_object_t *p_parent, + int i_channels, int i_rate ) { aout_thread_t * p_aout; /* thread descriptor */ -#if 0 - int i_status; /* thread status */ -#endif char * psz_name; int i_format; /* Allocate descriptor */ - p_aout = (aout_thread_t *) malloc( sizeof(aout_thread_t) ); + p_aout = vlc_object_create( p_parent, VLC_OBJECT_AOUT ); if( p_aout == NULL ) { - return( NULL ); + return NULL; } p_aout->i_latency = 0; - p_aout->i_rate = config_GetIntVariable( "rate" ); - p_aout->i_channels = config_GetIntVariable( "mono" ) ? 1 : 2; + p_aout->i_rate = config_GetInt( p_aout, "rate" ); + p_aout->i_channels = config_GetInt( p_aout, "mono" ) ? 1 : 2; - i_format = config_GetIntVariable( "audio-format" ); + i_format = config_GetInt( p_aout, "audio-format" ); if( ( !i_format ) || ( i_format > 8 ) ) { p_aout->i_format = AOUT_FMT_S16_NE; @@ -112,21 +81,21 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate ) if( p_aout->i_rate == 0 ) { - intf_ErrMsg( "aout error: null sample rate" ); - free( p_aout ); - return( NULL ); + msg_Err( p_aout, "null sample rate" ); + vlc_object_destroy( p_aout ); + return NULL; } /* Choose the best module */ - psz_name = config_GetPszVariable( "aout" ); - p_aout->p_module = module_Need( MODULE_CAPABILITY_AOUT, psz_name, - (void *)p_aout ); + psz_name = config_GetPsz( p_aout, "aout" ); + p_aout->p_module = module_Need( p_aout, MODULE_CAPABILITY_AOUT, + psz_name, (void *)p_aout ); if( psz_name ) free( psz_name ); if( p_aout->p_module == NULL ) { - intf_ErrMsg( "aout error: no suitable aout module" ); - free( p_aout ); - return( NULL ); + msg_Err( p_aout, "no suitable aout module" ); + vlc_object_destroy( p_aout ); + return NULL; } #define aout_functions p_aout->p_module->p_functions->aout.functions.aout @@ -144,12 +113,12 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate ) { p_aout->pf_close( p_aout ); module_Unneed( p_aout->p_module ); - free( p_aout ); - return( NULL ); + vlc_object_destroy( p_aout ); + return NULL; } /* Initialize the volume level */ - p_aout->i_volume = config_GetIntVariable( "volume" ); + p_aout->i_volume = config_GetInt( p_aout, "volume" ); p_aout->i_savedvolume = 0; /* FIXME: maybe it would be cleaner to change SpawnThread prototype @@ -159,11 +128,13 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate ) { p_aout->pf_close( p_aout ); module_Unneed( p_aout->p_module ); - free( p_aout ); - return( NULL ); + vlc_object_destroy( p_aout ); + return NULL; } - return( p_aout ); + vlc_object_attach( p_aout, p_parent->p_vlc ); + + return p_aout; } /***************************************************************************** @@ -175,18 +146,14 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) void (* pf_aout_thread)( aout_thread_t * ) = NULL; char *psz_format; - /* We want the audio output thread to live */ - p_aout->b_die = 0; - p_aout->b_active = 1; - /* Initialize the fifos lock */ - vlc_mutex_init( &p_aout->fifos_lock ); + vlc_mutex_init( p_aout, &p_aout->fifos_lock ); /* Initialize audio fifos : set all fifos as empty and initialize locks */ for ( i_index = 0; i_index < AOUT_MAX_FIFOS; i_index++ ) { p_aout->fifo[i_index].i_format = AOUT_FIFO_NONE; - vlc_mutex_init( &p_aout->fifo[i_index].data_lock ); + vlc_mutex_init( p_aout, &p_aout->fifo[i_index].data_lock ); vlc_cond_init( &p_aout->fifo[i_index].data_wait ); } @@ -232,8 +199,8 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) break; default: - intf_ErrMsg( "aout error: unknown audio output format %i", - p_aout->i_format ); + msg_Err( p_aout, "unknown audio output format %i", + p_aout->i_format ); return( -1 ); } @@ -242,7 +209,7 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) p_aout->buffer = malloc( i_bytes ); if ( p_aout->buffer == NULL ) { - intf_ErrMsg( "aout error: cannot create output buffer" ); + msg_Err( p_aout, "out of memory" ); return( -1 ); } @@ -250,25 +217,24 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) sizeof(s32) * p_aout->i_channels ); if ( p_aout->s32_buffer == NULL ) { - intf_ErrMsg( "aout error: cannot create the s32 output buffer" ); + msg_Err( p_aout, "out of memory" ); free( p_aout->buffer ); return( -1 ); } /* Rough estimate of the playing date */ - p_aout->date = mdate() + p_main->i_desync; + p_aout->date = mdate() + p_aout->p_vlc->i_desync; /* Launch the thread */ - if ( vlc_thread_create( &p_aout->thread_id, "audio output", - (vlc_thread_func_t)pf_aout_thread, p_aout ) ) + if ( vlc_thread_create( p_aout, "audio output", pf_aout_thread, 0 ) ) { - intf_ErrMsg( "aout error: cannot spawn audio output thread" ); + msg_Err( p_aout, "cannot spawn audio output thread" ); free( p_aout->buffer ); free( p_aout->s32_buffer ); return( -1 ); } - intf_WarnMsg( 2, "aout info: %s thread spawned, %i channels, rate %i", + msg_Dbg( p_aout, "%s thread spawned, %i channels, rate %i", psz_format, p_aout->i_channels, p_aout->i_rate ); return( 0 ); } @@ -276,15 +242,14 @@ static int aout_SpawnThread( aout_thread_t * p_aout ) /***************************************************************************** * aout_DestroyThread *****************************************************************************/ -void aout_DestroyThread( aout_thread_t * p_aout, int *pi_status ) +void aout_DestroyThread( aout_thread_t * p_aout ) { int i_index; - /* FIXME: pi_status is not handled correctly: check vout how to do!?? */ - /* Ask thread to kill itself and wait until it's done */ p_aout->b_die = 1; - vlc_thread_join( p_aout->thread_id ); /* only if pi_status is NULL */ + + vlc_thread_join( p_aout ); /* Free the allocated memory */ free( p_aout->buffer ); @@ -305,6 +270,6 @@ void aout_DestroyThread( aout_thread_t * p_aout, int *pi_status ) module_Unneed( p_aout->p_module ); /* Free structure */ - free( p_aout ); + vlc_object_destroy( p_aout ); } diff --git a/src/input/input.c b/src/input/input.c index 48bb78eff9..991444582a 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -4,7 +4,7 @@ * decoders. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: input.c,v 1.197 2002/05/21 01:40:17 sam Exp $ + * $Id: input.c,v 1.198 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include @@ -41,8 +41,7 @@ #endif #include "netutils.h" - -#include "intf_playlist.h" +#include "playlist.h" #include "stream_control.h" #include "input_ext-intf.h" @@ -61,41 +60,6 @@ static void CloseThread ( input_thread_t *p_input ); static void DestroyThread ( input_thread_t *p_input ); static void EndThread ( input_thread_t *p_input ); -/***************************************************************************** - * input_InitBank: initialize the input bank. - *****************************************************************************/ -void input_InitBank ( void ) -{ - p_input_bank->i_count = 0; - - /* XXX: Workaround for old interface modules */ - p_input_bank->pp_input[0] = NULL; - - vlc_mutex_init( &p_input_bank->lock ); -} - -/***************************************************************************** - * input_EndBank: empty the input bank. - ***************************************************************************** - * This function ends all unused inputs and empties the bank in - * case of success. - *****************************************************************************/ -void input_EndBank ( void ) -{ - int i_input; - - /* Ask all remaining video outputs to die */ - for( i_input = 0; i_input < p_input_bank->i_count; i_input++ ) - { - input_StopThread( - p_input_bank->pp_input[ i_input ], NULL ); - input_DestroyThread( - p_input_bank->pp_input[ i_input ] ); - } - - vlc_mutex_destroy( &p_input_bank->lock ); -} - /***************************************************************************** * input_CreateThread: creates a new input thread ***************************************************************************** @@ -104,22 +68,20 @@ void input_EndBank ( void ) * If pi_status is NULL, then the function will block until the thread is ready. * If not, it will be updated using one of the THREAD_* constants. *****************************************************************************/ -input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status ) +input_thread_t *input_CreateThread ( vlc_object_t *p_parent, + playlist_item_t *p_item, int *pi_status ) { input_thread_t * p_input; /* thread descriptor */ /* Allocate descriptor */ - p_input = (input_thread_t *)malloc( sizeof(input_thread_t) ); + p_input = vlc_object_create( p_parent, VLC_OBJECT_INPUT ); if( p_input == NULL ) { - intf_ErrMsg( "input error: can't allocate input thread (%s)", - strerror(errno) ); + msg_Err( p_parent, "out of memory" ); return( NULL ); } /* Initialize thread properties */ - p_input->b_die = 0; - p_input->b_error = 0; p_input->b_eof = 0; /* Set target */ @@ -153,9 +115,9 @@ input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status ) p_input->stream.c_packets_trashed = 0; /* Set locks. */ - vlc_mutex_init( &p_input->stream.stream_lock ); + vlc_mutex_init( p_input, &p_input->stream.stream_lock ); vlc_cond_init( &p_input->stream.stream_wait ); - vlc_mutex_init( &p_input->stream.control.control_lock ); + vlc_mutex_init( p_input, &p_input->stream.control.control_lock ); /* Initialize stream description */ p_input->stream.b_changed = 0; @@ -187,19 +149,19 @@ input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status ) p_input->stream.control.i_status = PLAYING_S; p_input->stream.control.i_rate = DEFAULT_RATE; p_input->stream.control.b_mute = 0; - p_input->stream.control.b_grayscale = config_GetIntVariable( "grayscale" ); - p_input->stream.control.i_smp = config_GetIntVariable( "vdec-smp" ); + p_input->stream.control.b_grayscale = config_GetInt( p_input, "grayscale" ); + p_input->stream.control.i_smp = config_GetInt( p_input, "vdec-smp" ); + + msg_Info( p_input, "playlist item `%s'", p_input->psz_source ); - intf_WarnMsg( 1, "input: playlist item `%s'", p_input->psz_source ); + vlc_object_attach( p_input, p_parent ); /* Create thread. */ - if( vlc_thread_create( &p_input->thread_id, "input", - (vlc_thread_func_t)RunThread, (void *) p_input ) ) + if( vlc_thread_create( p_input, "input", RunThread, 1 ) ) { - intf_ErrMsg( "input error: can't create input thread (%s)", - strerror(errno) ); + msg_Err( p_input, "cannot create input thread (%s)", strerror(errno) ); free( p_input ); - return( NULL ); + return NULL; } #if 0 @@ -214,7 +176,7 @@ input_thread_t *input_CreateThread ( playlist_item_t *p_item, int *pi_status ) } #endif - return( p_input ); + return p_input; } /***************************************************************************** @@ -226,7 +188,6 @@ void input_StopThread( input_thread_t *p_input, int *pi_status ) { /* Make the thread exit from a possible vlc_cond_wait() */ vlc_mutex_lock( &p_input->stream.stream_lock ); - /* Request thread destruction */ p_input->b_die = 1; @@ -254,7 +215,7 @@ void input_StopThread( input_thread_t *p_input, int *pi_status ) void input_DestroyThread( input_thread_t *p_input ) { /* Join the thread */ - vlc_thread_join( p_input->thread_id ); + vlc_thread_join( p_input ); /* Destroy Mutex locks */ vlc_mutex_destroy( &p_input->stream.control.control_lock ); @@ -277,11 +238,14 @@ static int RunThread( input_thread_t *p_input ) /* If we failed, wait before we are killed, and exit */ p_input->i_status = THREAD_ERROR; p_input->b_error = 1; + vlc_thread_ready( p_input ); ErrorThread( p_input ); DestroyThread( p_input ); return 0; } + vlc_thread_ready( p_input ); + p_input->i_status = THREAD_READY; /* initialization is complete */ @@ -413,7 +377,7 @@ static int RunThread( input_thread_t *p_input ) { /* End of file - we do not set b_die because only the * interface is allowed to do so. */ - intf_WarnMsg( 3, "input: EOF reached" ); + msg_Info( p_input, "EOF reached" ); p_input->b_eof = 1; } else if( i_count < 0 ) @@ -450,8 +414,8 @@ static int InitThread( input_thread_t * p_input ) #ifdef WIN32 if( psz_parser - p_input->psz_source == 1 ) { - intf_WarnMsg( 2, "Drive letter %c: specified in source string", - p_input->psz_source ) ; + msg_Warn( p_input, "drive letter %c: found in source string", + p_input->psz_source ) ; psz_parser = ""; } #endif @@ -513,25 +477,23 @@ static int InitThread( input_thread_t * p_input ) } } - intf_WarnMsg( 2, "input: access `%s', demux `%s', name `%s'", - p_input->psz_access, p_input->psz_demux, - p_input->psz_name ); + msg_Dbg( p_input, "access `%s', demux `%s', name `%s'", + p_input->psz_access, p_input->psz_demux, p_input->psz_name ); if( input_AccessInit( p_input ) == -1 ) { return( -1 ); } - /* Find and open appropriate access plug-in. */ - p_input->p_access_module = module_Need( MODULE_CAPABILITY_ACCESS, - p_input->psz_access, - (void *)p_input ); + /* Find and open appropriate access module */ + p_input->p_access_module = + module_Need( p_input, MODULE_CAPABILITY_ACCESS, + p_input->psz_access, (void *)p_input ); if( p_input->p_access_module == NULL ) { - intf_ErrMsg( "input error: no suitable access plug-in for `%s/%s:%s'", - p_input->psz_access, p_input->psz_demux, - p_input->psz_name ); + msg_Err( p_input, "no suitable access module for `%s/%s:%s'", + p_input->psz_access, p_input->psz_demux, p_input->psz_name ); return( -1 ); } @@ -566,16 +528,15 @@ static int InitThread( input_thread_t * p_input ) } } - /* Find and open appropriate demux plug-in. */ - p_input->p_demux_module = module_Need( MODULE_CAPABILITY_DEMUX, - p_input->psz_demux, - (void *)p_input ); + /* Find and open appropriate demux module */ + p_input->p_demux_module = + module_Need( p_input, MODULE_CAPABILITY_DEMUX, + p_input->psz_demux, (void *)p_input ); if( p_input->p_demux_module == NULL ) { - intf_ErrMsg( "input error: no suitable demux plug-in for `%s/%s:%s'", - p_input->psz_access, p_input->psz_demux, - p_input->psz_name ); + msg_Err( p_input, "no suitable demux module for `%s/%s:%s'", + p_input->psz_access, p_input->psz_demux, p_input->psz_name ); module_Unneed( p_input->p_access_module ); return( -1 ); } @@ -609,25 +570,21 @@ static void ErrorThread( input_thread_t *p_input ) *****************************************************************************/ static void EndThread( input_thread_t * p_input ) { - /* Store status */ - p_input->i_status = THREAD_END; - - if( p_main->b_stats ) - { #ifdef HAVE_SYS_TIMES_H - /* Display statistics */ - struct tms cpu_usage; - times( &cpu_usage ); + /* Display statistics */ + struct tms cpu_usage; + times( &cpu_usage ); - intf_StatMsg( "input stats: %d loops consuming user: %d, system: %d", - p_input->c_loops, - cpu_usage.tms_utime, cpu_usage.tms_stime ); + msg_Dbg( p_input, "%d loops consuming user: %d, system: %d", + p_input->c_loops, cpu_usage.tms_utime, cpu_usage.tms_stime ); #else - intf_StatMsg( "input stats: %d loops", p_input->c_loops ); + msg_Dbg( p_input, "%d loops", p_input->c_loops ); #endif - input_DumpStream( p_input ); - } + input_DumpStream( p_input ); + + /* Store status */ + p_input->i_status = THREAD_END; /* Free all ES and destroy all decoder threads */ input_EndStream( p_input ); diff --git a/src/input/input_clock.c b/src/input/input_clock.c index 63e82faea8..5d16465ccd 100644 --- a/src/input/input_clock.c +++ b/src/input/input_clock.c @@ -2,7 +2,7 @@ * input_clock.c: Clock/System date convertions, stream management ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_clock.c,v 1.31 2002/05/17 18:06:34 stef Exp $ + * $Id: input_clock.c,v 1.32 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -27,7 +27,7 @@ #include /* memcpy(), memset() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-intf.h" @@ -258,7 +258,7 @@ void input_ClockManageRef( input_thread_t * p_input, /* Stream discontinuity, for which we haven't received a * warning from the stream control facilities (dd-edited * stream ?). */ - intf_WarnMsg( 1, "Clock gap, unexpected stream discontinuity" ); + msg_Warn( p_input, "clock gap, unexpected stream discontinuity" ); input_ClockInit( p_pgrm ); p_pgrm->i_synchro_state = SYNCHRO_START; input_EscapeDiscontinuity( p_input ); @@ -323,7 +323,8 @@ mtime_t input_ClockGetTS( input_thread_t * p_input, { return( ClockToSysdate( p_input, p_pgrm, i_ts + p_pgrm->delta_cr ) + DEFAULT_PTS_DELAY - + (p_main->i_desync > 0 ? p_main->i_desync : 0) ); + + (p_input->p_vlc->i_desync > 0 + ? p_input->p_vlc->i_desync : 0) ); } else { diff --git a/src/input/input_dec.c b/src/input/input_dec.c index 72a255eb05..8deee0b188 100644 --- a/src/input/input_dec.c +++ b/src/input/input_dec.c @@ -2,7 +2,7 @@ * input_dec.c: Functions for the management of decoders ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_dec.c,v 1.36 2002/05/20 22:39:36 sam Exp $ + * $Id: input_dec.c,v 1.37 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -28,72 +28,69 @@ #include /* memcpy(), memset() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-dec.h" #include "input_ext-intf.h" #include "input_ext-plugins.h" -static decoder_config_t * CreateDecoderConfig( input_thread_t * p_input, - es_descriptor_t * p_es ); -static void DeleteDecoderConfig( decoder_config_t * p_config ); +static decoder_fifo_t * CreateDecoderFifo( input_thread_t *, + es_descriptor_t * ); +static void DeleteDecoderFifo( decoder_fifo_t * ); /***************************************************************************** * input_RunDecoder: spawns a new decoder thread *****************************************************************************/ -vlc_thread_t input_RunDecoder( input_thread_t * p_input, - es_descriptor_t * p_es ) +decoder_fifo_t * input_RunDecoder( input_thread_t * p_input, + es_descriptor_t * p_es ) { - vlc_thread_t thread_id; char * psz_plugin = NULL; if( p_es->i_type == MPEG1_AUDIO_ES || p_es->i_type == MPEG2_AUDIO_ES ) { - psz_plugin = config_GetPszVariable( "mpeg-adec" ); + psz_plugin = config_GetPsz( p_input, "mpeg-adec" ); } if( p_es->i_type == AC3_AUDIO_ES ) { - psz_plugin = config_GetPszVariable( "ac3-adec" ); + psz_plugin = config_GetPsz( p_input, "ac3-adec" ); } /* Get a suitable module */ - p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, psz_plugin, - (void *)&p_es->i_type ); + p_es->p_module = module_Need( p_input, MODULE_CAPABILITY_DECODER, + psz_plugin, (void *)&p_es->i_type ); if( psz_plugin ) free( psz_plugin ); if( p_es->p_module == NULL ) { - intf_ErrMsg( "input error: no suitable decoder module for type 0x%x", - p_es->i_type ); - return( 0 ); + msg_Err( p_input, "no suitable decoder module for type 0x%x", + p_es->i_type ); + return NULL; } /* Create the decoder configuration structure */ - p_es->p_config = CreateDecoderConfig( p_input, p_es ); + p_es->p_decoder_fifo = CreateDecoderFifo( p_input, p_es ); - if( p_es->p_config == NULL ) + if( p_es->p_decoder_fifo == NULL ) { - intf_ErrMsg( "input error: could not create decoder config" ); + msg_Err( p_input, "could not create decoder fifo" ); module_Unneed( p_es->p_module ); - return( 0 ); + return NULL; } /* Spawn the decoder thread */ - if ( vlc_thread_create( &thread_id, "decoder", - (vlc_thread_func_t)p_es->p_module-> - p_functions->dec.functions.dec.pf_run, - (void *)p_es->p_config) ) + if ( vlc_thread_create( p_es->p_decoder_fifo, "decoder", + p_es->p_module->p_functions->dec.functions.dec.pf_run, 0 ) ) { - intf_ErrMsg( "input error: can't spawn decoder thread \"%s\"", - p_es->p_module->psz_name ); - free( p_es->p_config ); + msg_Err( p_input, "cannot spawn decoder thread \"%s\"", + p_es->p_module->psz_object_name ); + DeleteDecoderFifo( p_es->p_decoder_fifo ); module_Unneed( p_es->p_module ); - return( 0 ); + return NULL; } p_input->stream.b_changed = 1; - return thread_id; + return p_es->p_decoder_fifo; } @@ -122,11 +119,11 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es ) /* I thought that unlocking was better since thread join can be long * but it actually creates late pictures and freezes --stef */ // vlc_mutex_unlock( &p_input->stream.stream_lock ); - vlc_thread_join( p_es->thread_id ); + vlc_thread_join( p_es->p_decoder_fifo ); // vlc_mutex_lock( &p_input->stream.stream_lock ); /* Delete decoder configuration */ - DeleteDecoderConfig( p_es->p_config ); + DeleteDecoderFifo( p_es->p_decoder_fifo ); /* Unneed module */ module_Unneed( p_es->p_module ); @@ -199,26 +196,18 @@ void input_EscapeAudioDiscontinuity( input_thread_t * p_input ) } /***************************************************************************** - * CreateDecoderConfig: create a decoder_config_t + * CreateDecoderFifo: create a decoder_fifo_t *****************************************************************************/ -static decoder_config_t * CreateDecoderConfig( input_thread_t * p_input, - es_descriptor_t * p_es ) +static decoder_fifo_t * CreateDecoderFifo( input_thread_t * p_input, + es_descriptor_t * p_es ) { - decoder_config_t * p_config; - - p_config = (decoder_config_t *)malloc( sizeof(decoder_config_t) ); - if( p_config == NULL ) - { - intf_ErrMsg( "Unable to allocate memory in CreateDecoderConfig" ); - return NULL; - } + decoder_fifo_t * p_fifo; /* Decoder FIFO */ - if( (p_config->p_decoder_fifo = - (decoder_fifo_t *)malloc( sizeof(decoder_fifo_t) )) == NULL ) + p_fifo = vlc_object_create( p_input, VLC_OBJECT_DECODER ); + if( p_fifo == NULL ) { - intf_ErrMsg( "Out of memory" ); - free( p_config ); + msg_Err( p_input, "out of memory" ); return NULL; } @@ -230,53 +219,54 @@ static decoder_config_t * CreateDecoderConfig( input_thread_t * p_input, * sizeof(es_descriptor_t *) ); if( p_input->stream.pp_selected_es == NULL ) { - intf_ErrMsg( "Unable to realloc memory" ); - free( p_config->p_decoder_fifo ); - free( p_config ); + msg_Err( p_input, "out of memory" ); + vlc_object_destroy( p_fifo ); return NULL; } p_input->stream.pp_selected_es[p_input->stream.i_selected_es_number - 1] = p_es; - /* Initialize the p_config structure */ - vlc_mutex_init(&p_config->p_decoder_fifo->data_lock); - vlc_cond_init(&p_config->p_decoder_fifo->data_wait); - p_es->p_decoder_fifo = p_config->p_decoder_fifo; + /* Initialize the p_fifo structure */ + vlc_mutex_init( p_input, &p_fifo->data_lock ); + vlc_cond_init( &p_fifo->data_wait ); + p_es->p_decoder_fifo = p_fifo; - p_config->i_id = p_es->i_id; - p_config->i_type = p_es->i_type; - p_config->p_demux_data = p_es->p_demux_data; + p_fifo->i_id = p_es->i_id; + p_fifo->i_type = p_es->i_type; + p_fifo->p_demux_data = p_es->p_demux_data; - p_config->p_stream_ctrl = &p_input->stream.control; + p_fifo->p_stream_ctrl = &p_input->stream.control; + + p_fifo->p_first = NULL; + p_fifo->pp_last = &p_fifo->p_first; + p_fifo->i_depth = 0; + p_fifo->b_die = p_fifo->b_error = 0; + p_fifo->p_packets_mgt = p_input->p_method_data; - p_config->p_decoder_fifo->p_first = NULL; - p_config->p_decoder_fifo->pp_last = &p_config->p_decoder_fifo->p_first; - p_config->p_decoder_fifo->i_depth = 0; - p_config->p_decoder_fifo->b_die = p_config->p_decoder_fifo->b_error = 0; - p_config->p_decoder_fifo->p_packets_mgt = p_input->p_method_data; + vlc_object_attach( p_fifo, p_input ); - return p_config; + return p_fifo; } /***************************************************************************** - * DeleteDecoderConfig: create a decoder_config_t + * DeleteDecoderFifo: destroy a decoder_fifo_t *****************************************************************************/ -static void DeleteDecoderConfig( decoder_config_t * p_config ) +static void DeleteDecoderFifo( decoder_fifo_t * p_fifo ) { - intf_StatMsg( "input stats: killing decoder for 0x%x, type 0x%x, %d PES in FIFO", - p_config->i_id, p_config->i_type, - p_config->p_decoder_fifo->i_depth ); + vlc_object_unlink_all( p_fifo ); + + msg_Dbg( p_fifo, "killing decoder for 0x%x, type 0x%x, %d PES in FIFO", + p_fifo->i_id, p_fifo->i_type, p_fifo->i_depth ); + /* Free all packets still in the decoder fifo. */ - input_DeletePES( p_config->p_decoder_fifo->p_packets_mgt, - p_config->p_decoder_fifo->p_first ); + input_DeletePES( p_fifo->p_packets_mgt, + p_fifo->p_first ); /* Destroy the lock and cond */ - vlc_cond_destroy( &p_config->p_decoder_fifo->data_wait ); - vlc_mutex_destroy( &p_config->p_decoder_fifo->data_lock ); - - free( p_config->p_decoder_fifo ); + vlc_cond_destroy( &p_fifo->data_wait ); + vlc_mutex_destroy( &p_fifo->data_lock ); - free( p_config ); + vlc_object_destroy( p_fifo ); } diff --git a/src/input/input_ext-dec.c b/src/input/input_ext-dec.c index 9d5bfbad96..7563d84dbd 100644 --- a/src/input/input_ext-dec.c +++ b/src/input/input_ext-dec.c @@ -2,7 +2,7 @@ * input_ext-dec.c: services to the decoders ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: input_ext-dec.c,v 1.31 2002/05/18 17:47:47 sam Exp $ + * $Id: input_ext-dec.c,v 1.32 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -27,7 +27,7 @@ #include /* memcpy(), memset() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-dec.h" @@ -38,9 +38,8 @@ * InitBitstream: initialize a bit_stream_t structure *****************************************************************************/ void InitBitstream( bit_stream_t * p_bit_stream, decoder_fifo_t * p_fifo, - void (* pf_bitstream_callback)( struct bit_stream_s *, - boolean_t ), - void * p_callback_arg ) + void (* pf_bitstream_callback)( bit_stream_t *, vlc_bool_t ), + void * p_callback_arg ) { p_bit_stream->p_decoder_fifo = p_fifo; p_bit_stream->pf_bitstream_callback = pf_bitstream_callback; @@ -112,10 +111,10 @@ void DecoderError( decoder_fifo_t * p_fifo ) * NextDataPacket: go to the data packet after *pp_data, return 1 if we * changed PES *****************************************************************************/ -static inline boolean_t _NextDataPacket( decoder_fifo_t * p_fifo, - data_packet_t ** pp_data ) +static inline vlc_bool_t _NextDataPacket( decoder_fifo_t * p_fifo, + data_packet_t ** pp_data ) { - boolean_t b_new_pes; + vlc_bool_t b_new_pes; /* We are looking for the next data packet that contains real data, * and not just a PES header */ @@ -170,7 +169,7 @@ static inline boolean_t _NextDataPacket( decoder_fifo_t * p_fifo, return( b_new_pes ); } -boolean_t NextDataPacket( decoder_fifo_t * p_fifo, data_packet_t ** pp_data ) +vlc_bool_t NextDataPacket( decoder_fifo_t * p_fifo, data_packet_t ** pp_data ) { return( _NextDataPacket( p_fifo, pp_data ) ); } @@ -182,7 +181,7 @@ boolean_t NextDataPacket( decoder_fifo_t * p_fifo, data_packet_t ** pp_data ) static inline void _BitstreamNextDataPacket( bit_stream_t * p_bit_stream ) { decoder_fifo_t * p_fifo = p_bit_stream->p_decoder_fifo; - boolean_t b_new_pes; + vlc_bool_t b_new_pes; b_new_pes = _NextDataPacket( p_fifo, &p_bit_stream->p_data ); diff --git a/src/input/input_ext-intf.c b/src/input/input_ext-intf.c index 43ad926f24..c24362b58c 100644 --- a/src/input/input_ext-intf.c +++ b/src/input/input_ext-intf.c @@ -2,7 +2,7 @@ * input_ext-intf.c: services to the interface ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: input_ext-intf.c,v 1.36 2002/05/21 00:23:37 sam Exp $ + * $Id: input_ext-intf.c,v 1.37 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -27,7 +27,7 @@ #include /* memcpy(), memset() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-dec.h" @@ -37,8 +37,18 @@ /***************************************************************************** * input_SetStatus: change the reading status *****************************************************************************/ -void input_SetStatus( input_thread_t * p_input, int i_mode ) +void __input_SetStatus( vlc_object_t * p_this, int i_mode ) { + input_thread_t *p_input; + + p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT ); + + if( p_input == NULL ) + { + msg_Err( p_this, "no input found" ); + return; + } + vlc_mutex_lock( &p_input->stream.stream_lock ); switch( i_mode ) @@ -46,19 +56,19 @@ void input_SetStatus( input_thread_t * p_input, int i_mode ) case INPUT_STATUS_END: p_input->stream.i_new_status = PLAYING_S; p_input->b_eof = 1; - intf_WarnMsg( 1, "input: end of stream" ); + msg_Dbg( p_input, "end of stream" ); break; case INPUT_STATUS_PLAY: p_input->stream.i_new_status = PLAYING_S; - intf_WarnMsg( 1, "input: playing at normal rate" ); + msg_Dbg( p_input, "playing at normal rate" ); break; case INPUT_STATUS_PAUSE: /* XXX: we don't need to check i_status, because input_clock.c * does it for us */ p_input->stream.i_new_status = PAUSE_S; - intf_WarnMsg( 1, "input: toggling pause" ); + msg_Dbg( p_input, "toggling pause" ); break; case INPUT_STATUS_FASTER: @@ -66,7 +76,7 @@ void input_SetStatus( input_thread_t * p_input, int i_mode ) if( p_input->stream.control.i_rate * 8 <= DEFAULT_RATE ) { p_input->stream.i_new_status = PLAYING_S; - intf_WarnMsg( 1, "input: playing at normal rate" ); + msg_Dbg( p_input, "playing at normal rate" ); } else { @@ -82,8 +92,8 @@ void input_SetStatus( input_thread_t * p_input, int i_mode ) { p_input->stream.i_new_rate = DEFAULT_RATE / 2; } - intf_WarnMsg( 1, "input: playing at %i:1 fast forward", - DEFAULT_RATE / p_input->stream.i_new_rate ); + msg_Dbg( p_input, "playing at %i:1 fast forward", + DEFAULT_RATE / p_input->stream.i_new_rate ); } break; @@ -92,7 +102,7 @@ void input_SetStatus( input_thread_t * p_input, int i_mode ) if( p_input->stream.control.i_rate >= 8 * DEFAULT_RATE ) { p_input->stream.i_new_status = PLAYING_S; - intf_WarnMsg( 1, "input: playing at normal rate" ); + msg_Dbg( p_input, "playing at normal rate" ); } else { @@ -108,8 +118,8 @@ void input_SetStatus( input_thread_t * p_input, int i_mode ) { p_input->stream.i_new_rate = DEFAULT_RATE * 2; } - intf_WarnMsg( 1, "input: playing at 1:%i slow motion", - p_input->stream.i_new_rate / DEFAULT_RATE ); + msg_Dbg( p_input, "playing at 1:%i slow motion", + p_input->stream.i_new_rate / DEFAULT_RATE ); } break; @@ -119,35 +129,111 @@ void input_SetStatus( input_thread_t * p_input, int i_mode ) vlc_cond_signal( &p_input->stream.stream_wait ); vlc_mutex_unlock( &p_input->stream.stream_lock ); + + vlc_object_release( p_input ); } /***************************************************************************** * input_Seek: changes the stream postion *****************************************************************************/ -void input_Seek( input_thread_t * p_input, off_t i_position ) +void __input_Seek( vlc_object_t * p_this, off_t i_position, int i_whence ) { - char psz_time1[OFFSETTOTIME_MAX_SIZE]; - char psz_time2[OFFSETTOTIME_MAX_SIZE]; + input_thread_t *p_input; + + char psz_time1[OFFSETTOTIME_MAX_SIZE]; + char psz_time2[OFFSETTOTIME_MAX_SIZE]; + + p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT ); + + if( p_input == NULL ) + { + msg_Err( p_this, "no input found" ); + return; + } vlc_mutex_lock( &p_input->stream.stream_lock ); - if( i_position < 0 ) + +#define A p_input->stream.p_selected_area + switch( i_whence & 0x30 ) { - i_position = 0; + case INPUT_SEEK_SECONDS: + i_position *= (off_t)50 * p_input->stream.i_mux_rate; + break; + + case INPUT_SEEK_PERCENT: + i_position = A->i_size * i_position / (off_t)100; + break; + + case INPUT_SEEK_BYTES: + default: + break; } - else if( i_position >= p_input->stream.p_selected_area->i_size ) + + switch( i_whence & 0x03 ) { - i_position = p_input->stream.p_selected_area->i_size; + case INPUT_SEEK_CUR: + A->i_seek = A->i_tell + i_position; + break; + + case INPUT_SEEK_END: + A->i_seek = A->i_size + i_position; + break; + + case INPUT_SEEK_SET: + default: + A->i_seek = i_position; + break; } - p_input->stream.p_selected_area->i_seek = i_position; - intf_WarnMsg( 3, "input: seeking position %lld/%lld (%s/%s)", - i_position, p_input->stream.p_selected_area->i_size, - input_OffsetToTime( p_input, psz_time1, i_position ), - input_OffsetToTime( p_input, psz_time2, - p_input->stream.p_selected_area->i_size ) ); + if( A->i_seek < 0 ) + { + A->i_seek = 0; + } + else if( A->i_seek > A->i_size ) + { + A->i_seek = A->i_size; + } + + msg_Dbg( p_input, "seeking position %lld/%lld (%s/%s)", + A->i_seek, A->i_size, + input_OffsetToTime( p_input, psz_time1, i_position ), + input_OffsetToTime( p_input, psz_time2, A->i_size ) ); +#undef A vlc_cond_signal( &p_input->stream.stream_wait ); vlc_mutex_unlock( &p_input->stream.stream_lock ); + + vlc_object_release( p_input ); +} + +/***************************************************************************** + * input_Tell: requests the stream postion + *****************************************************************************/ +void __input_Tell( vlc_object_t * p_this, stream_position_t * p_position ) +{ + input_thread_t *p_input; + + p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT ); + + if( p_input == NULL ) + { + p_position->i_tell = 0; + p_position->i_size = 0; + p_position->i_mux_rate = 0; + msg_Err( p_this, "no input found" ); + return; + } + + vlc_mutex_lock( &p_input->stream.stream_lock ); + +#define A p_input->stream.p_selected_area + p_position->i_tell = A->i_tell; + p_position->i_size = A->i_size; + p_position->i_mux_rate = p_input->stream.i_mux_rate; +#undef A + + vlc_mutex_unlock( &p_input->stream.stream_lock ); + vlc_object_release( p_input ); } /***************************************************************************** @@ -192,33 +278,33 @@ void input_DumpStream( input_thread_t * p_input ) char psz_time2[OFFSETTOTIME_MAX_SIZE]; #define S p_input->stream - intf_Msg( "input info: Dumping stream ID 0x%x [OK:%d/D:%d]", S.i_stream_id, - S.c_packets_read, S.c_packets_trashed ); + msg_Dbg( p_input, "dumping stream ID 0x%x [OK:%d/D:%d]", S.i_stream_id, + S.c_packets_read, S.c_packets_trashed ); if( S.b_seekable ) - intf_Msg( "input info: seekable stream, position: %lld/%lld (%s/%s)", - S.p_selected_area->i_tell, S.p_selected_area->i_size, - input_OffsetToTime( p_input, psz_time1, - S.p_selected_area->i_tell ), - input_OffsetToTime( p_input, psz_time2, - S.p_selected_area->i_size ) ); + msg_Dbg( p_input, "seekable stream, position: %lld/%lld (%s/%s)", + S.p_selected_area->i_tell, S.p_selected_area->i_size, + input_OffsetToTime( p_input, psz_time1, + S.p_selected_area->i_tell ), + input_OffsetToTime( p_input, psz_time2, + S.p_selected_area->i_size ) ); else - intf_Msg( "input info: %s", S.b_pace_control ? "pace controlled" : - "pace un-controlled" ); + msg_Dbg( p_input, "pace %scontrolled", S.b_pace_control ? "" : "un-" ); #undef S for( i = 0; i < p_input->stream.i_pgrm_number; i++ ) { #define P p_input->stream.pp_programs[i] - intf_Msg( "input info: Dumping program 0x%x, version %d (%s)", - P->i_number, P->i_version, - P->b_is_ok ? "complete" : "partial" ); + msg_Dbg( p_input, "dumping program 0x%x, version %d (%s)", + P->i_number, P->i_version, + P->b_is_ok ? "complete" : "partial" ); #undef P for( j = 0; j < p_input->stream.pp_programs[i]->i_es_number; j++ ) { #define ES p_input->stream.pp_programs[i]->pp_es[j] - intf_Msg( "input info: ES 0x%x, stream 0x%x, type 0x%x, %s [OK:%d/ERR:%d]", - ES->i_id, ES->i_stream_id, ES->i_type, - ES->p_decoder_fifo != NULL ? "selected" : "not selected", - ES->c_packets, ES->c_invalid_packets ); + msg_Dbg( p_input, + "ES 0x%x, stream 0x%x, type 0x%x, %s [OK:%d/ERR:%d]", + ES->i_id, ES->i_stream_id, ES->i_type, + ES->p_decoder_fifo != NULL ? "selected" : "not selected", + ES->c_packets, ES->c_invalid_packets ); #undef ES } } @@ -262,24 +348,24 @@ int input_ChangeES( input_thread_t * p_input, es_descriptor_t * p_es, input_UnselectES( p_input, p_input->stream.pp_selected_es[i_index] ); input_SelectES( p_input, p_es ); - intf_WarnMsg( 3, "input info: es selected -> %s (0x%x)", - p_es->psz_desc, p_es->i_id ); + msg_Dbg( p_input, "es selected -> %s (0x%x)", + p_es->psz_desc, p_es->i_id ); } } else { input_SelectES( p_input, p_es ); - intf_WarnMsg( 3, "input info: es selected -> %s (0x%x)", - p_es->psz_desc, p_es->i_id ); + msg_Dbg( p_input, "es selected -> %s (0x%x)", + p_es->psz_desc, p_es->i_id ); } } else { if( i_index != -1 ) { - intf_WarnMsg( 3, "input info: es unselected -> %s (0x%x)", - p_input->stream.pp_selected_es[i_index]->psz_desc, - p_input->stream.pp_selected_es[i_index]->i_id ); + msg_Dbg( p_input, "es unselected -> %s (0x%x)", + p_input->stream.pp_selected_es[i_index]->psz_desc, + p_input->stream.pp_selected_es[i_index]->i_id ); input_UnselectES( p_input, p_input->stream.pp_selected_es[i_index] ); @@ -299,7 +385,7 @@ int input_ChangeES( input_thread_t * p_input, es_descriptor_t * p_es, * b_select is a boolean to know if we have to select or unselect ES *****************************************************************************/ int input_ToggleES( input_thread_t * p_input, es_descriptor_t * p_es, - boolean_t b_select ) + vlc_bool_t b_select ) { vlc_mutex_lock( &p_input->stream.stream_lock ); @@ -348,7 +434,7 @@ int input_ChangeProgram( input_thread_t * p_input, u16 i_program_number ) if ( p_program == NULL ) { - intf_ErrMsg("input: Could not find selected program"); + msg_Err( p_input, "could not find selected program" ); return -1; } @@ -370,8 +456,8 @@ int input_ToggleGrayscale( input_thread_t * p_input ) p_input->stream.control.b_grayscale = !p_input->stream.control.b_grayscale; - intf_WarnMsg( 3, "input warning: changing to %s output", - p_input->stream.control.b_grayscale ? "grayscale" : "color" ); + msg_Dbg( p_input, "changing to %s output", + p_input->stream.control.b_grayscale ? "grayscale" : "color" ); vlc_mutex_unlock( &p_input->stream.control.control_lock ); @@ -388,8 +474,8 @@ int input_ToggleMute( input_thread_t * p_input ) vlc_mutex_lock( &p_input->stream.stream_lock ); p_input->stream.b_new_mute = !p_input->stream.control.b_mute; - intf_WarnMsg( 3, "input warning: %s mute mode", - p_input->stream.control.b_mute ? "activating" : "deactivating" ); + msg_Dbg( p_input, "%s mute mode", + p_input->stream.control.b_mute ? "activating" : "deactivating" ); vlc_mutex_unlock( &p_input->stream.stream_lock ); diff --git a/src/input/input_ext-plugins.c b/src/input/input_ext-plugins.c index 3d7a9b34f0..2f3e53332b 100644 --- a/src/input/input_ext-plugins.c +++ b/src/input/input_ext-plugins.c @@ -2,7 +2,7 @@ * input_ext-plugins.c: useful functions for access and demux plug-ins ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: input_ext-plugins.c,v 1.10 2002/05/21 00:23:37 sam Exp $ + * $Id: input_ext-plugins.c,v 1.11 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -32,7 +32,7 @@ #include #include -#include +#include #ifdef HAVE_SYS_TIME_H # include @@ -91,9 +91,9 @@ /***************************************************************************** * data_buffer_t: shared data type *****************************************************************************/ -typedef struct data_buffer_s +struct data_buffer_s { - struct data_buffer_s * p_next; + data_buffer_t * p_next; /* number of data packets this buffer is referenced from - when it falls * down to 0, the buffer is freed */ @@ -101,7 +101,7 @@ typedef struct data_buffer_s /* size of the current buffer (starting right after this byte) */ size_t i_size; -} data_buffer_t; +}; /***************************************************************************** * input_buffers_t: defines a LIFO per data type to keep @@ -113,20 +113,20 @@ struct \ unsigned int i_depth; \ } NAME; -typedef struct input_buffers_s +struct input_buffers_s { vlc_mutex_t lock; PACKETS_LIFO( pes_packet_t, pes ) PACKETS_LIFO( data_packet_t, data ) PACKETS_LIFO( data_buffer_t, buffers ) size_t i_allocated; -} input_buffers_t; +}; /***************************************************************************** * input_BuffersInit: initialize the cache structures, return a pointer to it *****************************************************************************/ -void * input_BuffersInit( void ) +void * input_BuffersInit( vlc_object_t *p_this ) { input_buffers_t * p_buffers = malloc( sizeof( input_buffers_t ) ); @@ -136,7 +136,7 @@ void * input_BuffersInit( void ) } memset( p_buffers, 0, sizeof( input_buffers_t ) ); - vlc_mutex_init( &p_buffers->lock ); + vlc_mutex_init( p_this, &p_buffers->lock ); return( p_buffers ); } @@ -152,19 +152,13 @@ void * input_BuffersInit( void ) p_packet = p_next; \ } -void input_BuffersEnd( input_buffers_t * p_buffers ) +void input_BuffersEnd( input_thread_t * p_input, input_buffers_t * p_buffers ) { if( p_buffers != NULL ) { - if( p_main->b_stats ) - { - intf_StatMsg( "input buffers stats: pes: %d packets", - p_buffers->pes.i_depth ); - intf_StatMsg( "input buffers stats: data: %d packets", - p_buffers->data.i_depth ); - intf_StatMsg( "input buffers stats: buffers: %d packets", - p_buffers->buffers.i_depth ); - } + msg_Dbg( p_input, "pes: %d packets", p_buffers->pes.i_depth ); + msg_Dbg( p_input, "data: %d packets", p_buffers->data.i_depth ); + msg_Dbg( p_input, "buffers: %d packets", p_buffers->buffers.i_depth ); { /* Free PES */ @@ -192,9 +186,8 @@ void input_BuffersEnd( input_buffers_t * p_buffers ) if( p_buffers->i_allocated ) { - intf_ErrMsg( "input buffers error: %d bytes have not been" - " freed, expect memory leak", - p_buffers->i_allocated ); + msg_Err( p_input, "%d bytes have not been freed, " + "expect memory leak", p_buffers->i_allocated ); } vlc_mutex_destroy( &p_buffers->lock ); @@ -213,8 +206,8 @@ static inline data_buffer_t * NewBuffer( input_buffers_t * p_buffers, /* Safety check */ if( p_buffers->i_allocated > INPUT_MAX_ALLOCATION ) { - intf_ErrMsg( "INPUT_MAX_ALLOCATION reached (%d)", - p_buffers->i_allocated ); +//X intf_Err( "INPUT_MAX_ALLOCATION reached (%d)", +//X p_buffers->i_allocated ); return NULL; } @@ -233,7 +226,7 @@ static inline data_buffer_t * NewBuffer( input_buffers_t * p_buffers, p_buf = malloc( sizeof(input_buffers_t) + i_size ); if( p_buf == NULL ) { - intf_ErrMsg( "Out of memory" ); +//X intf_ErrMsg( "Out of memory" ); return NULL; } p_buf->i_size = i_size; @@ -246,7 +239,7 @@ static inline data_buffer_t * NewBuffer( input_buffers_t * p_buffers, p_buf = malloc( sizeof(input_buffers_t) + i_size ); if( p_buf == NULL ) { - intf_ErrMsg( "Out of memory" ); +//X intf_ErrMsg( "Out of memory" ); return NULL; } p_buf->i_size = i_size; @@ -325,7 +318,7 @@ static inline data_packet_t * ShareBuffer( input_buffers_t * p_buffers, p_data = malloc( sizeof(data_packet_t) ); if( p_data == NULL ) { - intf_ErrMsg( "Out of memory" ); +//X intf_ErrMsg( "Out of memory" ); return NULL; } } @@ -441,7 +434,7 @@ static inline pes_packet_t * NewPES( input_buffers_t * p_buffers ) p_pes = malloc( sizeof(pes_packet_t) ); if( p_pes == NULL ) { - intf_ErrMsg( "Out of memory" ); +//X intf_ErrMsg( "Out of memory" ); return NULL; } } @@ -539,8 +532,9 @@ ssize_t input_FillBuffer( input_thread_t * p_input ) { if( i_remains ) { - FAST_MEMCPY( (byte_t *)p_buf + sizeof(data_buffer_t), - p_input->p_current_data, (size_t)i_remains ); + p_input->p_vlc->pf_memcpy( (byte_t *)p_buf + sizeof(data_buffer_t), + p_input->p_current_data, + (size_t)i_remains ); } ReleaseBuffer( p_input->p_method_data, p_input->p_data_buffer ); } @@ -625,7 +619,7 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, *****************************************************************************/ int input_AccessInit( input_thread_t * p_input ) { - p_input->p_method_data = input_BuffersInit(); + p_input->p_method_data = input_BuffersInit( p_input->p_this ); if( p_input->p_method_data == NULL ) return( -1 ); p_input->p_data_buffer = NULL; p_input->p_current_data = NULL; @@ -657,7 +651,7 @@ void input_AccessEnd( input_thread_t * p_input ) ReleaseBuffer( p_input->p_method_data, p_input->p_data_buffer ); } - input_BuffersEnd( p_input->p_method_data ); + input_BuffersEnd( p_input, p_input->p_method_data ); } @@ -673,22 +667,22 @@ void input_FDClose( input_thread_t * p_input ) { input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; - intf_WarnMsg( 2, "input: closing `%s/%s:%s'", - p_input->psz_access, p_input->psz_demux, p_input->psz_name ); + msg_Info( p_input, "closing `%s/%s:%s'", + p_input->psz_access, p_input->psz_demux, p_input->psz_name ); close( p_access_data->i_handle ); free( p_access_data ); } /***************************************************************************** - * input_FDNetworkClose: close the target + * input_FDNetworkClose: close a network target *****************************************************************************/ void input_FDNetworkClose( input_thread_t * p_input ) { input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data; - intf_WarnMsg( 2, "input: closing network `%s/%s:%s'", - p_input->psz_access, p_input->psz_demux, p_input->psz_name ); + msg_Info( p_input, "closing network `%s/%s:%s'", + p_input->psz_access, p_input->psz_demux, p_input->psz_name ); #ifdef WIN32 closesocket( p_access_data->i_handle ); @@ -717,7 +711,7 @@ ssize_t input_FDRead( input_thread_t * p_input, byte_t * p_buffer, size_t i_len if( i_ret < 0 ) { - intf_ErrMsg( "input error: read() failed (%s)", strerror(errno) ); + msg_Err( p_input, "read failed (%s)", strerror(errno) ); } return( i_ret ); @@ -747,7 +741,7 @@ static inline int NetworkSelect( input_thread_t * p_input ) if( i_ret == -1 && errno != EINTR ) { - intf_ErrMsg( "input error: network select error (%s)", strerror(errno) ); + msg_Err( p_input, "network select error (%s)", strerror(errno) ); } return( i_ret ); @@ -776,7 +770,7 @@ ssize_t input_FDNetworkRead( input_thread_t * p_input, byte_t * p_buffer, if( i_ret < 0 ) { - intf_ErrMsg( "input error: recv() failed (%s)", strerror(errno) ); + msg_Err( p_input, "recv failed (%s)", strerror(errno) ); } return( i_ret ); @@ -799,12 +793,12 @@ void input_FDSeek( input_thread_t * p_input, off_t i_pos ) S.p_selected_area->i_tell = i_pos; if( S.p_selected_area->i_tell > S.p_selected_area->i_size ) { - intf_ErrMsg( "input error: seeking too far" ); + msg_Err( p_input, "seeking too far" ); S.p_selected_area->i_tell = S.p_selected_area->i_size; } else if( S.p_selected_area->i_tell < 0 ) { - intf_ErrMsg( "input error: seeking too early" ); + msg_Err( p_input, "seeking too early" ); S.p_selected_area->i_tell = 0; } vlc_mutex_unlock( &S.stream_lock ); diff --git a/src/input/input_programs.c b/src/input/input_programs.c index 44651497c0..b5816963d5 100644 --- a/src/input/input_programs.c +++ b/src/input/input_programs.c @@ -2,7 +2,7 @@ * input_programs.c: es_descriptor_t, pgrm_descriptor_t management ***************************************************************************** * Copyright (C) 1999-2002 VideoLAN - * $Id: input_programs.c,v 1.88 2002/05/17 00:58:14 sam Exp $ + * $Id: input_programs.c,v 1.89 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * @@ -28,7 +28,7 @@ #include /* memcpy(), memset() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-intf.h" @@ -63,7 +63,7 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len ) { if ( (p_input->stream.p_demux_data = malloc( i_data_len )) == NULL ) { - intf_ErrMsg( "Unable to allocate memory in input_InitStream"); + msg_Err( p_input, "out of memory" ); return 1; } memset( p_input->stream.p_demux_data, 0, i_data_len ); @@ -147,7 +147,7 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input, * sizeof(pgrm_descriptor_t *) ); if( p_input->stream.pp_programs == NULL ) { - intf_ErrMsg( "Unable to realloc memory in input_AddProgram" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } @@ -156,7 +156,7 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input, malloc( sizeof(pgrm_descriptor_t) ); if( p_input->stream.pp_programs[i_pgrm_index] == NULL ) { - intf_ErrMsg( "Unable to allocate memory in input_AddProgram" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } @@ -179,7 +179,7 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input, malloc( i_data_len ); if( p_input->stream.pp_programs[i_pgrm_index]->p_demux_data == NULL ) { - intf_ErrMsg( "Unable to allocate memory in input_AddProgram" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } memset( p_input->stream.pp_programs[i_pgrm_index]->p_demux_data, 0, @@ -213,7 +213,7 @@ void input_DelProgram( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm ) /* If the program wasn't found, do nothing */ if( i_pgrm_index == p_input->stream.i_pgrm_number ) { - intf_ErrMsg( "input error: program does not belong to this input" ); + msg_Err( p_input, "program does not belong to this input" ); return; } @@ -241,8 +241,7 @@ void input_DelProgram( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm ) * sizeof(pgrm_descriptor_t *) ); if( p_input->stream.pp_programs == NULL ) { - intf_ErrMsg( "input error: unable to realloc program list" - " in input_DelProgram" ); + msg_Err( p_input, "cannot realloc memory" ); } } else @@ -272,7 +271,7 @@ input_area_t * input_AddArea( input_thread_t * p_input ) * sizeof(input_area_t *) ); if( p_input->stream.pp_areas == NULL ) { - intf_ErrMsg( "Unable to realloc memory in input_AddArea" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } @@ -281,7 +280,7 @@ input_area_t * input_AddArea( input_thread_t * p_input ) malloc( sizeof(input_area_t) ); if( p_input->stream.pp_areas[i_area_index] == NULL ) { - intf_ErrMsg( "Unable to allocate memory in input_AddArea" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } @@ -324,10 +323,10 @@ int input_SetProgram( input_thread_t * p_input, pgrm_descriptor_t * p_new_prg ) } } /* Get the number of the required audio stream */ - if( p_main->b_audio ) + if( config_GetInt( p_input, "audio" ) ) { /* Default is the first one */ - i_required_audio_es = config_GetIntVariable( "audio-channel" ); + i_required_audio_es = config_GetInt( p_input, "audio-channel" ); if( i_required_audio_es < 0 ) { i_required_audio_es = 1; @@ -339,10 +338,10 @@ int input_SetProgram( input_thread_t * p_input, pgrm_descriptor_t * p_new_prg ) } /* Same thing for subtitles */ - if( p_main->b_video ) + if( config_GetInt( p_input, "video" ) ) { /* for spu, default is none */ - i_required_spu_es = config_GetIntVariable( "spu-channel" ); + i_required_spu_es = config_GetInt( p_input, "spu-channel" ); if( i_required_spu_es < 0 ) { i_required_spu_es = 0; @@ -358,16 +357,16 @@ int input_SetProgram( input_thread_t * p_input, pgrm_descriptor_t * p_new_prg ) switch( p_new_prg->pp_es[i_es_index]->i_cat ) { case VIDEO_ES: - intf_WarnMsg( 4, "Selecting ES %x", - p_new_prg->pp_es[i_es_index]->i_id ); + msg_Dbg( p_input, "selecting ES %x", + p_new_prg->pp_es[i_es_index]->i_id ); input_SelectES( p_input, p_new_prg->pp_es[i_es_index] ); break; case AUDIO_ES: i_audio_es += 1; if( i_audio_es <= i_required_audio_es ) { - intf_WarnMsg( 4, "Selecting ES %x", - p_new_prg->pp_es[i_es_index]->i_id ); + msg_Dbg( p_input, "selecting ES %x", + p_new_prg->pp_es[i_es_index]->i_id ); input_SelectES( p_input, p_new_prg->pp_es[i_es_index]); } break; @@ -376,14 +375,14 @@ int input_SetProgram( input_thread_t * p_input, pgrm_descriptor_t * p_new_prg ) i_spu_es += 1; if( i_spu_es <= i_required_spu_es ) { - intf_WarnMsg( 4, "Selecting ES %x", - p_new_prg->pp_es[i_es_index]->i_id ); + msg_Dbg( p_input, "selecting ES %x", + p_new_prg->pp_es[i_es_index]->i_id ); input_SelectES( p_input, p_new_prg->pp_es[i_es_index] ); } break; default : - intf_WarnMsg( 2, "ES %x has unknown type", - p_new_prg->pp_es[i_es_index]->i_id ); + msg_Dbg( p_input, "ES %x has unknown type", + p_new_prg->pp_es[i_es_index]->i_id ); break; } @@ -416,7 +415,7 @@ void input_DelArea( input_thread_t * p_input, input_area_t * p_area ) /* If the area wasn't found, do nothing */ if( i_area_index == p_input->stream.i_area_nb ) { - intf_ErrMsg( "input error: area does not belong to this input" ); + msg_Err( p_input, "area does not belong to this input" ); return; } @@ -433,8 +432,7 @@ void input_DelArea( input_thread_t * p_input, input_area_t * p_area ) if( p_input->stream.pp_areas == NULL ) { - intf_ErrMsg( "input error: unable to realloc area list" - " in input_DelArea" ); + msg_Err( p_input, "cannot realloc memory" ); } } else @@ -482,7 +480,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, p_es = (es_descriptor_t *)malloc( sizeof(es_descriptor_t) ); if( p_es == NULL ) { - intf_ErrMsg( "Unable to allocate memory in input_AddES" ); + msg_Err( p_input, "out of memory" ); return( NULL); } p_input->stream.i_es_number++; @@ -491,7 +489,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, * sizeof(es_descriptor_t *) ); if( p_input->stream.pp_es == NULL ) { - intf_ErrMsg( "Unable to realloc memory in input_AddES" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } @@ -511,7 +509,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, p_es->p_demux_data = malloc( i_data_len ); if( p_es->p_demux_data == NULL ) { - intf_ErrMsg( "Unable to allocate memory in input_AddES" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } memset( p_es->p_demux_data, 0, i_data_len ); @@ -530,7 +528,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, * sizeof(es_descriptor_t *) ); if( p_pgrm->pp_es == NULL ) { - intf_ErrMsg( "Unable to realloc memory in input_AddES" ); + msg_Err( p_input, "out of memory" ); return( NULL ); } @@ -564,7 +562,7 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es ) /* If the ES wasn't found, do nothing */ if( i_es_index == p_input->stream.i_es_number ) { - intf_ErrMsg( "input error: ES does not belong to this input" ); + msg_Err( p_input, "ES does not belong to this input" ); return; } @@ -593,8 +591,7 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es ) * sizeof(es_descriptor_t *)); if( p_pgrm->pp_es == NULL ) { - intf_ErrMsg( "Unable to realloc memory in " - "input_DelES" ); + msg_Err( p_input, "cannot realloc memory" ); } } else @@ -613,6 +610,14 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es ) free( p_es->p_demux_data ); } + /* Find the ES in the ES table */ + for( i_es_index = 0; i_es_index < p_input->stream.i_es_number; + i_es_index++ ) + { + if( p_input->stream.pp_es[i_es_index] == p_es ) + break; + } + /* Remove this ES from the stream's list of ES */ p_input->stream.i_es_number--; p_input->stream.pp_es[i_es_index] = @@ -624,7 +629,7 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es ) * sizeof(es_descriptor_t *)); if( p_input->stream.pp_es == NULL ) { - intf_ErrMsg( "Unable to realloc memory in input_DelES" ); + msg_Err( p_input, "cannot realloc memory" ); } } else @@ -647,19 +652,19 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es ) { if( p_es == NULL ) { - intf_ErrMsg( "input error: nothing to do in input_SelectES" ); + msg_Err( p_input, "nothing to do in input_SelectES" ); return -1; } - intf_WarnMsg( 4, "input: selecting ES 0x%x", p_es->i_id ); + msg_Dbg( p_input, "selecting ES 0x%x", p_es->i_id ); if( p_es->p_decoder_fifo != NULL ) { - intf_ErrMsg( "ES 0x%x is already selected", p_es->i_id ); + msg_Err( p_input, "ES 0x%x is already selected", p_es->i_id ); return( -1 ); } - p_es->thread_id = 0; + p_es->p_decoder_fifo = NULL; switch( p_es->i_type ) { @@ -667,12 +672,12 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es ) case MPEG1_AUDIO_ES: case MPEG2_AUDIO_ES: case LPCM_AUDIO_ES: - if( p_main->b_audio ) + if( config_GetInt( p_input, "audio" ) ) { /* Release the lock, not to block the input thread during * the creation of the thread. */ vlc_mutex_unlock( &p_input->stream.stream_lock ); - p_es->thread_id = input_RunDecoder( p_input, p_es ); + p_es->p_decoder_fifo = input_RunDecoder( p_input, p_es ); vlc_mutex_lock( &p_input->stream.stream_lock ); } break; @@ -684,23 +689,23 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es ) case MSMPEG4v2_VIDEO_ES: case MSMPEG4v3_VIDEO_ES: case DVD_SPU_ES: - if( p_main->b_video ) + if( config_GetInt( p_input, "video" ) ) { /* Release the lock, not to block the input thread during * the creation of the thread. */ vlc_mutex_unlock( &p_input->stream.stream_lock ); - p_es->thread_id = input_RunDecoder( p_input, p_es ); + p_es->p_decoder_fifo = input_RunDecoder( p_input, p_es ); vlc_mutex_lock( &p_input->stream.stream_lock ); } break; default: - intf_ErrMsg( "Unknown stream type 0x%x", p_es->i_type ); + msg_Err( p_input, "unknown stream type 0x%x", p_es->i_type ); return( -1 ); break; } - if( p_es->thread_id == 0 ) + if( p_es->p_decoder_fifo == NULL ) { return( -1 ); } @@ -718,15 +723,15 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es ) if( p_es == NULL ) { - intf_ErrMsg( "Nothing to do in input_UnselectES" ); + msg_Err( p_input, "nothing to do in input_UnselectES" ); return -1; } - intf_WarnMsg( 4, "input: unselecting ES 0x%x", p_es->i_id ); + msg_Dbg( p_input, "unselecting ES 0x%x", p_es->i_id ); if( p_es->p_decoder_fifo == NULL ) { - intf_ErrMsg( "ES 0x%x is not selected", p_es->i_id ); + msg_Err( p_input, "ES 0x%x is not selected", p_es->i_id ); return( -1 ); } @@ -755,7 +760,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es ) * sizeof(es_descriptor_t *) ); if( p_input->stream.pp_selected_es == NULL ) { - intf_ErrMsg( "Unable to realloc memory in input_UnselectES" ); + msg_Err( p_input, "cannot realloc memory" ); return( -1 ); } } @@ -763,7 +768,8 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es ) { free( p_input->stream.pp_selected_es ); p_input->stream.pp_selected_es = NULL; - intf_WarnMsg( 4, "input: no more selected ES in input_UnselectES" ); return( 1 ); + msg_Dbg( p_input, "no more selected ES" ); + return( 1 ); } } diff --git a/src/input/mpeg_system.c b/src/input/mpeg_system.c index 96bc9406f9..a088d5f5c7 100644 --- a/src/input/mpeg_system.c +++ b/src/input/mpeg_system.c @@ -2,7 +2,7 @@ * mpeg_system.c: TS, PS and PES management ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: mpeg_system.c,v 1.97 2002/05/27 16:01:42 fenrir Exp $ + * $Id: mpeg_system.c,v 1.98 2002/06/01 12:32:01 sam Exp $ * * Authors: Christophe Massiot * Michel Lespinasse @@ -32,7 +32,7 @@ #include /* memcpy(), memset() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-intf.h" @@ -120,7 +120,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) if( MoveChunk( p_header, &p_data, &p_byte, PES_HEADER_SIZE ) != PES_HEADER_SIZE ) { - intf_WarnMsg( 1, "input: PES packet too short to have a header" ); + msg_Warn( p_input, "PES packet too short to have a header" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; @@ -138,8 +138,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) if( (p_header[0] || p_header[1] || (p_header[2] != 1)) ) { /* packet_start_code_prefix != 0x000001 */ - intf_ErrMsg( "input error: data loss, " - "PES packet doesn't start with 0x000001" ); + msg_Err( p_input, "data loss, PES packet does not start with 000001" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; } @@ -152,8 +151,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) { /* PES_packet_length is set and != total received payload */ /* Warn the decoder that the data may be corrupt. */ - intf_WarnMsg( 1, "input: packet corrupted, " - "PES sizes do not match" ); + msg_Warn( p_input, "packet corrupted, PES sizes do not match" ); } switch( p_es->i_stream_id ) @@ -176,7 +174,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) { /* MPEG-2 : the PES header contains at least 3 more bytes. */ size_t i_max_len; - boolean_t b_has_pts, b_has_dts; + vlc_bool_t b_has_pts, b_has_dts; byte_t p_full_header[12]; p_pes->b_data_alignment = p_header[6] & 0x04; @@ -184,8 +182,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) i_max_len = MoveChunk( p_full_header, &p_data, &p_byte, 12 ); if( i_max_len < 2 ) { - intf_WarnMsg( 1, - "PES packet too short to have a MPEG-2 header" ); + msg_Warn( p_input, + "PES packet too short to have a MPEG-2 header" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; @@ -201,8 +199,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) { if( i_max_len < 7 ) { - intf_WarnMsg( 1, - "PES packet too short to have a MPEG-2 header" ); + msg_Warn( p_input, + "PES packet too short to have a MPEG-2 header" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; @@ -219,7 +217,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) { if( i_max_len < 12 ) { - intf_WarnMsg( 1, + msg_Warn( p_input, "PES packet too short to have a MPEG-2 header" ); input_DeletePES( p_input->p_method_data, p_pes ); @@ -237,7 +235,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) else { /* Probably MPEG-1 */ - boolean_t b_has_pts, b_has_dts; + vlc_bool_t b_has_pts, b_has_dts; i_pes_header_size = 6; p_data = p_pes->p_first; @@ -250,7 +248,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) i_pes_header_size++; if( MoveChunk( NULL, &p_data, &p_byte, 1 ) != 1 ) { - intf_WarnMsg( 1, + msg_Warn( p_input, "PES packet too short to have a MPEG-1 header" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; @@ -259,7 +257,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) } if( i_pes_header_size == 23 ) { - intf_ErrMsg( "input error: too much MPEG-1 stuffing" ); + msg_Err( p_input, "too much MPEG-1 stuffing" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; @@ -274,8 +272,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) i_pes_header_size += 2; if( MoveChunk( NULL, &p_data, &p_byte, 2 ) != 2 ) { - intf_WarnMsg( 1, "input: PES packet too short " - "to have a MPEG-1 header" ); + msg_Warn( p_input, + "PES packet too short to have a MPEG-1 header" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; @@ -294,8 +292,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) i_pes_header_size += 4; if( MoveChunk( p_ts, &p_data, &p_byte, 5 ) != 5 ) { - intf_WarnMsg( 1, "input: PES packet too short " - "to have a MPEG-1 header" ); + msg_Warn( p_input, + "PES packet too short to have a MPEG-1 header" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; @@ -312,10 +310,9 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) i_pes_header_size += 5; if( MoveChunk( p_ts, &p_data, &p_byte, 5 ) != 5 ) { - intf_WarnMsg( 1, "input: PES packet too short " - "to have a MPEG-1 header" ); - input_DeletePES( p_input->p_method_data, - p_pes ); + msg_Warn( p_input, + "PES packet too short to have a MPEG-1 header" ); + input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; } @@ -361,7 +358,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) /* Go to the next data packet. */ if( (p_data = p_data->p_next) == NULL ) { - intf_ErrMsg( "input error: PES header bigger than payload" ); + msg_Err( p_input, "PES header bigger than payload" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; @@ -372,7 +369,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) /* This last packet is partly header, partly payload. */ if( i_payload_size < i_pes_header_size ) { - intf_ErrMsg( "input error: PES header bigger than payload" ); + msg_Err( p_input, "PES header bigger than payload" ); input_DeletePES( p_input->p_method_data, p_pes ); p_pes = NULL; return; @@ -388,8 +385,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) } else { - intf_ErrMsg( "input error: no fifo to receive PES %p " - "(who wrote this damn code ?)", p_pes ); + msg_Err( p_input, "no fifo to receive PES %p " + "(who wrote this damn code ?)", p_pes ); input_DeletePES( p_input->p_method_data, p_pes ); } p_pes = NULL; @@ -405,7 +402,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) *****************************************************************************/ void input_GatherPES( input_thread_t * p_input, data_packet_t * p_data, es_descriptor_t * p_es, - boolean_t b_unit_start, boolean_t b_packet_lost ) + vlc_bool_t b_unit_start, vlc_bool_t b_packet_lost ) { #define p_pes (p_es->p_pes) @@ -441,7 +438,7 @@ void input_GatherPES( input_thread_t * p_input, data_packet_t * p_data, * started. */ if( (p_pes = input_NewPES( p_input->p_method_data ) ) == NULL ) { - intf_ErrMsg( "input error: out of memory" ); + msg_Err( p_input, "out of memory" ); p_input->b_error = 1; return; } @@ -523,7 +520,7 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data ) if( p_data->p_demux_start + 10 > p_data->p_payload_end ) { - intf_ErrMsg( "input error: PSM too short : packet corrupt" ); + msg_Err( p_input, "PSM too short, packet corrupt" ); return; } @@ -543,7 +540,7 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data ) + U16_AT(&p_data->p_demux_start[8]); if( p_byte > p_data->p_payload_end ) { - intf_ErrMsg( "input error: PSM too short, packet corrupt" ); + msg_Err( p_input, "PSM too short, packet corrupt" ); return; } /* This is the full size of the elementary_stream_map. @@ -553,7 +550,7 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data ) p_byte += 2; if( p_end > p_data->p_payload_end ) { - intf_ErrMsg( "input error: PSM too short, packet corrupt" ); + msg_Err( p_input, "PSM too short, packet corrupt" ); return; } @@ -627,11 +624,8 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data ) p_input->stream.pp_programs[0]->pp_es[i_new_es_number] ); } - if( p_main->b_stats ) - { - intf_StatMsg( "input info: The stream map after the PSM is now :" ); - input_DumpStream( p_input ); - } + msg_Dbg( p_input, "the stream map after the PSM is now:" ); + input_DumpStream( p_input ); vlc_mutex_unlock( &p_input->stream.stream_lock ); } @@ -667,8 +661,8 @@ ssize_t input_ReadPS( input_thread_t * p_input, data_packet_t ** pp_data ) /* It is common for MPEG-1 streams to pad with zeros * (although it is forbidden by the recommendation), so * don't bother everybody in this case. */ - intf_WarnMsg( 3, "input warning: garbage (0x%.2x%.2x%.2x%.2x)", - p_peek[0], p_peek[1], p_peek[2], p_peek[3] ); + msg_Warn( p_input, "garbage (0x%.2x%.2x%.2x%.2x)", + p_peek[0], p_peek[1], p_peek[2], p_peek[3] ); } /* This is not the startcode of a packet. Read the stream @@ -708,7 +702,7 @@ ssize_t input_ReadPS( input_thread_t * p_input, data_packet_t ** pp_data ) } else { - intf_ErrMsg( "Unable to determine stream type" ); + msg_Err( p_input, "unable to determine stream type" ); return( -1 ); } } @@ -810,11 +804,11 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, p_es->i_cat = AUDIO_ES; #ifdef AUTO_SPAWN if( !p_input->stream.b_seekable ) - if( config_GetIntVariable( "audio-channel" ) + if( config_GetInt( p_input, "audio-channel" ) == (p_es->i_id & 0x1F) || - ( config_GetIntVariable( "audio-channel" ) < 0 + ( config_GetInt( p_input, "audio-channel" ) < 0 && !(p_es->i_id & 0x1F) ) ) - switch( config_GetIntVariable( "audio-type" ) ) + switch( config_GetInt( p_input, "audio-type" ) ) { case -1: case REQUESTED_MPEG: @@ -830,11 +824,11 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, p_es->i_cat = AUDIO_ES; #ifdef AUTO_SPAWN if( !p_input->stream.b_seekable ) - if( config_GetIntVariable( "audio-channel" ) + if( config_GetInt( p_input, "audio-channel" ) == ((p_es->i_id & 0xF00) >> 8) || - ( config_GetIntVariable( "audio-channel" ) < 0 + ( config_GetInt( p_input, "audio-channel" ) < 0 && !((p_es->i_id & 0xF00) >> 8)) ) - switch( config_GetIntVariable( "audio-type" ) ) + switch( config_GetInt( p_input, "audio-type" ) ) { case -1: case REQUESTED_AC3: @@ -848,7 +842,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, p_es->i_type = DVD_SPU_ES; p_es->i_cat = SPU_ES; #ifdef AUTO_SPAWN - if( config_GetIntVariable( "spu-channel" ) + if( config_GetInt( p_input, "spu-channel" ) == ((p_es->i_id & 0x1F00) >> 8) ) { if( !p_input->stream.b_seekable ) @@ -885,7 +879,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) { u32 i_code; - boolean_t b_trash = 0; + vlc_bool_t b_trash = 0; es_descriptor_t * p_es = NULL; i_code = ((u32)p_data->p_demux_start[0] << 24) @@ -911,8 +905,8 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) if( MoveChunk( p_header, &p_data, &p_byte, 14 ) != 14 ) { - intf_WarnMsg( 1, "input: packet too short " - "to have a header" ); + msg_Warn( p_input, + "packet too short to have a header" ); b_trash = 1; break; } @@ -930,7 +924,7 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) /* FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME * This is the biggest kludge ever ! * I don't know what's wrong with mux_rate calculation - * but this heuristic work well : */ + * but this heuristic works well : */ i_mux_rate <<= 1; i_mux_rate /= 3; } @@ -943,8 +937,8 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) if( MoveChunk( p_header, &p_data, &p_byte, 12 ) != 12 ) { - intf_WarnMsg( 1, "input: packet too short " - "to have a header" ); + msg_Warn( p_input, + "packet too short to have a header" ); b_trash = 1; break; } @@ -965,8 +959,8 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) if( i_mux_rate != p_input->stream.i_mux_rate && p_input->stream.i_mux_rate ) { - intf_WarnMsg( 2, "input: mux_rate changed, " - "expect cosmetic errors" ); + msg_Warn( p_input, + "mux_rate changed, expect cosmetic errors" ); } p_input->stream.i_mux_rate = i_mux_rate; @@ -990,8 +984,8 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) default: /* This should not happen */ b_trash = 1; - intf_WarnMsg( 3, "input: unwanted packet received " - "with start code 0x%.8x", i_code ); + msg_Warn( p_input, "unwanted packet received " + "with startcode 0x%.8x", i_code ); } } else @@ -1050,7 +1044,7 @@ ssize_t input_ReadTS( input_thread_t * p_input, data_packet_t ** pp_data ) if( *p_peek != TS_SYNC_CODE ) { - intf_WarnMsg( 3, "input warning: garbage at input (%x)", *p_peek ); + msg_Warn( p_input, "garbage at input (%x)", *p_peek ); if( p_input->i_mtu ) { @@ -1091,13 +1085,13 @@ void input_DemuxTS( input_thread_t * p_input, data_packet_t * p_data, { u16 i_pid; int i_dummy; - boolean_t b_adaptation; /* Adaptation field is present */ - boolean_t b_payload; /* Packet carries payload */ - boolean_t b_unit_start; /* A PSI or a PES start in the packet */ - boolean_t b_trash = 0; /* Is the packet unuseful ? */ - boolean_t b_lost = 0; /* Was there a packet loss ? */ - boolean_t b_psi = 0; /* Is this a PSI ? */ - boolean_t b_pcr = 0; /* Does it have a PCR ? */ + vlc_bool_t b_adaptation; /* Adaptation field is present */ + vlc_bool_t b_payload; /* Packet carries payload */ + vlc_bool_t b_unit_start; /* A PSI or a PES start in the packet */ + vlc_bool_t b_trash = 0; /* Is the packet unuseful ? */ + vlc_bool_t b_lost = 0; /* Was there a packet loss ? */ + vlc_bool_t b_psi = 0; /* Is this a PSI ? */ + vlc_bool_t b_pcr = 0; /* Does it have a PCR ? */ es_descriptor_t * p_es = NULL; es_ts_data_t * p_es_demux = NULL; pgrm_ts_data_t * p_pgrm_demux = NULL; @@ -1185,9 +1179,8 @@ void input_DemuxTS( input_thread_t * p_input, data_packet_t * p_data, * 183 bytes. */ if( b_payload ? (p[4] > 182) : (p[4] != 183) ) { - intf_WarnMsg( 2, - "input: invalid TS adaptation field (%p)", - p_data ); + msg_Warn( p_input, "invalid TS adaptation field (%p)", + p_data ); p_data->b_discard_payload = 1; p_es->c_invalid_packets++; } @@ -1199,10 +1192,9 @@ void input_DemuxTS( input_thread_t * p_input, data_packet_t * p_data, /* discontinuity_indicator */ if( p[5] & 0x80 ) { - intf_WarnMsg( 2, - "input: discontinuity_indicator" - " encountered by TS demux (position read: %d," - " saved: %d)", + msg_Warn( p_input, + "discontinuity_indicator encountered by TS demux " + "(position read: %d, saved: %d)", p[5] & 0x80, p_es_demux->i_continuity_counter ); /* If the PID carries the PCR, there will be a system @@ -1234,15 +1226,15 @@ void input_DemuxTS( input_thread_t * p_input, data_packet_t * p_data, * draft. As there is nothing interesting in this packet * (except PCR that have already been handled), we can trash * the packet. */ - intf_WarnMsg( 3, "input: packet without payload received " - "by TS demux" ); + msg_Warn( p_input, + "packet without payload received by TS demux" ); b_trash = 1; } else if( i_dummy <= 0 ) { /* Duplicate packet: mark it as being to be trashed. */ - intf_WarnMsg( 3, "input: duplicate packet received " - "by TS demux" ); + msg_Warn( p_input, + "duplicate packet received by TS demux" ); b_trash = 1; } else if( p_es_demux->i_continuity_counter == 0xFF ) @@ -1251,8 +1243,8 @@ void input_DemuxTS( input_thread_t * p_input, data_packet_t * p_data, * this ES since the continuity counter ranges between 0 and * 0x0F excepts when it has been initialized by the input: * init the counter to the correct value. */ - intf_WarnMsg( 3, "input: first packet for PID %d received " - "by TS demux", p_es->i_id ); + msg_Warn( p_input, "first packet for PID %d received " + "by TS demux", p_es->i_id ); p_es_demux->i_continuity_counter = (p[3] & 0x0f); } else @@ -1261,10 +1253,10 @@ void input_DemuxTS( input_thread_t * p_input, data_packet_t * p_data, * continuity_counter wrapped and we received a dup packet: * as we don't know, do as if we missed a packet to be sure * to recover from this situation */ - intf_WarnMsg( 2, "input: packet lost by TS demux: " - "current %d, packet %d", - p_es_demux->i_continuity_counter & 0x0f, - p[3] & 0x0f ); + msg_Warn( p_input, + "packet lost by TS demux: current %d, packet %d", + p_es_demux->i_continuity_counter & 0x0f, + p[3] & 0x0f ); b_lost = 1; p_es_demux->i_continuity_counter = p[3] & 0x0f; } /* not continuous */ diff --git a/src/interface/interface.c b/src/interface/interface.c index 46902ccfb0..54df76e3cc 100644 --- a/src/interface/interface.c +++ b/src/interface/interface.c @@ -4,7 +4,7 @@ * interface, such as command line. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: interface.c,v 1.93 2002/04/23 14:16:21 sam Exp $ + * $Id: interface.c,v 1.94 2002/06/01 12:32:01 sam Exp $ * * Authors: Vincent Seguin * @@ -32,7 +32,7 @@ #include /* strerror() */ #include /* off_t */ -#include +#include #include "stream_control.h" #include "input_ext-intf.h" @@ -40,7 +40,6 @@ #include "audio_output.h" #include "interface.h" -#include "intf_playlist.h" #include "video.h" #include "video_output.h" @@ -48,7 +47,7 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -static void intf_Manage( intf_thread_t *p_intf ); +static void Manager( intf_thread_t *p_intf ); /***************************************************************************** * intf_Create: prepare interface before main loop @@ -56,31 +55,30 @@ static void intf_Manage( intf_thread_t *p_intf ); * This function opens output devices and creates specific interfaces. It sends * its own error messages. *****************************************************************************/ -intf_thread_t* intf_Create( void ) +intf_thread_t* intf_Create( vlc_object_t *p_this ) { intf_thread_t * p_intf; char *psz_name; /* Allocate structure */ - p_intf = malloc( sizeof( intf_thread_t ) ); + p_intf = vlc_object_create( p_this, VLC_OBJECT_INTF ); if( !p_intf ) { - intf_ErrMsg( "intf error: cannot create interface thread (%s)", - strerror( ENOMEM ) ); - return( NULL ); + msg_Err( p_this, "out of memory" ); + return NULL; } /* Choose the best module */ - psz_name = config_GetPszVariable( "intf" ); - p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF, psz_name, - (void *)p_intf ); + psz_name = config_GetPsz( p_intf, "intf" ); + p_intf->p_module = module_Need( p_intf, MODULE_CAPABILITY_INTF, + psz_name, (void *)p_intf ); if( psz_name ) free( psz_name ); if( p_intf->p_module == NULL ) { - intf_ErrMsg( "intf error: no suitable intf module" ); - free( p_intf ); - return( NULL ); + msg_Err( p_intf, "no suitable intf module" ); + vlc_object_destroy( p_intf ); + return NULL; } #define f p_intf->p_module->p_functions->intf.functions.intf @@ -89,115 +87,72 @@ intf_thread_t* intf_Create( void ) p_intf->pf_run = f.pf_run; #undef f - /* Initialize callbacks */ - p_intf->pf_manage = intf_Manage; - /* Initialize structure */ - p_intf->b_die = 0; - p_intf->b_menu = 0; p_intf->b_menu_change = 0; /* Initialize mutexes */ - vlc_mutex_init( &p_intf->change_lock ); + vlc_mutex_init( p_intf, &p_intf->change_lock ); + + msg_Dbg( p_intf, "interface initialized" ); - intf_WarnMsg( 1, "intf: interface initialized"); - return( p_intf ); + /* An interface's parent is always the root */ + vlc_object_attach( p_intf, p_intf->p_vlc ); + + return p_intf; } /***************************************************************************** - * intf_Manage: manage interface + * intf_RunThread: launch the interface thread ***************************************************************************** - * This function has to be called regularly by the interface plugin. It - * checks for playlist end, module expiration, message flushing, and a few - * other useful things. + * This function either creates a new thread and runs the interface in it, + * or runs the interface in the current thread, depending on b_block. *****************************************************************************/ -static void intf_Manage( intf_thread_t *p_intf ) +vlc_error_t intf_RunThread( intf_thread_t *p_intf ) { - /* Manage module bank */ - module_ManageBank( ); - - vlc_mutex_lock( &p_input_bank->lock ); - - if( p_input_bank->i_count ) + if( p_intf->b_block ) { - int i_input; - input_thread_t *p_input; - - for( i_input = 0; i_input < p_input_bank->i_count; i_input++ ) + /* Run a manager thread, launch the interface, kill the manager */ + if( vlc_thread_create( p_intf, "manager", Manager, 0 ) ) { - p_input = p_input_bank->pp_input[i_input]; - - if( p_input->i_status == THREAD_OVER ) - { - input_DestroyThread( p_input ); - p_input_bank->pp_input[i_input] = NULL; - p_input_bank->i_count--; - } - else if( ( p_input->i_status == THREAD_READY - || p_input->i_status == THREAD_ERROR ) - && ( p_input->b_error || p_input->b_eof ) ) - { - input_StopThread( p_input, NULL ); - } + msg_Err( p_intf, "cannot spawn manager thread" ); + return VLC_EGENERIC; } - vlc_mutex_unlock( &p_input_bank->lock ); + p_intf->pf_run( p_intf ); + + p_intf->b_die = 1; + + /* Do not join the thread... intf_StopThread will do it for us */ } - /* If no stream is being played, try to find one */ else { -// vlc_mutex_lock( &p_main->p_playlist->change_lock ); - - if( !p_main->p_playlist->b_stopped ) - { - /* Select the next playlist item */ - intf_PlaylistNext( p_main->p_playlist ); - - /* don't loop by default: stop at playlist end */ - if( p_main->p_playlist->i_index == -1 ) - { - p_main->p_playlist->b_stopped = 1; - } - else - { - input_thread_t *p_input; - - p_main->p_playlist->b_stopped = 0; - p_main->p_playlist->i_mode = PLAYLIST_FORWARD + - config_GetIntVariable( "loop-playlist" ); - intf_WarnMsg( 3, "intf: creating new input thread" ); - p_input = input_CreateThread( &p_main->p_playlist->current, - NULL ); - if( p_input != NULL ) - { - p_input_bank->pp_input[ p_input_bank->i_count ] = p_input; - p_input_bank->i_count++; - } - } - - vlc_mutex_unlock( &p_input_bank->lock ); - } - else + /* Run the interface in a separate thread */ + if( vlc_thread_create( p_intf, "interface", p_intf->pf_run, 0 ) ) { - vlc_mutex_unlock( &p_input_bank->lock ); - - /* playing has been stopped: we no longer need outputs */ - if( p_aout_bank->i_count ) - { - /* FIXME kludge that does not work with several outputs */ - aout_DestroyThread( p_aout_bank->pp_aout[0], NULL ); - p_aout_bank->i_count--; - } - if( p_vout_bank->i_count ) - { - vout_DestroyThread( p_vout_bank->pp_vout[0], NULL ); - p_vout_bank->i_count--; - } + msg_Err( p_intf, "cannot spawn interface thread" ); + return VLC_EGENERIC; } + } -// vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + return VLC_SUCCESS; +} + +/***************************************************************************** + * intf_StopThread: end the interface thread + ***************************************************************************** + * This function asks the interface thread to stop. + *****************************************************************************/ +void intf_StopThread( intf_thread_t *p_intf ) +{ + /* Tell the interface to die */ + if( !p_intf->b_block ) + { + p_intf->b_die = 1; } + + /* Wait for the thread to exit */ + vlc_thread_join( p_intf ); } /***************************************************************************** @@ -207,23 +162,38 @@ static void intf_Manage( intf_thread_t *p_intf ) *****************************************************************************/ void intf_Destroy( intf_thread_t *p_intf ) { - /* Destroy interfaces */ + /* Destroy interface */ p_intf->pf_close( p_intf ); -#if 0 - /* Close input thread, if any (blocking) */ - if( p_intf->p_input ) - { - input_DestroyThread( p_intf->p_input, NULL ); - } -#endif - /* Unlock module */ module_Unneed( p_intf->p_module ); vlc_mutex_destroy( &p_intf->change_lock ); /* Free structure */ - free( p_intf ); + vlc_object_destroy( p_intf ); +} + +/* Following functions are local */ + +/***************************************************************************** + * Manager: helper thread for blocking interfaces + ***************************************************************************** + * If the interface is launched in the main thread, it will not listen to + * p_vlc->b_die events because it is only supposed to listen to p_intf->b_die. + * This thread takes care of the matter. + *****************************************************************************/ +static void Manager( intf_thread_t *p_intf ) +{ + while( !p_intf->b_die ) + { + msleep( INTF_IDLE_SLEEP ); + + if( p_intf->p_vlc->b_die ) + { + p_intf->b_die = 1; + return; + } + } } diff --git a/src/interface/intf_eject.c b/src/interface/intf_eject.c index 862cefca6a..f9b69ba501 100644 --- a/src/interface/intf_eject.c +++ b/src/interface/intf_eject.c @@ -2,7 +2,7 @@ * intf_eject.c: CD/DVD-ROM ejection handling functions ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: intf_eject.c,v 1.12 2002/05/30 08:59:42 xav Exp $ + * $Id: intf_eject.c,v 1.13 2002/06/01 12:32:01 sam Exp $ * * Author: Julien Blache for the Linux part * with code taken from the Linux "eject" command @@ -24,7 +24,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -#include +#include #include #include @@ -107,7 +107,7 @@ static int EjectSCSI ( int i_fd ); * returns 1 on failure * returns -1 if not implemented *****************************************************************************/ -int intf_Eject( const char *psz_device ) +int intf_Eject( vlc_object_t *p_this, const char *psz_device ) { int i_ret; @@ -138,7 +138,7 @@ int intf_Eject( const char *psz_device ) if( i_ret == 0 && ferror( p_eject ) != 0 ) { pclose( p_eject ); - return 1; + return VLC_EGENERIC; } pclose( p_eject ); @@ -147,7 +147,7 @@ int intf_Eject( const char *psz_device ) if( strstr( psz_result, "Disk Ejected" ) != NULL ) { - return 0; + return VLC_SUCCESS; } } } @@ -226,8 +226,8 @@ int intf_Eject( const char *psz_device ) if( i_fd == -1 ) { - intf_ErrMsg( "intf error: couldn't open device %s", psz_device ); - return 1; + msg_Err( p_this, "could not open device %s", psz_device ); + return VLC_EGENERIC; } #if defined(SYS_LINUX) && defined(HAVE_LINUX_VERSION_H) @@ -241,14 +241,14 @@ int intf_Eject( const char *psz_device ) if( i_ret != 0 ) { - intf_ErrMsg( "intf error: couldn't eject %s", psz_device ); + msg_Err( p_this, "could not eject %s", psz_device ); } #elif defined (HAVE_DVD_H) i_ret = ioctl( i_fd, CDROMEJECT, 0 ); #else - intf_ErrMsg( "intf error: CD-Rom ejection unsupported on this platform" ); + msg_Warn( p_this, "CD-Rom ejection unsupported on this platform" ); i_ret = -1; #endif @@ -286,7 +286,7 @@ static int EjectSCSI( int i_fd ) i_status = ioctl( i_fd, SCSI_IOCTL_SEND_COMMAND, (void *)&scsi_cmd ); if( i_status != 0 ) { - return 1; + return VLC_EGENERIC; } scsi_cmd.inlen = 0; @@ -300,7 +300,7 @@ static int EjectSCSI( int i_fd ) i_status = ioctl( i_fd, SCSI_IOCTL_SEND_COMMAND, (void *)&scsi_cmd ); if( i_status != 0 ) { - return 1; + return VLC_EGENERIC; } scsi_cmd.inlen = 0; @@ -314,7 +314,7 @@ static int EjectSCSI( int i_fd ) i_status = ioctl( i_fd, SCSI_IOCTL_SEND_COMMAND, (void *)&scsi_cmd ); if( i_status != 0 ) { - return 1; + return VLC_EGENERIC; } /* Force kernel to reread partition table when new disc inserted */ diff --git a/src/interface/intf_playlist.c b/src/interface/intf_playlist.c deleted file mode 100644 index 300c8c4df4..0000000000 --- a/src/interface/intf_playlist.c +++ /dev/null @@ -1,397 +0,0 @@ -/***************************************************************************** - * intf_playlist.c : Playlist management functions - ***************************************************************************** - * Copyright (C) 1999-2001 VideoLAN - * $Id: intf_playlist.c,v 1.14 2002/05/17 00:58:13 sam Exp $ - * - * Authors: Samuel Hocevar - * - * 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 /* free(), strtol() */ -#include /* sprintf() */ -#include /* strerror() */ -#include /* ENOMEM */ - -#include - -#include "intf_playlist.h" - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static void NextItem( playlist_t * p_playlist ); - -/***************************************************************************** - * intf_PlaylistCreate: create playlist - ***************************************************************************** - * Create a playlist structure. - *****************************************************************************/ -playlist_t * intf_PlaylistCreate ( void ) -{ - playlist_t *p_playlist; - - /* Allocate structure */ - p_playlist = malloc( sizeof( playlist_t ) ); - if( !p_playlist ) - { - intf_ErrMsg( "intf error: couldn't create playlist (%s)", - strerror( ENOMEM ) ); - return( NULL ); - } - - return( p_playlist ); -} - -/***************************************************************************** - * intf_PlaylistInit: initialize playlist - ***************************************************************************** - * Initialize a playlist structure. - *****************************************************************************/ -void intf_PlaylistInit ( playlist_t * p_playlist ) -{ - vlc_mutex_init( &p_playlist->change_lock ); - - p_playlist->i_index = -1; /* -1 means we are not playing anything yet */ - p_playlist->i_size = 0; - - p_playlist->i_mode = PLAYLIST_FORWARD; - p_playlist->i_seed = 0; - p_playlist->b_stopped = 0; - - /* There is no current item */ - p_playlist->current.i_type = 0; - p_playlist->current.i_status = 0; - p_playlist->current.psz_name = NULL; - - /* The playlist is empty */ - p_playlist->p_item = NULL; - - intf_WarnMsg( 3, "intf: playlist initialized" ); -} - -/***************************************************************************** - * intf_PlaylistAdd: add an item to the playlist - ***************************************************************************** - * Add an item to the playlist at position i_pos. If i_pos is PLAYLIST_END, - * add it at the end regardless of the playlist current size. - *****************************************************************************/ -int intf_PlaylistAdd( playlist_t * p_playlist, int i_pos, - const char * psz_item ) -{ - int i_index; - playlist_item_t * p_item; - - vlc_mutex_lock( &p_playlist->change_lock ); - - if( i_pos == PLAYLIST_END ) - { - i_pos = p_playlist->i_size; - } - else if( i_pos > p_playlist->i_size ) - { - intf_ErrMsg( "intf error: inserting item beyond playlist size" ); - vlc_mutex_unlock( &p_playlist->change_lock ); - return( -1 ); - } - - /* Increment playlist size */ - p_playlist->i_size++; - p_playlist->p_item = realloc( p_playlist->p_item, - p_playlist->i_size * sizeof( playlist_item_t ) ); - - /* Move second place of the playlist to make room for new item */ - for( i_index = p_playlist->i_size - 1; i_index > i_pos; i_index-- ) - { - p_playlist->p_item[ i_index ] = p_playlist->p_item[ i_index - 1 ]; - } - - /* Insert the new item */ - p_item = &p_playlist->p_item[ i_pos ]; - - p_item->i_type = 0; - p_item->i_status = 0; - p_item->psz_name = strdup( psz_item ); - - intf_WarnMsg( 3, "intf: added `%s' to playlist", psz_item ); - - vlc_mutex_unlock( &p_playlist->change_lock ); - - return( 0 ); -} - -/***************************************************************************** - * intf_PlaylistNext: switch to next playlist item - ***************************************************************************** - * Switch to the next item of the playlist. If there is no next item, the - * position of the resulting item is set to -1. - *****************************************************************************/ -void intf_PlaylistNext( playlist_t * p_playlist ) -{ - vlc_mutex_lock( &p_playlist->change_lock ); - - NextItem( p_playlist ); - - vlc_mutex_unlock( &p_playlist->change_lock ); -} - -/***************************************************************************** - * intf_PlaylistPrev: switch to previous playlist item - ***************************************************************************** - * Switch to the previous item of the playlist. If there is no previous - * item, the position of the resulting item is set to -1. - *****************************************************************************/ -void intf_PlaylistPrev( playlist_t * p_playlist ) -{ - vlc_mutex_lock( &p_playlist->change_lock ); - - p_playlist->i_mode = -p_playlist->i_mode; - NextItem( p_playlist ); - p_playlist->i_mode = -p_playlist->i_mode; - - vlc_mutex_unlock( &p_playlist->change_lock ); -} - -/***************************************************************************** - * intf_PlaylistDelete: delete an item from the playlist - ***************************************************************************** - * Delete the item in the playlist with position i_pos. - *****************************************************************************/ -int intf_PlaylistDelete( playlist_t * p_playlist, int i_pos ) -{ - int i_index; - char * psz_name; - - vlc_mutex_lock( &p_playlist->change_lock ); - - if( !p_playlist->i_size || i_pos >= p_playlist->i_size ) - { - intf_ErrMsg( "intf error: deleting item beyond playlist size" ); - vlc_mutex_unlock( &p_playlist->change_lock ); - return( -1 ); - } - - /* Store the location of the item's name */ - psz_name = p_playlist->p_item[ i_pos ].psz_name; - - /* Fill the room by moving the next items */ - for( i_index = i_pos; i_index < p_playlist->i_size - 1; i_index++ ) - { - p_playlist->p_item[ i_index ] = p_playlist->p_item[ i_index + 1 ]; - } - - if( i_pos < p_playlist->i_index ) - p_playlist->i_index--; - - - /* Decrement playlist size */ - p_playlist->i_size--; - if( p_playlist->i_size ) - { - p_playlist->p_item = realloc( p_playlist->p_item, - p_playlist->i_size * sizeof( playlist_item_t ) ); - } - else - { - free( p_playlist->p_item ); - p_playlist->p_item = NULL; - } - - intf_WarnMsg( 3, "intf: removed `%s' from playlist", psz_name ); - - - /* Delete the item */ - free( psz_name ); - - vlc_mutex_unlock( &p_playlist->change_lock ); - - return( 0 ); -} - -/***************************************************************************** - * intf_PlaylistDestroy: destroy the playlist - ***************************************************************************** - * Delete all items in the playlist and free the playlist structure. - *****************************************************************************/ -void intf_PlaylistDestroy( playlist_t * p_playlist ) -{ - int i_index; - - for( i_index = p_playlist->i_size - 1; p_playlist->i_size; i_index-- ) - { - intf_PlaylistDelete( p_playlist, i_index ); - } - - vlc_mutex_destroy( &p_playlist->change_lock ); - - if( p_playlist->current.psz_name != NULL ) - { - free( p_playlist->current.psz_name ); - } - - free( p_playlist ); - - intf_WarnMsg( 3, "intf: playlist destroyed" ); -} - -/***************************************************************************** - * intf_PlaylistJumpto: go to a specified position in playlist. - *****************************************************************************/ -void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos) -{ - vlc_mutex_lock( &p_playlist->change_lock ); - - if( i_pos < -1 ) - { - i_pos = -1; - } - - if( i_pos != -1 ) - { - if( p_playlist->current.psz_name != NULL ) - { - free( p_playlist->current.psz_name ); - } - - p_playlist->current = p_playlist->p_item[ i_pos ]; - p_playlist->current.psz_name = strdup( p_playlist->current.psz_name ); - } - - p_playlist->i_index = i_pos; - p_playlist->b_stopped = 0; - - vlc_mutex_unlock( &p_playlist->change_lock ); -} - -/* URL-decode a file: URL path, return NULL if it's not what we expect */ -void intf_UrlDecode( char *encoded_path ) -{ - char *tmp = NULL, *cur = NULL, *ext = NULL; - int realchar; - - if( !encoded_path || *encoded_path == '\0' ) - { - return; - } - - cur = encoded_path ; - - tmp = calloc(strlen(encoded_path) + 1, sizeof(char) ); - - while ( ( ext = strchr(cur, '%') ) != NULL) - { - strncat(tmp, cur, (ext - cur) / sizeof(char)); - ext++; - - if (!sscanf(ext, "%2x", &realchar)) - { - free(tmp); - return; - } - - tmp[strlen(tmp)] = (char)realchar; - - cur = ext + 2; - } - - strcat(tmp, cur); - strcpy(encoded_path,tmp); -} - -/***************************************************************************** - * Following functions are local - *****************************************************************************/ - -/***************************************************************************** - * NextItem: select next playlist item - ***************************************************************************** - * This function copies the next playlist item to the current structure, - * depending on the playlist browsing mode. - *****************************************************************************/ -static void NextItem( playlist_t * p_playlist ) -{ - if( !p_playlist->i_size ) - { - p_playlist->i_index = -1; - } - else - { - switch( p_playlist->i_mode ) - { - case PLAYLIST_FORWARD: - p_playlist->i_index++; - if( p_playlist->i_index > p_playlist->i_size - 1 ) - { - p_playlist->i_index = -1; - } - break; - - case PLAYLIST_FORWARD_LOOP: - p_playlist->i_index++; - if( p_playlist->i_index > p_playlist->i_size - 1 ) - { - p_playlist->i_index = 0; - } - break; - - case PLAYLIST_BACKWARD: - p_playlist->i_index--; - if( p_playlist->i_index < 0 ) - { - p_playlist->i_index = -1; - } - break; - - case PLAYLIST_BACKWARD_LOOP: - p_playlist->i_index--; - if( p_playlist->i_index < 0 ) - { - p_playlist->i_index = p_playlist->i_size - 1; - } - break; - - case PLAYLIST_REPEAT_CURRENT: - /* Just repeat what we were doing */ - if( p_playlist->i_index < 0 - || p_playlist->i_index > p_playlist->i_size - 1 ) - { - p_playlist->i_index = 0; - } - break; - - case PLAYLIST_RANDOM: - /* FIXME: TODO ! */ - p_playlist->i_index++; - if( p_playlist->i_index > p_playlist->i_size - 1 ) - { - p_playlist->i_index = 0; - } - break; - } - - /* Duplicate the playlist entry */ - if( p_playlist->i_index != -1 ) - { - if( p_playlist->current.psz_name != NULL ) - { - free( p_playlist->current.psz_name ); - } - p_playlist->current = p_playlist->p_item[ p_playlist->i_index ]; - p_playlist->current.psz_name - = strdup( p_playlist->current.psz_name ); - } - } -} - diff --git a/src/interface/main.c b/src/interface/main.c deleted file mode 100644 index 3c8571cfcd..0000000000 --- a/src/interface/main.c +++ /dev/null @@ -1,1490 +0,0 @@ -/***************************************************************************** - * main.c: main vlc source - * Includes the main() function for vlc. Parses command line, start interface - * and spawn threads. - ***************************************************************************** - * Copyright (C) 1998-2001 VideoLAN - * $Id: main.c,v 1.195 2002/05/30 08:17:04 gbazin Exp $ - * - * Authors: Vincent Seguin - * Samuel Hocevar - * Gildas Bazin - * - * 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. - *****************************************************************************/ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#include /* SIGHUP, SIGINT, SIGKILL */ -#include /* sprintf() */ -#include /* longjmp, setjmp */ - -#include - -#ifdef HAVE_GETOPT_LONG -# ifdef HAVE_GETOPT_H -# include /* getopt() */ -# endif -#else -# include "GNUgetopt/getopt.h" -#endif - -#ifdef SYS_DARWIN -# include /* Altivec detection */ -# include /* some day the header files||compiler * - will define it for us */ -# include -#endif - -#ifndef WIN32 -# include /* BSD: struct in_addr */ -#endif - -#ifdef HAVE_UNISTD_H -# include -#elif defined( _MSC_VER ) && defined( _WIN32 ) -# include -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif - -#include /* ENOMEM */ -#include /* getenv(), strtol(), */ -#include /* strerror() */ - -#include "netutils.h" /* network_ChannelJoin */ - -#include "stream_control.h" -#include "input_ext-intf.h" - -#include "intf_playlist.h" -#include "interface.h" - -#include "audio_output.h" - -#include "video.h" -#include "video_output.h" - -/***************************************************************************** - * Configuration options for the main program. Each module will also separatly - * define its own configuration options. - * Look into configuration.h if you need to know more about the following - * macros. - * - *****************************************************************************/ -#define __BUILTIN__ -#define MODULE_NAME main -#include "modules_inner.h" /* for configuration stuff */ - - -#define INTF_TEXT N_("interface module") -#define INTF_LONGTEXT N_( \ - "This option allows you to select the interface used by vlc.\nNote that " \ - "the default behavior is to automatically select the best module " \ - "available.") - -#define WARNING_TEXT N_("warning level (or use -v, -vv, etc...)") -#define WARNING_LONGTEXT N_( \ - "Increasing the warning level will allow you to see more debug messages " \ - "and can sometimes help you to troubleshoot a problem.") - -#define STATS_TEXT N_("output statistics") -#define STATS_LONGTEXT N_( \ - "Enabling the stats mode will flood your log console with various " \ - "statistics messages.") - -#define INTF_PATH_TEXT N_("interface default search path") -#define INTF_PATH_LONGTEXT N_( \ - "This option allows you to set the default path that the interface will " \ - "open when looking for a file.") - -#define AOUT_TEXT N_("audio output module") -#define AOUT_LONGTEXT N_( \ - "This option allows you to select the audio audio output method used by " \ - "vlc.\nNote that the default behavior is to automatically select the " \ - "best method available.") - -#define AUDIO_TEXT N_("enable audio") -#define AUDIO_LONGTEXT N_( \ - "You can completely disable the audio output. In this case the audio " \ - "decoding stage won't be done, and it will also save some " \ - "processing power.") - -#define MONO_TEXT N_("force mono audio") -#define MONO_LONGTEXT N_("This will force a mono audio output") - -#define VOLUME_TEXT N_("audio output volume") -#define VOLUME_LONGTEXT N_( \ - "You can set the default audio output volume here, in a range from 0 to " \ - "1024.") - -#define FORMAT_TEXT N_("audio output format") -#define FORMAT_LONGTEXT N_( \ - "You can force the audio output format here.\n" \ - "0 -> 16 bits signed native endian (default)\n" \ - "1 -> 8 bits unsigned\n" \ - "2 -> 16 bits signed little endian\n" \ - "3 -> 16 bits signed big endian\n" \ - "4 -> 8 bits signed\n" \ - "5 -> 16 bits unsigned little endian\n" \ - "6 -> 16 bits unsigned big endian\n" \ - "7 -> mpeg2 audio (unsupported)\n" \ - "8 -> ac3 pass-through") - -#define RATE_TEXT N_("audio output frequency (Hz)") -#define RATE_LONGTEXT N_( \ - "You can force the audio output frequency here.\nCommon values are " \ - "48000, 44100, 32000, 22050, 16000, 11025, 8000.") - -#define DESYNC_TEXT N_("compensate desynchronization of audio (in ms)") -#define DESYNC_LONGTEXT N_( \ - "This option allows you to delay the audio output. This can be handy if " \ - "you notice a lag between the video and the audio.") - -#define VOUT_TEXT N_("video output module") -#define VOUT_LONGTEXT N_( \ - "This option allows you to select the video output method used by vlc.\n" \ - "Note that the default behavior is to automatically select the best " \ - "method available.") - -#define VIDEO_TEXT N_("enable video") -#define VIDEO_LONGTEXT N_( \ - "You can completely disable the video output. In this case the video " \ - "decoding stage won't be done, and it will also save some " \ - "processing power.") - -#define DISPLAY_TEXT N_("display identifier") -#define DISPLAY_LONGTEXT N_( \ - "This is the local display port that will be used for X11 drawing. " \ - "For instance :0.1.") - -#define WIDTH_TEXT N_("video width") -#define WIDTH_LONGTEXT N_( \ - "You can enforce the video width here.\nNote that by default vlc will " \ - "adapt to the video characteristics.") - -#define HEIGHT_TEXT N_("video height") -#define HEIGHT_LONGTEXT N_( \ - "You can enforce the video height here.\nNote that by default vlc will " \ - "adapt to the video characteristics.") - -#define ZOOM_TEXT N_("zoom video") -#define ZOOM_LONGTEXT N_( \ - "You can zoom the video by the specified factor.") - -#define GRAYSCALE_TEXT N_("grayscale video output") -#define GRAYSCALE_LONGTEXT N_( \ - "When enabled, the color information from the video won't be decoded " \ - "(this can also allow you to save some processing power).") - -#define FULLSCREEN_TEXT N_("fullscreen video output") -#define FULLSCREEN_LONGTEXT N_( \ - "If this option is enabled, vlc will always start a video in fullscreen " \ - "mode.") - -#define OVERLAY_TEXT N_("overlay video output") -#define OVERLAY_LONGTEXT N_( \ - "If enabled, vlc will try to take advantage of the overlay capabilities " \ - "of you graphics card.") - -#define SPUMARGIN_TEXT N_("force SPU position") -#define SPUMARGIN_LONGTEXT N_( \ - "You can use this option to place the sub-titles under the movie, " \ - "instead of over the movie. Try several positions.") - -#define FILTER_TEXT N_("video filter module") -#define FILTER_LONGTEXT N_( \ - "This will allow you to add a post-processing filter to enhance the " \ - "picture quality, for instance deinterlacing, or to clone or distort " \ - "the video window.") - -#define SERVER_PORT_TEXT N_("server port") -#define SERVER_PORT_LONGTEXT N_( \ - "This is the port used for UDP streams. By default, we chose 1234.") - -#define NETCHANNEL_TEXT N_("enable network channel mode") -#define NETCHANNEL_LONGTEXT N_( \ - "Activate this option if you want to use the VideoLAN Channel Server.") - -#define CHAN_SERV_TEXT N_("channel server address") -#define CHAN_SERV_LONGTEXT N_( \ - "Indicate here the address of the VideoLAN Channel Server.") - -#define CHAN_PORT_TEXT N_("channel server port") -#define CHAN_PORT_LONGTEXT N_( \ - "Indicate here the port on which the VideoLAN Channel Server runs.") - -#define IFACE_TEXT N_("network interface") -#define IFACE_LONGTEXT N_( \ - "If you have several interfaces on your Linux machine and use the " \ - "VLAN solution, you may indicate here which interface to use.") - -#define INPUT_PROGRAM_TEXT N_("choose program (SID)") -#define INPUT_PROGRAM_LONGTEXT N_( \ - "Choose the program to select by giving its Service ID.") - -#define INPUT_AUDIO_TEXT N_("choose audio") -#define INPUT_AUDIO_LONGTEXT N_( \ - "Give the default type of audio you want to use in a DVD.") - -#define INPUT_CHAN_TEXT N_("choose channel") -#define INPUT_CHAN_LONGTEXT N_( \ - "Give the stream number of the audio channel you want to use in a DVD " \ - "(from 1 to n).") - -#define INPUT_SUBT_TEXT N_("choose subtitles") -#define INPUT_SUBT_LONGTEXT N_( \ - "Give the stream number of the subtitle channel you want to use in a DVD "\ - "(from 1 to n).") - -#define DVD_DEV_TEXT N_("DVD device") -#define DVD_DEV_LONGTEXT N_( \ - "This is the default DVD device to use.") - -#define VCD_DEV_TEXT N_("VCD device") -#define VCD_DEV_LONGTEXT N_( \ - "This is the default VCD device to use.") - -#define IPV6_TEXT N_("force IPv6") -#define IPV6_LONGTEXT N_( \ - "If you check this box, IPv6 will be used by default for all UDP and " \ - "HTTP connections.") - -#define IPV4_TEXT N_("force IPv4") -#define IPV4_LONGTEXT N_( \ - "If you check this box, IPv4 will be used by default for all UDP and " \ - "HTTP connections.") - -#define ADEC_MPEG_TEXT N_("choose MPEG audio decoder") -#define ADEC_MPEG_LONGTEXT N_( \ - "This allows you to select the MPEG audio decoder you want to use. " \ - "Common choices are builtin and mad.") - -#define ADEC_AC3_TEXT N_("choose AC3 audio decoder") -#define ADEC_AC3_LONGTEXT N_( \ - "This allows you to select the AC3/A52 audio decoder you want to use. " \ - "Common choices are builtin and a52.") - -#define MMX_TEXT N_("enable CPU MMX support") -#define MMX_LONGTEXT N_( \ - "If your processor supports the MMX instructions set, vlc can take " \ - "advantage of them.") - -#define THREE_DN_TEXT N_("enable CPU 3D Now! support") -#define THREE_DN_LONGTEXT N_( \ - "If your processor supports the 3D Now! instructions set, vlc can take "\ - "advantage of them.") - -#define MMXEXT_TEXT N_("enable CPU MMX EXT support") -#define MMXEXT_LONGTEXT N_( \ - "If your processor supports the MMX EXT instructions set, vlc can take "\ - "advantage of them.") - -#define SSE_TEXT N_("enable CPU SSE support") -#define SSE_LONGTEXT N_( \ - "If your processor supports the SSE instructions set, vlc can take " \ - "can take advantage of them.") - -#define ALTIVEC_TEXT N_("enable CPU AltiVec support") -#define ALTIVEC_LONGTEXT N_( \ - "If your processor supports the AltiVec instructions set, vlc can take "\ - "advantage of them.") - -#define PL_LAUNCH_TEXT N_("launch playlist on startup") -#define PL_LAUNCH_LONGTEXT N_( \ - "If you want vlc to start playing on startup, then enable this option.") - -#define PL_ENQUEUE_TEXT N_("enqueue items in playlist") -#define PL_ENQUEUE_LONGTEXT N_( \ - "If you want vlc to add items to the playlist as you open them, then " \ - "enable this option.") - -#define PL_LOOP_TEXT N_("loop playlist on end") -#define PL_LOOP_LONGTEXT N_( \ - "If you want vlc to keep playing the playlist indefinitely then enable " \ - "this option.") - -#define MEMCPY_TEXT N_("memory copy module") -#define MEMCPY_LONGTEXT N_( \ - "You can select wich memory copy module you want to use. By default vlc " \ - "will select the fastest one supported by your hardware.") - -#define ACCESS_TEXT N_("access module") -#define ACCESS_LONGTEXT N_( \ - "This is a legacy entry to let you configure access modules") - -#define DEMUX_TEXT N_("demux module") -#define DEMUX_LONGTEXT N_( \ - "This is a legacy entry to let you configure demux modules") - -#define FAST_PTHREAD_TEXT N_("fast pthread on NT/2K/XP (developpers only)") -#define FAST_PTHREAD_LONGTEXT N_( \ - "On Windows NT/2K/XP we use a slow but correct pthread implementation, " \ - "you can also use this faster implementation but you might experience " \ - "problems with it.") - -/* - * Quick usage guide for the configuration options: - * - * MODULE_CONFIG_START - * MODULE_CONFIG_STOP - * ADD_CATEGORY_HINT( N_(text), longtext ) - * ADD_SUBCATEGORY_HINT( N_(text), longtext ) - * ADD_STRING( option_name, value, p_callback, N_(text), N_(longtext) ) - * ADD_FILE( option_name, psz_value, p_callback, N_(text), N_(longtext) ) - * ADD_MODULE( option_name, psz_value, i_capability, p_callback, - * N_(text), N_(longtext) ) - * ADD_INTEGER( option_name, i_value, p_callback, N_(text), N_(longtext) ) - * ADD_BOOL( option_name, b_value, p_callback, N_(text), N_(longtext) ) - */ - -MODULE_CONFIG_START - -/* Interface options */ -ADD_CATEGORY_HINT( N_("Interface"), NULL) -ADD_MODULE_WITH_SHORT ( "intf", 'I', MODULE_CAPABILITY_INTF, NULL, NULL, INTF_TEXT, INTF_LONGTEXT ) -ADD_INTEGER ( "warning", 0, NULL, WARNING_TEXT, WARNING_LONGTEXT ) -ADD_BOOL ( "stats", 0, NULL, STATS_TEXT, STATS_LONGTEXT ) -ADD_STRING ( "search-path", NULL, NULL, INTF_PATH_TEXT, INTF_PATH_LONGTEXT ) - -/* Audio options */ -ADD_CATEGORY_HINT( N_("Audio"), NULL) -ADD_MODULE_WITH_SHORT ( "aout", 'A', MODULE_CAPABILITY_AOUT, NULL, NULL, AOUT_TEXT, AOUT_LONGTEXT ) -ADD_BOOL ( "audio", 1, NULL, AUDIO_TEXT, AUDIO_LONGTEXT ) -ADD_BOOL ( "mono", 0, NULL, MONO_TEXT, MONO_LONGTEXT ) -ADD_INTEGER ( "volume", VOLUME_DEFAULT, NULL, VOLUME_TEXT, VOLUME_LONGTEXT ) -ADD_INTEGER ( "rate", 44100, NULL, RATE_TEXT, RATE_LONGTEXT ) -ADD_INTEGER ( "desync", 0, NULL, DESYNC_TEXT, DESYNC_LONGTEXT ) -ADD_INTEGER ( "audio-format", 0, NULL, FORMAT_TEXT, FORMAT_LONGTEXT ) - -/* Video options */ -ADD_CATEGORY_HINT( N_("Video"), NULL ) -ADD_MODULE_WITH_SHORT ( "vout", 'V', MODULE_CAPABILITY_VOUT, NULL, NULL, VOUT_TEXT, VOUT_LONGTEXT ) -ADD_BOOL ( "video", 1, NULL, VIDEO_TEXT, VIDEO_LONGTEXT ) -ADD_INTEGER ( "width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT ) -ADD_INTEGER ( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT ) -ADD_FLOAT ( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT ) -ADD_BOOL ( "grayscale", 0, NULL, GRAYSCALE_TEXT, GRAYSCALE_LONGTEXT ) -ADD_BOOL ( "fullscreen", 0, NULL, FULLSCREEN_TEXT, FULLSCREEN_LONGTEXT ) -ADD_BOOL ( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT ) -ADD_INTEGER ( "spumargin", -1, NULL, SPUMARGIN_TEXT, SPUMARGIN_LONGTEXT ) -ADD_MODULE ( "filter", MODULE_CAPABILITY_VOUT, NULL, NULL, FILTER_TEXT, FILTER_LONGTEXT ) - -/* Input options */ -ADD_CATEGORY_HINT( N_("Input"), NULL ) -ADD_INTEGER ( "server-port", 1234, NULL, SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT ) -ADD_BOOL ( "network-channel", 0, NULL, NETCHANNEL_TEXT, NETCHANNEL_LONGTEXT ) -ADD_STRING ( "channel-server", "localhost", NULL, CHAN_SERV_TEXT, CHAN_SERV_LONGTEXT ) -ADD_INTEGER ( "channel-port", 6010, NULL, CHAN_PORT_TEXT, CHAN_PORT_LONGTEXT ) -ADD_STRING ( "iface", "eth0", NULL, IFACE_TEXT, IFACE_LONGTEXT ) - -ADD_INTEGER ( "program", 0, NULL, INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT ) -ADD_INTEGER ( "audio-type", -1, NULL, INPUT_AUDIO_TEXT, INPUT_AUDIO_LONGTEXT ) -ADD_INTEGER ( "audio-channel", -1, NULL, INPUT_CHAN_TEXT, INPUT_CHAN_LONGTEXT ) -ADD_INTEGER ( "spu-channel", -1, NULL, INPUT_SUBT_TEXT, INPUT_SUBT_LONGTEXT ) - -ADD_STRING ( "dvd", DVD_DEVICE, NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT ) -ADD_STRING ( "vcd", VCD_DEVICE, NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT ) - -ADD_BOOL_WITH_SHORT ( "ipv6", '6', 0, NULL, IPV6_TEXT, IPV6_LONGTEXT ) -ADD_BOOL_WITH_SHORT ( "ipv4", '4', 0, NULL, IPV4_TEXT, IPV4_LONGTEXT ) - -/* Decoder options */ -ADD_CATEGORY_HINT( N_("Decoders"), NULL ) -ADD_MODULE ( "mpeg-adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_MPEG_TEXT, ADEC_MPEG_LONGTEXT ) -ADD_MODULE ( "ac3-adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_AC3_TEXT, ADEC_AC3_LONGTEXT ) - -/* CPU options */ -ADD_CATEGORY_HINT( N_("CPU"), NULL ) -ADD_BOOL ( "mmx", 1, NULL, MMX_TEXT, MMX_LONGTEXT ) -ADD_BOOL ( "3dn", 1, NULL, THREE_DN_TEXT, THREE_DN_LONGTEXT ) -ADD_BOOL ( "mmxext", 1, NULL, MMXEXT_TEXT, MMXEXT_LONGTEXT ) -ADD_BOOL ( "sse", 1, NULL, SSE_TEXT, SSE_LONGTEXT ) -ADD_BOOL ( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT ) - -/* Playlist options */ -ADD_CATEGORY_HINT( N_("Playlist"), NULL ) -ADD_BOOL ( "launch-playlist", 0, NULL, PL_LAUNCH_TEXT, PL_LAUNCH_LONGTEXT ) -ADD_BOOL ( "enqueue-playlist", 0, NULL, PL_ENQUEUE_TEXT, PL_ENQUEUE_LONGTEXT ) -ADD_BOOL ( "loop-playlist", 0, NULL, PL_LOOP_TEXT, PL_LOOP_LONGTEXT ) - -/* Misc options */ -ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) -ADD_MODULE ( "memcpy", MODULE_CAPABILITY_MEMCPY, NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT ) -ADD_MODULE ( "access", MODULE_CAPABILITY_ACCESS, NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT ) -ADD_MODULE ( "demux", MODULE_CAPABILITY_DEMUX, NULL, NULL, DEMUX_TEXT, DEMUX_LONGTEXT ) - -#if defined(WIN32) -ADD_BOOL ( "fast_pthread", 0, NULL, FAST_PTHREAD_TEXT, FAST_PTHREAD_LONGTEXT ) -#endif - -MODULE_CONFIG_STOP - -MODULE_INIT_START - SET_DESCRIPTION( N_("main program") ) - ADD_CAPABILITY( MAIN, 100/*whatever*/ ) -MODULE_INIT_STOP - -MODULE_ACTIVATE_START -MODULE_ACTIVATE_STOP - -MODULE_DEACTIVATE_START -MODULE_DEACTIVATE_STOP - -/* Hack for help options */ -static module_t help_module; -static module_config_t p_help_config[] = -{ - { MODULE_CONFIG_ITEM_BOOL, "help", 'h', N_("print help"), - NULL, NULL, 0, 0, NULL, NULL, 0 }, - { MODULE_CONFIG_ITEM_BOOL, "longhelp", 'H', N_("print detailed help"), - NULL, NULL, 0, 0, NULL, NULL, 0 }, - { MODULE_CONFIG_ITEM_BOOL, "list", 'l', N_("print a list of available " - "modules"), NULL, NULL, 0, 0, NULL, NULL, 0 }, - { MODULE_CONFIG_ITEM_STRING, "module", 'p', N_("print help on module"), - NULL, NULL, 0, 0, NULL, &help_module.config_lock, 0 }, - { MODULE_CONFIG_ITEM_BOOL, "version", '\0', - N_("print version information"), NULL, NULL, 0, 0, NULL, NULL, 0 }, - { MODULE_CONFIG_HINT_END, NULL, '\0', NULL, NULL, NULL, 0, 0, - NULL, NULL, 0 } -}; -static module_t help_module = { "help", "help module", NULL, {NULL}, 0, {0}, 0, - NULL, p_help_config, {0}, - sizeof(p_help_config)/sizeof(module_config_t), - sizeof(p_help_config)/sizeof(module_config_t) -}; - - -/***************************************************************************** - * End configuration. - *****************************************************************************/ - -/***************************************************************************** - * Global variables - these are the only ones, see main.h and modules.h - *****************************************************************************/ -main_t *p_main; -module_bank_t *p_module_bank; -input_bank_t *p_input_bank; -aout_bank_t *p_aout_bank; -vout_bank_t *p_vout_bank; - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static int GetFilenames ( int i_argc, char *ppsz_argv[] ); -static void Usage ( const char *psz_module_name ); -static void ListModules ( void ); -static void Version ( void ); - -static void InitSignalHandler ( void ); -static void SimpleSignalHandler ( int i_signal ); -static void FatalSignalHandler ( int i_signal ); -static void IllegalSignalHandler ( int i_signal ); -static u32 CPUCapabilities ( void ); - -#ifdef WIN32 -static void ShowConsole ( void ); -#endif - -static jmp_buf env; -static int i_illegal; -static char *psz_capability; - -/***************************************************************************** - * main: parse command line, start interface and spawn threads - ***************************************************************************** - * Steps during program execution are: - * -configuration parsing and messages interface initialization - * -opening of audio output device and some global modules - * -execution of interface, which exit on error or on user request - * -closing of audio output device and some global modules - * On error, the spawned threads are canceled, and the open devices closed. - *****************************************************************************/ -int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] ) -{ - main_t main_data; /* root of all data - see main.h */ - module_bank_t module_bank; - input_bank_t input_bank; - aout_bank_t aout_bank; - vout_bank_t vout_bank; - char *psz_module; - char *p_tmp; - - p_main = &main_data; /* set up the global variables */ - p_module_bank = &module_bank; - p_input_bank = &input_bank; - p_aout_bank = &aout_bank; - p_vout_bank = &vout_bank; - - p_main->i_warning_level = 0; - - /* - * Support for gettext - */ -#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT ) -# if defined( HAVE_LOCALE_H ) && defined( HAVE_LC_MESSAGES ) - if( !setlocale( LC_MESSAGES, "" ) ) - { - fprintf( stderr, "warning: unsupported locale settings\n" ); - } - - setlocale( LC_CTYPE, "" ); -# endif - - if( !bindtextdomain( PACKAGE, LOCALEDIR ) ) - { - fprintf( stderr, "warning: no domain %s in directory %s\n", - PACKAGE, LOCALEDIR ); - } - - textdomain( PACKAGE ); -#endif - - /* - * Initialize threads system - */ - vlc_threads_init(); - - /* - * Test if our code is likely to run on this CPU - */ - p_main->i_cpu_capabilities = CPUCapabilities(); - - /* - * System specific initialization code - */ -#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 ) - system_Init( &i_argc, ppsz_argv, ppsz_env ); - -#elif defined( SYS_LINUX ) -# ifdef DEBUG - /* Activate malloc checking routines to detect heap corruptions. */ - putenv( "MALLOC_CHECK_=2" ); - putenv( "GNOME_DISABLE_CRASH_DIALOG=1" ); -# endif -#endif - - /* - * Initialize messages interface - */ - intf_MsgCreate(); - - intf_Msg( COPYRIGHT_MESSAGE "\n" ); - - - /* Get the executable name (similar to the basename command) */ - if( i_argc > 0 ) - { - p_main->psz_arg0 = p_tmp = ppsz_argv[ 0 ]; - while( *p_tmp ) - { - if( *p_tmp == '/' ) p_main->psz_arg0 = ++p_tmp; - else ++p_tmp; - } - } - else - { - p_main->psz_arg0 = "vlc"; - } - - /* - * Initialize the module bank and and load the configuration of the main - * module. We need to do this at this stage to be able to display a short - * help if required by the user. (short help == main module options) - */ - module_InitBank(); - module_LoadMain(); - - /* Hack: insert the help module here */ - vlc_mutex_init( &help_module.config_lock ); - help_module.next = p_module_bank->first; - p_module_bank->first = &help_module; - /* end hack */ - - if( config_LoadCmdLine( &i_argc, ppsz_argv, 1 ) ) - { - intf_MsgDestroy(); - return( errno ); - } - - /* Check for short help option */ - if( config_GetIntVariable( "help" ) ) - { - intf_Msg( _("Usage: %s [options] [parameters] [file]...\n"), - p_main->psz_arg0 ); - - Usage( "help" ); - Usage( "main" ); - return( -1 ); - } - - /* Check for version option */ - if( config_GetIntVariable( "version" ) ) - { - Version(); - return( -1 ); - } - - /* Hack: remove the help module here */ - p_module_bank->first = help_module.next; - /* end hack */ - - /* - * Load the builtins and plugins into the module_bank. - * We have to do it before config_Load*() because this also gets the - * list of configuration options exported by each module and loads their - * default values. - */ - module_LoadBuiltins(); - module_LoadPlugins(); - intf_WarnMsg( 2, "module: module bank initialized, found %i modules", - p_module_bank->i_count ); - - /* Hack: insert the help module here */ - help_module.next = p_module_bank->first; - p_module_bank->first = &help_module; - /* end hack */ - - /* Check for help on modules */ - if( (p_tmp = config_GetPszVariable( "module" )) ) - { - Usage( p_tmp ); - free( p_tmp ); - return( -1 ); - } - - /* Check for long help option */ - if( config_GetIntVariable( "longhelp" ) ) - { - Usage( NULL ); - return( -1 ); - } - - /* Check for module list option */ - if( config_GetIntVariable( "list" ) ) - { - ListModules(); - return( -1 ); - } - - /* Hack: remove the help module here */ - p_module_bank->first = help_module.next; - /* end hack */ - - - /* - * Override default configuration with config file settings - */ - vlc_mutex_init( &p_main->config_lock ); - p_main->psz_homedir = config_GetHomeDir(); - config_LoadConfigFile( NULL ); - - /* - * Override configuration with command line settings - */ - if( config_LoadCmdLine( &i_argc, ppsz_argv, 0 ) ) - { -#ifdef WIN32 - ShowConsole(); - /* Pause the console because it's destroyed when we exit */ - intf_Msg( "The command line options couldn't be loaded, check that " - "they are valid.\nPress the RETURN key to continue..." ); - getchar(); -#endif - intf_MsgDestroy(); - return( errno ); - } - - - /* - * System specific configuration - */ - system_Configure(); - - /* p_main inititalization. FIXME ? */ - p_main->i_warning_level = config_GetIntVariable( "warning" ); - p_main->i_desync = config_GetIntVariable( "desync" ) * (mtime_t)1000; - p_main->b_stats = config_GetIntVariable( "stats" ); - p_main->b_audio = config_GetIntVariable( "audio" ); - p_main->b_stereo= !config_GetIntVariable( "mono" ); - p_main->b_video = config_GetIntVariable( "video" ); - if( !config_GetIntVariable( "mmx" ) ) - p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_MMX; - if( !config_GetIntVariable( "3dn" ) ) - p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_3DNOW; - if( !config_GetIntVariable( "mmxext" ) ) - p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_MMXEXT; - if( !config_GetIntVariable( "sse" ) ) - p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_SSE; - if( !config_GetIntVariable( "altivec" ) ) - p_main->i_cpu_capabilities &= ~CPU_CAPABILITY_ALTIVEC; - - - if( p_main->b_stats ) - { - char p_capabilities[200]; - p_capabilities[0] = '\0'; - -#define PRINT_CAPABILITY( capability, string ) \ - if( p_main->i_cpu_capabilities & capability ) \ - { \ - strncat( p_capabilities, string " ", \ - sizeof(p_capabilities) - strlen(p_capabilities) ); \ - p_capabilities[sizeof(p_capabilities) - 1] = '\0'; \ - } - - PRINT_CAPABILITY( CPU_CAPABILITY_486, "486" ); - PRINT_CAPABILITY( CPU_CAPABILITY_586, "586" ); - PRINT_CAPABILITY( CPU_CAPABILITY_PPRO, "Pentium Pro" ); - PRINT_CAPABILITY( CPU_CAPABILITY_MMX, "MMX" ); - PRINT_CAPABILITY( CPU_CAPABILITY_3DNOW, "3DNow!" ); - PRINT_CAPABILITY( CPU_CAPABILITY_MMXEXT, "MMXEXT" ); - PRINT_CAPABILITY( CPU_CAPABILITY_SSE, "SSE" ); - PRINT_CAPABILITY( CPU_CAPABILITY_ALTIVEC, "Altivec" ); - PRINT_CAPABILITY( CPU_CAPABILITY_FPU, "FPU" ); - intf_StatMsg( "info: CPU has capabilities : %s", p_capabilities ); - } - - /* - * Initialize playlist and get commandline files - */ - p_main->p_playlist = intf_PlaylistCreate(); - if( !p_main->p_playlist ) - { - intf_ErrMsg( "playlist error: playlist initialization failed" ); - intf_MsgDestroy(); - return( errno ); - } - intf_PlaylistInit( p_main->p_playlist ); - - /* - * Get input filenames given as commandline arguments - */ - GetFilenames( i_argc, ppsz_argv ); - - /* - * Initialize input, aout and vout banks - */ - input_InitBank(); - aout_InitBank(); - vout_InitBank(); - - /* - * Choose the best memcpy module - */ - psz_module = config_GetPszVariable( "memcpy" ); - p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY, - psz_module, NULL ); - if( psz_module ) free( psz_module ); - if( p_main->p_memcpy_module == NULL ) - { - intf_ErrMsg( "intf error: no suitable memcpy module, " - "using libc default" ); - p_main->pf_memcpy = memcpy; - } - else - { - p_main->pf_memcpy = p_main->p_memcpy_module->p_functions - ->memcpy.functions.memcpy.pf_memcpy; - } - - /* - * Initialize shared resources and libraries - */ - if( config_GetIntVariable( "network-channel" ) && - network_ChannelCreate() ) - { - /* On error during Channels initialization, switch off channels */ - intf_ErrMsg( "intf error: channels initialization failed, " - "deactivating channels" ); - config_PutIntVariable( "network-channel", 0 ); - } - - /* - * Try to run the interface - */ - p_main->p_intf = intf_Create(); - if( p_main->p_intf == NULL ) - { - intf_ErrMsg( "intf error: interface initialization failed" ); - } - else - { - /* - * Set signal handling policy for all threads - */ - InitSignalHandler(); - - /* - * This is the main loop - */ - p_main->p_intf->pf_run( p_main->p_intf ); - - /* - * Finished, destroy the interface - */ - intf_Destroy( p_main->p_intf ); - - /* - * Go back into channel 0 which is the network - */ - if( config_GetIntVariable( "network-channel" ) && p_main->p_channel ) - { - network_ChannelJoin( COMMON_CHANNEL ); - } - } - - /* - * Free input, aout and vout banks - */ - input_EndBank(); - vout_EndBank(); - aout_EndBank(); - - /* - * Free playlist - */ - intf_PlaylistDestroy( p_main->p_playlist ); - - /* - * Free allocated memory - */ - if( p_main->p_memcpy_module != NULL ) - { - module_Unneed( p_main->p_memcpy_module ); - } - - free( p_main->psz_homedir ); - - /* - * Free module bank - */ - module_EndBank(); - - /* - * System specific cleaning code - */ - system_End(); - - /* - * Terminate messages interface and program - */ - intf_WarnMsg( 1, "intf: program terminated" ); - intf_MsgDestroy(); - - /* - * Stop threads system - */ - vlc_threads_end( ); - - return 0; -} - - -/* following functions are local */ - -/***************************************************************************** - * GetFilenames: parse command line options which are not flags - ***************************************************************************** - * Parse command line for input files. - *****************************************************************************/ -static int GetFilenames( int i_argc, char *ppsz_argv[] ) -{ - int i_opt; - - /* We assume that the remaining parameters are filenames */ - for( i_opt = optind; i_opt < i_argc; i_opt++ ) - { - intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, - ppsz_argv[ i_opt ] ); - } - - return( 0 ); -} - -/***************************************************************************** - * Usage: print program usage - ***************************************************************************** - * Print a short inline help. Message interface is initialized at this stage. - *****************************************************************************/ -static void Usage( const char *psz_module_name ) -{ -#define FORMAT_STRING " --%s%s%s%s%s%s %s%s" - /* option name prefix ------' | | | | | | | - * option name ---------------' | | | | | | - * ----------------------------' | | | - * padding spaces --------------------' | | - * comment ------------------------------' | - * comment suffix -------------------------' - * - * The purpose of having bra and ket is that we might i18n them as well. - */ -#define LINE_START 8 -#define PADDING_SPACES 25 - module_t *p_module; - module_config_t *p_item; - char psz_spaces[PADDING_SPACES+LINE_START+1]; - char psz_format[sizeof(FORMAT_STRING)]; - - memset( psz_spaces, ' ', PADDING_SPACES+LINE_START ); - psz_spaces[PADDING_SPACES+LINE_START] = '\0'; - - strcpy( psz_format, FORMAT_STRING ); - -#ifdef WIN32 - ShowConsole(); -#endif - - /* Enumerate the config for each module */ - for( p_module = p_module_bank->first ; - p_module != NULL ; - p_module = p_module->next ) - { - boolean_t b_help_module = !strcmp( "help", p_module->psz_name ); - - if( psz_module_name && strcmp( psz_module_name, p_module->psz_name ) ) - continue; - - /* ignore modules without config options */ - if( !p_module->i_config_items ) continue; - - /* print module name */ - intf_Msg( _("%s module options:\n"), p_module->psz_name ); - - for( p_item = p_module->p_config; - p_item->i_type != MODULE_CONFIG_HINT_END; - p_item++ ) - { - char *psz_bra = NULL, *psz_type = NULL, *psz_ket = NULL; - char *psz_suf = ""; - int i; - - switch( p_item->i_type ) - { - case MODULE_CONFIG_HINT_CATEGORY: - intf_Msg( " %s", p_item->psz_text ); - break; - - case MODULE_CONFIG_ITEM_STRING: - case MODULE_CONFIG_ITEM_FILE: - case MODULE_CONFIG_ITEM_MODULE: /* We could also have "=<" here */ - psz_bra = " <"; psz_type = _("string"); psz_ket = ">"; - break; - case MODULE_CONFIG_ITEM_INTEGER: - psz_bra = " <"; psz_type = _("integer"); psz_ket = ">"; - break; - case MODULE_CONFIG_ITEM_FLOAT: - psz_bra = " <"; psz_type = _("float"); psz_ket = ">"; - break; - case MODULE_CONFIG_ITEM_BOOL: - psz_bra = ""; psz_type = ""; psz_ket = ""; - if( !b_help_module ) - psz_suf = p_item->i_value ? _(" (default: enabled)") : - _(" (default: disabled)"); - break; - } - - /* Add short option */ - if( p_item->i_short ) - { - psz_format[2] = '-'; - psz_format[3] = p_item->i_short; - psz_format[4] = ','; - } - else - { - psz_format[2] = ' '; - psz_format[3] = ' '; - psz_format[4] = ' '; - } - - if( psz_type ) - { - i = PADDING_SPACES - strlen( p_item->psz_name ) - - strlen( psz_bra ) - strlen( psz_type ) - - strlen( psz_ket ) - 1; - if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL && - !b_help_module ) i -= 5; - - if( i < 0 ) - { - i = 0; - psz_spaces[i] = '\n'; - } - else - { - psz_spaces[i] = '\0'; - } - - intf_Msg( psz_format, - ( p_item->i_type == MODULE_CONFIG_ITEM_BOOL && - !b_help_module ) ? "(no-)" : "", - p_item->psz_name, psz_bra, psz_type, psz_ket, - psz_spaces, p_item->psz_text, psz_suf ); - psz_spaces[i] = ' '; - } - } - - /* Yet another nasty hack. - * Maybe we could use MODULE_CONFIG_ITEM_END to display tail messages - * for each module?? */ - if( !strcmp( "main", p_module->psz_name ) ) - { - intf_Msg( _("\nPlaylist items:" - "\n *.mpg, *.vob plain MPEG-1/2 files" - "\n [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]" - "\n DVD device" - "\n [vcd:][device][@[title][,[chapter]]" - "\n VCD device" - "\n udpstream:[@[][:]]" - "\n UDP stream sent by VLS" - "\n vlc:loop loop execution of the " - "playlist" - "\n vlc:pause pause execution of " - "playlist items" - "\n vlc:quit quit VLC") ); - } - - intf_Msg( "" ); - - } - -#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ - intf_Msg( _("\nPress the RETURN key to continue...") ); - getchar(); -#endif -} - -/***************************************************************************** - * ListModules: list the available modules with their description - ***************************************************************************** - * Print a list of all available modules (builtins and plugins) and a short - * description for each one. - *****************************************************************************/ -static void ListModules( void ) -{ - module_t *p_module; - char psz_spaces[22]; - - memset( psz_spaces, ' ', 22 ); - -#ifdef WIN32 - ShowConsole(); -#endif - - /* Usage */ - intf_Msg( _("Usage: %s [options] [parameters] [file]...\n"), - p_main->psz_arg0 ); - - intf_Msg( _("[module] [description]") ); - - /* Enumerate each module */ - for( p_module = p_module_bank->first ; - p_module != NULL ; - p_module = p_module->next ) - { - int i; - - /* Nasty hack, but right now I'm too tired to think about a nice - * solution */ - i = 22 - strlen( p_module->psz_name ) - 1; - if( i < 0 ) i = 0; - psz_spaces[i] = 0; - - intf_Msg( " %s%s %s", p_module->psz_name, psz_spaces, - p_module->psz_longname ); - - psz_spaces[i] = ' '; - - } - -#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ - intf_Msg( _("\nPress the RETURN key to continue...") ); - getchar(); -#endif -} - -/***************************************************************************** - * Version: print complete program version - ***************************************************************************** - * Print complete program version and build number. - *****************************************************************************/ -static void Version( void ) -{ -#ifdef WIN32 - ShowConsole(); -#endif - - intf_Msg( VERSION_MESSAGE ); - intf_Msg( - _("This program comes with NO WARRANTY, to the extent permitted by " - "law.\nYou may redistribute it under the terms of the GNU General " - "Public License;\nsee the file named COPYING for details.\n" - "Written by the VideoLAN team at Ecole Centrale, Paris.") ); - -#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ - intf_Msg( _("\nPress the RETURN key to continue...") ); - getchar(); -#endif -} - -/***************************************************************************** - * InitSignalHandler: system signal handler initialization - ***************************************************************************** - * Set the signal handlers. SIGTERM is not intercepted, because we need at - * at least a method to kill the program when all other methods failed, and - * when we don't want to use SIGKILL. - *****************************************************************************/ -static void InitSignalHandler( void ) -{ - /* Termination signals */ -#ifndef WIN32 - signal( SIGINT, FatalSignalHandler ); - signal( SIGHUP, FatalSignalHandler ); - signal( SIGQUIT, FatalSignalHandler ); - - /* Other signals */ - signal( SIGALRM, SimpleSignalHandler ); - signal( SIGPIPE, SimpleSignalHandler ); -#endif -} - -/***************************************************************************** - * SimpleSignalHandler: system signal handler - ***************************************************************************** - * This function is called when a non fatal signal is received by the program. - *****************************************************************************/ -static void SimpleSignalHandler( int i_signal ) -{ - /* Acknowledge the signal received */ - intf_WarnMsg( 0, "intf: ignoring signal %d", i_signal ); -} - -/***************************************************************************** - * FatalSignalHandler: system signal handler - ***************************************************************************** - * This function is called when a fatal signal is received by the program. - * It tries to end the program in a clean way. - *****************************************************************************/ -static void FatalSignalHandler( int i_signal ) -{ - static mtime_t abort_time = 0; - static volatile boolean_t b_die = 0; - - /* Once a signal has been trapped, the termination sequence will be - * armed and following signals will be ignored to avoid sending messages - * to an interface having been destroyed */ - if( !b_die ) - { - b_die = 1; - abort_time = mdate(); - - /* Acknowledge the signal received */ - intf_ErrMsg( "intf error: signal %d received, exiting - do it again " - "if vlc gets stuck", i_signal ); - - /* Try to terminate everything - this is done by requesting the end - * of the interface thread */ - p_main->p_intf->b_die = 1; - - return; - } - - /* If user asks again 1 second later, die badly */ - if( mdate() > abort_time + 1000000 ) - { -#ifndef WIN32 - signal( SIGINT, SIG_IGN ); - signal( SIGHUP, SIG_IGN ); - signal( SIGQUIT, SIG_IGN ); -#endif - - intf_ErrMsg( "intf error: user insisted too much, dying badly" ); - exit( 1 ); - } -} - -/***************************************************************************** - * IllegalSignalHandler: system signal handler - ***************************************************************************** - * This function is called when an illegal instruction signal is received by - * the program. We use this function to test OS and CPU capabilities - *****************************************************************************/ -static void IllegalSignalHandler( int i_signal ) -{ - /* Acknowledge the signal received */ - i_illegal = 1; - -#ifdef HAVE_SIGRELSE - sigrelse( i_signal ); -#endif - -#if defined( __i386__ ) - fprintf( stderr, "warning: your CPU has %s instructions, but not your " - "operating system.\n", psz_capability ); - fprintf( stderr, " some optimizations will be disabled unless " - "you upgrade your OS\n" ); -# if defined( SYS_LINUX ) - fprintf( stderr, " (for instance Linux kernel 2.4.x or later)\n" ); -# endif -#endif - - longjmp( env, 1 ); -} - -/***************************************************************************** - * CPUCapabilities: list the processors MMX support and other capabilities - ***************************************************************************** - * This function is called to list extensions the CPU may have. - *****************************************************************************/ -static u32 CPUCapabilities( void ) -{ - volatile u32 i_capabilities = CPU_CAPABILITY_NONE; - -#if defined( SYS_DARWIN ) - struct host_basic_info hi; - kern_return_t ret; - host_name_port_t host; - - int i_size; - char *psz_name, *psz_subname; - - i_capabilities |= CPU_CAPABILITY_FPU; - - /* Should 'never' fail? */ - host = mach_host_self(); - - i_size = sizeof( hi ) / sizeof( int ); - ret = host_info( host, HOST_BASIC_INFO, ( host_info_t )&hi, &i_size ); - - if( ret != KERN_SUCCESS ) - { - fprintf( stderr, "error: couldn't get CPU information\n" ); - return( i_capabilities ); - } - - slot_name( hi.cpu_type, hi.cpu_subtype, &psz_name, &psz_subname ); - /* FIXME: need better way to detect newer proccessors. - * could do strncmp(a,b,5), but that's real ugly */ - if( !strcmp(psz_name, "ppc7400") || !strcmp(psz_name, "ppc7450") ) - { - i_capabilities |= CPU_CAPABILITY_ALTIVEC; - } - - return( i_capabilities ); - -#elif defined( __i386__ ) - volatile unsigned int i_eax, i_ebx, i_ecx, i_edx; - volatile boolean_t b_amd; - - /* Needed for x86 CPU capabilities detection */ -# define cpuid( a ) \ - asm volatile ( "pushl %%ebx\n\t" \ - "cpuid\n\t" \ - "movl %%ebx,%1\n\t" \ - "popl %%ebx\n\t" \ - : "=a" ( i_eax ), \ - "=r" ( i_ebx ), \ - "=c" ( i_ecx ), \ - "=d" ( i_edx ) \ - : "a" ( a ) \ - : "cc" ); - - i_capabilities |= CPU_CAPABILITY_FPU; - -# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) - signal( SIGILL, IllegalSignalHandler ); -# endif - - /* test for a 486 CPU */ - asm volatile ( "pushl %%ebx\n\t" - "pushfl\n\t" - "popl %%eax\n\t" - "movl %%eax, %%ebx\n\t" - "xorl $0x200000, %%eax\n\t" - "pushl %%eax\n\t" - "popfl\n\t" - "pushfl\n\t" - "popl %%eax\n\t" - "movl %%ebx,%1\n\t" - "popl %%ebx\n\t" - : "=a" ( i_eax ), - "=r" ( i_ebx ) - : - : "cc" ); - - if( i_eax == i_ebx ) - { -# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) - signal( SIGILL, NULL ); -# endif - return( i_capabilities ); - } - - i_capabilities |= CPU_CAPABILITY_486; - - /* the CPU supports the CPUID instruction - get its level */ - cpuid( 0x00000000 ); - - if( !i_eax ) - { -# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) - signal( SIGILL, NULL ); -# endif - return( i_capabilities ); - } - - /* FIXME: this isn't correct, since some 486s have cpuid */ - i_capabilities |= CPU_CAPABILITY_586; - - /* borrowed from mpeg2dec */ - b_amd = ( i_ebx == 0x68747541 ) && ( i_ecx == 0x444d4163 ) - && ( i_edx == 0x69746e65 ); - - /* test for the MMX flag */ - cpuid( 0x00000001 ); - - if( ! (i_edx & 0x00800000) ) - { -# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) - signal( SIGILL, NULL ); -# endif - return( i_capabilities ); - } - - i_capabilities |= CPU_CAPABILITY_MMX; - - if( i_edx & 0x02000000 ) - { - i_capabilities |= CPU_CAPABILITY_MMXEXT; - -# ifdef CAN_COMPILE_SSE - /* We test if OS supports the SSE instructions */ - psz_capability = "SSE"; - i_illegal = 0; - if( setjmp( env ) == 0 ) - { - /* Test a SSE instruction */ - __asm__ __volatile__ ( "xorps %%xmm0,%%xmm0\n" : : ); - } - - if( i_illegal == 0 ) - { - i_capabilities |= CPU_CAPABILITY_SSE; - } -# endif - } - - /* test for additional capabilities */ - cpuid( 0x80000000 ); - - if( i_eax < 0x80000001 ) - { -# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) - signal( SIGILL, NULL ); -# endif - return( i_capabilities ); - } - - /* list these additional capabilities */ - cpuid( 0x80000001 ); - -# ifdef CAN_COMPILE_3DNOW - if( i_edx & 0x80000000 ) - { - psz_capability = "3D Now!"; - i_illegal = 0; - if( setjmp( env ) == 0 ) - { - /* Test a 3D Now! instruction */ - __asm__ __volatile__ ( "pfadd %%mm0,%%mm0\n" "femms\n" : : ); - } - - if( i_illegal == 0 ) - { - i_capabilities |= CPU_CAPABILITY_3DNOW; - } - } -# endif - - if( b_amd && ( i_edx & 0x00400000 ) ) - { - i_capabilities |= CPU_CAPABILITY_MMXEXT; - } - -# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) - signal( SIGILL, NULL ); -# endif - return( i_capabilities ); - -#elif defined( __powerpc__ ) - - i_capabilities |= CPU_CAPABILITY_FPU; - -# ifdef CAN_COMPILE_ALTIVEC - signal( SIGILL, IllegalSignalHandler ); - - psz_capability = "AltiVec"; - i_illegal = 0; - if( setjmp( env ) == 0 ) - { - asm volatile ("mtspr 256, %0\n\t" - "vand %%v0, %%v0, %%v0" - : - : "r" (-1)); - } - - if( i_illegal == 0 ) - { - i_capabilities |= CPU_CAPABILITY_ALTIVEC; - } - - signal( SIGILL, NULL ); -# endif - - return( i_capabilities ); - -#elif defined( __sparc__ ) - - i_capabilities |= CPU_CAPABILITY_FPU; - return( i_capabilities ); - -#else - /* default behaviour */ - return( i_capabilities ); - -#endif -} - -/***************************************************************************** - * ShowConsole: On Win32, create an output console for debug messages - ***************************************************************************** - * This function is useful only on Win32. - *****************************************************************************/ -#ifdef WIN32 /* */ -static void ShowConsole( void ) -{ - AllocConsole(); - freopen( "CONOUT$", "w", stdout ); - freopen( "CONOUT$", "w", stderr ); - freopen( "CONIN$", "r", stdin ); - return; -} -#endif diff --git a/src/libvlc.c b/src/libvlc.c new file mode 100644 index 0000000000..4a45f1df29 --- /dev/null +++ b/src/libvlc.c @@ -0,0 +1,1175 @@ +/***************************************************************************** + * libvlc.c: main libvlc source + * Includes the main() function for vlc. Parses command line, starts playlist + * and spawns threads. + ***************************************************************************** + * Copyright (C) 1998-2001 VideoLAN + * $Id: libvlc.c,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Vincent Seguin + * Samuel Hocevar + * Gildas Bazin + * + * 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. + *****************************************************************************/ + +/***************************************************************************** + * Pretend we are a builtin module + *****************************************************************************/ +#define MODULE_NAME main +#define __BUILTIN__ + +/***************************************************************************** + * Preamble + *****************************************************************************/ +#include /* ENOMEM */ +#include /* sprintf() */ +#include /* strerror() */ +#include /* free() */ +#include /* SIGHUP, SIGINT, SIGKILL */ + +#include + +#ifdef HAVE_GETOPT_LONG +# ifdef HAVE_GETOPT_H +# include /* getopt() */ +# endif +#else +# include "GNUgetopt/getopt.h" +#endif + +#ifndef WIN32 +# include /* BSD: struct in_addr */ +#endif + +#ifdef HAVE_UNISTD_H +# include +#elif defined( _MSC_VER ) && defined( _WIN32 ) +# include +#endif + +#ifdef HAVE_LOCALE_H +# include +#endif + +#include "vlc_cpu.h" /* CPU detection */ + +#include "netutils.h" /* network_ChannelJoin */ + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "playlist.h" +#include "interface.h" + +#include "audio_output.h" + +#include "video.h" +#include "video_output.h" + +#include "libvlc.h" + +/***************************************************************************** + * The evil global variables. We handle them with care, don't worry. + *****************************************************************************/ + +/* This global lock is used for critical sections - don't abuse it! */ +static vlc_mutex_t global_lock; +void * p_global_data; + +/* A list of all the currently allocated vlc objects */ +static volatile int i_vlc = 0; +static volatile vlc_t **pp_vlc = NULL; + +/***************************************************************************** + * Local prototypes + *****************************************************************************/ +static int GetFilenames ( vlc_t *, int, char *[] ); +static void Usage ( vlc_object_t *, const char *psz_module_name ); +static void ListModules ( vlc_object_t * ); +static void Version ( void ); +static void Build ( void ); + +static void InitSignalHandler ( void ); +static void SimpleSignalHandler ( int i_signal ); +static void FatalSignalHandler ( int i_signal ); + +#ifdef WIN32 +static void ShowConsole ( void ); +#endif + +/***************************************************************************** + * vlc_create: allocate a vlc_t structure, and initialize libvlc if needed. + ***************************************************************************** + * This function allocates a vlc_t structure and returns NULL in case of + * failure. Also, the thread system and the signal handlers are initialized. + *****************************************************************************/ +vlc_t * vlc_create( void ) +{ + vlc_t * p_vlc = NULL; + + /* Allocate the main structure */ + p_vlc = vlc_object_create( p_vlc, VLC_OBJECT_ROOT ); + if( p_vlc == NULL ) + { + return NULL; + } + + p_vlc->psz_object_name = "root"; + + p_vlc->p_global_lock = &global_lock; + p_vlc->pp_global_data = &p_global_data; + + p_vlc->b_verbose = 0; + p_vlc->b_quiet = 0; /* FIXME: delay message queue output! */ + + /* Initialize the threads system */ + vlc_threads_init( p_vlc->p_this ); + + /* Initialize mutexes */ + vlc_mutex_init( p_vlc->p_this, &p_vlc->config_lock ); + vlc_mutex_init( p_vlc->p_this, &p_vlc->structure_lock ); + + /* Set signal handling policy for all threads */ + InitSignalHandler( ); + + /* Store our newly allocated structure in the global list */ + vlc_mutex_lock( p_vlc->p_global_lock ); + pp_vlc = realloc( pp_vlc, (i_vlc+1) * sizeof( vlc_t * ) ); + pp_vlc[ i_vlc ] = p_vlc; + i_vlc++; + vlc_mutex_unlock( p_vlc->p_global_lock ); + + /* Update the handle status */ + p_vlc->i_status = VLC_STATUS_CREATED; + + return p_vlc; +} + +/***************************************************************************** + * vlc_init: initialize a vlc_t structure. + ***************************************************************************** + * This function initializes a previously allocated vlc_t structure: + * - CPU detection + * - gettext initialization + * - message queue, module bank and playlist initialization + * - configuration and commandline parsing + *****************************************************************************/ +vlc_error_t vlc_init( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) +{ + char p_capabilities[200]; + char *psz_module; + char *p_tmp; + module_t *p_help_module; + playlist_t *p_playlist; + + /* Check that the handle is valid */ + if( !p_vlc || p_vlc->i_status != VLC_STATUS_CREATED ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + fprintf( stderr, COPYRIGHT_MESSAGE "\n" ); + + /* Guess what CPU we have */ + p_vlc->i_cpu_capabilities = CPUCapabilities( p_vlc->p_this ); + + /* + * Support for gettext + */ +#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT ) +# if defined( HAVE_LOCALE_H ) && defined( HAVE_LC_MESSAGES ) + if( !setlocale( LC_MESSAGES, "" ) ) + { + fprintf( stderr, "warning: unsupported locale settings\n" ); + } + + setlocale( LC_CTYPE, "" ); +# endif + + if( !bindtextdomain( PACKAGE, LOCALEDIR ) ) + { + fprintf( stderr, "warning: no domain %s in directory %s\n", + PACKAGE, LOCALEDIR ); + } + + textdomain( PACKAGE ); +#endif + + /* + * System specific initialization code + */ + system_Init( p_vlc->p_this, &i_argc, ppsz_argv ); + + /* + * Initialize message queue + */ + msg_Create( p_vlc->p_this ); + + /* Get the executable name (similar to the basename command) */ + if( i_argc > 0 ) + { + p_vlc->psz_object_name = p_tmp = ppsz_argv[ 0 ]; + while( *p_tmp ) + { + if( *p_tmp == '/' ) p_vlc->psz_object_name = ++p_tmp; + else ++p_tmp; + } + } + else + { + p_vlc->psz_object_name = "vlc"; + } + + /* + * Initialize the module bank and and load the configuration of the main + * module. We need to do this at this stage to be able to display a short + * help if required by the user. (short help == main module options) + */ + module_InitBank( p_vlc->p_this ); + module_LoadMain( p_vlc->p_this ); + + /* Hack: insert the help module here */ + p_help_module = vlc_object_create( p_vlc, VLC_OBJECT_MODULE ); + if( p_help_module == NULL ) + { + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EGENERIC; + } + p_help_module->psz_object_name = "help"; + config_Duplicate( p_help_module, p_help_config ); + p_help_module->next = p_vlc->module_bank.first; + p_vlc->module_bank.first = p_help_module; + /* End hack */ + + if( config_LoadCmdLine( p_vlc->p_this, &i_argc, ppsz_argv, 1 ) ) + { + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EGENERIC; + } + + /* Check for short help option */ + if( config_GetInt( p_vlc, "help" ) ) + { + fprintf( stderr, _("Usage: %s [options] [parameters] [file]...\n"), + p_vlc->psz_object_name ); + + Usage( p_vlc->p_this, "help" ); + Usage( p_vlc->p_this, "main" ); + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EEXIT; + } + + /* Check for version option */ + if( config_GetInt( p_vlc, "version" ) ) + { + Version(); + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EEXIT; + } + + /* Check for build option */ + if( config_GetInt( p_vlc, "build" ) ) + { + Build(); + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EEXIT; + } + + /* Hack: remove the help module here */ + p_vlc->module_bank.first = p_help_module->next; + /* End hack */ + + /* + * Load the builtins and plugins into the module_bank. + * We have to do it before config_Load*() because this also gets the + * list of configuration options exported by each module and loads their + * default values. + */ + module_LoadBuiltins( p_vlc->p_this ); + module_LoadPlugins( p_vlc->p_this ); + msg_Dbg( p_vlc, "module bank initialized, found %i modules", + p_vlc->module_bank.i_count ); + + /* Hack: insert the help module here */ + p_help_module->next = p_vlc->module_bank.first; + p_vlc->module_bank.first = p_help_module; + /* End hack */ + + /* Check for help on modules */ + if( (p_tmp = config_GetPsz( p_vlc, "module" )) ) + { + Usage( p_vlc->p_this, p_tmp ); + free( p_tmp ); + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EGENERIC; + } + + /* Check for long help option */ + if( config_GetInt( p_vlc, "longhelp" ) ) + { + Usage( p_vlc->p_this, NULL ); + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EEXIT; + } + + /* Check for module list option */ + if( config_GetInt( p_vlc, "list" ) ) + { + ListModules( p_vlc->p_this ); + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EEXIT; + } + + /* Hack: remove the help module here */ + p_vlc->module_bank.first = p_help_module->next; + config_Free( p_help_module ); + vlc_object_destroy( p_help_module ); + /* End hack */ + + /* + * Override default configuration with config file settings + */ + p_vlc->psz_homedir = config_GetHomeDir(); + config_LoadConfigFile( p_vlc->p_this, NULL ); + + /* + * Override configuration with command line settings + */ + if( config_LoadCmdLine( p_vlc->p_this, &i_argc, ppsz_argv, 0 ) ) + { +#ifdef WIN32 + ShowConsole(); + /* Pause the console because it's destroyed when we exit */ + fprintf( stderr, "The command line options couldn't be loaded, check " + "that they are valid.\nPress the RETURN key to continue..." ); + getchar(); +#endif + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EGENERIC; + } + + + /* + * System specific configuration + */ + system_Configure( p_vlc->p_this ); + + /* p_vlc inititalization. FIXME ? */ + p_vlc->i_desync = config_GetInt( p_vlc, "desync" ) * (mtime_t)1000; + p_vlc->b_verbose = config_GetInt( p_vlc, "verbose" ); + p_vlc->b_quiet = config_GetInt( p_vlc, "quiet" ); + p_vlc->b_color = config_GetInt( p_vlc, "color" ); + if( !config_GetInt( p_vlc, "mmx" ) ) + p_vlc->i_cpu_capabilities &= ~CPU_CAPABILITY_MMX; + if( !config_GetInt( p_vlc, "3dn" ) ) + p_vlc->i_cpu_capabilities &= ~CPU_CAPABILITY_3DNOW; + if( !config_GetInt( p_vlc, "mmxext" ) ) + p_vlc->i_cpu_capabilities &= ~CPU_CAPABILITY_MMXEXT; + if( !config_GetInt( p_vlc, "sse" ) ) + p_vlc->i_cpu_capabilities &= ~CPU_CAPABILITY_SSE; + if( !config_GetInt( p_vlc, "altivec" ) ) + p_vlc->i_cpu_capabilities &= ~CPU_CAPABILITY_ALTIVEC; + +#define PRINT_CAPABILITY( capability, string ) \ + if( p_vlc->i_cpu_capabilities & capability ) \ + { \ + strncat( p_capabilities, string " ", \ + sizeof(p_capabilities) - strlen(p_capabilities) ); \ + p_capabilities[sizeof(p_capabilities) - 1] = '\0'; \ + } + + p_capabilities[0] = '\0'; + PRINT_CAPABILITY( CPU_CAPABILITY_486, "486" ); + PRINT_CAPABILITY( CPU_CAPABILITY_586, "586" ); + PRINT_CAPABILITY( CPU_CAPABILITY_PPRO, "Pentium Pro" ); + PRINT_CAPABILITY( CPU_CAPABILITY_MMX, "MMX" ); + PRINT_CAPABILITY( CPU_CAPABILITY_3DNOW, "3DNow!" ); + PRINT_CAPABILITY( CPU_CAPABILITY_MMXEXT, "MMXEXT" ); + PRINT_CAPABILITY( CPU_CAPABILITY_SSE, "SSE" ); + PRINT_CAPABILITY( CPU_CAPABILITY_ALTIVEC, "AltiVec" ); + PRINT_CAPABILITY( CPU_CAPABILITY_FPU, "FPU" ); + msg_Dbg( p_vlc, "CPU has capabilities %s", p_capabilities ); + + /* + * Choose the best memcpy module + */ + psz_module = config_GetPsz( p_vlc, "memcpy" ); + p_vlc->p_memcpy_module = + module_Need( p_vlc, MODULE_CAPABILITY_MEMCPY, psz_module, NULL ); + if( psz_module ) free( psz_module ); + if( p_vlc->p_memcpy_module == NULL ) + { + msg_Err( p_vlc, "no suitable memcpy module, using libc default" ); + p_vlc->pf_memcpy = memcpy; + } + else + { + p_vlc->pf_memcpy = p_vlc->p_memcpy_module->p_functions + ->memcpy.functions.memcpy.pf_memcpy; + } + + /* + * Initialize shared resources and libraries + */ + if( config_GetInt( p_vlc, "network-channel" ) + && network_ChannelCreate( p_vlc->p_this ) ) + { + /* On error during Channels initialization, switch off channels */ + msg_Err( p_vlc, + "channels initialization failed, deactivating channels" ); + config_PutInt( p_vlc, "network-channel", 0 ); + } + + /* Update the handle status */ + p_vlc->i_status = VLC_STATUS_STOPPED; + +/* XXX XXX XXX XXX XXX XXX XXX XXX */ +/* XXX XXX XXX XXX XXX XXX XXX XXX */ +/* XXX XXX XXX XXX XXX XXX XXX XXX */ + /* + * Initialize playlist and get commandline files + */ + p_playlist = playlist_Create( p_vlc->p_this ); + if( !p_playlist ) + { + msg_Err( p_vlc, "playlist initialization failed" ); + module_EndBank( p_vlc->p_this ); + msg_Destroy( p_vlc->p_this ); + return VLC_EGENERIC; + } + + /* + * Get input filenames given as commandline arguments + */ + GetFilenames( p_vlc, i_argc, ppsz_argv ); +/* XXX XXX XXX XXX XXX XXX XXX XXX */ +/* XXX XXX XXX XXX XXX XXX XXX XXX */ +/* XXX XXX XXX XXX XXX XXX XXX XXX */ + + return VLC_SUCCESS; +} + +/***************************************************************************** + * vlc_run: run vlc + ***************************************************************************** + * XXX: This function opens an interface plugin and runs it. If b_block is set + * to 0, vlc_add_intf will return immediately and let the interface run in a + * separate thread. If b_block is set to 1, vlc_add_intf will continue until + * user requests to quit. + *****************************************************************************/ +vlc_error_t vlc_run( vlc_t *p_vlc ) +{ + /* Check that the handle is valid */ + if( !p_vlc || p_vlc->i_status != VLC_STATUS_STOPPED ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + /* Update the handle status */ + p_vlc->i_status = VLC_STATUS_RUNNING; + + return VLC_SUCCESS; +} + +/***************************************************************************** + * vlc_add_intf: add an interface + ***************************************************************************** + * This function opens an interface plugin and runs it. If b_block is set + * to 0, vlc_add_intf will return immediately and let the interface run in a + * separate thread. If b_block is set to 1, vlc_add_intf will continue until + * user requests to quit. + *****************************************************************************/ +vlc_error_t vlc_add_intf( vlc_t *p_vlc, char *psz_module, vlc_bool_t b_block ) +{ + vlc_error_t err; + intf_thread_t *p_intf; + char *psz_oldmodule = NULL; + + /* Check that the handle is valid */ + if( !p_vlc || p_vlc->i_status != VLC_STATUS_RUNNING ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + if( psz_module ) + { + psz_oldmodule = config_GetPsz( p_vlc, "intf" ); + config_PutPsz( p_vlc, "intf", psz_module ); + } + + /* Try to create the interface */ + p_intf = intf_Create( p_vlc->p_this ); + + if( psz_module ) + { + config_PutPsz( p_vlc, "intf", psz_oldmodule ); + if( psz_oldmodule ) + { + free( psz_oldmodule ); + } + } + + if( p_intf == NULL ) + { + msg_Err( p_vlc, "interface initialization failed" ); + return VLC_EGENERIC; + } + + /* Try to run the interface */ + p_intf->b_block = b_block; + err = intf_RunThread( p_intf ); + if( err ) + { + intf_Destroy( p_intf ); + return err; + } + + return VLC_SUCCESS; +} + +/***************************************************************************** + * vlc_stop: stop playing. + ***************************************************************************** + * This function requests the interface threads to finish, waits for their + * termination, and destroys their structure. + *****************************************************************************/ +vlc_error_t vlc_stop( vlc_t *p_vlc ) +{ + intf_thread_t *p_intf; + playlist_t *p_playlist; + vout_thread_t *p_vout; + aout_thread_t *p_aout; + + /* Check that the handle is valid */ + if( !p_vlc || p_vlc->i_status != VLC_STATUS_RUNNING ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + /* + * Ask the interfaces to stop and destroy them + */ + msg_Dbg( p_vlc, "removing all interfaces" ); + while( (p_intf = vlc_object_find( p_vlc, VLC_OBJECT_INTF, FIND_CHILD )) ) + { + intf_StopThread( p_intf ); + vlc_object_unlink_all( p_intf ); + vlc_object_release( p_intf ); + intf_Destroy( p_intf ); + } + + /* + * Free playlists + */ + msg_Dbg( p_vlc, "removing all playlists" ); + while( (p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, + FIND_CHILD )) ) + { + vlc_object_unlink_all( p_playlist ); + vlc_object_release( p_playlist ); + playlist_Destroy( p_playlist ); + } + + /* + * Free video outputs + */ + msg_Dbg( p_vlc, "removing all video outputs" ); + while( (p_vout = vlc_object_find( p_vlc, VLC_OBJECT_VOUT, FIND_CHILD )) ) + { + vlc_object_unlink_all( p_vout ); + vlc_object_release( p_vout ); + vout_DestroyThread( p_vout ); + } + + /* + * Free audio outputs + */ + msg_Dbg( p_vlc, "removing all audio outputs" ); + while( (p_aout = vlc_object_find( p_vlc, VLC_OBJECT_AOUT, FIND_CHILD )) ) + { + vlc_object_unlink_all( p_aout ); + vlc_object_release( p_aout ); + aout_DestroyThread( p_aout ); + } + + /* Update the handle status */ + p_vlc->i_status = VLC_STATUS_STOPPED; + + return VLC_SUCCESS; +} + +/***************************************************************************** + * vlc_end: uninitialize everything. + ***************************************************************************** + * This function uninitializes every vlc component that was activated in + * vlc_init: audio and video outputs, playlist, module bank and message queue. + *****************************************************************************/ +vlc_error_t vlc_end( vlc_t *p_vlc ) +{ + /* Check that the handle is valid */ + if( !p_vlc || p_vlc->i_status != VLC_STATUS_STOPPED ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + /* + * Go back into channel 0 which is the network + */ + if( config_GetInt( p_vlc, "network-channel" ) && p_vlc->p_channel ) + { + network_ChannelJoin( p_vlc->p_this, COMMON_CHANNEL ); + } + + /* + * Free allocated memory + */ + if( p_vlc->p_memcpy_module != NULL ) + { + module_Unneed( p_vlc->p_memcpy_module ); + } + + free( p_vlc->psz_homedir ); + + /* + * Free module bank + */ + module_EndBank( p_vlc->p_this ); + + /* + * System specific cleaning code + */ + system_End( p_vlc->p_this ); + + /* + * Terminate messages interface and program + */ + msg_Destroy( p_vlc->p_this ); + + /* Update the handle status */ + p_vlc->i_status = VLC_STATUS_CREATED; + + return VLC_SUCCESS; +} + +/***************************************************************************** + * vlc_destroy: free allocated resources. + ***************************************************************************** + * This function frees the previously allocated vlc_t structure. + *****************************************************************************/ +vlc_error_t vlc_destroy( vlc_t *p_vlc ) +{ + int i_index; + + /* Check that the handle is valid */ + if( !p_vlc || p_vlc->i_status != VLC_STATUS_CREATED ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + /* Update the handle status, just in case */ + p_vlc->i_status = VLC_STATUS_NONE; + + /* Remove our structure from the global list */ + vlc_mutex_lock( p_vlc->p_global_lock ); + for( i_index = 0 ; i_index < i_vlc ; i_index++ ) + { + if( pp_vlc[ i_index ] == p_vlc ) + { + break; + } + } + + if( i_index == i_vlc ) + { + fprintf( stderr, "error: trying to unregister %p which is not in " + "the list\n", p_vlc ); + vlc_mutex_unlock( p_vlc->p_global_lock ); + vlc_object_destroy( p_vlc ); + return VLC_EGENERIC; + } + + for( i_index++ ; i_index < i_vlc ; i_index++ ) + { + pp_vlc[ i_index - 1 ] = pp_vlc[ i_index ]; + } + + i_vlc--; + if( i_vlc ) + { + pp_vlc = realloc( pp_vlc, i_vlc * sizeof( vlc_t * ) ); + } + else + { + free( pp_vlc ); + pp_vlc = NULL; + } + vlc_mutex_unlock( p_vlc->p_global_lock ); + + /* Stop thread system FIXME: last one out please shut the door! */ + //vlc_threads_end( ); + + /* Destroy mutexes */ + vlc_mutex_destroy( &p_vlc->structure_lock ); + vlc_mutex_destroy( &p_vlc->config_lock ); + + vlc_object_destroy( p_vlc ); + + return VLC_SUCCESS; +} + +vlc_status_t vlc_status( vlc_t *p_vlc ) +{ + if( !p_vlc ) + { + return VLC_STATUS_NONE; + } + + return p_vlc->i_status; +} + +vlc_error_t vlc_add_target( vlc_t *p_vlc, char *psz_target ) +{ + if( !p_vlc || ( p_vlc->i_status != VLC_STATUS_STOPPED + && p_vlc->i_status != VLC_STATUS_RUNNING ) ) + { + fprintf( stderr, "error: invalid status\n" ); + return VLC_ESTATUS; + } + + playlist_Add( p_vlc->p_this, PLAYLIST_END, psz_target ); + + return VLC_SUCCESS; +} + +/* following functions are local */ + +/***************************************************************************** + * GetFilenames: parse command line options which are not flags + ***************************************************************************** + * Parse command line for input files. + *****************************************************************************/ +static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) +{ + int i_opt; + + /* We assume that the remaining parameters are filenames */ + for( i_opt = optind; i_opt < i_argc; i_opt++ ) + { + playlist_Add( p_vlc->p_this, PLAYLIST_END, ppsz_argv[ i_opt ] ); + } + + return VLC_SUCCESS; +} + +/***************************************************************************** + * Usage: print program usage + ***************************************************************************** + * Print a short inline help. Message interface is initialized at this stage. + *****************************************************************************/ +static void Usage( vlc_object_t *p_this, const char *psz_module_name ) +{ +#define FORMAT_STRING " --%s%s%s%s%s%s %s%s\n" + /* option name prefix ------' | | | | | | | + * option name ---------------' | | | | | | + * ----------------------------' | | | + * padding spaces --------------------' | | + * comment ------------------------------' | + * comment suffix -------------------------' + * + * The purpose of having bra and ket is that we might i18n them as well. + */ +#define LINE_START 8 +#define PADDING_SPACES 25 + module_t *p_module; + module_config_t *p_item; + char psz_spaces[PADDING_SPACES+LINE_START+1]; + char psz_format[sizeof(FORMAT_STRING)]; + + memset( psz_spaces, ' ', PADDING_SPACES+LINE_START ); + psz_spaces[PADDING_SPACES+LINE_START] = '\0'; + + strcpy( psz_format, FORMAT_STRING ); + +#ifdef WIN32 + ShowConsole(); +#endif + + /* Enumerate the config for each module */ + for( p_module = p_this->p_vlc->module_bank.first ; + p_module != NULL ; + p_module = p_module->next ) + { + vlc_bool_t b_help_module = !strcmp( "help", p_module->psz_object_name ); + + if( psz_module_name && strcmp( psz_module_name, + p_module->psz_object_name ) ) + continue; + + /* Ignore modules without config options */ + if( !p_module->i_config_items ) continue; + + /* Print module name */ + fprintf( stderr, _("%s module options:\n\n"), + p_module->psz_object_name ); + + for( p_item = p_module->p_config; + p_item->i_type != MODULE_CONFIG_HINT_END; + p_item++ ) + { + char *psz_bra = NULL, *psz_type = NULL, *psz_ket = NULL; + char *psz_suf = ""; + int i; + + switch( p_item->i_type ) + { + case MODULE_CONFIG_HINT_CATEGORY: + fprintf( stderr, " %s\n", p_item->psz_text ); + break; + + case MODULE_CONFIG_ITEM_STRING: + case MODULE_CONFIG_ITEM_FILE: + case MODULE_CONFIG_ITEM_MODULE: /* We could also have "=<" here */ + psz_bra = " <"; psz_type = _("string"); psz_ket = ">"; + break; + case MODULE_CONFIG_ITEM_INTEGER: + psz_bra = " <"; psz_type = _("integer"); psz_ket = ">"; + break; + case MODULE_CONFIG_ITEM_FLOAT: + psz_bra = " <"; psz_type = _("float"); psz_ket = ">"; + break; + case MODULE_CONFIG_ITEM_BOOL: + psz_bra = ""; psz_type = ""; psz_ket = ""; + if( !b_help_module ) + { + psz_suf = p_item->i_value ? _(" (default enabled)") : + _(" (default disabled)"); + } + break; + } + + /* Add short option */ + if( p_item->i_short ) + { + psz_format[2] = '-'; + psz_format[3] = p_item->i_short; + psz_format[4] = ','; + } + else + { + psz_format[2] = ' '; + psz_format[3] = ' '; + psz_format[4] = ' '; + } + + if( psz_type ) + { + i = PADDING_SPACES - strlen( p_item->psz_name ) + - strlen( psz_bra ) - strlen( psz_type ) + - strlen( psz_ket ) - 1; + if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL + && !b_help_module ) + { + i -= 5; + } + + if( i < 0 ) + { + i = 0; + psz_spaces[i] = '\n'; + } + else + { + psz_spaces[i] = '\0'; + } + + fprintf( stderr, psz_format, + ( p_item->i_type == MODULE_CONFIG_ITEM_BOOL + && !b_help_module ) ? "(no-)" : "", + p_item->psz_name, psz_bra, psz_type, psz_ket, + psz_spaces, p_item->psz_text, psz_suf ); + psz_spaces[i] = ' '; + } + } + + /* Yet another nasty hack. + * Maybe we could use MODULE_CONFIG_ITEM_END to display tail messages + * for each module?? */ + if( !strcmp( "main", p_module->psz_object_name ) ) + { + fprintf( stderr, _("\nPlaylist items:" + "\n *.mpg, *.vob plain MPEG-1/2 files" + "\n [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]" + "\n DVD device" + "\n [vcd:][device][@[title][,[chapter]]" + "\n VCD device" + "\n udpstream:[@[][:]]" + "\n UDP stream sent by VLS" + "\n vlc:loop loop execution of the " + "playlist" + "\n vlc:pause pause execution of " + "playlist items" + "\n vlc:quit quit VLC" + "\n") ); + } + + fprintf( stderr, "\n" ); + + } + +#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ + fprintf( stderr, _("\nPress the RETURN key to continue...\n") ); + getchar(); +#endif +} + +/***************************************************************************** + * ListModules: list the available modules with their description + ***************************************************************************** + * Print a list of all available modules (builtins and plugins) and a short + * description for each one. + *****************************************************************************/ +static void ListModules( vlc_object_t *p_this ) +{ + module_t *p_module; + char psz_spaces[22]; + + memset( psz_spaces, ' ', 22 ); + +#ifdef WIN32 + ShowConsole(); +#endif + + /* Usage */ + fprintf( stderr, _("Usage: %s [options] [parameters] [file]...\n\n"), + p_this->p_vlc->psz_object_name ); + + fprintf( stderr, _("[module] [description]\n") ); + + /* Enumerate each module */ + for( p_module = p_this->p_vlc->module_bank.first ; + p_module != NULL ; + p_module = p_module->next ) + { + int i; + + /* Nasty hack, but right now I'm too tired to think about a nice + * solution */ + i = 22 - strlen( p_module->psz_object_name ) - 1; + if( i < 0 ) i = 0; + psz_spaces[i] = 0; + + fprintf( stderr, " %s%s %s\n", p_module->psz_object_name, psz_spaces, + p_module->psz_longname ); + + psz_spaces[i] = ' '; + + } + +#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ + fprintf( stderr, _("\nPress the RETURN key to continue...\n") ); + getchar(); +#endif +} + +/***************************************************************************** + * Version: print complete program version + ***************************************************************************** + * Print complete program version and build number. + *****************************************************************************/ +static void Version( void ) +{ +#ifdef WIN32 + ShowConsole(); +#endif + + fprintf( stderr, VERSION_MESSAGE "\n" ); + fprintf( stderr, + _("This program comes with NO WARRANTY, to the extent permitted by " + "law.\nYou may redistribute it under the terms of the GNU General " + "Public License;\nsee the file named COPYING for details.\n" + "Written by the VideoLAN team at Ecole Centrale, Paris.\n") ); + +#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ + fprintf( stderr, _("\nPress the RETURN key to continue...\n") ); + getchar(); +#endif +} + +/***************************************************************************** + * Build: print information about the vlc build + ***************************************************************************** + * Print the ./configure command line and other information. + *****************************************************************************/ +static void Build( void ) +{ +#ifdef WIN32 + ShowConsole(); +#endif + + fprintf( stderr, "configured with %s\n", CONFIGURE_LINE ); + +#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ + fprintf( stderr, _("\nPress the RETURN key to continue...\n") ); + getchar(); +#endif +} + +/***************************************************************************** + * ShowConsole: On Win32, create an output console for debug messages + ***************************************************************************** + * This function is useful only on Win32. + *****************************************************************************/ +#ifdef WIN32 /* */ +static void ShowConsole( void ) +{ + AllocConsole(); + freopen( "CONOUT$", "w", stdout ); + freopen( "CONOUT$", "w", stderr ); + freopen( "CONIN$", "r", stdin ); + return; +} +#endif + +/***************************************************************************** + * InitSignalHandler: system signal handler initialization + ***************************************************************************** + * Set the signal handlers. SIGTERM is not intercepted, because we need at + * at least a method to kill the program when all other methods failed, and + * when we don't want to use SIGKILL. + *****************************************************************************/ +static void InitSignalHandler( void ) +{ +#ifndef WIN32 + /* Termination signals */ + signal( SIGINT, FatalSignalHandler ); + signal( SIGHUP, FatalSignalHandler ); + signal( SIGQUIT, FatalSignalHandler ); + + /* Other signals */ + signal( SIGALRM, SimpleSignalHandler ); + signal( SIGPIPE, SimpleSignalHandler ); +#endif +} + +/***************************************************************************** + * SimpleSignalHandler: system signal handler + ***************************************************************************** + * This function is called when a non fatal signal is received by the program. + *****************************************************************************/ +static void SimpleSignalHandler( int i_signal ) +{ + int i_index; + + /* Acknowledge the signal received and warn all the p_vlc structures */ + vlc_mutex_lock( &global_lock ); + for( i_index = 0 ; i_index < i_vlc ; i_index++ ) + { + msg_Warn( pp_vlc[ i_index ], "ignoring signal %d", i_signal ); + } + vlc_mutex_unlock( &global_lock ); +} + +/***************************************************************************** + * FatalSignalHandler: system signal handler + ***************************************************************************** + * This function is called when a fatal signal is received by the program. + * It tries to end the program in a clean way. + *****************************************************************************/ +static void FatalSignalHandler( int i_signal ) +{ + static mtime_t abort_time = 0; + static volatile vlc_bool_t b_die = 0; + int i_index; + + /* Once a signal has been trapped, the termination sequence will be + * armed and following signals will be ignored to avoid sending messages + * to an interface having been destroyed */ + + vlc_mutex_lock( &global_lock ); + if( !b_die ) + { + b_die = 1; + abort_time = mdate(); + + /* Try to terminate everything - this is done by requesting the end of + * all the p_vlc structures */ + for( i_index = 0 ; i_index < i_vlc ; i_index++ ) + { + /* Acknowledge the signal received */ + msg_Err( pp_vlc[ i_index ], "signal %d received, exiting - do it " + "again in case vlc gets stuck", i_signal ); + pp_vlc[ i_index ]->b_die = 1; + } + } + else if( mdate() > abort_time + 1000000 ) + { + /* If user asks again 1 second later, die badly */ +#ifndef WIN32 + signal( SIGINT, SIG_IGN ); + signal( SIGHUP, SIG_IGN ); + signal( SIGQUIT, SIG_IGN ); +#endif + + for( i_index = 0 ; i_index < i_vlc ; i_index++ ) + { + msg_Err( pp_vlc[ i_index ], "user insisted too much, dying badly" ); + } + + vlc_mutex_unlock( &global_lock ); + exit( 1 ); + } + + vlc_mutex_unlock( &global_lock ); +} + diff --git a/src/libvlc.h b/src/libvlc.h new file mode 100644 index 0000000000..cf73f0286d --- /dev/null +++ b/src/libvlc.h @@ -0,0 +1,409 @@ +/***************************************************************************** + * libvlc.h: main libvlc header + ***************************************************************************** + * Copyright (C) 1998-2002 VideoLAN + * $Id: libvlc.h,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Vincent Seguin + * Samuel Hocevar + * Gildas Bazin + * + * 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. + *****************************************************************************/ + +/***************************************************************************** + * Configuration options for the main program. Each module will also separatly + * define its own configuration options. + * Look into configuration.h if you need to know more about the following + * macros. + *****************************************************************************/ +#define INTF_TEXT N_("interface module") +#define INTF_LONGTEXT N_( \ + "This option allows you to select the interface used by vlc. " \ + "The default behavior is to automatically select the best module " \ + "available.") + +#define VERBOSE_TEXT N_("be verbose") +#define VERBOSE_LONGTEXT N_( \ + "This options activates the output of information messages.") + +#define QUIET_TEXT N_("be quiet") +#define QUIET_LONGTEXT N_( \ + "This options turns off all warning and information messages.") + +#define COLOR_TEXT N_("color messages") +#define COLOR_LONGTEXT N_( \ + "When this option is turned on, the messages sent to the console will " \ + "be colorized. Your terminal needs Linux color support for this to work.") + +#define INTF_PATH_TEXT N_("interface default search path") +#define INTF_PATH_LONGTEXT N_( \ + "This option allows you to set the default path that the interface will " \ + "open when looking for a file.") + +#define AOUT_TEXT N_("audio output module") +#define AOUT_LONGTEXT N_( \ + "This option allows you to select the audio audio output method used by " \ + "vlc. The default behavior is to automatically select the " \ + "best method available.") + +#define AUDIO_TEXT N_("enable audio") +#define AUDIO_LONGTEXT N_( \ + "You can completely disable the audio output. In this case the audio " \ + "decoding stage won't be done, and it will save some processing power.") + +#define MONO_TEXT N_("force mono audio") +#define MONO_LONGTEXT N_("This will force a mono audio output") + +#define VOLUME_TEXT N_("audio output volume") +#define VOLUME_LONGTEXT N_( \ + "You can set the default audio output volume here, in a range from 0 to " \ + "1024.") + +#define FORMAT_TEXT N_("audio output format") +#define FORMAT_LONGTEXT N_( \ + "You can force the audio output format here.\n" \ + "0 -> 16 bits signed native endian (default)\n" \ + "1 -> 8 bits unsigned\n" \ + "2 -> 16 bits signed little endian\n" \ + "3 -> 16 bits signed big endian\n" \ + "4 -> 8 bits signed\n" \ + "5 -> 16 bits unsigned little endian\n" \ + "6 -> 16 bits unsigned big endian\n" \ + "7 -> mpeg2 audio (unsupported)\n" \ + "8 -> ac3 pass-through") + +#define RATE_TEXT N_("audio output frequency (Hz)") +#define RATE_LONGTEXT N_( \ + "You can force the audio output frequency here. Common values are " \ + "48000, 44100, 32000, 22050, 16000, 11025, 8000.") + +#define DESYNC_TEXT N_("compensate desynchronization of audio (in ms)") +#define DESYNC_LONGTEXT N_( \ + "This option allows you to delay the audio output. This can be handy if " \ + "you notice a lag between the video and the audio.") + +#define VOUT_TEXT N_("video output module") +#define VOUT_LONGTEXT N_( \ + "This option allows you to select the video output method used by vlc. " \ + "The default behavior is to automatically select the best " \ + "method available.") + +#define VIDEO_TEXT N_("enable video") +#define VIDEO_LONGTEXT N_( \ + "You can completely disable the video output. In this case the video " \ + "decoding stage won't be done, which will save some processing power.") + +#define DISPLAY_TEXT N_("display identifier") +#define DISPLAY_LONGTEXT N_( \ + "This is the local display port that will be used for X11 drawing. " \ + "For instance :0.1.") + +#define WIDTH_TEXT N_("video width") +#define WIDTH_LONGTEXT N_( \ + "You can enforce the video width here. By default vlc will " \ + "adapt to the video characteristics.") + +#define HEIGHT_TEXT N_("video height") +#define HEIGHT_LONGTEXT N_( \ + "You can enforce the video height here. By default vlc will " \ + "adapt to the video characteristics.") + +#define ZOOM_TEXT N_("zoom video") +#define ZOOM_LONGTEXT N_( \ + "You can zoom the video by the specified factor.") + +#define GRAYSCALE_TEXT N_("grayscale video output") +#define GRAYSCALE_LONGTEXT N_( \ + "When enabled, the color information from the video won't be decoded " \ + "(this can also allow you to save some processing power).") + +#define FULLSCREEN_TEXT N_("fullscreen video output") +#define FULLSCREEN_LONGTEXT N_( \ + "If this option is enabled, vlc will always start a video in fullscreen " \ + "mode.") + +#define OVERLAY_TEXT N_("overlay video output") +#define OVERLAY_LONGTEXT N_( \ + "If enabled, vlc will try to take advantage of the overlay capabilities " \ + "of you graphics card.") + +#define SPUMARGIN_TEXT N_("force SPU position") +#define SPUMARGIN_LONGTEXT N_( \ + "You can use this option to place the subtitles under the movie, " \ + "instead of over the movie. Try several positions.") + +#define FILTER_TEXT N_("video filter module") +#define FILTER_LONGTEXT N_( \ + "This will allow you to add a post-processing filter to enhance the " \ + "picture quality, for instance deinterlacing, or to clone or distort " \ + "the video window.") + +#define SERVER_PORT_TEXT N_("server port") +#define SERVER_PORT_LONGTEXT N_( \ + "This is the port used for UDP streams. By default, we chose 1234.") + +#define NETCHANNEL_TEXT N_("enable network channel mode") +#define NETCHANNEL_LONGTEXT N_( \ + "Activate this option if you want to use the VideoLAN Channel Server.") + +#define CHAN_SERV_TEXT N_("channel server address") +#define CHAN_SERV_LONGTEXT N_( \ + "Indicate here the address of the VideoLAN Channel Server.") + +#define CHAN_PORT_TEXT N_("channel server port") +#define CHAN_PORT_LONGTEXT N_( \ + "Indicate here the port on which the VideoLAN Channel Server runs.") + +#define IFACE_TEXT N_("network interface") +#define IFACE_LONGTEXT N_( \ + "If you have several interfaces on your Linux machine and use the " \ + "VLAN solution, you may indicate here which interface to use.") + +#define INPUT_PROGRAM_TEXT N_("choose program (SID)") +#define INPUT_PROGRAM_LONGTEXT N_( \ + "Choose the program to select by giving its Service ID.") + +#define INPUT_AUDIO_TEXT N_("choose audio") +#define INPUT_AUDIO_LONGTEXT N_( \ + "Give the default type of audio you want to use in a DVD.") + +#define INPUT_CHAN_TEXT N_("choose channel") +#define INPUT_CHAN_LONGTEXT N_( \ + "Give the stream number of the audio channel you want to use in a DVD " \ + "(from 1 to n).") + +#define INPUT_SUBT_TEXT N_("choose subtitles") +#define INPUT_SUBT_LONGTEXT N_( \ + "Give the stream number of the subtitle channel you want to use in a " \ + "DVD (from 1 to n).") + +#define DVD_DEV_TEXT N_("DVD device") +#define DVD_DEV_LONGTEXT N_( \ + "This is the default DVD device to use.") + +#define VCD_DEV_TEXT N_("VCD device") +#define VCD_DEV_LONGTEXT N_( \ + "This is the default VCD device to use.") + +#define IPV6_TEXT N_("force IPv6") +#define IPV6_LONGTEXT N_( \ + "If you check this box, IPv6 will be used by default for all UDP and " \ + "HTTP connections.") + +#define IPV4_TEXT N_("force IPv4") +#define IPV4_LONGTEXT N_( \ + "If you check this box, IPv4 will be used by default for all UDP and " \ + "HTTP connections.") + +#define ADEC_MPEG_TEXT N_("choose MPEG audio decoder") +#define ADEC_MPEG_LONGTEXT N_( \ + "This allows you to select the MPEG audio decoder you want to use. " \ + "Common choices are builtin and mad.") + +#define ADEC_AC3_TEXT N_("choose AC3 audio decoder") +#define ADEC_AC3_LONGTEXT N_( \ + "This allows you to select the AC3/A52 audio decoder you want to use. " \ + "Common choices are builtin and a52.") + +#define MMX_TEXT N_("enable CPU MMX support") +#define MMX_LONGTEXT N_( \ + "If your processor supports the MMX instructions set, vlc can take " \ + "advantage of them.") + +#define THREE_DN_TEXT N_("enable CPU 3D Now! support") +#define THREE_DN_LONGTEXT N_( \ + "If your processor supports the 3D Now! instructions set, vlc can take "\ + "advantage of them.") + +#define MMXEXT_TEXT N_("enable CPU MMX EXT support") +#define MMXEXT_LONGTEXT N_( \ + "If your processor supports the MMX EXT instructions set, vlc can take "\ + "advantage of them.") + +#define SSE_TEXT N_("enable CPU SSE support") +#define SSE_LONGTEXT N_( \ + "If your processor supports the SSE instructions set, vlc can take " \ + "can take advantage of them.") + +#define ALTIVEC_TEXT N_("enable CPU AltiVec support") +#define ALTIVEC_LONGTEXT N_( \ + "If your processor supports the AltiVec instructions set, vlc can take "\ + "advantage of them.") + +#define PL_LAUNCH_TEXT N_("launch playlist on startup") +#define PL_LAUNCH_LONGTEXT N_( \ + "If you want vlc to start playing on startup, then enable this option.") + +#define PL_ENQUEUE_TEXT N_("enqueue items in playlist") +#define PL_ENQUEUE_LONGTEXT N_( \ + "If you want vlc to add items to the playlist as you open them, then " \ + "enable this option.") + +#define PL_LOOP_TEXT N_("loop playlist on end") +#define PL_LOOP_LONGTEXT N_( \ + "If you want vlc to keep playing the playlist indefinitely then enable " \ + "this option.") + +#define MEMCPY_TEXT N_("memory copy module") +#define MEMCPY_LONGTEXT N_( \ + "You can select wich memory copy module you want to use. By default vlc " \ + "will select the fastest one supported by your hardware.") + +#define ACCESS_TEXT N_("access module") +#define ACCESS_LONGTEXT N_( \ + "This is a legacy entry to let you configure access modules") + +#define DEMUX_TEXT N_("demux module") +#define DEMUX_LONGTEXT N_( \ + "This is a legacy entry to let you configure demux modules") + +#define FAST_PTHREAD_TEXT N_("fast pthread on NT/2K/XP (developpers only)") +#define FAST_PTHREAD_LONGTEXT N_( \ + "On Windows NT/2K/XP we use a slow but correct pthread implementation, " \ + "you can also use this faster implementation but you might experience " \ + "problems with it.") + +/* + * Quick usage guide for the configuration options: + * + * MODULE_CONFIG_START + * MODULE_CONFIG_STOP + * ADD_CATEGORY_HINT( N_(text), longtext ) + * ADD_SUBCATEGORY_HINT( N_(text), longtext ) + * ADD_STRING( option_name, value, p_callback, N_(text), N_(longtext) ) + * ADD_FILE( option_name, psz_value, p_callback, N_(text), N_(longtext) ) + * ADD_MODULE( option_name, psz_value, i_capability, p_callback, + * N_(text), N_(longtext) ) + * ADD_INTEGER( option_name, i_value, p_callback, N_(text), N_(longtext) ) + * ADD_BOOL( option_name, b_value, p_callback, N_(text), N_(longtext) ) + */ + +MODULE_CONFIG_START + +/* Interface options */ +ADD_CATEGORY_HINT( N_("Interface"), NULL) +ADD_MODULE_WITH_SHORT ( "intf", 'I', MODULE_CAPABILITY_INTF, NULL, NULL, INTF_TEXT, INTF_LONGTEXT ) +ADD_BOOL_WITH_SHORT ( "verbose", 'v', 0, NULL, VERBOSE_TEXT, VERBOSE_LONGTEXT ) +ADD_BOOL_WITH_SHORT ( "quiet", 'q', 0, NULL, QUIET_TEXT, QUIET_LONGTEXT ) +ADD_BOOL ( "color", 0, NULL, COLOR_TEXT, COLOR_LONGTEXT ) +ADD_STRING ( "search-path", NULL, NULL, INTF_PATH_TEXT, INTF_PATH_LONGTEXT ) + +/* Audio options */ +ADD_CATEGORY_HINT( N_("Audio"), NULL) +ADD_MODULE_WITH_SHORT ( "aout", 'A', MODULE_CAPABILITY_AOUT, NULL, NULL, AOUT_TEXT, AOUT_LONGTEXT ) +ADD_BOOL ( "audio", 1, NULL, AUDIO_TEXT, AUDIO_LONGTEXT ) +ADD_BOOL ( "mono", 0, NULL, MONO_TEXT, MONO_LONGTEXT ) +ADD_INTEGER ( "volume", VOLUME_DEFAULT, NULL, VOLUME_TEXT, VOLUME_LONGTEXT ) +ADD_INTEGER ( "rate", 44100, NULL, RATE_TEXT, RATE_LONGTEXT ) +ADD_INTEGER ( "desync", 0, NULL, DESYNC_TEXT, DESYNC_LONGTEXT ) +ADD_INTEGER ( "audio-format", 0, NULL, FORMAT_TEXT, FORMAT_LONGTEXT ) + +/* Video options */ +ADD_CATEGORY_HINT( N_("Video"), NULL ) +ADD_MODULE_WITH_SHORT ( "vout", 'V', MODULE_CAPABILITY_VOUT, NULL, NULL, VOUT_TEXT, VOUT_LONGTEXT ) +ADD_BOOL ( "video", 1, NULL, VIDEO_TEXT, VIDEO_LONGTEXT ) +ADD_INTEGER ( "width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT ) +ADD_INTEGER ( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT ) +ADD_FLOAT ( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT ) +ADD_BOOL ( "grayscale", 0, NULL, GRAYSCALE_TEXT, GRAYSCALE_LONGTEXT ) +ADD_BOOL ( "fullscreen", 0, NULL, FULLSCREEN_TEXT, FULLSCREEN_LONGTEXT ) +ADD_BOOL ( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT ) +ADD_INTEGER ( "spumargin", -1, NULL, SPUMARGIN_TEXT, SPUMARGIN_LONGTEXT ) +ADD_MODULE ( "filter", MODULE_CAPABILITY_VOUT, NULL, NULL, FILTER_TEXT, FILTER_LONGTEXT ) + +/* Input options */ +ADD_CATEGORY_HINT( N_("Input"), NULL ) +ADD_INTEGER ( "server-port", 1234, NULL, SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT ) +ADD_BOOL ( "network-channel", 0, NULL, NETCHANNEL_TEXT, NETCHANNEL_LONGTEXT ) +ADD_STRING ( "channel-server", "localhost", NULL, CHAN_SERV_TEXT, CHAN_SERV_LONGTEXT ) +ADD_INTEGER ( "channel-port", 6010, NULL, CHAN_PORT_TEXT, CHAN_PORT_LONGTEXT ) +ADD_STRING ( "iface", "eth0", NULL, IFACE_TEXT, IFACE_LONGTEXT ) + +ADD_INTEGER ( "program", 0, NULL, INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT ) +ADD_INTEGER ( "audio-type", -1, NULL, INPUT_AUDIO_TEXT, INPUT_AUDIO_LONGTEXT ) +ADD_INTEGER ( "audio-channel", -1, NULL, INPUT_CHAN_TEXT, INPUT_CHAN_LONGTEXT ) +ADD_INTEGER ( "spu-channel", -1, NULL, INPUT_SUBT_TEXT, INPUT_SUBT_LONGTEXT ) + +ADD_STRING ( "dvd", DVD_DEVICE, NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT ) +ADD_STRING ( "vcd", VCD_DEVICE, NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT ) + +ADD_BOOL_WITH_SHORT ( "ipv6", '6', 0, NULL, IPV6_TEXT, IPV6_LONGTEXT ) +ADD_BOOL_WITH_SHORT ( "ipv4", '4', 0, NULL, IPV4_TEXT, IPV4_LONGTEXT ) + +/* Decoder options */ +ADD_CATEGORY_HINT( N_("Decoders"), NULL ) +ADD_MODULE ( "mpeg-adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_MPEG_TEXT, ADEC_MPEG_LONGTEXT ) +ADD_MODULE ( "ac3-adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_AC3_TEXT, ADEC_AC3_LONGTEXT ) + +/* CPU options */ +ADD_CATEGORY_HINT( N_("CPU"), NULL ) +ADD_BOOL ( "mmx", 1, NULL, MMX_TEXT, MMX_LONGTEXT ) +ADD_BOOL ( "3dn", 1, NULL, THREE_DN_TEXT, THREE_DN_LONGTEXT ) +ADD_BOOL ( "mmxext", 1, NULL, MMXEXT_TEXT, MMXEXT_LONGTEXT ) +ADD_BOOL ( "sse", 1, NULL, SSE_TEXT, SSE_LONGTEXT ) +ADD_BOOL ( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT ) + +/* Playlist options */ +ADD_CATEGORY_HINT( N_("Playlist"), NULL ) +ADD_BOOL ( "launch-playlist", 0, NULL, PL_LAUNCH_TEXT, PL_LAUNCH_LONGTEXT ) +ADD_BOOL ( "enqueue-playlist", 0, NULL, PL_ENQUEUE_TEXT, PL_ENQUEUE_LONGTEXT ) +ADD_BOOL ( "loop-playlist", 0, NULL, PL_LOOP_TEXT, PL_LOOP_LONGTEXT ) + +/* Misc options */ +ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) +ADD_MODULE ( "memcpy", MODULE_CAPABILITY_MEMCPY, NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT ) +ADD_MODULE ( "access", MODULE_CAPABILITY_ACCESS, NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT ) +ADD_MODULE ( "demux", MODULE_CAPABILITY_DEMUX, NULL, NULL, DEMUX_TEXT, DEMUX_LONGTEXT ) + +#if defined(WIN32) +ADD_BOOL ( "fast-pthread", 0, NULL, FAST_PTHREAD_TEXT, FAST_PTHREAD_LONGTEXT ) +#endif + +MODULE_CONFIG_STOP + +MODULE_INIT_START + SET_DESCRIPTION( N_("main program") ) + ADD_CAPABILITY( MAIN, 100/*whatever*/ ) +MODULE_INIT_STOP + +MODULE_ACTIVATE_START +MODULE_ACTIVATE_STOP + +MODULE_DEACTIVATE_START +MODULE_DEACTIVATE_STOP + +static module_config_t p_help_config[] = +{ + { MODULE_CONFIG_ITEM_BOOL, "help", 'h', N_("print help"), + NULL, NULL, 0, 0, NULL, NULL, 0 }, + { MODULE_CONFIG_ITEM_BOOL, "longhelp", 'H', N_("print detailed help"), + NULL, NULL, 0, 0, NULL, NULL, 0 }, + { MODULE_CONFIG_ITEM_BOOL, "list", 'l', N_("print a list of available " + "modules"), NULL, NULL, 0, 0, NULL, NULL, 0 }, + { MODULE_CONFIG_ITEM_STRING, "module", 'p', N_("print help on module"), + NULL, NULL, 0, 0, NULL, NULL, 0 }, + { MODULE_CONFIG_ITEM_BOOL, "version", '\0', + N_("print version information"), NULL, NULL, 0, 0, NULL, NULL, 0 }, + { MODULE_CONFIG_ITEM_BOOL, "build", '\0', + N_("print build information"), NULL, NULL, 0, 0, NULL, NULL, 0 }, + { MODULE_CONFIG_HINT_END, NULL, '\0', NULL, NULL, NULL, 0, 0, + NULL, NULL, 0 } +}; + +/***************************************************************************** + * End configuration. + *****************************************************************************/ + diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp index 36d287f312..02e72f2bb9 100644 --- a/src/misc/beos_specific.cpp +++ b/src/misc/beos_specific.cpp @@ -2,7 +2,7 @@ * beos_init.cpp: Initialization for BeOS specific features ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: beos_specific.cpp,v 1.18 2002/04/26 05:43:37 sam Exp $ + * $Id: beos_specific.cpp,v 1.19 2002/06/01 12:32:01 sam Exp $ * * Authors: Jean-Marc Dressler * @@ -30,7 +30,7 @@ extern "C" { -#include +#include } /***************************************************************************** @@ -65,15 +65,15 @@ static void system_AppThread( void * args ); /***************************************************************************** * system_Init: create a BApplication object and fill in program path. *****************************************************************************/ -void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) +void system_Init( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[] ) { /* Prepare the lock/wait before launching the BApplication thread */ - vlc_mutex_init( &app_lock ); + vlc_mutex_init( p_this, &app_lock ); vlc_cond_init( &app_wait ); vlc_mutex_lock( &app_lock ); /* Create the BApplication thread */ - vlc_thread_create( &app_thread, "app thread", + vlc_thread_create( p_this, &app_thread, "app thread", (vlc_thread_func_t)system_AppThread, 0 ); /* Wait for the application to be initialized */ @@ -88,7 +88,7 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) /***************************************************************************** * system_Configure: check for system specific configuration options. *****************************************************************************/ -void system_Configure( void ) +void system_Configure( vlc_object_t * ) { } @@ -96,13 +96,13 @@ void system_Configure( void ) /***************************************************************************** * system_End: destroy the BApplication object. *****************************************************************************/ -void system_End( void ) +void system_End( vlc_object_t *p_this ) { free( psz_program_path ); /* Tell the BApplication to die */ be_app->PostMessage( B_QUIT_REQUESTED ); - vlc_thread_join( app_thread ); + vlc_thread_join( p_this, app_thread ); } /***************************************************************************** diff --git a/src/misc/configuration.c b/src/misc/configuration.c index d626f76088..90998b46ad 100644 --- a/src/misc/configuration.c +++ b/src/misc/configuration.c @@ -2,7 +2,7 @@ * configuration.c management of the modules configuration ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: configuration.c,v 1.26 2002/05/30 08:17:04 gbazin Exp $ + * $Id: configuration.c,v 1.27 2002/06/01 12:32:01 sam Exp $ * * Authors: Gildas Bazin * @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -#include +#include #include /* sprintf() */ #include /* free(), strtol() */ @@ -48,29 +48,28 @@ #include /***************************************************************************** - * config_GetIntVariable: get the value of an int variable + * config_GetInt: get the value of an int variable ***************************************************************************** * This function is used to get the value of variables which are internally * represented by an integer (MODULE_CONFIG_ITEM_INTEGER and * MODULE_CONFIG_ITEM_BOOL). *****************************************************************************/ -int config_GetIntVariable( const char *psz_name ) +int __config_GetInt( vlc_object_t *p_this, const char *psz_name ) { module_config_t *p_config; - p_config = config_FindConfig( psz_name ); + p_config = config_FindConfig( p_this, psz_name ); /* sanity checks */ if( !p_config ) { - intf_ErrMsg( "config error: option %s doesn't exist", psz_name ); + msg_Err( p_this, "option %s does not exist", psz_name ); return -1; } if( (p_config->i_type!=MODULE_CONFIG_ITEM_INTEGER) && (p_config->i_type!=MODULE_CONFIG_ITEM_BOOL) ) { - intf_ErrMsg( "config error: option %s doesn't refer to an int", - psz_name ); + msg_Err( p_this, "option %s does not refer to an int", psz_name ); return -1; } @@ -78,27 +77,26 @@ int config_GetIntVariable( const char *psz_name ) } /***************************************************************************** - * config_GetFloatVariable: get the value of a float variable + * config_GetFloat: get the value of a float variable ***************************************************************************** * This function is used to get the value of variables which are internally * represented by a float (MODULE_CONFIG_ITEM_FLOAT). *****************************************************************************/ -float config_GetFloatVariable( const char *psz_name ) +float __config_GetFloat( vlc_object_t *p_this, const char *psz_name ) { module_config_t *p_config; - p_config = config_FindConfig( psz_name ); + p_config = config_FindConfig( p_this, psz_name ); /* sanity checks */ if( !p_config ) { - intf_ErrMsg( "config error: option %s doesn't exist", psz_name ); + msg_Err( p_this, "option %s does not exist", psz_name ); return -1; } if( p_config->i_type != MODULE_CONFIG_ITEM_FLOAT ) { - intf_ErrMsg( "config error: option %s doesn't refer to a float", - psz_name ); + msg_Err( p_this, "option %s does not refer to a float", psz_name ); return -1; } @@ -106,7 +104,7 @@ float config_GetFloatVariable( const char *psz_name ) } /***************************************************************************** - * config_GetPszVariable: get the string value of a string variable + * config_GetPsz: get the string value of a string variable ***************************************************************************** * This function is used to get the value of variables which are internally * represented by a string (MODULE_CONFIG_ITEM_STRING, MODULE_CONFIG_ITEM_FILE, @@ -116,25 +114,24 @@ float config_GetFloatVariable( const char *psz_name ) * of the actual value. It isn't safe to return a pointer to the actual value * as it can be modified at any time. *****************************************************************************/ -char * config_GetPszVariable( const char *psz_name ) +char * __config_GetPsz( vlc_object_t *p_this, const char *psz_name ) { module_config_t *p_config; char *psz_value = NULL; - p_config = config_FindConfig( psz_name ); + p_config = config_FindConfig( p_this, psz_name ); /* sanity checks */ if( !p_config ) { - intf_ErrMsg( "config error: option %s doesn't exist", psz_name ); + msg_Err( p_this, "option %s does not exist", psz_name ); return NULL; } if( (p_config->i_type!=MODULE_CONFIG_ITEM_STRING) && (p_config->i_type!=MODULE_CONFIG_ITEM_FILE) && (p_config->i_type!=MODULE_CONFIG_ITEM_MODULE) ) { - intf_ErrMsg( "config error: option %s doesn't refer to a string", - psz_name ); + msg_Err( p_this, "option %s does not refer to a string", psz_name ); return NULL; } @@ -147,30 +144,30 @@ char * config_GetPszVariable( const char *psz_name ) } /***************************************************************************** - * config_PutPszVariable: set the string value of a string variable + * config_PutPsz: set the string value of a string variable ***************************************************************************** * This function is used to set the value of variables which are internally * represented by a string (MODULE_CONFIG_ITEM_STRING, MODULE_CONFIG_ITEM_FILE, * and MODULE_CONFIG_ITEM_MODULE). *****************************************************************************/ -void config_PutPszVariable( const char *psz_name, char *psz_value ) +void __config_PutPsz( vlc_object_t *p_this, + const char *psz_name, char *psz_value ) { module_config_t *p_config; - p_config = config_FindConfig( psz_name ); + p_config = config_FindConfig( p_this, psz_name ); /* sanity checks */ if( !p_config ) { - intf_ErrMsg( "config error: option %s doesn't exist", psz_name ); + msg_Err( p_this, "option %s does not exist", psz_name ); return; } if( (p_config->i_type!=MODULE_CONFIG_ITEM_STRING) && (p_config->i_type!=MODULE_CONFIG_ITEM_FILE) && (p_config->i_type!=MODULE_CONFIG_ITEM_MODULE) ) { - intf_ErrMsg( "config error: option %s doesn't refer to a string", - psz_name ); + msg_Err( p_this, "option %s does not refer to a string", psz_name ); return; } @@ -184,77 +181,76 @@ void config_PutPszVariable( const char *psz_name, char *psz_value ) vlc_mutex_unlock( p_config->p_lock ); - if( p_config->p_callback ) + if( p_config->pf_callback ) { - ((void(*)(void))p_config->p_callback)(); + p_config->pf_callback( p_this ); } } /***************************************************************************** - * config_PutIntVariable: set the integer value of an int variable + * config_PutInt: set the integer value of an int variable ***************************************************************************** * This function is used to set the value of variables which are internally * represented by an integer (MODULE_CONFIG_ITEM_INTEGER and * MODULE_CONFIG_ITEM_BOOL). *****************************************************************************/ -void config_PutIntVariable( const char *psz_name, int i_value ) +void __config_PutInt( vlc_object_t *p_this, const char *psz_name, int i_value ) { module_config_t *p_config; - p_config = config_FindConfig( psz_name ); + p_config = config_FindConfig( p_this, psz_name ); /* sanity checks */ if( !p_config ) { - intf_ErrMsg( "config error: option %s doesn't exist", psz_name ); + msg_Err( p_this, "option %s does not exist", psz_name ); return; } if( (p_config->i_type!=MODULE_CONFIG_ITEM_INTEGER) && (p_config->i_type!=MODULE_CONFIG_ITEM_BOOL) ) { - intf_ErrMsg( "config error: option %s doesn't refer to an int", - psz_name ); + msg_Err( p_this, "option %s does not refer to an int", psz_name ); return; } p_config->i_value = i_value; - if( p_config->p_callback ) + if( p_config->pf_callback ) { - ((void(*)(void))p_config->p_callback)(); + p_config->pf_callback( p_this ); } } /***************************************************************************** - * config_PutFloatVariable: set the value of a float variable + * config_PutFloat: set the value of a float variable ***************************************************************************** * This function is used to set the value of variables which are internally * represented by a float (MODULE_CONFIG_ITEM_FLOAT). *****************************************************************************/ -void config_PutFloatVariable( const char *psz_name, float f_value ) +void __config_PutFloat( vlc_object_t *p_this, + const char *psz_name, float f_value ) { module_config_t *p_config; - p_config = config_FindConfig( psz_name ); + p_config = config_FindConfig( p_this, psz_name ); /* sanity checks */ if( !p_config ) { - intf_ErrMsg( "config error: option %s doesn't exist", psz_name ); + msg_Err( p_this, "option %s does not exist", psz_name ); return; } if( p_config->i_type != MODULE_CONFIG_ITEM_FLOAT ) { - intf_ErrMsg( "config error: option %s doesn't refer to a float", - psz_name ); + msg_Err( p_this, "option %s does not refer to a float", psz_name ); return; } p_config->f_value = f_value; - if( p_config->p_callback ) + if( p_config->pf_callback ) { - ((void(*)(void))p_config->p_callback)(); + p_config->pf_callback( p_this ); } } @@ -263,14 +259,14 @@ void config_PutFloatVariable( const char *psz_name, float f_value ) ***************************************************************************** * FIXME: This function really needs to be optimized. *****************************************************************************/ -module_config_t *config_FindConfig( const char *psz_name ) +module_config_t *config_FindConfig( vlc_object_t *p_this, const char *psz_name ) { module_t *p_module; module_config_t *p_item; if( !psz_name ) return NULL; - for( p_module = p_module_bank->first ; + for( p_module = p_this->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { @@ -296,48 +292,105 @@ module_config_t *config_FindConfig( const char *psz_name ) * this module might be unloaded from memory at any time (remember HideModule). * This is why we need to create an exact copy of the config data. *****************************************************************************/ -module_config_t *config_Duplicate( module_config_t *p_orig ) +void config_Duplicate( module_t *p_module, module_config_t *p_orig ) { - int i, i_lines; - module_config_t *p_config; + int i, i_lines = 1; + module_config_t *p_item; /* Calculate the structure length */ - for( p_config = p_orig, i_lines = 1; - p_config->i_type != MODULE_CONFIG_HINT_END; - p_config++, i_lines++ ); + p_module->i_config_items = 0; + p_module->i_bool_items = 0; + + for( p_item = p_orig; p_item->i_type != MODULE_CONFIG_HINT_END; p_item++ ) + { + i_lines++; + + if( p_item->i_type & MODULE_CONFIG_ITEM ) + { + p_module->i_config_items++; + } + + if( p_item->i_type == MODULE_CONFIG_ITEM_BOOL ) + { + p_module->i_bool_items++; + } + } /* Allocate memory */ - p_config = (module_config_t *)malloc( sizeof(module_config_t) * i_lines ); - if( p_config == NULL ) + p_module->p_config = (module_config_t *)malloc( sizeof(module_config_t) + * i_lines ); + if( p_module->p_config == NULL ) { - intf_ErrMsg( "config error: can't duplicate p_config" ); - return( NULL ); + msg_Err( p_module, "config error: can't duplicate p_config" ); + return; } + /* Initialize the global lock */ + vlc_mutex_init( p_module->p_this, &p_module->config_lock ); + /* Do the duplication job */ for( i = 0; i < i_lines ; i++ ) { - p_config[i].i_type = p_orig[i].i_type; - p_config[i].i_short = p_orig[i].i_short; - p_config[i].i_value = p_orig[i].i_value; - p_config[i].f_value = p_orig[i].f_value; - p_config[i].b_dirty = p_orig[i].b_dirty; + p_module->p_config[i].i_type = p_orig[i].i_type; + p_module->p_config[i].i_short = p_orig[i].i_short; + p_module->p_config[i].i_value = p_orig[i].i_value; + p_module->p_config[i].f_value = p_orig[i].f_value; + p_module->p_config[i].b_dirty = p_orig[i].b_dirty; - p_config[i].psz_name = p_orig[i].psz_name ? + p_module->p_config[i].psz_name = p_orig[i].psz_name ? strdup( _(p_orig[i].psz_name) ) : NULL; - p_config[i].psz_text = p_orig[i].psz_text ? + p_module->p_config[i].psz_text = p_orig[i].psz_text ? strdup( _(p_orig[i].psz_text) ) : NULL; - p_config[i].psz_longtext = p_orig[i].psz_longtext ? + p_module->p_config[i].psz_longtext = p_orig[i].psz_longtext ? strdup( _(p_orig[i].psz_longtext) ) : NULL; - p_config[i].psz_value = p_orig[i].psz_value ? + p_module->p_config[i].psz_value = p_orig[i].psz_value ? strdup( _(p_orig[i].psz_value) ) : NULL; + p_module->p_config[i].p_lock = &p_module->config_lock; + /* the callback pointer is only valid when the module is loaded so this * value is set in ActivateModule() and reset in DeactivateModule() */ - p_config[i].p_callback = NULL; + p_module->p_config[i].pf_callback = NULL; } +} + +/***************************************************************************** + * config_Free: frees a duplicated module's configuration data. + ***************************************************************************** + * This function frees all the data duplicated by config_Duplicate. + *****************************************************************************/ +void config_Free( module_t *p_module ) +{ + module_config_t *p_item = p_module->p_config; + + for( ; p_item->i_type != MODULE_CONFIG_HINT_END ; p_item++ ) + { + if( p_item->psz_name ) + { + free( p_item->psz_name ); + } - return p_config; + if( p_item->psz_text ) + { + free( p_item->psz_text ); + } + + if( p_item->psz_longtext ) + { + free( p_item->psz_longtext ); + } + + if( p_item->psz_value ) + { + free( p_item->psz_value ); + } + } + + free( p_module->p_config ); + p_module->p_config = NULL; + + /* Remove the global lock */ + vlc_mutex_destroy( &p_module->config_lock ); } /***************************************************************************** @@ -351,7 +404,7 @@ void config_SetCallbacks( module_config_t *p_new, module_config_t *p_orig ) { while( p_new->i_type != MODULE_CONFIG_HINT_END ) { - p_new->p_callback = p_orig->p_callback; + p_new->pf_callback = p_orig->pf_callback; p_new++; p_orig++; } @@ -366,7 +419,7 @@ void config_UnsetCallbacks( module_config_t *p_new ) { while( p_new->i_type != MODULE_CONFIG_HINT_END ) { - p_new->p_callback = NULL; + p_new->pf_callback = NULL; p_new++; } } @@ -377,7 +430,7 @@ void config_UnsetCallbacks( module_config_t *p_new ) * This function is called to load the config options stored in the config * file. *****************************************************************************/ -int config_LoadConfigFile( const char *psz_module_name ) +int config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name ) { module_t *p_module; module_config_t *p_item; @@ -387,44 +440,46 @@ int config_LoadConfigFile( const char *psz_module_name ) char *psz_filename, *psz_homedir; /* Acquire config file lock */ - vlc_mutex_lock( &p_main->config_lock ); + vlc_mutex_lock( &p_this->p_vlc->config_lock ); - psz_homedir = p_main->psz_homedir; + psz_homedir = p_this->p_vlc->psz_homedir; if( !psz_homedir ) { - intf_ErrMsg( "config error: p_main->psz_homedir is null" ); - vlc_mutex_unlock( &p_main->config_lock ); + msg_Err( p_this, "psz_homedir is null" ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } psz_filename = (char *)malloc( strlen("/" CONFIG_DIR "/" CONFIG_FILE) + strlen(psz_homedir) + 1 ); if( !psz_filename ) { - intf_ErrMsg( "config error: couldn't malloc psz_filename" ); - vlc_mutex_unlock( &p_main->config_lock ); + msg_Err( p_this, "out of memory" ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } sprintf( psz_filename, "%s/" CONFIG_DIR "/" CONFIG_FILE, psz_homedir ); - intf_WarnMsg( 5, "config: opening config file %s", psz_filename ); + msg_Dbg( p_this, "opening config file %s", psz_filename ); file = fopen( psz_filename, "rt" ); if( !file ) { - intf_WarnMsg( 1, "config: config file %s doesn't already exist", - psz_filename ); + msg_Warn( p_this, "config file %s does not exist yet", psz_filename ); free( psz_filename ); - vlc_mutex_unlock( &p_main->config_lock ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } /* Look for the selected module, if NULL then save everything */ - for( p_module = p_module_bank->first ; p_module != NULL ; + for( p_module = p_this->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { - if( psz_module_name && strcmp( psz_module_name, p_module->psz_name ) ) + if( psz_module_name + && strcmp( psz_module_name, p_module->psz_object_name ) ) + { continue; + } /* The config file is organized in sections, one per module. Look for * the interesting section ( a section is of the form [foo] ) */ @@ -432,12 +487,12 @@ int config_LoadConfigFile( const char *psz_module_name ) while( fgets( line, 1024, file ) ) { if( (line[0] == '[') && (p_index = strchr(line,']')) && - (p_index - &line[1] == strlen(p_module->psz_name) ) && - !memcmp( &line[1], p_module->psz_name, - strlen(p_module->psz_name) ) ) + (p_index - &line[1] == strlen(p_module->psz_object_name) ) && + !memcmp( &line[1], p_module->psz_object_name, + strlen(p_module->psz_object_name) ) ) { - intf_WarnMsg( 5, "config: loading config for module <%s>", - p_module->psz_name ); + msg_Dbg( p_this, "loading config for module <%s>", + p_module->psz_object_name ); break; } @@ -485,18 +540,18 @@ int config_LoadConfigFile( const char *psz_module_name ) if( !*psz_option_value ) break; /* ignore empty option */ p_item->i_value = atoi( psz_option_value); - intf_WarnMsg( 7, "config: found <%s> option %s=%i", - p_module->psz_name, - p_item->psz_name, p_item->i_value ); + msg_Dbg( p_this, "found <%s> option %s=%i", + p_module->psz_object_name, p_item->psz_name, + p_item->i_value ); break; case MODULE_CONFIG_ITEM_FLOAT: if( !*psz_option_value ) break; /* ignore empty option */ p_item->f_value = (float)atof( psz_option_value); - intf_WarnMsg( 7, "config: found <%s> option %s=%f", - p_module->psz_name, p_item->psz_name, - (double)p_item->f_value ); + msg_Dbg( p_this, "found <%s> option %s=%f", + p_module->psz_object_name, p_item->psz_name, + (double)p_item->f_value ); break; default: @@ -511,11 +566,10 @@ int config_LoadConfigFile( const char *psz_module_name ) vlc_mutex_unlock( p_item->p_lock ); - intf_WarnMsg( 7, "config: found <%s> option %s=%s", - p_module->psz_name, - p_item->psz_name, - p_item->psz_value != NULL ? - p_item->psz_value : "(NULL)" ); + msg_Dbg( p_this, "found <%s> option %s=%s", + p_module->psz_object_name, p_item->psz_name, + p_item->psz_value != NULL ? + p_item->psz_value : "(NULL)" ); break; } } @@ -527,7 +581,7 @@ int config_LoadConfigFile( const char *psz_module_name ) fclose( file ); free( psz_filename ); - vlc_mutex_unlock( &p_main->config_lock ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return 0; } @@ -551,7 +605,7 @@ int config_LoadConfigFile( const char *psz_module_name ) * save. * Really stupid no ? *****************************************************************************/ -int config_SaveConfigFile( const char *psz_module_name ) +int config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name ) { module_t *p_module; module_config_t *p_item; @@ -559,25 +613,25 @@ int config_SaveConfigFile( const char *psz_module_name ) char p_line[1024], *p_index2; int i_sizebuf = 0; char *p_bigbuffer, *p_index; - boolean_t b_backup; + vlc_bool_t b_backup; char *psz_filename, *psz_homedir; /* Acquire config file lock */ - vlc_mutex_lock( &p_main->config_lock ); + vlc_mutex_lock( &p_this->p_vlc->config_lock ); - psz_homedir = p_main->psz_homedir; + psz_homedir = p_this->p_vlc->psz_homedir; if( !psz_homedir ) { - intf_ErrMsg( "config error: p_main->psz_homedir is null" ); - vlc_mutex_unlock( &p_main->config_lock ); + msg_Err( p_this, "psz_homedir is null" ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } psz_filename = (char *)malloc( strlen("/" CONFIG_DIR "/" CONFIG_FILE) + strlen(psz_homedir) + 1 ); if( !psz_filename ) { - intf_ErrMsg( "config error: couldn't malloc psz_filename" ); - vlc_mutex_unlock( &p_main->config_lock ); + msg_Err( p_this, "out of memory" ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } sprintf( psz_filename, "%s/" CONFIG_DIR, psz_homedir ); @@ -588,20 +642,19 @@ int config_SaveConfigFile( const char *psz_module_name ) if( mkdir( psz_filename ) && errno != EEXIST ) #endif { - intf_ErrMsg( "config error: couldn't create %s (%s)", - psz_filename, strerror(errno) ); + msg_Err( p_this, "could not create %s (%s)", + psz_filename, strerror(errno) ); } strcat( psz_filename, "/" CONFIG_FILE ); - intf_WarnMsg( 5, "config: opening config file %s", psz_filename ); + msg_Dbg( p_this, "opening config file %s", psz_filename ); file = fopen( psz_filename, "rt" ); if( !file ) { - intf_WarnMsg( 1, "config: config file %s doesn't already exist", - psz_filename ); + msg_Warn( p_this, "config file %s does not exist yet", psz_filename ); } else { @@ -614,10 +667,10 @@ int config_SaveConfigFile( const char *psz_module_name ) p_bigbuffer = p_index = malloc( i_sizebuf+1 ); if( !p_bigbuffer ) { - intf_ErrMsg( "config error: couldn't malloc bigbuffer" ); + msg_Err( p_this, "out of memory" ); if( file ) fclose( file ); free( psz_filename ); - vlc_mutex_unlock( &p_main->config_lock ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } p_bigbuffer[0] = 0; @@ -630,16 +683,18 @@ int config_SaveConfigFile( const char *psz_module_name ) if( (p_line[0] == '[') && (p_index2 = strchr(p_line,']'))) { /* we found a section, check if we need to do a backup */ - for( p_module = p_module_bank->first; p_module != NULL; + for( p_module = p_this->p_vlc->module_bank.first; p_module != NULL; p_module = p_module->next ) { - if( ((p_index2 - &p_line[1]) == strlen(p_module->psz_name) ) && - !memcmp( &p_line[1], p_module->psz_name, - strlen(p_module->psz_name) ) ) + if( ((p_index2 - &p_line[1]) + == strlen(p_module->psz_object_name) ) && + !memcmp( &p_line[1], p_module->psz_object_name, + strlen(p_module->psz_object_name) ) ) { if( !psz_module_name ) break; - else if( !strcmp( psz_module_name, p_module->psz_name ) ) + else if( !strcmp( psz_module_name, + p_module->psz_object_name ) ) break; } } @@ -649,8 +704,8 @@ int config_SaveConfigFile( const char *psz_module_name ) /* we don't have this section in our list so we need to back * it up */ *p_index2 = 0; - intf_WarnMsg( 5, "config: backing up config for " - "unknown module <%s>", &p_line[1] ); + msg_Dbg( p_this, "backing up config for unknown module <%s>", + &p_line[1] ); *p_index2 = ']'; b_backup = 1; @@ -680,30 +735,31 @@ int config_SaveConfigFile( const char *psz_module_name ) file = fopen( psz_filename, "wt" ); if( !file ) { - intf_WarnMsg( 1, "config: couldn't open config file %s for writing", - psz_filename ); + msg_Warn( p_this, "could not open config file %s for writing", + psz_filename ); free( psz_filename ); - vlc_mutex_unlock( &p_main->config_lock ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return -1; } fprintf( file, "###\n### " COPYRIGHT_MESSAGE "\n###\n\n" ); /* Look for the selected module, if NULL then save everything */ - for( p_module = p_module_bank->first ; p_module != NULL ; + for( p_module = p_this->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { - if( psz_module_name && strcmp( psz_module_name, p_module->psz_name ) ) + if( psz_module_name && strcmp( psz_module_name, + p_module->psz_object_name ) ) continue; if( !p_module->i_config_items ) continue; - intf_WarnMsg( 5, "config: saving config for module <%s>", - p_module->psz_name ); + msg_Dbg( p_this, "saving config for module <%s>", + p_module->psz_object_name ); - fprintf( file, "[%s]", p_module->psz_name ); + fprintf( file, "[%s]", p_module->psz_object_name ); if( p_module->psz_longname ) fprintf( file, " # %s\n\n", p_module->psz_longname ); else @@ -725,8 +781,7 @@ int config_SaveConfigFile( const char *psz_module_name ) fprintf( file, "# %s (%s)\n", p_item->psz_text, (p_item->i_type == MODULE_CONFIG_ITEM_BOOL) ? _("boolean") : _("integer") ); - fprintf( file, "%s=%i\n", p_item->psz_name, - p_item->i_value ); + fprintf( file, "%s=%i\n", p_item->psz_name, p_item->i_value ); break; case MODULE_CONFIG_ITEM_FLOAT: @@ -758,7 +813,7 @@ int config_SaveConfigFile( const char *psz_module_name ) fclose( file ); free( psz_filename ); - vlc_mutex_unlock( &p_main->config_lock ); + vlc_mutex_unlock( &p_this->p_vlc->config_lock ); return 0; } @@ -772,8 +827,8 @@ int config_SaveConfigFile( const char *psz_module_name ) * because we don't know (and don't want to know) in advance the configuration * options used (ie. exported) by each module. *****************************************************************************/ -int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], - boolean_t b_ignore_errors ) +int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], + vlc_bool_t b_ignore_errors ) { int i_cmd, i_index, i_opts, i_shortopts, flag; module_t *p_module; @@ -784,14 +839,11 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], module_config_t *pp_shortopts[256]; char *psz_shortopts; - /* Reset warning level */ - p_main->i_warning_level = 0; - /* Set default configuration and copy arguments */ - p_main->i_argc = *pi_argc; - p_main->ppsz_argv = ppsz_argv; + p_this->p_vlc->i_argc = *pi_argc; + p_this->p_vlc->ppsz_argv = ppsz_argv; - p_main->p_channel = NULL; + p_this->p_vlc->p_channel = NULL; #ifdef SYS_DARWIN /* When vlc.app is run by double clicking in Mac OS X, the 2nd arg @@ -809,7 +861,7 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], #endif *pi_argc = *pi_argc - 1; pi_argc--; - return( 0 ); + return 0; } #endif @@ -818,7 +870,7 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], */ i_opts = 0; - for( p_module = p_module_bank->first; + for( p_module = p_this->p_vlc->module_bank.first; p_module != NULL ; p_module = p_module->next ) { @@ -831,16 +883,16 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], p_longopts = malloc( sizeof(struct option) * (i_opts + 1) ); if( p_longopts == NULL ) { - intf_ErrMsg( "config error: couldn't allocate p_longopts" ); - return( -1 ); + msg_Err( p_this, "out of memory" ); + return -1; } psz_shortopts = malloc( sizeof( char ) * (2 * i_opts + 1) ); if( psz_shortopts == NULL ) { - intf_ErrMsg( "config error: couldn't allocate psz_shortopts" ); + msg_Err( p_this, "out of memory" ); free( p_longopts ); - return( -1 ); + return -1; } /* If we are requested to ignore errors, then we must work on a copy @@ -851,16 +903,16 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], ppsz_argv = (char**)malloc( *pi_argc * sizeof(char *) ); if( ppsz_argv == NULL ) { - intf_ErrMsg( "config error: couldn't duplicate ppsz_argv" ); + msg_Err( p_this, "out of memory" ); free( psz_shortopts ); free( p_longopts ); return -1; } - memcpy( ppsz_argv, p_main->ppsz_argv, *pi_argc * sizeof(char *) ); + memcpy( ppsz_argv, p_this->p_vlc->ppsz_argv, + *pi_argc * sizeof(char *) ); } - psz_shortopts[0] = 'v'; - i_shortopts = 1; + i_shortopts = 0; for( i_index = 0; i_index < 256; i_index++ ) { pp_shortopts[i_index] = NULL; @@ -868,7 +920,7 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], /* Fill the p_longopts and psz_shortopts structures */ i_index = 0; - for( p_module = p_module_bank->first ; + for( p_module = p_this->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { @@ -943,23 +995,23 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], if( flag ) psz_name += 3; /* Store the configuration option */ - p_conf = config_FindConfig( psz_name ); + p_conf = config_FindConfig( p_this, psz_name ); if( p_conf ) switch( p_conf->i_type ) { case MODULE_CONFIG_ITEM_STRING: case MODULE_CONFIG_ITEM_FILE: case MODULE_CONFIG_ITEM_MODULE: - config_PutPszVariable( psz_name, optarg ); + config_PutPsz( p_this, psz_name, optarg ); break; case MODULE_CONFIG_ITEM_INTEGER: - config_PutIntVariable( psz_name, atoi(optarg)); + config_PutInt( p_this, psz_name, atoi(optarg)); break; case MODULE_CONFIG_ITEM_FLOAT: - config_PutFloatVariable( psz_name, (float)atof(optarg) ); + config_PutFloat( p_this, psz_name, (float)atof(optarg) ); break; case MODULE_CONFIG_ITEM_BOOL: - config_PutIntVariable( psz_name, !flag ); + config_PutInt( p_this, psz_name, !flag ); break; } @@ -974,39 +1026,31 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], case MODULE_CONFIG_ITEM_STRING: case MODULE_CONFIG_ITEM_FILE: case MODULE_CONFIG_ITEM_MODULE: - config_PutPszVariable( pp_shortopts[i_cmd]->psz_name, optarg ); + config_PutPsz( p_this, pp_shortopts[i_cmd]->psz_name, optarg ); break; case MODULE_CONFIG_ITEM_INTEGER: - config_PutIntVariable( pp_shortopts[i_cmd]->psz_name, + config_PutInt( p_this, pp_shortopts[i_cmd]->psz_name, atoi(optarg)); break; case MODULE_CONFIG_ITEM_BOOL: - config_PutIntVariable( pp_shortopts[i_cmd]->psz_name, 1 ); + config_PutInt( p_this, pp_shortopts[i_cmd]->psz_name, 1 ); break; } continue; } - /* Either it's a -v or it's an unknown short option */ - if( i_cmd == 'v' ) - { - p_main->i_warning_level++; - continue; - } - /* Internal error: unknown option */ if( !b_ignore_errors ) { - intf_ErrMsg( "config error: unknown option `%s'", - ppsz_argv[optind-1] ); - intf_Msg( "Try `%s --help' for more information.\n", - p_main->psz_arg0 ); + fprintf( stderr, "unknown option `%s'\n", ppsz_argv[optind-1] ); + fprintf( stderr, "Try `%s --help' for more information.\n", + p_this->p_vlc->psz_object_name ); free( p_longopts ); free( psz_shortopts ); if( b_ignore_errors ) free( ppsz_argv ); - return( -1 ); + return -1; } } @@ -1017,16 +1061,7 @@ int config_LoadCmdLine( int *pi_argc, char *ppsz_argv[], free( psz_shortopts ); if( b_ignore_errors ) free( ppsz_argv ); - /* Update the warning level */ - if( !p_main->i_warning_level ) - { - p_main->i_warning_level += config_GetIntVariable( "warning" ); - } - p_main->i_warning_level = ( p_main->i_warning_level < 0 ) ? 0 : - p_main->i_warning_level; - config_PutIntVariable( "warning", p_main->i_warning_level ); - - return( 0 ); + return 0; } /***************************************************************************** @@ -1064,7 +1099,7 @@ char *config_GetHomeDir( void ) p_homedir = (char *)malloc( MAX_PATH ); if( !p_homedir ) { - intf_ErrMsg( "config error: couldn't malloc p_homedir" ); +//X intf_ErrMsg( "config error: couldn't malloc p_homedir" ); return NULL; } @@ -1095,8 +1130,8 @@ char *config_GetHomeDir( void ) } else p_homedir = strdup( p_tmp ); - intf_ErrMsg( "config error: unable to get home directory, " - "using %s instead", p_homedir ); +//X intf_ErrMsg( "config error: unable to get home directory, " +//X "using %s instead", p_homedir ); } else p_homedir = strdup( p_tmp ); diff --git a/src/misc/cpu.c b/src/misc/cpu.c new file mode 100644 index 0000000000..9e4827f993 --- /dev/null +++ b/src/misc/cpu.c @@ -0,0 +1,315 @@ +/***************************************************************************** + * cpu.c: CPU detection code + ***************************************************************************** + * Copyright (C) 1998-2002 VideoLAN + * $Id: cpu.c,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Samuel Hocevar + * Christophe Massiot + * Eugenio Jarosiewicz + * + * 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. + *****************************************************************************/ + +/***************************************************************************** + * Preamble + *****************************************************************************/ +#include /* SIGHUP, SIGINT, SIGKILL */ +#include /* longjmp, setjmp */ + +#include + +#ifdef SYS_DARWIN +# include /* AltiVec detection */ +# include /* some day the header files||compiler * + will define it for us */ +# include +#endif + +#include "vlc_cpu.h" + +/***************************************************************************** + * Local prototypes + *****************************************************************************/ +static void IllegalSignalHandler( int i_signal ); + +/***************************************************************************** + * Global variables - they're needed for signal handling + *****************************************************************************/ +static jmp_buf env; +static int i_illegal; +static char *psz_capability; + +/***************************************************************************** + * CPUCapabilities: list the processors MMX support and other capabilities + ***************************************************************************** + * This function is called to list extensions the CPU may have. + *****************************************************************************/ +u32 CPUCapabilities( vlc_object_t *p_this ) +{ + volatile u32 i_capabilities = CPU_CAPABILITY_NONE; + +#if defined( SYS_DARWIN ) + struct host_basic_info hi; + kern_return_t ret; + host_name_port_t host; + + int i_size; + char *psz_name, *psz_subname; + + i_capabilities |= CPU_CAPABILITY_FPU; + + /* Should 'never' fail? */ + host = mach_host_self(); + + i_size = sizeof( hi ) / sizeof( int ); + ret = host_info( host, HOST_BASIC_INFO, ( host_info_t )&hi, &i_size ); + + if( ret != KERN_SUCCESS ) + { + fprintf( stderr, "error: couldn't get CPU information\n" ); + return( i_capabilities ); + } + + slot_name( hi.cpu_type, hi.cpu_subtype, &psz_name, &psz_subname ); + /* FIXME: need better way to detect newer proccessors. + * could do strncmp(a,b,5), but that's real ugly */ + if( !strcmp(psz_name, "ppc7400") || !strcmp(psz_name, "ppc7450") ) + { + i_capabilities |= CPU_CAPABILITY_ALTIVEC; + } + + return( i_capabilities ); + +#elif defined( __i386__ ) + volatile unsigned int i_eax, i_ebx, i_ecx, i_edx; + volatile vlc_bool_t b_amd; + + /* Needed for x86 CPU capabilities detection */ +# define cpuid( a ) \ + asm volatile ( "pushl %%ebx\n\t" \ + "cpuid\n\t" \ + "movl %%ebx,%1\n\t" \ + "popl %%ebx\n\t" \ + : "=a" ( i_eax ), \ + "=r" ( i_ebx ), \ + "=c" ( i_ecx ), \ + "=d" ( i_edx ) \ + : "a" ( a ) \ + : "cc" ); + + i_capabilities |= CPU_CAPABILITY_FPU; + +# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) + signal( SIGILL, IllegalSignalHandler ); +# endif + + /* test for a 486 CPU */ + asm volatile ( "pushl %%ebx\n\t" + "pushfl\n\t" + "popl %%eax\n\t" + "movl %%eax, %%ebx\n\t" + "xorl $0x200000, %%eax\n\t" + "pushl %%eax\n\t" + "popfl\n\t" + "pushfl\n\t" + "popl %%eax\n\t" + "movl %%ebx,%1\n\t" + "popl %%ebx\n\t" + : "=a" ( i_eax ), + "=r" ( i_ebx ) + : + : "cc" ); + + if( i_eax == i_ebx ) + { +# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) + signal( SIGILL, NULL ); +# endif + return( i_capabilities ); + } + + i_capabilities |= CPU_CAPABILITY_486; + + /* the CPU supports the CPUID instruction - get its level */ + cpuid( 0x00000000 ); + + if( !i_eax ) + { +# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) + signal( SIGILL, NULL ); +# endif + return( i_capabilities ); + } + + /* FIXME: this isn't correct, since some 486s have cpuid */ + i_capabilities |= CPU_CAPABILITY_586; + + /* borrowed from mpeg2dec */ + b_amd = ( i_ebx == 0x68747541 ) && ( i_ecx == 0x444d4163 ) + && ( i_edx == 0x69746e65 ); + + /* test for the MMX flag */ + cpuid( 0x00000001 ); + + if( ! (i_edx & 0x00800000) ) + { +# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) + signal( SIGILL, NULL ); +# endif + return( i_capabilities ); + } + + i_capabilities |= CPU_CAPABILITY_MMX; + + if( i_edx & 0x02000000 ) + { + i_capabilities |= CPU_CAPABILITY_MMXEXT; + +# ifdef CAN_COMPILE_SSE + /* We test if OS supports the SSE instructions */ + psz_capability = "SSE"; + i_illegal = 0; + + vlc_mutex_lock( p_this->p_vlc->p_global_lock ); + if( setjmp( env ) == 0 ) + { + /* Test a SSE instruction */ + __asm__ __volatile__ ( "xorps %%xmm0,%%xmm0\n" : : ); + } + vlc_mutex_unlock( p_this->p_vlc->p_global_lock ); + + if( i_illegal == 0 ) + { + i_capabilities |= CPU_CAPABILITY_SSE; + } +# endif + } + + /* test for additional capabilities */ + cpuid( 0x80000000 ); + + if( i_eax < 0x80000001 ) + { +# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) + signal( SIGILL, NULL ); +# endif + return( i_capabilities ); + } + + /* list these additional capabilities */ + cpuid( 0x80000001 ); + +# ifdef CAN_COMPILE_3DNOW + if( i_edx & 0x80000000 ) + { + psz_capability = "3D Now!"; + i_illegal = 0; + + vlc_mutex_lock( p_this->p_vlc->p_global_lock ); + if( setjmp( env ) == 0 ) + { + /* Test a 3D Now! instruction */ + __asm__ __volatile__ ( "pfadd %%mm0,%%mm0\n" "femms\n" : : ); + } + vlc_mutex_unlock( p_this->p_vlc->p_global_lock ); + + if( i_illegal == 0 ) + { + i_capabilities |= CPU_CAPABILITY_3DNOW; + } + } +# endif + + if( b_amd && ( i_edx & 0x00400000 ) ) + { + i_capabilities |= CPU_CAPABILITY_MMXEXT; + } + +# if defined( CAN_COMPILE_SSE ) || defined ( CAN_COMPILE_3DNOW ) + signal( SIGILL, NULL ); +# endif + return( i_capabilities ); + +#elif defined( __powerpc__ ) + + i_capabilities |= CPU_CAPABILITY_FPU; + +# ifdef CAN_COMPILE_ALTIVEC + signal( SIGILL, IllegalSignalHandler ); + + psz_capability = "AltiVec"; + i_illegal = 0; + + vlc_mutex_lock( p_this->p_vlc->p_global_lock ); + if( setjmp( env ) == 0 ) + { + asm volatile ("mtspr 256, %0\n\t" + "vand %%v0, %%v0, %%v0" + : + : "r" (-1)); + } + vlc_mutex_unlock( p_this->p_vlc->p_global_lock ); + + if( i_illegal == 0 ) + { + i_capabilities |= CPU_CAPABILITY_ALTIVEC; + } + + signal( SIGILL, NULL ); +# endif + + return( i_capabilities ); + +#elif defined( __sparc__ ) + + i_capabilities |= CPU_CAPABILITY_FPU; + return( i_capabilities ); + +#else + /* default behaviour */ + return( i_capabilities ); + +#endif +} + +/***************************************************************************** + * IllegalSignalHandler: system signal handler + ***************************************************************************** + * This function is called when an illegal instruction signal is received by + * the program. We use this function to test OS and CPU capabilities + *****************************************************************************/ +static void IllegalSignalHandler( int i_signal ) +{ + /* Acknowledge the signal received */ + i_illegal = 1; + +#ifdef HAVE_SIGRELSE + sigrelse( i_signal ); +#endif + +#if defined( __i386__ ) + fprintf( stderr, "warning: your CPU has %s instructions, but not your " + "operating system.\n", psz_capability ); + fprintf( stderr, " some optimizations will be disabled unless " + "you upgrade your OS\n" ); +# if defined( SYS_LINUX ) + fprintf( stderr, " (for instance Linux kernel 2.4.x or later)\n" ); +# endif +#endif + + longjmp( env, 1 ); +} + diff --git a/src/misc/darwin_specific.c b/src/misc/darwin_specific.c index 7892739d6a..d753553eab 100644 --- a/src/misc/darwin_specific.c +++ b/src/misc/darwin_specific.c @@ -2,7 +2,7 @@ * darwin_specific.c: Darwin specific features ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: darwin_specific.c,v 1.9 2002/05/19 23:51:37 massiot Exp $ + * $Id: darwin_specific.c,v 1.10 2002/06/01 12:32:01 sam Exp $ * * Authors: Samuel Hocevar * @@ -23,7 +23,7 @@ #include /* strdup() */ #include /* free() */ -#include +#include /***************************************************************************** * Static vars @@ -33,7 +33,7 @@ static char * psz_program_path; /***************************************************************************** * system_Init: fill in program path. *****************************************************************************/ -void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) +void system_Init( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[] ) { char i_dummy; char *p_char, *p_oldchar = &i_dummy; @@ -68,7 +68,7 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) /***************************************************************************** * system_Configure: check for system specific configuration options. *****************************************************************************/ -void system_Configure( void ) +void system_Configure( vlc_object_t *p_this ) { } @@ -76,7 +76,7 @@ void system_Configure( void ) /***************************************************************************** * system_End: free the program path. *****************************************************************************/ -void system_End( void ) +void system_End( vlc_object_t * ) { free( psz_program_path ); } diff --git a/src/misc/iso_lang.c b/src/misc/iso_lang.c index 18ba5b490a..7b790ccf7a 100644 --- a/src/misc/iso_lang.c +++ b/src/misc/iso_lang.c @@ -2,7 +2,7 @@ * iso_lang.c: function to decode language code (in dvd or a52 for instance). ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: iso_lang.c,v 1.5 2002/05/20 22:36:42 sam Exp $ + * $Id: iso_lang.c,v 1.6 2002/06/01 12:32:01 sam Exp $ * * Author: Stéphane Borel * Arnaud de Bossoreille de Ribou @@ -27,7 +27,7 @@ *****************************************************************************/ #include -#include +#include #include "iso_lang.h" diff --git a/src/interface/intf_msg.c b/src/misc/messages.c similarity index 51% rename from src/interface/intf_msg.c rename to src/misc/messages.c index bc912977bb..b6f8ca8431 100644 --- a/src/interface/intf_msg.c +++ b/src/misc/messages.c @@ -1,12 +1,13 @@ /***************************************************************************** - * intf_msg.c: messages interface - * This library provides basic functions for threads to interact with user - * interface, such as message output. See config.h for output configuration. + * messages.c: messages interface + * This library provides an interface to the message queue to be used by other + * modules, especially intf modules. See config.h for output configuration. ***************************************************************************** - * Copyright (C) 1998-2001 VideoLAN - * $Id: intf_msg.c,v 1.49 2002/05/17 00:58:13 sam Exp $ + * Copyright (C) 1998-2002 VideoLAN + * $Id: messages.c,v 1.1 2002/06/01 12:32:01 sam Exp $ * * Authors: Vincent Seguin + * Samuel Hocevar * * 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 @@ -33,7 +34,7 @@ #include /* malloc() */ #include /* strerror() */ -#include +#include #ifdef HAVE_UNISTD_H #include /* close(), write() */ @@ -41,222 +42,188 @@ #include "interface.h" - -/***************************************************************************** - * intf_msg_t - ***************************************************************************** - * Store all data requiered by messages interfaces. It has a single reference - * int p_main. - *****************************************************************************/ -typedef struct msg_bank_s -{ - /* Message queue lock */ - vlc_mutex_t lock; - - /* Message queue */ - msg_item_t msg[INTF_MSG_QSIZE]; /* message queue */ - int i_start; - int i_stop; - - /* Subscribers */ - int i_sub; - intf_subscription_t **pp_sub; - -} msg_bank_t; - -msg_bank_t msg_bank; - /***************************************************************************** * Local prototypes *****************************************************************************/ -static void QueueMsg ( int, int, char *, va_list ); -static void FlushMsg ( void ); +static void QueueMsg ( vlc_object_t *, int , const char *, + const char *, va_list ); +static void FlushMsg ( msg_bank_t * ); #if defined( WIN32 ) -static char *ConvertPrintfFormatString ( char *psz_format ); +static char *ConvertPrintfFormatString ( const char *psz_format ); #endif /***************************************************************************** - * intf_MsgCreate: initialize messages interface (ok ?) + * msg_Create: initialize messages interface ***************************************************************************** - * This functions has to be called before any call to other intf_*Msg functions. + * This functions has to be called before any call to other msg_* functions. * It set up the locks and the message queue if it is used. *****************************************************************************/ -void intf_MsgCreate( void ) +void msg_Create( vlc_object_t *p_this ) { /* Message queue initialization */ - vlc_mutex_init( &msg_bank.lock ); - msg_bank.i_start = 0; - msg_bank.i_stop = 0; + vlc_mutex_init( p_this, &p_this->p_vlc->msg_bank.lock ); + p_this->p_vlc->msg_bank.i_start = 0; + p_this->p_vlc->msg_bank.i_stop = 0; - msg_bank.i_sub = 0; - msg_bank.pp_sub = NULL; + p_this->p_vlc->msg_bank.i_sub = 0; + p_this->p_vlc->msg_bank.pp_sub = NULL; } /***************************************************************************** - * intf_MsgDestroy: free resources allocated by intf_InitMsg (ok ?) + * msg_Destroy: free resources allocated by msg_Create ***************************************************************************** * This functions prints all messages remaining in queue, then free all the - * resources allocated by intf_InitMsg. + * resources allocated by msg_Create. * No other messages interface functions should be called after this one. *****************************************************************************/ -void intf_MsgDestroy( void ) +void msg_Destroy( vlc_object_t *p_this ) { /* Destroy lock */ - vlc_mutex_destroy( &msg_bank.lock ); + vlc_mutex_destroy( &p_this->p_vlc->msg_bank.lock ); - if( msg_bank.i_sub ) + if( p_this->p_vlc->msg_bank.i_sub ) { - fprintf( stderr, "intf error: stale interface subscribers\n" ); + fprintf( stderr, "main error: stale interface subscribers\n" ); } /* Free remaining messages */ - FlushMsg( ); + FlushMsg( &p_this->p_vlc->msg_bank ); } /***************************************************************************** - * intf_MsgSub: subscribe to the message queue. + * msg_Subscribe: subscribe to the message queue. *****************************************************************************/ -intf_subscription_t *intf_MsgSub( void ) +msg_subscription_t *msg_Subscribe( vlc_object_t *p_this ) { - intf_subscription_t *p_sub = malloc( sizeof( intf_subscription_t ) ); + msg_subscription_t *p_sub = malloc( sizeof( msg_subscription_t ) ); - vlc_mutex_lock( &msg_bank.lock ); + vlc_mutex_lock( &p_this->p_vlc->msg_bank.lock ); /* Add subscription to the list */ - msg_bank.i_sub++; - msg_bank.pp_sub = realloc( msg_bank.pp_sub, - msg_bank.i_sub * sizeof( intf_subscription_t* ) ); + p_this->p_vlc->msg_bank.i_sub++; + p_this->p_vlc->msg_bank.pp_sub = realloc( p_this->p_vlc->msg_bank.pp_sub, + p_this->p_vlc->msg_bank.i_sub * sizeof( msg_subscription_t* ) ); - msg_bank.pp_sub[ msg_bank.i_sub - 1 ] = p_sub; + p_this->p_vlc->msg_bank.pp_sub[ p_this->p_vlc->msg_bank.i_sub - 1 ] = p_sub; - p_sub->i_start = msg_bank.i_start; - p_sub->pi_stop = &msg_bank.i_stop; + p_sub->i_start = p_this->p_vlc->msg_bank.i_start; + p_sub->pi_stop = &p_this->p_vlc->msg_bank.i_stop; - p_sub->p_msg = msg_bank.msg; - p_sub->p_lock = &msg_bank.lock; + p_sub->p_msg = p_this->p_vlc->msg_bank.msg; + p_sub->p_lock = &p_this->p_vlc->msg_bank.lock; - vlc_mutex_unlock( &msg_bank.lock ); + vlc_mutex_unlock( &p_this->p_vlc->msg_bank.lock ); return p_sub; } /***************************************************************************** - * intf_MsgUnsub: unsubscribe from the message queue. + * msg_Unsubscribe: unsubscribe from the message queue. *****************************************************************************/ -void intf_MsgUnsub( intf_subscription_t *p_sub ) +void msg_Unsubscribe( vlc_object_t *p_this, msg_subscription_t *p_sub ) { int i_index; - vlc_mutex_lock( &msg_bank.lock ); + vlc_mutex_lock( &p_this->p_vlc->msg_bank.lock ); /* Sanity check */ - if( !msg_bank.i_sub ) + if( !p_this->p_vlc->msg_bank.i_sub ) { - intf_ErrMsg( "intf error: no subscriber in the list" ); + msg_Err( p_this, "no subscriber in the list" ); return; } /* Look for the appropriate subscription */ - for( i_index = 0; i_index < msg_bank.i_sub; i_index++ ) + for( i_index = 0; i_index < p_this->p_vlc->msg_bank.i_sub; i_index++ ) { - if( msg_bank.pp_sub[ i_index ] == p_sub ) + if( p_this->p_vlc->msg_bank.pp_sub[ i_index ] == p_sub ) { break; } } - if( msg_bank.pp_sub[ i_index ] != p_sub ) + if( p_this->p_vlc->msg_bank.pp_sub[ i_index ] != p_sub ) { - intf_ErrMsg( "intf error: subscriber not found" ); - vlc_mutex_unlock( &msg_bank.lock ); + msg_Err( p_this, "subscriber not found" ); + vlc_mutex_unlock( &p_this->p_vlc->msg_bank.lock ); return; } /* Remove this subscription */ - for( ; i_index < (msg_bank.i_sub - 1); i_index++ ) + for( ; i_index < (p_this->p_vlc->msg_bank.i_sub - 1); i_index++ ) { - msg_bank.pp_sub[ i_index ] = msg_bank.pp_sub[ i_index+1 ]; + p_this->p_vlc->msg_bank.pp_sub[ i_index ] = p_this->p_vlc->msg_bank.pp_sub[ i_index+1 ]; } - msg_bank.i_sub--; - if( msg_bank.i_sub ) + p_this->p_vlc->msg_bank.i_sub--; + if( p_this->p_vlc->msg_bank.i_sub ) { - msg_bank.pp_sub = realloc( msg_bank.pp_sub, - msg_bank.i_sub * sizeof( intf_subscription_t* ) ); + p_this->p_vlc->msg_bank.pp_sub = realloc( p_this->p_vlc->msg_bank.pp_sub, + p_this->p_vlc->msg_bank.i_sub * sizeof( msg_subscription_t* ) ); } else { - free( msg_bank.pp_sub ); - msg_bank.pp_sub = NULL; + free( p_this->p_vlc->msg_bank.pp_sub ); + p_this->p_vlc->msg_bank.pp_sub = NULL; } - vlc_mutex_unlock( &msg_bank.lock ); + + vlc_mutex_unlock( &p_this->p_vlc->msg_bank.lock ); } /***************************************************************************** - * intf_Msg: print a message (ok ?) + * __msg_*: print a message ***************************************************************************** - * This function queue a message for later printing, or print it immediately - * if the queue isn't used. + * These functions queue a message for later printing. *****************************************************************************/ -void intf_Msg( char *psz_format, ... ) +void __msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module, + const char *psz_format, ... ) { - va_list ap; + va_list args; - va_start( ap, psz_format ); - QueueMsg( INTF_MSG_STD, 0, psz_format, ap ); - va_end( ap ); + va_start( args, psz_format ); + QueueMsg( p_this, i_type, psz_module, psz_format, args ); + va_end( args ); } -/***************************************************************************** - * intf_ErrMsg : print an error message (ok ?) - ***************************************************************************** - * This function is the same as intf_Msg, except that it prints its messages - * on stderr. - *****************************************************************************/ -void intf_ErrMsg( char *psz_format, ... ) +void __msg_Info( void *p_this, const char *psz_format, ... ) { - va_list ap; + va_list args; + va_start( args, psz_format ); + QueueMsg( (vlc_object_t *)p_this, VLC_MSG_INFO, "unknown", + psz_format, args ); + va_end( args ); +} - va_start( ap, psz_format ); - QueueMsg( INTF_MSG_ERR, 0, psz_format, ap ); - va_end( ap ); +void __msg_Err( void *p_this, const char *psz_format, ... ) +{ + va_list args; + va_start( args, psz_format ); + QueueMsg( (vlc_object_t *)p_this, VLC_MSG_ERR, "unknown", + psz_format, args ); + va_end( args ); } -/***************************************************************************** - * intf_WarnMsg : print a warning message - ***************************************************************************** - * This function is the same as intf_Msg, except that it concerns warning - * messages for testing purpose. - *****************************************************************************/ -void intf_WarnMsg( int i_level, char *psz_format, ... ) +void __msg_Warn( void *p_this, const char *psz_format, ... ) { - va_list ap; - - va_start( ap, psz_format ); - QueueMsg( INTF_MSG_WARN, i_level, psz_format, ap ); - va_end( ap ); + va_list args; + va_start( args, psz_format ); + QueueMsg( (vlc_object_t *)p_this, VLC_MSG_WARN, "unknown", + psz_format, args ); + va_end( args ); } -/***************************************************************************** - * intf_StatMsg : print a statistic message - ***************************************************************************** - * This function is the same as intf_Msg, except that it concerns statistic - * messages for testing purpose. - *****************************************************************************/ -void intf_StatMsg( char *psz_format, ... ) +void __msg_Dbg( void *p_this, const char *psz_format, ... ) { - va_list ap; - - if( p_main->b_stats ) - { - va_start( ap, psz_format ); - QueueMsg( INTF_MSG_STAT, 0, psz_format, ap ); - va_end( ap ); - } + va_list args; + va_start( args, psz_format ); + QueueMsg( (vlc_object_t *)p_this, VLC_MSG_DBG, "unknown", + psz_format, args ); + va_end( args ); } +#if 0 /***************************************************************************** * intf_WarnHexDump : print a hexadecimal dump of a memory area ***************************************************************************** @@ -269,8 +236,7 @@ void intf_WarnHexDump( int i_level, void *p_data, int i_size ) char p_string[75]; u8 *p_area = (u8 *)p_data; - intf_WarnMsg( i_level, "hexdump: dumping %i bytes at address %p", - i_size, p_data ); + msg_Dbg( "dumping %i bytes at address %p", i_size, p_data ); while( i_index < i_size ) { @@ -286,136 +252,164 @@ void intf_WarnHexDump( int i_level, void *p_data, int i_size ) /* -1 here is safe because we know we printed at least one */ p_string[ 3 * i_subindex - 1 ] = '\0'; - intf_WarnMsg( i_level, "0x%.4x: %s", i_index, p_string ); + msg_Dbg( "0x%.4x: %s", i_index, p_string ); i_index += 24; } - intf_WarnMsg( i_level, "hexdump: %i bytes dumped", i_size ); + msg_Dbg( "hexdump: %i bytes dumped", i_size ); } - -/* following functions are local */ +#endif /***************************************************************************** * QueueMsg: add a message to a queue ***************************************************************************** - * This function provides basic functionnalities to other intf_*Msg functions. + * This function provides basic functionnalities to other msg_* functions. * It adds a message to a queue (after having printed all stored messages if it * is full). If the message can't be converted to string in memory, it issues * a warning. *****************************************************************************/ -static void QueueMsg( int i_type, int i_level, char *psz_format, va_list ap ) +static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module, + const char *psz_format, va_list args ) { - char * psz_str; /* formatted message string */ - msg_item_t * p_item; /* pointer to message */ + static const char * ppsz_type[4] = { "", " error", " warning", " debug" }; + char * psz_str; /* formatted message string */ + msg_item_t * p_item; /* pointer to message */ #ifdef WIN32 - char * psz_temp; + char * psz_temp; #endif /* * Convert message to string */ #ifdef HAVE_VASPRINTF - vasprintf( &psz_str, psz_format, ap ); + vasprintf( &psz_str, psz_format, args ); #else psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE ); #endif if( psz_str == NULL ) { - fprintf(stderr, "intf warning: can't store following message (%s): ", - strerror(errno) ); - vfprintf(stderr, psz_format, ap ); - fprintf(stderr, "\n" ); + fprintf( stderr, "main warning: can't store message (%s): ", + strerror(errno) ); + vfprintf( stderr, psz_format, args ); + fprintf( stderr, "\n" ); return; } #ifndef HAVE_VASPRINTF # ifdef WIN32 - psz_temp = ConvertPrintfFormatString(psz_format); + psz_temp = ConvertPrintfFormatString( psz_format ); if( !psz_temp ) { - fprintf(stderr, "intf warning: couldn't print message"); + fprintf( stderr, "main warning: couldn't print message\n" ); return; } - vsprintf( psz_str, psz_temp, ap ); + vsprintf( psz_str, psz_temp, args ); free( psz_temp ); # else - vsprintf( psz_str, psz_format, ap ); + vsprintf( psz_str, psz_format, args ); # endif #endif /* Put message in queue */ - vlc_mutex_lock( &msg_bank.lock ); + vlc_mutex_lock( &p_this->p_vlc->msg_bank.lock ); /* Send the message to stderr */ - if( i_level <= p_main->i_warning_level ) + if( (i_type == VLC_MSG_ERR) + || ( (i_type == VLC_MSG_INFO) && !p_this->p_vlc->b_quiet ) + || ( (i_type == VLC_MSG_WARN) && p_this->p_vlc->b_verbose + && !p_this->p_vlc->b_quiet ) + || ( (i_type == VLC_MSG_DBG) && p_this->p_vlc->b_verbose + && !p_this->p_vlc->b_quiet ) ) { - fprintf( stderr, "%s\n", psz_str ); + if( p_this->p_vlc->b_color ) + { +# define COL(x) "\033[" #x ";1m" +# define RED COL(31) +# define GREEN COL(32) +# define YELLOW COL(33) +# define WHITE COL(37) +# define GRAY "\033[0m" + static const char *ppsz_color[4] = { WHITE, RED, YELLOW, GRAY }; + + fprintf( stderr, "[" GREEN "%.8x" GRAY "] " "%s%s" + ": %s%s" GRAY "\n", p_this->i_object_id, psz_module, + ppsz_type[i_type], ppsz_color[i_type], psz_str ); + } + else + { + fprintf( stderr, "[%.8x] %s%s: %s\n", p_this->i_object_id, + psz_module, ppsz_type[i_type], psz_str ); + } } /* Put the message in the queue if there is room for it */ - if( ((msg_bank.i_stop - msg_bank.i_start + 1) % INTF_MSG_QSIZE) == 0 ) + if( ((p_this->p_vlc->msg_bank.i_stop - p_this->p_vlc->msg_bank.i_start + 1) % VLC_MSG_QSIZE) == 0 ) { - FlushMsg( ); + FlushMsg( &p_this->p_vlc->msg_bank ); - if( ((msg_bank.i_stop - msg_bank.i_start + 1) % INTF_MSG_QSIZE) == 0 ) + if( ((p_this->p_vlc->msg_bank.i_stop - p_this->p_vlc->msg_bank.i_start + 1) % VLC_MSG_QSIZE) == 0 ) { - fprintf( stderr, "intf warning: message queue overflow\n" ); - vlc_mutex_unlock( &msg_bank.lock ); + fprintf( stderr, "main warning: message queue overflow\n" ); + vlc_mutex_unlock( &p_this->p_vlc->msg_bank.lock ); return; } } - p_item = msg_bank.msg + msg_bank.i_stop; - msg_bank.i_stop = (msg_bank.i_stop + 1) % INTF_MSG_QSIZE; + p_item = p_this->p_vlc->msg_bank.msg + p_this->p_vlc->msg_bank.i_stop; + p_this->p_vlc->msg_bank.i_stop = (p_this->p_vlc->msg_bank.i_stop + 1) % VLC_MSG_QSIZE; /* Fill message information fields */ p_item->i_type = i_type; + p_item->psz_module = strdup( psz_module ); p_item->psz_msg = psz_str; - vlc_mutex_unlock( &msg_bank.lock ); + vlc_mutex_unlock( &p_this->p_vlc->msg_bank.lock ); } +/* following functions are local */ + /***************************************************************************** * FlushMsg ***************************************************************************** * Print all messages remaining in queue. MESSAGE QUEUE MUST BE LOCKED, since * this function does not check the lock. *****************************************************************************/ -static void FlushMsg ( void ) +static void FlushMsg ( msg_bank_t *p_bank ) { int i_index, i_start, i_stop; /* Get the maximum message index that can be freed */ - i_stop = msg_bank.i_stop; + i_stop = p_bank->i_stop; /* Check until which value we can free messages */ - for( i_index = 0; i_index < msg_bank.i_sub; i_index++ ) + for( i_index = 0; i_index < p_bank->i_sub; i_index++ ) { - i_start = msg_bank.pp_sub[ i_index ]->i_start; + i_start = p_bank->pp_sub[ i_index ]->i_start; /* If this subscriber is late, we don't free messages before * his i_start value, otherwise he'll miss messages */ if( ( i_start < i_stop - && (msg_bank.i_stop <= i_start || i_stop <= msg_bank.i_stop) ) + && (p_bank->i_stop <= i_start || i_stop <= p_bank->i_stop) ) || ( i_stop < i_start - && (i_stop <= msg_bank.i_stop && msg_bank.i_stop <= i_start) ) ) + && (i_stop <= p_bank->i_stop && p_bank->i_stop <= i_start) ) ) { i_stop = i_start; } } /* Free message data */ - for( i_index = msg_bank.i_start; + for( i_index = p_bank->i_start; i_index != i_stop; - i_index = (i_index+1) % INTF_MSG_QSIZE ) + i_index = (i_index+1) % VLC_MSG_QSIZE ) { - free( msg_bank.msg[i_index].psz_msg ); + free( p_bank->msg[i_index].psz_msg ); + free( p_bank->msg[i_index].psz_module ); } /* Update the new start value */ - msg_bank.i_start = i_index; + p_bank->i_start = i_index; } /***************************************************************************** @@ -430,7 +424,7 @@ static void FlushMsg ( void ) * By the way, if we don't do this we can sometimes end up with segfaults. *****************************************************************************/ #if defined( WIN32 ) -static char *ConvertPrintfFormatString( char *psz_format ) +static char *ConvertPrintfFormatString( const char *psz_format ) { int i, i_counter=0, i_pos=0; char *psz_dest; @@ -454,7 +448,7 @@ static char *ConvertPrintfFormatString( char *psz_format ) psz_dest = malloc( strlen(psz_format) + i_counter + 1 ); if( psz_dest == NULL ) { - fprintf( stderr, "intf warning: ConvertPrintfFormatString failed\n"); + fprintf( stderr, "main warning: ConvertPrintfFormatString failed\n" ); return NULL; } diff --git a/src/misc/modules.c b/src/misc/modules.c index 8e53474865..d5e22e5e82 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -1,8 +1,8 @@ /***************************************************************************** - * modules.c : Built-in and plugin modules management functions + * modules.c : Builtin and plugin modules management functions ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules.c,v 1.62 2002/05/22 19:31:33 gbazin Exp $ + * $Id: modules.c,v 1.63 2002/06/01 12:32:01 sam Exp $ * * Authors: Samuel Hocevar * Ethan C. Baldridge @@ -33,7 +33,7 @@ #include /* sprintf() */ #include /* strdup() */ -#include +#include #include @@ -53,7 +53,7 @@ #include "netutils.h" #include "interface.h" -#include "intf_playlist.h" +#include "playlist.h" #include "intf_eject.h" #include "stream_control.h" @@ -78,14 +78,20 @@ # include "modules_builtin_msvc.h" #endif +/***************************************************************************** + * Static variables + *****************************************************************************/ +DECLARE_MODULE_CAPABILITY_TABLE; + /***************************************************************************** * Local prototypes *****************************************************************************/ #ifdef HAVE_DYNAMIC_PLUGINS -static void AllocateAllPlugins ( void ); -static int AllocatePluginModule ( char * ); +static void AllocateAllPlugins ( vlc_object_t * ); +static int AllocatePluginModule ( vlc_object_t *, char * ); #endif -static int AllocateBuiltinModule( int ( * ) ( module_t * ), +static int AllocateBuiltinModule( vlc_object_t *, + int ( * ) ( module_t * ), int ( * ) ( module_t * ), int ( * ) ( module_t * ) ); static int DeleteModule ( module_t * ); @@ -106,11 +112,11 @@ static module_symbols_t symbols; * This function creates a module bank structure which will be filled later * on with all the modules found. *****************************************************************************/ -void module_InitBank( void ) +void module_InitBank( vlc_object_t *p_this ) { - p_module_bank->first = NULL; - p_module_bank->i_count = 0; - vlc_mutex_init( &p_module_bank->lock ); + p_this->p_vlc->module_bank.first = NULL; + p_this->p_vlc->module_bank.i_count = 0; + vlc_mutex_init( p_this, &p_this->p_vlc->module_bank.lock ); /* * Store the symbols to be exported @@ -123,42 +129,15 @@ void module_InitBank( void ) } /***************************************************************************** - * module_LoadMain: load the main program info into the module bank. - ***************************************************************************** - * This function fills the module bank structure with the main module infos. - * This is very useful as it will allow us to consider the main program just - * as another module, and for instance the configuration options of main will - * be available in the module bank structure just as for every other module. - *****************************************************************************/ -void module_LoadMain( void ) -{ - AllocateBuiltinModule( InitModule__MODULE_main, - ActivateModule__MODULE_main, - DeactivateModule__MODULE_main ); -} - -/***************************************************************************** - * module_LoadBuiltins: load all modules which we built with. - ***************************************************************************** - * This function fills the module bank structure with the built-in modules. - *****************************************************************************/ -void module_LoadBuiltins( void ) -{ - intf_WarnMsg( 2, "module: checking built-in modules" ); - ALLOCATE_ALL_BUILTINS(); -} - -/***************************************************************************** - * module_LoadPlugins: load all plugin modules we can find. + * module_ResetBank: reset the module bank. ***************************************************************************** - * This function fills the module bank structure with the plugin modules. + * This function resets the module bank by unloading all unused plugin + * modules. *****************************************************************************/ -void module_LoadPlugins( void ) +void module_ResetBank( vlc_object_t *p_this ) { -#ifdef HAVE_DYNAMIC_PLUGINS - intf_WarnMsg( 2, "module: checking plugin modules" ); - AllocateAllPlugins(); -#endif + msg_Err( p_this, "FIXME: module_ResetBank unimplemented" ); + return; } /***************************************************************************** @@ -167,41 +146,68 @@ void module_LoadPlugins( void ) * This function unloads all unused plugin modules and empties the module * bank in case of success. *****************************************************************************/ -void module_EndBank( void ) +void module_EndBank( vlc_object_t *p_this ) { module_t * p_next; - while( p_module_bank->first != NULL ) + while( p_this->p_vlc->module_bank.first != NULL ) { - if( DeleteModule( p_module_bank->first ) ) + if( DeleteModule( p_this->p_vlc->module_bank.first ) ) { /* Module deletion failed */ - intf_ErrMsg( "module error: `%s' can't be removed, trying harder", - p_module_bank->first->psz_name ); + msg_Err( p_this, "`%s' can't be removed, trying harder", + p_this->p_vlc->module_bank.first->psz_object_name ); /* We just free the module by hand. Niahahahahaha. */ - p_next = p_module_bank->first->next; - free(p_module_bank->first); - p_module_bank->first = p_next; + p_next = p_this->p_vlc->module_bank.first->next; + free( p_this->p_vlc->module_bank.first ); + p_this->p_vlc->module_bank.first = p_next; } } /* Destroy the lock */ - vlc_mutex_destroy( &p_module_bank->lock ); + vlc_mutex_destroy( &p_this->p_vlc->module_bank.lock ); return; } /***************************************************************************** - * module_ResetBank: reset the module bank. + * module_LoadMain: load the main program info into the module bank. ***************************************************************************** - * This function resets the module bank by unloading all unused plugin - * modules. + * This function fills the module bank structure with the main module infos. + * This is very useful as it will allow us to consider the main program just + * as another module, and for instance the configuration options of main will + * be available in the module bank structure just as for every other module. *****************************************************************************/ -void module_ResetBank( void ) +void module_LoadMain( vlc_object_t *p_this ) { - intf_ErrMsg( "FIXME: module_ResetBank unimplemented" ); - return; + AllocateBuiltinModule( p_this, InitModule__MODULE_main, + ActivateModule__MODULE_main, + DeactivateModule__MODULE_main ); +} + +/***************************************************************************** + * module_LoadBuiltins: load all modules which we built with. + ***************************************************************************** + * This function fills the module bank structure with the builtin modules. + *****************************************************************************/ +void module_LoadBuiltins( vlc_object_t * p_this ) +{ + msg_Dbg( p_this, "checking builtin modules" ); + ALLOCATE_ALL_BUILTINS(); +} + +/***************************************************************************** + * module_LoadPlugins: load all plugin modules we can find. + ***************************************************************************** + * This function fills the module bank structure with the plugin modules. + *****************************************************************************/ +void module_LoadPlugins( vlc_object_t * p_this ) +{ +#ifdef HAVE_DYNAMIC_PLUGINS + msg_Dbg( p_this, "checking plugin modules" ); + AllocateAllPlugins( p_this ); +#endif } /***************************************************************************** @@ -210,16 +216,16 @@ void module_ResetBank( void ) * This function parses the module bank and hides modules that have been * unused for a while. *****************************************************************************/ -void module_ManageBank( void ) +void module_ManageBank( vlc_object_t *p_this ) { #ifdef HAVE_DYNAMIC_PLUGINS module_t * p_module; /* We take the global lock */ - vlc_mutex_lock( &p_module_bank->lock ); + vlc_mutex_lock( &p_this->p_vlc->module_bank.lock ); /* Parse the module list to see if any modules need to be unloaded */ - for( p_module = p_module_bank->first ; + for( p_module = p_this->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { @@ -232,8 +238,8 @@ void module_ManageBank( void ) } else { - intf_WarnMsg( 3, "module: hiding unused plugin module `%s'", - p_module->psz_name ); + msg_Dbg( p_this, "hiding unused plugin module `%s'", + p_module->psz_object_name ); HideModule( p_module ); /* Break here, so that we only hide one module at a time */ @@ -243,7 +249,7 @@ void module_ManageBank( void ) } /* We release the global lock */ - vlc_mutex_unlock( &p_module_bank->lock ); + vlc_mutex_unlock( &p_this->p_vlc->module_bank.lock ); #endif /* HAVE_DYNAMIC_PLUGINS */ return; @@ -254,23 +260,30 @@ void module_ManageBank( void ) ***************************************************************************** * This function returns the module that best fits the asked capabilities. *****************************************************************************/ -module_t * module_Need( int i_capability, char *psz_name, void *p_data ) +module_t * __module_Need( vlc_object_t *p_this, + int i_capability, char *psz_name, void *p_data ) { - typedef struct module_list_s + typedef struct module_list_s module_list_t; + + struct module_list_s { - struct module_s *p_module; - struct module_list_s* p_next; - } module_list_t; - struct module_list_s *p_list, *p_first, *p_tolock; + module_t *p_module; + module_list_t *p_next; + }; + + module_list_t *p_list, *p_first, *p_tmp; int i_ret, i_index = 0; - boolean_t b_intf = 0; + vlc_bool_t b_intf = 0; module_t *p_module; char *psz_realname = NULL; + msg_Info( p_this, "looking for %s module", + MODULE_CAPABILITY( i_capability ) ); + /* We take the global lock */ - vlc_mutex_lock( &p_module_bank->lock ); + vlc_mutex_lock( &p_this->p_vlc->module_bank.lock ); if( psz_name != NULL && *psz_name ) { @@ -289,11 +302,12 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) } /* Sort the modules and test them */ - p_list = malloc( p_module_bank->i_count * sizeof( module_list_t ) ); + p_list = malloc( p_this->p_vlc->module_bank.i_count + * sizeof( module_list_t ) ); p_first = NULL; /* Parse the module list for capabilities and probe each of them */ - for( p_module = p_module_bank->first ; + for( p_module = p_this->p_vlc->module_bank.first ; p_module != NULL ; p_module = p_module->next ) { @@ -304,7 +318,8 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) } /* Test if we have the required CPU */ - if( (p_module->i_cpu_capabilities & p_main->i_cpu_capabilities) + if( (p_module->i_cpu_capabilities + & p_this->p_vlc->i_cpu_capabilities) != p_module->i_cpu_capabilities ) { continue; @@ -313,7 +328,7 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) /* If we required a shortcut, check this plugin provides it. */ if( psz_name != NULL && *psz_name ) { - boolean_t b_trash = 1; + vlc_bool_t b_trash = 1; int i_dummy; for( i_dummy = 0; @@ -338,7 +353,8 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) if( i_capability == MODULE_CAPABILITY_INTF ) { if( p_module->psz_program != NULL - && !strcmp( p_module->psz_program, p_main->psz_arg0 ) ) + && !strcmp( p_module->psz_program, + p_this->p_vlc->psz_object_name ) ) { if( !b_intf ) { @@ -371,7 +387,7 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) /* Ok, so at school you learned that quicksort is quick, and * bubble sort sucks raw eggs. But that's when dealing with * thousands of items. Here we have barely 50. */ - struct module_list_s *p_newlist = p_first; + module_list_t *p_newlist = p_first; if( p_first->p_module->pi_score[i_capability] < p_module->pi_score[i_capability] ) @@ -397,60 +413,61 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) } /* Lock all selected modules */ - p_tolock = p_first; - while( p_tolock != NULL ) + p_tmp = p_first; + while( p_tmp != NULL ) { - LockModule( p_tolock->p_module ); - p_tolock = p_tolock->p_next; + LockModule( p_tmp->p_module ); + p_tmp = p_tmp->p_next; } /* We can release the global lock, module refcounts were incremented */ - vlc_mutex_unlock( &p_module_bank->lock ); + vlc_mutex_unlock( &p_this->p_vlc->module_bank.lock ); /* Parse the linked list and use the first successful module */ - while( p_first != NULL ) + p_tmp = p_first; + while( p_tmp != NULL ) { /* Test the requested capability */ switch( i_capability ) { case MODULE_CAPABILITY_ACCESS: - i_ret = p_first->p_module->p_functions->access.functions. - access.pf_open( (struct input_thread_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->access.functions. + access.pf_open( (input_thread_t *)p_data ); break; case MODULE_CAPABILITY_DEMUX: - i_ret = p_first->p_module->p_functions->demux.functions. - demux.pf_init( (struct input_thread_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->demux.functions. + demux.pf_init( (input_thread_t *)p_data ); break; case MODULE_CAPABILITY_NETWORK: - i_ret = p_first->p_module->p_functions->network.functions. - network.pf_open( (struct network_socket_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->network.functions. + network.pf_open( p_this, (network_socket_t *)p_data ); break; case MODULE_CAPABILITY_DECODER: - i_ret = p_first->p_module->p_functions->dec.functions. + i_ret = p_tmp->p_module->p_functions->dec.functions. dec.pf_probe( (u8 *)p_data ); break; case MODULE_CAPABILITY_INTF: - i_ret = p_first->p_module->p_functions->intf.functions. - intf.pf_open( (struct intf_thread_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->intf.functions. + intf.pf_open( (intf_thread_t *)p_data ); break; case MODULE_CAPABILITY_AOUT: - i_ret = p_first->p_module->p_functions->aout.functions. - aout.pf_open( (struct aout_thread_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->aout.functions. + aout.pf_open( (aout_thread_t *)p_data ); break; case MODULE_CAPABILITY_VOUT: - i_ret = p_first->p_module->p_functions->vout.functions. - vout.pf_create( (struct vout_thread_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->vout.functions. + vout.pf_create( (vout_thread_t *)p_data ); break; case MODULE_CAPABILITY_CHROMA: - i_ret = p_first->p_module->p_functions->chroma.functions. - chroma.pf_init( (struct vout_thread_s *)p_data ); + i_ret = p_tmp->p_module->p_functions->chroma.functions. + chroma.pf_init( (vout_thread_t *)p_data ); break; case MODULE_CAPABILITY_IDCT: @@ -463,8 +480,7 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) break; default: - intf_ErrMsg( "module error: unknown module type %i", - i_capability ); + msg_Err( p_this, "unknown module type %i", i_capability ); i_ret = -1; break; } @@ -476,17 +492,17 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) } else { - UnlockModule( p_first->p_module ); + UnlockModule( p_tmp->p_module ); } - p_first = p_first->p_next; + p_tmp = p_tmp->p_next; } /* Store the locked module value */ - if( p_first != NULL ) + if( p_tmp != NULL ) { - p_module = p_first->p_module; - p_first = p_first->p_next; + p_module = p_tmp->p_module; + p_tmp = p_tmp->p_next; } else { @@ -494,24 +510,29 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) } /* Unlock the remaining modules */ - while( p_first != NULL ) + while( p_tmp != NULL ) { - UnlockModule( p_first->p_module ); - p_first = p_first->p_next; + UnlockModule( p_tmp->p_module ); + p_tmp = p_tmp->p_next; } free( p_list ); if( p_module != NULL ) { - intf_WarnMsg( 1, "module: locking %s module `%s'", - GetCapabilityName( i_capability ), - p_module->psz_name ); + msg_Info( p_module, "found and locked %s module `%s'", + MODULE_CAPABILITY( i_capability ), + p_module->psz_object_name ); + } + else if( p_first == NULL ) + { + msg_Err( p_this, "no %s module named `%s'", + MODULE_CAPABILITY( i_capability ), psz_name ); } else if( psz_name != NULL && *psz_name ) { - intf_ErrMsg( "module error: requested %s module `%s' unavailable", - GetCapabilityName( i_capability ), psz_name ); + msg_Err( p_this, "could not load %s module `%s'", + MODULE_CAPABILITY( i_capability ), psz_name ); } if( psz_realname ) @@ -520,7 +541,7 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) } /* Don't forget that the module is still locked */ - return( p_module ); + return p_module; } /***************************************************************************** @@ -532,16 +553,16 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data ) void module_Unneed( module_t * p_module ) { /* We take the global lock */ - vlc_mutex_lock( &p_module_bank->lock ); + vlc_mutex_lock( &p_module->p_vlc->module_bank.lock ); /* Just unlock the module - we can't do anything if it fails, * so there is no need to check the return value. */ UnlockModule( p_module ); - intf_WarnMsg( 1, "module: unlocking module `%s'", p_module->psz_name ); + msg_Info( p_module, "unlocking module `%s'", p_module->psz_object_name ); /* We release the global lock */ - vlc_mutex_unlock( &p_module_bank->lock ); + vlc_mutex_unlock( &p_module->p_vlc->module_bank.lock ); return; } @@ -554,7 +575,7 @@ void module_Unneed( module_t * p_module ) * AllocateAllPlugins: load all plugin modules we can find. *****************************************************************************/ #ifdef HAVE_DYNAMIC_PLUGINS -static void AllocateAllPlugins( void ) +static void AllocateAllPlugins( vlc_object_t *p_this ) { static char * path[] = { ".", "plugins", PLUGIN_PATH, NULL, NULL }; @@ -564,7 +585,7 @@ static void AllocateAllPlugins( void ) #if defined( SYS_BEOS ) || defined( SYS_DARWIN ) char * psz_vlcpath = system_GetProgramPath(); int i_vlclen = strlen( psz_vlcpath ); - boolean_t b_notinroot; + vlc_bool_t b_notinroot; #endif DIR * dir; struct dirent * file; @@ -596,7 +617,7 @@ static void AllocateAllPlugins( void ) psz_fullpath = *ppsz_path; } - intf_WarnMsg( 1, "module: browsing `%s'", psz_fullpath ); + msg_Dbg( p_this, "browsing `%s'", psz_fullpath ); if( (dir = opendir( psz_fullpath )) ) { @@ -618,7 +639,7 @@ static void AllocateAllPlugins( void ) /* We created a nice filename -- now we just try to load * it as a plugin module. */ - AllocatePluginModule( psz_file ); + AllocatePluginModule( p_this, psz_file ); /* We don't care if the allocation succeeded */ free( psz_file ); @@ -645,7 +666,7 @@ static void AllocateAllPlugins( void ) * for its information data. The module can then be handled by module_Need, * module_Unneed and HideModule. It can be removed by DeleteModule. *****************************************************************************/ -static int AllocatePluginModule( char * psz_filename ) +static int AllocatePluginModule( vlc_object_t * p_this, char * psz_filename ) { char **pp_shortcut; module_t * p_module, * p_othermodule; @@ -657,48 +678,52 @@ static int AllocatePluginModule( char * psz_filename ) char psz_buffer[256]; /* The plugin module couldn't be opened */ - intf_WarnMsg( 1, "module warning: cannot open %s (%s)", - psz_filename, module_error( psz_buffer ) ); - return( -1 ); + msg_Warn( p_this, "cannot open %s (%s)", + psz_filename, module_error( psz_buffer ) ); + return -1; } /* Now that we have successfully loaded the module, we can * allocate a structure for it */ - p_module = malloc( sizeof( module_t ) ); + p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE ); if( p_module == NULL ) { - intf_ErrMsg( "module error: can't allocate p_module" ); + msg_Err( p_this, "out of memory" ); module_unload( handle ); - return( -1 ); + return -1; } + vlc_object_attach( p_module, p_this ); + /* We need to fill these since they may be needed by CallSymbol() */ p_module->is.plugin.psz_filename = psz_filename; p_module->is.plugin.handle = handle; p_module->p_symbols = &symbols; - /* Initialize the module : fill p_module->psz_name, default config, etc. */ + /* Initialize the module: fill p_module->psz_object_name, default config */ if( CallSymbol( p_module, "InitModule" MODULE_SUFFIX ) != 0 ) { /* We couldn't call InitModule() */ - free( p_module ); + vlc_object_destroy( p_module ); module_unload( handle ); - return( -1 ); + return -1; } /* Check that we don't already have a module with this name */ - for( p_othermodule = p_module_bank->first ; + for( p_othermodule = p_this->p_vlc->module_bank.first ; p_othermodule != NULL ; p_othermodule = p_othermodule->next ) { - if( !strcmp( p_othermodule->psz_name, p_module->psz_name ) ) + if( !strcmp( p_othermodule->psz_object_name, + p_module->psz_object_name ) ) { - intf_WarnMsg( 5, "module warning: cannot load %s, a module named " - "`%s' already exists", - psz_filename, p_module->psz_name ); - free( p_module ); + msg_Warn( p_this, + "cannot load %s, a module named `%s' already exists", + psz_filename, p_module->psz_object_name ); + config_Free( p_module ); + vlc_object_destroy( p_module ); module_unload( handle ); - return( -1 ); + return -1; } } @@ -706,9 +731,10 @@ static int AllocatePluginModule( char * psz_filename ) if( CallSymbol( p_module, "ActivateModule" MODULE_SUFFIX ) != 0 ) { /* We couldn't call ActivateModule() */ - free( p_module ); + config_Free( p_module ); + vlc_object_destroy( p_module ); module_unload( handle ); - return( -1 ); + return -1; } for( pp_shortcut = p_module->pp_shortcuts ; *pp_shortcut ; pp_shortcut++ ) @@ -720,23 +746,24 @@ static int AllocatePluginModule( char * psz_filename ) * module is unloaded. */ p_module->is.plugin.psz_filename = strdup( p_module->is.plugin.psz_filename ); - p_module->psz_name = strdup( p_module->psz_name ); + p_module->psz_object_name = strdup( p_module->psz_object_name ); p_module->psz_longname = strdup( p_module->psz_longname ); if( p_module->is.plugin.psz_filename == NULL - || p_module->psz_name == NULL + || p_module->psz_object_name == NULL || p_module->psz_longname == NULL ) { - intf_ErrMsg( "module error: can't duplicate strings" ); + msg_Err( p_this, "out of memory" ); free( p_module->is.plugin.psz_filename ); - free( p_module->psz_name ); + free( p_module->psz_object_name ); free( p_module->psz_longname ); free( p_module->psz_program ); - free( p_module ); + config_Free( p_module ); + vlc_object_destroy( p_module ); module_unload( handle ); - return( -1 ); + return -1; } if( p_module->psz_program != NULL ) @@ -751,31 +778,31 @@ static int AllocatePluginModule( char * psz_filename ) p_module->b_builtin = 0; /* Link module into the linked list */ - if( p_module_bank->first != NULL ) + if( p_this->p_vlc->module_bank.first != NULL ) { - p_module_bank->first->prev = p_module; + p_this->p_vlc->module_bank.first->prev = p_module; } - p_module->next = p_module_bank->first; + p_module->next = p_this->p_vlc->module_bank.first; p_module->prev = NULL; - p_module_bank->first = p_module; - p_module_bank->i_count++; + p_this->p_vlc->module_bank.first = p_module; + p_this->p_vlc->module_bank.i_count++; - /* Immediate message so that a slow module doesn't make the user wait */ - intf_WarnMsg( 2, "module: new plugin module `%s', %s", - p_module->psz_name, p_module->psz_longname ); + msg_Dbg( p_this, "plugin `%s', %s", + p_module->psz_object_name, p_module->psz_longname ); - return( 0 ); + return 0; } #endif /* HAVE_DYNAMIC_PLUGINS */ /***************************************************************************** - * AllocateBuiltinModule: initialize a built-in module. + * AllocateBuiltinModule: initialize a builtin module. ***************************************************************************** - * This function registers a built-in module and allocates a structure + * This function registers a builtin module and allocates a structure * for its information data. The module can then be handled by module_Need, * module_Unneed and HideModule. It can be removed by DeleteModule. *****************************************************************************/ -static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ), +static int AllocateBuiltinModule( vlc_object_t * p_this, + int ( *pf_init ) ( module_t * ), int ( *pf_activate ) ( module_t * ), int ( *pf_deactivate ) ( module_t * ) ) { @@ -783,35 +810,37 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ), /* Now that we have successfully loaded the module, we can * allocate a structure for it */ - p_module = malloc( sizeof( module_t ) ); + p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE ); if( p_module == NULL ) { - intf_ErrMsg( "module error: can't allocate p_module" ); - return( -1 ); + msg_Err( p_this, "out of memory" ); + return -1; } - /* Initialize the module : fill p_module->psz_name, etc. */ + /* Initialize the module : fill p_module->psz_object_name, etc. */ if( pf_init( p_module ) != 0 ) { /* With a well-written module we shouldn't have to print an * additional error message here, but just make sure. */ - intf_ErrMsg( "module error: failed calling init in builtin module" ); - free( p_module ); - return( -1 ); + msg_Err( p_this, "failed calling init in builtin module" ); + vlc_object_destroy( p_module ); + return -1; } /* Check that we don't already have a module with this name */ - for( p_othermodule = p_module_bank->first ; + for( p_othermodule = p_this->p_vlc->module_bank.first ; p_othermodule != NULL ; p_othermodule = p_othermodule->next ) { - if( !strcmp( p_othermodule->psz_name, p_module->psz_name ) ) + if( !strcmp( p_othermodule->psz_object_name, + p_module->psz_object_name ) ) { - intf_WarnMsg( 5, "module warning: cannot load builtin `%s', a " - "module named `%s' already exists", - p_module->psz_name, p_module->psz_name ); - free( p_module ); - return( -1 ); + msg_Warn( p_this, "cannot load builtin `%s', " + "a module named `%s' already exists", + p_module->psz_object_name, p_module->psz_object_name ); + config_Free( p_module ); + vlc_object_destroy( p_module ); + return -1; } } @@ -819,10 +848,10 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ), { /* With a well-written module we shouldn't have to print an * additional error message here, but just make sure. */ - intf_ErrMsg( "module error: failed calling activate " - "in builtin module" ); - free( p_module ); - return( -1 ); + msg_Err( p_this, "failed calling activate in builtin module" ); + config_Free( p_module ); + vlc_object_destroy( p_module ); + return -1; } /* Everything worked fine ! The module is ready to be added to the list. */ @@ -833,20 +862,21 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ), p_module->is.builtin.pf_deactivate = pf_deactivate; /* Link module into the linked list */ - if( p_module_bank->first != NULL ) + if( p_this->p_vlc->module_bank.first != NULL ) { - p_module_bank->first->prev = p_module; + p_this->p_vlc->module_bank.first->prev = p_module; } - p_module->next = p_module_bank->first; + p_module->next = p_this->p_vlc->module_bank.first; p_module->prev = NULL; - p_module_bank->first = p_module; - p_module_bank->i_count++; + p_this->p_vlc->module_bank.first = p_module; + p_this->p_vlc->module_bank.i_count++; - /* Immediate message so that a slow module doesn't make the user wait */ - intf_WarnMsg( 2, "module: new builtin module `%s', %s", - p_module->psz_name, p_module->psz_longname ); + msg_Dbg( p_this, "builtin `%s', %s", + p_module->psz_object_name, p_module->psz_longname ); - return( 0 ); + vlc_object_attach( p_module, p_this ); + + return 0; } /***************************************************************************** @@ -863,9 +893,9 @@ static int DeleteModule( module_t * p_module ) { if( p_module->i_usage != 0 ) { - intf_ErrMsg( "module error: trying to free builtin module `%s' with" - " usage %i", p_module->psz_name, p_module->i_usage ); - return( -1 ); + msg_Err( p_module, "trying to free builtin module `%s' with " + "usage %i", p_module->psz_object_name, p_module->i_usage ); + return -1; } else { @@ -878,9 +908,9 @@ static int DeleteModule( module_t * p_module ) { if( p_module->i_usage >= 1 ) { - intf_ErrMsg( "module error: trying to free module `%s' which is" - " still in use", p_module->psz_name ); - return( -1 ); + msg_Err( p_module, "trying to free module `%s' which is " + "still in use", p_module->psz_object_name ); + return -1; } /* Two possibilities here: i_usage == -1 and the module is already @@ -890,12 +920,14 @@ static int DeleteModule( module_t * p_module ) { if( HideModule( p_module ) != 0 ) { - return( -1 ); + return -1; } } } #endif + vlc_object_unlink_all( p_module ); + /* Unlink the module from the linked list. */ if( p_module->prev != NULL ) { @@ -903,7 +935,7 @@ static int DeleteModule( module_t * p_module ) } else { - p_module_bank->first = p_module->next; + p_module->p_vlc->module_bank.first = p_module->next; } if( p_module->next != NULL ) @@ -911,7 +943,7 @@ static int DeleteModule( module_t * p_module ) p_module->next->prev = p_module->prev; } - p_module_bank->i_count--; + p_module->p_vlc->module_bank.i_count--; /* We free the structures that we strdup()ed in Allocate*Module(). */ #ifdef HAVE_DYNAMIC_PLUGINS @@ -925,15 +957,16 @@ static int DeleteModule( module_t * p_module ) } free( p_module->is.plugin.psz_filename ); - free( p_module->psz_name ); + free( p_module->psz_object_name ); free( p_module->psz_longname ); free( p_module->psz_program ); } #endif - free( p_module ); + config_Free( p_module ); + vlc_object_destroy( p_module ); - return( 0 ); + return 0; } /***************************************************************************** @@ -951,24 +984,24 @@ static int LockModule( module_t * p_module ) { /* This module is already loaded and activated, we can return */ p_module->i_usage++; - return( 0 ); + return 0; } if( p_module->b_builtin ) { - /* A built-in module should always have a refcount >= 0 ! */ - intf_ErrMsg( "module error: built-in module `%s' has refcount %i", - p_module->psz_name, p_module->i_usage ); - return( -1 ); + /* A builtin module should always have a refcount >= 0 ! */ + msg_Err( p_module, "builtin module `%s' has refcount %i", + p_module->psz_object_name, p_module->i_usage ); + return -1; } #ifdef HAVE_DYNAMIC_PLUGINS if( p_module->i_usage != -1 ) { /* This shouldn't happen. Ever. We have serious problems here. */ - intf_ErrMsg( "module error: plugin module `%s' has refcount %i", - p_module->psz_name, p_module->i_usage ); - return( -1 ); + msg_Err( p_module, "plugin module `%s' has refcount %i", + p_module->psz_object_name, p_module->i_usage ); + return -1; } /* i_usage == -1, which means that the module isn't in memory */ @@ -978,10 +1011,9 @@ static int LockModule( module_t * p_module ) char psz_buffer[256]; /* The plugin module couldn't be opened */ - intf_ErrMsg( "module error: cannot open %s (%s)", - p_module->is.plugin.psz_filename, - module_error( psz_buffer ) ); - return( -1 ); + msg_Err( p_module, "cannot open %s (%s)", + p_module->is.plugin.psz_filename, module_error(psz_buffer) ); + return -1; } /* FIXME: what to do if the guy modified the plugin while it was @@ -995,14 +1027,14 @@ static int LockModule( module_t * p_module ) * we can't do much about it. Just try to unload module. */ module_unload( p_module->is.plugin.handle ); p_module->i_usage = -1; - return( -1 ); + return -1; } /* Everything worked fine ! The module is ready to be used */ p_module->i_usage = 1; #endif /* HAVE_DYNAMIC_PLUGINS */ - return( 0 ); + return 0; } /***************************************************************************** @@ -1016,16 +1048,16 @@ static int UnlockModule( module_t * p_module ) if( p_module->i_usage <= 0 ) { /* This shouldn't happen. Ever. We have serious problems here. */ - intf_ErrMsg( "module error: trying to call module_Unneed() on `%s'" - " which isn't even in use", p_module->psz_name ); - return( -1 ); + msg_Err( p_module, "trying to call module_Unneed() on `%s' " + "which is not in use", p_module->psz_object_name ); + return -1; } /* This module is still in use, we can return */ p_module->i_usage--; p_module->i_unused_delay = 0; - return( 0 ); + return 0; } #ifdef HAVE_DYNAMIC_PLUGINS @@ -1040,24 +1072,24 @@ static int HideModule( module_t * p_module ) { if( p_module->b_builtin ) { - /* A built-in module should never be hidden. */ - intf_ErrMsg( "module error: trying to hide built-in module `%s'", - p_module->psz_name ); - return( -1 ); + /* A builtin module should never be hidden. */ + msg_Err( p_module, "trying to hide builtin module `%s'", + p_module->psz_object_name ); + return -1; } if( p_module->i_usage >= 1 ) { - intf_ErrMsg( "module error: trying to hide module `%s' which is still" - " in use", p_module->psz_name ); - return( -1 ); + msg_Err( p_module, "trying to hide module `%s' which is still " + "in use", p_module->psz_object_name ); + return -1; } if( p_module->i_usage <= -1 ) { - intf_ErrMsg( "module error: trying to hide module `%s' which is already" - " hidden", p_module->psz_name ); - return( -1 ); + msg_Err( p_module, "trying to hide module `%s' which is already " + "hidden", p_module->psz_object_name ); + return -1; } /* Deactivate the module : free the capability structure, etc. */ @@ -1067,14 +1099,14 @@ static int HideModule( module_t * p_module ) * we can't do much about it. Just try to unload module anyway. */ module_unload( p_module->is.plugin.handle ); p_module->i_usage = -1; - return( -1 ); + return -1; } /* Everything worked fine, we can safely unload the module. */ module_unload( p_module->is.plugin.handle ); p_module->i_usage = -1; - return( 0 ); + return 0; } /***************************************************************************** @@ -1096,11 +1128,10 @@ static int CallSymbol( module_t * p_module, char * psz_name ) char psz_buffer[256]; /* We couldn't load the symbol */ - intf_WarnMsg( 1, "module warning: " - "cannot find symbol %s in module %s (%s)", - psz_name, p_module->is.plugin.psz_filename, - module_error( psz_buffer ) ); - return( -1 ); + msg_Warn( p_module, "cannot find symbol %s in module %s (%s)", + psz_name, p_module->is.plugin.psz_filename, + module_error( psz_buffer ) ); + return -1; } /* We can now try to call the symbol */ @@ -1108,13 +1139,13 @@ static int CallSymbol( module_t * p_module, char * psz_name ) { /* With a well-written module we shouldn't have to print an * additional error message here, but just make sure. */ - intf_ErrMsg( "module error: failed calling symbol %s in module %s", - psz_name, p_module->is.plugin.psz_filename ); - return( -1 ); + msg_Err( p_module, "failed calling symbol %s in module %s", + psz_name, p_module->is.plugin.psz_filename ); + return -1; } /* Everything worked fine, we can return */ - return( 0 ); + return 0; } #endif /* HAVE_DYNAMIC_PLUGINS */ diff --git a/src/misc/modules_builtin.h.in b/src/misc/modules_builtin.h.in index 2c0497261e..1183f9bbff 100644 --- a/src/misc/modules_builtin.h.in +++ b/src/misc/modules_builtin.h.in @@ -21,9 +21,9 @@ *****************************************************************************/ #define ALLOCATE_BUILTIN( NAME ) \ - AllocateBuiltinModule( InitModule__MODULE_ ## NAME, \ - ActivateModule__MODULE_ ## NAME, \ - DeactivateModule__MODULE_ ## NAME ); + AllocateBuiltinModule( p_this, InitModule__MODULE_ ## NAME, \ + ActivateModule__MODULE_ ## NAME, \ + DeactivateModule__MODULE_ ## NAME ); /* We also consider the main program as a module (useful for config stuff) */ int InitModule__MODULE_main( module_t* ); diff --git a/src/misc/modules_plugin.h b/src/misc/modules_plugin.h index 4482689ce4..c0723d75e0 100644 --- a/src/misc/modules_plugin.h +++ b/src/misc/modules_plugin.h @@ -2,7 +2,7 @@ * modules_plugin.h : Plugin management functions used by the core application. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules_plugin.h,v 1.27 2002/05/15 13:07:18 marcari Exp $ + * $Id: modules_plugin.h,v 1.28 2002/06/01 12:32:01 sam Exp $ * * Authors: Samuel Hocevar * @@ -31,8 +31,7 @@ * This function loads a dynamically linked library using a system dependant * method, and returns a non-zero value on error, zero otherwise. *****************************************************************************/ -static __inline__ int -module_load( char * psz_filename, module_handle_t * handle ) +static inline int module_load( char * psz_filename, module_handle_t * handle ) { #ifdef SYS_BEOS *handle = load_add_on( psz_filename ); @@ -70,8 +69,7 @@ module_load( char * psz_filename, module_handle_t * handle ) * using a system dependant method. No return value is taken in consideration, * since some libraries sometimes refuse to close properly. *****************************************************************************/ -static __inline__ void -module_unload( module_handle_t handle ) +static inline void module_unload( module_handle_t handle ) { #ifdef SYS_BEOS unload_add_on( handle ); @@ -93,8 +91,8 @@ module_unload( module_handle_t handle ) * string, and returns a pointer to it. We don't check for dlerror() or * similar functions, since we want a non-NULL symbol anyway. *****************************************************************************/ -static __inline__ void * -module_getsymbol_inner( module_handle_t handle, char * psz_function ) +static inline void * _module_getsymbol( module_handle_t handle, + char * psz_function ) { #ifdef SYS_BEOS void * p_symbol; @@ -117,10 +115,10 @@ module_getsymbol_inner( module_handle_t handle, char * psz_function ) #endif } -static __inline__ void * -module_getsymbol( module_handle_t handle, char * psz_function ) +static inline void * module_getsymbol( module_handle_t handle, + char * psz_function ) { - void * p_symbol = module_getsymbol_inner( handle, psz_function ); + void * p_symbol = _module_getsymbol( handle, psz_function ); /* MacOS X dl library expects symbols to begin with "_". So do * some other operating systems. That's really lame, but hey, what @@ -131,7 +129,7 @@ module_getsymbol( module_handle_t handle, char * psz_function ) strcpy( psz_call + 1, psz_function ); psz_call[ 0 ] = '_'; - p_symbol = module_getsymbol_inner( handle, psz_call ); + p_symbol = _module_getsymbol( handle, psz_call ); free( psz_call ); } @@ -146,8 +144,7 @@ module_getsymbol( module_handle_t handle, char * psz_function ) * function. psz_buffer can be used to store temporary data, it is guaranteed * to be kept intact until the return value of module_error has been used. *****************************************************************************/ -static __inline__ const char * -module_error( char *psz_buffer ) +static inline const char * module_error( char *psz_buffer ) { #if defined(SYS_BEOS) return( "failed" ); @@ -182,121 +179,136 @@ module_error( char *psz_buffer ) * STORE_SYMBOLS: store known symbols into p_symbols for plugin access. *****************************************************************************/ #define STORE_SYMBOLS( p_symbols ) \ - (p_symbols)->p_main = p_main; \ - (p_symbols)->p_module_bank = p_module_bank; \ - (p_symbols)->p_input_bank = p_input_bank; \ - (p_symbols)->p_aout_bank = p_aout_bank; \ - (p_symbols)->p_vout_bank = p_vout_bank; \ - (p_symbols)->config_GetIntVariable = config_GetIntVariable; \ - (p_symbols)->config_GetPszVariable = config_GetPszVariable; \ - (p_symbols)->config_GetFloatVariable = config_GetFloatVariable; \ - (p_symbols)->config_PutIntVariable = config_PutIntVariable; \ - (p_symbols)->config_PutPszVariable = config_PutPszVariable; \ - (p_symbols)->config_PutFloatVariable = config_PutFloatVariable; \ - (p_symbols)->config_LoadConfigFile = config_LoadConfigFile; \ - (p_symbols)->config_SaveConfigFile = config_SaveConfigFile; \ - (p_symbols)->config_Duplicate = config_Duplicate; \ - (p_symbols)->config_FindConfig = config_FindConfig; \ - (p_symbols)->config_SetCallbacks = config_SetCallbacks; \ - (p_symbols)->config_UnsetCallbacks = config_UnsetCallbacks; \ - (p_symbols)->intf_MsgSub = intf_MsgSub; \ - (p_symbols)->intf_MsgUnsub = intf_MsgUnsub; \ - (p_symbols)->intf_Msg = intf_Msg; \ - (p_symbols)->intf_ErrMsg = intf_ErrMsg; \ - (p_symbols)->intf_StatMsg = intf_StatMsg;\ - (p_symbols)->intf_WarnMsg = intf_WarnMsg; \ - (p_symbols)->intf_PlaylistAdd = intf_PlaylistAdd; \ - (p_symbols)->intf_PlaylistDelete = intf_PlaylistDelete; \ - (p_symbols)->intf_PlaylistNext = intf_PlaylistNext; \ - (p_symbols)->intf_PlaylistPrev = intf_PlaylistPrev; \ - (p_symbols)->intf_PlaylistDestroy = intf_PlaylistDestroy; \ - (p_symbols)->intf_PlaylistJumpto = intf_PlaylistJumpto; \ - (p_symbols)->intf_UrlDecode = intf_UrlDecode; \ - (p_symbols)->intf_Eject = intf_Eject; \ - (p_symbols)->msleep = msleep; \ - (p_symbols)->mdate = mdate; \ - (p_symbols)->mstrtime = mstrtime; \ - (p_symbols)->network_ChannelCreate = network_ChannelCreate; \ - (p_symbols)->network_ChannelJoin = network_ChannelJoin; \ - (p_symbols)->input_SetProgram = input_SetProgram; \ - (p_symbols)->input_SetStatus = input_SetStatus; \ - (p_symbols)->input_Seek = input_Seek; \ - (p_symbols)->input_DumpStream = input_DumpStream; \ - (p_symbols)->input_OffsetToTime = input_OffsetToTime; \ - (p_symbols)->input_ChangeES = input_ChangeES; \ - (p_symbols)->input_ToggleES = input_ToggleES; \ - (p_symbols)->input_ChangeProgram = input_ChangeProgram; \ - (p_symbols)->input_ChangeArea = input_ChangeArea; \ - (p_symbols)->input_FindProgram = input_FindProgram; \ - (p_symbols)->input_FindES = input_FindES; \ - (p_symbols)->input_AddES = input_AddES; \ - (p_symbols)->input_DelES = input_DelES; \ - (p_symbols)->input_SelectES = input_SelectES; \ - (p_symbols)->input_UnselectES = input_UnselectES; \ - (p_symbols)->input_AddProgram = input_AddProgram; \ - (p_symbols)->input_DelProgram = input_DelProgram; \ - (p_symbols)->input_AddArea = input_AddArea; \ - (p_symbols)->input_DelArea = input_DelArea; \ - (p_symbols)->InitBitstream = InitBitstream; \ - (p_symbols)->NextDataPacket = NextDataPacket; \ - (p_symbols)->BitstreamNextDataPacket = BitstreamNextDataPacket; \ - (p_symbols)->DecoderError = DecoderError; \ - (p_symbols)->input_InitStream = input_InitStream; \ - (p_symbols)->input_EndStream = input_EndStream; \ - (p_symbols)->input_ParsePES = input_ParsePES; \ - (p_symbols)->input_GatherPES = input_GatherPES; \ - (p_symbols)->input_DecodePES = input_DecodePES; \ - (p_symbols)->input_ReadPS = input_ReadPS; \ - (p_symbols)->input_ParsePS = input_ParsePS; \ - (p_symbols)->input_DemuxPS = input_DemuxPS; \ - (p_symbols)->input_ReadTS = input_ReadTS; \ - (p_symbols)->input_DemuxTS = input_DemuxTS; \ - (p_symbols)->input_ClockManageRef = input_ClockManageRef; \ - (p_symbols)->input_ClockManageControl = input_ClockManageControl; \ - (p_symbols)->input_ClockGetTS = input_ClockGetTS; \ - (p_symbols)->input_FDSeek = input_FDSeek; \ - (p_symbols)->input_FDClose = input_FDClose; \ - (p_symbols)->input_FDNetworkClose = input_FDNetworkClose; \ - (p_symbols)->input_FDRead = input_FDRead; \ - (p_symbols)->input_FDNetworkRead = input_FDNetworkRead; \ - (p_symbols)->input_BuffersInit = input_BuffersInit; \ - (p_symbols)->input_BuffersEnd = input_BuffersEnd; \ - (p_symbols)->input_NewBuffer = input_NewBuffer; \ - (p_symbols)->input_ReleaseBuffer = input_ReleaseBuffer; \ - (p_symbols)->input_ShareBuffer = input_ShareBuffer; \ - (p_symbols)->input_NewPacket = input_NewPacket; \ - (p_symbols)->input_DeletePacket = input_DeletePacket; \ - (p_symbols)->input_NewPES = input_NewPES; \ - (p_symbols)->input_DeletePES = input_DeletePES; \ - (p_symbols)->input_FillBuffer = input_FillBuffer; \ - (p_symbols)->input_Peek = input_Peek; \ - (p_symbols)->input_SplitBuffer = input_SplitBuffer; \ - (p_symbols)->input_AccessInit = input_AccessInit; \ - (p_symbols)->input_AccessReinit = input_AccessReinit; \ - (p_symbols)->input_AccessEnd = input_AccessEnd; \ - (p_symbols)->aout_CreateFifo = aout_CreateFifo; \ - (p_symbols)->aout_DestroyFifo = aout_DestroyFifo; \ - (p_symbols)->vout_CreateThread = vout_CreateThread; \ - (p_symbols)->vout_DestroyThread = vout_DestroyThread; \ - (p_symbols)->vout_CreateSubPicture = vout_CreateSubPicture; \ - (p_symbols)->vout_DestroySubPicture = vout_DestroySubPicture; \ - (p_symbols)->vout_DisplaySubPicture = vout_DisplaySubPicture; \ - (p_symbols)->vout_CreatePicture = vout_CreatePicture; \ - (p_symbols)->vout_AllocatePicture = vout_AllocatePicture; \ - (p_symbols)->vout_DisplayPicture = vout_DisplayPicture; \ - (p_symbols)->vout_DestroyPicture = vout_DestroyPicture; \ - (p_symbols)->vout_DatePicture = vout_DatePicture; \ - (p_symbols)->vout_LinkPicture = vout_LinkPicture; \ - (p_symbols)->vout_UnlinkPicture = vout_UnlinkPicture; \ - (p_symbols)->vout_PlacePicture = vout_PlacePicture; \ - (p_symbols)->vout_ChromaCmp = vout_ChromaCmp; \ - (p_symbols)->UnalignedGetBits = UnalignedGetBits; \ - (p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \ - (p_symbols)->UnalignedShowBits = UnalignedShowBits; \ - (p_symbols)->CurrentPTS = CurrentPTS; \ - (p_symbols)->GetLang_1 = GetLang_1; \ - (p_symbols)->GetLang_2T = GetLang_2T; \ - (p_symbols)->GetLang_2B = GetLang_2B; \ - (p_symbols)->DecodeLanguage = DecodeLanguage; \ - (p_symbols)->module_Need = module_Need; \ - (p_symbols)->module_Unneed = module_Unneed; + (p_symbols)->aout_CreateFifo_inner = aout_CreateFifo; \ + (p_symbols)->aout_DestroyFifo_inner = aout_DestroyFifo; \ + (p_symbols)->__config_GetInt_inner = __config_GetInt; \ + (p_symbols)->__config_PutInt_inner = __config_PutInt; \ + (p_symbols)->__config_GetFloat_inner = __config_GetFloat; \ + (p_symbols)->__config_PutFloat_inner = __config_PutFloat; \ + (p_symbols)->__config_GetPsz_inner = __config_GetPsz; \ + (p_symbols)->__config_PutPsz_inner = __config_PutPsz; \ + (p_symbols)->config_LoadCmdLine_inner = config_LoadCmdLine; \ + (p_symbols)->config_GetHomeDir_inner = config_GetHomeDir; \ + (p_symbols)->config_LoadConfigFile_inner = config_LoadConfigFile; \ + (p_symbols)->config_SaveConfigFile_inner = config_SaveConfigFile; \ + (p_symbols)->config_FindConfig_inner = config_FindConfig; \ + (p_symbols)->config_Duplicate_inner = config_Duplicate; \ + (p_symbols)->config_SetCallbacks_inner = config_SetCallbacks; \ + (p_symbols)->config_UnsetCallbacks_inner = config_UnsetCallbacks; \ + (p_symbols)->InitBitstream_inner = InitBitstream; \ + (p_symbols)->NextDataPacket_inner = NextDataPacket; \ + (p_symbols)->BitstreamNextDataPacket_inner = BitstreamNextDataPacket; \ + (p_symbols)->UnalignedShowBits_inner = UnalignedShowBits; \ + (p_symbols)->UnalignedRemoveBits_inner = UnalignedRemoveBits; \ + (p_symbols)->UnalignedGetBits_inner = UnalignedGetBits; \ + (p_symbols)->CurrentPTS_inner = CurrentPTS; \ + (p_symbols)->DecoderError_inner = DecoderError; \ + (p_symbols)->__input_SetStatus_inner = __input_SetStatus; \ + (p_symbols)->__input_Seek_inner = __input_Seek; \ + (p_symbols)->__input_Tell_inner = __input_Tell; \ + (p_symbols)->input_DumpStream_inner = input_DumpStream; \ + (p_symbols)->input_OffsetToTime_inner = input_OffsetToTime; \ + (p_symbols)->input_ChangeES_inner = input_ChangeES; \ + (p_symbols)->input_ToggleES_inner = input_ToggleES; \ + (p_symbols)->input_ChangeArea_inner = input_ChangeArea; \ + (p_symbols)->input_ChangeProgram_inner = input_ChangeProgram; \ + (p_symbols)->input_InitStream_inner = input_InitStream; \ + (p_symbols)->input_EndStream_inner = input_EndStream; \ + (p_symbols)->input_FindProgram_inner = input_FindProgram; \ + (p_symbols)->input_AddProgram_inner = input_AddProgram; \ + (p_symbols)->input_DelProgram_inner = input_DelProgram; \ + (p_symbols)->input_SetProgram_inner = input_SetProgram; \ + (p_symbols)->input_AddArea_inner = input_AddArea; \ + (p_symbols)->input_DelArea_inner = input_DelArea; \ + (p_symbols)->input_FindES_inner = input_FindES; \ + (p_symbols)->input_AddES_inner = input_AddES; \ + (p_symbols)->input_DelES_inner = input_DelES; \ + (p_symbols)->input_SelectES_inner = input_SelectES; \ + (p_symbols)->input_UnselectES_inner = input_UnselectES; \ + (p_symbols)->input_DecodePES_inner = input_DecodePES; \ + (p_symbols)->input_ClockManageControl_inner = input_ClockManageControl; \ + (p_symbols)->input_ClockManageRef_inner = input_ClockManageRef; \ + (p_symbols)->input_ClockGetTS_inner = input_ClockGetTS; \ + (p_symbols)->input_BuffersInit_inner = input_BuffersInit; \ + (p_symbols)->input_BuffersEnd_inner = input_BuffersEnd; \ + (p_symbols)->input_NewBuffer_inner = input_NewBuffer; \ + (p_symbols)->input_ReleaseBuffer_inner = input_ReleaseBuffer; \ + (p_symbols)->input_ShareBuffer_inner = input_ShareBuffer; \ + (p_symbols)->input_NewPacket_inner = input_NewPacket; \ + (p_symbols)->input_DeletePacket_inner = input_DeletePacket; \ + (p_symbols)->input_NewPES_inner = input_NewPES; \ + (p_symbols)->input_DeletePES_inner = input_DeletePES; \ + (p_symbols)->input_FillBuffer_inner = input_FillBuffer; \ + (p_symbols)->input_Peek_inner = input_Peek; \ + (p_symbols)->input_SplitBuffer_inner = input_SplitBuffer; \ + (p_symbols)->input_AccessInit_inner = input_AccessInit; \ + (p_symbols)->input_AccessReinit_inner = input_AccessReinit; \ + (p_symbols)->input_AccessEnd_inner = input_AccessEnd; \ + (p_symbols)->input_ParsePES_inner = input_ParsePES; \ + (p_symbols)->input_GatherPES_inner = input_GatherPES; \ + (p_symbols)->input_ReadPS_inner = input_ReadPS; \ + (p_symbols)->input_ParsePS_inner = input_ParsePS; \ + (p_symbols)->input_ReadTS_inner = input_ReadTS; \ + (p_symbols)->input_DemuxPS_inner = input_DemuxPS; \ + (p_symbols)->input_DemuxTS_inner = input_DemuxTS; \ + (p_symbols)->input_FDClose_inner = input_FDClose; \ + (p_symbols)->input_FDNetworkClose_inner = input_FDNetworkClose; \ + (p_symbols)->input_FDRead_inner = input_FDRead; \ + (p_symbols)->input_FDNetworkRead_inner = input_FDNetworkRead; \ + (p_symbols)->input_FDSeek_inner = input_FDSeek; \ + (p_symbols)->msg_Subscribe_inner = msg_Subscribe; \ + (p_symbols)->msg_Unsubscribe_inner = msg_Unsubscribe; \ + (p_symbols)->intf_Eject_inner = intf_Eject; \ + (p_symbols)->GetLang_1_inner = GetLang_1; \ + (p_symbols)->GetLang_2T_inner = GetLang_2T; \ + (p_symbols)->GetLang_2B_inner = GetLang_2B; \ + (p_symbols)->DecodeLanguage_inner = DecodeLanguage; \ + (p_symbols)->__module_Need_inner = __module_Need; \ + (p_symbols)->module_Unneed_inner = module_Unneed; \ + (p_symbols)->mstrtime_inner = mstrtime; \ + (p_symbols)->mdate_inner = mdate; \ + (p_symbols)->mwait_inner = mwait; \ + (p_symbols)->msleep_inner = msleep; \ + (p_symbols)->network_ChannelJoin_inner = network_ChannelJoin; \ + (p_symbols)->network_ChannelCreate_inner = network_ChannelCreate; \ + (p_symbols)->playlist_Command_inner = playlist_Command; \ + (p_symbols)->playlist_Add_inner = playlist_Add; \ + (p_symbols)->playlist_Delete_inner = playlist_Delete; \ + (p_symbols)->__vlc_threads_init_inner = __vlc_threads_init; \ + (p_symbols)->vlc_threads_end_inner = vlc_threads_end; \ + (p_symbols)->__vlc_mutex_init_inner = __vlc_mutex_init; \ + (p_symbols)->__vlc_mutex_destroy_inner = __vlc_mutex_destroy; \ + (p_symbols)->vlc_cond_init_inner = vlc_cond_init; \ + (p_symbols)->__vlc_cond_destroy_inner = __vlc_cond_destroy; \ + (p_symbols)->__vlc_thread_create_inner = __vlc_thread_create; \ + (p_symbols)->__vlc_thread_ready_inner = __vlc_thread_ready; \ + (p_symbols)->__vlc_thread_join_inner = __vlc_thread_join; \ + (p_symbols)->vout_CreateThread_inner = vout_CreateThread; \ + (p_symbols)->vout_DestroyThread_inner = vout_DestroyThread; \ + (p_symbols)->vout_ChromaCmp_inner = vout_ChromaCmp; \ + (p_symbols)->vout_CreatePicture_inner = vout_CreatePicture; \ + (p_symbols)->vout_AllocatePicture_inner = vout_AllocatePicture; \ + (p_symbols)->vout_DestroyPicture_inner = vout_DestroyPicture; \ + (p_symbols)->vout_DisplayPicture_inner = vout_DisplayPicture; \ + (p_symbols)->vout_DatePicture_inner = vout_DatePicture; \ + (p_symbols)->vout_LinkPicture_inner = vout_LinkPicture; \ + (p_symbols)->vout_UnlinkPicture_inner = vout_UnlinkPicture; \ + (p_symbols)->vout_PlacePicture_inner = vout_PlacePicture; \ + (p_symbols)->vout_CreateSubPicture_inner = vout_CreateSubPicture; \ + (p_symbols)->vout_DestroySubPicture_inner = vout_DestroySubPicture; \ + (p_symbols)->vout_DisplaySubPicture_inner = vout_DisplaySubPicture; \ + (p_symbols)->__msg_Generic_inner = __msg_Generic; \ + (p_symbols)->__msg_Info_inner = __msg_Info; \ + (p_symbols)->__msg_Err_inner = __msg_Err; \ + (p_symbols)->__msg_Warn_inner = __msg_Warn; \ + (p_symbols)->__msg_Dbg_inner = __msg_Dbg; \ + (p_symbols)->__vlc_object_create_inner = __vlc_object_create; \ + (p_symbols)->__vlc_object_destroy_inner = __vlc_object_destroy; \ + (p_symbols)->__vlc_object_find_inner = __vlc_object_find; \ + (p_symbols)->__vlc_object_yield_inner = __vlc_object_yield; \ + (p_symbols)->__vlc_object_release_inner = __vlc_object_release; \ + (p_symbols)->__vlc_object_unlink_inner = __vlc_object_unlink; \ + (p_symbols)->__vlc_object_unlink_all_inner = __vlc_object_unlink_all; \ + (p_symbols)->__vlc_object_attach_inner = __vlc_object_attach; \ + (p_symbols)->__vlc_dumpstructure_inner = __vlc_dumpstructure; \ + diff --git a/src/misc/modules_plugin.h.in b/src/misc/modules_plugin.h.in new file mode 100644 index 0000000000..1ef3bbbcd6 --- /dev/null +++ b/src/misc/modules_plugin.h.in @@ -0,0 +1,180 @@ +/***************************************************************************** + * modules_plugin.h : Plugin management functions used by the core application. + ***************************************************************************** + * Copyright (C) 2001 VideoLAN + * $Id: modules_plugin.h.in,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Samuel Hocevar + * + * 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. + *****************************************************************************/ + +/***************************************************************************** + * Inline functions for handling dynamic modules + *****************************************************************************/ + +/***************************************************************************** + * module_load: load a dynamic library + ***************************************************************************** + * This function loads a dynamically linked library using a system dependant + * method, and returns a non-zero value on error, zero otherwise. + *****************************************************************************/ +static inline int module_load( char * psz_filename, module_handle_t * handle ) +{ +#ifdef SYS_BEOS + *handle = load_add_on( psz_filename ); + return( *handle < 0 ); + +#elif defined(WIN32) + *handle = LoadLibrary( psz_filename ); + return( *handle == NULL ); + +#elif defined(RTLD_NOW) +# if defined(SYS_LINUX) + /* We should NOT open modules with RTLD_GLOBAL, or we are going to get + * namespace collisions when two modules have common public symbols, + * but ALSA is being a pest here. */ + if( strstr( psz_filename, "alsa.so" ) ) + { + *handle = dlopen( psz_filename, RTLD_NOW | RTLD_GLOBAL ); + return( *handle == NULL ); + } +# endif + *handle = dlopen( psz_filename, RTLD_NOW ); + return( *handle == NULL ); + +#else + *handle = dlopen( psz_filename, DL_LAZY ); + return( *handle == NULL ); + +#endif +} + +/***************************************************************************** + * module_unload: unload a dynamic library + ***************************************************************************** + * This function unloads a previously opened dynamically linked library + * using a system dependant method. No return value is taken in consideration, + * since some libraries sometimes refuse to close properly. + *****************************************************************************/ +static inline void module_unload( module_handle_t handle ) +{ +#ifdef SYS_BEOS + unload_add_on( handle ); + +#elif defined(WIN32) + FreeLibrary( handle ); + +#else + dlclose( handle ); + +#endif + return; +} + +/***************************************************************************** + * module_getsymbol: get a symbol from a dynamic library + ***************************************************************************** + * This function queries a loaded library for a symbol specified in a + * string, and returns a pointer to it. We don't check for dlerror() or + * similar functions, since we want a non-NULL symbol anyway. + *****************************************************************************/ +static inline void * _module_getsymbol( module_handle_t handle, + char * psz_function ) +{ +#ifdef SYS_BEOS + void * p_symbol; + if( B_OK == get_image_symbol( handle, psz_function, + B_SYMBOL_TYPE_TEXT, &p_symbol ) ) + { + return( p_symbol ); + } + else + { + return( NULL ); + } + +#elif defined(WIN32) + return( (void *)GetProcAddress( handle, psz_function ) ); + +#else + return( dlsym( handle, psz_function ) ); + +#endif +} + +static inline void * module_getsymbol( module_handle_t handle, + char * psz_function ) +{ + void * p_symbol = _module_getsymbol( handle, psz_function ); + + /* MacOS X dl library expects symbols to begin with "_". So do + * some other operating systems. That's really lame, but hey, what + * can we do ? */ + if( p_symbol == NULL ) + { + char *psz_call = malloc( strlen( psz_function ) + 2 ); + + strcpy( psz_call + 1, psz_function ); + psz_call[ 0 ] = '_'; + p_symbol = _module_getsymbol( handle, psz_call ); + free( psz_call ); + } + + return p_symbol; +} + +/***************************************************************************** + * module_error: wrapper for dlerror() + ***************************************************************************** + * This function returns the error message of the last module operation. It + * returns the string "failed" on systems which do not have a dlerror() like + * function. psz_buffer can be used to store temporary data, it is guaranteed + * to be kept intact until the return value of module_error has been used. + *****************************************************************************/ +static inline const char * module_error( char *psz_buffer ) +{ +#if defined(SYS_BEOS) + return( "failed" ); + +#elif defined(WIN32) + int i, i_error = GetLastError(); + + FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, i_error, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) psz_buffer, 256, NULL); + + /* Go to the end of the string */ + for( i = 0; + psz_buffer[i] && psz_buffer[i] != '\r' && psz_buffer[i] != '\n'; + i++ ) {}; + + if( psz_buffer[i] ) + { + snprintf( psz_buffer + i, 256 - i, " (error %i)", i_error ); + psz_buffer[ 255 ] = '\0'; + } + + return psz_buffer; + +#else + return( dlerror() ); + +#endif +} + +/***************************************************************************** + * STORE_SYMBOLS: store known symbols into p_symbols for plugin access. + *****************************************************************************/ diff --git a/src/misc/mtime.c b/src/misc/mtime.c index 0ac77f40e1..ea11caee15 100644 --- a/src/misc/mtime.c +++ b/src/misc/mtime.c @@ -3,7 +3,7 @@ * Functions are prototyped in mtime.h. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: mtime.c,v 1.31 2002/05/18 13:33:44 massiot Exp $ + * $Id: mtime.c,v 1.32 2002/06/01 12:32:01 sam Exp $ * * Authors: Vincent Seguin * @@ -32,7 +32,7 @@ *****************************************************************************/ #include /* sprintf() */ -#include +#include #if defined( PTH_INIT_IN_PTH_H ) /* GNU Pth */ # include diff --git a/src/misc/netutils.c b/src/misc/netutils.c index 6dca65bb4d..93229aac0d 100644 --- a/src/misc/netutils.c +++ b/src/misc/netutils.c @@ -2,7 +2,7 @@ * netutils.c: various network functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: netutils.c,v 1.66 2002/05/30 13:22:43 asmax Exp $ + * $Id: netutils.c,v 1.67 2002/06/01 12:32:01 sam Exp $ * * Authors: Vincent Seguin * Benoit Steiner @@ -33,7 +33,7 @@ #include /* errno() */ #include /* memset() */ -#include +#include #ifdef HAVE_UNISTD_H # include /* gethostname() */ @@ -76,7 +76,6 @@ #include "netutils.h" -#include "intf_playlist.h" #include "network.h" /***************************************************************************** @@ -87,16 +86,16 @@ * as it depends on the VideoLAN channel server, which isn't frozen for * the time being. *****************************************************************************/ -typedef struct input_channel_s +struct input_channel_s { int i_channel; /* current channel number */ mtime_t last_change; /* last change date */ -} input_channel_t; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -static int GetMacAddress ( int i_fd, char *psz_mac ); +static int GetMacAddress ( vlc_object_t *, int i_fd, char *psz_mac ); #ifdef WIN32 static int GetAdapterInfo ( int i_adapter, char *psz_string ); #endif @@ -108,26 +107,26 @@ static int GetAdapterInfo ( int i_adapter, char *psz_string ); * once before any input thread is created or any call to other * input_Channel*() function is attempted. *****************************************************************************/ -int network_ChannelCreate( void ) +int network_ChannelCreate( vlc_object_t *p_this ) { #if !defined( SYS_LINUX ) && !defined( WIN32 ) - intf_ErrMsg( "channel warning: VLAN-based channels are not supported" - " under this architecture" ); + msg_Err( p_this, "VLAN-based channels are not supported " + "on this architecture" ); #endif /* Allocate structure */ - p_main->p_channel = malloc( sizeof( input_channel_t ) ); - if( p_main->p_channel == NULL ) + p_this->p_vlc->p_channel = malloc( sizeof( input_channel_t ) ); + if( p_this->p_vlc->p_channel == NULL ) { - intf_ErrMsg( "network error: could not create channel bank" ); + msg_Err( p_this, "out of memory" ); return( -1 ); } /* Initialize structure */ - p_main->p_channel->i_channel = 0; - p_main->p_channel->last_change = 0; + p_this->p_vlc->p_channel->i_channel = 0; + p_this->p_vlc->p_channel->last_change = 0; - intf_WarnMsg( 2, "network: channels initialized" ); + msg_Dbg( p_this, "channels initialized" ); return( 0 ); } @@ -142,14 +141,14 @@ int network_ChannelCreate( void ) * should be unlocked using input_ChannelLeave(). * Non 0 will be returned in case of error. *****************************************************************************/ -int network_ChannelJoin( int i_channel ) +int network_ChannelJoin( vlc_object_t *p_this, int i_channel ) { #define VLCS_VERSION 13 #define MESSAGE_LENGTH 256 - struct module_s * p_network; - char * psz_network = NULL; - network_socket_t socket_desc; + module_t * p_network; + char * psz_network = NULL; + network_socket_t socket_desc; char psz_mess[ MESSAGE_LENGTH ]; char psz_mac[ 40 ]; int i_fd, i_port; @@ -157,43 +156,44 @@ int network_ChannelJoin( int i_channel ) struct timeval delay; fd_set fds; - if( !config_GetIntVariable( "network-channel" ) ) + if( !config_GetInt( p_this, "network-channel" ) ) { - intf_ErrMsg( "network: channels disabled, to enable them, use the" - "--channels option" ); + msg_Err( p_this, "channels disabled, to enable them, use the" + " --channels option" ); return -1; } /* If last change is too recent, wait a while */ -// if( mdate() - p_main->p_channel->last_change < INPUT_CHANNEL_CHANGE_DELAY ) +// if( mdate() - p_this->p_vlc->p_channel->last_change +// < INPUT_CHANNEL_CHANGE_DELAY ) // { -// intf_WarnMsg( 2, "network: waiting before changing channel" ); +// msg_Warn( p_this, "waiting before changing channel" ); /* XXX Isn't this completely brain-damaged ??? -- Sam */ /* Yes it is. I don't think this is still justified with the new * vlanserver --Meuuh */ -// mwait( p_main->p_channel->last_change + INPUT_CHANNEL_CHANGE_DELAY ); +// mwait( p_this->p_vlc->p_channel->last_change +// + INPUT_CHANNEL_CHANGE_DELAY ); // } - if( config_GetIntVariable( "ipv4" ) ) + if( config_GetInt( p_this, "ipv4" ) ) { psz_network = "ipv4"; } - if( config_GetIntVariable( "ipv6" ) ) + if( config_GetInt( p_this, "ipv6" ) ) { psz_network = "ipv6"; } /* Getting information about the channel server */ - if( !(psz_vlcs = config_GetPszVariable( "channel-server" )) ) + if( !(psz_vlcs = config_GetPsz( p_this, "channel-server" )) ) { - intf_ErrMsg( "network: configuration variable channel_server empty" ); + msg_Err( p_this, "configuration variable channel-server empty" ); return -1; } - i_port = config_GetIntVariable( "channel-port" ); + i_port = config_GetInt( p_this, "channel-port" ); - intf_WarnMsg( 5, "channel: connecting to %s:%d", - psz_vlcs, i_port ); + msg_Dbg( p_this, "connecting to %s:%d", psz_vlcs, i_port ); /* Prepare the network_socket_t structure */ socket_desc.i_type = NETWORK_UDP; @@ -203,7 +203,7 @@ int network_ChannelJoin( int i_channel ) socket_desc.i_server_port = i_port; /* Find an appropriate network module */ - p_network = module_Need( MODULE_CAPABILITY_NETWORK, psz_network, + p_network = module_Need( p_this, MODULE_CAPABILITY_NETWORK, psz_network, &socket_desc ); if( p_network == NULL ) { @@ -215,14 +215,14 @@ int network_ChannelJoin( int i_channel ) i_fd = socket_desc.i_handle; /* Look for the interface MAC address */ - if( GetMacAddress( i_fd, psz_mac ) ) + if( GetMacAddress( p_this, i_fd, psz_mac ) ) { - intf_ErrMsg( "network error: failed getting MAC address" ); + msg_Err( p_this, "failed getting MAC address" ); close( i_fd ); return -1; } - intf_WarnMsg( 6, "network: MAC address is %s", psz_mac ); + msg_Dbg( p_this, "MAC address is %s", psz_mac ); /* Build the message */ sprintf( psz_mess, "%d %u %lu %s \n", i_channel, VLCS_VERSION, @@ -232,11 +232,11 @@ int network_ChannelJoin( int i_channel ) /* Send the message */ send( i_fd, psz_mess, MESSAGE_LENGTH, 0 ); - intf_WarnMsg( 2, "network: attempting to join channel %d", i_channel ); + msg_Dbg( p_this, "attempting to join channel %d", i_channel ); /* We have changed channels ! (or at least, we tried) */ - p_main->p_channel->last_change = mdate(); - p_main->p_channel->i_channel = i_channel; + p_this->p_vlc->p_channel->last_change = mdate(); + p_this->p_vlc->p_channel->i_channel = i_channel; /* Wait 5 sec for an answer from the server */ delay.tv_sec = 5; @@ -247,16 +247,14 @@ int network_ChannelJoin( int i_channel ) switch( select( i_fd + 1, &fds, NULL, NULL, &delay ) ) { case 0: - intf_ErrMsg( "network error: no answer from vlcs" ); + msg_Err( p_this, "no answer from vlcs" ); close( i_fd ); return -1; - break; case -1: - intf_ErrMsg( "network error: error while listening to vlcs" ); + msg_Err( p_this, "error while listening to vlcs" ); close( i_fd ); return -1; - break; } recv( i_fd, psz_mess, MESSAGE_LENGTH, 0 ); @@ -264,32 +262,34 @@ int network_ChannelJoin( int i_channel ) if( !strncasecmp( psz_mess, "E:", 2 ) ) { - intf_ErrMsg( "network error: vlcs said '%s'", psz_mess + 2 ); + msg_Err( p_this, "vlcs said '%s'", psz_mess + 2 ); close( i_fd ); return -1; } else if( !strncasecmp( psz_mess, "I:", 2 ) ) { - intf_WarnMsg( 2, "network info: vlcs said '%s'", psz_mess + 2 ); + msg_Dbg( p_this, "vlcs said '%s'", psz_mess + 2 ); } else /* We got something to play ! FIXME: not very nice */ { -# define p_item \ - (&p_main->p_playlist->p_item[ p_main->p_playlist->i_index + 1]) - vlc_mutex_lock( &p_main->p_playlist->change_lock ); +#if 0 +# define p_item (&p_this->p_vlc->p_playlist->p_item \ + [ p_this->p_vlc->p_playlist->i_index + 1]) + vlc_mutex_lock( &p_this->p_vlc->p_playlist->change_lock ); if( p_item ) { free( p_item->psz_name ); p_item->psz_name = strdup( psz_mess ); /* Unlock _afterwards_ */ - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + vlc_mutex_unlock( &p_this->p_vlc->p_playlist->change_lock ); } else { /* Unlock _before_ */ - vlc_mutex_unlock( &p_main->p_playlist->change_lock ); - intf_PlaylistAdd( p_main->p_playlist, 0, psz_mess ); + vlc_mutex_unlock( &p_this->p_vlc->p_playlist->change_lock ); + intf_PlaylistAdd( p_this->p_vlc->p_playlist, 0, psz_mess ); } +#endif } /* Close the socket and return nicely */ @@ -307,7 +307,7 @@ int network_ChannelJoin( int i_channel ) /***************************************************************************** * GetMacAddress: extract the MAC Address *****************************************************************************/ -static int GetMacAddress( int i_fd, char *psz_mac ) +static int GetMacAddress( vlc_object_t *p_this, int i_fd, char *psz_mac ) { #if defined( SYS_LINUX ) struct ifreq interface; @@ -318,9 +318,9 @@ static int GetMacAddress( int i_fd, char *psz_mac ) * Looking for information about the eth0 interface */ interface.ifr_addr.sa_family = AF_INET; - if( !(psz_interface = config_GetPszVariable( "iface" )) ) + if( !(psz_interface = config_GetPsz( p_this, "iface" )) ) { - intf_ErrMsg( "network error: configuration variable iface empty" ); + msg_Err( p_this, "configuration variable iface empty" ); return -1; } strcpy( interface.ifr_name, psz_interface ); @@ -330,7 +330,7 @@ static int GetMacAddress( int i_fd, char *psz_mac ) if( i_ret ) { - intf_ErrMsg( "network error: ioctl SIOCGIFHWADDR failed" ); + msg_Err( p_this, "ioctl SIOCGIFHWADDR failed" ); return( i_ret ); } @@ -351,7 +351,7 @@ static int GetMacAddress( int i_fd, char *psz_mac ) LANA_ENUM AdapterList; NCB Ncb; - intf_WarnMsg( 2, "network: looking for MAC address" ); + msg_Dbg( p_this, "looking for MAC address" ); memset( &Ncb, 0, sizeof( NCB ) ); Ncb.ncb_command = NCBENUM; @@ -397,7 +397,7 @@ static int GetAdapterInfo( int i_adapter, char *psz_string ) if( Netbios( &Ncb ) != NRC_GOODRET ) { - intf_ErrMsg( "network error: reset returned %i", Ncb.ncb_retcode ); +//X intf_ErrMsg( "network error: reset returned %i", Ncb.ncb_retcode ); return -1; } @@ -424,13 +424,13 @@ static int GetAdapterInfo( int i_adapter, char *psz_string ) (int) ( Adapter.adapt.adapter_address[4] ), (int) ( Adapter.adapt.adapter_address[5] ) ); - intf_WarnMsg( 2, "network: found MAC address %s", psz_string ); +//X intf_WarnMsg( 2, "network: found MAC address %s", psz_string ); return 0; } else { - intf_ErrMsg( "network error: ASTAT returned %i", Ncb.ncb_retcode ); +//X intf_ErrMsg( "network error: ASTAT returned %i", Ncb.ncb_retcode ); return -1; } } diff --git a/src/misc/objects.c b/src/misc/objects.c new file mode 100644 index 0000000000..7ba39d637e --- /dev/null +++ b/src/misc/objects.c @@ -0,0 +1,474 @@ +/***************************************************************************** + * objects.c: vlc_object_t handling + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * $Id: objects.c,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Samuel Hocevar + * + * 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 + +#ifdef HAVE_STDLIB_H +# include /* realloc() */ +#endif + +#include "stream_control.h" +#include "input_ext-intf.h" +#include "input_ext-dec.h" + +#include "video.h" +#include "video_output.h" + +#include "vdec_ext-plugins.h" + +#include "audio_output.h" + +#include "playlist.h" +#include "interface.h" + +static void vlc_dumpstructure_inner( vlc_object_t *, int, char * ); +static vlc_object_t * vlc_object_find_inner( vlc_object_t *, int, int ); +static void vlc_object_unlink_inner( vlc_object_t *, vlc_object_t * ); + +#define MAX_TREE_DEPTH 100 + +void __vlc_dumpstructure( vlc_object_t *p_this ) +{ + char psz_foo[2 * MAX_TREE_DEPTH + 1]; + + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + psz_foo[0] = '|'; + vlc_dumpstructure_inner( p_this, 0, psz_foo ); + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} + +static void vlc_dumpstructure_inner( vlc_object_t *p_this, + int i_level, char *psz_foo ) +{ + int i; + char i_back = psz_foo[i_level]; + char psz_children[20], psz_refcount[20], psz_thread[20], psz_name[50]; + + psz_name[0] = '\0'; + if( p_this->psz_object_name ) + { + snprintf( psz_name, 50, " \"%s\"", p_this->psz_object_name ); + psz_name[48] = '\"'; + psz_name[49] = '\0'; + } + + psz_children[0] = '\0'; + switch( p_this->i_children ) + { + case 0: + break; + case 1: + strcpy( psz_children, ", 1 child" ); + break; + default: + snprintf( psz_children, 20, ", %i children", p_this->i_children ); + psz_children[19] = '\0'; + break; + } + + psz_refcount[0] = '\0'; + if( p_this->i_refcount ) + { + snprintf( psz_refcount, 20, ", refcount %i", p_this->i_refcount ); + psz_refcount[19] = '\0'; + } + + psz_thread[0] = '\0'; + if( p_this->b_thread ) + { + snprintf( psz_thread, 20, " (thread %d)", p_this->thread_id ); + psz_thread[19] = '\0'; + } + + psz_foo[i_level] = '\0'; + msg_Dbg( p_this, "%so %s %p%s%s%s%s", psz_foo, p_this->psz_object_type, + p_this, psz_name, psz_thread, psz_refcount, psz_children ); + psz_foo[i_level] = i_back; + + if( i_level / 2 >= MAX_TREE_DEPTH ) + { + msg_Warn( p_this, "structure tree is too deep" ); + return; + } + + for( i = 0 ; i < p_this->i_children ; i++ ) + { + if( i_level ) + { + psz_foo[i_level-1] = ' '; + + if( psz_foo[i_level-2] == '`' ) + { + psz_foo[i_level-2] = ' '; + } + } + + if( i == p_this->i_children - 1 ) + { + psz_foo[i_level] = '`'; + } + else + { + psz_foo[i_level] = '|'; + } + + psz_foo[i_level+1] = '-'; + psz_foo[i_level+2] = '\0'; + + vlc_dumpstructure_inner( p_this->pp_children[i], i_level + 2, psz_foo ); + } +} + +/* vlc_object_create: initialize a vlc object and set its parent */ +void * __vlc_object_create( vlc_object_t *p_this, int i_type ) +{ + vlc_object_t * p_new; + char * psz_type; + size_t i_size; + + switch( i_type ) + { + case VLC_OBJECT_ROOT: + i_size = sizeof(vlc_t); + psz_type = "root"; + break; + case VLC_OBJECT_MODULE: + i_size = sizeof(module_t); + psz_type = "module"; + break; + case VLC_OBJECT_INTF: + i_size = sizeof(intf_thread_t); + psz_type = "interface"; + break; + case VLC_OBJECT_PLAYLIST: + i_size = sizeof(playlist_t); + psz_type = "playlist"; + break; + case VLC_OBJECT_INPUT: + i_size = sizeof(input_thread_t); + psz_type = "input"; + break; + case VLC_OBJECT_DECODER: + i_size = sizeof(decoder_fifo_t); + psz_type = "decoder"; + break; + case VLC_OBJECT_VOUT: + i_size = sizeof(vout_thread_t); + psz_type = "video output"; + break; + case VLC_OBJECT_AOUT: + i_size = sizeof(aout_thread_t); + psz_type = "audio output"; + break; + default: + i_size = i_type; + i_type = VLC_OBJECT_PRIVATE; + psz_type = "private"; + break; + } + + p_new = malloc( i_size ); + + if( !p_new ) + { + return NULL; + } + + memset( p_new, 0, i_size ); + + p_new->i_object_type = i_type; + p_new->psz_object_type = psz_type; + + p_new->psz_object_name = NULL; + + p_new->i_refcount = 0; + p_new->b_die = 0; + p_new->b_error = 0; + + p_new->p_this = p_new; + + /* If i_type is root, then p_new is our own p_vlc */ + if( i_type == VLC_OBJECT_ROOT ) + { + p_new->p_vlc = (vlc_t*)p_new; + p_new->p_vlc->i_counter = 0; + p_new->i_object_id = 0; + } + else + { + p_new->p_vlc = p_this->p_vlc; + + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + p_new->p_vlc->i_counter++; + p_new->i_object_id = p_new->p_vlc->i_counter; + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); + } + + p_new->pp_parents = NULL; + p_new->i_parents = 0; + p_new->pp_children = NULL; + p_new->i_children = 0; + + //msg_Dbg( p_new, "created object" ); + + return p_new; +} + +/* vlc_object_destroy: initialize a vlc object and set its parent */ +void __vlc_object_destroy( vlc_object_t *p_this ) +{ + if( p_this->i_refcount ) + { + msg_Err( p_this, "refcount is %i", p_this->i_refcount ); + vlc_dumpstructure( p_this ); + } + + if( p_this->i_children ) + { + msg_Err( p_this, "object still has children" ); + vlc_dumpstructure( p_this ); + } + + if( p_this->i_parents ) + { + msg_Err( p_this, "object still has parents" ); + vlc_dumpstructure( p_this ); + } + + //msg_Dbg( p_this, "destroyed object" ); + + free( p_this ); +} + +/* vlc_object_find: find a typed object and increment its refcount */ +void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode ) +{ + vlc_object_t *p_found; + + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + + /* If we are of the requested type ourselves, don't look further */ + if( !(i_mode & FIND_STRICT) && p_this->i_object_type == i_type ) + { + p_this->i_refcount++; + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); + return p_this; + } + + /* Otherwise, recursively look for the object */ + p_found = vlc_object_find_inner( p_this, i_type, i_mode ); + + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); + + return p_found; +} + +static vlc_object_t * vlc_object_find_inner( vlc_object_t *p_this, + int i_type, int i_mode ) +{ + int i; + vlc_object_t *p_tmp; + + switch( i_mode & 0x000f ) + { + case FIND_PARENT: + for( i = p_this->i_parents; i--; ) + { + p_tmp = p_this->pp_parents[i]; + if( p_tmp->i_object_type == i_type ) + { + p_tmp->i_refcount++; + return p_tmp; + } + else if( p_tmp->i_parents ) + { + p_tmp = vlc_object_find_inner( p_tmp, i_type, i_mode ); + if( p_tmp ) + { + return p_tmp; + } + } + } + break; + + case FIND_CHILD: + for( i = p_this->i_children; i--; ) + { + p_tmp = p_this->pp_children[i]; + if( p_tmp->i_object_type == i_type ) + { + p_tmp->i_refcount++; + return p_tmp; + } + else if( p_tmp->i_children ) + { + p_tmp = vlc_object_find_inner( p_tmp, i_type, i_mode ); + if( p_tmp ) + { + return p_tmp; + } + } + } + break; + + case FIND_ANYWHERE: + /* FIXME: unimplemented */ + break; + } + + return NULL; +} + +/* vlc_object_yield: increment an object refcount */ +void __vlc_object_yield( vlc_object_t *p_this ) +{ + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + p_this->i_refcount++; + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} + +/* vlc_object_release: decrement an object refcount */ +void __vlc_object_release( vlc_object_t *p_this ) +{ + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + p_this->i_refcount--; + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} + +/* vlc_object_unlink: detach object from its parents */ +void __vlc_object_unlink_all( vlc_object_t *p_this ) +{ + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + + /* FIXME: BORK ! BORK ! BORK !!! THIS STUFF IS BORKED !! FIXME */ + while( p_this->i_parents ) + { + /* Not very effective because we know the index, but we'd have to + * parse p_parent->pp_children anyway. Plus, we remove duplicates + * by not using the object's index */ + vlc_object_unlink_inner( p_this, p_this->pp_parents[0] ); + } + + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} + +/* vlc_object_unlink: remove a parent/child link */ +void __vlc_object_unlink( vlc_object_t *p_this, vlc_object_t *p_parent ) +{ + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + vlc_object_unlink_inner( p_this, p_parent ); + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} + +static void vlc_object_unlink_inner( vlc_object_t *p_this, + vlc_object_t *p_parent ) +{ + int i_index, i; + + /* Remove all of p_this's parents which are p_parent */ + for( i_index = p_this->i_parents ; i_index-- ; ) + { + if( p_this->pp_parents[i_index] == p_parent ) + { + p_this->i_parents--; + for( i = i_index ; i < p_this->i_parents ; i++ ) + { + p_this->pp_parents[i] = p_this->pp_parents[i+1]; + } + } + } + + if( p_this->i_parents ) + { + p_this->pp_parents = (vlc_object_t **)realloc( p_this->pp_parents, + p_this->i_parents * sizeof(vlc_object_t *) ); + } + else + { + free( p_this->pp_parents ); + p_this->pp_parents = NULL; + } + + /* Remove all of p_parent's children which are p_this */ + for( i_index = p_parent->i_children ; i_index-- ; ) + { + if( p_parent->pp_children[i_index] == p_this ) + { + p_parent->i_children--; + for( i = i_index ; i < p_parent->i_children ; i++ ) + { + p_parent->pp_children[i] = p_parent->pp_children[i+1]; + } + } + } + + if( p_parent->i_children ) + { + p_parent->pp_children = (vlc_object_t **)realloc( p_parent->pp_children, + p_parent->i_children * sizeof(vlc_object_t *) ); + } + else + { + free( p_parent->pp_children ); + p_parent->pp_children = NULL; + } +} + +/* vlc_object_attach: attach object to a parent object */ +void __vlc_object_attach( vlc_object_t *p_this, vlc_object_t *p_parent ) +{ + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + + p_this->i_parents++; + p_this->pp_parents = (vlc_object_t **)realloc( p_this->pp_parents, + p_this->i_parents * sizeof(vlc_object_t *) ); + p_this->pp_parents[p_this->i_parents - 1] = p_parent; + + p_parent->i_children++; + p_parent->pp_children = (vlc_object_t **)realloc( p_parent->pp_children, + p_parent->i_children * sizeof(vlc_object_t *) ); + p_parent->pp_children[p_parent->i_children - 1] = p_this; + + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} + +#if 0 /* UNUSED */ +/* vlc_object_setchild: attach a child object */ +void __vlc_object_setchild( vlc_object_t *p_this, vlc_object_t *p_child ) +{ + vlc_mutex_lock( &p_this->p_vlc->structure_lock ); + + p_this->i_children++; + p_this->pp_children = (vlc_object_t **)realloc( p_this->pp_children, + p_this->i_children * sizeof(vlc_object_t *) ); + p_this->pp_children[p_this->i_children - 1] = p_child; + + p_child->i_parents++; + p_child->pp_parents = (vlc_object_t **)realloc( p_child->pp_parents, + p_child->i_parents * sizeof(vlc_object_t *) ); + p_child->pp_parents[p_child->i_parents - 1] = p_this; + + vlc_mutex_unlock( &p_this->p_vlc->structure_lock ); +} +#endif + diff --git a/src/misc/symbols.c b/src/misc/symbols.c index d4d2abed2b..e81b0b97c9 100644 --- a/src/misc/symbols.c +++ b/src/misc/symbols.c @@ -2,7 +2,7 @@ * symbols.c : Extra file used to force linking with some shared symbols ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: symbols.c,v 1.1 2002/01/21 00:52:07 sam Exp $ + * $Id: symbols.c,v 1.2 2002/06/01 12:32:01 sam Exp $ * * Authors: Samuel Hocevar * @@ -35,7 +35,7 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include +#include #include #include diff --git a/src/misc/threads.c b/src/misc/threads.c new file mode 100644 index 0000000000..9de1355521 --- /dev/null +++ b/src/misc/threads.c @@ -0,0 +1,544 @@ +/***************************************************************************** + * threads.c : threads implementation for the VideoLAN client + ***************************************************************************** + * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN + * $Id: threads.c,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Jean-Marc Dressler + * Samuel Hocevar + * Gildas Bazin + * + * 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 + +#define VLC_THREADS_UNINITIALIZED 0 +#define VLC_THREADS_PENDING 1 +#define VLC_THREADS_ERROR 2 +#define VLC_THREADS_READY 3 + +/***************************************************************************** + * Prototype for GPROF wrapper + *****************************************************************************/ +#ifdef GPROF +/* Wrapper function for profiling */ +static void * vlc_thread_wrapper ( void *p_wrapper ); + +# ifdef WIN32 + +# define ITIMER_REAL 1 +# define ITIMER_PROF 2 + +struct itimerval +{ + struct timeval it_value; + struct timeval it_interval; +}; + +int setitimer(int kind, const struct itimerval* itnew, struct itimerval* itold); +# endif /* WIN32 */ + +typedef struct wrapper_s +{ + /* Data lock access */ + vlc_mutex_t lock; + vlc_cond_t wait; + + /* Data used to spawn the real thread */ + vlc_thread_func_t func; + void *p_data; + + /* Profiling timer passed to the thread */ + struct itimerval itimer; + +} wrapper_t; + +#endif /* GPROF */ + +/***************************************************************************** + * vlc_threads_init: initialize threads system + *****************************************************************************/ +int __vlc_threads_init( vlc_object_t *p_this ) +{ + /* FIXME: this is definitely _not_ threadsafe, but at least it works + * under all implementations. We should for instance use pthread_once + * for lazy initialization of the global lock. */ + static int i_status = VLC_THREADS_UNINITIALIZED; + int i_ret; + + if( i_status == VLC_THREADS_READY ) + { + return 0; + } + + if( i_status == VLC_THREADS_UNINITIALIZED ) + { + i_status = VLC_THREADS_PENDING; + +#if defined( PTH_INIT_IN_PTH_H ) + i_ret = pth_init(); + +#elif defined( ST_INIT_IN_ST_H ) + i_ret = st_init(); + +#elif defined( WIN32 ) + i_ret = 0; + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + i_ret = 0; + +#elif defined( HAVE_CTHREADS_H ) + i_ret = 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + i_ret = 0; + +#endif + if( i_ret ) + { + i_status = VLC_THREADS_ERROR; + return i_ret; + } + + vlc_mutex_init( p_this, p_this->p_vlc->p_global_lock ); + + i_status = VLC_THREADS_READY; + + return i_ret; + } + + /* Wait until the other thread has initialized the thread library */ + while( i_status == VLC_THREADS_PENDING ) + { + msleep( THREAD_SLEEP ); + } + + return( i_status == VLC_THREADS_READY ); +} + +/***************************************************************************** + * vlc_threads_end: stop threads system + *****************************************************************************/ +int vlc_threads_end( void ) +{ +#if defined( PTH_INIT_IN_PTH_H ) + return pth_kill(); + +#elif defined( ST_INIT_IN_ST_H ) + return 0; + +#elif defined( WIN32 ) + return 0; + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + return 0; + +#elif defined( HAVE_CTHREADS_H ) + return 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + return 0; + +#endif +} + +static int mutexes = 0; +/***************************************************************************** + * vlc_mutex_init: initialize a mutex + *****************************************************************************/ +int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex ) +{ +#if defined( PTH_INIT_IN_PTH_H ) + return pth_mutex_init( p_mutex ); + +#elif defined( ST_INIT_IN_ST_H ) + *p_mutex = st_mutex_new(); + return ( *p_mutex == NULL ) ? errno : 0; + +#elif defined( WIN32 ) + /* We use mutexes on WinNT/2K/XP because we can use the SignalObjectAndWait + * function and have a 100% correct vlc_cond_wait() implementation. + * As this function is not available on Win9x, we can use the faster + * CriticalSections */ + if( (GetVersion() < 0x80000000) && !p_this->p_vlc->p_sys->b_fast_pthread ) + { + /* We are running on NT/2K/XP, we can use SignalObjectAndWait */ + p_mutex->mutex = CreateMutex( 0, FALSE, 0 ); + p_mutex->SignalObjectAndWait = + p_this->p_vlc->p_sys->SignalObjectAndWait; + return ( p_mutex->mutex ? 0 : 1 ); + } + else + { + InitializeCriticalSection( &p_mutex->csection ); + p_mutex->mutex = NULL; + return 0; + } + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) +# if defined(DEBUG) && defined(SYS_LINUX) + /* Create error-checking mutex to detect threads problems more easily. */ + pthread_mutexattr_t attr; + int i_result; + + pthread_mutexattr_init( &attr ); + pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP ); + i_result = pthread_mutex_init( p_mutex, &attr ); + pthread_mutexattr_destroy( &attr ); + return( i_result ); +# endif + return pthread_mutex_init( p_mutex, NULL ); + +#elif defined( HAVE_CTHREADS_H ) + mutex_init( p_mutex ); + return 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + + /* check the arguments and whether it's already been initialized */ + if( p_mutex == NULL ) + { + return B_BAD_VALUE; + } + + if( p_mutex->init == 9999 ) + { + return EALREADY; + } + + p_mutex->lock = create_sem( 1, "BeMutex" ); + if( p_mutex->lock < B_NO_ERROR ) + { + return( -1 ); + } + + p_mutex->init = 9999; + return B_OK; + +#endif +} + +/***************************************************************************** + * vlc_mutex_destroy: destroy a mutex, inner version + *****************************************************************************/ +int __vlc_mutex_destroy( char * psz_file, int i_line, vlc_mutex_t *p_mutex ) +{ +#if defined( PTH_INIT_IN_PTH_H ) + return 0; + +#elif defined( ST_INIT_IN_ST_H ) + return st_mutex_destroy( *p_mutex ); + +#elif defined( WIN32 ) + if( p_mutex->mutex ) + { + CloseHandle( p_mutex->mutex ); + } + else + { + DeleteCriticalSection( &p_mutex->csection ); + } + return 0; + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + int i_return = pthread_mutex_destroy( p_mutex ); + if( i_return ) + { +//X intf_ErrMsg( "thread %d error: mutex_destroy failed at %s:%d (%s)", +//X pthread_self(), psz_file, i_line, strerror(i_return) ); + } + return i_return; + +#elif defined( HAVE_CTHREADS_H ) + return 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + if( p_mutex->init == 9999 ) + { + delete_sem( p_mutex->lock ); + } + + p_mutex->init = 0; + return B_OK; + +#endif +} + +/***************************************************************************** + * vlc_cond_init: initialize a condition + *****************************************************************************/ +int vlc_cond_init( vlc_cond_t *p_condvar ) +{ +#if defined( PTH_INIT_IN_PTH_H ) + return pth_cond_init( p_condvar ); + +#elif defined( ST_INIT_IN_ST_H ) + *p_condvar = st_cond_new(); + return ( *p_condvar == NULL ) ? errno : 0; + +#elif defined( WIN32 ) + /* initialise counter */ + p_condvar->i_waiting_threads = 0; + + /* Create an auto-reset event. */ + p_condvar->signal = CreateEvent( NULL, /* no security */ + FALSE, /* auto-reset event */ + FALSE, /* non-signaled initially */ + NULL ); /* unnamed */ + + return( !p_condvar->signal ); + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + return pthread_cond_init( p_condvar, NULL ); + +#elif defined( HAVE_CTHREADS_H ) + /* condition_init() */ + spin_lock_init( &p_condvar->lock ); + cthread_queue_init( &p_condvar->queue ); + p_condvar->name = 0; + p_condvar->implications = 0; + + return 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + if( !p_condvar ) + { + return B_BAD_VALUE; + } + + if( p_condvar->init == 9999 ) + { + return EALREADY; + } + + p_condvar->thread = -1; + p_condvar->init = 9999; + return 0; + +#endif +} + +/***************************************************************************** + * vlc_cond_destroy: destroy a condition, inner version + *****************************************************************************/ +int __vlc_cond_destroy( char * psz_file, int i_line, vlc_cond_t *p_condvar ) +{ +#if defined( PTH_INIT_IN_PTH_H ) + return 0; + +#elif defined( ST_INIT_IN_ST_H ) + return st_cond_destroy( *p_condvar ); + +#elif defined( WIN32 ) + return( !CloseHandle( p_condvar->signal ) ); + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + int i_result = pthread_cond_destroy( p_condvar ); + if( i_result ) + { +//X intf_ErrMsg( "thread %d error: cond_destroy failed at %s:%d (%s)", +//X pthread_self(), psz_file, i_line, strerror(i_result) ); + } + return i_result; + +#elif defined( HAVE_CTHREADS_H ) + return 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + p_condvar->init = 0; + return 0; + +#endif +} + +/***************************************************************************** + * vlc_thread_create: create a thread, inner version + *****************************************************************************/ +int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line, + char *psz_name, void * ( *func ) ( void * ), + vlc_bool_t b_wait ) +{ + int i_ret; + + vlc_mutex_init( p_this, &p_this->thread_lock ); + vlc_cond_init( &p_this->thread_wait ); + vlc_mutex_lock( &p_this->thread_lock ); + +#ifdef GPROF + wrapper_t wrapper; + + /* Initialize the wrapper structure */ + wrapper.func = func; + wrapper.p_data = (void *)p_this; + getitimer( ITIMER_PROF, &wrapper.itimer ); + vlc_mutex_init( p_this, &wrapper.lock ); + vlc_cond_init( &wrapper.wait ); + vlc_mutex_lock( &wrapper.lock ); + + /* Alter user-passed data so that we call the wrapper instead + * of the real function */ + p_data = &wrapper; + func = vlc_thread_wrapper; +#endif + +#if defined( PTH_INIT_IN_PTH_H ) + p_this->thread_id = pth_spawn( PTH_ATTR_DEFAULT, func, (void *)p_this ); + i_ret = 0; + +#elif defined( ST_INIT_IN_ST_H ) + p_this->thread_id = st_thread_create( func, (void *)p_this, 1, 0 ); + i_ret = 0; + +#elif defined( WIN32 ) + unsigned threadID; + /* When using the MSVCRT C library you have to use the _beginthreadex + * function instead of CreateThread, otherwise you'll end up with memory + * leaks and the signal functions not working */ + p_this->thread_id = (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, + (void *)p_this, 0, &threadID ); + + i_ret = ( p_this->thread_id ? 0 : 1 ); + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + i_ret = pthread_create( &p_this->thread_id, NULL, func, (void *)p_this ); + +#elif defined( HAVE_CTHREADS_H ) + p_this->thread_id = cthread_fork( (cthread_fn_t)func, (any_t)p_this ); + i_ret = 0; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + p_this->thread_id = spawn_thread( (thread_func)func, psz_name, + B_NORMAL_PRIORITY, (void *)p_this ); + i_ret = resume_thread( p_this->thread_id ); + +#endif + +#ifdef GPROF + if( i_ret == 0 ) + { + vlc_cond_wait( &wrapper.wait, &wrapper.lock ); + } + + vlc_mutex_unlock( &wrapper.lock ); + vlc_mutex_destroy( &wrapper.lock ); + vlc_cond_destroy( &wrapper.wait ); +#endif + + if( i_ret == 0 ) + { + msg_Dbg( p_this, "thread %d (%s) created (%s:%d)", + p_this->thread_id, psz_name, psz_file, i_line ); + + p_this->b_thread = 1; + + if( b_wait ) + { + msg_Dbg( p_this, "waiting for thread completion" ); + vlc_cond_wait( &p_this->thread_wait, &p_this->thread_lock ); + } + + vlc_mutex_unlock( &p_this->thread_lock ); + } + else + { + msg_Err( p_this, "%s thread could not be created at %s:%d (%s)", + psz_name, psz_file, i_line, strerror(i_ret) ); + vlc_mutex_unlock( &p_this->thread_lock ); + vlc_mutex_destroy( &p_this->thread_lock ); + vlc_cond_destroy( &p_this->thread_wait ); + } + + return i_ret; +} + +/***************************************************************************** + * vlc_thread_ready: tell the parent thread we were successfully spawned + *****************************************************************************/ +void __vlc_thread_ready( vlc_object_t *p_this ) +{ + vlc_mutex_lock( &p_this->thread_lock ); + vlc_cond_signal( &p_this->thread_wait ); + vlc_mutex_unlock( &p_this->thread_lock ); +} + +/***************************************************************************** + * vlc_thread_join: wait until a thread exits, inner version + *****************************************************************************/ +void __vlc_thread_join( vlc_object_t *p_this, char * psz_file, int i_line ) +{ + int i_ret = 0; + +#if defined( PTH_INIT_IN_PTH_H ) + i_ret = pth_join( p_this->thread_id, NULL ); + +#elif defined( ST_INIT_IN_ST_H ) + i_ret = st_thread_join( p_this->thread_id, NULL ); + +#elif defined( WIN32 ) + WaitForSingleObject( p_this->thread_id, INFINITE ); + +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) + i_ret = pthread_join( p_this->thread_id, NULL ); + +#elif defined( HAVE_CTHREADS_H ) + cthread_join( p_this->thread_id ); + i_ret = 1; + +#elif defined( HAVE_KERNEL_SCHEDULER_H ) + int32 exit_value; + wait_for_thread( p_this->thread_id, &exit_value ); + +#endif + + vlc_mutex_destroy( &p_this->thread_lock ); + vlc_cond_destroy( &p_this->thread_wait ); + + if( i_ret ) + { + msg_Err( p_this, "thread_join(%d) failed at %s:%d (%s)", + p_this->thread_id, psz_file, i_line, strerror(i_ret) ); + } + else + { + msg_Dbg( p_this, "thread %d joined (%s:%d)", + p_this->thread_id, psz_file, i_line ); + } + + p_this->b_thread = 0; +} + +/***************************************************************************** + * vlc_thread_wrapper: wrapper around thread functions used when profiling. + *****************************************************************************/ +#ifdef GPROF +static void *vlc_thread_wrapper( void *p_wrapper ) +{ + /* Put user data in thread-local variables */ + void * p_data = ((wrapper_t*)p_wrapper)->p_data; + vlc_thread_func_t func = ((wrapper_t*)p_wrapper)->func; + + /* Set the profile timer value */ + setitimer( ITIMER_PROF, &((wrapper_t*)p_wrapper)->itimer, NULL ); + + /* Tell the calling thread that we don't need its data anymore */ + vlc_mutex_lock( &((wrapper_t*)p_wrapper)->lock ); + vlc_cond_signal( &((wrapper_t*)p_wrapper)->wait ); + vlc_mutex_unlock( &((wrapper_t*)p_wrapper)->lock ); + + /* Call the real function */ + return func( p_data ); +} +#endif diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c index b3a9e41e7c..32376b06a0 100644 --- a/src/misc/win32_specific.c +++ b/src/misc/win32_specific.c @@ -2,7 +2,7 @@ * win32_specific.c: Win32 specific features ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: win32_specific.c,v 1.7 2002/04/27 22:11:22 gbazin Exp $ + * $Id: win32_specific.c,v 1.8 2002/06/01 12:32:02 sam Exp $ * * Authors: Samuel Hocevar * Gildas Bazin @@ -28,29 +28,28 @@ #include -#include +#include /***************************************************************************** * system_Init: initialize winsock and misc other things. *****************************************************************************/ -void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) +void system_Init( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[] ) { WSADATA Data; int i_err; HINSTANCE hInstLib; /* Allocate structure */ - p_main->p_sys = malloc( sizeof( main_sys_t ) ); - if( p_main->p_sys == NULL ) + p_this->p_vlc->p_sys = malloc( sizeof( main_sys_t ) ); + if( p_this->p_vlc->p_sys == NULL ) { - intf_ErrMsg( "init error: can't create p_main->p_sys (%s)", - strerror(ENOMEM) ); + fprintf( stderr, "error: out of memory\n" ); exit(-1); } /* dynamically get the address of SignalObjectAndWait */ hInstLib = LoadLibrary( "kernel32" ); - p_main->p_sys->SignalObjectAndWait = + p_this->p_vlc->p_sys->SignalObjectAndWait = (SIGNALOBJECTANDWAIT)GetProcAddress( hInstLib, "SignalObjectAndWait" ); /* WinSock Library Init. */ @@ -58,7 +57,7 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) if( i_err ) { - fprintf( stderr, "error: can't initiate WinSocks, error %i", i_err ); + fprintf( stderr, "error: can't initiate WinSocks, error %i\n", i_err ); } _fmode = _O_BINARY; /* sets the default file-translation mode */ @@ -67,15 +66,16 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) /***************************************************************************** * system_Configure: check for system specific configuration options. *****************************************************************************/ -void system_Configure( void ) +void system_Configure( vlc_object_t *p_this ) { - p_main->p_sys->b_fast_pthread = config_GetIntVariable( "fast_pthread" ); + p_this->p_vlc->p_sys->b_fast_pthread = config_GetInt( p_this, + "fast_pthread" ); } /***************************************************************************** * system_End: terminate winsock. *****************************************************************************/ -void system_End( void ) +void system_End( vlc_object_t * ) { WSACleanup(); } diff --git a/src/playlist/playlist.c b/src/playlist/playlist.c new file mode 100644 index 0000000000..95465ab9ba --- /dev/null +++ b/src/playlist/playlist.c @@ -0,0 +1,291 @@ +/***************************************************************************** + * playlist.c : Playlist management functions + ***************************************************************************** + * Copyright (C) 1999-2001 VideoLAN + * $Id: playlist.c,v 1.1 2002/06/01 12:32:02 sam Exp $ + * + * Authors: Samuel Hocevar + * + * 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 /* free(), strtol() */ +#include /* sprintf() */ +#include /* strerror() */ +#include /* ENOMEM */ + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "playlist.h" + +#define PLAYLIST_STOPPED 0 +#define PLAYLIST_RUNNING 1 + +/***************************************************************************** + * Local prototypes + *****************************************************************************/ +static void RunThread ( playlist_t * ); + +/***************************************************************************** + * playlist_Create: create playlist + ***************************************************************************** + * Create a playlist structure. + *****************************************************************************/ +playlist_t * playlist_Create ( vlc_object_t *p_parent ) +{ + playlist_t *p_playlist; + + /* Allocate structure */ + p_playlist = vlc_object_create( p_parent, VLC_OBJECT_PLAYLIST ); + if( !p_playlist ) + { + msg_Err( p_parent, "out of memory" ); + return NULL; + } + + vlc_object_attach( p_playlist, p_parent ); + + p_playlist->p_input = NULL; + p_playlist->i_status = PLAYLIST_RUNNING; + p_playlist->i_index = -1; + p_playlist->i_size = 0; + p_playlist->pp_items = NULL; + vlc_mutex_init( p_playlist, &p_playlist->change_lock ); + + if( vlc_thread_create( p_playlist, "playlist", RunThread, 0 ) ) + { + msg_Err( p_playlist, "cannot spawn playlist thread" ); + vlc_mutex_destroy( &p_playlist->change_lock ); + vlc_object_unlink_all( p_playlist ); + vlc_object_destroy( p_playlist ); + return NULL; + } + + return p_playlist; +} + +/***************************************************************************** + * playlist_Destroy: destroy the playlist + ***************************************************************************** + * Delete all items in the playlist and free the playlist structure. + *****************************************************************************/ +void playlist_Destroy( playlist_t * p_playlist ) +{ + p_playlist->b_die = 1; + + vlc_thread_join( p_playlist ); + + vlc_mutex_destroy( &p_playlist->change_lock ); + vlc_object_destroy( p_playlist ); +} + +/***************************************************************************** + * playlist_Add: add an item to the playlist + ***************************************************************************** + * Add an item to the playlist at position i_pos. If i_pos is PLAYLIST_END, + * add it at the end regardless of the playlist current size. + *****************************************************************************/ +int playlist_Add( vlc_object_t *p_this, int i_pos, const char * psz_item ) +{ + playlist_t *p_playlist; + + p_playlist = vlc_object_find( p_this->p_vlc, VLC_OBJECT_PLAYLIST, + FIND_CHILD ); + + if( p_playlist == NULL ) + { + msg_Dbg( p_this, "no playlist present, creating one" ); + p_playlist = playlist_Create( p_this->p_vlc->p_this ); + + if( p_playlist == NULL ) + { + return VLC_EGENERIC; + } + + vlc_object_yield( p_playlist ); + } + + msg_Warn( p_this, "adding playlist item « %s »", psz_item ); + + vlc_mutex_lock( &p_playlist->change_lock ); + + p_playlist->i_size++; + p_playlist->pp_items = realloc( p_playlist->pp_items, + p_playlist->i_size * sizeof(void*) ); + if( p_playlist->pp_items == NULL ) + { + msg_Err( p_playlist, "out of memory" ); + vlc_mutex_unlock( &p_playlist->change_lock ); + vlc_object_release( p_playlist ); + return -1; + } + + i_pos = p_playlist->i_size - 1; /* FIXME */ + p_playlist->pp_items[i_pos] = malloc( sizeof( playlist_item_t ) ); + p_playlist->pp_items[i_pos]->psz_name = strdup( psz_item ); + p_playlist->pp_items[i_pos]->i_type = 0; + p_playlist->pp_items[i_pos]->i_status = 0; + + vlc_mutex_unlock( &p_playlist->change_lock ); + vlc_object_release( p_playlist ); + + return 0; +} + +/***************************************************************************** + * playlist_Delete: delete an item from the playlist + ***************************************************************************** + * Delete the item in the playlist with position i_pos. + *****************************************************************************/ +int playlist_Delete( playlist_t * p_playlist, int i_pos ) +{ + return 0; +} + +/***************************************************************************** + * playlist_Command: do a playlist action + ***************************************************************************** + * Delete the item in the playlist with position i_pos. + *****************************************************************************/ +void playlist_Command( playlist_t * p_playlist, int i_command, int i_arg ) +{ + switch( i_command ) + { + case PLAYLIST_STOP: + msg_Dbg( p_playlist, "stopping" ); + p_playlist->i_status = PLAYLIST_STOPPED; + break; + case PLAYLIST_PLAY: + msg_Dbg( p_playlist, "running" ); + p_playlist->i_status = PLAYLIST_RUNNING; + break; + case PLAYLIST_SKIP: + msg_Dbg( p_playlist, "next" ); + if( p_playlist->i_size ) + { + p_playlist->i_index = 0; + p_playlist->i_status = PLAYLIST_RUNNING; + } + break; + default: + break; + } + + return; +} + +/* Following functions are local */ + +/***************************************************************************** + * RunThread: main playlist thread + *****************************************************************************/ +static void RunThread ( playlist_t *p_playlist ) +{ + while( !p_playlist->b_die ) + { + /* If there is an input, check that it doesn't need to die. */ + if( p_playlist->p_input ) + { + if( p_playlist->p_input->i_status == THREAD_OVER ) + { + input_thread_t *p_input; + + /* Unlink current input */ + vlc_mutex_lock( &p_playlist->change_lock ); + p_input = p_playlist->p_input; + p_playlist->p_input = NULL; + vlc_mutex_unlock( &p_playlist->change_lock ); + + /* Destroy input */ + vlc_object_unlink_all( p_input ); + vlc_object_release( p_input ); + input_DestroyThread( p_input ); + } + else if( ( p_playlist->p_input->i_status == THREAD_READY + || p_playlist->p_input->i_status == THREAD_ERROR ) + && ( p_playlist->p_input->b_error + || p_playlist->p_input->b_eof ) ) + { + input_StopThread( p_playlist->p_input, NULL ); + } + } + else if( p_playlist->i_status != PLAYLIST_STOPPED ) + { + /* Select the next playlist item */ + playlist_Next( p_playlist ); + + /* don't loop by default: stop at playlist end */ + if( p_playlist->i_index == -1 ) + { + p_playlist->i_status = PLAYLIST_STOPPED; + } + else + { + input_thread_t *p_input; + + //p_playlist->i_mode = PLAYLIST_FORWARD + + // config_GetInt( p_playlist, "loop-playlist" ); + msg_Dbg( p_playlist, "creating new input thread" ); + p_input = input_CreateThread( p_playlist->p_this, + p_playlist->pp_items[p_playlist->i_index], NULL ); + if( p_input != NULL ) + { + /* Link current input */ + vlc_mutex_lock( &p_playlist->change_lock ); + p_playlist->p_input = p_input; + vlc_mutex_unlock( &p_playlist->change_lock ); + } + } + } + + msleep( INTF_IDLE_SLEEP ); + } + + /* If there is an input, kill it */ + while( p_playlist->p_input ) + { + if( p_playlist->p_input->i_status == THREAD_OVER ) + { + input_thread_t *p_input; + + /* Unlink current input */ + vlc_mutex_lock( &p_playlist->change_lock ); + p_input = p_playlist->p_input; + p_playlist->p_input = NULL; + vlc_mutex_unlock( &p_playlist->change_lock ); + + /* Destroy input */ + vlc_object_unlink_all( p_input ); + vlc_object_release( p_input ); + input_DestroyThread( p_input ); + } + else if( ( p_playlist->p_input->i_status == THREAD_READY + || p_playlist->p_input->i_status == THREAD_ERROR ) + && ( p_playlist->p_input->b_error + || p_playlist->p_input->b_eof ) ) + { + input_StopThread( p_playlist->p_input, NULL ); + } + else + { + p_playlist->p_input->b_eof = 1; + } + + msleep( INTF_IDLE_SLEEP ); + } +} + diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 85ada8f23e..7b6d02d2a5 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -5,7 +5,7 @@ * thread, and destroy a previously oppened video output thread. ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: video_output.c,v 1.180 2002/05/29 18:39:14 sam Exp $ + * $Id: video_output.c,v 1.181 2002/06/01 12:32:02 sam Exp $ * * Authors: Vincent Seguin * @@ -32,7 +32,7 @@ #include /* sprintf() */ #include /* strerror() */ -#include +#include #ifdef HAVE_SYS_TIMES_H # include @@ -44,85 +44,45 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -static int InitThread ( vout_thread_t *p_vout ); -static void RunThread ( vout_thread_t *p_vout ); -static void ErrorThread ( vout_thread_t *p_vout ); -static void EndThread ( vout_thread_t *p_vout ); -static void DestroyThread ( vout_thread_t *p_vout, int i_status ); +static int InitThread ( vout_thread_t * ); +static void RunThread ( vout_thread_t * ); +static void ErrorThread ( vout_thread_t * ); +static void EndThread ( vout_thread_t * ); +static void DestroyThread ( vout_thread_t * ); static int ReduceHeight ( int ); static int BinaryLog ( u32 ); static void MaskToShift ( int *, int *, u32 ); static void InitWindowSize ( vout_thread_t *, int *, int * ); -/***************************************************************************** - * vout_InitBank: initialize the video output bank. - *****************************************************************************/ -void vout_InitBank ( void ) -{ - p_vout_bank->i_count = 0; - - vlc_mutex_init( &p_vout_bank->lock ); -} - -/***************************************************************************** - * vout_EndBank: empty the video output bank. - ***************************************************************************** - * This function ends all unused video outputs and empties the bank in - * case of success. - *****************************************************************************/ -void vout_EndBank ( void ) -{ - /* Ask all remaining video outputs to die */ - while( p_vout_bank->i_count ) - { - vout_DestroyThread( - p_vout_bank->pp_vout[ --p_vout_bank->i_count ], NULL ); - } - - vlc_mutex_destroy( &p_vout_bank->lock ); -} - /***************************************************************************** * vout_CreateThread: creates a new video output thread ***************************************************************************** * This function creates a new video output thread, and returns a pointer * to its description. On error, it returns NULL. - * If pi_status is NULL, then the function will block until the thread is ready. - * If not, it will be updated using one of the THREAD_* constants. *****************************************************************************/ -vout_thread_t * vout_CreateThread ( int *pi_status, +vout_thread_t * vout_CreateThread ( vlc_object_t *p_parent, int i_width, int i_height, u32 i_chroma, int i_aspect ) { vout_thread_t * p_vout; /* thread descriptor */ - int i_status; /* thread status */ int i_index; /* loop variable */ char * psz_plugin; /* Allocate descriptor */ - p_vout = (vout_thread_t *) malloc( sizeof(vout_thread_t) ); + p_vout = vlc_object_create( p_parent, VLC_OBJECT_VOUT ); if( p_vout == NULL ) { - intf_ErrMsg( "vout error: vout thread creation returned %s", - strerror(ENOMEM) ); + msg_Err( p_parent, "out of memory" ); return( NULL ); } /* Choose the best module */ - if( !(psz_plugin = config_GetPszVariable( "filter" )) ) + if( !(psz_plugin = config_GetPsz( p_vout, "filter" )) ) { - psz_plugin = config_GetPszVariable( "vout" ); + psz_plugin = config_GetPsz( p_vout, "vout" ); } - /* Initialize thread properties - thread id and locks will be initialized - * later */ - p_vout->b_die = 0; - p_vout->b_error = 0; - p_vout->b_active = 0; - p_vout->pi_status = (pi_status != NULL) ? pi_status : &i_status; - *p_vout->pi_status = THREAD_CREATE; - /* Initialize pictures and subpictures - translation tables and functions * will be initialized later in InitThread */ for( i_index = 0; i_index < 2 * VOUT_MAX_PICTURES; i_index++) @@ -174,22 +134,24 @@ vout_thread_t * vout_CreateThread ( int *pi_status, p_vout->c_fps_samples= 0; /* user requested fullscreen? */ - if( config_GetIntVariable( "fullscreen" ) ) + if( config_GetInt( p_vout, "fullscreen" ) ) + { p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; + } /* Initialize the dimensions of the video window */ InitWindowSize( p_vout, &p_vout->i_window_width, &p_vout->i_window_height ); - p_vout->p_module - = module_Need( MODULE_CAPABILITY_VOUT, psz_plugin, (void *)p_vout ); + p_vout->p_module = module_Need( p_vout, MODULE_CAPABILITY_VOUT, + psz_plugin, (void *)p_vout ); if( psz_plugin ) free( psz_plugin ); if( p_vout->p_module == NULL ) { - intf_ErrMsg( "vout error: no suitable vout module" ); - free( p_vout ); + msg_Err( p_vout, "no suitable vout module" ); + vlc_object_destroy( p_vout ); return( NULL ); } @@ -204,35 +166,22 @@ vout_thread_t * vout_CreateThread ( int *pi_status, #undef f /* Create thread and set locks */ - vlc_mutex_init( &p_vout->picture_lock ); - vlc_mutex_init( &p_vout->subpicture_lock ); - vlc_mutex_init( &p_vout->change_lock ); + vlc_mutex_init( p_vout, &p_vout->picture_lock ); + vlc_mutex_init( p_vout, &p_vout->subpicture_lock ); + vlc_mutex_init( p_vout, &p_vout->change_lock ); - if( vlc_thread_create( &p_vout->thread_id, "video output", - (void *) RunThread, (void *) p_vout) ) + vlc_object_attach( p_vout, p_parent ); + + if( vlc_thread_create( p_vout, "video output", RunThread, 0 ) ) { - intf_ErrMsg("vout error: %s", strerror(ENOMEM)); + msg_Err( p_vout, "%s", strerror(ENOMEM) ); p_vout->pf_destroy( p_vout ); module_Unneed( p_vout->p_module ); - free( p_vout ); - return( NULL ); + vlc_object_destroy( p_vout ); + return NULL; } - /* If status is NULL, wait until the thread is created */ - if( pi_status == NULL ) - { - do - { - msleep( THREAD_SLEEP ); - }while( (i_status != THREAD_READY) && (i_status != THREAD_ERROR) - && (i_status != THREAD_FATAL) ); - if( i_status != THREAD_READY ) - { - return( NULL ); - } - } - - return( p_vout ); + return p_vout; } /***************************************************************************** @@ -243,21 +192,17 @@ vout_thread_t * vout_CreateThread ( int *pi_status, * is NULL, it will return once the thread is destroyed. Else, it will be * update using one of the THREAD_* constants. *****************************************************************************/ -void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status ) +void vout_DestroyThread( vout_thread_t *p_vout ) { - int i_status; /* thread status */ - - /* Set status */ - p_vout->pi_status = (pi_status != NULL) ? pi_status : &i_status; - *p_vout->pi_status = THREAD_DESTROY; + /* Unlink object */ + vlc_object_unlink_all( p_vout ); /* Request thread destruction */ p_vout->b_die = 1; - /* only if pi_status is NULL */ - vlc_thread_join( p_vout->thread_id ); + vlc_thread_join( p_vout ); /* Free structure */ - free( p_vout ); + vlc_object_destroy( p_vout ); } /***************************************************************************** @@ -333,9 +278,6 @@ static int InitThread( vout_thread_t *p_vout ) { int i, i_pgcd; - /* Update status */ - *p_vout->pi_status = THREAD_START; - vlc_mutex_lock( &p_vout->change_lock ); #ifdef STATS @@ -351,30 +293,28 @@ static int InitThread( vout_thread_t *p_vout ) if( !I_OUTPUTPICTURES ) { - intf_ErrMsg( "vout error: plugin was unable to allocate at least " - "one direct buffer" ); + msg_Err( p_vout, "plugin was unable to allocate at least " + "one direct buffer" ); p_vout->pf_end( p_vout ); vlc_mutex_unlock( &p_vout->change_lock ); return( 1 ); } - intf_WarnMsg( 1, "vout info: got %i direct buffer(s)", I_OUTPUTPICTURES ); + msg_Dbg( p_vout, "got %i direct buffer(s)", I_OUTPUTPICTURES ); i_pgcd = ReduceHeight( p_vout->render.i_aspect ); - intf_WarnMsg( 1, "vout info: picture in %ix%i, chroma 0x%.8x (%4.4s), " - "aspect ratio %i:%i", - p_vout->render.i_width, p_vout->render.i_height, - p_vout->render.i_chroma, (char*)&p_vout->render.i_chroma, - p_vout->render.i_aspect / i_pgcd, - VOUT_ASPECT_FACTOR / i_pgcd ); + msg_Dbg( p_vout, + "picture in %ix%i, chroma 0x%.8x (%4.4s), aspect ratio %i:%i", + p_vout->render.i_width, p_vout->render.i_height, + p_vout->render.i_chroma, (char*)&p_vout->render.i_chroma, + p_vout->render.i_aspect / i_pgcd, VOUT_ASPECT_FACTOR / i_pgcd ); i_pgcd = ReduceHeight( p_vout->output.i_aspect ); - intf_WarnMsg( 1, "vout info: picture out %ix%i, chroma 0x%.8x (%4.4s), " - "aspect ratio %i:%i", - p_vout->output.i_width, p_vout->output.i_height, - p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma, - p_vout->output.i_aspect / i_pgcd, - VOUT_ASPECT_FACTOR / i_pgcd ); + msg_Dbg( p_vout, + "picture out %ix%i, chroma 0x%.8x (%4.4s), aspect ratio %i:%i", + p_vout->output.i_width, p_vout->output.i_height, + p_vout->output.i_chroma, (char*)&p_vout->output.i_chroma, + p_vout->output.i_aspect / i_pgcd, VOUT_ASPECT_FACTOR / i_pgcd ); /* Calculate shifts from system-updated masks */ MaskToShift( &p_vout->output.i_lrshift, &p_vout->output.i_rrshift, @@ -397,9 +337,9 @@ static int InitThread( vout_thread_t *p_vout ) * for memcpy operations */ p_vout->b_direct = 1; - intf_WarnMsg( 2, "vout info: direct render, mapping " - "render pictures 0-%i to system pictures 1-%i", - VOUT_MAX_PICTURES - 2, VOUT_MAX_PICTURES - 1 ); + msg_Dbg( p_vout, "direct render, mapping " + "render pictures 0-%i to system pictures 1-%i", + VOUT_MAX_PICTURES - 2, VOUT_MAX_PICTURES - 1 ); for( i = 1; i < VOUT_MAX_PICTURES; i++ ) { @@ -415,13 +355,14 @@ static int InitThread( vout_thread_t *p_vout ) p_vout->b_direct = 0; /* Choose the best module */ - p_vout->chroma.p_module - = module_Need( MODULE_CAPABILITY_CHROMA, NULL, (void *)p_vout ); + p_vout->chroma.p_module = + module_Need( p_vout, MODULE_CAPABILITY_CHROMA, + NULL, (void *)p_vout ); if( p_vout->chroma.p_module == NULL ) { - intf_ErrMsg( "vout error: no chroma module for %4.4s to %4.4s", - &p_vout->render.i_chroma, &p_vout->output.i_chroma ); + msg_Err( p_vout, "no chroma module for %4.4s to %4.4s", + &p_vout->render.i_chroma, &p_vout->output.i_chroma ); p_vout->pf_end( p_vout ); vlc_mutex_unlock( &p_vout->change_lock ); return( 1 ); @@ -434,18 +375,17 @@ static int InitThread( vout_thread_t *p_vout ) if( I_OUTPUTPICTURES < 2 * VOUT_MAX_PICTURES ) { - intf_WarnMsg( 2, "vout info: indirect render, mapping " - "render pictures %i-%i to system pictures %i-%i", - I_OUTPUTPICTURES - 1, 2 * VOUT_MAX_PICTURES - 2, - I_OUTPUTPICTURES, 2 * VOUT_MAX_PICTURES - 1 ); + msg_Dbg( p_vout, "indirect render, mapping " + "render pictures %i-%i to system pictures %i-%i", + I_OUTPUTPICTURES - 1, 2 * VOUT_MAX_PICTURES - 2, + I_OUTPUTPICTURES, 2 * VOUT_MAX_PICTURES - 1 ); } else { - /* FIXME: if this happens, we don't have any render picture left */ - intf_WarnMsg( 2, "vout info: indirect render, no system " - "pictures needed, we have %i directbuffers", - I_OUTPUTPICTURES ); - intf_ErrMsg( "vout: this is a bug!\n"); + /* FIXME: if this happens, we don't have any render pictures left */ + msg_Dbg( p_vout, "indirect render, no system pictures needed," + " we have %i directbuffers", I_OUTPUTPICTURES ); + msg_Err( p_vout, "this is a bug!" ); } /* Append render buffers after the direct buffers */ @@ -467,10 +407,7 @@ static int InitThread( vout_thread_t *p_vout ) PP_OUTPUTPICTURE[ i ]->p_heap = &p_vout->output; } - /* Mark thread as running and return */ - p_vout->b_active = 1; - *p_vout->pi_status = THREAD_READY; - +/* XXX XXX mark thread ready */ return( 0 ); } @@ -503,7 +440,7 @@ static void RunThread( vout_thread_t *p_vout) /* Destroy thread structures allocated by Create and InitThread */ p_vout->pf_destroy( p_vout ); - DestroyThread( p_vout, THREAD_ERROR ); + DestroyThread( p_vout ); return; } @@ -521,8 +458,8 @@ static void RunThread( vout_thread_t *p_vout) p_vout->c_loops++; if( !(p_vout->c_loops % VOUT_STATS_NB_LOOPS) ) { - intf_Msg( "vout stats: picture heap: %d/%d", - I_RENDERPICTURES, p_vout->i_heap_size ); + msg_Dbg( p_vout, "picture heap: %d/%d", + I_RENDERPICTURES, p_vout->i_heap_size ); } #endif @@ -601,8 +538,8 @@ static void RunThread( vout_thread_t *p_vout) p_picture->i_status = DESTROYED_PICTURE; p_vout->i_heap_size--; } - intf_WarnMsg( 1, "vout warning: late picture skipped (%lld)", - current_date - display_date ); + msg_Warn( p_vout, "late picture skipped (%lld)", + current_date - display_date ); vlc_mutex_unlock( &p_vout->picture_lock ); continue; @@ -643,10 +580,10 @@ static void RunThread( vout_thread_t *p_vout) } else if( p_picture == p_last_picture ) { + /* We are asked to repeat the previous picture, but we first + * wait for a couple of idle loops */ if( i_idle_loops < 4 ) { - /* We are asked to repeat the previous picture, but we first - * wait for a couple of idle loops */ p_picture = NULL; display_date = 0; } @@ -753,7 +690,7 @@ static void RunThread( vout_thread_t *p_vout) I_OUTPUTPICTURES = 0; if( p_vout->pf_init( p_vout ) ) { - intf_ErrMsg( "vout error: cannot resize display" ); + msg_Err( p_vout, "cannot resize display" ); /* FixMe: p_vout->pf_end will be called again in EndThread() */ p_vout->b_error = 1; } @@ -780,7 +717,7 @@ static void RunThread( vout_thread_t *p_vout) p_vout->pf_destroy( p_vout ); /* Destroy thread structures allocated by CreateThread */ - DestroyThread( p_vout, THREAD_OVER ); + DestroyThread( p_vout ); } /***************************************************************************** @@ -810,16 +747,13 @@ static void EndThread( vout_thread_t *p_vout ) { int i_index; /* index in heap */ - /* Store status */ - *p_vout->pi_status = THREAD_END; - #ifdef STATS { struct tms cpu_usage; times( &cpu_usage ); - intf_Msg( "vout stats: cpu usage (user: %d, system: %d)", - cpu_usage.tms_utime, cpu_usage.tms_stime ); + msg_Dbg( p_vout, "cpu usage (user: %d, system: %d)", + cpu_usage.tms_utime, cpu_usage.tms_stime ); } #endif @@ -860,13 +794,8 @@ static void EndThread( vout_thread_t *p_vout ) * This function is called when the thread ends. It frees all ressources * allocated by CreateThread. Status is available at this stage. *****************************************************************************/ -static void DestroyThread( vout_thread_t *p_vout, int i_status ) +static void DestroyThread( vout_thread_t *p_vout ) { - int *pi_status; /* status adress */ - - /* Store status adress */ - pi_status = p_vout->pi_status; - /* Destroy the locks */ vlc_mutex_destroy( &p_vout->picture_lock ); vlc_mutex_destroy( &p_vout->subpicture_lock ); @@ -874,8 +803,6 @@ static void DestroyThread( vout_thread_t *p_vout, int i_status ) /* Release the module */ module_Unneed( p_vout->p_module ); - - *pi_status = i_status; } /* following functions are local */ @@ -925,16 +852,13 @@ static int BinaryLog(u32 i) { int i_log = 0; - if(i & 0xffff0000) i_log += 16; - if(i & 0xff00ff00) i_log += 8; - if(i & 0xf0f0f0f0) i_log += 4; - if(i & 0xcccccccc) i_log += 2; - if(i & 0xaaaaaaaa) i_log += 1; + if( i == 0 ) return -31337; - if (i != ((u32)1 << i_log)) - { - intf_ErrMsg( "vout error: binary log overflow for %i", i ); - } + if( i & 0xffff0000 ) i_log += 16; + if( i & 0xff00ff00 ) i_log += 8; + if( i & 0xf0f0f0f0 ) i_log += 4; + if( i & 0xcccccccc ) i_log += 2; + if( i & 0xaaaaaaaa ) i_log += 1; return( i_log ); } @@ -979,9 +903,9 @@ static void InitWindowSize( vout_thread_t *p_vout, int *pi_width, int i_width, i_height; double f_zoom; - i_width = config_GetIntVariable( "width" ); - i_height = config_GetIntVariable( "height" ); - f_zoom = config_GetFloatVariable( "zoom" ); + i_width = config_GetInt( p_vout, "width" ); + i_height = config_GetInt( p_vout, "height" ); + f_zoom = config_GetFloat( p_vout, "zoom" ); if( (i_width >= 0) && (i_height >= 0)) { diff --git a/src/video_output/video_text.c b/src/video_output/video_text.c index ee34bd7615..f5c414f43f 100644 --- a/src/video_output/video_text.c +++ b/src/video_output/video_text.c @@ -2,7 +2,7 @@ * video_text.c : text manipulation functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: video_text.c,v 1.34 2002/02/19 00:50:20 sam Exp $ + * $Id: video_text.c,v 1.35 2002/06/01 12:32:02 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -31,7 +31,7 @@ #include /* strerror() */ #include /* open() */ -#include +#include #ifdef HAVE_UNISTD_H # include /* read(), close() */ @@ -43,6 +43,8 @@ # include #endif +#include "video.h" +#include "video_output.h" #include "video_text.h" /***************************************************************************** @@ -55,7 +57,7 @@ * Therefore the border masks can't be complete if the font has pixels on the * border. *****************************************************************************/ -typedef struct vout_font_s +struct vout_font_s { int i_type; /* font type */ int i_width; /* character width in pixels */ @@ -66,7 +68,7 @@ typedef struct vout_font_s u16 i_first; /* first character */ u16 i_last; /* last character */ byte_t * p_data; /* font character data */ -} vout_font_t; +}; /* Font types */ #define VOUT_FIXED_FONT 0 /* simple fixed font */ @@ -209,7 +211,7 @@ static void PutByte32( u32 *p_pic, int i_byte, byte_t i_char, byte_t i_border, * This function will try to open a .psf font and load it. It will return * NULL on error. *****************************************************************************/ -vout_font_t *vout_LoadFont( const char *psz_name ) +vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name ) { static char * path[] = { "share", DATA_PATH, NULL, NULL }; @@ -262,15 +264,14 @@ vout_font_t *vout_LoadFont( const char *psz_name ) if( i_file == -1 ) { - intf_ErrMsg( "vout error: can't open file '%s' (%s)", - psz_name, strerror(errno) ); + msg_Err( p_vout, "cannot open '%s' (%s)", psz_name, strerror(errno) ); return( NULL ); } - /* Read magick number */ + /* Read magic number */ if( read( i_file, pi_buffer, 2 ) != 2 ) { - intf_ErrMsg("vout error: unexpected end of file '%s'", psz_name ); + msg_Err( p_vout, "unexpected end of file in '%s'", psz_name ); close( i_file ); return( NULL ); } @@ -279,8 +280,7 @@ vout_font_t *vout_LoadFont( const char *psz_name ) p_font = malloc( sizeof( vout_font_t ) ); if( p_font == NULL ) { - intf_ErrMsg( "vout error: cannot allocate vout_font_t (%s)", - strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); close( i_file ); return( NULL ); } @@ -297,7 +297,7 @@ vout_font_t *vout_LoadFont( const char *psz_name ) /* Read font header - two bytes indicate the font properties */ if( read( i_file, pi_buffer, 2 ) != 2) { - intf_ErrMsg( "vout error: unexpected end of file '%s'", psz_name ); + msg_Err( p_vout, "unexpected end of file in '%s'", psz_name ); free( p_font ); close( i_file ); return( NULL ); @@ -317,8 +317,7 @@ vout_font_t *vout_LoadFont( const char *psz_name ) p_font->p_data = malloc( 2 * 256 * pi_buffer[1] ); if( p_font->p_data == NULL ) { - intf_ErrMsg( "vout error: cannot allocate font space (%s)", - strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); free( p_font ); close( i_file ); return( NULL ); @@ -327,16 +326,16 @@ vout_font_t *vout_LoadFont( const char *psz_name ) /* Copy raw data */ if( read( i_file, p_font->p_data, 256 * pi_buffer[1] ) != 256 * pi_buffer[1] ) { - intf_ErrMsg("vout error: unexpected end of file '%s'", psz_name ); + msg_Err( p_vout, "unexpected end of file in '%s'", psz_name ); free( p_font->p_data ); free( p_font ); close( i_file ); return( NULL ); } - /* Computes border masks - remember that masks have the same matrix as - * characters, so an empty character border is required to have a complete - * border mask. */ + /* Compute border masks - remember that masks have the same matrix as + * characters, so an empty character border is required to have a + * complete border mask. */ for( i_char = 0; i_char <= 255; i_char++ ) { for( i_line = 0; i_line < pi_buffer[1]; i_line++ ) @@ -353,15 +352,15 @@ vout_font_t *vout_LoadFont( const char *psz_name ) break; default: - intf_ErrMsg("vout error: file '%s' has an unknown format", psz_name ); + msg_Err( p_vout, "file '%s' has an unknown format", psz_name ); free( p_font ); close( i_file ); return( NULL ); break; } - intf_ErrMsg( "loaded %s: type %d, %d-%dx%d", psz_name, p_font->i_type, - p_font->i_width, p_font->i_interspacing, p_font->i_height ); + msg_Err( p_vout, "loaded %s, type %d, %d-%dx%d", psz_name, p_font->i_type, + p_font->i_width, p_font->i_interspacing, p_font->i_height ); return( p_font ); } @@ -409,11 +408,6 @@ void vout_TextSize( vout_font_t *p_font, int i_style, const char *psz_text, int *pi_width = *pi_height / 3; } break; -#ifdef DEBUG - default: - intf_ErrMsg("error: unknown font type %d", p_font->i_type ); - break; -#endif } } @@ -524,14 +518,8 @@ void vout_Print( vout_font_t *p_font, byte_t *p_pic, int i_bytes_per_pixel, int /* Jump to next character */ p_pic += i_interspacing; break; -#ifdef DEBUG - default: - intf_ErrMsg("error: unknown font type %d", p_font->i_type ); - break; -#endif } } - } } diff --git a/src/video_output/video_text.h b/src/video_output/video_text.h index 405fffce0f..ee4ada7dd5 100644 --- a/src/video_output/video_text.h +++ b/src/video_output/video_text.h @@ -2,7 +2,7 @@ * video_text.h : text manipulation functions ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: video_text.h,v 1.7 2001/03/21 13:42:35 sam Exp $ + * $Id: video_text.h,v 1.8 2002/06/01 12:32:02 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -34,22 +34,12 @@ /***************************************************************************** * Prototypes *****************************************************************************/ -p_vout_font_t vout_LoadFont ( const char *psz_name ); -void vout_UnloadFont ( p_vout_font_t p_font ); -void vout_TextSize ( p_vout_font_t p_font, int i_style, +vout_font_t * vout_LoadFont ( vout_thread_t *, const char *psz_name ); +void vout_UnloadFont ( vout_font_t * ); +void vout_TextSize ( vout_font_t *p_font, int i_style, const char *psz_text, int *pi_width, int *pi_height ); -void vout_Print ( p_vout_font_t p_font, byte_t *p_pic, +void vout_Print ( vout_font_t *p_font, byte_t *p_pic, int i_bytes_per_pixel, int i_bytes_per_line, - u32 i_char_color, u32 i_border_color, u32 i_bg_color, - int i_style, const char *psz_text, int i_percent ); - - - - - - - - - + u32, u32, u32, int, const char *, int ); diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c index 3340371539..852214c3b4 100644 --- a/src/video_output/vout_pictures.c +++ b/src/video_output/vout_pictures.c @@ -2,7 +2,7 @@ * vout_pictures.c : picture management functions ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: vout_pictures.c,v 1.26 2002/05/28 18:34:42 stef Exp $ + * $Id: vout_pictures.c,v 1.27 2002/06/01 12:32:02 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -30,7 +30,7 @@ #include /* sprintf() */ #include /* strerror() */ -#include +#include #include "video.h" #include "video_output.h" @@ -38,7 +38,7 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest ); +static void vout_CopyPicture( vout_thread_t *, picture_t *, picture_t * ); /***************************************************************************** * vout_DisplayPicture: display a picture @@ -59,8 +59,8 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic ) p_pic->i_status = READY_PICTURE; break; default: - intf_ErrMsg( "error: picture %p has invalid status %d", - p_pic, p_pic->i_status ); + msg_Err( p_vout, "picture to display %p has invalid status %d", + p_pic, p_pic->i_status ); break; } @@ -88,8 +88,8 @@ void vout_DatePicture( vout_thread_t *p_vout, p_pic->i_status = READY_PICTURE; break; default: - intf_ErrMsg( "error: picture %p has invalid status %d", - p_pic, p_pic->i_status ); + msg_Err( p_vout, "picture to date %p has invalid status %d", + p_pic, p_pic->i_status ); break; } @@ -105,9 +105,9 @@ void vout_DatePicture( vout_thread_t *p_vout, * since several pictures can be created by several producers threads. *****************************************************************************/ picture_t *vout_CreatePicture( vout_thread_t *p_vout, - boolean_t b_progressive, - boolean_t b_top_field_first, - boolean_t b_repeat_first_field ) + vlc_bool_t b_progressive, + vlc_bool_t b_top_field_first, + vlc_bool_t b_repeat_first_field ) { int i_pic; /* picture index */ picture_t * p_pic; @@ -167,7 +167,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, */ if( p_freepic != NULL ) { - vout_AllocatePicture( p_freepic, + vout_AllocatePicture( p_vout, p_freepic, p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma ); @@ -194,7 +194,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, p_freepic->i_status = FREE_PICTURE; p_freepic = NULL; - intf_ErrMsg( "vout error: picture allocation failed" ); + msg_Err( p_vout, "picture allocation failed" ); } vlc_mutex_unlock( &p_vout->picture_lock ); @@ -226,8 +226,8 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic ) (p_pic->i_status != RESERVED_DATED_PICTURE) && (p_pic->i_status != RESERVED_DISP_PICTURE) ) { - intf_ErrMsg( "error: picture %p has invalid status %d", - p_pic, p_pic->i_status ); + msg_Err( p_vout, "picture to destroy %p has invalid status %d", + p_pic, p_pic->i_status ); } #endif @@ -262,7 +262,7 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) if( p_pic->i_refcount < 0 ) { - intf_ErrMsg( "vout error: picture refcount is %i", p_pic->i_refcount ); + msg_Err( p_vout, "picture refcount is %i", p_pic->i_refcount ); p_pic->i_refcount = 0; } @@ -305,7 +305,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic, /* We have subtitles. First copy the picture to * the spare direct buffer, then render the * subtitles. */ - vout_CopyPicture( p_pic, PP_OUTPUTPICTURE[0] ); + vout_CopyPicture( p_vout, p_pic, PP_OUTPUTPICTURE[0] ); vout_RenderSubPictures( p_vout, PP_OUTPUTPICTURE[0], p_subpic ); @@ -333,7 +333,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic, /* Picture is not in a direct buffer, but is exactly the * same size as the direct buffers. A memcpy() is enough, * then render the subtitles. */ - vout_CopyPicture( p_pic, PP_OUTPUTPICTURE[0] ); + vout_CopyPicture( p_vout, p_pic, PP_OUTPUTPICTURE[0] ); vout_RenderSubPictures( p_vout, PP_OUTPUTPICTURE[0], p_subpic ); @@ -413,7 +413,7 @@ void vout_PlacePicture( vout_thread_t *p_vout, int i_width, int i_height, * used exactly like a video buffer. The video output thread then manages * how it gets displayed. *****************************************************************************/ -void vout_AllocatePicture( picture_t *p_pic, +void vout_AllocatePicture( vout_thread_t *p_vout, picture_t *p_pic, int i_width, int i_height, u32 i_chroma ) { int i_bytes, i_index; @@ -523,8 +523,8 @@ void vout_AllocatePicture( picture_t *p_pic, break; default: - intf_ErrMsg( "vout error: unknown chroma type 0x%.8x (%4.4s)", - i_chroma, (char*)&i_chroma ); + msg_Err( p_vout, "unknown chroma type 0x%.8x (%4.4s)", + i_chroma, (char*)&i_chroma ); p_pic->i_planes = 0; return; } @@ -563,7 +563,8 @@ void vout_AllocatePicture( picture_t *p_pic, * number of calls to memcpy() to the minimum. Source and destination * images must have same width, height, and chroma. *****************************************************************************/ -static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest ) +static void vout_CopyPicture( vout_thread_t * p_vout, + picture_t *p_src, picture_t *p_dest ) { int i; @@ -577,7 +578,8 @@ static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest ) if( p_dest->p[i].b_hidden ) { /* There are margins, but they are hidden : perfect ! */ - FAST_MEMCPY( p_dest->p[i].p_pixels, p_src->p[i].p_pixels, + p_vout->p_vlc->pf_memcpy( + p_dest->p[i].p_pixels, p_src->p[i].p_pixels, p_src->p[i].i_pitch * p_src->p[i].i_lines ); continue; } @@ -589,8 +591,9 @@ static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest ) else { /* Same pitch, no margins : perfect ! */ - FAST_MEMCPY( p_dest->p[i].p_pixels, p_src->p[i].p_pixels, - p_src->p[i].i_pitch * p_src->p[i].i_lines ); + p_vout->p_vlc->pf_memcpy( + p_dest->p[i].p_pixels, p_src->p[i].p_pixels, + p_src->p[i].i_pitch * p_src->p[i].i_lines ); continue; } } @@ -606,7 +609,8 @@ static void vout_CopyPicture( picture_t *p_src, picture_t *p_dest ) for( i_line = p_src->p[i].i_lines; i_line--; ) { - FAST_MEMCPY( p_out, p_in, p_src->p[i].i_visible_bytes ); + p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_src->p[i].i_visible_bytes ); p_in += p_src->p[i].i_pitch; p_out += p_dest->p[i].i_pitch; } diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 0e9cebd32b..45e76bc9c7 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -2,7 +2,7 @@ * vout_subpictures.c : subpicture management functions ***************************************************************************** * Copyright (C) 2000 VideoLAN - * $Id: vout_subpictures.c,v 1.13 2002/04/25 21:52:42 sam Exp $ + * $Id: vout_subpictures.c,v 1.14 2002/06/01 12:32:02 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -30,7 +30,7 @@ #include /* sprintf() */ #include /* strerror() */ -#include +#include #include "video.h" #include "video_output.h" @@ -48,13 +48,13 @@ void vout_DisplaySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic ) /* Check if status is valid */ if( p_subpic->i_status != RESERVED_SUBPICTURE ) { - intf_ErrMsg( "vout error: subpicture %p has invalid status #%d", - p_subpic, p_subpic->i_status ); + msg_Err( p_vout, "subpicture %p has invalid status #%d", + p_subpic, p_subpic->i_status ); } /* If the user requested an SPU margin, we force the position after * having checked that it was a valid value. */ - i_margin = config_GetIntVariable( "spumargin" ); + i_margin = config_GetInt( p_vout, "spumargin" ); if( i_margin >= 0 ) { @@ -133,7 +133,7 @@ subpicture_t *vout_CreateSubPicture( vout_thread_t *p_vout, int i_type, /* If no free or destroyed subpicture could be found */ if( p_free_subpic == NULL ) { - intf_ErrMsg( "vout error: subpicture heap is full" ); + msg_Err( p_vout, "subpicture heap is full" ); vlc_mutex_unlock( &p_vout->subpicture_lock ); return( NULL ); } @@ -155,11 +155,10 @@ subpicture_t *vout_CreateSubPicture( vout_thread_t *p_vout, int i_type, else { /* Memory allocation failed : set subpicture as empty */ + msg_Err( p_vout, "out of memory" ); p_free_subpic->i_type = EMPTY_SUBPICTURE; p_free_subpic->i_status = FREE_SUBPICTURE; p_free_subpic = NULL; - intf_ErrMsg( "vout error: spu allocation returned %s", - strerror( ENOMEM ) ); } vlc_mutex_unlock( &p_vout->subpicture_lock ); @@ -181,8 +180,8 @@ void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic ) if( ( p_subpic->i_status != RESERVED_SUBPICTURE ) && ( p_subpic->i_status != READY_SUBPICTURE ) ) { - intf_ErrMsg( "vout error: subpicture %p has invalid status %d", - p_subpic, p_subpic->i_status ); + msg_Err( p_vout, "subpicture %p has invalid status %d", + p_subpic, p_subpic->i_status ); } p_subpic->i_status = DESTROYED_SUBPICTURE; diff --git a/src/vlc.c b/src/vlc.c new file mode 100644 index 0000000000..dfdc2bb128 --- /dev/null +++ b/src/vlc.c @@ -0,0 +1,95 @@ +/***************************************************************************** + * vlc.c: the vlc player + ***************************************************************************** + * Copyright (C) 1998-2001 VideoLAN + * $Id: vlc.c,v 1.1 2002/06/01 12:32:01 sam Exp $ + * + * Authors: Vincent Seguin + * Samuel Hocevar + * Gildas Bazin + * + * 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 /* SIGHUP, SIGINT, SIGKILL */ +#include /* fprintf() */ +#include /* putenv(), strtol(), */ + +#include + +/***************************************************************************** + * main: parse command line, start interface and spawn threads + *****************************************************************************/ +int main(int i_argc, char *ppsz_argv[], char *ppsz_env[]) +{ + vlc_t *p_vlc; + vlc_error_t err; + +#ifdef SYS_LINUX +# ifdef DEBUG + /* Activate malloc checking routines to detect heap corruptions. */ + putenv( "MALLOC_CHECK_=2" ); + + /* Disable the ugly Gnome crash dialog so that we properly segfault */ + putenv( "GNOME_DISABLE_CRASH_DIALOG=1" ); +# endif +#endif + + /* Create the vlc structure */ + p_vlc = vlc_create(); + if( p_vlc == NULL ) + { + return -1; + } + + /* Initialize vlc */ + err = vlc_init( p_vlc, i_argc, ppsz_argv ); + if( err != VLC_SUCCESS ) + { + vlc_destroy( p_vlc ); + return err; + } + + //vlc_add( p_vlc, "/home/sam/videolan/streams/mpeg/axe.mpeg" ); + + /* Run vlc, in non-blocking mode */ + err = vlc_run( p_vlc ); + + /* Add background interfaces */ + //{ int i; for( i=10; i--; ) vlc_add_intf( p_vlc, "dummy", 0 ); } + vlc_add_intf( p_vlc, "dummy", VLC_FALSE ); + vlc_add_intf( p_vlc, "logger", VLC_FALSE ); + vlc_add_intf( p_vlc, "rc", VLC_FALSE ); + + /* Add a blocking interface */ + err = vlc_add_intf( p_vlc, NULL, VLC_TRUE ); + if( err != VLC_SUCCESS ) + { + vlc_end( p_vlc ); + vlc_destroy( p_vlc ); + return err; + } + + /* Finish the interface */ + vlc_stop( p_vlc ); + + /* Finish all threads */ + vlc_end( p_vlc ); + + /* Destroy the vlc structure */ + vlc_destroy( p_vlc ); + + return 0; +} + diff --git a/vlc.spec b/vlc.spec index 3ddbe2af0a..9c8ae47efe 100644 --- a/vlc.spec +++ b/vlc.spec @@ -245,21 +245,21 @@ EOF # icons mkdir -p %{buildroot}/{%{_miconsdir},%{_liconsdir}} -install -m 644 %buildroot/%_datadir/videolan/vlc16x16.png %buildroot/%{_miconsdir}/vlc.png -install -m 644 %buildroot/%_datadir/videolan/vlc32x32.png %buildroot/%{_iconsdir}/vlc.png -install -m 644 %buildroot/%_datadir/videolan/vlc48x48.png %buildroot/%{_liconsdir}/vlc.png -install -m 644 %buildroot/%_datadir/videolan/gnome-vlc16x16.png %buildroot/%{_miconsdir}/gnome-vlc.png -install -m 644 %buildroot/%_datadir/videolan/gnome-vlc32x32.png %buildroot/%{_iconsdir}/gnome-vlc.png -install -m 644 %buildroot/%_datadir/videolan/gnome-vlc48x48.png %buildroot/%{_liconsdir}/gnome-vlc.png -install -m 644 %buildroot/%_datadir/videolan/gvlc16x16.png %buildroot/%{_miconsdir}/gvlc.png -install -m 644 %buildroot/%_datadir/videolan/gvlc32x32.png %buildroot/%{_iconsdir}/gvlc.png -install -m 644 %buildroot/%_datadir/videolan/gvlc48x48.png %buildroot/%{_liconsdir}/gvlc.png -install -m 644 %buildroot/%_datadir/videolan/kvlc16x16.png %buildroot/%{_miconsdir}/kvlc.png -install -m 644 %buildroot/%_datadir/videolan/kvlc32x32.png %buildroot/%{_iconsdir}/kvlc.png -install -m 644 %buildroot/%_datadir/videolan/kvlc48x48.png %buildroot/%{_liconsdir}/kvlc.png -install -m 644 %buildroot/%_datadir/videolan/qvlc16x16.png %buildroot/%{_miconsdir}/qvlc.png -install -m 644 %buildroot/%_datadir/videolan/qvlc32x32.png %buildroot/%{_iconsdir}/qvlc.png -install -m 644 %buildroot/%_datadir/videolan/qvlc48x48.png %buildroot/%{_liconsdir}/qvlc.png +install -m 644 %buildroot/%_datadir/vlc/vlc16x16.png %buildroot/%{_miconsdir}/vlc.png +install -m 644 %buildroot/%_datadir/vlc/vlc32x32.png %buildroot/%{_iconsdir}/vlc.png +install -m 644 %buildroot/%_datadir/vlc/vlc48x48.png %buildroot/%{_liconsdir}/vlc.png +install -m 644 %buildroot/%_datadir/vlc/gnome-vlc16x16.png %buildroot/%{_miconsdir}/gnome-vlc.png +install -m 644 %buildroot/%_datadir/vlc/gnome-vlc32x32.png %buildroot/%{_iconsdir}/gnome-vlc.png +install -m 644 %buildroot/%_datadir/vlc/gnome-vlc48x48.png %buildroot/%{_liconsdir}/gnome-vlc.png +install -m 644 %buildroot/%_datadir/vlc/gvlc16x16.png %buildroot/%{_miconsdir}/gvlc.png +install -m 644 %buildroot/%_datadir/vlc/gvlc32x32.png %buildroot/%{_iconsdir}/gvlc.png +install -m 644 %buildroot/%_datadir/vlc/gvlc48x48.png %buildroot/%{_liconsdir}/gvlc.png +install -m 644 %buildroot/%_datadir/vlc/kvlc16x16.png %buildroot/%{_miconsdir}/kvlc.png +install -m 644 %buildroot/%_datadir/vlc/kvlc32x32.png %buildroot/%{_iconsdir}/kvlc.png +install -m 644 %buildroot/%_datadir/vlc/kvlc48x48.png %buildroot/%{_liconsdir}/kvlc.png +install -m 644 %buildroot/%_datadir/vlc/qvlc16x16.png %buildroot/%{_miconsdir}/qvlc.png +install -m 644 %buildroot/%_datadir/vlc/qvlc32x32.png %buildroot/%{_iconsdir}/qvlc.png +install -m 644 %buildroot/%_datadir/vlc/qvlc48x48.png %buildroot/%{_liconsdir}/qvlc.png %post %update_menus @@ -274,37 +274,37 @@ rm -fr %buildroot %doc README COPYING %{_bindir}/vlc -%dir %{_libdir}/videolan/vlc -%{_libdir}/videolan/vlc/ac3_spdif.so -%{_libdir}/videolan/vlc/avi.so -%{_libdir}/videolan/vlc/dsp.so -%{_libdir}/videolan/vlc/dummy.so -%{_libdir}/videolan/vlc/dvd.so -%{_libdir}/videolan/vlc/fb.so -%{_libdir}/videolan/vlc/file.so -%{_libdir}/videolan/vlc/filter_deinterlace.so -%{_libdir}/videolan/vlc/filter_distort.so -%{_libdir}/videolan/vlc/filter_invert.so -%{_libdir}/videolan/vlc/filter_transform.so -%{_libdir}/videolan/vlc/filter_wall.so -%{_libdir}/videolan/vlc/fx_scope.so -%{_libdir}/videolan/vlc/http.so -%{_libdir}/videolan/vlc/ipv4.so -%{_libdir}/videolan/vlc/ipv6.so -%{_libdir}/videolan/vlc/logger.so -%{_libdir}/videolan/vlc/lpcm_adec.so -%{_libdir}/videolan/vlc/memcpy.so -%{_libdir}/videolan/vlc/mga.so -%{_libdir}/videolan/vlc/mpeg_es.so -%{_libdir}/videolan/vlc/mpeg_ps.so -%{_libdir}/videolan/vlc/mpeg_ts.so -%{_libdir}/videolan/vlc/null.so -%{_libdir}/videolan/vlc/rc.so -%{_libdir}/videolan/vlc/spudec.so -%{_libdir}/videolan/vlc/udp.so -%{_libdir}/videolan/vlc/vcd.so -%{_libdir}/videolan/vlc/x11.so -#%{_libdir}/videolan/vlc/xmga.so +%dir %{_libdir}/vlc +%{_libdir}/vlc/ac3_spdif.so +%{_libdir}/vlc/avi.so +%{_libdir}/vlc/dsp.so +%{_libdir}/vlc/dummy.so +%{_libdir}/vlc/dvd.so +%{_libdir}/vlc/fb.so +%{_libdir}/vlc/file.so +%{_libdir}/vlc/filter_deinterlace.so +%{_libdir}/vlc/filter_distort.so +%{_libdir}/vlc/filter_invert.so +%{_libdir}/vlc/filter_transform.so +%{_libdir}/vlc/filter_wall.so +%{_libdir}/vlc/fx_scope.so +%{_libdir}/vlc/http.so +%{_libdir}/vlc/ipv4.so +%{_libdir}/vlc/ipv6.so +%{_libdir}/vlc/logger.so +%{_libdir}/vlc/lpcm_adec.so +%{_libdir}/vlc/memcpy.so +%{_libdir}/vlc/mga.so +%{_libdir}/vlc/mpeg_es.so +%{_libdir}/vlc/mpeg_ps.so +%{_libdir}/vlc/mpeg_ts.so +%{_libdir}/vlc/null.so +%{_libdir}/vlc/rc.so +%{_libdir}/vlc/spudec.so +%{_libdir}/vlc/udp.so +%{_libdir}/vlc/vcd.so +%{_libdir}/vlc/x11.so +#%{_libdir}/vlc/xmga.so %{_mandir}/man1/* %{_menudir}/vlc @@ -317,7 +317,7 @@ rm -fr %buildroot %files gtk %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/gtk.so +%{_libdir}/vlc/gtk.so %{_bindir}/gvlc %{_menudir}/vlc-gtk %{_miconsdir}/gvlc.png @@ -331,7 +331,7 @@ rm -fr %buildroot %files gnome %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/gnome.so +%{_libdir}/vlc/gnome.so %{_bindir}/gnome-vlc %{_menudir}/vlc-gnome %{_miconsdir}/gnome-vlc.png @@ -346,7 +346,7 @@ rm -fr %buildroot %files qt %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/qt.so +%{_libdir}/vlc/qt.so %{_bindir}/qvlc %{_menudir}/vlc-qt %{_miconsdir}/qvlc.png @@ -361,52 +361,52 @@ rm -fr %buildroot %files ncurses %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/ncurses.so +%{_libdir}/vlc/ncurses.so %if %plugin_lirc %files lirc %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/lirc.so +%{_libdir}/vlc/lirc.so %endif # video plugins %files sdl %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/sdl.so +%{_libdir}/vlc/sdl.so %files ggi %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/ggi.so +%{_libdir}/vlc/ggi.so %files aa %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/aa.so +%{_libdir}/vlc/aa.so # codec plugin %files mad %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/mad.so +%{_libdir}/vlc/mad.so #audio plugins %files esd %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/esd.so +%{_libdir}/vlc/esd.so %files arts %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/arts.so +%{_libdir}/vlc/arts.so %files alsa %defattr(-,root,root) %doc README -%{_libdir}/videolan/vlc/alsa.so +%{_libdir}/vlc/alsa.so %changelog * Thu May 23 2002 Yves Duret 0.4.0-1mdk