]> git.sesse.net Git - vlc/commitdiff
Some heavy changes today:
authorSam Hocevar <sam@videolan.org>
Sun, 30 Dec 2001 07:09:56 +0000 (07:09 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 30 Dec 2001 07:09:56 +0000 (07:09 +0000)
  * Removed duplicate function checks from configure.in.
  * Added extra magic to Makefile.modules so that the module Makefiles
    are now ridiculously simple. And I mean *simple*. Check it! This will
    make a possible switch to full autoconf/automake a lot easier.
  * Added the vlc version name to the plugin symbols, to be sure we only load
    plugins with the same version number. A nasty consequence is that you
    need to rebuild your tree after midnight if you are using a CVS tree :-)
  * Got rid of modules_export.h by #defining exported functions in the same
    header as their prototype.
  * Added modules_inner.h and other commonly used .h files to common.h so
    there are less and less files to include, and renamed common.h to
    <videolan/vlc.h>.
  * First modifications to the module handling system towards my ultimate
    goal to get rid of the *_Probe functions. Got rid of TestMethod and
    TestCPU, as well as src/misc/tests.c.
  * Wrote the chroma plugin handling functions. No YUV functions have been
    ported yet because it'ls a lot of work, but the core system works, I
    tried it with a naive yv12->rgb16 plugin (which will disappear when the
    real functions are ready).
  * Made a lot of functions in dvd_summary.c one-liners to avoid wasting
    too many output lines.
  * Fixed a segfault in input_dvd.c:DVDInit.
  * Added a fixfiles.sh script in plugins/gtk to be run after Glade has
    generated its C files.
  * Did some work on the KDE interface to make it suck a bit less. It still
    segfaults, but at least it runs and it looks less ugly.
  * RGB SDL rendering works again, though in 16bpp only.
  * Made plugins/vcd/linux_cdrom_tools.c independent of any vlc structure
    so that it'll be easily put in a library. Maybe libdvdcss?
  * Fixed VCD date display.
  * Merged vout_xvideo.c, vout_x11.c and vout_common.c into xcommon.c.
  * Wrote non-Shm XVideo output.
  * Made X11 output work again. Still pretty unstable, only works for 16bpp.
  * Additional french translation in po/fr.po. Any taker for the rest?
  * Fixed a segfault in video_output.c when the allocated pictures were
    not direct buffers.
  * If $DISPLAY isn't set, don't try to run the Gtk+ interface.
  * Replaced 48x48 .xpm images with 32x32 ones to conform to Debian policy
    (Closes Debian bug #126939).
  * Removed the automatic ./configure launch when running `make all' for
    the first time.

Stuff currently more broken than it ought to be:
  * The wall filter. Being fixed.
  * x11 and sdl plugins for depth != 16bpp.
  * Software YUV.
  * gvlc, gnome-vlc, kvlc shortcuts. Use --intf instead for the moment.

320 files changed:
Makefile
Makefile.dep
Makefile.modules
Makefile.opts.in
acconfig.h
configure
configure.in
extras/libdvdcss/Makefile
extras/libdvdcss/css.c
extras/libdvdcss/ioctl.c
extras/libdvdcss/libdvdcss.c
extras/libdvdread/Makefile
include/audio_output.h
include/config.h.in
include/defs.h.in
include/input_ext-dec.h
include/input_ext-intf.h
include/input_ext-plugins.h
include/interface.h
include/intf_msg.h
include/intf_playlist.h
include/iso_lang.h
include/main.h
include/modules.h
include/modules_export.h [deleted file]
include/modules_inner.h
include/mtime.h
include/netutils.h
include/threads.h
include/video.h
include/video_output.h
include/videolan/vlc.h [moved from include/common.h with 95% similarity]
plugins/ac3_adec/.cvsignore
plugins/ac3_adec/Makefile
plugins/ac3_adec/ac3_adec.c
plugins/ac3_adec/ac3_bit_allocate.c
plugins/ac3_adec/ac3_decoder.c
plugins/ac3_adec/ac3_exponent.c
plugins/ac3_adec/ac3_imdct.c
plugins/ac3_adec/ac3_mantissa.c
plugins/ac3_adec/ac3_parse.c
plugins/ac3_adec/ac3_rematrix.c
plugins/ac3_spdif/.cvsignore
plugins/ac3_spdif/Makefile
plugins/ac3_spdif/ac3_iec958.c
plugins/ac3_spdif/ac3_spdif.c
plugins/alsa/.cvsignore
plugins/alsa/Makefile
plugins/alsa/alsa.c
plugins/alsa/aout_alsa.c
plugins/arts/.cvsignore
plugins/arts/Makefile
plugins/arts/aout_arts.c
plugins/arts/arts.c
plugins/beos/.cvsignore
plugins/beos/InterfaceWindow.cpp
plugins/beos/Makefile
plugins/beos/MediaControlView.cpp
plugins/beos/PlayListWindow.cpp
plugins/beos/aout_beos.cpp
plugins/beos/beos.cpp
plugins/beos/intf_beos.cpp
plugins/beos/vout_beos.cpp
plugins/chroma/.cvsignore
plugins/chroma/Makefile
plugins/chroma/common.c
plugins/chroma/yv12_rgb16.c [new file with mode: 0644]
plugins/chroma/yv12_rgb8.c
plugins/directx/.cvsignore
plugins/directx/Makefile
plugins/directx/aout_directx.c
plugins/directx/directx.c
plugins/directx/vout_directx.c
plugins/directx/vout_events.c
plugins/downmix/.cvsignore
plugins/downmix/Makefile
plugins/downmix/ac3_downmix_3dn.c
plugins/downmix/ac3_downmix_c.c
plugins/downmix/ac3_downmix_sse.c
plugins/downmix/downmix.c
plugins/downmix/downmix3dn.c
plugins/downmix/downmixsse.c
plugins/dsp/.cvsignore
plugins/dsp/Makefile
plugins/dsp/aout_dsp.c
plugins/dsp/dsp.c
plugins/dummy/.cvsignore
plugins/dummy/Makefile
plugins/dummy/aout_dummy.c
plugins/dummy/dummy.c
plugins/dummy/input_dummy.c
plugins/dummy/intf_dummy.c
plugins/dummy/null.c
plugins/dummy/vout_dummy.c
plugins/dvd/.cvsignore
plugins/dvd/Makefile
plugins/dvd/dummy_dvdcss.c
plugins/dvd/dvd.c
plugins/dvd/dvd_ifo.c
plugins/dvd/dvd_summary.c
plugins/dvd/dvd_udf.c
plugins/dvd/input_dvd.c
plugins/dvdread/.cvsignore
plugins/dvdread/Makefile
plugins/dvdread/dvdread.c
plugins/dvdread/input_dvdread.c
plugins/esd/.cvsignore
plugins/esd/Makefile
plugins/esd/aout_esd.c
plugins/esd/esd.c
plugins/fb/.cvsignore
plugins/fb/Makefile
plugins/fb/fb.c
plugins/fb/vout_fb.c
plugins/filter/.cvsignore
plugins/filter/Makefile
plugins/filter/deinterlace.c [moved from plugins/filter/bob.c with 62% similarity]
plugins/filter/distort.c
plugins/filter/invert.c
plugins/filter/transform.c
plugins/filter/wall.c
plugins/ggi/.cvsignore
plugins/ggi/Makefile
plugins/ggi/ggi.c
plugins/ggi/vout_ggi.c
plugins/glide/.cvsignore
plugins/glide/Makefile
plugins/glide/glide.c
plugins/glide/vout_glide.c
plugins/gtk/.cvsignore
plugins/gtk/Makefile
plugins/gtk/fixfiles.sh [new file with mode: 0755]
plugins/gtk/gnome.c
plugins/gtk/gnome.glade [moved from plugins/gtk/intf_gnome.glade with 87% similarity]
plugins/gtk/gnome_interface.c
plugins/gtk/gnome_interface.h
plugins/gtk/gtk.c
plugins/gtk/gtk.glade [moved from plugins/gtk/intf_gtk.glade with 100% similarity]
plugins/gtk/gtk_callbacks.c
plugins/gtk/gtk_common.h [moved from plugins/gtk/intf_gtk.h with 94% similarity]
plugins/gtk/gtk_control.c
plugins/gtk/gtk_display.c
plugins/gtk/gtk_interface.c
plugins/gtk/gtk_menu.c
plugins/gtk/gtk_modules.c
plugins/gtk/gtk_open.c
plugins/gtk/gtk_playlist.c
plugins/gtk/gtk_preferences.c
plugins/gtk/intf_gnome.c [deleted file]
plugins/gtk/intf_gtk.c [deleted file]
plugins/idct/.cvsignore
plugins/idct/Makefile
plugins/idct/idct.c
plugins/idct/idctaltivec.c
plugins/idct/idctclassic.c
plugins/idct/idctmmx.c
plugins/idct/idctmmxext.c
plugins/imdct/.cvsignore
plugins/imdct/Makefile
plugins/imdct/ac3_imdct_3dn.c
plugins/imdct/ac3_imdct_c.c
plugins/imdct/ac3_imdct_common.c
plugins/imdct/ac3_imdct_sse.c
plugins/imdct/ac3_srfft_3dn.c
plugins/imdct/ac3_srfft_c.c
plugins/imdct/ac3_srfft_sse.c
plugins/imdct/imdct.c
plugins/imdct/imdct3dn.c
plugins/imdct/imdctsse.c
plugins/kde/.cvsignore
plugins/kde/Makefile
plugins/kde/kde.cpp
plugins/kde/kde_common.h [moved from plugins/kde/intf_plugin.h with 70% similarity]
plugins/kde/kde_disc.cpp [moved from plugins/kde/kdiskdialog.cpp with 96% similarity]
plugins/kde/kde_disc.h [moved from plugins/kde/kdiskdialog.h with 89% similarity]
plugins/kde/kde_interface.cpp [new file with mode: 0644]
plugins/kde/kde_interface.h [new file with mode: 0644]
plugins/kde/kde_menu.cpp [new file with mode: 0644]
plugins/kde/kde_menu.h [moved from plugins/kde/ktitlemenu.h with 82% similarity]
plugins/kde/kde_net.cpp [moved from plugins/kde/knetdialog.cpp with 95% similarity]
plugins/kde/kde_net.h [moved from plugins/kde/knetdialog.h with 87% similarity]
plugins/kde/kde_slider.cpp [moved from plugins/kde/kvlcslider.cpp with 57% similarity]
plugins/kde/kde_slider.h [moved from plugins/kde/kvlcslider.h with 91% similarity]
plugins/kde/kde_ui.rc [new file with mode: 0644]
plugins/kde/kdeinterface.cpp [deleted file]
plugins/kde/kdeinterface.h [deleted file]
plugins/kde/kinterfacemain.cpp [deleted file]
plugins/kde/kinterfacemain.h [deleted file]
plugins/kde/ktitlemenu.cpp [deleted file]
plugins/kde/kvlcui.rc [deleted file]
plugins/lpcm_adec/.cvsignore
plugins/lpcm_adec/Makefile
plugins/lpcm_adec/lpcm_adec.c
plugins/macosx/.cvsignore
plugins/macosx/Makefile
plugins/macosx/aout_macosx.c
plugins/macosx/intf_main.c
plugins/macosx/intf_vlc_wrapper.c
plugins/macosx/macosx.c
plugins/macosx/vout_macosx.c
plugins/mad/.cvsignore
plugins/mad/Makefile
plugins/mad/mad_adec.c
plugins/mad/mad_libmad.c
plugins/memcpy/.cvsignore
plugins/memcpy/Makefile
plugins/memcpy/memcpy.c
plugins/memcpy/memcpy3dn.c
plugins/memcpy/memcpymmx.c
plugins/memcpy/memcpymmxext.c
plugins/mga/.cvsignore
plugins/mga/Makefile
plugins/mga/mga.c
plugins/mga/vout_mga.c
plugins/motion/.cvsignore
plugins/motion/Makefile
plugins/motion/motion.c
plugins/motion/motion3dnow.c
plugins/motion/motionaltivec.c
plugins/motion/motionmmx.c
plugins/motion/motionmmxext.c
plugins/mpeg_adec/.cvsignore
plugins/mpeg_adec/Makefile
plugins/mpeg_adec/adec_layer1.c
plugins/mpeg_adec/adec_layer2.c
plugins/mpeg_adec/mpeg_adec.c
plugins/mpeg_adec/mpeg_adec_generic.c
plugins/mpeg_system/.cvsignore
plugins/mpeg_system/Makefile
plugins/mpeg_system/input_es.c
plugins/mpeg_system/input_ps.c
plugins/mpeg_system/input_ts.c
plugins/mpeg_system/input_ts.h
plugins/mpeg_system/mpeg_es.c
plugins/mpeg_system/mpeg_ps.c
plugins/mpeg_system/mpeg_ts.c
plugins/mpeg_vdec/.cvsignore
plugins/mpeg_vdec/Makefile
plugins/mpeg_vdec/video_decoder.c
plugins/mpeg_vdec/video_parser.c
plugins/mpeg_vdec/vpar_blocks.c
plugins/mpeg_vdec/vpar_headers.c
plugins/mpeg_vdec/vpar_pool.c
plugins/mpeg_vdec/vpar_synchro.c
plugins/qnx/Makefile
plugins/qnx/aout_qnx.c
plugins/qnx/qnx.c
plugins/qnx/vout_qnx.c
plugins/qt/.cvsignore
plugins/qt/Makefile
plugins/qt/intf_qt.cpp
plugins/qt/qt.cpp
plugins/sdl/.cvsignore
plugins/sdl/Makefile
plugins/sdl/aout_sdl.c
plugins/sdl/sdl.c
plugins/sdl/vout_sdl.c
plugins/spudec/.cvsignore
plugins/spudec/Makefile
plugins/spudec/spu_decoder.c
plugins/text/.cvsignore
plugins/text/Makefile
plugins/text/intf_ncurses.c [deleted file]
plugins/text/intf_rc.c [deleted file]
plugins/text/ncurses.c
plugins/text/rc.c
plugins/vcd/.cvsignore
plugins/vcd/Makefile
plugins/vcd/input_vcd.c
plugins/vcd/linux_cdrom_tools.c
plugins/vcd/linux_cdrom_tools.h
plugins/vcd/vcd.c
plugins/x11/.cvsignore
plugins/x11/Makefile
plugins/x11/vout_common.c [deleted file]
plugins/x11/vout_common.h [deleted file]
plugins/x11/vout_x11.c [deleted file]
plugins/x11/vout_xvideo.c [deleted file]
plugins/x11/x11.c
plugins/x11/xcommon.c [new file with mode: 0644]
plugins/x11/xcommon.h [moved from include/tests.h with 60% similarity]
plugins/x11/xvideo.c
po/fr.po
share/gnome-vlc.xpm
share/gvlc.xpm
share/kvlc.xpm
share/qvlc.xpm
share/vlc.xpm
src/audio_output/aout_ext-dec.c
src/audio_output/aout_s16.c
src/audio_output/aout_s8.c
src/audio_output/aout_spdif.c
src/audio_output/aout_u16.c
src/audio_output/aout_u8.c
src/audio_output/audio_output.c
src/input/input.c
src/input/input_clock.c
src/input/input_dec.c
src/input/input_ext-dec.c
src/input/input_ext-intf.c
src/input/input_programs.c
src/input/mpeg_system.c
src/interface/interface.c
src/interface/intf_msg.c
src/interface/intf_playlist.c
src/interface/main.c
src/misc/beos_specific.cpp
src/misc/darwin_specific.c
src/misc/iso_lang.c
src/misc/modules.c
src/misc/modules_builtin.h.in
src/misc/modules_plugin.h [moved from src/misc/modules_core.h with 51% similarity]
src/misc/mtime.c
src/misc/netutils.c
src/misc/tests.c [deleted file]
src/misc/win32_specific.c
src/video_output/video_output.c
src/video_output/video_text.c
src/video_output/vout_pictures.c
src/video_output/vout_subpictures.c

index 12808f036fe24b503a5174e000f1ac77dc9ba5e3..115692aad2e37823c16e31eac691976db1e68b7a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
                arts/arts \
                beos/beos \
                chroma/chroma_yv12_rgb8 \
+               chroma/chroma_yv12_rgb16 \
                directx/directx \
                dsp/dsp \
                dummy/dummy \
@@ -64,7 +65,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
                dvdread/dvdread \
                esd/esd \
                fb/fb \
-               filter/filter_bob \
+               filter/filter_deinterlace \
                filter/filter_transform \
                filter/filter_invert \
                filter/filter_distort \
@@ -121,7 +122,7 @@ INTERFACE := main interface intf_msg intf_playlist
 INPUT := input 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_u8 aout_s8 aout_u16 aout_s16 aout_spdif
-MISC := mtime tests modules netutils iso_lang
+MISC := mtime modules netutils iso_lang
 
 C_OBJ :=       $(INTERFACE:%=src/interface/%.o) \
                $(INPUT:%=src/input/%.o) \
@@ -192,18 +193,19 @@ export
 all: Makefile.opts vlc ${ALIASES} vlc.app plugins po
 
 Makefile.opts:
-       @echo "**** No configuration found, running ./configure..."
-       ./configure
-       $(MAKE) $(MAKECMDGOALS)
-       exit
+       @echo "**** No configuration found, please run ./configure"
+       @exit 1
+#      ./configure
+#      $(MAKE) $(MAKECMDGOALS)
+#      exit    
 
 show:
        @echo CC: $(CC)
        @echo CFLAGS: $(CFLAGS)
        @echo DCFLAGS: $(DCFLAGS)
-       @echo LCFLAGS: $(LCFLAGS)
+       @echo LDFLAGS: $(LDFLAGS)
        @echo PCFLAGS: $(PCFLAGS)
-       @echo PLCFLAGS: $(PLCFLAGS)
+       @echo PLDFLAGS: $(PLDFLAGS)
        @echo C_OBJ: $(C_OBJ)
        @echo CPP_OBJ: $(CPP_OBJ)
        @echo PLUGIN_OBJ: $(PLUGIN_OBJ)
@@ -229,8 +231,9 @@ libdvdread-clean:
 
 plugins-clean:
        for dir in $(PLUGINS_DIR) ; do \
-               ( cd plugins/$${dir} && $(MAKE) clean ) ; done
-       rm -f plugins/*/*.o plugins/*/*.moc plugins/*/*.bak
+               ( cd plugins/$${dir} \
+                       && $(MAKE) -f ../../Makefile.modules clean ) ; done
+       rm -f plugins/*/*.o plugins/*/*.lo plugins/*/*.moc plugins/*/*.bak
 
 vlc-clean:
        rm -f $(C_OBJ) $(CPP_OBJ)
@@ -495,30 +498,35 @@ FORCE:
 #
 # Generic rules (see below)
 #
-$(C_DEP): %.d: FORCE
-       @$(MAKE) -s --no-print-directory -f Makefile.dep $@
-
-$(CPP_DEP): %.dpp: FORCE
-       @$(MAKE) -s --no-print-directory -f Makefile.dep $@
-
 $(H_OBJ): Makefile.opts Makefile.dep Makefile
-       rm -f $@ && cp $@.in $@
+#      @echo "regenerating $@"
+       @rm -f $@ && cp $@.in $@
 ifneq (,$(BUILTINS))
-       for i in $(BUILTINS) ; do \
-               echo "int module_"$$i"_InitModule( module_t* );" >> $@ ; \
-               echo "int module_"$$i"_ActivateModule( module_t* );" >> $@ ; \
-               echo "int module_"$$i"_DeactivateModule( module_t* );" >> $@ ; \
+       @for i in $(BUILTINS) ; do \
+               echo "int InitModule__MODULE_"$$i"( module_t* );" >>$@; \
+               echo "int ActivateModule__MODULE_"$$i"( module_t* );" >>$@; \
+               echo "int DeactivateModule__MODULE_"$$i"( module_t* );" >>$@; \
        done
-       echo "" >> $@ ;
-       printf "#define ALLOCATE_ALL_BUILTINS() do { " >> $@ ;
-       for i in $(BUILTINS) ; do \
-               printf "ALLOCATE_BUILTIN("$$i"); " >> $@ ; \
+       @echo "" >> $@ ;
+endif
+       @echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@ ;
+       @echo "    do \\" >> $@ ;
+       @echo "    { \\" >> $@ ;
+ifneq (,$(BUILTINS))
+       @for i in $(BUILTINS) ; do \
+               echo "        ALLOCATE_BUILTIN("$$i"); \\" >> $@ ; \
        done
-       echo "} while( 0 );" >> $@ ;
-       echo "" >> $@ ;
+       @echo "    } while( 0 );" >> $@ ;
+       @echo "" >> $@ ;
 endif
 
-$(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
+$(C_DEP): %.d: FORCE
+       @$(MAKE) -s --no-print-directory -f Makefile.dep $@
+
+$(CPP_DEP): %.dpp: FORCE
+       @$(MAKE) -s --no-print-directory -f Makefile.dep $@
+
+$(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile $(H_OBJ)
 $(C_OBJ): %.o: .dep/%.d
 $(C_OBJ): %.o: %.c
        $(CC) $(CFLAGS) $(CFLAGS_VLC) -c -o $@ $<
@@ -537,8 +545,8 @@ endif
 #
 # Main application target
 #
-vlc: Makefile.opts Makefile.dep Makefile $(H_OBJ) $(VLC_OBJ) $(BUILTIN_OBJ)
-       $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LCFLAGS)
+vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) $(BUILTIN_OBJ)
+       $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS)
 ifeq ($(SYS),beos)
        xres -o $@ ./share/vlc_beos.rsrc
        mimeset -f $@
@@ -549,14 +557,14 @@ endif
 #
 plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
 $(PLUGIN_OBJ): FORCE
-       @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:plugins/%=../%)
+       @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
-       @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:plugins/%=../%)
+       @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
 
 #
 # libdvdcss target
index 94226a58ab618b2910511d76f4dc2b690e1ec737..fd848ec049d1c13bae7f240dbc0b8442ad2d62d0 100644 (file)
@@ -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 "regenerating dependencies for $*.c"
        @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 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 $*.c"
+       #@echo "regenerating dependencies for $*.c"
        @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
        | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
        .dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \
index 94002eb0c9e1a1685b84b395cce91f98db1290a3..866dbf1ad3b68e983d054cbd3af092a3e1a754fc 100644 (file)
@@ -6,16 +6,41 @@
 ###############################################################################
 
 #
-# C headers directories
+# include the local Makefile
 #
-CFLAGS := -I../../include -I../../extras $(CFLAGS)
+include Makefile
+
+#
+# Analyze the target we are asked to build
+#
+module_name := $(shell echo $(MAKECMDGOALS) | sed 's@.*/\(.*\)\..*@\1@')
+MODULE_NAME := $(shell echo $(module_name) | tr '[a-z]' '[A-Z]')
+
+suff := $(shell echo $(MAKECMDGOALS) | sed 's@.*\.@@' | tr so/a lo/o)
+
+#
+# Compiler flags
+#
+SRC_C := $(filter %.c,$($(module_name)_SOURCES))
+SRC_CPP := $(filter %.cpp,$($(module_name)_SOURCES))
+
+ifeq (lo,$(suff))
+CFLAGS_EXTRA := -I../../include -I../../extras $(CFLAGS_$(MODULE_NAME)) \
+                -DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
+                -DPLUGIN $(CFLAGS_$(MODULE_NAME)_PLUGIN) $(PCFLAGS)
+OBJ_ALL := $(SRC_C:%.c=%.lo.$(module_name)) $(SRC_CPP:%.cpp=%.lo.$(module_name))
+else
+CFLAGS_EXTRA := -I../../include -I../../extras $(CFLAGS_$(MODULE_NAME)) \
+                -DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
+                -DBUILTIN $(CFLAGS_$(MODULE_NAME)_BUILTIN)
+OBJ_ALL := $(SRC_C:%.c=%.o.$(module_name)) $(SRC_CPP:%.cpp=%.o.$(module_name))
+endif
 
 # 
 # Standard dependencies
 #
-C_DEP := $(ALL_OBJ:%.o=.dep/%.d)
-
-CPP_DEP := $(ALL_OBJ:%.o=.dep/%.dpp)
+C_DEP := $(SRC_C:%.c=.dep/%.d)
+CPP_DEP := $(SRC_CPP:%.cpp=.dep/%.dpp)
 
 export
 
@@ -25,33 +50,31 @@ export
 all:
 
 clean:
-       rm -f $(ALL_OBJ)
-       rm -f *.o *.moc *.bak *.builtin
+#      rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
+       rm -f *.o *.o.* *.lo *.lo.* *.moc *.moc.* *.bak
        rm -rf .dep
 
 FORCE:
 
-$(ALL_OBJ): %.o: ../../Makefile.modules ../../Makefile.dep Makefile
+$(OBJ_ALL): ../../Makefile.modules ../../Makefile.dep ../../Makefile Makefile
 
 $(C_DEP): %.d: FORCE
-       @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+       @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@ CFLAGS="$(CFLAGS) $(CFLAGS_EXTRA)"
 
 $(CPP_DEP): %.dpp: FORCE
-       @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+       @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@ CFLAGS="$(CFLAGS) $(CFLAGS_EXTRA)"
 
-$(PLUGIN_C): %.o: .dep/%.d
-$(PLUGIN_C): %.o: %.c
-       $(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -c -o $@ $<
+$(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.d
+$(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.c
+       $(CC) $(CFLAGS) $(CFLAGS_EXTRA) -c $< -o $@
 
-$(BUILTIN_C): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_C): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+$(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.dpp
+$(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.cpp
+       $(CC) $(CFLAGS) $(CFLAGS_EXTRA) -c $< -o $@
 
-$(PLUGIN_CPP): %.o: .dep/%.dpp
-$(PLUGIN_CPP): %.o: %.cpp
-       $(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -c -o $@ $<
+../$(module_name).so: $(EXTRA_DEP) $(OBJ_ALL)
+       $(CC) $(OBJ_ALL) $(PLDFLAGS) $(LIB_$(MODULE_NAME)) -o $@
 
-$(BUILTIN_CPP): BUILTIN_%.o: .dep/%.dpp
-$(BUILTIN_CPP): BUILTIN_%.o: %.cpp
-       $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+../$(module_name).a: $(EXTRA_DEP) $(OBJ_ALL)
+       rm -f $@ && ar rc $@ $(OBJ_ALL) && $(RANLIB) $@
 
index 1b01bdb64e755b70eb2fe634cd878ee624554e8d..a539435be42bfc9a4b14fc425fec0b59ecc3f01f 100644 (file)
@@ -67,13 +67,13 @@ includedir = @includedir@
 # Libraries for special cases
 #
 LIB_ALSA = @LIB_ALSA@
-LIB_ALTIVEC = @LIB_ALTIVEC@
 LIB_ARTS = @LIB_ARTS@
 LIB_BEOS = @LIB_BEOS@
 LIB_DARWIN = @LIB_DARWIN@
 LIB_DIRECTX = @LIB_DIRECTX@
 LIB_DVD = @LIB_DVD@
 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
+LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
 LIB_DVDREAD = @LIB_DVDREAD@
 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
 LIB_ESD = @LIB_ESD@
@@ -82,6 +82,7 @@ LIB_GGI = @LIB_GGI@
 LIB_GLIDE = @LIB_GLIDE@
 LIB_GNOME = @LIB_GNOME@
 LIB_GTK = @LIB_GTK@
+LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
 LIB_IMDCT = @LIB_IMDCT@
 LIB_IMDCT3DN = @LIB_IMDCT3DN@
 LIB_IMDCTSSE = @LIB_IMDCTSSE@
@@ -89,6 +90,7 @@ LIB_KDE = @LIB_KDE@
 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
 LIB_MACOSX = @LIB_MACOSX@
 LIB_MAD = @LIB_MAD@
+LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
 LIB_MPEG_TS = @LIB_MPEG_TS@
 LIB_NCURSES = @LIB_NCURSES@
 LIB_QNX = @LIB_QNX@
@@ -102,15 +104,20 @@ LIB_XVIDEO = @LIB_XVIDEO@
 # CFLAGS for special cases
 #
 CFLAGS_VLC = @CFLAGS_VLC@
-CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
+CFLAGS_ARTS = @CFLAGS_ARTS@
 CFLAGS_DVD = @CFLAGS_DVD@
 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
-CFLAGS_ARTS = @CFLAGS_ARTS@
-CFLAGS_ESD = @CFLAGS_ESD@
-CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
 CFLAGS_ESD = @CFLAGS_ESD@
+CFLAGS_GLIDE = @CFLAGS_GLIDE@
+CFLAGS_GNOME = @CFLAGS_GNOME@
 CFLAGS_GTK = @CFLAGS_GTK@
+CFLAGS_KDE = @CFLAGS_KDE@
+CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
+CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
+CFLAGS_MACOSX = @CFLAGS_MACOSX@
 CFLAGS_MAD = @CFLAGS_MAD@
+CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
+CFLAGS_QT = @CFLAGS_QT@
 CFLAGS_SDL = @CFLAGS_SDL@
 CFLAGS_X11 = @CFLAGS_X11@
 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
@@ -118,8 +125,8 @@ CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
 #
 # Additional objects
 #
-OBJ_DVD = @OBJ_DVD@
-OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
+SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
+SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
 
 #
 # Other special cases
@@ -166,8 +173,8 @@ LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
 
 # DEFINE will contain some of the constants definitions decided in Makefile, 
 # including SYS_xx. It will be passed to C compiler.
-DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
-DEFINE += $(DEFINE_CONSTANTS)
+DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
+DEFINE += $(DEFINE_SYS)
 
 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 
@@ -189,13 +196,8 @@ INCLUDE += -Iinclude -Iextras
 #
 # Libraries needed by built-in modules
 #
-# Let's go for a crude hack !
-LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
-LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
-ifneq (,$(BUILTINS))
-LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
+LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
 LIB += $(LIB_BUILTINS)
-endif
 
 #
 # Libraries
@@ -282,17 +284,18 @@ DCFLAGS += -MM
 #
 # C compiler flags: linking
 #
-LCFLAGS += @LCFLAGS@ $(LIB)
-LCFLAGS += -Wall
+LDFLAGS += @LDFLAGS@
+LDFLAGS += $(LIB)
+LDFLAGS += -Wall
 ifneq ($(DEBUG),1)
 ifneq ($(GPROF),1)
 ifneq ($(CPROF),1)
-#LCFLAGS += -s
+#LDFLAGS += -s
 endif
 endif
 endif
 ifneq (,$(findstring mingw32,$(SYS)))
-LCFLAGS += -mwindows -Xlinker --force-exe-suffix
+LDFLAGS += -mwindows -Xlinker --force-exe-suffix
 endif
 
 #
@@ -312,7 +315,7 @@ endif
 #
 # C compiler flags: plugin linking
 #
-PLCFLAGS += @PLCFLAGS@
+PLDFLAGS += @PLDFLAGS@
 
 #
 # Debugging and profiling support
index 225d59554715cb37467256a78501668913773a0b..70e734b0946676a0afe39b94695f3ec21e8c2ace 100644 (file)
@@ -1,2 +1,4 @@
 #undef PACKAGE
 #undef VERSION
+#undef DVD_DEVICE
+#undef VCD_DEVICE
index ee27a49626c7f19cf6dc1502379160eb5fc5f279..e14ac6ab67efb3264c62b4b2e429a89fe3313944 100755 (executable)
--- a/configure
+++ b/configure
@@ -544,7 +544,7 @@ echo > confdefs.h
 
 # A filename unique to this package, relative to the directory that
 # configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=include/common.h
+ac_unique_file=include/main.h
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
@@ -1079,79 +1079,6 @@ else
 fi
 echo "$ac_t""$CPP" 1>&6
 
-if test $host != $build; then
-  ac_tool_prefix=${host_alias}-
-else
-  ac_tool_prefix=
-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:1092: 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
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-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:1124: 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
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-else
-  RANLIB=":"
-fi
-fi
-
 
 ALL_LINGUAS="de fr ru"
 PACKAGE="vlc"
@@ -1168,7 +1095,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:1172: checking for $ac_word" >&5
+echo "configure:1099: 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
@@ -1197,7 +1124,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1201: checking for strerror in -lcposix" >&5
+echo "configure:1128: 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
@@ -1205,7 +1132,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1209 "configure"
+#line 1136 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1216,7 +1143,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:1220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1147: \"$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
@@ -1239,12 +1166,12 @@ fi
   
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1243: checking for ANSI C header files" >&5
+echo "configure:1170: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1248 "configure"
+#line 1175 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1252,7 +1179,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1183: \"$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*
@@ -1269,7 +1196,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1273 "configure"
+#line 1200 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1287,7 +1214,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1291 "configure"
+#line 1218 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1308,7 +1235,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+#line 1239 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1319,7 +1246,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1343,12 +1270,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1347: checking for working const" >&5
+echo "configure:1274: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1352 "configure"
+#line 1279 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1397,7 +1324,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1418,21 +1345,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1422: checking for inline" >&5
+echo "configure:1349: 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 <<EOF
-#line 1429 "configure"
+#line 1356 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1458,12 +1385,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1462: checking for off_t" >&5
+echo "configure:1389: 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 <<EOF
-#line 1467 "configure"
+#line 1394 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1491,12 +1418,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1495: checking for size_t" >&5
+echo "configure:1422: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1500 "configure"
+#line 1427 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1526,19 +1453,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:1530: checking for working alloca.h" >&5
+echo "configure:1457: 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 <<EOF
-#line 1535 "configure"
+#line 1462 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1469: \"$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
@@ -1559,12 +1486,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1563: checking for alloca" >&5
+echo "configure:1490: 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 <<EOF
-#line 1568 "configure"
+#line 1495 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1592,7 +1519,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1523: \"$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
@@ -1624,12 +1551,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1628: checking whether alloca needs Cray hooks" >&5
+echo "configure:1555: 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 <<EOF
-#line 1633 "configure"
+#line 1560 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1654,12 +1581,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:1658: checking for $ac_func" >&5
+echo "configure:1585: 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 <<EOF
-#line 1663 "configure"
+#line 1590 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1682,7 +1609,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1613: \"$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
@@ -1709,7 +1636,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1713: checking stack direction for C alloca" >&5
+echo "configure:1640: 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
@@ -1717,7 +1644,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1721 "configure"
+#line 1648 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1736,7 +1663,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1667: \"$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
@@ -1761,17 +1688,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:1765: checking for $ac_hdr" >&5
+echo "configure:1692: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1770 "configure"
+#line 1697 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1702: \"$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*
@@ -1800,12 +1727,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1804: checking for $ac_func" >&5
+echo "configure:1731: 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 <<EOF
-#line 1809 "configure"
+#line 1736 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1828,7 +1755,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1759: \"$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
@@ -1853,7 +1780,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1857: checking for working mmap" >&5
+echo "configure:1784: 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
@@ -1861,7 +1788,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+#line 1792 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2001,7 +1928,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1932: \"$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
@@ -2025,12 +1952,12 @@ fi
 
 
     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:2029: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:1956: 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 <<EOF
-#line 2034 "configure"
+#line 1961 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -2066,17 +1993,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:2070: checking for $ac_hdr" >&5
+echo "configure:1997: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2075 "configure"
+#line 2002 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2007: \"$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*
@@ -2107,12 +2034,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:2111: checking for $ac_func" >&5
+echo "configure:2038: 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 <<EOF
-#line 2116 "configure"
+#line 2043 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2135,7 +2062,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2066: \"$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
@@ -2175,7 +2102,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2179: checking for iconv" >&5
+echo "configure:2106: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2183,7 +2110,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 2187 "configure"
+#line 2114 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2193,7 +2120,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -2205,7 +2132,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 2209 "configure"
+#line 2136 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2215,7 +2142,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2146: \"$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
@@ -2236,13 +2163,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:2240: checking for iconv declaration" >&5
+echo "configure:2167: 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 <<EOF
-#line 2246 "configure"
+#line 2173 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2261,7 +2188,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -2290,19 +2217,19 @@ EOF
 
    
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2294: checking for nl_langinfo and CODESET" >&5
+echo "configure:2221: 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 <<EOF
-#line 2299 "configure"
+#line 2226 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_langinfo_codeset=yes
 else
@@ -2325,19 +2252,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2329: checking for LC_MESSAGES" >&5
+echo "configure:2256: 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 <<EOF
-#line 2334 "configure"
+#line 2261 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2268: \"$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
@@ -2358,7 +2285,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2362: checking whether NLS is requested" >&5
+echo "configure:2289: 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"
@@ -2380,7 +2307,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2384: checking whether included gettext is requested" >&5
+echo "configure:2311: 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"
@@ -2400,17 +2327,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2404: checking for libintl.h" >&5
+echo "configure:2331: 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
-#line 2409 "configure"
+#line 2336 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2341: \"$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*
@@ -2427,12 +2354,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:2431: checking for GNU gettext in libc" >&5
+echo "configure:2358: 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 <<EOF
-#line 2436 "configure"
+#line 2363 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2441,7 +2368,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2372: \"$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
@@ -2457,14 +2384,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:2461: checking for GNU gettext in libintl" >&5
+echo "configure:2388: 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 <<EOF
-#line 2468 "configure"
+#line 2395 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2473,7 +2400,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2404: \"$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
@@ -2506,12 +2433,12 @@ EOF
             for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2510: checking for $ac_func" >&5
+echo "configure:2437: 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 <<EOF
-#line 2515 "configure"
+#line 2442 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2534,7 +2461,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2465: \"$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
@@ -2563,7 +2490,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:2567: checking for $ac_word" >&5
+echo "configure:2494: 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
@@ -2597,7 +2524,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:2601: checking for $ac_word" >&5
+echo "configure:2528: 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
@@ -2634,7 +2561,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:2638: checking for $ac_word" >&5
+echo "configure:2565: 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
@@ -2684,7 +2611,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:2688: checking for $ac_word" >&5
+echo "configure:2615: 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
@@ -2718,7 +2645,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:2722: checking for $ac_word" >&5
+echo "configure:2649: 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
@@ -2754,7 +2681,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:2758: checking for $ac_word" >&5
+echo "configure:2685: 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
@@ -2825,7 +2752,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:2829: checking for $ac_word" >&5
+echo "configure:2756: 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
@@ -2858,7 +2785,7 @@ done
       ac_verc_fail=yes
     else
             echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:2862: checking version of bison" >&5
+echo "configure:2789: 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;;
@@ -2905,7 +2832,7 @@ echo "configure:2862: checking version of bison" >&5
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2909: checking for catalogs to be installed" >&5
+echo "configure:2836: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for presentlang in $ALL_LINGUAS; do
          useit=no
@@ -2957,7 +2884,7 @@ echo "configure:2909: 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:2961: checking for a BSD compatible install" >&5
+echo "configure:2888: 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
@@ -3010,99 +2937,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
-if test x${cross_compiling} != xyes; then
-  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3016: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 3023 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 3038 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_bigendian=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_bigendian=no
-fi
-rm -f conftest*
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3069 "configure"
-#include "confdefs.h"
-main () {
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long l;
-    char c[sizeof (long)];
-  } u;
-  u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_bigendian=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_bigendian=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
-  cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
-fi
-
-else
-      # Check whether --with-words or --without-words was given.
+# Check whether --with-words or --without-words was given.
 if test "${with_words+set}" = set; then
   withval="$with_words"
   :
@@ -3118,7 +2953,7 @@ fi
     *)
                   ac_cv_c_bigendian=unknown
       echo $ac_n "checking what the byte order looks to be""... $ac_c" 1>&6
-echo "configure:3122: checking what the byte order looks to be" >&5
+echo "configure:2957: checking what the byte order looks to be" >&5
         cat >conftest.c <<EOF
         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
@@ -3158,72 +2993,16 @@ EOF
       fi
       ;;
   esac
-fi
-
-for ac_func in gettimeofday select strerror strtod strtol
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3167: 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 <<EOF
-#line 3172 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3195: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
-for ac_func in setenv putenv
+for ac_func in gettimeofday select strerror strtod strtol isatty
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3222: checking for $ac_func" >&5
+echo "configure:3001: 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 <<EOF
-#line 3227 "configure"
+#line 3006 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3246,7 +3025,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3029: \"$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
@@ -3271,12 +3050,12 @@ fi
 done
 
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3275: checking for connect" >&5
+echo "configure:3054: 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 <<EOF
-#line 3280 "configure"
+#line 3059 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3299,7 +3078,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3082: \"$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
@@ -3318,7 +3097,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3322: checking for connect in -lsocket" >&5
+echo "configure:3101: 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
@@ -3326,7 +3105,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3330 "configure"
+#line 3109 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3337,7 +3116,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3120: \"$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
@@ -3361,12 +3140,12 @@ fi
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3365: checking for gethostbyname" >&5
+echo "configure:3144: 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 <<EOF
-#line 3370 "configure"
+#line 3149 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3389,7 +3168,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3172: \"$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
@@ -3408,7 +3187,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3412: checking for gethostbyname in -lnsl" >&5
+echo "configure:3191: 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
@@ -3416,7 +3195,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3420 "configure"
+#line 3199 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3427,7 +3206,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3210: \"$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
@@ -3451,12 +3230,12 @@ fi
 fi
 
 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3455: checking for nanosleep" >&5
+echo "configure:3234: checking for nanosleep" >&5
 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3460 "configure"
+#line 3239 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nanosleep(); below.  */
@@ -3479,7 +3258,7 @@ nanosleep();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_nanosleep=yes"
 else
@@ -3498,7 +3277,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:3502: checking for nanosleep in -lrt" >&5
+echo "configure:3281: 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
@@ -3506,7 +3285,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3510 "configure"
+#line 3289 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3517,7 +3296,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3300: \"$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
@@ -3537,7 +3316,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:3541: checking for nanosleep in -lposix4" >&5
+echo "configure:3320: 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
@@ -3545,7 +3324,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3549 "configure"
+#line 3328 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3556,7 +3335,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3339: \"$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
@@ -3585,12 +3364,12 @@ fi
 for ac_func in usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3589: checking for $ac_func" >&5
+echo "configure:3368: 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 <<EOF
-#line 3594 "configure"
+#line 3373 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3613,7 +3392,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3396: \"$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
@@ -3638,12 +3417,12 @@ fi
 done
 
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:3642: checking for inet_aton" >&5
+echo "configure:3421: 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 <<EOF
-#line 3647 "configure"
+#line 3426 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -3666,7 +3445,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3449: \"$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
@@ -3685,7 +3464,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3689: checking for inet_aton in -lresolv" >&5
+echo "configure:3468: 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
@@ -3693,7 +3472,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3697 "configure"
+#line 3476 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3704,7 +3483,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3487: \"$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
@@ -3730,12 +3509,12 @@ fi
 for ac_func in vasprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3734: checking for $ac_func" >&5
+echo "configure:3513: 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 <<EOF
-#line 3739 "configure"
+#line 3518 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3758,7 +3537,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3541: \"$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
@@ -3785,12 +3564,12 @@ done
 for ac_func in swab
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3789: checking for $ac_func" >&5
+echo "configure:3568: 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 <<EOF
-#line 3794 "configure"
+#line 3573 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3813,7 +3592,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3596: \"$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
@@ -3840,12 +3619,12 @@ done
 for ac_func in memalign valloc
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3844: checking for $ac_func" >&5
+echo "configure:3623: 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 <<EOF
-#line 3849 "configure"
+#line 3628 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3868,7 +3647,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3651: \"$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
@@ -3896,12 +3675,12 @@ done
 for ac_func in sigrelse
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3900: checking for $ac_func" >&5
+echo "configure:3679: 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 <<EOF
-#line 3905 "configure"
+#line 3684 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3924,7 +3703,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3707: \"$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
@@ -3951,12 +3730,12 @@ done
 
 NEED_GETOPT=0
 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:3955: checking for getopt_long" >&5
+echo "configure:3734: 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 <<EOF
-#line 3960 "configure"
+#line 3739 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -3979,7 +3758,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3762: \"$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
@@ -4001,7 +3780,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:4005: checking for getopt_long in -lgnugetopt" >&5
+echo "configure:3784: 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
@@ -4009,7 +3788,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgnugetopt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4013 "configure"
+#line 3792 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4018,308 +3797,42 @@ char getopt_long();
 
 int main() {
 getopt_long()
-; return 0; }
-EOF
-if { (eval echo configure:4024: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_GETOPT_LONG 1
-EOF
- LIB="${LIB} -lgnugetopt"
-else
-  echo "$ac_t""no" 1>&6
-NEED_GETOPT=1
-fi
-
-fi
-
-
-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:4055: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4060 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4065: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4094: 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 <<EOF
-#line 4099 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4122: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4147: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4155 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192  /* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
-       char *data, *data2, *data3;
-       int i, pagesize;
-       int fd;
-
-       pagesize = getpagesize();
-
-       /*
-        * First, make a file with some known garbage in it.
-        */
-       data = malloc(pagesize);
-       if (!data)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               *(data + i) = rand();
-       umask(0);
-       fd = creat("conftestmmap", 0600);
-       if (fd < 0)
-               exit(1);
-       if (write(fd, data, pagesize) != pagesize)
-               exit(1);
-       close(fd);
-
-       /*
-        * Next, try to mmap the file at a fixed address which
-        * already has something else allocated at it.  If we can,
-        * also make sure that we see the same garbage.
-        */
-       fd = open("conftestmmap", O_RDWR);
-       if (fd < 0)
-               exit(1);
-       data2 = malloc(2 * pagesize);
-       if (!data2)
-               exit(1);
-       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-           MAP_PRIVATE | MAP_FIXED, fd, 0L))
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data2 + i))
-                       exit(1);
-
-       /*
-        * Finally, make sure that changes to the mapped area
-        * do not percolate back to the file as seen by read().
-        * (This is a bug on some variants of i386 svr4.0.)
-        */
-       for (i = 0; i < pagesize; ++i)
-               *(data2 + i) = *(data2 + i) + 1;
-       data3 = malloc(pagesize);
-       if (!data3)
-               exit(1);
-       if (read(fd, data3, pagesize) != pagesize)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data3 + i))
-                       exit(1);
-       close(fd);
-       unlink("conftestmmap");
-       exit(0);
-}
-
+; return 0; }
 EOF
-if { (eval echo configure:4295: \"$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
+if { (eval echo configure:3803: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
+#define HAVE_GETOPT_LONG 1
 EOF
+ LIB="${LIB} -lgnugetopt"
+else
+  echo "$ac_t""no" 1>&6
+NEED_GETOPT=1
+fi
 
 fi
 
+
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4318: checking return type of signal handlers" >&5
+echo "configure:3831: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4323 "configure"
+#line 3836 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -4336,7 +3849,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -4355,7 +3868,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4359: checking for dlopen in -ldl" >&5
+echo "configure:3872: 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
@@ -4363,7 +3876,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4367 "configure"
+#line 3880 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4374,7 +3887,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3891: \"$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
@@ -4395,7 +3908,7 @@ else
 fi
 
 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
-echo "configure:4399: checking for cos in -lm" >&5
+echo "configure:3912: 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
@@ -4403,7 +3916,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4407 "configure"
+#line 3920 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4414,7 +3927,7 @@ int main() {
 cos()
 ; return 0; }
 EOF
-if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3931: \"$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
@@ -4436,7 +3949,7 @@ else
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:4440: checking for pow in -lm" >&5
+echo "configure:3953: 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
@@ -4444,7 +3957,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4448 "configure"
+#line 3961 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4455,7 +3968,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3972: \"$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
@@ -4482,7 +3995,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:4486: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:3999: 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
@@ -4490,7 +4003,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4494 "configure"
+#line 4007 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4501,7 +4014,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4018: \"$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
@@ -4524,7 +4037,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:4528: checking for pthread_attr_init in -lpthreads" >&5
+echo "configure:4041: 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
@@ -4532,7 +4045,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4536 "configure"
+#line 4049 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4543,7 +4056,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4060: \"$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
@@ -4566,7 +4079,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:4570: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:4083: 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
@@ -4574,7 +4087,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4578 "configure"
+#line 4091 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4585,7 +4098,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4102: \"$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
@@ -4608,12 +4121,12 @@ fi
 fi
 if test "x${THREAD_LIB}" = xerror; then
   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
-echo "configure:4612: checking for pthread_attr_init" >&5
+echo "configure:4125: checking for pthread_attr_init" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4617 "configure"
+#line 4130 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_attr_init(); below.  */
@@ -4636,7 +4149,7 @@ pthread_attr_init();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4153: \"$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
@@ -4659,7 +4172,7 @@ fi
 fi
 
 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4663: checking for cthread_fork in -lthreads" >&5
+echo "configure:4176: 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
@@ -4667,7 +4180,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4671 "configure"
+#line 4184 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4678,7 +4191,7 @@ int main() {
 cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4195: \"$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
@@ -4700,7 +4213,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4704 "configure"
+#line 4217 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -4716,7 +4229,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4720 "configure"
+#line 4233 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
@@ -4732,21 +4245,21 @@ fi
 rm -f conftest*
 
 
-for ac_hdr in stddef.h getopt.h strings.h
+for ac_hdr in 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:4740: checking for $ac_hdr" >&5
+echo "configure:4253: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4745 "configure"
+#line 4258 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4263: \"$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*
@@ -4776,17 +4289,17 @@ for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4780: checking for $ac_hdr" >&5
+echo "configure:4293: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4785 "configure"
+#line 4298 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4303: \"$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*
@@ -4816,17 +4329,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4820: checking for $ac_hdr" >&5
+echo "configure:4333: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4825 "configure"
+#line 4338 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4343: \"$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*
@@ -4856,17 +4369,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:4860: checking for $ac_hdr" >&5
+echo "configure:4373: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4865 "configure"
+#line 4378 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4383: \"$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*
@@ -4896,17 +4409,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:4900: checking for $ac_hdr" >&5
+echo "configure:4413: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4905 "configure"
+#line 4418 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4423: \"$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*
@@ -4936,17 +4449,17 @@ for ac_hdr in machine/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4940: checking for $ac_hdr" >&5
+echo "configure:4453: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4945 "configure"
+#line 4458 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4463: \"$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*
@@ -4973,21 +4486,57 @@ fi
 done
 
 
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:4491: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4496 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:4505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+
 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:4981: checking for $ac_hdr" >&5
+echo "configure:4530: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4986 "configure"
+#line 4535 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4540: \"$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*
@@ -5015,20 +4564,20 @@ done
 
 
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:5019: checking for ntohl in sys/param.h" >&5
+echo "configure:4568: checking for ntohl in sys/param.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -Wall -Werror"
      cat > conftest.$ac_ext <<EOF
-#line 5025 "configure"
+#line 4574 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 int main() {
 void foo() { int meuh; ntohl(meuh); }
 ; return 0; }
 EOF
-if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_ntohl_sys_param_h=yes
 else
@@ -5049,20 +4598,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:5053: checking if \$CC accepts -finline-limit" >&5
+echo "configure:4602: checking if \$CC accepts -finline-limit" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -finline-limit-30000"
      cat > conftest.$ac_ext <<EOF
-#line 5059 "configure"
+#line 4608 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline_limit=yes
 else
@@ -5080,20 +4629,20 @@ if test x"$ac_cv_c_inline_limit" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
-echo "configure:5084: checking if \$CC accepts -bundle -undefined error" >&5
+echo "configure:4633: checking if \$CC accepts -bundle -undefined error" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -bundle -undefined error"
      cat > conftest.$ac_ext <<EOF
-#line 5090 "configure"
+#line 4639 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_darwin=yes
 else
@@ -5107,24 +4656,24 @@ fi
 
 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
 if test x"$ac_cv_ld_darwin" != x"no"; then
-    PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
+    PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
 fi
 
 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:5115: checking if \$CC accepts -shared" >&5
+echo "configure:4664: checking if \$CC accepts -shared" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -shared"
      cat > conftest.$ac_ext <<EOF
-#line 5121 "configure"
+#line 4670 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_plugins=yes
 else
@@ -5138,12 +4687,12 @@ fi
 
 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
 if test x"$ac_cv_ld_plugins" != x"no"; then
-    PLCFLAGS="${PLCFLAGS} -shared"
+    PLDFLAGS="${PLDFLAGS} -shared"
 fi
         
 if test x"${SOFLAGS}" = x; then
     echo $ac_n "checking for soname setting""... $ac_c" 1>&6
-echo "configure:5147: checking for soname setting" >&5
+echo "configure:4696: checking for soname setting" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5152,14 +4701,14 @@ else
         try_SOFLAGS="-Wl,-soname -Wl,"
         LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
         cat > conftest.$ac_ext <<EOF
-#line 5156 "configure"
+#line 4705 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_soname="${try_SOFLAGS}"
 else
@@ -5171,14 +4720,14 @@ else
             try_SOFLAGS="-Wl,-h -Wl,"
             LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
             cat > conftest.$ac_ext <<EOF
-#line 5175 "configure"
+#line 4724 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_soname="${try_SOFLAGS}"
 else
@@ -5207,7 +4756,7 @@ have problems using libdvdcss.
 fi
 
 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:5211: checking __attribute__ ((aligned ())) support" >&5
+echo "configure:4760: 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
@@ -5215,14 +4764,14 @@ else
        CFLAGS="${save_CFLAGS} -Werror"
     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
         cat > conftest.$ac_ext <<EOF
-#line 5219 "configure"
+#line 4768 "configure"
 #include "confdefs.h"
 
 int main() {
 static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
 ; return 0; }
 EOF
-if { (eval echo configure:5226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4775: \"$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
@@ -5245,19 +4794,19 @@ CFLAGS="${save_CFLAGS}"
 LDFLAGS="${save_LDFLAGS}"
 
 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5249: checking for boolean_t in sys/types.h" >&5
+echo "configure:4798: checking for boolean_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5254 "configure"
+#line 4803 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_sys_types_h=yes
 else
@@ -5278,19 +4827,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:5282: checking for boolean_t in pthread.h" >&5
+echo "configure:4831: checking for boolean_t in pthread.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
+#line 4836 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_pthread_h=yes
 else
@@ -5311,19 +4860,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
-echo "configure:5315: checking for boolean_t in cthreads.h" >&5
+echo "configure:4864: checking for boolean_t in cthreads.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5320 "configure"
+#line 4869 "configure"
 #include "confdefs.h"
 #include <cthreads.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_cthreads_h=yes
 else
@@ -5343,155 +4892,10 @@ EOF
 
 fi
 
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5348: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5353 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:5423: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5428 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:5456: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5461 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_header_time=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
-  cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
-
-fi
-
-
-
 ARCH=${target_cpu}
 
 BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
-PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_transform filter_distort"
+PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb16 filter_deinterlace filter_invert filter_wall filter_transform filter_distort"
 
 MMX_MODULES="memcpymmx idctmmx motionmmx"
 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
@@ -5500,19 +4904,19 @@ SSE_MODULES="imdctsse downmixsse"
 ALTIVEC_MODULES="idctaltivec motionaltivec"
 
 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:5504: checking if \$CC groks MMX inline assembly" >&5
+echo "configure:4908: checking if \$CC groks MMX inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5509 "configure"
+#line 4913 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmx_inline=yes
 else
@@ -5530,19 +4934,19 @@ if test x"$ac_cv_mmx_inline" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
-echo "configure:5534: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:4938: checking if \$CC groks MMX EXT inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5539 "configure"
+#line 4943 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmxext_inline=yes
 else
@@ -5560,19 +4964,19 @@ if test x"$ac_cv_mmxext_inline" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
-echo "configure:5564: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:4968: checking if \$CC groks 3D Now! inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5569 "configure"
+#line 4973 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3dnow_inline=yes
 else
@@ -5594,19 +4998,19 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5598: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:5002: checking if \$CC groks SSE inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5603 "configure"
+#line 5007 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sse_inline=yes
 else
@@ -5628,19 +5032,19 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
-echo "configure:5632: checking if \$CC groks Altivec inline assembly" >&5
+echo "configure:5036: checking if \$CC groks Altivec inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5637 "configure"
+#line 5041 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes
 else
@@ -5650,14 +5054,14 @@ else
   save_CFLAGS=$CFLAGS
           CFLAGS="$CFLAGS -Wa,-m7400"
           cat > conftest.$ac_ext <<EOF
-#line 5654 "configure"
+#line 5058 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline="-Wa,-m7400"
 else
@@ -5680,14 +5084,15 @@ if test x"$ac_cv_altivec_inline" != x"no"; then
 EOF
 
   if test x"$ac_cv_altivec_inline" != x"yes"; then
-    CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
     CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
   fi
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
-echo "configure:5691: checking if \$CC groks Altivec C extensions" >&5
+echo "configure:5096: 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
@@ -5695,14 +5100,14 @@ else
      CFLAGS="$CFLAGS -faltivec"
      # Darwin test
      cat > conftest.$ac_ext <<EOF
-#line 5699 "configure"
+#line 5104 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec=-faltivec
 else
@@ -5711,16 +5116,16 @@ else
   rm -rf conftest*
   
         # Linux/PPC test
-        CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
+        CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 5717 "configure"
+#line 5122 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec="-fvec"
 else
@@ -5743,27 +5148,28 @@ if test x"$ac_cv_c_altivec" != x"no"; then
 #define CAN_COMPILE_C_ALTIVEC 1
 EOF
 
-  CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
+  CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
+  CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
   CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
-echo "configure:5753: checking if linker needs -framework vecLib" >&5
+echo "configure:5159: checking if linker needs -framework vecLib" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   save_LDFLAGS=$LDFLAGS
      LDFLAGS="$LDFLAGS -framework vecLib"
      cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
+#line 5166 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_altivec=yes
 else
@@ -5779,7 +5185,8 @@ fi
 
 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
 if test x"$ac_cv_ld_altivec" != x"no"; then
-  LIB_ALTIVEC="-framework vecLib"
+  LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
+  LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
 fi
 
 case ${target_os} in
@@ -5794,22 +5201,16 @@ case ${target_os} in
     ;;
   *mingw32*)
     SYS=mingw32
-    ;;
-  *nto*)
-    SYS=nto
-    LIB_X11="${LIB_X11} -lsocket"
-    LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
-    ;;
-  *)
-    SYS=${target_os}
-    ;;
-esac
+    if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
 
-if test $SYS = mingw32; then
 # 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:5813: checking for $ac_word" >&5
+echo "configure:5214: 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
@@ -5841,7 +5242,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:5845: checking for $ac_word" >&5
+echo "configure:5246: 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
@@ -5873,9 +5274,45 @@ else
 fi
 fi
 
-LIB_MPEG_TS="-lws2_32"
-LIB_RC="-lws2_32"
-fi
+    LIB_MPEG_TS="-lws2_32"
+    LIB_RC="-lws2_32"
+    ;;
+  *nto*)
+    SYS=nto
+    LIB_X11="${LIB_X11} -lsocket"
+    LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
+    ;;
+  beos)
+    SYS=beos
+    LIB="${LIB} -lbe"
+    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
+    PLDFLAGS="${PLDFLAGS} -nostart"
+    ;;
+  *)
+    SYS=${target_os}
+    ;;
+esac
+
+case $SYS in
+  mingw32)
+    DVD_DEVICE="E:"
+    VCD_DEVICE="E:"
+    ;;
+  *)
+    DVD_DEVICE="/dev/dvd"
+    VCD_DEVICE="/dev/cdrom"
+    ;;
+esac
+
+cat >> confdefs.h <<EOF
+#define DVD_DEVICE "$DVD_DEVICE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VCD_DEVICE "$VCD_DEVICE"
+EOF
+
+
 
 
 CAN_BUILD_LIBDVDCSS=0
@@ -5884,17 +5321,17 @@ for ac_hdr in winioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5888: checking for $ac_hdr" >&5
+echo "configure:5325: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5893 "configure"
+#line 5330 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5335: \"$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*
@@ -5927,17 +5364,17 @@ for ac_hdr in sys/ioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5931: checking for $ac_hdr" >&5
+echo "configure:5368: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5936 "configure"
+#line 5373 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5378: \"$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*
@@ -5963,17 +5400,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5967: checking for $ac_hdr" >&5
+echo "configure:5404: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5972 "configure"
+#line 5409 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5414: \"$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*
@@ -6003,7 +5440,7 @@ done
   LINUX_DVD_STRUCT=0
   OPENBSD_DVD_STRUCT=0
         cat > conftest.$ac_ext <<EOF
-#line 6007 "configure"
+#line 5444 "configure"
 #include "confdefs.h"
 #include <sys/cdio.h>
 EOF
@@ -6016,7 +5453,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 EOF
 
     cat > conftest.$ac_ext <<EOF
-#line 6020 "configure"
+#line 5457 "configure"
 #include "confdefs.h"
 #include <sys/cdio.h>
 EOF
@@ -6036,7 +5473,7 @@ fi
 rm -f conftest*
 
         cat > conftest.$ac_ext <<EOF
-#line 6040 "configure"
+#line 5477 "configure"
 #include "confdefs.h"
 #include <sys/dvdio.h>
 EOF
@@ -6049,7 +5486,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 EOF
 
     cat > conftest.$ac_ext <<EOF
-#line 6053 "configure"
+#line 5490 "configure"
 #include "confdefs.h"
 #include <sys/dvdio.h>
 EOF
@@ -6069,7 +5506,7 @@ fi
 rm -f conftest*
 
         cat > conftest.$ac_ext <<EOF
-#line 6073 "configure"
+#line 5510 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -6088,7 +5525,7 @@ rm -f conftest*
 
         NEED_BSDI_LIBDVD=0
   cat > conftest.$ac_ext <<EOF
-#line 6092 "configure"
+#line 5529 "configure"
 #include "confdefs.h"
 #include <dvd.h>
 EOF
@@ -6110,17 +5547,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6114: checking for $ac_hdr" >&5
+echo "configure:5551: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6119 "configure"
+#line 5556 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5561: \"$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*
@@ -6146,7 +5583,7 @@ EOF
 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
 EOF
 
-      OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
+      SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
       LINUX_DVD_STRUCT=1
     
 else
@@ -6160,17 +5597,17 @@ rm -f conftest*
 
         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
-echo "configure:6164: checking for sys/scsi/scsi_types.h" >&5
+echo "configure:5601: checking for sys/scsi/scsi_types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6169 "configure"
+#line 5606 "configure"
 #include "confdefs.h"
 #include <sys/scsi/scsi_types.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5611: \"$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*
@@ -6189,17 +5626,17 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   
     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
-echo "configure:6193: checking for sys/scsi/impl/uscsi.h" >&5
+echo "configure:5630: checking for sys/scsi/impl/uscsi.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6198 "configure"
+#line 5635 "configure"
 #include "confdefs.h"
 #include <sys/scsi/impl/uscsi.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5640: \"$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*
@@ -6232,17 +5669,17 @@ fi
 
         ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
-echo "configure:6236: checking for sys/scsi.h" >&5
+echo "configure:5673: checking for sys/scsi.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6241 "configure"
+#line 5678 "configure"
 #include "confdefs.h"
 #include <sys/scsi.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5683: \"$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*
@@ -6260,7 +5697,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   
     cat > conftest.$ac_ext <<EOF
-#line 6264 "configure"
+#line 5701 "configure"
 #include "confdefs.h"
 #include <sys/scsi.h>
 EOF
@@ -6307,7 +5744,6 @@ fi
 done
 
 
-
 # Check whether --with-tuning or --without-tuning was given.
 if test "${with_tuning+set}" = set; then
   withval="$with_tuning"
@@ -6333,6 +5769,9 @@ else
 fi
 
 
+VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
+
+
 # Check whether --enable-mmx or --disable-mmx was given.
 if test "${enable_mmx+set}" = set; then
   enableval="$enable_mmx"
@@ -6406,7 +5845,7 @@ if test "${enable_pth+set}" = set; then
   enableval="$enable_pth"
    if test x$enableval = xyes; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:6410: checking for pth_init in -lpth" >&5
+echo "configure:5849: 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
@@ -6414,7 +5853,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6418 "configure"
+#line 5857 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6425,7 +5864,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5868: \"$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
@@ -6453,7 +5892,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 6457 "configure"
+#line 5896 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -6493,6 +5932,7 @@ if test "${with_dvdcss+set}" = set; then
         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
+        LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
       fi
     ;;
     xlocal-shared)
@@ -6504,17 +5944,19 @@ if test "${with_dvdcss+set}" = set; then
         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
+        LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -L../../lib -ldvdcss"
       fi
     ;;
     xno)
       # don't use libdvdcss at all, build a DVD module that can dlopen() it
       DUMMY_LIBDVDCSS=1
       BUILTINS="${BUILTINS} dvd"
-      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
+      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
       LIB_DVD="${LIB_DVD} -ldl"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldl"
     ;;
     *)
       # existing libdvdcss
@@ -6522,10 +5964,12 @@ if test "${with_dvdcss+set}" = set; then
       if test "x$withval" != "xyes"
       then
         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
+        LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -L"$withval"/lib"
         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
       fi
       LIB_DVD="${LIB_DVD} -ldvdcss"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldvdcss"
     esac 
 else
   # user didn't decide, we choose to use local libdvdcss and link statically
@@ -6538,14 +5982,16 @@ else
       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
     else
       # XXX: no check for libdl is done, don't try this at home !
       DUMMY_LIBDVDCSS=1
       BUILTINS="${BUILTINS} dvd"
-      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
+      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
       LIB_DVD="${LIB_DVD} -ldl"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldl"
     fi 
 fi
 
@@ -6574,7 +6020,7 @@ fi
 if test x$enable_vcd != xno
 then
   cat > conftest.$ac_ext <<EOF
-#line 6578 "configure"
+#line 6024 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -6648,17 +6094,17 @@ if test "${with_mad+set}" = set; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6652: checking for $ac_hdr" >&5
+echo "configure:6098: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6657 "configure"
+#line 6103 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6108: \"$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*
@@ -6688,7 +6134,7 @@ fi
 done
 
       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6692: checking for mad_bit_init in -lmad" >&5
+echo "configure:6138: 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
@@ -6696,7 +6142,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmad  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6700 "configure"
+#line 6146 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6707,7 +6153,7 @@ int main() {
 mad_bit_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6157: \"$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
@@ -6746,10 +6192,7 @@ fi
 
 if test x$SYS = xbeos
 then
-    LIB="${LIB} -lbe"
     BUILTINS="${BUILTINS} beos"
-    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
-    PLCFLAGS="${PLCFLAGS} -nostart"
 
 else
 
@@ -6777,7 +6220,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:6781: checking for $ac_word" >&5
+echo "configure:6224: 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
@@ -6828,7 +6271,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:6832: checking for $ac_word" >&5
+echo "configure:6275: 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
@@ -6877,7 +6320,8 @@ if test "${enable_macosx+set}" = set; then
   if test x$enable_macosx = xyes
    then
      BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+     CFLAGS_MACOSX="-ObjC"
      LIB="${LIB} -ObjC"
    fi
 else
@@ -6885,17 +6329,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6889: checking for $ac_hdr" >&5
+echo "configure:6333: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6894 "configure"
+#line 6338 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6343: \"$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*
@@ -6916,7 +6360,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+     CFLAGS_MACOSX="-ObjC"
      LIB="${LIB} -ObjC"
    
 else
@@ -6939,17 +6384,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6943: checking for $ac_hdr" >&5
+echo "configure:6388: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6948 "configure"
+#line 6393 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6398: \"$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*
@@ -7027,7 +6472,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:7031: checking for $ac_word" >&5
+echo "configure:6476: 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
@@ -7067,7 +6512,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:7071: checking for $ac_word" >&5
+echo "configure:6516: 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
@@ -7108,7 +6553,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:7112: checking for $ac_word" >&5
+echo "configure:6557: 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
@@ -7154,17 +6599,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7158: checking for $ac_hdr" >&5
+echo "configure:6603: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7163 "configure"
+#line 6608 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6613: \"$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*
@@ -7234,17 +6679,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7238: checking for $ac_hdr" >&5
+echo "configure:6683: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7243 "configure"
+#line 6688 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6693: \"$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*
@@ -7273,7 +6718,7 @@ done
 
     else
       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
-echo "configure:7277: checking for directX headers in ${withval}" >&5
+echo "configure:6722: checking for directX headers in ${withval}" >&5
       if test -f ${withval}/include/directx.h
       then
         PLUGINS="${PLUGINS} directx"
@@ -7300,6 +6745,7 @@ if test "${with_glide+set}" = set; then
       else
         LIB_GLIDE="-lglide2x -lm"
       fi
+      CFLAGS_GLIDE="-I/usr/include/glide"
     fi 
 fi
 
@@ -7321,6 +6767,7 @@ if test "${enable_qt+set}" = set; then
      PLUGINS="${PLUGINS} qt"
      ALIASES="${ALIASES} qvlc"
      LIB_QT="-lqt -L${QTDIR}/lib"
+     CFLAGS_QT="-I/usr/include/qt -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -7337,7 +6784,9 @@ if test "${enable_kde+set}" = set; then
   if test x$enable_kde = xyes; then
      PLUGINS="${PLUGINS} kde"
      ALIASES="${ALIASES} kvlc"
-     LIB_KDE="-L${KDEDIR}/lib -lkfile"
+     LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
+     CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
+     CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -7356,7 +6805,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:7360: checking for $ac_word" >&5
+echo "configure:6809: 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
@@ -7391,7 +6840,7 @@ fi
 
     if test -x ${GNOME_CONFIG}
     then
-       CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gnomeui`"
+       CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gtk gnomeui`"
        LIB_GNOME="`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
     fi
     # now look for the gnome.h header
@@ -7401,17 +6850,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7405: checking for $ac_hdr" >&5
+echo "configure:6854: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7410 "configure"
+#line 6859 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6864: \"$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*
@@ -7471,7 +6920,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:7475: checking for $ac_word" >&5
+echo "configure:6924: 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
@@ -7512,22 +6961,22 @@ fi
   # now look for the gtk.h header
   saved_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
-  FOUND=
+  ac_cv_gtk_headers=yes
   for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7521: checking for $ac_hdr" >&5
+echo "configure:6970: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7526 "configure"
+#line 6975 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6980: \"$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*
@@ -7550,13 +6999,14 @@ EOF
  
 else
   echo "$ac_t""no" 1>&6
-FOUND=no
-       echo "Cannot find gtk development headers."
+ac_cv_gtk_headers=no
+    echo "Cannot find gtk development headers."
   
 fi
 done
 
-  if test -z $FOUND; then
+  if test "x$ac_cv_gtk_headers" = xyes
+  then
     PLUGINS="${PLUGINS} gtk"
     ALIASES="${ALIASES} gvlc"
   fi
@@ -7583,17 +7033,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:7587: checking for $ac_hdr" >&5
+echo "configure:7037: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7592 "configure"
+#line 7042 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7047: \"$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*
@@ -7614,9 +7064,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    #PLUGINS="${PLUGINS} x11"
-    LIB_X11="-L$x_libraries -lX11 -lXext"
-    CFLAGS_X11="-I$x_includes"
+    PLUGINS="${PLUGINS} x11"
+    LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
+    CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
   
   CPPFLAGS=$saved_CPPFLAGS
 else
@@ -7646,17 +7096,17 @@ if test x$enable_xvideo != xno &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7650: checking for $ac_hdr" >&5
+echo "configure:7100: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7655 "configure"
+#line 7105 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7110: \"$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*
@@ -7678,8 +7128,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
     BUILTINS="${BUILTINS} xvideo"
-    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
-    CFLAGS_XVIDEO="-I$x_includes"
+    LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
+    CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
   
   CPPFLAGS=$saved_CPPFLAGS
 else
@@ -7696,17 +7146,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:7700: checking for alsa/asoundlib.h" >&5
+echo "configure:7150: 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
-#line 7705 "configure"
+#line 7155 "configure"
 #include "confdefs.h"
 #include <alsa/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7160: \"$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*
@@ -7723,7 +7173,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:7727: checking for main in -lasound" >&5
+echo "configure:7177: 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
@@ -7731,14 +7181,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7735 "configure"
+#line 7185 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7192: \"$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
@@ -7767,7 +7217,7 @@ fi
      if test x$have_alsa = xtrue
      then
        PLUGINS="${PLUGINS} alsa"
-       LIB_ALSA="-lasound"
+       LIB_ALSA="-lasound -lm -ldl"
      fi
    fi
 fi
@@ -7864,6 +7314,15 @@ fi
 
 
 
+
+
+
+
+
+
+
+
+
 
 
 
@@ -8055,6 +7514,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@WINDRES@%$WINDRES%g
+s%@VLC_SYMBOL@%$VLC_SYMBOL%g
 s%@ESD_CONFIG@%$ESD_CONFIG%g
 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
@@ -8081,12 +7541,12 @@ s%@MOC@%$MOC%g
 s%@DLL_PATH@%$DLL_PATH%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%g
-s%@LCFLAGS@%$LCFLAGS%g
-s%@PLCFLAGS@%$PLCFLAGS%g
+s%@VCD_DEVICE@%$VCD_DEVICE%g
+s%@DVD_DEVICE@%$DVD_DEVICE%g
+s%@PLDFLAGS@%$PLDFLAGS%g
 s%@SOFLAGS@%$SOFLAGS%g
 s%@LIB@%$LIB%g
 s%@LIB_ALSA@%$LIB_ALSA%g
-s%@LIB_ALTIVEC@%$LIB_ALTIVEC%g
 s%@LIB_ARTS@%$LIB_ARTS%g
 s%@LIB_BEOS@%$LIB_BEOS%g
 s%@LIB_DARWIN@%$LIB_DARWIN%g
@@ -8101,6 +7561,7 @@ s%@LIB_GGI@%$LIB_GGI%g
 s%@LIB_GLIDE@%$LIB_GLIDE%g
 s%@LIB_GNOME@%$LIB_GNOME%g
 s%@LIB_GTK@%$LIB_GTK%g
+s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
 s%@LIB_IMDCT@%$LIB_IMDCT%g
 s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
 s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
@@ -8108,6 +7569,7 @@ s%@LIB_KDE@%$LIB_KDE%g
 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
 s%@LIB_MACOSX@%$LIB_MACOSX%g
 s%@LIB_MAD@%$LIB_MAD%g
+s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
 s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
 s%@LIB_NCURSES@%$LIB_NCURSES%g
 s%@LIB_QNX@%$LIB_QNX%g
@@ -8117,19 +7579,25 @@ s%@LIB_SDL@%$LIB_SDL%g
 s%@LIB_X11@%$LIB_X11%g
 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
-s%@CFLAGS_ALTIVEC@%$CFLAGS_ALTIVEC%g
+s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
-s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
-s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
+s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
+s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
+s%@CFLAGS_KDE@%$CFLAGS_KDE%g
+s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
+s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
+s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
 s%@CFLAGS_MAD@%$CFLAGS_MAD%g
+s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
+s%@CFLAGS_QT@%$CFLAGS_QT%g
 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
 s%@CFLAGS_X11@%$CFLAGS_X11%g
 s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
-s%@OBJ_DVD@%$OBJ_DVD%g
-s%@OBJ_LIBDVDCSS@%$OBJ_LIBDVDCSS%g
+s%@SRC_DVD_EXTRA@%$SRC_DVD_EXTRA%g
+s%@SRC_DVDCSS_EXTRA@%$SRC_DVDCSS_EXTRA%g
 s%@NEED_GETOPT@%$NEED_GETOPT%g
 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
 
index a3aabaceee4aa7022ddf057fff39f891396c3b68..cc8e613b8f6859df8489528a50c54d07f6f1b98e 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf settings for vlc and libdvdcss
-AC_INIT(include/common.h)
+AC_INIT(include/main.h)
 AC_CONFIG_HEADER(include/defs.h)
 
 AC_CANONICAL_SYSTEM
@@ -31,7 +31,6 @@ dnl Check for tools
 AC_PROG_MAKE_SET
 AC_PROG_CC
 AC_PROG_CPP
-AC_CHECK_TOOL(RANLIB, ranlib, :)
 
 dnl Gettext stuff
 ALL_LINGUAS="de fr ru"
@@ -46,15 +45,13 @@ dnl AM_PROG_LIBTOOL
 AC_PROG_INSTALL
 
 dnl
-dnl  Endianness check, with a special test for cross-compilation
+dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
 dnl
-if test x${cross_compiling} != xyes; then
-  AC_C_BIGENDIAN
-else
-  dnl  We are crosscompiling, give the user the opportunity to specify
-  dnl  --with-words=big or --with-words=little ; otherwise, try to guess
-  AC_ARG_WITH(words,
-    [  --with-words=endianness Set endianness (big or little)])
+dnl  We give the user the opportunity to specify
+dnl  --with-words=big or --with-words=little ; otherwise, try to guess
+dnl
+AC_ARG_WITH(words,
+  [  --with-words=endianness Set endianness (big or little)])
   case "x$withval" in
     xbig)
       ac_cv_c_bigendian=yes
@@ -107,11 +104,9 @@ EOF
       fi
       ;;
   esac
-fi
 
 dnl Check for system libs needed
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
-AC_CHECK_FUNCS(setenv putenv)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty)
 AC_CHECK_FUNC(connect,,[
   AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
 ])
@@ -141,7 +136,6 @@ AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
     [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
     [NEED_GETOPT=1])])
 
-AC_FUNC_MMAP
 AC_TYPE_SIGNAL
 AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
 AC_CHECK_LIB(m,cos,
@@ -181,13 +175,15 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
             Define if <strings.h> defines strncasecmp.)])
 
 dnl Check for headers
-AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
+AC_CHECK_HEADERS(getopt.h strings.h)
 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h sys/times.h)
 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
 AC_CHECK_HEADERS(dlfcn.h image.h)
 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
 AC_CHECK_HEADERS(machine/param.h)
 
+AC_HEADER_TIME
+
 dnl Check for threads library
 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
 
@@ -217,7 +213,7 @@ AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error],
     [CFLAGS="${save_CFLAGS} -bundle -undefined error"
      AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
 if test x"$ac_cv_ld_darwin" != x"no"; then
-    PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
+    PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
 fi
 
 dnl Check for standard plugin linking flags
@@ -226,7 +222,7 @@ AC_CACHE_CHECK([if \$CC accepts -shared],
     [CFLAGS="${save_CFLAGS} -shared"
      AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
 if test x"$ac_cv_ld_plugins" != x"no"; then
-    PLCFLAGS="${PLCFLAGS} -shared"
+    PLDFLAGS="${PLDFLAGS} -shared"
 fi
         
 dnl Check for soname setting
@@ -300,19 +296,13 @@ if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
     AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if <cthreads.h> defines boolean_t.)
 fi
 
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-
-
 ARCH=${target_cpu}
 
 dnl
 dnl  default modules
 dnl
 BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
-PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_transform filter_distort"
+PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb16 filter_deinterlace filter_invert filter_wall filter_transform filter_distort"
 
 dnl
 dnl  Accelerated modules
@@ -371,7 +361,8 @@ AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
 if test x"$ac_cv_altivec_inline" != x"no"; then
   AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.)
   if test x"$ac_cv_altivec_inline" != x"yes"; then
-    CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
     CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
   fi
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
@@ -385,7 +376,7 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
      AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
         ac_cv_c_altivec=-faltivec, [
         # Linux/PPC test
-        CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
+        CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
         AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
             [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
         ])
@@ -393,7 +384,8 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
     ])
 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.)
-  CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
+  CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
+  CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
   CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
@@ -406,7 +398,8 @@ AC_CACHE_CHECK([if linker needs -framework vecLib],
      LDFLAGS=$save_LDFLAGS
     ])
 if test x"$ac_cv_ld_altivec" != x"no"; then
-  LIB_ALTIVEC="-framework vecLib"
+  LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
+  LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
 fi
 
 dnl
@@ -424,25 +417,43 @@ case ${target_os} in
     ;;
   *mingw32*)
     SYS=mingw32
+    AC_CHECK_TOOL(WINDRES, windres, :)
+    LIB_MPEG_TS="-lws2_32"
+    LIB_RC="-lws2_32"
     ;;
   *nto*)
     SYS=nto
     LIB_X11="${LIB_X11} -lsocket"
     LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
     ;;
+  beos)
+    SYS=beos
+    LIB="${LIB} -lbe"
+    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
+    PLDFLAGS="${PLDFLAGS} -nostart"
+    ;;
   *)
     SYS=${target_os}
     ;;
 esac
 
 dnl
-dnl Windoze specific section
+dnl  DVD and VCD devices
 dnl
-if test $SYS = mingw32; then
-AC_CHECK_TOOL(WINDRES, windres, :)
-LIB_MPEG_TS="-lws2_32"
-LIB_RC="-lws2_32"
-fi
+case $SYS in
+  mingw32)
+    DVD_DEVICE="E:"
+    VCD_DEVICE="E:"
+    ;;
+  *)
+    DVD_DEVICE="/dev/dvd"
+    VCD_DEVICE="/dev/cdrom"
+    ;;
+esac
+
+AC_DEFINE_UNQUOTED(DVD_DEVICE, "$DVD_DEVICE")
+AC_DEFINE_UNQUOTED(VCD_DEVICE, "$VCD_DEVICE")
+
 
 dnl
 dnl  libdvdcss: check for DVD ioctls
@@ -506,7 +517,7 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
       NEED_BSDI_LIBDVD=1
       AC_DEFINE(DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H, 1,
                 Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT.)
-      OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
+      SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
       LINUX_DVD_STRUCT=1
     ])
   ])
@@ -544,7 +555,6 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
   fi
 ])
 
-
 dnl
 dnl  Special arch tuning
 dnl
@@ -569,6 +579,9 @@ AC_ARG_ENABLE(release,
 [ VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; ])
 
+VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
+AC_SUBST(VLC_SYMBOL)
+
 dnl
 dnl  MMX acceleration
 dnl
@@ -669,6 +682,7 @@ AC_ARG_WITH(dvdcss,
         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
+        LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
       fi
     ;;
     xlocal-shared)
@@ -680,17 +694,19 @@ AC_ARG_WITH(dvdcss,
         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
+        LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -L../../lib -ldvdcss"
       fi
     ;;
     xno)
       # don't use libdvdcss at all, build a DVD module that can dlopen() it
       DUMMY_LIBDVDCSS=1
       BUILTINS="${BUILTINS} dvd"
-      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
+      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
       LIB_DVD="${LIB_DVD} -ldl"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldl"
     ;;
     *)
       # existing libdvdcss
@@ -698,10 +714,12 @@ AC_ARG_WITH(dvdcss,
       if test "x$withval" != "xyes"
       then
         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
+        LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -L"$withval"/lib"
         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
       fi
       LIB_DVD="${LIB_DVD} -ldvdcss"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldvdcss"
     esac ],
   # user didn't decide, we choose to use local libdvdcss and link statically
   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
@@ -713,14 +731,16 @@ AC_ARG_WITH(dvdcss,
       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
     else
       # XXX: no check for libdl is done, don't try this at home !
       DUMMY_LIBDVDCSS=1
       BUILTINS="${BUILTINS} dvd"
-      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
+      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
       LIB_DVD="${LIB_DVD} -ldl"
       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
+      LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldl"
     fi ])
 
 dnl
@@ -820,10 +840,7 @@ AC_ARG_WITH(mad,
 dnl special case for BeOS
 if test x$SYS = xbeos
 then
-    LIB="${LIB} -lbe"
     BUILTINS="${BUILTINS} beos"
-    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
-    PLCFLAGS="${PLCFLAGS} -nostart"
 
 dnl default case
 else
@@ -884,12 +901,14 @@ AC_ARG_ENABLE(macosx,
   [if test x$enable_macosx = xyes
    then
      BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+     CFLAGS_MACOSX="-ObjC"
      LIB="${LIB} -ObjC"
    fi],
   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
      BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
+     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+     CFLAGS_MACOSX="-ObjC"
      LIB="${LIB} -ObjC"
    )])
 
@@ -1034,6 +1053,7 @@ AC_ARG_WITH(glide,
       else
         LIB_GLIDE="-lglide2x -lm"
       fi
+      CFLAGS_GLIDE="-I/usr/include/glide"
     fi ])
 
 dnl
@@ -1055,6 +1075,7 @@ AC_ARG_ENABLE(qt,
      PLUGINS="${PLUGINS} qt"
      ALIASES="${ALIASES} qvlc"
      LIB_QT="-lqt -L${QTDIR}/lib"
+     CFLAGS_QT="-I/usr/include/qt -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -1071,7 +1092,9 @@ AC_ARG_ENABLE(kde,
   [if test x$enable_kde = xyes; then
      PLUGINS="${PLUGINS} kde"
      ALIASES="${ALIASES} kvlc"
-     LIB_KDE="-L${KDEDIR}/lib -lkfile"
+     LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
+     CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
+     CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -1090,7 +1113,7 @@ AC_ARG_ENABLE(gnome,
     AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
     if test -x ${GNOME_CONFIG}
     then
-       CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gnomeui`"
+       CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gtk gnomeui`"
        LIB_GNOME="`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
     fi
     # now look for the gnome.h header
@@ -1131,13 +1154,13 @@ then
   # now look for the gtk.h header
   saved_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
-  FOUND=
-  AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, ,
-  [
-    FOUND=no
-       echo "Cannot find gtk development headers."
+  ac_cv_gtk_headers=yes
+  AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
+    ac_cv_gtk_headers=no
+    echo "Cannot find gtk development headers."
   ])
-  if test -z $FOUND; then
+  if test "x$ac_cv_gtk_headers" = xyes
+  then
     PLUGINS="${PLUGINS} gtk"
     ALIASES="${ALIASES} gvlc"
   fi
@@ -1161,9 +1184,9 @@ if test x$enable_x11 != xno &&
   saved_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS -I$x_includes"
   AC_CHECK_HEADERS(X11/Xlib.h, [
-    #PLUGINS="${PLUGINS} x11"
-    LIB_X11="-L$x_libraries -lX11 -lXext"
-    CFLAGS_X11="-I$x_includes"
+    PLUGINS="${PLUGINS} x11"
+    LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
+    CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
   ]
   CPPFLAGS=$saved_CPPFLAGS)
 fi
@@ -1186,8 +1209,8 @@ if test x$enable_xvideo != xno &&
   CPPFLAGS="$CPPFLAGS -I$x_includes"
   AC_CHECK_HEADERS(X11/extensions/Xv.h, [
     BUILTINS="${BUILTINS} xvideo"
-    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
-    CFLAGS_XVIDEO="-I$x_includes"
+    LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
+    CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
   ]
   CPPFLAGS=$saved_CPPFLAGS)
 fi
@@ -1204,7 +1227,7 @@ AC_ARG_ENABLE(alsa,
      if test x$have_alsa = xtrue
      then
        PLUGINS="${PLUGINS} alsa"
-       LIB_ALSA="-lasound"
+       LIB_ALSA="-lasound -lm -ldl"
      fi
    fi])
 
@@ -1256,14 +1279,15 @@ AC_SUBST(WINDRES)
 AC_SUBST(DLL_PATH)
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
+AC_SUBST(VCD_DEVICE)
+AC_SUBST(DVD_DEVICE)
 
-AC_SUBST(LCFLAGS)
-AC_SUBST(PLCFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(PLDFLAGS)
 AC_SUBST(SOFLAGS)
 
 AC_SUBST(LIB)
 AC_SUBST(LIB_ALSA)
-AC_SUBST(LIB_ALTIVEC)
 AC_SUBST(LIB_ARTS)
 AC_SUBST(LIB_BEOS)
 AC_SUBST(LIB_DARWIN)
@@ -1278,6 +1302,7 @@ AC_SUBST(LIB_GGI)
 AC_SUBST(LIB_GLIDE)
 AC_SUBST(LIB_GNOME)
 AC_SUBST(LIB_GTK)
+AC_SUBST(LIB_IDCTALTIVEC)
 AC_SUBST(LIB_IMDCT)
 AC_SUBST(LIB_IMDCT3DN)
 AC_SUBST(LIB_IMDCTSSE)
@@ -1285,6 +1310,7 @@ AC_SUBST(LIB_KDE)
 AC_SUBST(LIB_LIBDVDCSS)
 AC_SUBST(LIB_MACOSX)
 AC_SUBST(LIB_MAD)
+AC_SUBST(LIB_MOTIONALTIVEC)
 AC_SUBST(LIB_MPEG_TS)
 AC_SUBST(LIB_NCURSES)
 AC_SUBST(LIB_QNX)
@@ -1295,20 +1321,26 @@ AC_SUBST(LIB_X11)
 AC_SUBST(LIB_XVIDEO)
 
 AC_SUBST(CFLAGS_VLC)
-AC_SUBST(CFLAGS_ALTIVEC)
+AC_SUBST(CFLAGS_ARTS)
 AC_SUBST(CFLAGS_DVD)
 AC_SUBST(CFLAGS_DVDREAD)
-AC_SUBST(CFLAGS_LIBDVDCSS)
-AC_SUBST(CFLAGS_ARTS)
 AC_SUBST(CFLAGS_ESD)
+AC_SUBST(CFLAGS_GLIDE)
+AC_SUBST(CFLAGS_GNOME)
 AC_SUBST(CFLAGS_GTK)
+AC_SUBST(CFLAGS_KDE)
+AC_SUBST(CFLAGS_IDCTALTIVEC)
+AC_SUBST(CFLAGS_LIBDVDCSS)
+AC_SUBST(CFLAGS_MACOSX)
 AC_SUBST(CFLAGS_MAD)
+AC_SUBST(CFLAGS_MOTIONALTIVEC)
+AC_SUBST(CFLAGS_QT)
 AC_SUBST(CFLAGS_SDL)
 AC_SUBST(CFLAGS_X11)
 AC_SUBST(CFLAGS_XVIDEO)
 
-AC_SUBST(OBJ_DVD)
-AC_SUBST(OBJ_LIBDVDCSS)
+AC_SUBST(SRC_DVD_EXTRA)
+AC_SUBST(SRC_DVDCSS_EXTRA)
 
 AC_SUBST(NEED_GETOPT)
 AC_SUBST(NEED_LIBDVDCSS)
index de88e744c11b3b6f1fa2f085da87faa1117e60c5..f7de634b5a8eedd0f34777491a07f1eb1be8778c 100644 (file)
@@ -13,36 +13,31 @@ SOFLAGS :=
 endif
 
 #
-# Objects
+# C headers directories
 #
+CFLAGS := -I../../include -I../../extras $(CFLAGS)
 
+#
+# Objects
+#
 OBJ_C = libdvdcss.o css.o ioctl.o
-
 ALL_OBJ = $(OBJ_C) $(OBJ_LIBDVDCSS)
 
-include ../../Makefile.modules
-
-$(OBJ_C): %.o: .dep/%.d
-$(OBJ_C): %.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_LIBDVDCSS) $(PCFLAGS) -c -o $@ $<
-
-bsdi_dvdioctl.o: ../BSDI_dvdioctl/dvdioctl.c
-       $(CC) $(CFLAGS) $(CFLAGS_LIBDVDCSS) $(PCFLAGS) -c -o $@ $<
-
-../../lib/$(FULL_SO): $(OBJ_C) $(OBJ_LIBDVDCSS)
-       $(CC) $(PCFLAGS) $(ALL_SOFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_LIBDVDCSS)
-       rm -f ../../lib/$(BASE_SO) && ln -s $(FULL_SO) ../../lib/$(BASE_SO)
-       rm -f ../../lib/$(MAJOR_SO) && ln -s $(FULL_SO) ../../lib/$(MAJOR_SO)
-
-../../lib/$(BASE_A): $(OBJ_C) $(OBJ_LIBDVDCSS)
-       ar r $@ $^
-       $(RANLIB) $@
+# 
+# Standard dependencies
+#
+C_DEP := $(ALL_OBJ:%.o=.dep/%.d)
 
 #
 # Virtual targets
 #
 all: ../../lib/$(FULL_SO) ../../lib/$(BASE_A)
 
+clean:
+       rm -f $(ALL_OBJ)
+       rm -f *.o
+       rm -rf .dep
+
 install:
        mkdir -p $(DESTDIR)$(includedir)/videolan
        $(INSTALL) -m 644 videolan/dvdcss.h $(DESTDIR)$(includedir)/videolan
@@ -59,3 +54,26 @@ uninstall:
        rm -f $(DESTDIR)$(libdir)/$(MAJOR_SO)
        rm -f $(DESTDIR)$(libdir)/$(FULL_SO)
 
+FORCE:
+
+$(ALL_OBJ): %.o: ../../Makefile.dep Makefile
+
+$(C_DEP): %.d: FORCE
+       @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(OBJ_C): %.o: .dep/%.d
+$(OBJ_C): %.o: %.c
+       $(CC) $(CFLAGS) $(CFLAGS_LIBDVDCSS) $(PCFLAGS) -c -o $@ $<
+
+bsdi_dvdioctl.o: ../BSDI_dvdioctl/dvdioctl.c
+       $(CC) $(CFLAGS) $(CFLAGS_LIBDVDCSS) $(PCFLAGS) -c -o $@ $<
+
+../../lib/$(FULL_SO): $(OBJ_C) $(OBJ_LIBDVDCSS)
+       $(CC) $(PCFLAGS) $(ALL_SOFLAGS) -o $@ $^ $(PLDFLAGS) $(LIB_LIBDVDCSS)
+       rm -f ../../lib/$(BASE_SO) && ln -s $(FULL_SO) ../../lib/$(BASE_SO)
+       rm -f ../../lib/$(MAJOR_SO) && ln -s $(FULL_SO) ../../lib/$(MAJOR_SO)
+
+../../lib/$(BASE_A): $(OBJ_C) $(OBJ_LIBDVDCSS)
+       ar r $@ $^
+       $(RANLIB) $@
+
index 46201066588b1117826742486dff3cef1525df9b..a5163521e4a113923937dce6f080df94ab7627fe 100644 (file)
@@ -2,7 +2,7 @@
  * css.c: Functions for DVD authentification and unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: css.c,v 1.17 2001/12/09 17:01:35 sam Exp $
+ * $Id: css.c,v 1.18 2001/12/30 07:09:54 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *         HÃ¥kan Hjort <d95hjort@dtek.chalmers.se>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <string.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "videolan/dvdcss.h"
 #include "libdvdcss.h"
index a2ffa059134f20fc852d43c4338c6f298be22bdb..422c08d49af02edb72699704f9a18221d364d8ee 100644 (file)
@@ -2,7 +2,7 @@
  * ioctl.c: DVD ioctl replacement function
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ioctl.c,v 1.18 2001/12/18 02:44:34 sam Exp $
+ * $Id: ioctl.c,v 1.19 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
  *          Samuel Hocevar <sam@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>
 
+#include <videolan/vlc.h>
+
 #if defined( WIN32 )
 #   include <windows.h>
 #   include <winioctl.h>
@@ -73,8 +73,6 @@
 #   include <sys/scsi/impl/uscsi.h>
 #endif
 
-#include "common.h"
-
 #ifdef SYS_DARWIN
 #   include <IOKit/storage/IODVDMediaBSDClient.h>
 /* #   include "DVDioctl/DVDioctl.h" */
index 646ba251837f6a72360081972b33f44a1005b95f..5e276852aafaaf84e362837e2f86b36b2c1ebd93 100644 (file)
@@ -2,7 +2,7 @@
  * libdvdcss.c: DVD reading library.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: libdvdcss.c,v 1.25 2001/12/09 17:01:35 sam Exp $
+ * $Id: libdvdcss.c,v 1.26 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -26,8 +26,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,6 +33,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
@@ -45,8 +45,6 @@
 #   include <sys/uio.h>                                      /* struct iovec */
 #endif
 
-#include "common.h"
-
 #if defined( WIN32 )
 #   include "input_iovec.h"
 #endif
index 24ab877c976b3348bf1f42bf6d81f88eac7d86b8..6df81e1cdba954f9f22eace0050eed1a214f9eab 100644 (file)
@@ -27,8 +27,6 @@ BUILTIN_OBJ = $(OBJ_C:%.o=DVDREAD_%.o)
 
 ALL_OBJ = $(PLUGIN_OBJ) $(BUILTIN_OBJ)
 
-include ../../Makefile.modules
-
 $(OBJ_C): %.o: .dep/%.d
 $(OBJ_C): %.o: %.c
        $(CC) $(CFLAGS) $(CFLAGS_LIBDVDREAD) $(PCFLAGS) -c -o $@ $<
@@ -51,6 +49,11 @@ $(BUILTIN_OBJ): DVDREAD_%.o: %.c
 #
 all: ../../lib/$(BASE_A)
 
+clean:
+       rm -f $(ALL_OBJ)
+       rm -f *.o
+       rm -rf .dep
+
 libdvdcss:
        @cd ../../ && $(MAKE) libdvdcss
 
index 23f1e18679fba8392ccfb54348e74c16340123e4..eb3430f1308219350610f6b06aa178542744d030 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.h : audio output thread interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_output.h,v 1.38 2001/07/12 20:31:33 reno Exp $
+ * $Id: audio_output.h,v 1.39 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
@@ -36,7 +36,11 @@ typedef struct aout_bank_s
 
 } 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
@@ -204,6 +208,7 @@ typedef struct aout_thread_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+#ifndef PLUGIN
 void            aout_InitBank           ( void );
 void            aout_EndBank            ( void );
 
@@ -213,4 +218,8 @@ void            aout_DestroyThread      ( aout_thread_t *, int * );
 aout_fifo_t *   aout_CreateFifo         ( int, int, long, long, long, void * );
 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
 
index 7e45a95762998b872b7fa71b819a8220870e5f84..637496904bd50e6cde4adf77ad1afbbdb38a583f 100644 (file)
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#else
-#define HAVE_CONFIG_H
-
 /*****************************************************************************
  * Program information
  *****************************************************************************/
@@ -52,6 +48,8 @@
                             " @VLC_CODENAME@ - (C)1996-2001 VideoLAN"
 
 #define VLC_VERSION         "@VLC_VERSION@"
+#define MODULE_SUFFIX       "__MODULE_@VLC_SYMBOL@"
+#define MODULE_SYMBOL       @VLC_SYMBOL@
 
 /*****************************************************************************
  * Debugging options - define or undefine symbols
 
 /* DVD defaults */
 #define INPUT_DVD_DEVICE_VAR            "vlc_dvd_device"
-#define INPUT_DVD_DEVICE_DEFAULT        "/dev/dvd"
+#define INPUT_DVD_DEVICE_DEFAULT        "@DVD_DEVICE@"
 
 #define INPUT_TITLE_VAR                 "vlc_input_title"
 #define INPUT_CHAPTER_VAR               "vlc_input_chapter"
 
 /* VCD defaults */
 #define INPUT_VCD_DEVICE_VAR            "vlc_vcd_device"
-#define INPUT_VCD_DEVICE_DEFAULT        "/dev/cdrom"
+#define INPUT_VCD_DEVICE_DEFAULT        "@VCD_DEVICE@"
 
 /*****************************************************************************
  * Audio configuration
 #define VOUT_DEPTH_VAR                  "vlc_depth"
 #define VOUT_DEPTH_DEFAULT              15
 
-/* Multiplier value for aspect ratio calculation */
-#define VOUT_ASPECT_FACTOR              (2*2*2*2*2*2*2*3*3*3*5*5*5)
+/* Multiplier value for aspect ratio calculation (2^7 * 3^3 * 5^3) */
+#define VOUT_ASPECT_FACTOR              432000
 
 /* Maximum width of a scaled source picture - this should be relatively high,
  * since higher stream values will result in no display at all. */
 #define PLAYLIST_LOOP_VAR               "vlc_playlist_loop"
 #define PLAYLIST_LOOP_DEFAULT           0
 
-#endif
index b4b3d5603aff82b66bcad02dabe6e0ad65defcbf..ac371569d00fb1b05fc6bbcbdda82de72f92b50c 100644 (file)
 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
 #undef TIME_WITH_SYS_TIME
 
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN
-
 #undef PACKAGE
 #undef VERSION
+#undef DVD_DEVICE
+#undef VCD_DEVICE
 
 /* Define if you have the __argz_count function.  */
 #undef HAVE___ARGZ_COUNT
@@ -92,6 +90,9 @@
 /* Define if you have the getuid function.  */
 #undef HAVE_GETUID
 
+/* Define if you have the isatty function.  */
+#undef HAVE_ISATTY
+
 /* Define if you have the memalign function.  */
 #undef HAVE_MEMALIGN
 
index 093284416b6e757e417214db1c4f7c694a4232c8..41efe6b71ad221760008f44ee8af6a0e715daa00 100644 (file)
@@ -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.49 2001/12/30 05:38:44 sam Exp $
+ * $Id: input_ext-dec.h,v 1.50 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Kaempf <maxx@via.ecp.fr>
@@ -480,14 +480,14 @@ 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 )
     {
-        p_main->fast_memcpy( p_buffer, p_bit_stream->p_byte, i_buf_len );
+        FAST_MEMCPY( p_buffer, p_bit_stream->p_byte, i_buf_len );
         p_bit_stream->p_byte += i_buf_len;
     }
     else
     {
         do
         {
-            p_main->fast_memcpy( p_buffer, p_bit_stream->p_byte, i_available );
+            FAST_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;
@@ -498,7 +498,7 @@ static __inline__ void GetChunk( bit_stream_t * p_bit_stream,
 
         if( i_buf_len )
         {
-            p_main->fast_memcpy( p_buffer, p_bit_stream->p_byte, i_buf_len );
+            FAST_MEMCPY( p_buffer, p_bit_stream->p_byte, i_buf_len );
             p_bit_stream->p_byte += i_buf_len;
         }
     }
index fef37410562cf0fa904e2ab99fbf6ea05346a770..294e5f033d8fd4172a7918290479544cd0646bde 100644 (file)
@@ -4,7 +4,7 @@
  * control the pace of reading. 
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.54 2001/12/27 03:47:08 massiot Exp $
+ * $Id: input_ext-intf.h,v 1.55 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -322,20 +322,30 @@ typedef struct input_thread_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+#ifndef PLUGIN
 struct input_thread_s * input_CreateThread ( struct playlist_item_s *,
                                              int *pi_status );
-void input_DestroyThread( struct input_thread_s *, int *pi_status );
-
-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 * psz_buffer, 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_ToggleGrayscale( struct input_thread_s * );
-int  input_ToggleMute( struct input_thread_s * );
-int  input_SetSMP( struct input_thread_s *, int );
+void   input_DestroyThread  ( struct input_thread_s *, int *pi_status );
+
+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_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
+#endif
 
index 5fac6ecf247be03b6b67594e33dce17641fd058b..2eaa3ddbaac414d548bc775268b734f748f6f679 100644 (file)
@@ -3,7 +3,7 @@
  *                      but exported to plug-ins
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_ext-plugins.h,v 1.14 2001/12/29 03:07:51 massiot Exp $
+ * $Id: input_ext-plugins.h,v 1.15 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * 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 );
 void NextDataPacket ( struct bit_stream_s * );
+#else
+#   define InitBitstream p_symbols->InitBitstream
+#endif
 
 /*****************************************************************************
  * 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 );
@@ -61,10 +66,25 @@ struct es_descriptor_s * input_AddES ( struct input_thread_s *,
 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_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
 
 /*****************************************************************************
  * 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 * );
@@ -73,10 +93,14 @@ void input_DecodePES ( struct decoder_fifo_s *, struct pes_packet_s * );
 void input_EscapeDiscontinuity( struct input_thread_s *,
                                 struct pgrm_descriptor_s * );
 void input_EscapeAudioDiscontinuity( struct input_thread_s * );
+#else
+#   define input_DecodePES p_symbols->input_DecodePES
+#endif
 
 /*****************************************************************************
  * 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 );
@@ -84,6 +108,9 @@ 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_ClockManageControl p_symbols->input_ClockManageControl
+#endif
 
 /*****************************************************************************
  * Create a NULL packet for padding in case of a data loss
@@ -906,6 +933,7 @@ 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 );
@@ -915,4 +943,12 @@ void input_DemuxPS   ( struct input_thread_s *, struct data_packet_s * );
 void input_DemuxTS   ( struct input_thread_s *, struct data_packet_s * );
 void input_DemuxPSI  ( struct input_thread_s *, struct data_packet_s *,
                        struct es_descriptor_s *, boolean_t, boolean_t );
+#else
+#   define input_ParsePES p_symbols->input_ParsePES
+#   define input_GatherPES p_symbols->input_GatherPES
+#   define input_ParsePS p_symbols->input_ParsePS
+#   define input_DemuxPS p_symbols->input_DemuxPS
+#   define input_DemuxTS p_symbols->input_DemuxTS
+#   define input_DemuxPSI p_symbols->input_DemuxPSI
+#endif
 
index c05f520bbcdce0c3f34df92254f105d9d27162f0..65eeb855cc56e5567aa5301d114363aed6248014 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: interface.h,v 1.24 2001/12/10 12:40:24 sam Exp $
+ * $Id: interface.h,v 1.25 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-/*****************************************************************************
- * Required headers:
- *  <X11/Xlib.h>
- *  <X11/extensions/XShm.h>
- *  "config.h"
- *  "common.h"
- *  "mtime.h"
- *  "threads.h"
- *  "input.h"
- *  "video.h"
- *  "video_output.h"
- *  "audio_output.h"
- *  "xconsole.h"
- *****************************************************************************/
-
 /*****************************************************************************
  * intf_thread_t: describe an interface thread
  *****************************************************************************
index f98a30a108eaf42402268f531d27e7ed8f7d08a9..f5bdbfa4294bcc6b4efd04b4bd889bed98d41416 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_msg.h,v 1.16 2001/10/01 16:18:48 massiot Exp $
+ * $Id: intf_msg.h,v 1.17 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -80,6 +80,7 @@ void    intf_FlushMsg       ( void );
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+#ifndef PLUGIN
 p_intf_msg_t intf_MsgCreate      ( void );
 void         intf_MsgDestroy     ( void );
 
@@ -92,4 +93,22 @@ void         intf_MsgImm         ( char *psz_format, ... );
 void         intf_ErrMsgImm      ( char *psz_format, ... );
 void         intf_WarnMsgImm     ( int i_level, char *psz_format, ... );
 void         intf_WarnHexDump    ( int i_level, void *p_data, int i_size );
+#else
+#   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
+#   define intf_WarnMsgImm p_symbols->intf_WarnMsgImm
+#   ifdef TRACE
+#       undef  intf_DbgMsg
+#       undef  intf_DbgMsgImm
+#       define intf_DbgMsg( format, args... ) \
+        p_symbols->intf_DbgMsg( __FILE__, __FUNCTION__, \
+                                __LINE__, format, ## args )
+#       define intf_DbgMsgImm( format, args... ) \
+            p_symbols->intf_DbgMsgImm( __FILE__, __FUNCTION__, \
+                                       __LINE__, format, ## args )
+#   endif
+
+#endif
 
index 00cb36ca5bff768da2296755987e7bd0450d159b..050abf1435c541d9b3bf70039973d0658929998f 100644 (file)
@@ -2,7 +2,7 @@
  * intf_playlist.h : Playlist functions
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_playlist.h,v 1.4 2001/05/30 17:03:11 sam Exp $
+ * $Id: intf_playlist.h,v 1.5 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -69,6 +69,7 @@ typedef struct playlist_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+#ifndef PLUGIN
 playlist_t * intf_PlaylistCreate   ( void );
 void         intf_PlaylistInit     ( playlist_t * p_playlist );
 int          intf_PlaylistAdd      ( playlist_t * p_playlist,
@@ -79,4 +80,13 @@ 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
 
index 1858c8d5503c1c86d5e134093a8beb9e84ecd720..5960506a08e2b04af37a451319f400a92308885d 100644 (file)
@@ -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.1 2001/11/07 17:37:16 stef Exp $
+ * $Id: iso_lang.h,v 1.2 2001/12/30 07:09:54 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -21,4 +21,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifndef PLUGIN
 char * DecodeLanguage( u16 );
+#else
+#   define DecodeLanguage p_symbols->DecodeLanguage
+#endif
+
index 6e3398661f41b85293fd2b4222c3686c683ba648..80687bda524d0c050f4a3ecabaaaa7c4099ee020 100644 (file)
@@ -3,7 +3,7 @@
  * Declaration and extern access to global program object.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: main.h,v 1.26 2001/12/10 04:53:10 sam Exp $
+ * $Id: main.h,v 1.27 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -41,7 +41,7 @@ typedef struct main_s
     char **                ppsz_env;                /* environment variables */
     char *                 psz_arg0;         /* program name (whithout path) */
 
-    int                    i_cpu_capabilities;             /* CPU extensions */
+    u32                    i_cpu_capabilities;             /* CPU extensions */
     int                    i_warning_level;        /* warning messages level */
     boolean_t              b_stats;                  /* display statistics ? */
 
@@ -52,8 +52,7 @@ typedef struct main_s
     int                    i_desync;   /* relative desync of the audio ouput */
 
     /* Fast memcpy plugin used */
-    struct module_s *      p_memcpy_module;
-    void *             ( * fast_memcpy ) ( void *, const void *, size_t );
+    memcpy_module_t        memcpy;
 
     /* Unique threads */
     p_intf_thread_t        p_intf;                  /* main interface thread */
@@ -71,12 +70,25 @@ extern main_t *p_main;
 #   define p_main (p_symbols->p_main)
 #endif
 
+/*****************************************************************************
+ * Fast memory operation module
+ *****************************************************************************/
+#define FAST_MEMCPY p_main->memcpy.pf_memcpy
+#define FAST_MEMSET p_main->memcpy.pf_memset
+
 /*****************************************************************************
  * Prototypes - these methods are used to get default values for some threads
  * and modules.
  *****************************************************************************/
+#ifndef PLUGIN
 int    main_GetIntVariable( char *psz_name, int i_default );
 char * main_GetPszVariable( char *psz_name, char *psz_default );
 void   main_PutIntVariable( char *psz_name, int i_value );
 void   main_PutPszVariable( char *psz_name, char *psz_value );
+#else
+#   define main_GetIntVariable p_symbols->main_GetIntVariable
+#   define main_PutIntVariable p_symbols->main_PutIntVariable
+#   define main_GetPszVariable p_symbols->main_GetPszVariable
+#   define main_PutPszVariable p_symbols->main_PutPszVariable
+#endif
 
index 7f3059eb849e70703c7df5ddee1ad751162751f5..ad06b770a7841b3a16d48484a322b82ebd00dc7d 100644 (file)
@@ -2,7 +2,7 @@
  * modules.h : Module management functions.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.h,v 1.37 2001/12/27 03:47:08 massiot Exp $
+ * $Id: modules.h,v 1.38 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-/*****************************************************************************
- * module_bank_t, p_module_bank (global variable)
- *****************************************************************************
- * This global variable is accessed by any function using modules.
- *****************************************************************************/
-typedef struct
-{
-    struct module_s *   first; /* First module of the bank */
-
-    vlc_mutex_t         lock;  /* Global lock -- you can't imagine how awful it
-                                  is to design thread-safe linked lists. */
-} module_bank_t;
-
-extern module_bank_t *p_module_bank;
-
 /*****************************************************************************
  * Module #defines.
  *****************************************************************************/
 
 /* Number of tries before we unload an unused module */
 #define MODULE_HIDE_DELAY 10000
+#define MODULE_SHORTCUT_MAX 10
 
 /* The module handle type. */
 #ifdef SYS_BEOS
@@ -53,31 +39,135 @@ 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[] =
+    {
+        "interface",
+#define MODULE_CAPABILITY_INTF      0  /* Interface */
+        "access",
+#define MODULE_CAPABILITY_ACCESS    1  /* Input */
+        "input",
+#define MODULE_CAPABILITY_INPUT     2  /* Input */
+        "decaps",
+#define MODULE_CAPABILITY_DECAPS    3  /* Decaps */
+        "decoder",
+#define MODULE_CAPABILITY_DECODER   4  /* Audio or video decoder */
+        "motion",
+#define MODULE_CAPABILITY_MOTION    5  /* Motion compensation */
+        "iDCT",
+#define MODULE_CAPABILITY_IDCT      6  /* IDCT transformation */
+        "audio output",
+#define MODULE_CAPABILITY_AOUT      7  /* Audio output */
+        "video output",
+#define MODULE_CAPABILITY_VOUT      8  /* Video output */
+        "chroma transformation",
+#define MODULE_CAPABILITY_CHROMA    9  /* colorspace conversion */
+        "iMDCT",
+#define MODULE_CAPABILITY_IMDCT    10  /* IMDCT transformation */
+        "downmix",
+#define MODULE_CAPABILITY_DOWNMIX  11  /* AC3 downmix */
+        "memcpy",
+#define MODULE_CAPABILITY_MEMCPY   12  /* memcpy */
+        "unknown"
+#define MODULE_CAPABILITY_MAX      13  /* Total number of capabilities */
+    };
+
+    return pp_capa[ (i_capa) > MODULE_CAPABILITY_MAX ? MODULE_CAPABILITY_MAX :
+                    (i_capa) ];
+}
+
+/*****************************************************************************
+ * module_bank_t, p_module_bank (global variable)
+ *****************************************************************************
+ * This global variable is accessed by any function using modules.
+ *****************************************************************************/
+typedef struct
+{
+    struct module_s *   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 *
+                                    it is to design thread-safe linked lists */
+} module_bank_t;
+
+extern module_bank_t *p_module_bank;
+
+/*****************************************************************************
+ * Module description structure
+ *****************************************************************************/
+typedef struct module_s
+{
+    /*
+     * Variables set by the module to identify itself
+     */
+    char *psz_name;                                  /* Module _unique_ name */
+    char *psz_longname;                           /* Module descriptive name */
+
+    /*
+     * Variables set by the module to tell us what it can do
+     */
+    char *psz_program;        /* Program name which will activate the module */
+    char *pp_shortcuts[ MODULE_SHORTCUT_MAX ];    /* Shortcuts to the module */
 
-#define MODULE_CAPABILITY_NULL     0        /* The Module can't do anything */
-#define MODULE_CAPABILITY_INTF     1 <<  0  /* Interface */
-#define MODULE_CAPABILITY_ACCESS   1 <<  1  /* Input */
-#define MODULE_CAPABILITY_INPUT    1 <<  2  /* Input */
-#define MODULE_CAPABILITY_DECAPS   1 <<  3  /* Decaps */
-#define MODULE_CAPABILITY_DEC      1 <<  4  /* Video decoder */
-#define MODULE_CAPABILITY_MOTION   1 <<  5  /* Motion compensation */
-#define MODULE_CAPABILITY_IDCT     1 <<  6  /* IDCT transformation */
-#define MODULE_CAPABILITY_AOUT     1 <<  7  /* Audio output */
-#define MODULE_CAPABILITY_VOUT     1 <<  8  /* Video output */
-#define MODULE_CAPABILITY_CHROMA   1 <<  9  /* colorspace conversion */
-#define MODULE_CAPABILITY_IMDCT    1 << 10  /* IMDCT transformation */
-#define MODULE_CAPABILITY_DOWNMIX  1 << 11  /* AC3 downmix */
-#define MODULE_CAPABILITY_MEMCPY   1 << 12  /* memcpy */
-
-/* FIXME: kludge */
-struct input_area_s;
-struct imdct_s;
-struct complex_s;
-struct dm_par_s;
-struct bit_stream_s;
-struct decoder_fifo_s;
-
-struct decoder_config_s;
+    u32   i_capabilities;                                 /* Capability list */
+    int   pi_score[ MODULE_CAPABILITY_MAX ];    /* Score for each capability */
+
+    u32   i_cpu_capabilities;                   /* Required CPU capabilities */
+
+    struct module_functions_s *p_functions;          /* Capability functions */
+    struct module_config_s  *p_config;     /* Module configuration structure */
+
+    /*
+     * Variables used internally by the module manager
+     */
+    boolean_t           b_builtin;  /* Set to true if the module is built in */
+
+    union
+    {
+        struct
+        {
+            module_handle_t     handle;                     /* Unique handle */
+            char *              psz_filename;             /* Module filename */
+
+        } plugin;
+
+        struct
+        {
+            int ( *pf_deactivate ) ( struct module_s * );
+
+        } builtin;
+
+    } is;
+
+    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 */
+
+    /*
+     * Symbol table we send to the module so that it can access vlc symbols
+     */
+    struct module_symbols_s *p_symbols;
+
+} module_t;
+
+/*****************************************
+ * FIXME
+ * FIXME    Capabilities
+ * FIXME
+ *******************************************/
+typedef struct memcpy_module_s
+{
+    struct module_s *p_module;
+
+    void* ( *pf_memcpy ) ( void *, const void *, size_t );
+
+} memcpy_module_t;
 
 /* FIXME: not yet used */
 typedef struct probedata_s
@@ -90,8 +180,8 @@ typedef struct probedata_s
 
     struct
     {
-        struct { int i_chroma; int i_width; int i_height; } source;
-        struct { int i_chroma; int i_width; int i_height; } dest;
+        struct picture_heap_s* p_output;
+        struct picture_heap_s* p_render;
     } chroma;
 
 } probedata_t;
@@ -193,7 +283,6 @@ typedef struct function_list_s
         struct
         {
             int  ( * pf_init )         ( struct vout_thread_s * );
-            int  ( * pf_reset )        ( struct vout_thread_s * );
             void ( * pf_end )          ( struct vout_thread_s * );
         } chroma;
 
@@ -293,57 +382,22 @@ typedef struct module_config_s
     void *      p_change;        /* Function to call when commiting a change */
 } module_config_t;
 
-/*****************************************************************************
- * Bank and module description structures
- *****************************************************************************/
-
-/* The module description structure */
-typedef struct module_s
-{
-    boolean_t           b_builtin;  /* Set to true if the module is built in */
-
-    union
-    {
-        struct
-        {
-            module_handle_t     handle;                     /* Unique handle */
-            char *              psz_filename;             /* Module filename */
-
-        } plugin;
-
-        struct
-        {
-            int ( *pf_deactivate ) ( struct module_s * );
-
-        } builtin;
-
-    } is;
-
-    char *              psz_name;                    /* Module _unique_ name */
-    char *              psz_longname;             /* Module descriptive name */
-    char *              psz_version;                       /* Module version */
-
-    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_config_t         *p_config;     /* Module configuration structure */
-    struct module_symbols_s *p_symbols;
-
-    u32                      i_capabilities;              /* Capability list */
-    p_module_functions_t     p_functions;            /* Capability functions */
-
-} module_t;
-
 /*****************************************************************************
  * Exported functions.
  *****************************************************************************/
+#ifndef PLUGIN
 void            module_InitBank     ( void );
 void            module_EndBank      ( void );
 void            module_ResetBank    ( void );
 void            module_ManageBank   ( void );
-module_t *      module_Need         ( int i_capabilities, void *p_data );
+module_t *      module_Need         ( int, char *, probedata_t * );
 void            module_Unneed       ( module_t * p_module );
 
+int module_NeedMemcpy( memcpy_module_t * );
+void module_UnneedMemcpy( memcpy_module_t * );
+
+#else
+#   define module_Need p_symbols->module_Need
+#   define module_Unneed p_symbols->module_Unneed
+#endif
+
diff --git a/include/modules_export.h b/include/modules_export.h
deleted file mode 100644 (file)
index 1b7e063..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*****************************************************************************
- * modules_export.h: macros for exporting vlc symbols to plugins
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#define STORE_SYMBOLS( p_symbols ) \
-    (p_symbols)->p_main = p_main; \
-    (p_symbols)->p_aout_bank = p_aout_bank; \
-    (p_symbols)->p_vout_bank = p_vout_bank; \
-    (p_symbols)->main_GetIntVariable = main_GetIntVariable; \
-    (p_symbols)->main_GetPszVariable = main_GetPszVariable; \
-    (p_symbols)->main_PutIntVariable = main_PutIntVariable; \
-    (p_symbols)->main_PutPszVariable = main_PutPszVariable; \
-    (p_symbols)->TestProgram = TestProgram; \
-    (p_symbols)->TestMethod = TestMethod; \
-    (p_symbols)->TestCPU = TestCPU; \
-    (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_WarnMsgImm = intf_WarnMsgImm; \
-    (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)->msleep = msleep; \
-    (p_symbols)->mdate = mdate; \
-    (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_ChangeArea = input_ChangeArea; \
-    (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)->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_ParsePS = input_ParsePS; \
-    (p_symbols)->input_DemuxPS = input_DemuxPS; \
-    (p_symbols)->input_DemuxTS = input_DemuxTS; \
-    (p_symbols)->input_DemuxPSI = input_DemuxPSI; \
-    (p_symbols)->input_ClockManageControl = input_ClockManageControl; \
-    (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)->UnalignedGetBits = UnalignedGetBits; \
-    (p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \
-    (p_symbols)->UnalignedShowBits = UnalignedShowBits; \
-    (p_symbols)->DecodeLanguage = DecodeLanguage; \
-    (p_symbols)->module_Need = module_Need; \
-    (p_symbols)->module_Unneed = module_Unneed;
-    
-#define STORE_TRACE_SYMBOLS( p_symbols ) \
-    (p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
-    (p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;
-
-#ifdef PLUGIN
-#   define p_aout_bank (p_symbols->p_aout_bank)
-#   define p_vout_bank (p_symbols->p_vout_bank)
-
-#   define main_GetIntVariable(a,b) p_symbols->main_GetIntVariable(a,b)
-#   define main_PutIntVariable(a,b) p_symbols->main_PutIntVariable(a,b)
-#   define main_GetPszVariable(a,b) p_symbols->main_GetPszVariable(a,b)
-#   define main_PutPszVariable(a,b) p_symbols->main_PutPszVariable(a,b)
-
-#   define TestProgram(a) p_symbols->TestProgram(a)
-#   define TestMethod(a,b) p_symbols->TestMethod(a,b)
-#   define TestCPU(a) p_symbols->TestCPU(a)
-
-#   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
-#   define intf_WarnMsgImm p_symbols->intf_WarnMsgImm
-#ifdef TRACE
-#   undef  intf_DbgMsg
-#   undef  intf_DbgMsgImm
-#   define intf_DbgMsg( format, args... ) \
-    p_symbols->intf_DbgMsg( __FILE__, __FUNCTION__, \
-                            __LINE__, format, ## args )
-#   define intf_DbgMsgImm( format, args... ) \
-    p_symbols->intf_DbgMsgImm( __FILE__, __FUNCTION__, \
-                               __LINE__, format, ## args )
-#endif
-
-#   define intf_PlaylistAdd(a,b,c) p_symbols->intf_PlaylistAdd(a,b,c)
-#   define intf_PlaylistDelete(a,b) p_symbols->intf_PlaylistDelete(a,b)
-#   define intf_PlaylistNext(a) p_symbols->intf_PlaylistNext(a)
-#   define intf_PlaylistPrev(a) p_symbols->intf_PlaylistPrev(a)
-#   define intf_PlaylistDestroy(a) p_symbols->intf_PlaylistDestroy(a)
-#   define intf_PlaylistJumpto(a,b) p_symbols->intf_PlaylistJumpto(a,b)
-#   define intf_UrlDecode(a) p_symbols->intf_UrlDecode(a)
-
-#   define msleep(a) p_symbols->msleep(a)
-#   define mdate() p_symbols->mdate()
-
-#   define network_ChannelCreate p_symbols->network_ChannelCreate
-#   define network_ChannelJoin p_symbols->network_ChannelJoin
-
-#   define input_SetProgram p_symbols->input_SetProgram
-#   define input_SetStatus p_symbols->input_SetStatus
-#   define input_Seek p_symbols->input_Seek
-#   define input_DumpStream(a) p_symbols->input_DumpStream(a)
-#   define input_OffsetToTime(a,b,c) p_symbols->input_OffsetToTime(a,b,c)
-#   define input_ChangeES(a,b,c) p_symbols->input_ChangeES(a,b,c)
-#   define input_ToggleES(a,b,c) p_symbols->input_ToggleES(a,b,c)
-#   define input_ChangeArea(a,b) p_symbols->input_ChangeArea(a,b)
-#   define input_FindES p_symbols->input_FindES
-#   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
-
-#   define InitBitstream p_symbols->InitBitstream
-#   define DecoderError p_symbols->DecoderError
-#   define input_InitStream p_symbols->input_InitStream
-#   define input_EndStream p_symbols->input_EndStream
-
-#   define input_ParsePES p_symbols->input_ParsePES
-#   define input_GatherPES p_symbols->input_GatherPES
-#   define input_DecodePES p_symbols->input_DecodePES
-#   define input_ParsePS p_symbols->input_ParsePS
-#   define input_DemuxPS p_symbols->input_DemuxPS
-#   define input_DemuxTS p_symbols->input_DemuxTS
-#   define input_DemuxPSI p_symbols->input_DemuxPSI
-
-#   define input_ClockManageControl p_symbols->input_ClockManageControl
-
-#   define aout_CreateFifo p_symbols->aout_CreateFifo
-#   define aout_DestroyFifo p_symbols->aout_DestroyFifo
-
-#   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 DecodeLanguage p_symbols->DecodeLanguage
-
-#   define module_Need p_symbols->module_Need
-#   define module_Unneed p_symbols->module_Unneed
-    
-#endif
-
index ac5692b55424479f75072278ab6d6cff5b6a272f..e0a25aca34f0280af4bf3c235c2ab2c6a55be107 100644 (file)
@@ -2,7 +2,7 @@
  * modules_inner.h : Macros used from within a module.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_inner.h,v 1.9 2001/12/11 15:31:37 sam Exp $
+ * $Id: modules_inner.h,v 1.10 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 #define UGLY_KLUDGE( z ) #z
 /* And I need to do _this_ to change Â« foo bar Â» to Â« module_foo_bar Â» ! */
 #define CONCATENATE( y, z ) CRUDE_HACK( y, z )
-#define CRUDE_HACK( y, z )  module_##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
-
-#   define _M( function ) CONCATENATE( MODULE_NAME, function )
-
-#   define MODULE_INIT_START \
-        int CONCATENATE( MODULE_NAME, InitModule ) ( module_t *p_module ) \
-        { \
-            p_module->psz_name = MODULE_STRING; \
-            p_module->psz_version = VLC_VERSION;
-
-#   define MODULE_INIT_STOP \
-            return( 0 ); \
-        }
-
-#   define MODULE_ACTIVATE_START \
-        int CONCATENATE( MODULE_NAME, ActivateModule ) ( module_t *p_module ) \
-        { \
-            p_module->p_functions = \
-              ( module_functions_t * )malloc( sizeof( module_functions_t ) ); \
-            if( p_module->p_functions == NULL ) \
-            { \
-                return( -1 ); \
-            } \
-            p_module->p_config = p_config;
-
-#   define MODULE_ACTIVATE_STOP \
-            return( 0 ); \
-        }
-
-#   define MODULE_DEACTIVATE_START \
-        int CONCATENATE( MODULE_NAME, DeactivateModule )( module_t *p_module ) \
-        { \
-            free( p_module->p_functions );
-
-#   define MODULE_DEACTIVATE_STOP \
-            return( 0 ); \
-        }
-
+#   define _M( function )  CONCATENATE( function, MODULE_NAME )
+#   define _X( function )  CONCATENATE( function, MODULE_NAME )
+#   define DECLARE_SYMBOLS ;
+#   define STORE_SYMBOLS   ;
 #else
-
-#   define _M( function )    function
-
-#   define MODULE_INIT_START \
-        int InitModule      ( module_t *p_module ) \
-        { \
-            p_module->psz_name = MODULE_STRING; \
-            p_module->psz_version = VLC_VERSION;
-
-#   define MODULE_INIT_STOP \
-            return( 0 ); \
-        }
-
-#   define MODULE_ACTIVATE_START \
-        int ActivateModule  ( module_t *p_module ) \
-        { \
-            p_module->p_functions = \
-              ( module_functions_t * )malloc( sizeof( module_functions_t ) ); \
-            if( p_module->p_functions == NULL ) \
-            { \
-                return( -1 ); \
-            } \
-            p_module->p_config = p_config; \
-            p_symbols = p_module->p_symbols;
-
-#   define MODULE_ACTIVATE_STOP \
-            return( 0 ); \
-        }
-
-#   define MODULE_DEACTIVATE_START \
-        int DeactivateModule( module_t *p_module ) \
-        { \
-            free( p_module->p_functions );
-
-#   define MODULE_DEACTIVATE_STOP \
-            return( 0 ); \
-        }
-
+#   define _M( function )  function
+#   define _X( function )  CONCATENATE( function, MODULE_SYMBOL )
+#   define DECLARE_SYMBOLS module_symbols_t* p_symbols;
+#   define STORE_SYMBOLS   p_symbols = p_module->p_symbols;
 #endif
 
-/* Now the real stuff */
 #define MODULE_STRING STRINGIFY( MODULE_NAME )
 
+/*
+ * InitModule: this function is called once and only once, when the module
+ * is looked at for the first time. We get the useful data from it, for
+ * instance the module name, its shortcuts, its capabilities...
+ */
+#define MODULE_INIT_START                                                     \
+    int _X( InitModule ) ( module_t *p_module )                               \
+    {                                                                         \
+        int i_shortcut = 0;                                                   \
+        p_module->psz_name = MODULE_STRING;                                   \
+        p_module->psz_longname = MODULE_STRING;                               \
+        p_module->psz_program = NULL;                                         \
+        p_module->i_capabilities = 0;                                         \
+        p_module->i_cpu_capabilities = 0;
+
+#define MODULE_INIT_STOP                                                      \
+        p_module->pp_shortcuts[ i_shortcut ] = NULL;                          \
+        return( 0 );                                                          \
+    }
+
+#define ADD_CAPABILITY( cap, score )                                          \
+    p_module->i_capabilities |= 1 << MODULE_CAPABILITY_##cap;                 \
+    p_module->pi_score[ MODULE_CAPABILITY_##cap ] = score;
+
+#define ADD_REQUIREMENT( cap )                                                \
+    p_module->i_cpu_capabilities |= CPU_CAPABILITY_##cap;
+
+#define ADD_PROGRAM( program )                                                \
+    p_module->psz_program = program;
+
+#define ADD_SHORTCUT( shortcut )                                              \
+    p_module->pp_shortcuts[ i_shortcut ] = shortcut;                          \
+    i_shortcut++;
+
+#define SET_DESCRIPTION( desc )                                               \
+    p_module->psz_longname = desc;
+
+/*
+ * ActivateModule: this function is called before functions can be accessed,
+ * we do allocation tasks here, and maybe additional stuff such as large
+ * table allocation. Once ActivateModule is called we are almost sure the
+ * module will be used.
+ */
+#define MODULE_ACTIVATE_START                                                 \
+    DECLARE_SYMBOLS;                                                          \
+                                                                              \
+    int _X( ActivateModule ) ( module_t *p_module )                           \
+    {                                                                         \
+        p_module->p_functions =                                               \
+          ( module_functions_t * )malloc( sizeof( module_functions_t ) );     \
+        if( p_module->p_functions == NULL )                                   \
+        {                                                                     \
+            return( -1 );                                                     \
+        }                                                                     \
+        p_module->p_config = p_config;                                        \
+        STORE_SYMBOLS;
+
+#define MODULE_ACTIVATE_STOP                                                  \
+        return( 0 );                                                          \
+    }
+
+/*
+ * DeactivateModule: this function is called after we are finished with the
+ * module. Everything that has been done in ActivateModule needs to be undone
+ * here.
+ */
+#define MODULE_DEACTIVATE_START                                               \
+    int _X( DeactivateModule )( module_t *p_module )                          \
+    {                                                                         \
+        free( p_module->p_functions );
+
+#define MODULE_DEACTIVATE_STOP                                                \
+        return( 0 );                                                          \
+    }
+
 /*****************************************************************************
  * Macros used to build the configuration structure.
  *****************************************************************************/
-#ifdef BUILTIN
-#   define MODULE_CONFIG_START \
-        static module_config_t p_config[] = { \
-            { MODULE_CONFIG_ITEM_START, NULL, NULL, NULL, NULL },
-#else
-#   define MODULE_CONFIG_START \
-        module_symbols_t* p_symbols; \
-        static module_config_t p_config[] = { \
-        { MODULE_CONFIG_ITEM_START, NULL, NULL, NULL, NULL },
-#endif
+
+#define MODULE_CONFIG_START \
+    static module_config_t p_config[] = { \
+    { MODULE_CONFIG_ITEM_START, NULL, NULL, NULL, NULL },
 
 #define MODULE_CONFIG_STOP \
-    { MODULE_CONFIG_ITEM_END, NULL, NULL, NULL, NULL } \
-};
+    { MODULE_CONFIG_ITEM_END, NULL, NULL, NULL, NULL } };
 
 #define ADD_WINDOW( text ) \
     { MODULE_CONFIG_ITEM_WINDOW, text, NULL, NULL, NULL },
 #define ADD_SPIN( text, name, p_getlist, p_update ) \
     { MODULE_CONFIG_ITEM_SPIN, text, name, p_getlist, p_update },
 
-
index dd3b5d71ac7db7bdc9b63eff69d03bc62888d60b..e6fb445613bdbdbb9e3027be3d88fb6fe9858423 100644 (file)
@@ -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.8 2001/11/28 15:08:04 massiot Exp $
+ * $Id: mtime.h,v 1.9 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-/*****************************************************************************
- * Required headers:
- *  none
- * this header includes inline functions
- *****************************************************************************/
-
 /*****************************************************************************
  * LAST_MDATE: date which will never happen
  *****************************************************************************
 /*****************************************************************************
  * 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
+#endif
+
index b9c2f2ed2484e006b05ea24bde810f5334cb32bc..552a94e0ff6001f444de2d19eeb53e5a8854d304 100644 (file)
@@ -4,7 +4,7 @@
  * modules.
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: netutils.h,v 1.17 2001/11/23 18:47:51 massiot Exp $
+ * $Id: netutils.h,v 1.18 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Henri Fallon <henri@videolan.org>
  *****************************************************************************/
 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
 
index b37a616c99db657beb6c5c04801c644af35de69e..ab3fd3bd484be826f10f2538b4c56e377e80c07c 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides a portable threads implementation.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: threads.h,v 1.32 2001/12/13 20:47:46 sam Exp $
+ * $Id: threads.h,v 1.33 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -156,17 +156,25 @@ typedef void *(*vlc_thread_func_t)(void *p_data);
  * Prototypes
  *****************************************************************************/
 
-/* Message functions - this is kludgy because we are included before
- * modules_export.h */
-#ifdef PLUGIN
-#   define intf_ErrMsg p_symbols->intf_ErrMsg
-#   define intf_WarnMsg p_symbols->intf_WarnMsg
-#endif
-
 #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 */
@@ -182,21 +190,6 @@ typedef struct wrapper_s
 
 } wrapper_t;
 
-#ifdef WIN32
-struct itimerval
-{
-    struct timeval it_value;
-    struct timeval it_interval;
-};
-
-int setitimer(int kind, const struct itimerval* itnew,
-             struct itimerval* itold);
-
-#define ITIMER_REAL 1
-#define ITIMER_PROF 2
-
-#endif /* WIN32 */
-
 #endif /* GPROF */
 
 /*****************************************************************************
@@ -983,7 +976,3 @@ static void *vlc_thread_wrapper( void *p_wrapper )
 }
 #endif
 
-#ifdef PLUGIN
-#   undef intf_WarnMsg
-#   undef intf_ErrMsg
-#endif
index ef4dbc6a91da4563e9292a6e1ecf024599b0b6be..38e1c2ca8396dc90638c81462ee18070b5b742e3 100644 (file)
@@ -4,7 +4,7 @@
  * includes all common video types and constants.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video.h,v 1.35 2001/12/16 16:18:36 sam Exp $
+ * $Id: video.h,v 1.36 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-/*****************************************************************************
- * Requires:
- *  "config.h"
- *  "common.h"
- *  "mtime.h"
- *****************************************************************************/
-
 /*****************************************************************************
  * plane_t: description of a planar graphic field
  *****************************************************************************/
@@ -69,12 +62,6 @@ typedef struct picture_s
     int             i_refcount;                    /* link reference counter */
     mtime_t         date;                                    /* display date */
 
-    /* These values can be calculated from i_chroma, i_width and i_height
-     * but we leave them to prevent unnecessary calculation */
-    int             i_size;
-    int             i_chroma_width;
-    int             i_chroma_size;
-
     /* Picture margins - needed because of possible padding issues */
     int             i_left_margin;
     int             i_right_margin;
@@ -87,7 +74,7 @@ typedef struct picture_s
     boolean_t       b_repeat_first_field;                         /* RFF bit */
     boolean_t       b_top_field_first;               /* which field is first */
 
-    /* Macroblock counter - the decoder use it to verify if it has
+    /* Macroblock counter - the decoder uses it to verify if it has
      * decoded all the macroblocks of the picture */
     int             i_deccount;
     vlc_mutex_t     lock_deccount;
@@ -99,7 +86,8 @@ typedef struct picture_s
 } picture_t;
 
 /*****************************************************************************
- * picture_heap_t: video picture heap
+ * 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
 {
index 186d4f04430565304abf4cbe00561abc4d124dff..fb0fdb9969fd2b858f6ba823e9ec2cc6bc4088da 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppenned video output thread.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_output.h,v 1.67 2001/12/19 03:50:22 sam Exp $
+ * $Id: video_output.h,v 1.68 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -39,7 +39,11 @@ typedef struct vout_bank_s
 
 } 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
@@ -50,7 +54,8 @@ 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)( picture_t *p_source, picture_t *p_dest );
+typedef void (vout_chroma_convert_t)( struct vout_thread_s *,
+                                      picture_t *, picture_t * );
 
 typedef struct vout_chroma_s
 {
@@ -63,7 +68,6 @@ typedef struct vout_chroma_s
     /* Plugin used and shortcuts to access its capabilities */
     struct module_s *   p_module;
     int  ( * pf_init )  ( struct vout_thread_s * );
-    int  ( * pf_reset ) ( struct vout_thread_s * );
     void ( * pf_end )   ( struct vout_thread_s * );
 
 } vout_chroma_t;
@@ -183,6 +187,7 @@ typedef struct vout_thread_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+#ifndef PLUGIN
 void            vout_InitBank       ( void );
 void            vout_EndBank        ( void );
 
@@ -212,4 +217,19 @@ 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
+#endif
 
similarity index 95%
rename from include/common.h
rename to include/videolan/vlc.h
index bb92dd14aaeff3c378daf05659e4236bd7bc4973..161f2232a0e6f446f5a4789c9bfd08f2b75bdfce 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * common.h: common definitions
+ * vlc.h: common definitions
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.62 2001/12/30 05:38:44 sam Exp $
+ * $Id: vlc.h,v 1.1 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
 /*****************************************************************************
  * Required vlc headers
  *****************************************************************************/
+#include "defs.h"
 #include "config.h"
 #include "int_types.h"
 
+#if defined( PLUGIN ) || defined( BUILTIN )
+#   include "modules_inner.h"
+#endif
+
 /*****************************************************************************
  * Basic types definitions
  *****************************************************************************/
@@ -154,6 +159,10 @@ 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;
 
+/* Decoders */
+struct decoder_config_s;
+struct decoder_fifo_s;
+
 /* Misc */
 struct macroblock_s;
 struct data_packet_s;
@@ -162,15 +171,13 @@ 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;
-
-/* Decoders */
-struct decoder_config_s;
-struct decoder_fifo_s;
+struct probedata_s;
 
 /*****************************************************************************
  * Macros and inline functions
@@ -407,6 +414,20 @@ typedef __int64 off_t;
 
 #endif
 
+/*****************************************************************************
+ * CPU capabilities
+ *****************************************************************************/
+#define CPU_CAPABILITY_NONE    0
+#define CPU_CAPABILITY_486     1<<0
+#define CPU_CAPABILITY_586     1<<1
+#define CPU_CAPABILITY_PPRO    1<<2
+#define CPU_CAPABILITY_MMX     1<<3
+#define CPU_CAPABILITY_3DNOW   1<<4
+#define CPU_CAPABILITY_MMXEXT  1<<5
+#define CPU_CAPABILITY_SSE     1<<6
+#define CPU_CAPABILITY_ALTIVEC 1<<16
+#define CPU_CAPABILITY_FPU     1<<31
+
 /*****************************************************************************
  * I18n stuff
  *****************************************************************************/
@@ -433,10 +454,6 @@ typedef struct module_symbols_s
     void   ( * main_PutIntVariable ) ( char *, int );
     void   ( * main_PutPszVariable ) ( char *, char * );
 
-    int  ( * TestProgram )  ( char * );
-    int  ( * TestMethod )   ( char *, char * );
-    int  ( * TestCPU )      ( int );
-
     int  ( * intf_ProcessKey ) ( struct intf_thread_s *, int );
     void ( * intf_AssignKey )  ( struct intf_thread_s *, int, int, int );
 
@@ -563,8 +580,8 @@ typedef struct module_symbols_s
 
     char * ( * DecodeLanguage ) ( u16 );
 
-    struct module_s * ( * module_Need )    ( int, void * );
-    void ( * module_Unneed )        ( struct module_s * );
+    struct module_s * ( * module_Need ) ( int, char *, struct probedata_s * );
+    void ( * module_Unneed )            ( struct module_s * );
 } module_symbols_t;
 
 #ifdef PLUGIN
@@ -574,5 +591,20 @@ extern module_symbols_t* p_symbols;
 /*****************************************************************************
  * Required vlc headers
  *****************************************************************************/
+#ifdef SYS_BEOS
+#   include "beos_specific.h"
+#endif
+#ifdef SYS_DARWIN
+#   include "darwin_specific.h"
+#endif
+#ifdef WIN32
+#   include "win32_specific.h"
+#endif
+
+#include "intf_msg.h"
+#include "threads.h"
+#include "mtime.h"
+#include "modules.h"
+
 #include "main.h"
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 8af3132986b4b05b2fdbdb82392efa9d401533fb..b7cd3d0339a044d109b67e68801e4ca9dab54d6f 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) AC3 audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_C = ac3_adec.o ac3_decoder.o ac3_parse.o ac3_exponent.o ac3_bit_allocate.o ac3_mantissa.o ac3_rematrix.o ac3_imdct.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../ac3_adec.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../ac3_adec.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+ac3_adec_SOURCES = ac3_adec.c ac3_decoder.c ac3_parse.c ac3_exponent.c ac3_bit_allocate.c ac3_mantissa.c ac3_rematrix.c ac3_imdct.c
index 6029fb491207389179fe0594d44e2be339ea62b8..27e27854d014b834a51759a33aaf284a725a241e 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_adec.c: ac3 decoder module main file
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_adec.c,v 1.10 2001/12/30 05:38:44 sam Exp $
+ * $Id: ac3_adec.c,v 1.11 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME ac3_adec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>                                              /* getpid() */
-#endif
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* memset() */
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
+
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>                                           /* getpid() */
+#endif
 
 #include "audio_output.h"
 
@@ -47,9 +39,6 @@
 #include "input_ext-dec.h"
 #include "input_ext-intf.h"                                /* MPEG?_AUDIO_ES */
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
@@ -80,13 +69,11 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for AC3 decoder module" )
-    ADD_COMMENT( "Nothing to configure" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "AC3 sofware decoder";
+    SET_DESCRIPTION( "software AC3 decoder" )
+    ADD_CAPABILITY( DECODER, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -239,7 +226,9 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
      * Choose the best downmix module
      */
 #define DOWNMIX p_ac3thread->ac3_decoder->downmix
-    DOWNMIX.p_module = module_Need( MODULE_CAPABILITY_DOWNMIX, NULL );
+    DOWNMIX.p_module = module_Need( MODULE_CAPABILITY_DOWNMIX,
+                               main_GetPszVariable( DOWNMIX_METHOD_VAR, NULL ),
+                               NULL );
 
     if( DOWNMIX.p_module == NULL )
     {
@@ -265,7 +254,9 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
     p_ac3thread->ac3_decoder->imdct = memalign(16, sizeof(imdct_t));
     
 #define IMDCT p_ac3thread->ac3_decoder->imdct
-    IMDCT->p_module = module_Need( MODULE_CAPABILITY_IMDCT, NULL );
+    IMDCT->p_module = module_Need( MODULE_CAPABILITY_IMDCT,
+                               main_GetPszVariable( IMDCT_METHOD_VAR, NULL ),
+                               NULL );
 
     if( IMDCT->p_module == NULL )
     {
index 1a27190f6efcd591b5bb54187e731d075572d38c..e8edf00c813ff611e735141b5297eeb657782fb1 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_bit_allocate.c: ac3 allocation tables
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: ac3_bit_allocate.c,v 1.5 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_bit_allocate.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memcpy() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index 8c2dd36475bf218600954c76d47fbfc1432d276d..f895cbcca0b21157ccbfc92cc3bd84b60718fe6a 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_decoder.c: core ac3 decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_decoder.c,v 1.5 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_decoder.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memcpy() */
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index 69efe2aaccd9411047ff21fee0dd7228e2e59fde..4f5b851eddadd2dab8f3bfe7f05f94c1025ff139 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_exponent.c: ac3 exponent calculations
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_exponent.c,v 1.5 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_exponent.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index 143c9d2dcd4bd3cf42dfcb8e57cb02e9442b3de6..2bd40e2ca7b82bbed0477f28ade17e427a1c4018 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_imdct.c: ac3 DCT
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_imdct.c,v 1.6 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_imdct.c,v 1.7 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memcpy() */
 
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index 8c7b7de321664b0f429c3bdac8364ccf279bc145..238c97502667c0edcbf84f8a1d05ff9a4fd6b5b9 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_mantissa.c: ac3 mantissa computation
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_mantissa.c,v 1.5 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_mantissa.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memcpy() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index 6e73f030bd06dbc6e719a78f3fccf80486cbc18b..9f35319df67150f5e06c4ee8f6aee405c820ab38 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_parse.c: ac3 parsing procedures
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_parse.c,v 1.5 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_parse.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memset() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index ef87a4816f11297c080a61bbf45033d9eae4a6c0..3a2df3370cbc7fdaac26ec1c3ef747e5ee80cb6e 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_rematrix.c: ac3 audio rematrixing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_rematrix.c,v 1.5 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_rematrix.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#include <string.h>                                              /* memcpy() */
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "ac3_imdct.h"
 #include "ac3_downmix.h"
 #include "ac3_decoder.h"
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 20504820a358d7e8cf7405b08d6ca963fcd90d33..b7af1f1d5b7c8700197711f7b72934f3b77539ac 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) AC3 spdif audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_C = ac3_spdif.o ac3_iec958.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../ac3_spdif.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../ac3_spdif.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+ac3_spdif_SOURCES = ac3_spdif.c ac3_iec958.c
index faaee452cd79d02b5c7eb6363edff3ef8c87bc77..cc8d1f41886818a5ca0e310f19206848ad87b1e5 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_iec958.c: ac3 to spdif converter
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ac3_iec958.c,v 1.4 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_iec958.c,v 1.5 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
 /****************************************************************************
  * Preamble
  ****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>                                              /* memset() */
 #include <fcntl.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#   include <unistd.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-
 #include "audio_output.h"
 
 #include "stream_control.h"
@@ -50,8 +45,6 @@
 #include "ac3_spdif.h"
 #include "ac3_iec958.h"
 
-#include "modules_export.h"
-
 /****************************************************************************
  * Local structures and tables
  ****************************************************************************/
index f8555db58061876d1a3b7b4077cb9dfb01116647..21e035691294c9da9c1037589c1505db897d6bab 100644 (file)
@@ -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.9 2001/12/30 05:38:44 sam Exp $
+ * $Id: ac3_spdif.c,v 1.10 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME ac3_spdif
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>                                              /* memcpy() */
 #include <fcntl.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#   include <unistd.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-
 #include "audio_output.h"
 
 #include "stream_control.h"
@@ -53,9 +45,6 @@
 #include "ac3_spdif.h"
 #include "ac3_iec958.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define FRAME_NB 8
 
 /****************************************************************************
@@ -80,13 +69,11 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for ac3 spdif decoder module" )
-    ADD_COMMENT( "Nothing to configure" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "Ac3 SPDIF decoder for AC3 pass-through";
+    SET_DESCRIPTION( "SPDIF pass-through AC3 decoder" )
+    ADD_CAPABILITY( DECODER, 100 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -104,11 +91,8 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int decoder_Probe( probedata_t *p_data )
 {
-    if( main_GetIntVariable( AOUT_SPDIF_VAR, 0 ) && 
-        p_data->i_type == AC3_AUDIO_ES )
-        return( 100 );
-    else
-        return( 0 );
+    return( ( main_GetIntVariable( AOUT_SPDIF_VAR, 0 )
+               && p_data->i_type == AC3_AUDIO_ES ) ? 100 : 0 );
 }
 
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index d65fae412a460ee17326d7d2a567ca052b8e4b15..d71a181e5e33da3781f44036ad3f7fcc9c94f4fc 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) ALSA module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = alsa.o aout_alsa.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../alsa.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_ALSA) -lasound -lm -ldl
-
-../alsa.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+alsa_SOURCES = alsa.c aout_alsa.c
index ffede17d1e5d1bc4d896dab0af1cbe39419cb32c..e7adf02834f4b86286541cf818acf6783516c711 100644 (file)
@@ -2,7 +2,7 @@
  * alsa.c : alsa plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: alsa.c,v 1.12 2001/12/09 17:01:36 sam Exp $
+ * $Id: alsa.c,v 1.13 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME alsa
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -54,9 +42,9 @@ MODULE_CONFIG_START
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities =  MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_AOUT;
-    p_module->psz_longname = "Alsa audio module";
+    SET_DESCRIPTION( "Alsa audio module" )
+    ADD_CAPABILITY( AOUT, 50 )
+    ADD_SHORTCUT( "alsa" )
 MODULE_INIT_STOP
     
 MODULE_ACTIVATE_START
index c3bbf0395e1d654e2861fda4624f73f830205c7e..0ea197c4286d8f65ba295a471ea59d878c077207 100644 (file)
@@ -2,7 +2,7 @@
  * aout_alsa.c : Alsa functions library
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: aout_alsa.c,v 1.23 2001/12/19 03:50:22 sam Exp $
+ * $Id: aout_alsa.c,v 1.24 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org> - Original Author
  *          Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME alsa
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>                                           /* "intf_msg.h" */
 
 #include <alsa/asoundlib.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 typedef struct alsa_device_s
 {
     int i_num;
@@ -106,11 +93,6 @@ static int aout_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( AOUT_METHOD_VAR, "alsa" ) )
-    {
-        return( 999 );
-    }
-
     /* And return score */
     return( 100 );
 }
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index cd6b2a8786cbc90ce23a2a8bc7764260f86ea0b0..97097b154b9116c5abef738d815edf739c381af3 100644 (file)
@@ -1,37 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) arts module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = arts.o aout_arts.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Special plugin modifications
-#
-
-CFLAGS += $(CFLAGS_ARTS)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../arts.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_ARTS)
-
-../arts.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+arts_SOURCES = arts.c aout_arts.c
index 7da9ea29f9cc54e319c11b08b77a9abc0a7e926d..1b25a707c102af06d4331521f7f2e37b8b358ef8 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME arts
-#include "modules_inner.h"
-
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <string.h>                                            /* strerror() */
 
 #include <artsc.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * aout_sys_t: arts audio output method descriptor
  *****************************************************************************
@@ -94,11 +81,6 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int aout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( AOUT_METHOD_VAR, "arts" ) )
-    {
-        return( 999 );
-    }
-
     /* We don't have to test anything -- if we managed to open this plugin,
      * it means we have the appropriate libs. */
     return( 50 );
index 3a9f96bf31d0cf240b5f429de91c18495ced26f7..ea8280383d6dcdc99f41d25aa9508b7f49eb332e 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME arts
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -48,15 +37,14 @@ void _M( aout_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for arts module" )
-    ADD_FRAME( "aRts" )
-        ADD_COMMENT( "This module does not need configuration" )
+    ADD_WINDOW( "Configuration for arts module" )
+        ADD_FRAME( "aRts" )
+            ADD_COMMENT( "This module does not need configuration" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_AOUT;
-    p_module->psz_longname = "arts audio module";
+    SET_DESCRIPTION( "aRts audio module" )
+    ADD_CAPABILITY( AOUT, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index f6b2048b1e6a840ef91047b3fe282b59805928fb..a083eee7d2c9007ec74e5dca1cb5ab16ea0fae43 100644 (file)
@@ -2,7 +2,7 @@
  * InterfaceWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: InterfaceWindow.cpp,v 1.10 2001/12/07 18:33:07 sam Exp $
+ * $Id: InterfaceWindow.cpp,v 1.11 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -23,7 +23,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
 
 /* System headers */
 #include <kernel/OS.h>
 /* VLC headers */
 extern "C"
 {
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
+
 #include "stream_control.h"
 #include "input_ext-intf.h"
+
 #include "interface.h"
 #include "intf_playlist.h"
+
 #include "audio_output.h"
 }
 
index 22b19bf5f4b312016d31f5c73a852e039bd4b518..d0444a6f6d283e9375377ab96d6b49c2b9445d95 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) BeOS module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_CPP = beos.o aout_beos.o vout_beos.o intf_beos.o InterfaceWindow.o DrawingTidbits.o TransportButton.o PlayListWindow.o MediaControlView.o
-BUILTIN_CPP = $(PLUGIN_CPP:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_CPP) $(BUILTIN_CPP)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../beos.so: $(PLUGIN_CPP)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_BEOS)
-
-../beos.a: $(BUILTIN_CPP)
-       ar r $@ $^
-       $(RANLIB) $@
-
+beos_SRC = beos.cpp aout_beos.cpp vout_beos.cpp intf_beos.cpp InterfaceWindow.cpp DrawingTidbits.cpp TransportButton.cpp PlayListWindow.cpp MediaControlView.cpp
index 3a3ed7036a6f6899fd95ed6a4fcd43fe1eddddeb..9ef461f19339e1eb7409fb3011454e5030117950 100644 (file)
@@ -2,7 +2,7 @@
  * MediaControlView.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: MediaControlView.cpp,v 1.6 2001/12/07 18:33:07 sam Exp $
+ * $Id: MediaControlView.cpp,v 1.7 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Tony Castley <tony@castley.net>
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
 
 /* System headers */
 #include <InterfaceKit.h>
 #include <AppKit.h>
 #include <string.h>
 
-
 /* VLC headers */
 extern "C"
 {
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
+
 #include "stream_control.h"
 #include "input_ext-intf.h"
+
 #include "interface.h"
 #include "intf_playlist.h"
 }
index 4758b47e3ce5fc9f8e1875433ed95fa5b15b64bf..a29c6b2914685575a1f0cc44d943cc36a41da86f 100644 (file)
@@ -2,7 +2,7 @@
  * PlayListWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PlayListWindow.cpp,v 1.4 2001/12/07 18:33:07 sam Exp $
+ * $Id: PlayListWindow.cpp,v 1.5 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -23,7 +23,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
 
 /* System headers */
 #include <InterfaceKit.h>
 /* VLC headers */
 extern "C"
 {
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
+
 #include "stream_control.h"
 #include "input_ext-intf.h"
+
 #include "interface.h"
 #include "intf_playlist.h"
 }
index 5643d0f7330609e3929f0fe0a4cabc4116d53663..015003ee834280f32770641b7b7b9107f484b288 100644 (file)
@@ -2,7 +2,7 @@
  * aout_beos.cpp: BeOS audio output
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: aout_beos.cpp,v 1.17 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_beos.cpp,v 1.18 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME beos
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <kernel/OS.h>
 
 extern "C"
 {
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
-
-#include "modules.h"
-#include "modules_export.h"
 }
 
 /*****************************************************************************
index 12552396e8ea238ff8fb8ea32ab768a76cdbc051..4127595b3b53f782443f32a3c915a19ee8de3203 100644 (file)
@@ -2,7 +2,7 @@
  * beos.cpp : BeOS plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: beos.cpp,v 1.14 2001/12/09 17:01:36 sam Exp $
+ * $Id: beos.cpp,v 1.15 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME beos
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
 extern "C"
 {
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
index 2b3e44be78a71602b0a344505e422fbb3f213987..628205dead18cf226f838a890aac4019db1f6a25 100644 (file)
@@ -2,7 +2,7 @@
  * intf_beos.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: intf_beos.cpp,v 1.34 2001/12/07 18:33:07 sam Exp $
+ * $Id: intf_beos.cpp,v 1.35 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME beos
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <InterfaceKit.h>
 
 extern "C"
 {
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
+
 #include "stream_control.h"
+
 #include "interface.h"
 #include "input_ext-intf.h"
-#include "modules.h"
-#include "modules_export.h"
 }
 
 #include "InterfaceWindow.h"
index e41f9fa2716ee67649b2e7f0b5f3c1f4241f68b2..7672747ad2b24d0537525333a57f50d7eb662e8d 100644 (file)
@@ -2,7 +2,7 @@
  * vout_beos.cpp: beos video output display method
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: vout_beos.cpp,v 1.35 2001/12/07 18:33:07 sam Exp $
+ * $Id: vout_beos.cpp,v 1.36 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME beos
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <stdio.h>
 
 extern "C"
 {
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "interface.h"
-
-#include "modules.h"
-#include "modules_export.h"
 }
 
 #include "VideoWindow.h"
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 3af86e6de7c3382859e178f5f15017f2bc89762f..9a76d5d4b6c175398ce76e2889f8509a95bf0672 100644 (file)
@@ -1,34 +1,2 @@
-###############################################################################
-# vlc (VideoLAN Client) chroma conversion modules makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_YV12_RGB8 = yv12_rgb8.o
-
-BUILTIN_YV12_RGB8 = $(PLUGIN_YV12_RGB8:%.o=BUILTIN_%.o)
-
-PLUGIN_C = $(PLUGIN_YV12_RGB8)
-BUILTIN_C = $(BUILTIN_YV12_RGB8)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../chroma_yv12_rgb8.so: $(PLUGIN_YV12_RGB8)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../chroma_yv12_rgb8.a: $(BUILTIN_YV12_RGB8)
-       ar r $@ $^
-       $(RANLIB) $@
-
+chroma_yv12_rgb8_SOURCES = yv12_rgb8.c
+chroma_yv12_rgb16_SOURCES = yv12_rgb16.c
index 833791edf41e31ed45e40dd787afeaac7e4fb68d..325cfaf83bef00dc98c657ced6598c590b8ef58b 100644 (file)
@@ -2,7 +2,7 @@
  * common.c: Chroma transformation functions
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: common.c,v 1.1 2001/12/16 16:18:36 sam Exp $
+ * $Id: common.c,v 1.2 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  * Boston, MA 02111-1307, USA.
  *****************************************************************************/
 
-#define MODULE_NAME yuv
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <math.h>                                            /* exp(), pow() */
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
-#include "config.h"
-#include "common.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -48,9 +39,6 @@
 
 #include "intf_msg.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 static int     yuv_Probe      ( probedata_t *p_data );
 static int     yuv_Init       ( vout_thread_t *p_vout );
 static int     yuv_Reset      ( vout_thread_t *p_vout );
diff --git a/plugins/chroma/yv12_rgb16.c b/plugins/chroma/yv12_rgb16.c
new file mode 100644 (file)
index 0000000..e6a06e0
--- /dev/null
@@ -0,0 +1,223 @@
+/*****************************************************************************
+ * yv12_rgb16.c : YUV to paletted RGB16 conversion module for vlc
+ *****************************************************************************
+ * Copyright (C) 2000 VideoLAN
+ * $Id: yv12_rgb16.c,v 1.1 2001/12/30 07:09:54 sam Exp $
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <math.h>                                            /* exp(), pow() */
+#include <errno.h>                                                 /* ENOMEM */
+#include <string.h>                                            /* strerror() */
+#include <stdlib.h>                                      /* malloc(), free() */
+
+#include <videolan/vlc.h>
+
+#include "video.h"
+#include "video_output.h"
+
+#include "chroma_common.h"
+#include "transforms.h"
+
+/*****************************************************************************
+ * chroma_sys_t: chroma method descriptor
+ *****************************************************************************
+ * This structure is part of the chroma transformation descriptor, it
+ * describes the yuv2rgb16 specific properties.
+ *****************************************************************************/
+typedef struct chroma_sys_s
+{
+    u8 *p_tables;
+    u8 *p_buffer;
+    u8 *p_offset;
+} chroma_sys_t;
+
+/*****************************************************************************
+ * Local and extern prototypes.
+ *****************************************************************************/
+static void chroma_getfunctions ( function_list_t * p_function_list );
+
+static int  chroma_Probe        ( probedata_t *p_data );
+static int  chroma_Init         ( vout_thread_t *p_vout );
+static void chroma_End          ( vout_thread_t *p_vout );
+
+static void ConvertYUV420RGB16  ( vout_thread_t *, picture_t *, picture_t * );
+
+/*****************************************************************************
+ * Build configuration tree.
+ *****************************************************************************/
+MODULE_CONFIG_START
+MODULE_CONFIG_STOP
+
+MODULE_INIT_START
+    SET_DESCRIPTION( "YV12 to RGB16 conversion module" )
+    ADD_CAPABILITY( CHROMA, 80 )
+MODULE_INIT_STOP
+
+MODULE_ACTIVATE_START
+    _M( chroma_getfunctions )( &p_module->p_functions->chroma );
+MODULE_ACTIVATE_STOP
+
+MODULE_DEACTIVATE_START
+MODULE_DEACTIVATE_STOP
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+void _M( chroma_getfunctions )( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = chroma_Probe;
+    p_function_list->functions.chroma.pf_init = chroma_Init;
+    p_function_list->functions.chroma.pf_end  = chroma_End;
+}
+
+/*****************************************************************************
+ * chroma_Probe: return a score
+ *****************************************************************************
+ * This function checks that we can handle the required data
+ *****************************************************************************/
+static int chroma_Probe( probedata_t *p_data )
+{
+    if( p_data->chroma.p_render->i_chroma != YUV_420_PICTURE
+         || p_data->chroma.p_output->i_chroma != RGB_16BPP_PICTURE )
+    {
+        return 0;
+    }
+
+    return( 100 );
+}
+
+/*****************************************************************************
+ * chroma_Init: allocate a chroma function
+ *****************************************************************************
+ * This function allocates and initializes a chroma function
+ *****************************************************************************/
+static int chroma_Init( vout_thread_t *p_vout )
+{
+    if( p_vout->render.i_chroma != YUV_420_PICTURE
+         || p_vout->output.i_chroma != RGB_16BPP_PICTURE )
+    {
+        return -1;
+    }
+
+#if 0
+    p_vout->chroma.p_sys = malloc( sizeof( chroma_sys_t ) );
+    if( p_vout->chroma.p_sys == NULL )
+    {
+        return -1;
+    }
+#endif
+
+    /* FIXME: this is really suboptimal ! */
+    p_vout->chroma.pf_convert = ConvertYUV420RGB16;
+
+    return 0; 
+}
+
+/*****************************************************************************
+ * chroma_End: free the chroma function
+ *****************************************************************************
+ * This function frees the previously allocated chroma function
+ *****************************************************************************/
+static void chroma_End( vout_thread_t *p_vout )
+{
+#if 0
+    free( p_vout->chroma.p_sys );
+#endif
+
+    return; 
+}
+
+/* Following functions are local */
+
+/*****************************************************************************
+ * ConvertYUV420RGB16: color YUV 4:2:0 to RGB 8 bpp
+ *****************************************************************************/
+static void ConvertYUV420RGB16( vout_thread_t *p_vout, picture_t *p_source,
+                                                       picture_t *p_dest )
+{
+    /**********************************************************************
+     *          XXX   XXX    FIXME      FIXME   XXX  XXX    XXX           *
+     *          XXX   XXX   XXX TODO  TODO XXX  XXX  XXX   TODO           *
+     *          XXX   XXX  XXX   XXX  XXX       XXX XXX    XXX            *
+     *          XXX FIXME  XXX FIXME  XXX       FIXME     XXX             *
+     *          XXX   XXX  XXX   XXX  XXX       XXX XXX   XXX             *
+     *          XXX   XXX  XXX   XXX  TODO XXX  XXX  XXX                  *
+     *          XXX   XXX  XXX   XXX    FIXME   XXX  XXX  XXX             *
+     **********************************************************************/
+
+    pixel_data_t *p_in, *p_in_end, *p_out, *p_out_end;
+
+    p_in = p_source->planes[ Y_PLANE ].p_data;
+    p_in_end = p_in + p_source->planes[ Y_PLANE ].i_bytes;
+
+    p_out = p_dest->planes[ RGB_PLANE ].p_data;
+    p_out_end = p_out + p_dest->planes[ RGB_PLANE ].i_bytes;
+
+    while( p_in < p_in_end && p_out < p_out_end )
+    {
+        int i_src = p_source->planes[ Y_PLANE ].i_line_bytes;
+        int i_dst = p_dest->planes[ RGB_PLANE ].i_line_bytes / 2;
+
+        /* Masks: 0xf800 0x07e0 0x001f */
+#define RED ((u16*)p_out)[i_dst--] = (u16)(p_in[i_src--]>>3) << 11;
+#define GREEN ((u16*)p_out)[i_dst--] = (u16)(p_in[i_src--]>>2) << 5;
+#define BLUE ((u16*)p_out)[i_dst--] = (u16)(p_in[i_src--]>>3) << 0;
+#define WHITE ((u16*)p_out)[i_dst--] = ((u16)(p_in[i_src]>>3) << 11) | ((u16)(p_in[i_src]>>2) << 5) | ((u16)(p_in[i_src]>>3) << 0); i_src--;
+#define BLACK ((u16*)p_out)[i_dst--] = 0; i_src--;
+        
+        while( i_src && i_dst )
+        {
+            BLACK; BLUE; GREEN; RED; GREEN; BLUE; WHITE; RED;
+            GREEN; BLUE; WHITE; RED; BLACK; BLUE; GREEN; RED;
+        }
+
+        p_in += p_source->planes[ Y_PLANE ].i_line_bytes;
+        p_out += p_dest->planes[ RGB_PLANE ].i_line_bytes;
+
+        i_src = p_source->planes[ Y_PLANE ].i_line_bytes;
+        i_dst = p_dest->planes[ RGB_PLANE ].i_line_bytes / 2;
+
+        while( i_src && i_dst )
+        {
+            GREEN; RED; WHITE; BLUE; BLACK; RED; GREEN; BLUE;
+            BLACK; RED; GREEN; BLUE; GREEN; RED; WHITE; BLUE;
+        }
+
+        p_in += p_source->planes[ Y_PLANE ].i_line_bytes;
+        p_out += p_dest->planes[ RGB_PLANE ].i_line_bytes;
+    }
+
+    /**********************************************************************
+     *          XXX   XXX  XXX   XXX    FIXME   XXX  XXX    XXX           *
+     *          XXX   XXX  XXX   XXX  TODO XXX  XXX  XXX   TODO           *
+     *           XXX XXX   XXX   XXX  XXX       XXX XXX    XXX            *
+     *             TODO    XXX   XXX  XXX       FIXME     XXX             *
+     *            TODO     XXX   XXX  XXX       XXX XXX   XXX             *
+     *           XXX       TODO  XXX  TODO XXX  XXX  XXX                  *
+     *          XXX          FIXME      FIXME   XXX  XXX  XXX             *
+     **********************************************************************/
+}
+
index f9d470e69b69cc0e6d8cf1b89ba41633d79b220c..3585cda3829efa5ca100415b53a5fd9c1f871465 100644 (file)
@@ -2,7 +2,7 @@
  * yv12_rgb8.c : YUV to paletted RGB8 conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: yv12_rgb8.c,v 1.2 2001/12/19 18:14:23 sam Exp $
+ * $Id: yv12_rgb8.c,v 1.3 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME chroma_yv12_rgb8
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <math.h>                                            /* exp(), pow() */
 #include <errno.h>                                                 /* ENOMEM */
 #include <string.h>                                            /* strerror() */
 #include <stdlib.h>                                      /* malloc(), free() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -45,9 +37,6 @@
 #include "chroma_common.h"
 #include "transforms.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * chroma_sys_t: chroma method descriptor
  *****************************************************************************
@@ -77,14 +66,11 @@ static void ConvertYUV420RGB8   ( vout_thread_t *, picture_t *, picture_t * );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for YV12 to RGB8 module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_CHROMA;
-    p_module->psz_longname = "YV12 to paletted RGB8 conversion module";
+    SET_DESCRIPTION( "YV12 to RGB8 conversion module" )
+    ADD_CAPABILITY( CHROMA, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 66ede93a7bb2e3892aa4db77d68b65c4b6bb6e8e..e171eabdb7e7ea7bfe329a8a840babb4e0deda1c 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) DirectX module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = directx.o vout_directx.o vout_events.o aout_directx.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../directx.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_DIRECTX)
-
-../directx.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+directx_SOURCES = directx.c vout_directx.c vout_events.c aout_directx.c
index 19714e6f72cb2387659cf456574723551605c712..37d28f661c7db4b73dea5fcfb9e7aa973a728f7f 100644 (file)
@@ -2,7 +2,7 @@
  * aout_directx.c: Windows DirectX audio output method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_directx.c,v 1.13 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_directx.c,v 1.14 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME directx
-#include "modules_inner.h"
-
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #if defined( _MSC_VER )
 #   include <dsound.h>
@@ -51,9 +41,6 @@
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * aout_sys_t: directx audio output method descriptor
  *****************************************************************************
index 97c9c27c76f8cbe8fbdc3be057d920d0c22fc733..8678229489abe1c535597723eea81477e4e5759e 100644 (file)
@@ -2,7 +2,7 @@
  * directx.c : Windows DirectX plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: directx.c,v 1.3 2001/12/09 17:01:36 sam Exp $
+ * $Id: directx.c,v 1.4 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME directx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
index 86567c66f22981bd7bce243153d59f9cec124300..642fed9008597f47bb114818fcdaeefca38c872b 100644 (file)
@@ -2,7 +2,7 @@
  * vout_directx.c: Windows DirectX video output display method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_directx.c,v 1.16 2001/12/13 12:47:17 sam Exp $
+ * $Id: vout_directx.c,v 1.17 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -21,9 +21,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME directx
-#include "modules_inner.h"
-
 /* ToDo:
  *
  * Double buffering
  * implementing this is not considered high priority.
  * 
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
+#include <videolan/vlc.h>
+
 #include <windows.h>
 #include <windowsx.h>
 
 #   include <directx.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
 #include "netutils.h"
 
 #include "video.h"
@@ -75,9 +67,6 @@
 
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "vout_directx.h"
 
 /*****************************************************************************
index dd4e8d56eaa2237f9af0f0d904ad5866e7b74693..b9fa3c20ffe585d52e627e3e25e94da7bde62f91 100644 (file)
@@ -2,7 +2,7 @@
  * vout_events.c: Windows DirectX video output events handler
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_events.c,v 1.6 2001/12/07 18:33:07 sam Exp $
+ * $Id: vout_events.c,v 1.7 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
  * Preamble: This file contains the functions related to the creation of
  *             a window and the handling of its messages (events).
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
+
 #include "netutils.h"
 
 #include "video.h"
@@ -53,9 +48,6 @@
 
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "vout_directx.h"
 
 /*****************************************************************************
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 51d150c54180e02d7d2726808a3e0a58d372ebaf..33723b4862302394ab729391a90997be88128652 100644 (file)
@@ -1,63 +1,3 @@
-###############################################################################
-# vlc (VideoLAN Client) downmix module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_DOWNMIX = downmix.o ac3_downmix_c.o
-PLUGIN_DOWNMIXSSE = downmixsse.o ac3_downmix_sse.o
-PLUGIN_DOWNMIX3DN = downmix3dn.o ac3_downmix_3dn.o
-
-BUILTIN_DOWNMIX = $(PLUGIN_DOWNMIX:%.o=BUILTIN_DOWNMIX_%.o)
-BUILTIN_DOWNMIXSSE = $(PLUGIN_DOWNMIXSSE:%.o=BUILTIN_DOWNMIXSSE_%.o)
-BUILTIN_DOWNMIX3DN = $(PLUGIN_DOWNMIX3DN:%.o=BUILTIN_DOWNMIX3DN_%.o)
-
-PLUGIN_C = $(PLUGIN_DOWNMIX) $(PLUGIN_DOWNMIXSSE) $(PLUGIN_DOWNMIX3DN)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_DOWNMIX) $(BUILTIN_DOWNMIXSSE) $(BUILTIN_DOWNMIX3DN)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(BUILTIN_DOWNMIX): BUILTIN_DOWNMIX_%.o: .dep/%.d
-$(BUILTIN_DOWNMIX): BUILTIN_DOWNMIX_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=downmix -c -o $@ $<
-
-$(BUILTIN_DOWNMIXSSE): BUILTIN_DOWNMIXSSE_%.o: .dep/%.d
-$(BUILTIN_DOWNMIXSSE): BUILTIN_DOWNMIXSSE_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=downmixsse -c -o $@ $<
-
-$(BUILTIN_DOWNMIX3DN): BUILTIN_DOWNMIX3DN_%.o: .dep/%.d
-$(BUILTIN_DOWNMIX3DN): BUILTIN_DOWNMIX3DN_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=downmix3dn -c -o $@ $<
-
-#
-# Real targets
-#
-
-../downmix.so: $(PLUGIN_DOWNMIX)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../downmix.a: $(BUILTIN_DOWNMIX)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../downmixsse.so: $(PLUGIN_DOWNMIXSSE)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../downmixsse.a: $(BUILTIN_DOWNMIXSSE)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../downmix3dn.so: $(PLUGIN_DOWNMIX3DN)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../downmix3dn.a: $(BUILTIN_DOWNMIX3DN)
-       ar r $@ $^
-       $(RANLIB) $@
-
+downmix_SOURCES = downmix.c ac3_downmix_c.c
+downmixsse_SOURCES = downmixsse.c ac3_downmix_sse.c
+downmix3dn_SOURCES = downmix3dn.c ac3_downmix_3dn.c
index fb6d297fd27bff8c1623ffe3d28d841ac3180ea7..b9c37bab09ce9332decc531e2571e1c20995de35 100644 (file)
@@ -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.8 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_downmix_3dn.c,v 1.9 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME downmix3dn
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_downmix.h"
 
index 722b8f430c24dd95d7b2f3228fae4c47f6e1e713..e4efeeb48a543b60b295091e269901d4534e1bc9 100644 (file)
@@ -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.3 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_downmix_c.c,v 1.4 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME downmix
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memcpy() */
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_downmix.h"
 
index 3927e492a8e53b5cffd40d54876b6894c54d458d..24b338ade5e10fbf84d470e3b9562b7a980a00a8 100644 (file)
@@ -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.8 2001/12/10 04:53:10 sam Exp $
+ * $Id: ac3_downmix_sse.c,v 1.9 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME downmixsse
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_downmix.h"
 
index b7b2dcdd9c36eca67f0906b4c1ed562c70ab7619..702d4d6636c6414f681a114d42a4cbebf4242df1 100644 (file)
@@ -2,7 +2,7 @@
  * downmix.c : AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: downmix.c,v 1.5 2001/12/09 17:01:36 sam Exp $
+ * $Id: downmix.c,v 1.6 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME downmix
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "ac3_downmix.h"
 #include "ac3_downmix_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -54,14 +42,13 @@ static int  downmix_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for AC3 downmix module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_DOWNMIX;
-    p_module->psz_longname = "AC3 downmix module";
+    SET_DESCRIPTION( "AC3 downmix module" )
+    ADD_CAPABILITY( DOWNMIX, 50 )
+    ADD_SHORTCUT( "c" )
+    ADD_SHORTCUT( "downmix" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -96,13 +83,6 @@ static void downmix_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int downmix_Probe( probedata_t *p_data )
 {
-    if( TestMethod( DOWNMIX_METHOD_VAR, "downmix" )
-         || TestMethod( DOWNMIX_METHOD_VAR, "c" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 50 );
 }
 
index 86cfc34dfa30cbe2ba2ca0d08473b0f684307fd8..2e364384c67f55d443a74a496c941caa270d328f 100644 (file)
@@ -2,7 +2,7 @@
  * downmix3dn.c : accelerated 3D Now! AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: downmix3dn.c,v 1.6 2001/12/09 17:01:36 sam Exp $
+ * $Id: downmix3dn.c,v 1.7 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME downmix3dn
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "ac3_downmix.h"
 #include "ac3_downmix_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -54,14 +42,15 @@ static int  downmix_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for AC3 downmix3dn module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_DOWNMIX;
-    p_module->psz_longname = "3D Now! AC3 downmix module";
+    SET_DESCRIPTION( "3D Now! AC3 downmix module" )
+    ADD_CAPABILITY( DOWNMIX, 200 )
+    ADD_REQUIREMENT( 3DNOW )
+    ADD_SHORTCUT( "3dn" )
+    ADD_SHORTCUT( "3dnow" )
+    ADD_SHORTCUT( "downmix3dn" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -96,18 +85,6 @@ static void downmix_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int downmix_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_3DNOW ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( DOWNMIX_METHOD_VAR, "downmix3dn" )
-         || TestMethod( DOWNMIX_METHOD_VAR, "3dn" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 200 );
 }
 
index 0a7c6ebf6c8401e325add2ffd538c12e6b86bd88..25993cdcfc62fa09bac4d27123cce2f0e01ea26e 100644 (file)
@@ -2,7 +2,7 @@
  * downmixsse.c : accelerated SSE AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: downmixsse.c,v 1.6 2001/12/09 17:01:36 sam Exp $
+ * $Id: downmixsse.c,v 1.7 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME downmixsse
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "ac3_downmix.h"
 #include "ac3_downmix_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -54,14 +42,14 @@ static int  downmix_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for AC3 downmixsse module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_DOWNMIX;
-    p_module->psz_longname = "SSE AC3 downmix module";
+    SET_DESCRIPTION( "SSE AC3 downmix module" )
+    ADD_CAPABILITY( DOWNMIX, 200 )
+    ADD_REQUIREMENT( SSE )
+    ADD_SHORTCUT( "sse" )
+    ADD_SHORTCUT( "downmixsse" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -96,18 +84,6 @@ static void downmix_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int downmix_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_SSE ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( DOWNMIX_METHOD_VAR, "downmixsse" )
-         || TestMethod( DOWNMIX_METHOD_VAR, "sse" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 200 );
 }
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 45e7c42f2ff325c9b1e71a3553dc27d071ded72f..e6c16ffc8632cb4077a62fd970a1477bb76f94d1 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) OSS /dev/dsp module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = dsp.o aout_dsp.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../dsp.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../dsp.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+dsp_SOURCES = dsp.c aout_dsp.c
index f2ecfd156433f2433aa6951e8942e87a6df7d6a5..907994aa347405871f041cdbdf7cb0cd065a61f0 100644 (file)
@@ -2,7 +2,7 @@
  * aout_dsp.c : dsp functions library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_dsp.c,v 1.17 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_dsp.c,v 1.18 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -22,9 +22,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dsp
-#include "modules_inner.h"
-
 /* TODO:
  *
  * - an aout_GetFormats() function
@@ -36,8 +33,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <sys/ioctl.h>                                            /* ioctl() */
@@ -46,6 +41,8 @@
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 
+#include <videolan/vlc.h>
+
 #ifdef SYS_BSD
 #include <machine/soundcard.h>       /* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT,
                    SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED, SNDCTL_DSP_GETOSPACE */
                    SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED, SNDCTL_DSP_GETOSPACE */
 #endif
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * aout_sys_t: dsp audio output method descriptor
  *****************************************************************************
@@ -123,11 +111,6 @@ static int aout_Probe( probedata_t *p_data )
     /* Otherwise, there are good chances we can use this plugin, return 100. */
     close( i_fd );
 
-    if( TestMethod( AOUT_METHOD_VAR, "dsp" ) )
-    {
-        return( 999 );
-    }
-
     return( 100 );
 }
 
index 6a5c3dc7667f52808a5d160a54591d3a10571488..b76353d62599ed211310453a83bf8020360ddbac 100644 (file)
@@ -2,7 +2,7 @@
  * dsp.c : OSS /dev/dsp module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: dsp.c,v 1.11 2001/12/09 17:01:36 sam Exp $
+ * $Id: dsp.c,v 1.12 2001/12/30 07:09:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dsp
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -56,9 +45,9 @@ ADD_WINDOW( "Configuration for dsp module" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_AOUT;
-    p_module->psz_longname = "Linux OSS /dev/dsp module";
+    SET_DESCRIPTION( "Linux OSS /dev/dsp module" )
+    ADD_CAPABILITY( AOUT, 100 )
+    ADD_SHORTCUT( "dsp" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 4a04efb3c2a21ed393bcaf0d2fa75a1fff4a902e..25dec0761378ccce561321dff73b8bc720dd4b69 100644 (file)
@@ -1,42 +1,2 @@
-###############################################################################
-# vlc (VideoLAN Client) dummy and null module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_NULL = null.o
-PLUGIN_DUMMY = dummy.o aout_dummy.o vout_dummy.o intf_dummy.o input_dummy.o
-BUILTIN_NULL = $(PLUGIN_NULL:%.o=BUILTIN_%.o)
-BUILTIN_DUMMY = $(PLUGIN_DUMMY:%.o=BUILTIN_%.o)
-
-PLUGIN_C = $(PLUGIN_NULL) $(PLUGIN_DUMMY)
-BUILTIN_C = $(BUILTIN_NULL) $(BUILTIN_DUMMY)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../null.so: $(PLUGIN_NULL)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../null.a: $(BUILTIN_NULL)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../dummy.so: $(PLUGIN_DUMMY)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../dummy.a: $(BUILTIN_DUMMY)
-       ar r $@ $^
-       $(RANLIB) $@
-
+null_SOURCES = null.c
+dummy_SOURCES = dummy.c aout_dummy.c vout_dummy.c intf_dummy.c input_dummy.c
index a55e456022cfbd8e360a15c27affc79eb590a47e..59bdb1a696ae99acba7aa662030bbd610cb3e25f 100644 (file)
@@ -2,7 +2,7 @@
  * aout_dummy.c : dummy audio output plugin
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: aout_dummy.c,v 1.16 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_dummy.c,v 1.17 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dummy
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * vout_dummy_t: dummy video output method descriptor
  *****************************************************************************
@@ -85,12 +73,6 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int aout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( AOUT_METHOD_VAR, "dummy" ) )
-    {
-        return( 999 );
-    }
-
-    /* The dummy plugin always works but give it the lower possible score */
     return( 1 );
 }
 
index 344c71b6973060a4fc5b38a55fb081d868770df4..5d23afe9faf74a10b4aff9ca64a11ef7ab6016a2 100644 (file)
@@ -2,7 +2,7 @@
  * dummy.c : dummy plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: dummy.c,v 1.12 2001/12/09 17:01:36 sam Exp $
+ * $Id: dummy.c,v 1.13 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dummy
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -52,19 +41,23 @@ void _M( intf_getfunctions )  ( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for dummy module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
+    ADD_WINDOW( "Configuration for dummy module" )
+        ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
+
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INPUT
-                                | MODULE_CAPABILITY_AOUT
-                                | MODULE_CAPABILITY_VOUT
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "dummy functions module";
+    SET_DESCRIPTION( "dummy functions module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * unless explicitly requested to */
+    ADD_CAPABILITY( INPUT, 0 )
+    ADD_CAPABILITY( AOUT, 0 )
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_CAPABILITY( INTF, 0 )
+    ADD_SHORTCUT( "dummy" )
 MODULE_INIT_STOP
 
+
 MODULE_ACTIVATE_START
     _M( input_getfunctions )( &p_module->p_functions->input );
     _M( aout_getfunctions )( &p_module->p_functions->aout );
@@ -72,6 +65,7 @@ MODULE_ACTIVATE_START
     _M( intf_getfunctions )( &p_module->p_functions->intf );
 MODULE_ACTIVATE_STOP
 
+
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
index 3f0fbbc6db62c5c6ea600bd1c75a3e6e8ce86257..b0e659cf40ff793915056ca83a31829f745a8e9d 100644 (file)
@@ -2,7 +2,7 @@
  * input_dummy.c: dummy input plugin, to manage "vlc:***" special options
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_dummy.c,v 1.10 2001/12/10 04:53:10 sam Exp $
+ * $Id: input_dummy.c,v 1.11 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dummy
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <sys/types.h>
 #include <string.h>
 #include <errno.h>
 
+#include <videolan/vlc.h>
+
 #ifdef STRNCASECMP_IN_STRINGS_H
 #   include <strings.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #include "interface.h"
 #include "intf_playlist.h"
 
@@ -52,9 +43,6 @@
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -98,11 +86,6 @@ static int DummyProbe( probedata_t *p_data )
     input_thread_t *p_input = (input_thread_t *)p_data;
     char *psz_name = p_input->p_source;
 
-    if( TestMethod( INPUT_METHOD_VAR, "dummy" ) )
-    {
-        return( 999 );
-    }
-
     if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "vlc:", 4 ) )
     {
         /* If the user specified "vlc:" then it's probably a file */
index 352efe13311802b809f9fc8d4d90e85a14667bfd..d0bfabf7d037d61430ee9831c40ae27fbfd6fad8 100644 (file)
@@ -2,7 +2,7 @@
  * intf_dummy.c: dummy interface plugin
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: intf_dummy.c,v 1.12 2001/12/07 18:33:07 sam Exp $
+ * $Id: intf_dummy.c,v 1.13 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dummy
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "intf_msg.h"
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * intf_sys_t: description and status of FB interface
  *****************************************************************************/
@@ -82,11 +70,6 @@ void _M( intf_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int intf_Probe( probedata_t *p_data )
 {
-    if( TestMethod( INTF_METHOD_VAR, "dummy" ) )
-    {
-        return( 999 );
-    }
-
     return( 1 );
 }
 
index 46b134c472077ea57304c5f4e671a567b4aad9f0..008f0395fa95b14b5a65a8911a922b22f0a7dd26 100644 (file)
@@ -2,7 +2,7 @@
  * null.c : NULL module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: null.c,v 1.3 2001/12/09 17:01:36 sam Exp $
+ * $Id: null.c,v 1.4 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME null
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_inner.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for null module" )
-    ADD_PANE( "First pane" )
-        ADD_FRAME( "First frame" )
-            ADD_COMMENT( "You can put whatever you want here." )
-            ADD_STRING( "Random text: ", MODULE_VAR(text), NULL )
-        ADD_FRAME( "Second frame" )
-            ADD_COMMENT( "The file below is not used." )
-            ADD_FILE( "Select file: ", MODULE_VAR(file), NULL )
-        ADD_FRAME( "Third frame" )
-            ADD_COMMENT( "This space intentionally left blank." )
-    ADD_PANE( "Second pane" )
-        ADD_FRAME( "Frame" )
-            ADD_COMMENT( "There is nothing in this frame." )
+    ADD_WINDOW( "Configuration for null module" )
+        ADD_PANE( "First pane" )
+            ADD_FRAME( "First frame" )
+                ADD_COMMENT( "You can put whatever you want here." )
+                ADD_STRING( "Random text: ", MODULE_VAR(text), NULL )
+            ADD_FRAME( "Second frame" )
+                ADD_COMMENT( "The file below is not used." )
+                ADD_FILE( "Select file: ", MODULE_VAR(file), NULL )
+            ADD_FRAME( "Third frame" )
+                ADD_COMMENT( "This space intentionally left blank." )
+        ADD_PANE( "Second pane" )
+            ADD_FRAME( "Frame" )
+                ADD_COMMENT( "There is nothing in this frame." )
 MODULE_CONFIG_STOP
 
+
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL;
-    p_module->psz_longname = "the Null module that does nothing";
+    SET_DESCRIPTION( "the Null module that does nothing" )
+    ADD_SHORTCUT( "null" )
 MODULE_INIT_STOP
 
+
 MODULE_ACTIVATE_START
     /* Since the Null module can't do anything, there is no need to
      * fill the p_functions structure. */
 MODULE_ACTIVATE_STOP
 
+
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
index 2cf5b4c7257a30f188735d96fef005e7b685b0f3..23e057dfc4e95b5881b3abc64db12d8469bf8f42 100644 (file)
@@ -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.12 2001/12/16 16:18:36 sam Exp $
+ * $Id: vout_dummy.c,v 1.13 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dummy
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define DUMMY_WIDTH 16
 #define DUMMY_HEIGHT 16
 #define DUMMY_MAX_DIRECTBUFFERS 5
@@ -95,11 +83,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_METHOD_VAR, "dummy" ) )
-    {
-        return( 999 );
-    }
-
     return( 1 );
 }
 
@@ -165,7 +148,7 @@ static int vout_Init( vout_thread_t *p_vout )
         }
 
         /* Allocate the picture */
-        if( DummyNewPicture( p_vout, p_pic ) )
+        if( p_pic == NULL || DummyNewPicture( p_vout, p_pic ) )
         {
             break;
         }
@@ -252,14 +235,9 @@ static int DummyNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
      * directly by the decoder */
     case YUV_420_PICTURE:
 
-        /* Precalculate some values */
-        p_pic->i_size         = i_width * i_height;
-        p_pic->i_chroma_width = i_width / 2;
-        p_pic->i_chroma_size  = i_width * ( i_height / 2 );
-
         /* Allocate the memory buffer */
-        i_luma_bytes = p_pic->i_size * sizeof(pixel_data_t);
-        i_chroma_bytes = p_pic->i_chroma_size * sizeof(pixel_data_t);
+        i_luma_bytes = i_width * i_height * sizeof(pixel_data_t);
+        i_chroma_bytes = i_width * ( i_height / 2 ) * sizeof(pixel_data_t);
 
         /* Y buffer */
         p_pic->planes[ Y_PLANE ].p_data = malloc( i_luma_bytes + 2 * i_chroma_bytes );
@@ -269,12 +247,12 @@ static int DummyNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
         /* U buffer */
         p_pic->planes[ U_PLANE ].p_data = p_pic->planes[ Y_PLANE ].p_data + i_height * i_width;
         p_pic->planes[ U_PLANE ].i_bytes = i_chroma_bytes / 2;
-        p_pic->planes[ U_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
+        p_pic->planes[ U_PLANE ].i_line_bytes = i_width / 2 * sizeof(pixel_data_t);
 
         /* V buffer */
-        p_pic->planes[ V_PLANE ].p_data = p_pic->planes[ U_PLANE ].p_data + i_height * p_pic->i_chroma_width;
+        p_pic->planes[ V_PLANE ].p_data = p_pic->planes[ U_PLANE ].p_data + i_height * i_width / 2;
         p_pic->planes[ V_PLANE ].i_bytes = i_chroma_bytes / 2;
-        p_pic->planes[ V_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof(pixel_data_t);
+        p_pic->planes[ V_PLANE ].i_line_bytes = i_width / 2 * sizeof(pixel_data_t);
 
         /* We allocated 3 planes */
         p_pic->i_planes = 3;
@@ -284,6 +262,7 @@ static int DummyNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
     /* Unknown chroma, allocate an RGB buffer, the video output's job
      * will be to do the chroma->RGB conversion */
+        /* XXX FIXME this is BROKEN ! See how the other plugins do it */
     default:
 
         /* Precalculate some values */
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index bb2f93b2d64e5513712bfa9ed4f1a47ca4bb332f..6d1a3f7022838fcfdb6b8df7583e1b93279cd872 100644 (file)
@@ -1,58 +1,8 @@
-###############################################################################
-# vlc (VideoLAN Client) dvd module Makefile
-# (c)2001 VideoLAN
-###############################################################################
+dvd_SOURCES = dvd.c input_dvd.c dvd_ifo.c dvd_udf.c dvd_summary.c $(SRC_DVD_EXTRA)
 
-#
-# Objects
-#
+EXTRA_DEP = ../../lib/libdvdcss.a ../../lib/libdvdcss.so
 
-PLUGIN_DVD = dvd.o input_dvd.o dvd_ifo.o dvd_udf.o dvd_summary.o $(OBJ_DVD)
-BUILTIN_DVD = $(PLUGIN_DVD:%.o=BUILTIN_%.o)
-
-LIBDVDCSS_OBJ = ../../lib/libdvdcss.a ../../lib/libdvdcss.so
-
-ALL_OBJ = $(PLUGIN_DVD) $(BUILTIN_DVD)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_DVD): %.o: .dep/%.d
-$(PLUGIN_DVD): %.o: %.c
-       $(CC) $(CFLAGS_DVD) $(CFLAGS) $(PCFLAGS) -DPLUGIN -c -o $@ $<
-
-$(BUILTIN_DVD): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_DVD): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS_DVD) $(CFLAGS) -DBUILTIN -c -o $@ $<
-
-#
-# Real targets
-#
-
-# If we build our own libdvdcss
-ifeq (1,$(NEED_LIBDVDCSS))
-../dvd.so: $(LIBDVDCSS_OBJ) $(PLUGIN_DVD)
-       $(CC) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD_PLUGIN)
-
-../dvd.a: $(LIBDVDCSS_OBJ) $(BUILTIN_DVD)
-       ar r $@ $(BUILTIN_DVD)
-       $(RANLIB) $@
-
-# If we rely on an existing libdvdcss
-else
-../dvd.so: $(PLUGIN_DVD)
-       $(CC) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD_PLUGIN)
-
-../dvd.a: $(BUILTIN_DVD)
-       ar r $@ $(BUILTIN_DVD)
-       $(RANLIB) $@
-endif
-
-$(LIBDVDCSS_OBJ): libdvdcss
+$(EXTRA_DEP): libdvdcss
 
 libdvdcss:
        @cd ../../ && $(MAKE) libdvdcss
-
index c0ef5df3acc535c1a0110e8b52242ce4f0f306ee..83adde0ceeeb4911451e7cd0c17f3ee32f8e95c8 100644 (file)
@@ -2,7 +2,7 @@
  * dummy_dvdcss.c: Dummy libdvdcss with minimal DVD access.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: dummy_dvdcss.c,v 1.4 2001/12/09 17:01:36 sam Exp $
+ * $Id: dummy_dvdcss.c,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
 
+#include <videolan/vlc.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/uio.h>                                        /* struct iovec */
@@ -43,8 +43,6 @@
 #   error "building dummy libdvdcss on this system does not make sense !"
 #endif
 
-#include "common.h"
-
 #include "dummy_dvdcss.h"
 
 /*****************************************************************************
index 2013a49b22147c9ccef469764dc04d77ac1cccec..c28690dc7bead18d7790c56482f01cdf230610e3 100644 (file)
@@ -2,7 +2,7 @@
  * dvd.c : DVD input module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: dvd.c,v 1.16 2001/12/09 17:01:36 sam Exp $
+ * $Id: dvd.c,v 1.17 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dvd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
+#include <videolan/vlc.h>
+
 #ifdef GOD_DAMN_DMCA
 #   include <dlfcn.h>
 #   include "dummy_dvdcss.h"
 #endif
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
@@ -63,18 +52,17 @@ static void UnprobeLibDVDCSS( void );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for DVD module" )
-    ADD_COMMENT( "foobar !" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INPUT;
 #ifdef GOD_DAMN_DMCA
-    p_module->psz_longname = "DVD input module, uses libdvdcss if present";
+    SET_DESCRIPTION( "DVD input module, uses libdvdcss if present" )
+    ADD_CAPABILITY( INPUT, 90 )
 #else
-    p_module->psz_longname = "DVD input module, linked with libdvdcss";
+    SET_DESCRIPTION( "DVD input module, linked with libdvdcss" )
+    ADD_CAPABILITY( INPUT, 100 )
 #endif
+    ADD_SHORTCUT( "dvd" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index eff7fe6d252900ec273263d5ef7c661c86527420..ed4498f6650ea12f60da65a831f3f05c29e984cc 100644 (file)
@@ -2,7 +2,7 @@
  * dvd_ifo.c: Functions for ifo parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ifo.c,v 1.42 2001/12/09 17:01:36 sam Exp $
+ * $Id: dvd_ifo.c,v 1.43 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          German Tischler <tanis@gaspode.franken.de>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #elif defined( _MSC_VER ) && defined( _WIN32 )
 #   include <videolan/dvdcss.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "input_dvd.h"
 #include "dvd_ifo.h"
 #include "dvd_udf.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
index a77e60758882395bc7fd6c8a44792197c814dea2..2fb4764a8d63dc4744f256b5a53d5544d16b1ce6 100644 (file)
@@ -3,7 +3,7 @@
  * found in .ifo.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_summary.c,v 1.11 2001/12/07 18:33:07 sam Exp $
+ * $Id: dvd_summary.c,v 1.12 2001/12/30 07:09:55 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dvd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#   include <unistd.h>
 #endif
 
 #if !defined( WIN32 )
-#include <netinet/in.h>
+#   include <netinet/in.h>
 #endif
 
 #include <fcntl.h>
 #   include <videolan/dvdcss.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "iso_lang.h"
-#include "tests.h"
-
 #include "input_dvd.h"
 #include "dvd_ifo.h"
+#include "iso_lang.h"
 
 #include "debug.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
-
 /*
  * Local tools to decode some data in ifo
  */
  ****************************************************************************/
 void IfoPrintTitle( thread_dvd_data_t * p_dvd )
 {
-    intf_WarnMsg( 5, "dvd info: title: %d", p_dvd->i_title );
-    intf_WarnMsg( 5, "    vobstart at: %d blocks", p_dvd->i_start );
-    intf_WarnMsg( 5, "    stream size: %d blocks", p_dvd->i_size );
-    intf_WarnMsg( 5, "    number of chapters: %d", p_dvd->i_chapter_nb );
-    intf_WarnMsg( 5, "    number of angles: %d", p_dvd->i_angle_nb );
+    intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s, "
+                     "vobstart at %d blocks, stream size %d blocks",
+                     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",
+                     p_dvd->i_start, p_dvd->i_size );
 }
 
 /****************************************************************************
@@ -94,15 +83,14 @@ 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_ratio[12];
-    char     psz_perm_displ[4][23] =
+    char*    psz_perm_displ[4] =
              {
                 "pan-scan & letterboxed",
                 "pan-scan",
                 "letterboxed",
                 "not specified"
              };
-    char     psz_source_res[4][28] =
+    char*    psz_source_res[4] =
              {
                 "720x480 ntsc or 720x576 pal",
                 "704x480 ntsc or 704x576 pal",
@@ -110,37 +98,24 @@ void IfoPrintVideo( thread_dvd_data_t * p_dvd )
                 "352x240 ntsc or 352x288 pal"
              };
 
-    switch( video.i_ratio )
-    {
-    case 0:
-        sprintf( psz_ratio, "4:3" );
-        break;
-    case 3:
-        sprintf( psz_ratio, "16:9" );
-        break;
-    default:
-        sprintf( psz_ratio, "undef" );
-        break;
-    }
-
-    intf_WarnMsg( 5, "dvd info: video" );
-    intf_WarnMsg( 5, "    compression: mpeg-%d", video.i_compression+1 );
-    intf_WarnMsg( 5, "    tv system: %s Hz",
-                     video.i_system ? "pal 625/50" : "ntsc 525/60" );
-    intf_WarnMsg( 5, "    aspect ratio: %s", psz_ratio );
-    intf_WarnMsg( 5, "    display mode: %s",
-                     psz_perm_displ[video.i_perm_displ] );
-    intf_WarnMsg( 5, "    line21-1: %s",
-                     video.i_line21_1 ? "data present in GOP" : "" );
-    intf_WarnMsg( 5, "    line21-2: %s",
-                     video.i_line21_2 ? "data present in GOP" : "" );
-    intf_WarnMsg( 5, "    source res: %s",
-                     psz_source_res[video.i_source_res] );
-    intf_WarnMsg( 5, "    letterboxed: %s",
-                     video.i_letterboxed ? "yes" : "no" );
-    intf_WarnMsg( 5, "    mode: %s",
-                     video.i_mode ? "film (625/50 only)" : "camera");
+    intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s"
+                     "display mode %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" );
 }
 #undef video
 
@@ -152,48 +127,32 @@ void IfoPrintVideo( thread_dvd_data_t * p_dvd )
     p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title.pi_audio_status[i-1]
 void IfoPrintAudio( thread_dvd_data_t * p_dvd, int i )
 {
-
     if( audio_status.i_available )
     {
-        char    ppsz_mode[7][9] =
+        char* ppsz_mode[7] =
                 { "ac3", "unknown", "mpeg-1", "mpeg-2", "lpcm", "sdds", "dts" };
-        char    ppsz_appl_mode[3][15] =
-                { "not specified", "karaoke", "surround sound" };
-        char    psz_caption[25];
-        char    ppsz_quant[4][10] =
+        char* ppsz_appl_mode[3] =
+                { "no application specified", "karaoke", "surround sound" };
+        char* ppsz_quant[4] =
                 { "16 bits", "20 bits", "24 bits", "drc" };
     
-        intf_WarnMsg( 5, "dvd info: audio %d" , i );
-        intf_WarnMsg( 5, "    language: %s", 
-                         DecodeLanguage( hton16( audio.i_lang_code ) ) );
-        intf_WarnMsg( 5, "    mode: %s", ppsz_mode[audio.i_coding_mode & 0x7] );
-        intf_WarnMsg( 5, "    channel(s): %d %s",
+        intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, "
+                         "%d%s channel%s, %dHz, %s", i,
+                         DecodeLanguage( hton16( audio.i_lang_code ) ),
+                         ppsz_mode[audio.i_coding_mode & 0x7],
                          audio.i_num_channels + 1,
-                         audio.i_multichannel_extension ? "ext." : "" );
-        intf_WarnMsg( 5, "    sampling: %d Hz",
-                         audio.i_sample_freq ? 96000 : 48000 );
-        intf_WarnMsg( 5, "    appl_mode: %s",
+                         audio.i_multichannel_extension ? " ext." : "",
+                         audio.i_num_channels ? "s" : "",
+                         audio.i_sample_freq ? 96000 : 48000,
                          ppsz_appl_mode[audio.i_appl_mode & 0x2] );
-        switch( audio.i_caption )
-        {
-        case 1:
-            sprintf( psz_caption, "normal caption" );
-            break;
-        case 3:
-            sprintf( psz_caption, "directors comments" );
-            break;
-        default:
-            sprintf( psz_caption, " " );
-            break;
-        }
-        intf_WarnMsg( 5, "    caption: %s", psz_caption );
-        intf_WarnMsg( 5, "    quantization: %s",
-                         ppsz_quant[audio.i_quantization & 0x3] );
-    
-        intf_WarnMsg( 5, "    status: %x", audio_status.i_position );
-    }
-
 
+        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 );
+    }
 }
 #undef audio_status
 #undef audio
@@ -209,19 +168,15 @@ void IfoPrintSpu( thread_dvd_data_t * p_dvd, int i )
 {
     if( spu_status.i_available )
     {
-        intf_WarnMsg( 5, "dvd info: spu %d", i );
-        intf_WarnMsg( 5, "    caption: %d", spu.i_caption );
-        intf_WarnMsg( 5, "    language: %s",
-                         DecodeLanguage( hton16( spu.i_lang_code ) ) );
-        intf_WarnMsg( 5, "    prefix: %x", spu.i_prefix );
-
-        intf_WarnMsg( 5, "    status: 4:3 %x wide %x letter %x pan %x",
-            spu_status.i_position_43,
-            spu_status.i_position_wide,
-            spu_status.i_position_letter,
-            spu_status.i_position_pan );
+        intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d "
+                         "prefix %x, modes [%s%s%s%s ]", i,
+                         DecodeLanguage( hton16( 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" : "" );
     }
-
 }
 #undef spu_status
 #undef spu
index e6e22d37ced481a988e670fb83c5972fc5ffcd92..713da7d3fa7569ce6ba0465c008f496787cb776d 100644 (file)
@@ -5,7 +5,7 @@
  * contains the basic udf handling functions
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_udf.c,v 1.17 2001/12/09 17:01:36 sam Exp $
+ * $Id: dvd_udf.c,v 1.18 2001/12/30 07:09:55 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dvd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <string.h>
 #include <fcntl.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #elif defined( _MSC_VER ) && defined( _WIN32 )
 #   include <videolan/dvdcss.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "input_dvd.h"
 #include "dvd_ifo.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define UDFADshort      1
 #define UDFADlong       2
 #define UDFADext        4
@@ -109,7 +98,7 @@ static int UDFReadLB( dvdcss_handle dvdhandle, off_t i_lba,
 {
     if( dvdcss_seek( dvdhandle, i_lba, DVDCSS_NOFLAGS ) < 0 )
     {
-        intf_ErrMsg( "UDF: Postion not found" );
+        intf_ErrMsg( "dvd error: block %i not found", i_lba );
         return 0;
     }
 
@@ -273,7 +262,7 @@ static int UDFLogVolume(u8 * pi_data, char * p_volume_descriptor )
 
     if( i_lb_size != DVD_LB_SIZE )
     {
-        intf_ErrMsg( "UDF: Non valid sector size (%d)", i_lb_size );
+        intf_ErrMsg( "dvd error: invalid UDF sector size (%d)", i_lb_size );
         return 1;
     }
 
@@ -675,7 +664,7 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
     i_partition = 0;
     if( !UDFFindPartition( i_partition, &partition ) )
     {
-        intf_ErrMsg( "UDF: Partition 0 not found" );
+        intf_ErrMsg( "dvd error: partition 0 not found" );
         return 0;
     }
   
@@ -704,26 +693,26 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
 
     if( i_tag_id != 256 )
     {
-        intf_ErrMsg( "UDF: Bad descriptor" );
+        intf_ErrMsg( "dvd error: bad UDF descriptor" );
         return 0;
     }
     if( root_icb.i_partition != i_partition )
     {
-        intf_ErrMsg( "UDF: Bad partition" );
+        intf_ErrMsg( "dvd error: bad UDF partition" );
         return 0;
     }
   
     /* Find root dir */
     if( !UDFMapICB( root_icb, &i_file_type, &file, partition ) )
     {
-        intf_ErrMsg( "UDF: Can't find root dir" );
+        intf_ErrMsg( "dvd error: can't find root dir" );
         return 0;
     }
 
     /* root dir should be dir */
     if( i_file_type != 4 )
     {
-        intf_ErrMsg( "UDF: Root dir error" );
+        intf_ErrMsg( "dvd error: root dir error" );
         return 0;
     }
 
@@ -733,13 +722,13 @@ u32 DVDUDFFindFile( dvdcss_handle dvdhandle, char * psz_path )
     {
         if( !UDFScanDir( file, psz_token, &icb, partition ) )
         {
-            intf_ErrMsg( "UDF: Scan dir error" );
+            intf_ErrMsg( "dvd error: scan dir error" );
             return 0;
         }
 
         if( !UDFMapICB ( icb, &i_file_type, &file, partition ) )
         {
-            intf_ErrMsg( "UDF: ICB error" );
+            intf_ErrMsg( "dvd error: ICB error" );
             return 0;
         }
 
index 0876139a7b70495c2858b378ddd5bdf3e112c831..e08972a31b2d0b5f6d428e3c0d76662f26c1cd31 100644 (file)
@@ -9,7 +9,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.115 2001/12/30 04:26:53 sam Exp $
+ * $Id: input_dvd.c,v 1.116 2001/12/30 07:09:55 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dvd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
 #   include <videolan/dvdcss.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "iso_lang.h"
-#include "tests.h"
-
 #if defined( WIN32 )
 #   include "input_iovec.h"
 #endif
 #include "input_dvd.h"
 #include "dvd_ifo.h"
 #include "dvd_summary.h"
+#include "iso_lang.h"
 
 #include "debug.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /* how many blocks DVDRead will read in each loop */
 #define DVD_BLOCK_READ_ONCE 64
 
@@ -167,12 +155,7 @@ static int DVDProbe( probedata_t *p_data )
     input_thread_t * p_input = (input_thread_t *)p_data;
 
     char * psz_name = p_input->p_source;
-    int i_score = 5;
-
-    if( TestMethod( INPUT_METHOD_VAR, "dvd" ) )
-    {
-        return( 999 );
-    }
+    int i_score = 0;
 
     if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "dvd:", 4 ) )
     {
@@ -228,7 +211,6 @@ static void DVDInit( input_thread_t * p_input )
     if( IfoCreate( p_dvd ) < 0 )
     {
         intf_ErrMsg( "dvd error: allcation error in ifo" );
-        dvdcss_close( p_dvd->dvdhandle );
         free( p_dvd );
         input_BuffersEnd( p_input->p_method_data );
         p_input->b_error = 1;
@@ -239,7 +221,6 @@ static void DVDInit( input_thread_t * p_input )
     {
         intf_ErrMsg( "dvd error: fatal failure in ifo" );
         IfoDestroy( p_dvd->p_ifo );
-        dvdcss_close( p_dvd->dvdhandle );
         free( p_dvd );
         input_BuffersEnd( p_input->p_method_data );
         p_input->b_error = 1;
@@ -333,7 +314,7 @@ static void DVDOpen( struct input_thread_s *p_input )
 
     vlc_mutex_unlock( &p_input->stream.stream_lock );
 
-    /* Parse input string : dvd:device[:rawdevice] */
+    /* Parse input string : dvd:device[@rawdevice] */
     if( strlen( p_input->p_source ) > 4
          && !strncasecmp( p_input->p_source, "dvd:", 4 ) )
     {
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index a0d843580b25279d5961784998fcd5bc0be0f9dc..3ef18dbe5a0811ddefa588f273d4698587a4c907 100644 (file)
@@ -1,53 +1,11 @@
-###############################################################################
-# vlc (VideoLAN Client) dvdread module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_DVDREAD = dvdread.o input_dvdread.o $(OBJ_DVDREAD)
-BUILTIN_DVDREAD = $(PLUGIN_DVDREAD:%.o=BUILTIN_%.o)
+dvdread_SOURCES = dvdread.c input_dvdread.c $(SRC_DVDREAD_EXTRA)
 
+ifeq (1,$(NEED_LIBDVDCSS))
 LIBDVDCSS_OBJ = ../../lib/libdvdcss.a ../../lib/libdvdcss.so
+endif
 LIBDVDREAD_OBJ = ../../lib/libdvdread.a ../../lib/libdvdread.so
 
-ALL_OBJ = $(PLUGIN_DVDREAD) $(BUILTIN_DVDREAD)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_DVDREAD): %.o: .dep/%.d
-$(PLUGIN_DVDREAD): %.o: %.c
-       $(CC) $(CFLAGS_DVD) $(CFLAGS_DVDREAD) $(CFLAGS) $(PCFLAGS) -DPLUGIN -c -o $@ $<
-
-$(BUILTIN_DVDREAD): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_DVDREAD): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS_DVD) $(CFLAGS_DVDREAD) $(CFLAGS) -DBUILTIN -c -o $@ $<
-
-#
-# Real targets
-#
-
-ifeq (1,$(NEED_LIBDVDCSS))
-../dvdread.so: $(LIBDVDCSS_OBJ) $(LIBDVDREAD_OBJ) $(PLUGIN_DVDREAD)
-       $(CC) -o $@ $(PLUGIN_DVDREAD) $(PLCFLAGS) $(LIB_DVD_PLUGIN) $(LIB_DVDREAD_PLUGIN)
-
-../dvdread.a: $(LIBDVDCSS_OBJ) $(LIBDVDREAD_OBJ) $(BUILTIN_DVDREAD)
-       ar r $@ $(BUILTIN_DVDREAD)
-       $(RANLIB) $@
-else
-../dvdread.so: $(LIBDVDREAD_OBJ) $(PLUGIN_DVDREAD)
-       $(CC) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD_PLUGIN) $(LIB_DVDREAD_PLUGIN)
-
-../dvdread.a: $(LIBDVDREAD_OBJ) $(BUILTIN_DVDREAD)
-       ar r $@ $(BUILTIN_DVDREAD)
-       $(RANLIB) $@
-endif
+EXTRA_DEP = $(LIBDVDCSS_OBJ) $(LIBDVDREAD_OBJ)
 
 $(LIBDVDCSS_OBJ): libdvdcss
 
index 8f89d271fa28e1cb2697d09abdbd9d745a7d844a..c903be9962b87bb610340dedbd2b1032c76d24a0 100644 (file)
@@ -2,7 +2,7 @@
  * dvdread.c : DvdRead input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: dvdread.c,v 1.3 2001/12/09 17:01:36 sam Exp $
+ * $Id: dvdread.c,v 1.4 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dvdread
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
+#include <videolan/vlc.h>
+
 #ifdef GOD_DAMN_DMCA
 #   include <dlfcn.h>
 #   include "dummy_dvdcss.h"
 #endif
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
index 19e5463ec4575ee116f4d27dbfc783c3b9d05527..6ea725894c6f7e9a383d2e9de12c9f947b86ccca 100644 (file)
@@ -6,7 +6,7 @@
  * It depends on: libdvdread for ifo files and block reading.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_dvdread.c,v 1.11 2001/12/30 04:26:53 sam Exp $
+ * $Id: input_dvdread.c,v 1.12 2001/12/30 07:09:55 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME dvdread
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
 #   include <sys/uio.h>                                      /* struct iovec */
 #endif
 
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "iso_lang.h"
-#include "tests.h"
-
 #if defined( WIN32 )
 #   include "input_iovec.h"
 #endif
 
 #include "input_dvdread.h"
 
-#include "debug.h"
+#include "iso_lang.h"
 
-#include "modules.h"
-#include "modules_export.h"
+#include "debug.h"
 
 /* how many blocks DVDRead will read in each loop */
 #define DVD_BLOCK_READ_ONCE 64
@@ -216,7 +204,6 @@ static void DvdReadInit( input_thread_t * p_input )
     if( ! ( p_dvd->p_vmg_file = ifoOpen( p_dvd->p_dvdread, 0 ) ) )
     {
         intf_ErrMsg( "dvdread error: can't open VMG info" );
-        DVDClose( p_dvd->p_dvdread );
         input_BuffersEnd( p_input->p_method_data );
         free( p_dvd );
         p_input->b_error = 1;
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 1cc6137845086d646413e3cdb97513d52e845a1a..39de89de1674c451d60efae1653be9f7e4fc6c12 100644 (file)
@@ -1,37 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) esd module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = esd.o aout_esd.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Special plugin modifications
-#
-
-CFLAGS += $(CFLAGS_ESD)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../esd.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_ESD)
-
-../esd.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+esd_SOURCES = esd.c aout_esd.c
index 122c0a7b2131c185499519e5fdbc0a527efef704..1b88fa0040f1fec14c14561fa311ad9e297112f0 100644 (file)
@@ -2,7 +2,7 @@
  * aout_esd.c : Esound functions library
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: aout_esd.c,v 1.16 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_esd.c,v 1.17 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -21,9 +21,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME esd
-#include "modules_inner.h"
-
 /* TODO:
  *
  * - use the libesd function to get latency when it's not buggy anymore
@@ -33,8 +30,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <string.h>                                            /* strerror() */
 
 #include <esd.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * aout_sys_t: esd audio output method descriptor
  *****************************************************************************
@@ -100,11 +88,6 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int aout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( AOUT_METHOD_VAR, "esd" ) )
-    {
-        return( 999 );
-    }
-
     /* We don't have to test anything -- if we managed to open this plugin,
      * it means we have the appropriate libs. */
     return( 50 );
index 9adfc68e7bc807a3e0e0fd177561e69373a53ebd..e56e78492b0344bb91983ba176c7c9041f40df06 100644 (file)
@@ -2,7 +2,7 @@
  * esd.c : EsounD module
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: esd.c,v 1.10 2001/12/09 17:01:36 sam Exp $
+ * $Id: esd.c,v 1.11 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME esd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -49,15 +38,14 @@ void _M( aout_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for esd module" )
-    ADD_FRAME( "EsounD" )
-        ADD_COMMENT( "This module does not need configuration" )
+    ADD_WINDOW( "Configuration for esd module" )
+        ADD_FRAME( "EsounD" )
+            ADD_COMMENT( "This module does not need configuration" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_AOUT;
-    p_module->psz_longname = "EsounD audio module";
+    SET_DESCRIPTION( "EsounD audio module" )
+    ADD_CAPABILITY( AOUT, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 8f50d23f3013b1cf5aef970747415b44843f223c..eeea29eb5abb45362cf53f3608865f74ea6da7cb 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) fb module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = fb.o vout_fb.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../fb.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../fb.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+fb_SOURCES = fb.c vout_fb.c
index a73047d94445c25b7731eef225fe86b87db60885..91c6bd1feee26094233386e3cdc0122ffcaab1c1 100644 (file)
@@ -2,7 +2,7 @@
  * fb.c : framebuffer plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: fb.c,v 1.9 2001/12/09 17:01:36 sam Exp $
+ * $Id: fb.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME fb
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
@@ -52,14 +41,13 @@ void _M( vout_getfunctions )( function_list_t * p_function_list );
  * Building configuration tree
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for framebuffer module" )
-    ADD_COMMENT( "For now, the framebuffer module cannot be configured" )
+    ADD_WINDOW( "Configuration for framebuffer module" )
+        ADD_COMMENT( "For now, the framebuffer module cannot be configured" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "Linux console framebuffer module";
+    SET_DESCRIPTION( "Linux console framebuffer module" )
+    ADD_CAPABILITY( VOUT, 30 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 8ea49bff3cfaed3b7e84ddbe04ddc31ebe70c2dc..6d8bd2285a0e3d0b0ad9afbdd204aaeacabf2203 100644 (file)
@@ -2,7 +2,7 @@
  * vout_fb.c: framebuffer video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_fb.c,v 1.15 2001/12/07 18:33:07 sam Exp $
+ * $Id: vout_fb.c,v 1.16 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME fb
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <signal.h>                                      /* SIGUSR1, SIGUSR2 */
 #include <stdlib.h>                                                /* free() */
 #include <linux/vt.h>                                                /* VT_* */
 #include <linux/kd.h>                                                 /* KD* */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-#include "modules.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules_export.h"
-
 /*****************************************************************************
  * vout_sys_t: video output framebuffer method descriptor
  *****************************************************************************
@@ -132,11 +120,6 @@ static int vout_Probe( probedata_t *p_data )
 {
     int i_fd;
 
-    if( TestMethod( VOUT_METHOD_VAR, "fb" ) )
-    {
-        return( 999 );
-    }
-
     i_fd = open( main_GetPszVariable( VOUT_FB_DEV_VAR,
                                       VOUT_FB_DEV_DEFAULT ), O_RDWR );
     if( i_fd == -1 )
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 1999ae050cef109af1381e4f0d633a1662037820..004792db6710a816e4e2a128e34739c909bde7d5 100644 (file)
@@ -1,70 +1,5 @@
-###############################################################################
-# vlc (VideoLAN Client) image filter modules makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_BOB = bob.o
-PLUGIN_TRANSFORM = transform.o
-PLUGIN_INVERT = invert.o
-PLUGIN_DISTORT = distort.o
-PLUGIN_WALL = wall.o
-
-BUILTIN_BOB = $(PLUGIN_BOB:%.o=BUILTIN_%.o)
-BUILTIN_TRANSFORM = $(PLUGIN_TRANSFORM:%.o=BUILTIN_%.o)
-BUILTIN_INVERT = $(PLUGIN_INVERT:%.o=BUILTIN_%.o)
-BUILTIN_DISTORT = $(PLUGIN_DISTORT:%.o=BUILTIN_%.o)
-BUILTIN_WALL = $(PLUGIN_WALL:%.o=BUILTIN_%.o)
-
-PLUGIN_C = $(PLUGIN_BOB) $(PLUGIN_TRANSFORM) $(PLUGIN_INVERT) $(PLUGIN_DISTORT) $(PLUGIN_WALL)
-BUILTIN_C = $(BUILTIN_BOB) $(BUILTIN_TRANSFORM) $(BUILTIN_INVERT) $(BUILTIN_DISTORT) $(BUILTIN_WALL)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../filter_bob.so: $(PLUGIN_BOB)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../filter_bob.a: $(BUILTIN_BOB)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../filter_transform.so: $(PLUGIN_TRANSFORM)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../filter_transform.a: $(BUILTIN_TRANSFORM)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../filter_invert.so: $(PLUGIN_INVERT)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../filter_invert.a: $(BUILTIN_INVERT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../filter_distort.so: $(PLUGIN_DISTORT)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_FILTER_DISTORT)
-
-../filter_distort.a: $(BUILTIN_DISTORT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../filter_wall.so: $(PLUGIN_WALL)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../filter_wall.a: $(BUILTIN_WALL)
-       ar r $@ $^
-       $(RANLIB) $@
-
+filter_deinterlace_SOURCES = deinterlace.c
+filter_transform_SOURCES = transform.c
+filter_invert_SOURCES = invert.c
+filter_distort_SOURCES = distort.c
+filter_wall_SOURCES = wall.c
similarity index 62%
rename from plugins/filter/bob.c
rename to plugins/filter/deinterlace.c
index ed8909ae8a24ffc15ba1f7ef58aa34bd21c88ac2..8a40a6b1540e3b4e5596e369874ee667403884fe 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * bob.c : BOB deinterlacer plugin for vlc
+ * deinterlace.c : deinterlacer plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: bob.c,v 1.3 2001/12/19 03:50:22 sam Exp $
+ * $Id: deinterlace.c,v 1.1 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME filter_bob
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "filter_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
+#define DEINTERLACE_MODE_BOB     1
+#define DEINTERLACE_MODE_BLEND   2
 
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
 static void vout_getfunctions( function_list_t * p_function_list );
 
+static void *memblend( void *, const void *, const void *, size_t );
+
 /*****************************************************************************
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for BOB module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "BOB deinterlacing module";
+    SET_DESCRIPTION( "deinterlacing module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * as a video output unless explicitly requested to */
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_SHORTCUT( "deinterlace" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -74,13 +67,14 @@ MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
 /*****************************************************************************
- * vout_sys_t: BOB video output method descriptor
+ * vout_sys_t: Deinterlace video output method descriptor
  *****************************************************************************
  * This structure is part of the video output thread descriptor.
- * It describes the BOB specific properties of an output thread.
+ * It describes the Deinterlace specific properties of an output thread.
  *****************************************************************************/
 typedef struct vout_sys_s
 {
+    int i_mode;
     struct vout_thread_s *p_vout;
 
 } vout_sys_t;
@@ -117,22 +111,18 @@ static void vout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_FILTER_VAR, "bob" ) )
-    {
-        return( 999 );
-    }
-
-    /* If we weren't asked to filter, don't filter. */
     return( 0 );
 }
 
 /*****************************************************************************
- * vout_Create: allocates BOB video thread output method
+ * vout_Create: allocates Deinterlace video thread output method
  *****************************************************************************
- * This function allocates and initializes a BOB vout method.
+ * This function allocates and initializes a Deinterlace vout method.
  *****************************************************************************/
 static int vout_Create( vout_thread_t *p_vout )
 {
+    char *psz_method;
+
     /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
@@ -141,11 +131,34 @@ static int vout_Create( vout_thread_t *p_vout )
         return( 1 );
     }
 
+    /* Look what method was requested */
+    psz_method = main_GetPszVariable( VOUT_FILTER_VAR, "" );
+
+    while( *psz_method && *psz_method != ':' )
+    {
+        psz_method++;
+    }
+
+    if( !strcmp( psz_method, ":bob" ) )
+    {
+        p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB;
+    }
+    else if( !strcmp( psz_method, ":blend" ) )
+    {
+        p_vout->p_sys->i_mode = DEINTERLACE_MODE_BLEND;
+    }
+    else
+    {
+        intf_ErrMsg( "filter error: no valid deinterlace mode provided, "
+                     "using deinterlace:bob" );
+        p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB;
+    }
+
     return( 0 );
 }
 
 /*****************************************************************************
- * vout_Init: initialize BOB video thread output method
+ * vout_Init: initialize Deinterlace video thread output method
  *****************************************************************************/
 static int vout_Init( vout_thread_t *p_vout )
 {
@@ -180,22 +193,34 @@ static int vout_Init( vout_thread_t *p_vout )
 
     switch( p_vout->render.i_chroma )
     {
-        case YUV_420_PICTURE:
+    case YUV_420_PICTURE:
+        switch( p_vout->p_sys->i_mode )
+        {
+        case DEINTERLACE_MODE_BOB:
             p_vout->p_sys->p_vout =
                 vout_CreateThread( NULL,
-                           p_vout->output.i_width, p_vout->output.i_height / 2,
-                           p_vout->output.i_chroma, p_vout->output.i_aspect );
+                       p_vout->output.i_width, p_vout->output.i_height / 2,
+                       p_vout->output.i_chroma, p_vout->output.i_aspect );
             break;
 
-        case YUV_422_PICTURE:
+        case DEINTERLACE_MODE_BLEND:
             p_vout->p_sys->p_vout =
                 vout_CreateThread( NULL,
-                           p_vout->output.i_width, p_vout->output.i_height,
-                           YUV_420_PICTURE, p_vout->output.i_aspect );
+                       p_vout->output.i_width, p_vout->output.i_height,
+                       p_vout->output.i_chroma, p_vout->output.i_aspect );
             break;
+        }
+        break;
 
-        default:
-            break;
+    case YUV_422_PICTURE:
+        p_vout->p_sys->p_vout =
+            vout_CreateThread( NULL,
+                       p_vout->output.i_width, p_vout->output.i_height,
+                       YUV_420_PICTURE, p_vout->output.i_aspect );
+        break;
+
+    default:
+        break;
     }
 
     /* Everything failed */
@@ -214,7 +239,7 @@ static int vout_Init( vout_thread_t *p_vout )
 }
 
 /*****************************************************************************
- * vout_End: terminate BOB video thread output method
+ * vout_End: terminate Deinterlace video thread output method
  *****************************************************************************/
 static void vout_End( vout_thread_t *p_vout )
 {
@@ -229,9 +254,9 @@ static void vout_End( vout_thread_t *p_vout )
 }
 
 /*****************************************************************************
- * vout_Destroy: destroy BOB video thread output method
+ * vout_Destroy: destroy Deinterlace video thread output method
  *****************************************************************************
- * Terminate an output method created by BOBCreateOutputMethod
+ * Terminate an output method created by DeinterlaceCreateOutputMethod
  *****************************************************************************/
 static void vout_Destroy( vout_thread_t *p_vout )
 {
@@ -241,7 +266,7 @@ static void vout_Destroy( vout_thread_t *p_vout )
 }
 
 /*****************************************************************************
- * vout_Manage: handle BOB events
+ * vout_Manage: handle Deinterlace events
  *****************************************************************************
  * This function should be called regularly by video output thread. It manages
  * console events. It returns a non null value on error.
@@ -254,8 +279,9 @@ static int vout_Manage( vout_thread_t *p_vout )
 /*****************************************************************************
  * vout_Display: displays previously rendered output
  *****************************************************************************
- * This function send the currently rendered image to BOB image, waits until
- * it is displayed and switch the two rendering buffers, preparing next frame.
+ * This function send the currently rendered image to Deinterlace image,
+ * waits until it is displayed and switch the two rendering buffers, preparing
+ * next frame.
  *****************************************************************************/
 static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
 {
@@ -294,11 +320,14 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
 
             switch( p_vout->render.i_chroma )
             {
-                case YUV_420_PICTURE:
+            case YUV_420_PICTURE:
 
+                switch( p_vout->p_sys->i_mode )
+                {
+                case DEINTERLACE_MODE_BOB:
                     for( ; p_out < p_out_end ; )
                     {
-                        p_main->fast_memcpy( p_out, p_in,
+                        FAST_MEMCPY( p_out, p_in,
                                      p_pic->planes[ i_index ].i_line_bytes );
 
                         p_out += p_pic->planes[ i_index ].i_line_bytes;
@@ -306,37 +335,80 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
                     }
                     break;
 
-                case YUV_422_PICTURE:
-
-                    i_increment = 2 * p_pic->planes[ i_index ].i_line_bytes;
-
-                    if( i_index == Y_PLANE )
+                case DEINTERLACE_MODE_BLEND:
+                    if( i_index != Y_PLANE )
                     {
                         for( ; p_out < p_out_end ; )
                         {
-                            p_main->fast_memcpy( p_out, p_in,
+                            FAST_MEMCPY( p_out, p_in,
                                      p_pic->planes[ i_index ].i_line_bytes );
+
                             p_out += p_pic->planes[ i_index ].i_line_bytes;
-                            p_main->fast_memcpy( p_out, p_in,
+
+                            FAST_MEMCPY( p_out, p_in,
                                      p_pic->planes[ i_index ].i_line_bytes );
+
                             p_out += p_pic->planes[ i_index ].i_line_bytes;
-                            p_in += i_increment;
+                            p_in += 2 * p_pic->planes[ i_index ].i_line_bytes;
                         }
+                        break;
                     }
-                    else
+
+                    if( i_field == 0 )
                     {
-                        for( ; p_out < p_out_end ; )
-                        {
-                            p_main->fast_memcpy( p_out, p_in,
+                        FAST_MEMCPY( p_out, p_in,
                                      p_pic->planes[ i_index ].i_line_bytes );
-                            p_out += p_pic->planes[ i_index ].i_line_bytes;
-                            p_in += i_increment;
-                        }
+                        p_in += 2 * p_pic->planes[ i_index ].i_line_bytes;
+                        p_out += p_pic->planes[ i_index ].i_line_bytes;
                     }
-                    break;
 
-                default:
+                    for( ; p_out < p_out_end ; )
+                    {
+                        FAST_MEMCPY( p_out, p_in,
+                                     p_pic->planes[ i_index ].i_line_bytes );
+
+                        p_out += p_pic->planes[ i_index ].i_line_bytes;
+
+                        memblend( p_out, p_in, p_in + 2 * p_pic->planes[ i_index ].i_line_bytes, p_pic->planes[ i_index ].i_line_bytes );
+
+                        p_in += 2 * p_pic->planes[ i_index ].i_line_bytes;
+                        p_out += p_pic->planes[ i_index ].i_line_bytes;
+                    }
                     break;
+                }
+                break;
+
+            case YUV_422_PICTURE:
+
+                i_increment = 2 * p_pic->planes[ i_index ].i_line_bytes;
+
+                if( i_index == Y_PLANE )
+                {
+                    for( ; p_out < p_out_end ; )
+                    {
+                        FAST_MEMCPY( p_out, p_in,
+                                 p_pic->planes[ i_index ].i_line_bytes );
+                        p_out += p_pic->planes[ i_index ].i_line_bytes;
+                        FAST_MEMCPY( p_out, p_in,
+                                 p_pic->planes[ i_index ].i_line_bytes );
+                        p_out += p_pic->planes[ i_index ].i_line_bytes;
+                        p_in += i_increment;
+                    }
+                }
+                else
+                {
+                    for( ; p_out < p_out_end ; )
+                    {
+                        FAST_MEMCPY( p_out, p_in,
+                                 p_pic->planes[ i_index ].i_line_bytes );
+                        p_out += p_pic->planes[ i_index ].i_line_bytes;
+                        p_in += i_increment;
+                    }
+                }
+                break;
+
+            default:
+                break;
             }
         }
 
@@ -344,3 +416,30 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
     }
 }
 
+static void *memblend( void *p_dest, const void *p_s1,
+                       const void *p_s2, size_t i_bytes )
+{
+    u8* p_end = (u8*)p_dest + i_bytes - 8;
+
+    while( (u8*)p_dest < p_end )
+    {
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+    }
+
+    p_end += 8;
+
+    while( (u8*)p_dest < p_end )
+    {
+        *(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
+    }
+
+    return p_dest;
+}
+
index 6648a9353a2d3b0e2a4b087f6da170e945336053..ed64f2a3af4b88920e8b137f251611ced3c15013 100644 (file)
@@ -2,7 +2,7 @@
  * distort.c : Misc video effects plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: distort.c,v 1.2 2001/12/19 19:26:00 sam Exp $
+ * $Id: distort.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME filter_distort
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
 #include <math.h>                                            /* sin(), cos() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "filter_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define DISTORT_MODE_WAVE    1
 #define DISTORT_MODE_RIPPLE  2
 
@@ -61,14 +49,14 @@ static void vout_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for distort module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "miscellaneous video effects module";
+    SET_DESCRIPTION( "miscellaneous video effects module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * as a video output unless explicitly requested to */
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_SHORTCUT( "distort" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -132,12 +120,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_FILTER_VAR, "distort" ) )
-    {
-        return( 999 );
-    }
-
-    /* If we weren't asked to filter, don't filter. */
     return( 0 );
 }
 
@@ -360,7 +342,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
             {
                 if( i_offset < 0 )
                 {
-                    p_main->fast_memcpy( p_out, p_in - i_offset,
+                    FAST_MEMCPY( p_out, p_in - i_offset,
                          p_inpic->planes[ i_index ].i_line_bytes + i_offset );
                     p_in += p_inpic->planes[ i_index ].i_line_bytes;
                     p_out += p_outpic->planes[ i_index ].i_line_bytes;
@@ -368,7 +350,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
                 }
                 else
                 {
-                    p_main->fast_memcpy( p_out + i_offset, p_in,
+                    FAST_MEMCPY( p_out + i_offset, p_in,
                          p_inpic->planes[ i_index ].i_line_bytes - i_offset );
                     memset( p_out, black_pixel, i_offset );
                     p_in += p_inpic->planes[ i_index ].i_line_bytes;
@@ -377,8 +359,8 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
             }
             else
             {
-                p_main->fast_memcpy( p_out, p_in,
-                                     p_inpic->planes[ i_index ].i_line_bytes );
+                FAST_MEMCPY( p_out, p_in,
+                             p_inpic->planes[ i_index ].i_line_bytes );
                 p_in += p_inpic->planes[ i_index ].i_line_bytes;
                 p_out += p_outpic->planes[ i_index ].i_line_bytes;
             }
@@ -397,7 +379,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
     double f_angle;
     mtime_t new_date = mdate();
 
-    p_vout->p_sys->f_angle -= (new_date - p_vout->p_sys->last_date) / 50000.0;
+    p_vout->p_sys->f_angle -= (p_vout->p_sys->last_date - new_date) / 100000.0;
     p_vout->p_sys->last_date = new_date;
     f_angle = p_vout->p_sys->f_angle;
 
@@ -412,13 +394,13 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
         i_num_lines = p_inpic->planes[ i_index ].i_bytes
                           / p_inpic->planes[ i_index ].i_line_bytes;
 
-        i_first_line = i_num_lines * 3 / 4;
+        i_first_line = i_num_lines * 4 / 5;
 
         p_in = p_inpic->planes[ i_index ].p_data;
         p_out = p_outpic->planes[ i_index ].p_data;
 
-        p_main->fast_memcpy( p_out, p_in,
-                    i_first_line * p_inpic->planes[ i_index ].i_line_bytes );
+        FAST_MEMCPY( p_out, p_in,
+                     i_first_line * p_inpic->planes[ i_index ].i_line_bytes );
 
         p_in += i_first_line * p_inpic->planes[ i_index ].i_line_bytes;
         p_out += i_first_line * p_outpic->planes[ i_index ].i_line_bytes;
@@ -428,17 +410,18 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
         {
             /* Calculate today's offset, don't go above 1/20th of the screen */
             i_offset = (double)(p_inpic->planes[ i_index ].i_line_bytes)
-                         * sin( f_angle + 80.0 * (double)i_line
-                                               / (double)i_num_lines )
-                         * (double)( i_line - i_first_line)
+                         * sin( f_angle + 2.0 * (double)i_line
+                                              / (double)( 1 + i_line
+                                                            - i_first_line) )
+                         * (double)(i_line - i_first_line)
                          / (double)i_num_lines
-                         / 4.0;
+                         / 8.0;
 
             if( i_offset )
             {
                 if( i_offset < 0 )
                 {
-                    p_main->fast_memcpy( p_out, p_in - i_offset,
+                    FAST_MEMCPY( p_out, p_in - i_offset,
                          p_inpic->planes[ i_index ].i_line_bytes + i_offset );
                     p_in -= p_inpic->planes[ i_index ].i_line_bytes;
                     p_out += p_outpic->planes[ i_index ].i_line_bytes;
@@ -446,7 +429,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
                 }
                 else
                 {
-                    p_main->fast_memcpy( p_out + i_offset, p_in,
+                    FAST_MEMCPY( p_out + i_offset, p_in,
                          p_inpic->planes[ i_index ].i_line_bytes - i_offset );
                     memset( p_out, black_pixel, i_offset );
                     p_in -= p_inpic->planes[ i_index ].i_line_bytes;
@@ -455,8 +438,8 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
             }
             else
             {
-                p_main->fast_memcpy( p_out, p_in,
-                                     p_inpic->planes[ i_index ].i_line_bytes );
+                FAST_MEMCPY( p_out, p_in,
+                             p_inpic->planes[ i_index ].i_line_bytes );
                 p_in -= p_inpic->planes[ i_index ].i_line_bytes;
                 p_out += p_outpic->planes[ i_index ].i_line_bytes;
             }
index 9b59796e74a50c108d1fd4ecfc061863c6f5f7de..7f78932072fa464b7b3d82dfa66bfffeb4aee82e 100644 (file)
@@ -2,7 +2,7 @@
  * invert.c : Invert video plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: invert.c,v 1.2 2001/12/19 03:50:22 sam Exp $
+ * $Id: invert.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME filter_invert
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "filter_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
@@ -56,14 +44,14 @@ static void vout_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Invert module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "invert video module";
+    SET_DESCRIPTION( "invert video module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * as a video output unless explicitly requested to */
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_SHORTCUT( "invert" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -117,12 +105,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_FILTER_VAR, "invert" ) )
-    {
-        return( 999 );
-    }
-
-    /* If we weren't asked to filter, don't filter. */
     return( 0 );
 }
 
index fa9e6e77c3730f94ce7a4837f5c556208351d5ea..9b08b83c2b5ee023d89477a471945f2a014434f7 100644 (file)
@@ -2,7 +2,7 @@
  * transform.c : transform image plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: transform.c,v 1.1 2001/12/19 03:50:22 sam Exp $
+ * $Id: transform.c,v 1.2 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME filter_transform
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "filter_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define TRANSFORM_MODE_HFLIP   1
 #define TRANSFORM_MODE_VFLIP   2
 #define TRANSFORM_MODE_90      3
@@ -62,14 +50,14 @@ static void vout_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for transform module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "image transformation module";
+    SET_DESCRIPTION( "image transformation module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * as a video output unless explicitly requested to */
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_SHORTCUT( "transform" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -125,12 +113,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_FILTER_VAR, "transform" ) )
-    {
-        return( 999 );
-    }
-
-    /* If we weren't asked to filter, don't filter. */
     return( 0 );
 }
 
@@ -406,8 +388,8 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
                 for( ; p_in < p_in_end ; )
                 {
                     p_in_end -= p_pic->planes[ i_index ].i_line_bytes;
-                    p_main->fast_memcpy( p_out, p_in_end,
-                                     p_pic->planes[ i_index ].i_line_bytes );
+                    FAST_MEMCPY( p_out, p_in_end,
+                                 p_pic->planes[ i_index ].i_line_bytes );
                     p_out += p_pic->planes[ i_index ].i_line_bytes;
                 }
             }
index 3d5559690998e65619ed75f27637ef2f0fe6920a..7021c772709005e2337c342696e14272f64adaeb 100644 (file)
@@ -2,7 +2,7 @@
  * wall.c : Wall video plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: wall.c,v 1.2 2001/12/19 03:50:22 sam Exp $
+ * $Id: wall.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME filter_wall
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "filter_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
@@ -56,14 +44,14 @@ static void vout_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Wall module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "image wall video module";
+    SET_DESCRIPTION( "image wall video module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * as a video output unless explicitly requested to */
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_SHORTCUT( "wall" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -81,8 +69,10 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 typedef struct vout_sys_s
 {
-    struct vout_thread_s *p_vout_top;
-    struct vout_thread_s *p_vout_bottom;
+    int    i_col;
+    int    i_row;
+    int    i_vout;
+    struct vout_thread_s **pp_vout;
 
 } vout_sys_t;
 
@@ -90,12 +80,14 @@ typedef struct vout_sys_s
  * Local prototypes
  *****************************************************************************/
 static int  vout_Probe     ( probedata_t *p_data );
-static int  vout_Create    ( struct vout_thread_s * );
-static int  vout_Init      ( struct vout_thread_s * );
-static void vout_End       ( struct vout_thread_s * );
-static void vout_Destroy   ( struct vout_thread_s * );
-static int  vout_Manage    ( struct vout_thread_s * );
-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_Display   ( vout_thread_t *, struct picture_s * );
+
+static void RemoveAllVout  ( vout_thread_t *p_vout );
 
 /*****************************************************************************
  * Functions exported as capabilities. They are declared as static so that
@@ -118,12 +110,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_FILTER_VAR, "wall" ) )
-    {
-        return( 999 );
-    }
-
-    /* If we weren't asked to filter, don't filter. */
     return( 0 );
 }
 
@@ -142,6 +128,20 @@ static int vout_Create( vout_thread_t *p_vout )
         return( 1 );
     }
 
+    p_vout->p_sys->i_col = 2;
+    p_vout->p_sys->i_row = 3;
+
+    p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_row *
+                                     p_vout->p_sys->i_col *
+                                     sizeof(vout_thread_t*) );
+    if( p_vout->p_sys->pp_vout == NULL )
+    {
+        intf_ErrMsg("error: %s", strerror(ENOMEM) );
+        free( p_vout->p_sys );
+        return( 1 );
+    }
+
+
     return( 0 );
 }
 
@@ -172,38 +172,31 @@ static int vout_Init( vout_thread_t *p_vout )
     }
 
     /* Try to open the real video output */
-    psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, "" );
+    psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, NULL );
     main_PutPszVariable( VOUT_FILTER_VAR, "" );
 
     intf_WarnMsg( 1, "filter: spawning the real video outputs" );
 
-    p_vout->p_sys->p_vout_top =
-        vout_CreateThread( NULL,
-                           p_vout->render.i_width, p_vout->render.i_height / 2,
-                           p_vout->render.i_chroma, p_vout->render.i_aspect * 2);
-
-    /* Everything failed */
-    if( p_vout->p_sys->p_vout_top == NULL )
+    for( p_vout->p_sys->i_vout = 0;
+         p_vout->p_sys->i_vout < p_vout->p_sys->i_row * p_vout->p_sys->i_col;
+         p_vout->p_sys->i_vout++ )
     {
-        intf_ErrMsg( "filter error: can't open top vout, aborting" );
-
-        return( 0 );
+        p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ] =
+            vout_CreateThread( NULL,
+                p_vout->render.i_width / p_vout->p_sys->i_col,
+                p_vout->render.i_height / p_vout->p_sys->i_row,
+                p_vout->render.i_chroma,
+                p_vout->render.i_aspect * p_vout->p_sys->i_row
+                                        / p_vout->p_sys->i_col );
+        if( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_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 );
+             RemoveAllVout( p_vout );
+             return 0;
+        }
     }
 
-    p_vout->p_sys->p_vout_bottom =
-        vout_CreateThread( NULL,
-                           p_vout->render.i_width, p_vout->render.i_height / 2,
-                           p_vout->render.i_chroma, p_vout->render.i_aspect * 2 );
-
-    /* Everything failed */
-    if( p_vout->p_sys->p_vout_bottom == NULL )
-    {
-        intf_ErrMsg( "filter error: can't open bottom vout, aborting" );
-        vout_DestroyThread( p_vout->p_sys->p_vout_top, NULL );
-
-        return( 0 );
-    }
     main_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
 
     ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
@@ -233,9 +226,9 @@ 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_top, NULL );
-    vout_DestroyThread( p_vout->p_sys->p_vout_bottom, NULL );
+    RemoveAllVout( p_vout );
 
+    free( p_vout->p_sys->pp_vout );
     free( p_vout->p_sys );
 }
 
@@ -259,55 +252,60 @@ static int vout_Manage( vout_thread_t *p_vout )
  *****************************************************************************/
 static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
 {
-    picture_t *p_outpic_top, *p_outpic_bottom;
-    int i_index;
+    picture_t *p_outpic;
+    int i_col, i_row, i_vout, i_index;
     mtime_t i_date = mdate() + 50000;
 
-    while( ( p_outpic_top
-              = vout_CreatePicture( p_vout->p_sys->p_vout_top, 0, 0, 0 ) )
-            == NULL )
-    {
-        if( p_vout->b_die || p_vout->b_error )
-        {
-            return;
-        }
-        msleep( VOUT_OUTMEM_SLEEP );
-    }   
+    i_vout = 0;
 
-    while( ( p_outpic_bottom
-              = vout_CreatePicture( p_vout->p_sys->p_vout_bottom, 0, 0, 0 ) )
-            == NULL )
+    for( i_row = 0; i_row < p_vout->p_sys->i_row; i_row++ )
     {
-        if( p_vout->b_die || p_vout->b_error )
+        for( i_col = 0; i_col < p_vout->p_sys->i_col; i_col++ )
         {
-            vout_DestroyPicture( p_vout->p_sys->p_vout_top, p_outpic_top );
-            return;
-        }
-        msleep( VOUT_OUTMEM_SLEEP );
-    }   
+            while( ( p_outpic =
+                vout_CreatePicture( p_vout->p_sys->pp_vout[ i_vout ], 0, 0, 0 )
+                   ) == NULL )
+            {
+                if( p_vout->b_die || p_vout->b_error )
+                {
+                    vout_DestroyPicture( p_vout->p_sys->pp_vout[ i_vout ], 
+                                         p_outpic );
+                    return;
+                }
+
+                msleep( VOUT_OUTMEM_SLEEP );
+            }
+
+            vout_DatePicture( p_vout->p_sys->pp_vout[ i_vout ],
+                              p_outpic, i_date );
+            vout_LinkPicture( p_vout->p_sys->pp_vout[ i_vout ],
+                              p_outpic );
+
+            for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
+            {
+                FAST_MEMCPY( p_outpic->planes[ i_index ].p_data,
+                             p_pic->planes[ i_index ].p_data
+                                 + p_pic->planes[ i_index ].i_bytes / 2,
+                             p_outpic->planes[ i_index ].i_bytes );
+            }
 
-    vout_DatePicture( p_vout->p_sys->p_vout_top, p_outpic_top, i_date );
-    vout_DatePicture( p_vout->p_sys->p_vout_bottom, p_outpic_bottom, i_date );
+            vout_UnlinkPicture( p_vout->p_sys->pp_vout[ i_vout ],
+                                p_outpic );
+            vout_DisplayPicture( p_vout->p_sys->pp_vout[ i_vout ],
+                                 p_outpic );
 
-    vout_LinkPicture( p_vout->p_sys->p_vout_top, p_outpic_top );
-    vout_LinkPicture( p_vout->p_sys->p_vout_bottom, p_outpic_bottom );
+            i_vout++;
+        }
+    }
+}
 
-    for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
+static void RemoveAllVout( vout_thread_t *p_vout )
+{
+    while( p_vout->p_sys->i_vout )
     {
-        p_main->fast_memcpy( p_outpic_top->planes[ i_index ].p_data,
-                             p_pic->planes[ i_index ].p_data,
-                             p_pic->planes[ i_index ].i_bytes / 2 );
-
-        p_main->fast_memcpy( p_outpic_bottom->planes[ i_index ].p_data,
-                             p_pic->planes[ i_index ].p_data
-                              + p_pic->planes[ i_index ].i_bytes / 2,
-                             p_pic->planes[ i_index ].i_bytes / 2 );
+         --p_vout->p_sys->i_vout;
+         vout_DestroyThread( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ],
+                             NULL );
     }
-
-    vout_UnlinkPicture( p_vout->p_sys->p_vout_top, p_outpic_top );
-    vout_UnlinkPicture( p_vout->p_sys->p_vout_bottom, p_outpic_bottom );
-
-    vout_DisplayPicture( p_vout->p_sys->p_vout_top, p_outpic_top );
-    vout_DisplayPicture( p_vout->p_sys->p_vout_bottom, p_outpic_bottom );
 }
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 721a916bbef20847daaf10027c88188cbe2ed268..ee1e7dfabd97504780ed474f9ce6630d060112b0 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) ggi module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = ggi.o vout_ggi.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../ggi.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_GGI)
-
-../ggi.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+ggi_SOURCES = ggi.c vout_ggi.c
index 791c10115e3792dc2d05f7b7154c8188281027e8..4de1d19655ad1e325a0088e867528742eeafd252 100644 (file)
@@ -2,7 +2,7 @@
  * ggi.c : GGI plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: ggi.c,v 1.9 2001/12/09 17:01:36 sam Exp $
+ * $Id: ggi.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME ggi
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
index 1f1c7e62c7967005ebc67a58850f74da73ed7e9f..f5dfe4a09adc9553d639fdeab6bd5ee5d291c0e8 100644 (file)
@@ -2,7 +2,7 @@
  * vout_ggi.c: GGI video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_ggi.c,v 1.13 2001/12/07 18:33:07 sam Exp $
+ * $Id: vout_ggi.c,v 1.14 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME ggi
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
 #include <ggi/ggi.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-#include "modules.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -49,8 +39,6 @@
 #include "intf_msg.h"
 #include "interface.h"
 
-#include "modules_export.h"
-
 /*****************************************************************************
  * vout_sys_t: video output GGI method descriptor
  *****************************************************************************
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 653ced8179479e2f5afa54acb6a28d685ce1278b..d35c0522b5aa8baa9e3aca83ad58fb43e249a429 100644 (file)
@@ -1,39 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) glide module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_GLIDE = glide.o vout_glide.o
-BUILTIN_GLIDE = $(PLUGIN_GLIDE:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_GLIDE) $(BUILTIN_GLIDE)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_GLIDE): %.o: .dep/%.d
-$(PLUGIN_GLIDE): %.o: %.c
-       $(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
-
-$(BUILTIN_GLIDE): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_GLIDE): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/glide -c -o $@ $<
-
-#
-# Real targets
-#
-
-../glide.so: $(PLUGIN_GLIDE)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_GLIDE)
-
-../glide.a: $(BUILTIN_GLIDE)
-       ar r $@ $^
-       $(RANLIB) $@
-
+glide_SOURCES = glide.c vout_glide.c
index a426e36fe187e9faffe8bdc5fcc578546139dbc2..ac7522d409f1cb15a0961d07d4121a817ec409ef 100644 (file)
@@ -2,7 +2,7 @@
  * glide.c : 3dfx Glide plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: glide.c,v 1.8 2001/12/09 17:01:36 sam Exp $
+ * $Id: glide.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME glide
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
index 28c368c023a41e9e36fe403bc762bc59d269c12e..fd063b2de52ecb023b7f0ae0714a9e2fec8c0c3d 100644 (file)
@@ -2,7 +2,7 @@
  * vout_glide.c: 3dfx video output display method for 3dfx cards
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: vout_glide.c,v 1.9 2001/12/07 18:33:07 sam Exp $
+ * $Id: vout_glide.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME glide
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
+#include <videolan/vlc.h>
+
 #ifndef __linux__
-#include <conio.h>                                            /* for glide ? */
+#   include <conio.h>                                         /* for glide ? */
 #endif
 #include <glide.h>
 #include <linutil.h>                            /* Glide kbhit() and getch() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #include "video.h"
 #include "video_output.h"
 
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define GLIDE_WIDTH 800
 #define GLIDE_HEIGHT 600
 #define GLIDE_BITS_PER_PLANE 16
index d2fd3ef4e262360ab79c85bad2ab7e4570655cb6..56f1e1d10f1f507d0649ee8db98ad492b8d2b812 100644 (file)
@@ -1,2 +1,5 @@
 *.bak
 .dep
+*.lo
+*.o.*
+*.lo.*
index cff4121cc54c30b6655e6ba53d2843ec2b6118b8..0918a99db0f74a1a0d23ebcd0e1bba5befd1f824 100644 (file)
@@ -1,71 +1,4 @@
-###############################################################################
-# vlc (VideoLAN Client) gtk/gnome module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_GTK = gtk.o intf_gtk.o gtk_interface.o gtk_support.o
-PLUGIN_GNOME = gnome.o intf_gnome.o gnome_interface.o gnome_support.o gnome_callbacks.o
-
-PLUGIN_GTK_SPECIFIC = gtk_display.o gtk_open.o gtk_control.o gtk_menu.o gtk_playlist.o gtk_modules.o gtk_preferences.o gtk_callbacks.o
-PLUGIN_GNOME_SPECIFIC = $(PLUGIN_GTK_SPECIFIC:%.o=%_gnome.o)
-
-BUILTIN_GTK = $(PLUGIN_GTK:%.o=BUILTIN_GTK_%.o) \
-        $(PLUGIN_GTK_SPECIFIC:%.o=BUILTIN_GTK_%.o)
-BUILTIN_GNOME = $(PLUGIN_GNOME:%.o=BUILTIN_GNOME_%.o) \
-        $(PLUGIN_GTK_SPECIFIC:%.o=BUILTIN_GNOME_%.o)
-
-ALL_OBJ = $(PLUGIN_GTK) $(PLUGIN_GNOME) $(PLUGIN_GTK_SPECIFIC) \
-          $(PLUGIN_GNOME_SPECIFIC) $(BUILTIN_GTK) $(BUILTIN_GNOME)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-# Gtk+
-$(PLUGIN_GTK) $(PLUGIN_GTK_SPECIFIC): %.o: .dep/%.d
-$(PLUGIN_GTK) $(PLUGIN_GTK_SPECIFIC): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_GTK) -DPLUGIN -DMODULE_NAME=gtk -c -o $@ $<
-
-$(BUILTIN_GTK): BUILTIN_GTK_%.o: .dep/%.d
-$(BUILTIN_GTK): BUILTIN_GTK_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_GTK) -DBUILTIN -DMODULE_NAME=gtk -c -o $@ $<
-
-# Gnome
-$(PLUGIN_GNOME): %.o: .dep/%.d
-$(PLUGIN_GNOME): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) -DPLUGIN -DMODULE_NAME=gnome `gnome-config --cflags gtk gnomeui` -c -o $@ $<
-
-$(PLUGIN_GNOME_SPECIFIC): %_gnome.o: .dep/%.d
-$(PLUGIN_GNOME_SPECIFIC): %_gnome.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) -DPLUGIN -DMODULE_NAME=gnome `gnome-config --cflags gtk gnomeui` -c -o $@ $<
-
-$(BUILTIN_GNOME): BUILTIN_GNOME_%.o: .dep/%.d
-$(BUILTIN_GNOME): BUILTIN_GNOME_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=gnome `gnome-config --cflags gtk gnomeui` -c -o $@ $<
-
-
-#
-# Real targets
-#
-
-../gtk.so: $(PLUGIN_GTK) $(PLUGIN_GTK_SPECIFIC)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_GTK)
-
-../gtk.a: $(BUILTIN_GTK)
-       ar r $@ $^
-       $(RANLIB) $@
-
-
-../gnome.so: $(PLUGIN_GNOME) $(PLUGIN_GNOME_SPECIFIC)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_GNOME)
-
-../gnome.a: $(BUILTIN_GNOME)
-       ar r $@ $^
-       $(RANLIB) $@
+COMMON_SOURCES = gtk_display.c gtk_open.c gtk_control.c gtk_menu.c gtk_playlist.c gtk_modules.c gtk_preferences.c gtk_callbacks.c
 
+gtk_SOURCES = gtk.c gtk_interface.c gtk_support.c $(COMMON_SOURCES)
+gnome_SOURCES = gnome.c gnome_interface.c gnome_support.c gnome_callbacks.c $(COMMON_SOURCES)
diff --git a/plugins/gtk/fixfiles.sh b/plugins/gtk/fixfiles.sh
new file mode 100755 (executable)
index 0000000..6917fda
--- /dev/null
@@ -0,0 +1,21 @@
+#! /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 <videolan/vlc.h>
+EOF
+                tail +8 $file \
+                        | sed 's#_("/dev/dvd")#DVD_DEVICE#' \
+                        >> /tmp/$$.$file.bak
+                mv -f /tmp/$$.$file.bak $file
+        fi
+done
index af752b98a7ffc4ec395d79cfcc41af25a88b06da..4f24c39bcad04df9312285d9c21092c6049db770 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.3 2001/12/09 17:01:36 sam Exp $
+ * $Id: gnome.c,v 1.4 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME gnome
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#include <string.h>
 #include <stdlib.h>                                      /* malloc(), free() */
+#include <errno.h>                                                 /* ENOMEM */
+#include <string.h>                                            /* strerror() */
+#include <stdio.h>
+
+#include <videolan/vlc.h>
+
+#include <gnome.h>
+
+#include "stream_control.h"
+#include "input_ext-intf.h"
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include "interface.h"
+#include "intf_playlist.h"
 
-#include "modules.h"
-#include "modules_export.h"
+#include "video.h"
+#include "video_output.h"
+
+#include "gnome_callbacks.h"
+#include "gnome_interface.h"
+#include "gnome_support.h"
+#include "gtk_display.h"
+#include "gtk_common.h"
 
 /*****************************************************************************
- * Capabilities defined in the other files.
+ * Local prototypes.
  *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list );
+static void intf_getfunctions( function_list_t * p_function_list );
+static int  intf_Probe       ( probedata_t *p_data );
+static int  intf_Open        ( intf_thread_t *p_intf );
+static void intf_Close       ( intf_thread_t *p_intf );
+static void intf_Run         ( intf_thread_t *p_intf );
+
+static gint GnomeManage      ( gpointer p_data );
 
 /*****************************************************************************
  * Building configuration tree
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Gnome module" )
-    ADD_COMMENT( "For now, the Gnome module cannot be configured" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "Gnome interface module";
+    SET_DESCRIPTION( "Gnome interface module" )
+#ifndef WIN32
+    if( getenv( "DISPLAY" ) == NULL )
+    {
+        ADD_CAPABILITY( INTF, 15 )
+    }
+    else
+#endif
+    {
+        ADD_CAPABILITY( INTF, 100 )
+    }
+    ADD_SHORTCUT( "gtk" )
+    ADD_PROGRAM( "gnome-vlc" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
+    intf_getfunctions( &p_module->p_functions->intf );
 MODULE_ACTIVATE_STOP
 
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
+/*****************************************************************************
+ * g_atexit: kludge to avoid the Gnome thread to segfault at exit
+ *****************************************************************************
+ * gtk_init() makes several calls to g_atexit() which calls atexit() to
+ * register tidying callbacks to be called at program exit. Since the Gnome
+ * plugin is likely to be unloaded at program exit, we have to export this
+ * symbol to intercept the g_atexit() calls. Talk about crude hack.
+ *****************************************************************************/
+void g_atexit( GVoidFunc func )
+{
+    intf_thread_t *p_intf = p_main->p_intf;
+    int i_dummy;
+
+    for( i_dummy = 0;
+         i_dummy < MAX_ATEXIT && p_intf->p_sys->pf_callback[i_dummy] != NULL;
+         i_dummy++ )
+    {
+        ;
+    }
+
+    if( i_dummy >= MAX_ATEXIT - 1 )
+    {
+        intf_ErrMsg( "intf error: too many atexit() callbacks to register" );
+        return;
+    }
+
+    p_intf->p_sys->pf_callback[i_dummy]     = func;
+    p_intf->p_sys->pf_callback[i_dummy + 1] = NULL;
+}
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+static void intf_getfunctions( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = intf_Probe;
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+/*****************************************************************************
+ * intf_Probe: probe the interface and return a score
+ *****************************************************************************
+ * This function tries to initialize Gnome and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+static int intf_Probe( probedata_t *p_data )
+{
+#ifndef WIN32
+    if( getenv( "DISPLAY" ) == NULL )
+    {
+        return( 15 );
+    }
+#endif
+
+    return( 100 );
+}
+
+/*****************************************************************************
+ * intf_Open: initialize and create window
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        intf_ErrMsg("error: %s", strerror(ENOMEM));
+        return( 1 );
+    }
+
+    /* Initialize Gnome thread */
+    p_intf->p_sys->b_playing = 1;
+    p_intf->p_sys->b_popup_changed = 0;
+    p_intf->p_sys->b_window_changed = 0;
+    p_intf->p_sys->b_playlist_changed = 0;
+
+    p_intf->p_sys->i_playing = -1;
+    p_intf->p_sys->b_slider_free = 1;
+
+    p_intf->p_sys->pf_callback[0] = NULL;
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * intf_Close: destroy interface window
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * intf_Run: Gnome thread
+ *****************************************************************************
+ * this part of the interface is in a separate thread so that we can call
+ * gtk_main() from within it without annoying the rest of the program.
+ * XXX: the approach may look kludgy, and probably is, but I could not find
+ * a better way to dynamically load a Gnome interface at runtime.
+ *****************************************************************************/
+static void intf_Run( intf_thread_t *p_intf )
+{
+    /* gnome_init needs to know the command line. We don't care, so we
+     * give it an empty one */
+    char *p_args[] = { "" };
+    int   i_args   = 1;
+    int   i_dummy;
+
+    /* The data types we are allowed to receive */
+    static GtkTargetEntry target_table[] =
+    {
+        { "STRING", 0, DROP_ACCEPT_STRING },
+        { "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
+        { "text/plain",    0, DROP_ACCEPT_TEXT_PLAIN }
+    };
+
+    /* Initialize Gnome */
+    gnome_init( p_main->psz_arg0, VLC_VERSION, i_args, p_args );
+
+    /* Create some useful widgets that will certainly be used */
+    p_intf->p_sys->p_window = create_intf_window( );
+    p_intf->p_sys->p_popup = create_intf_popup( );
+    p_intf->p_sys->p_playlist = create_intf_playlist();
+
+    /* Set the title of the main window */
+    gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
+                          VOUT_TITLE " (Gnome interface)");
+
+    /* Accept file drops on the main window */
+    gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ),
+                       GTK_DEST_DEFAULT_ALL, target_table,
+                       1, GDK_ACTION_COPY );
+    /* Accept file drops on the playlist window */
+    gtk_drag_dest_set( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
+                            p_intf->p_sys->p_playlist ), "playlist_clist") ),
+                       GTK_DEST_DEFAULT_ALL, target_table,
+                       1, GDK_ACTION_COPY );
+
+    /* Get the interface labels */
+    p_intf->p_sys->p_slider_frame = gtk_object_get_data(
+                      GTK_OBJECT( p_intf->p_sys->p_window ), "slider_frame" );
+    #define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
+    p_intf->p_sys->p_label_title = P_LABEL( "title_label" );
+    p_intf->p_sys->p_label_chapter = P_LABEL( "chapter_label" );
+    #undef P_LABEL
+
+    /* Connect the date display to the slider */
+    #define P_SLIDER GTK_RANGE( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
+    p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
+
+    gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
+                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
+    p_intf->p_sys->f_adj_oldvalue = 0;
+    #undef P_SLIDER
+
+    /* 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;
+    p_intf->p_sys->p_fileopen = NULL;
+    p_intf->p_sys->p_disc = NULL;
+    p_intf->p_sys->p_network = NULL;
+    p_intf->p_sys->p_preferences = NULL;
+    p_intf->p_sys->p_jump = NULL;
+
+    /* Store p_intf to keep an eye on it */
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
+                         "p_intf", p_intf );
+
+    /* Show the control window */
+    gtk_widget_show( p_intf->p_sys->p_window );
+
+    /* Sleep to avoid using all CPU - since some interfaces needs to access
+     * keyboard events, a 100ms delay is a good compromise */
+    i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, GnomeManage, p_intf );
+
+    /* Enter gnome mode */
+    gtk_main();
+
+    /* Remove the timeout */
+    gtk_timeout_remove( i_dummy );
+
+    /* Get rid of stored callbacks so we can unload the plugin */
+    for( i_dummy = 0;
+         i_dummy < MAX_ATEXIT && p_intf->p_sys->pf_callback[i_dummy] != NULL;
+         i_dummy++ )
+    {
+        p_intf->p_sys->pf_callback[i_dummy]();
+    }
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * GnomeManage: manage main thread messages
+ *****************************************************************************
+ * In this function, called approx. 10 times a second, we check what the
+ * main program wanted to tell us.
+ *****************************************************************************/
+static gint GnomeManage( gpointer p_data )
+{
+#define p_intf ((intf_thread_t *)p_data)
+
+    vlc_mutex_lock( &p_intf->change_lock );
+
+    /* If the "display popup" flag has changed */
+    if( p_intf->b_menu_change )
+    {
+        if( !GTK_IS_WIDGET( p_intf->p_sys->p_popup ) )
+        {
+            p_intf->p_sys->p_popup = create_intf_popup();
+            gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_popup ),
+                                 "p_popup", p_intf );
+        }
+
+        gnome_popup_menu_do_popup( p_intf->p_sys->p_popup,
+                                   NULL, NULL, NULL, NULL );
+        p_intf->b_menu_change = 0;
+    }
+
+    /* update the playlist */
+    GtkPlayListManage( p_intf ); 
+
+    if( p_intf->p_input != NULL && !p_intf->b_die )
+    {
+        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+
+        /* New input or stream map change */
+        if( p_intf->p_input->stream.b_changed )
+        {
+            GtkModeManage( p_intf );
+            GtkSetupMenus( p_intf );
+            p_intf->p_sys->b_playing = 1;
+        }
+
+        /* Manage the slider */
+        if( p_intf->p_input->stream.b_seekable )
+        {
+            float           newvalue;
+            newvalue = p_intf->p_sys->p_adj->value;
+    
+#define p_area p_intf->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 =
+                    ( 100. * p_area->i_tell ) / p_area->i_size;
+    
+                gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
+                                         "value_changed" );
+            }
+            /* Otherwise, send message to the input if the user has
+             * finished dragging the slider */
+            else if( p_intf->p_sys->b_slider_free )
+            {
+                off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+    
+                vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+                input_Seek( p_intf->p_input, i_seek );
+                vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+    
+                /* Update the old value */
+                p_intf->p_sys->f_adj_oldvalue = newvalue;
+            }
+#undef p_area
+        }
+
+        if( p_intf->p_sys->i_part !=
+            p_intf->p_input->stream.p_selected_area->i_part )
+        {
+            p_intf->p_sys->b_chapter_update = 1;
+            GtkSetupMenus( p_intf );
+        }
+
+        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+    }
+    else if( p_intf->p_sys->b_playing && !p_intf->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 )
+    {
+        vlc_mutex_unlock( &p_intf->change_lock );
+
+        /* Prepare to die, young Skywalker */
+        gtk_main_quit();
+
+        /* Just in case */
+        return( FALSE );
+    }
+
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return( TRUE );
+
+#undef p_intf
+}
+
similarity index 87%
rename from plugins/gtk/intf_gnome.glade
rename to plugins/gtk/gnome.glade
index c50963256b56f8f6a96c38fab30af0c030b9f2a2..7f66367f6e320a251bcbbe80055f3d83832bf9bb 100644 (file)
              <last_modification_time>Sat, 19 May 2001 03:13:28 GMT</last_modification_time>
            </signal>
            <stock_button>GNOME_STOCK_BUTTON_PREV</stock_button>
-           <relief>GTK_RELIEF_NONE</relief>
+           <relief>GTK_RELIEF_NORMAL</relief>
            <child>
              <padding>0</padding>
              <expand>False</expand>
              <last_modification_time>Sat, 19 May 2001 03:13:23 GMT</last_modification_time>
            </signal>
            <stock_button>GNOME_STOCK_BUTTON_NEXT</stock_button>
-           <relief>GTK_RELIEF_NONE</relief>
+           <relief>GTK_RELIEF_NORMAL</relief>
            <child>
              <padding>0</padding>
              <expand>False</expand>
              <last_modification_time>Tue, 29 May 2001 13:13:41 GMT</last_modification_time>
            </signal>
            <stock_button>GNOME_STOCK_BUTTON_DOWN</stock_button>
-           <relief>GTK_RELIEF_NONE</relief>
+           <relief>GTK_RELIEF_NORMAL</relief>
            <child>
              <padding>0</padding>
              <expand>False</expand>
              <last_modification_time>Sat, 19 May 2001 03:13:08 GMT</last_modification_time>
            </signal>
            <stock_button>GNOME_STOCK_BUTTON_UP</stock_button>
-           <relief>GTK_RELIEF_NONE</relief>
+           <relief>GTK_RELIEF_NORMAL</relief>
            <child>
              <padding>0</padding>
              <expand>False</expand>
@@ -4580,4 +4580,765 @@ Stereo
   </widget>
 </widget>
 
+<widget>
+  <class>GnomeDialog</class>
+  <name>intf_open</name>
+  <title>Open Stream</title>
+  <type>GTK_WINDOW_TOPLEVEL</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>True</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>False</allow_grow>
+  <auto_shrink>False</auto_shrink>
+  <auto_close>False</auto_close>
+  <hide_on_close>False</hide_on_close>
+
+  <widget>
+    <class>GtkVBox</class>
+    <child_name>GnomeDialog:vbox</child_name>
+    <name>dialog-vbox5</name>
+    <homogeneous>False</homogeneous>
+    <spacing>8</spacing>
+    <child>
+      <padding>4</padding>
+      <expand>True</expand>
+      <fill>True</fill>
+    </child>
+
+    <widget>
+      <class>GtkHButtonBox</class>
+      <child_name>GnomeDialog:action_area</child_name>
+      <name>dialog-action_area5</name>
+      <layout_style>GTK_BUTTONBOX_END</layout_style>
+      <spacing>8</spacing>
+      <child_min_width>85</child_min_width>
+      <child_min_height>27</child_min_height>
+      <child_ipad_x>7</child_ipad_x>
+      <child_ipad_y>0</child_ipad_y>
+      <child>
+       <padding>0</padding>
+       <expand>False</expand>
+       <fill>True</fill>
+       <pack>GTK_PACK_END</pack>
+      </child>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>button1</name>
+       <can_default>True</can_default>
+       <can_focus>True</can_focus>
+       <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+      </widget>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>button3</name>
+       <can_default>True</can_default>
+       <can_focus>True</can_focus>
+       <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkNotebook</class>
+      <name>tab_open</name>
+      <can_focus>True</can_focus>
+      <show_tabs>True</show_tabs>
+      <show_border>True</show_border>
+      <tab_pos>GTK_POS_TOP</tab_pos>
+      <scrollable>False</scrollable>
+      <tab_hborder>2</tab_hborder>
+      <tab_vborder>2</tab_vborder>
+      <popup_enable>False</popup_enable>
+      <child>
+       <padding>0</padding>
+       <expand>True</expand>
+       <fill>True</fill>
+      </child>
+
+      <widget>
+       <class>GtkVBox</class>
+       <name>vbox10</name>
+       <border_width>5</border_width>
+       <homogeneous>False</homogeneous>
+       <spacing>5</spacing>
+
+       <widget>
+         <class>GtkHBox</class>
+         <name>hbox5</name>
+         <homogeneous>False</homogeneous>
+         <spacing>5</spacing>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkFrame</class>
+           <name>frame6</name>
+           <label>Disc type</label>
+           <label_xalign>0</label_xalign>
+           <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+           <child>
+             <padding>0</padding>
+             <expand>True</expand>
+             <fill>True</fill>
+           </child>
+
+           <widget>
+             <class>GtkVBox</class>
+             <name>vbox11</name>
+             <border_width>5</border_width>
+             <homogeneous>False</homogeneous>
+             <spacing>0</spacing>
+
+             <widget>
+               <class>GtkRadioButton</class>
+               <name>radiobutton1</name>
+               <can_focus>True</can_focus>
+               <label>DVD</label>
+               <active>False</active>
+               <draw_indicator>True</draw_indicator>
+               <child>
+                 <padding>0</padding>
+                 <expand>False</expand>
+                 <fill>False</fill>
+               </child>
+             </widget>
+
+             <widget>
+               <class>GtkRadioButton</class>
+               <name>radiobutton2</name>
+               <can_focus>True</can_focus>
+               <label>VCD</label>
+               <active>False</active>
+               <draw_indicator>True</draw_indicator>
+               <child>
+                 <padding>0</padding>
+                 <expand>False</expand>
+                 <fill>False</fill>
+               </child>
+             </widget>
+           </widget>
+         </widget>
+
+         <widget>
+           <class>GtkFrame</class>
+           <name>frame7</name>
+           <label>Starting position</label>
+           <label_xalign>0</label_xalign>
+           <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+           <child>
+             <padding>0</padding>
+             <expand>True</expand>
+             <fill>True</fill>
+           </child>
+
+           <widget>
+             <class>GtkTable</class>
+             <name>table3</name>
+             <border_width>5</border_width>
+             <rows>2</rows>
+             <columns>2</columns>
+             <homogeneous>False</homogeneous>
+             <row_spacing>5</row_spacing>
+             <column_spacing>5</column_spacing>
+
+             <widget>
+               <class>GtkLabel</class>
+               <name>label24</name>
+               <label>Title</label>
+               <justify>GTK_JUSTIFY_CENTER</justify>
+               <wrap>False</wrap>
+               <xalign>0</xalign>
+               <yalign>0.5</yalign>
+               <xpad>0</xpad>
+               <ypad>0</ypad>
+               <child>
+                 <left_attach>0</left_attach>
+                 <right_attach>1</right_attach>
+                 <top_attach>0</top_attach>
+                 <bottom_attach>1</bottom_attach>
+                 <xpad>0</xpad>
+                 <ypad>0</ypad>
+                 <xexpand>False</xexpand>
+                 <yexpand>False</yexpand>
+                 <xshrink>False</xshrink>
+                 <yshrink>False</yshrink>
+                 <xfill>True</xfill>
+                 <yfill>False</yfill>
+               </child>
+             </widget>
+
+             <widget>
+               <class>GtkLabel</class>
+               <name>label25</name>
+               <label>Chapter</label>
+               <justify>GTK_JUSTIFY_CENTER</justify>
+               <wrap>False</wrap>
+               <xalign>0</xalign>
+               <yalign>0.5</yalign>
+               <xpad>0</xpad>
+               <ypad>0</ypad>
+               <child>
+                 <left_attach>0</left_attach>
+                 <right_attach>1</right_attach>
+                 <top_attach>1</top_attach>
+                 <bottom_attach>2</bottom_attach>
+                 <xpad>0</xpad>
+                 <ypad>0</ypad>
+                 <xexpand>False</xexpand>
+                 <yexpand>False</yexpand>
+                 <xshrink>False</xshrink>
+                 <yshrink>False</yshrink>
+                 <xfill>True</xfill>
+                 <yfill>False</yfill>
+               </child>
+             </widget>
+
+             <widget>
+               <class>GtkSpinButton</class>
+               <name>spinbutton5</name>
+               <can_focus>True</can_focus>
+               <climb_rate>1</climb_rate>
+               <digits>0</digits>
+               <numeric>False</numeric>
+               <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+               <snap>False</snap>
+               <wrap>False</wrap>
+               <value>1</value>
+               <lower>0</lower>
+               <upper>100</upper>
+               <step>1</step>
+               <page>10</page>
+               <page_size>10</page_size>
+               <child>
+                 <left_attach>1</left_attach>
+                 <right_attach>2</right_attach>
+                 <top_attach>0</top_attach>
+                 <bottom_attach>1</bottom_attach>
+                 <xpad>0</xpad>
+                 <ypad>0</ypad>
+                 <xexpand>True</xexpand>
+                 <yexpand>False</yexpand>
+                 <xshrink>False</xshrink>
+                 <yshrink>False</yshrink>
+                 <xfill>True</xfill>
+                 <yfill>False</yfill>
+               </child>
+             </widget>
+
+             <widget>
+               <class>GtkSpinButton</class>
+               <name>spinbutton6</name>
+               <can_focus>True</can_focus>
+               <climb_rate>1</climb_rate>
+               <digits>0</digits>
+               <numeric>False</numeric>
+               <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+               <snap>False</snap>
+               <wrap>False</wrap>
+               <value>1</value>
+               <lower>0</lower>
+               <upper>100</upper>
+               <step>1</step>
+               <page>10</page>
+               <page_size>10</page_size>
+               <child>
+                 <left_attach>1</left_attach>
+                 <right_attach>2</right_attach>
+                 <top_attach>1</top_attach>
+                 <bottom_attach>2</bottom_attach>
+                 <xpad>0</xpad>
+                 <ypad>0</ypad>
+                 <xexpand>True</xexpand>
+                 <yexpand>False</yexpand>
+                 <xshrink>False</xshrink>
+                 <yshrink>False</yshrink>
+                 <xfill>True</xfill>
+                 <yfill>False</yfill>
+               </child>
+             </widget>
+           </widget>
+         </widget>
+       </widget>
+
+       <widget>
+         <class>GtkHBox</class>
+         <name>hbox6</name>
+         <homogeneous>False</homogeneous>
+         <spacing>5</spacing>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkLabel</class>
+           <name>label29</name>
+           <label>Device name:</label>
+           <justify>GTK_JUSTIFY_CENTER</justify>
+           <wrap>False</wrap>
+           <xalign>0.5</xalign>
+           <yalign>0.5</yalign>
+           <xpad>0</xpad>
+           <ypad>0</ypad>
+           <child>
+             <padding>0</padding>
+             <expand>False</expand>
+             <fill>False</fill>
+           </child>
+         </widget>
+
+         <widget>
+           <class>GtkEntry</class>
+           <name>entry1</name>
+           <can_focus>True</can_focus>
+           <editable>True</editable>
+           <text_visible>True</text_visible>
+           <text_max_length>0</text_max_length>
+           <text>/dev/dvd</text>
+           <child>
+             <padding>0</padding>
+             <expand>True</expand>
+             <fill>True</fill>
+           </child>
+         </widget>
+       </widget>
+      </widget>
+
+      <widget>
+       <class>GtkLabel</class>
+       <child_name>Notebook:tab</child_name>
+       <name>tab_disc</name>
+       <label>Disc</label>
+       <justify>GTK_JUSTIFY_CENTER</justify>
+       <wrap>False</wrap>
+       <xalign>0.5</xalign>
+       <yalign>0.5</yalign>
+       <xpad>0</xpad>
+       <ypad>0</ypad>
+      </widget>
+
+      <widget>
+       <class>GtkVBox</class>
+       <name>vbox12</name>
+       <border_width>5</border_width>
+       <homogeneous>False</homogeneous>
+       <spacing>5</spacing>
+
+       <widget>
+         <class>GtkHBox</class>
+         <name>hbox7</name>
+         <homogeneous>False</homogeneous>
+         <spacing>5</spacing>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkFrame</class>
+           <name>frame8</name>
+           <label>Protocol</label>
+           <label_xalign>0</label_xalign>
+           <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+           <child>
+             <padding>0</padding>
+             <expand>True</expand>
+             <fill>True</fill>
+           </child>
+
+           <widget>
+             <class>GtkVBox</class>
+             <name>vbox13</name>
+             <border_width>5</border_width>
+             <homogeneous>False</homogeneous>
+             <spacing>0</spacing>
+
+             <widget>
+               <class>GtkRadioButton</class>
+               <name>radiobutton3</name>
+               <can_focus>True</can_focus>
+               <label>UDP stream</label>
+               <active>False</active>
+               <draw_indicator>True</draw_indicator>
+               <child>
+                 <padding>0</padding>
+                 <expand>False</expand>
+                 <fill>False</fill>
+               </child>
+             </widget>
+
+             <widget>
+               <class>GtkRadioButton</class>
+               <name>radiobutton4</name>
+               <can_focus>True</can_focus>
+               <label>HTTP</label>
+               <active>False</active>
+               <draw_indicator>True</draw_indicator>
+               <child>
+                 <padding>0</padding>
+                 <expand>False</expand>
+                 <fill>False</fill>
+               </child>
+             </widget>
+
+             <widget>
+               <class>GtkRadioButton</class>
+               <name>radiobutton5</name>
+               <can_focus>True</can_focus>
+               <label>RTP</label>
+               <active>False</active>
+               <draw_indicator>True</draw_indicator>
+               <child>
+                 <padding>0</padding>
+                 <expand>False</expand>
+                 <fill>False</fill>
+               </child>
+             </widget>
+           </widget>
+         </widget>
+
+         <widget>
+           <class>GtkFrame</class>
+           <name>frame9</name>
+           <label>Server</label>
+           <label_xalign>0</label_xalign>
+           <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+           <child>
+             <padding>0</padding>
+             <expand>True</expand>
+             <fill>True</fill>
+           </child>
+
+           <widget>
+             <class>GtkVBox</class>
+             <name>vbox14</name>
+             <homogeneous>False</homogeneous>
+             <spacing>0</spacing>
+
+             <widget>
+               <class>GtkTable</class>
+               <name>table4</name>
+               <border_width>5</border_width>
+               <rows>2</rows>
+               <columns>2</columns>
+               <homogeneous>False</homogeneous>
+               <row_spacing>5</row_spacing>
+               <column_spacing>5</column_spacing>
+               <child>
+                 <padding>0</padding>
+                 <expand>True</expand>
+                 <fill>True</fill>
+               </child>
+
+               <widget>
+                 <class>GtkLabel</class>
+                 <name>label26</name>
+                 <label>Address</label>
+                 <justify>GTK_JUSTIFY_CENTER</justify>
+                 <wrap>False</wrap>
+                 <xalign>0</xalign>
+                 <yalign>0.5</yalign>
+                 <xpad>0</xpad>
+                 <ypad>0</ypad>
+                 <child>
+                   <left_attach>0</left_attach>
+                   <right_attach>1</right_attach>
+                   <top_attach>0</top_attach>
+                   <bottom_attach>1</bottom_attach>
+                   <xpad>0</xpad>
+                   <ypad>0</ypad>
+                   <xexpand>False</xexpand>
+                   <yexpand>False</yexpand>
+                   <xshrink>False</xshrink>
+                   <yshrink>False</yshrink>
+                   <xfill>True</xfill>
+                   <yfill>False</yfill>
+                 </child>
+               </widget>
+
+               <widget>
+                 <class>GtkLabel</class>
+                 <name>label27</name>
+                 <label>Port</label>
+                 <justify>GTK_JUSTIFY_CENTER</justify>
+                 <wrap>False</wrap>
+                 <xalign>0</xalign>
+                 <yalign>0.5</yalign>
+                 <xpad>0</xpad>
+                 <ypad>0</ypad>
+                 <child>
+                   <left_attach>0</left_attach>
+                   <right_attach>1</right_attach>
+                   <top_attach>1</top_attach>
+                   <bottom_attach>2</bottom_attach>
+                   <xpad>0</xpad>
+                   <ypad>0</ypad>
+                   <xexpand>False</xexpand>
+                   <yexpand>False</yexpand>
+                   <xshrink>False</xshrink>
+                   <yshrink>False</yshrink>
+                   <xfill>True</xfill>
+                   <yfill>False</yfill>
+                 </child>
+               </widget>
+
+               <widget>
+                 <class>GtkCombo</class>
+                 <name>combo1</name>
+                 <value_in_list>False</value_in_list>
+                 <ok_if_empty>True</ok_if_empty>
+                 <case_sensitive>False</case_sensitive>
+                 <use_arrows>True</use_arrows>
+                 <use_arrows_always>False</use_arrows_always>
+                 <items></items>
+                 <child>
+                   <left_attach>1</left_attach>
+                   <right_attach>2</right_attach>
+                   <top_attach>0</top_attach>
+                   <bottom_attach>1</bottom_attach>
+                   <xpad>0</xpad>
+                   <ypad>0</ypad>
+                   <xexpand>True</xexpand>
+                   <yexpand>False</yexpand>
+                   <xshrink>False</xshrink>
+                   <yshrink>False</yshrink>
+                   <xfill>True</xfill>
+                   <yfill>False</yfill>
+                 </child>
+
+                 <widget>
+                   <class>GtkEntry</class>
+                   <child_name>GtkCombo:entry</child_name>
+                   <name>combo-entry1</name>
+                   <can_focus>True</can_focus>
+                   <editable>True</editable>
+                   <text_visible>True</text_visible>
+                   <text_max_length>0</text_max_length>
+                   <text></text>
+                 </widget>
+               </widget>
+
+               <widget>
+                 <class>GtkSpinButton</class>
+                 <name>spinbutton7</name>
+                 <can_focus>True</can_focus>
+                 <climb_rate>1</climb_rate>
+                 <digits>0</digits>
+                 <numeric>False</numeric>
+                 <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+                 <snap>False</snap>
+                 <wrap>False</wrap>
+                 <value>0</value>
+                 <lower>0</lower>
+                 <upper>100</upper>
+                 <step>1</step>
+                 <page>10</page>
+                 <page_size>10</page_size>
+                 <child>
+                   <left_attach>1</left_attach>
+                   <right_attach>2</right_attach>
+                   <top_attach>1</top_attach>
+                   <bottom_attach>2</bottom_attach>
+                   <xpad>0</xpad>
+                   <ypad>0</ypad>
+                   <xexpand>True</xexpand>
+                   <yexpand>False</yexpand>
+                   <xshrink>False</xshrink>
+                   <yshrink>False</yshrink>
+                   <xfill>True</xfill>
+                   <yfill>False</yfill>
+                 </child>
+               </widget>
+             </widget>
+           </widget>
+         </widget>
+       </widget>
+
+       <widget>
+         <class>GtkFrame</class>
+         <name>frame10</name>
+         <label>Broadcast</label>
+         <label_xalign>0</label_xalign>
+         <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkHBox</class>
+           <name>hbox8</name>
+           <border_width>5</border_width>
+           <homogeneous>False</homogeneous>
+           <spacing>5</spacing>
+
+           <widget>
+             <class>GtkCheckButton</class>
+             <name>checkbutton2</name>
+             <can_focus>True</can_focus>
+             <label>Broadcast</label>
+             <active>False</active>
+             <draw_indicator>True</draw_indicator>
+             <child>
+               <padding>0</padding>
+               <expand>False</expand>
+               <fill>False</fill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkCombo</class>
+             <name>combo3</name>
+             <value_in_list>False</value_in_list>
+             <ok_if_empty>True</ok_if_empty>
+             <case_sensitive>False</case_sensitive>
+             <use_arrows>True</use_arrows>
+             <use_arrows_always>False</use_arrows_always>
+             <items></items>
+             <child>
+               <padding>0</padding>
+               <expand>True</expand>
+               <fill>True</fill>
+             </child>
+
+             <widget>
+               <class>GtkEntry</class>
+               <child_name>GtkCombo:entry</child_name>
+               <name>combo-entry3</name>
+               <can_focus>True</can_focus>
+               <editable>True</editable>
+               <text_visible>True</text_visible>
+               <text_max_length>0</text_max_length>
+               <text></text>
+             </widget>
+           </widget>
+         </widget>
+       </widget>
+
+       <widget>
+         <class>GtkFrame</class>
+         <name>frame11</name>
+         <label>Channels</label>
+         <label_xalign>0</label_xalign>
+         <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+         <child>
+           <padding>0</padding>
+           <expand>True</expand>
+           <fill>True</fill>
+         </child>
+
+         <widget>
+           <class>GtkHBox</class>
+           <name>hbox9</name>
+           <border_width>5</border_width>
+           <homogeneous>False</homogeneous>
+           <spacing>5</spacing>
+
+           <widget>
+             <class>GtkCheckButton</class>
+             <name>checkbutton1</name>
+             <can_focus>True</can_focus>
+             <label>Channel server</label>
+             <active>False</active>
+             <draw_indicator>True</draw_indicator>
+             <child>
+               <padding>0</padding>
+               <expand>False</expand>
+               <fill>False</fill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkCombo</class>
+             <name>combo2</name>
+             <value_in_list>False</value_in_list>
+             <ok_if_empty>True</ok_if_empty>
+             <case_sensitive>False</case_sensitive>
+             <use_arrows>True</use_arrows>
+             <use_arrows_always>False</use_arrows_always>
+             <items></items>
+             <child>
+               <padding>0</padding>
+               <expand>True</expand>
+               <fill>True</fill>
+             </child>
+
+             <widget>
+               <class>GtkEntry</class>
+               <child_name>GtkCombo:entry</child_name>
+               <name>combo-entry2</name>
+               <can_focus>True</can_focus>
+               <editable>True</editable>
+               <text_visible>True</text_visible>
+               <text_max_length>0</text_max_length>
+               <text></text>
+             </widget>
+           </widget>
+
+           <widget>
+             <class>GtkLabel</class>
+             <name>label28</name>
+             <label>Port</label>
+             <justify>GTK_JUSTIFY_CENTER</justify>
+             <wrap>False</wrap>
+             <xalign>0.5</xalign>
+             <yalign>0.5</yalign>
+             <xpad>0</xpad>
+             <ypad>0</ypad>
+             <child>
+               <padding>0</padding>
+               <expand>False</expand>
+               <fill>False</fill>
+             </child>
+           </widget>
+
+           <widget>
+             <class>GtkSpinButton</class>
+             <name>spinbutton8</name>
+             <can_focus>True</can_focus>
+             <climb_rate>1</climb_rate>
+             <digits>0</digits>
+             <numeric>False</numeric>
+             <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+             <snap>False</snap>
+             <wrap>False</wrap>
+             <value>1</value>
+             <lower>0</lower>
+             <upper>100</upper>
+             <step>1</step>
+             <page>10</page>
+             <page_size>10</page_size>
+             <child>
+               <padding>0</padding>
+               <expand>True</expand>
+               <fill>True</fill>
+             </child>
+           </widget>
+         </widget>
+       </widget>
+      </widget>
+
+      <widget>
+       <class>GtkLabel</class>
+       <child_name>Notebook:tab</child_name>
+       <name>tab_network</name>
+       <label>Network</label>
+       <justify>GTK_JUSTIFY_CENTER</justify>
+       <wrap>False</wrap>
+       <xalign>0.5</xalign>
+       <yalign>0.5</yalign>
+       <xpad>0</xpad>
+       <ypad>0</ypad>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
 </GTK-Interface>
index 46601f30829d776a73780bc7cc4df3cee93921a8..c0a4dbb1331b4dd80a2008a1561365eb60139f13 100644 (file)
@@ -1,10 +1,6 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
+/* This file was created automatically by glade and fixed by fixfiles.sh */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <videolan/vlc.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -561,7 +557,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);
@@ -569,7 +564,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);
@@ -606,7 +600,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);
@@ -615,7 +608,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);
@@ -1077,7 +1069,7 @@ create_intf_about (void)
   };
   GtkWidget *intf_about;
 
-  intf_about = gnome_about_new ("VideoLAN Client", VLC_VERSION,
+  intf_about = gnome_about_new ("VideoLAN Client", VERSION,
                         _("(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team"),
                         authors,
                         _("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."),
@@ -1328,7 +1320,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), _("/dev/dvd"));
+  gtk_entry_set_text (GTK_ENTRY (disc_name), DVD_DEVICE);
 
   dialog_action_area4 = GNOME_DIALOG (intf_disc)->action_area;
   gtk_object_set_data (GTK_OBJECT (intf_disc), "dialog_action_area4", dialog_action_area4);
@@ -3020,3 +3012,451 @@ create_intf_preferences (void)
   return intf_preferences;
 }
 
+GtkWidget*
+create_intf_open (void)
+{
+  GtkWidget *intf_open;
+  GtkWidget *dialog_vbox5;
+  GtkWidget *tab_open;
+  GtkWidget *vbox10;
+  GtkWidget *hbox5;
+  GtkWidget *frame6;
+  GtkWidget *vbox11;
+  GSList *vbox11_group = NULL;
+  GtkWidget *radiobutton1;
+  GtkWidget *radiobutton2;
+  GtkWidget *frame7;
+  GtkWidget *table3;
+  GtkWidget *label24;
+  GtkWidget *label25;
+  GtkObject *spinbutton5_adj;
+  GtkWidget *spinbutton5;
+  GtkObject *spinbutton6_adj;
+  GtkWidget *spinbutton6;
+  GtkWidget *hbox6;
+  GtkWidget *label29;
+  GtkWidget *entry1;
+  GtkWidget *tab_disc;
+  GtkWidget *vbox12;
+  GtkWidget *hbox7;
+  GtkWidget *frame8;
+  GtkWidget *vbox13;
+  GSList *vbox13_group = NULL;
+  GtkWidget *radiobutton3;
+  GtkWidget *radiobutton4;
+  GtkWidget *radiobutton5;
+  GtkWidget *frame9;
+  GtkWidget *vbox14;
+  GtkWidget *table4;
+  GtkWidget *label26;
+  GtkWidget *label27;
+  GtkWidget *combo1;
+  GtkWidget *combo_entry1;
+  GtkObject *spinbutton7_adj;
+  GtkWidget *spinbutton7;
+  GtkWidget *frame10;
+  GtkWidget *hbox8;
+  GtkWidget *checkbutton2;
+  GtkWidget *combo3;
+  GtkWidget *combo_entry3;
+  GtkWidget *frame11;
+  GtkWidget *hbox9;
+  GtkWidget *checkbutton1;
+  GtkWidget *combo2;
+  GtkWidget *combo_entry2;
+  GtkWidget *label28;
+  GtkObject *spinbutton8_adj;
+  GtkWidget *spinbutton8;
+  GtkWidget *tab_network;
+  GtkWidget *dialog_action_area5;
+  GtkWidget *button1;
+  GtkWidget *button3;
+
+  intf_open = gnome_dialog_new (_("Open Stream"), NULL);
+  gtk_object_set_data (GTK_OBJECT (intf_open), "intf_open", intf_open);
+  gtk_window_set_modal (GTK_WINDOW (intf_open), TRUE);
+  gtk_window_set_policy (GTK_WINDOW (intf_open), FALSE, FALSE, FALSE);
+
+  dialog_vbox5 = GNOME_DIALOG (intf_open)->vbox;
+  gtk_object_set_data (GTK_OBJECT (intf_open), "dialog_vbox5", dialog_vbox5);
+  gtk_widget_show (dialog_vbox5);
+
+  tab_open = gtk_notebook_new ();
+  gtk_widget_ref (tab_open);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "tab_open", tab_open,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tab_open);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox5), tab_open, TRUE, TRUE, 0);
+
+  vbox10 = gtk_vbox_new (FALSE, 5);
+  gtk_widget_ref (vbox10);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "vbox10", vbox10,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox10);
+  gtk_container_add (GTK_CONTAINER (tab_open), vbox10);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox10), 5);
+
+  hbox5 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox5);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox5", hbox5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox5);
+  gtk_box_pack_start (GTK_BOX (vbox10), hbox5, TRUE, TRUE, 0);
+
+  frame6 = gtk_frame_new (_("Disc type"));
+  gtk_widget_ref (frame6);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "frame6", frame6,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame6);
+  gtk_box_pack_start (GTK_BOX (hbox5), frame6, TRUE, TRUE, 0);
+
+  vbox11 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox11);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "vbox11", vbox11,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox11);
+  gtk_container_add (GTK_CONTAINER (frame6), vbox11);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox11), 5);
+
+  radiobutton1 = gtk_radio_button_new_with_label (vbox11_group, _("DVD"));
+  vbox11_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton1));
+  gtk_widget_ref (radiobutton1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "radiobutton1", radiobutton1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (radiobutton1);
+  gtk_box_pack_start (GTK_BOX (vbox11), radiobutton1, FALSE, FALSE, 0);
+
+  radiobutton2 = gtk_radio_button_new_with_label (vbox11_group, _("VCD"));
+  vbox11_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton2));
+  gtk_widget_ref (radiobutton2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "radiobutton2", radiobutton2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (radiobutton2);
+  gtk_box_pack_start (GTK_BOX (vbox11), radiobutton2, FALSE, FALSE, 0);
+
+  frame7 = gtk_frame_new (_("Starting position"));
+  gtk_widget_ref (frame7);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "frame7", frame7,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame7);
+  gtk_box_pack_start (GTK_BOX (hbox5), frame7, TRUE, TRUE, 0);
+
+  table3 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_ref (table3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "table3", table3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table3);
+  gtk_container_add (GTK_CONTAINER (frame7), table3);
+  gtk_container_set_border_width (GTK_CONTAINER (table3), 5);
+  gtk_table_set_row_spacings (GTK_TABLE (table3), 5);
+  gtk_table_set_col_spacings (GTK_TABLE (table3), 5);
+
+  label24 = gtk_label_new (_("Title"));
+  gtk_widget_ref (label24);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "label24", label24,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label24);
+  gtk_table_attach (GTK_TABLE (table3), label24, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label24), 0, 0.5);
+
+  label25 = gtk_label_new (_("Chapter"));
+  gtk_widget_ref (label25);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "label25", label25,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label25);
+  gtk_table_attach (GTK_TABLE (table3), label25, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label25), 0, 0.5);
+
+  spinbutton5_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
+  spinbutton5 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton5_adj), 1, 0);
+  gtk_widget_ref (spinbutton5);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "spinbutton5", spinbutton5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (spinbutton5);
+  gtk_table_attach (GTK_TABLE (table3), spinbutton5, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  spinbutton6_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
+  spinbutton6 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton6_adj), 1, 0);
+  gtk_widget_ref (spinbutton6);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "spinbutton6", spinbutton6,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (spinbutton6);
+  gtk_table_attach (GTK_TABLE (table3), spinbutton6, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  hbox6 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox6);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox6", hbox6,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox6);
+  gtk_box_pack_start (GTK_BOX (vbox10), hbox6, TRUE, TRUE, 0);
+
+  label29 = gtk_label_new (_("Device name:"));
+  gtk_widget_ref (label29);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "label29", label29,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label29);
+  gtk_box_pack_start (GTK_BOX (hbox6), label29, FALSE, FALSE, 0);
+
+  entry1 = gtk_entry_new ();
+  gtk_widget_ref (entry1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "entry1", entry1,
+                            (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), DVD_DEVICE);
+
+  tab_disc = gtk_label_new (_("Disc"));
+  gtk_widget_ref (tab_disc);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "tab_disc", tab_disc,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tab_disc);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (tab_open), gtk_notebook_get_nth_page (GTK_NOTEBOOK (tab_open), 0), tab_disc);
+
+  vbox12 = gtk_vbox_new (FALSE, 5);
+  gtk_widget_ref (vbox12);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "vbox12", vbox12,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox12);
+  gtk_container_add (GTK_CONTAINER (tab_open), vbox12);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox12), 5);
+
+  hbox7 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox7);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox7", hbox7,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox7);
+  gtk_box_pack_start (GTK_BOX (vbox12), hbox7, TRUE, TRUE, 0);
+
+  frame8 = gtk_frame_new (_("Protocol"));
+  gtk_widget_ref (frame8);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "frame8", frame8,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame8);
+  gtk_box_pack_start (GTK_BOX (hbox7), frame8, TRUE, TRUE, 0);
+
+  vbox13 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox13);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "vbox13", vbox13,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox13);
+  gtk_container_add (GTK_CONTAINER (frame8), vbox13);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox13), 5);
+
+  radiobutton3 = gtk_radio_button_new_with_label (vbox13_group, _("UDP stream"));
+  vbox13_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton3));
+  gtk_widget_ref (radiobutton3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "radiobutton3", radiobutton3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (radiobutton3);
+  gtk_box_pack_start (GTK_BOX (vbox13), radiobutton3, FALSE, FALSE, 0);
+
+  radiobutton4 = gtk_radio_button_new_with_label (vbox13_group, _("HTTP"));
+  vbox13_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton4));
+  gtk_widget_ref (radiobutton4);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "radiobutton4", radiobutton4,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (radiobutton4);
+  gtk_box_pack_start (GTK_BOX (vbox13), radiobutton4, FALSE, FALSE, 0);
+
+  radiobutton5 = gtk_radio_button_new_with_label (vbox13_group, _("RTP"));
+  vbox13_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton5));
+  gtk_widget_ref (radiobutton5);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "radiobutton5", radiobutton5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (radiobutton5);
+  gtk_box_pack_start (GTK_BOX (vbox13), radiobutton5, FALSE, FALSE, 0);
+
+  frame9 = gtk_frame_new (_("Server"));
+  gtk_widget_ref (frame9);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "frame9", frame9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame9);
+  gtk_box_pack_start (GTK_BOX (hbox7), frame9, TRUE, TRUE, 0);
+
+  vbox14 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox14);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "vbox14", vbox14,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox14);
+  gtk_container_add (GTK_CONTAINER (frame9), vbox14);
+
+  table4 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_ref (table4);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "table4", table4,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table4);
+  gtk_box_pack_start (GTK_BOX (vbox14), table4, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (table4), 5);
+  gtk_table_set_row_spacings (GTK_TABLE (table4), 5);
+  gtk_table_set_col_spacings (GTK_TABLE (table4), 5);
+
+  label26 = gtk_label_new (_("Address"));
+  gtk_widget_ref (label26);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "label26", label26,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label26);
+  gtk_table_attach (GTK_TABLE (table4), label26, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5);
+
+  label27 = gtk_label_new (_("Port"));
+  gtk_widget_ref (label27);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "label27", label27,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label27);
+  gtk_table_attach (GTK_TABLE (table4), label27, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
+
+  combo1 = gtk_combo_new ();
+  gtk_widget_ref (combo1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "combo1", combo1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (combo1);
+  gtk_table_attach (GTK_TABLE (table4), combo1, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  combo_entry1 = GTK_COMBO (combo1)->entry;
+  gtk_widget_ref (combo_entry1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "combo_entry1", combo_entry1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (combo_entry1);
+
+  spinbutton7_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
+  spinbutton7 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton7_adj), 1, 0);
+  gtk_widget_ref (spinbutton7);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "spinbutton7", spinbutton7,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (spinbutton7);
+  gtk_table_attach (GTK_TABLE (table4), spinbutton7, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  frame10 = gtk_frame_new (_("Broadcast"));
+  gtk_widget_ref (frame10);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "frame10", frame10,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame10);
+  gtk_box_pack_start (GTK_BOX (vbox12), frame10, TRUE, TRUE, 0);
+
+  hbox8 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox8);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox8", hbox8,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox8);
+  gtk_container_add (GTK_CONTAINER (frame10), hbox8);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox8), 5);
+
+  checkbutton2 = gtk_check_button_new_with_label (_("Broadcast"));
+  gtk_widget_ref (checkbutton2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "checkbutton2", checkbutton2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (checkbutton2);
+  gtk_box_pack_start (GTK_BOX (hbox8), checkbutton2, FALSE, FALSE, 0);
+
+  combo3 = gtk_combo_new ();
+  gtk_widget_ref (combo3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "combo3", combo3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (combo3);
+  gtk_box_pack_start (GTK_BOX (hbox8), combo3, TRUE, TRUE, 0);
+
+  combo_entry3 = GTK_COMBO (combo3)->entry;
+  gtk_widget_ref (combo_entry3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "combo_entry3", combo_entry3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (combo_entry3);
+
+  frame11 = gtk_frame_new (_("Channels"));
+  gtk_widget_ref (frame11);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "frame11", frame11,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame11);
+  gtk_box_pack_start (GTK_BOX (vbox12), frame11, TRUE, TRUE, 0);
+
+  hbox9 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_ref (hbox9);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox9", hbox9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox9);
+  gtk_container_add (GTK_CONTAINER (frame11), hbox9);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox9), 5);
+
+  checkbutton1 = gtk_check_button_new_with_label (_("Channel server"));
+  gtk_widget_ref (checkbutton1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "checkbutton1", checkbutton1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (checkbutton1);
+  gtk_box_pack_start (GTK_BOX (hbox9), checkbutton1, FALSE, FALSE, 0);
+
+  combo2 = gtk_combo_new ();
+  gtk_widget_ref (combo2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "combo2", combo2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (combo2);
+  gtk_box_pack_start (GTK_BOX (hbox9), combo2, TRUE, TRUE, 0);
+
+  combo_entry2 = GTK_COMBO (combo2)->entry;
+  gtk_widget_ref (combo_entry2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "combo_entry2", combo_entry2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (combo_entry2);
+
+  label28 = gtk_label_new (_("Port"));
+  gtk_widget_ref (label28);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "label28", label28,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label28);
+  gtk_box_pack_start (GTK_BOX (hbox9), label28, FALSE, FALSE, 0);
+
+  spinbutton8_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
+  spinbutton8 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton8_adj), 1, 0);
+  gtk_widget_ref (spinbutton8);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "spinbutton8", spinbutton8,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (spinbutton8);
+  gtk_box_pack_start (GTK_BOX (hbox9), spinbutton8, TRUE, TRUE, 0);
+
+  tab_network = gtk_label_new (_("Network"));
+  gtk_widget_ref (tab_network);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "tab_network", tab_network,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tab_network);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (tab_open), gtk_notebook_get_nth_page (GTK_NOTEBOOK (tab_open), 1), tab_network);
+
+  dialog_action_area5 = GNOME_DIALOG (intf_open)->action_area;
+  gtk_object_set_data (GTK_OBJECT (intf_open), "dialog_action_area5", dialog_action_area5);
+  gtk_widget_show (dialog_action_area5);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END);
+  gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area5), 8);
+
+  gnome_dialog_append_button (GNOME_DIALOG (intf_open), GNOME_STOCK_BUTTON_OK);
+  button1 = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_open)->buttons)->data);
+  gtk_widget_ref (button1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "button1", button1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (button1);
+  GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
+
+  gnome_dialog_append_button (GNOME_DIALOG (intf_open), GNOME_STOCK_BUTTON_CANCEL);
+  button3 = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_open)->buttons)->data);
+  gtk_widget_ref (button3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_open), "button3", button3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (button3);
+  GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
+
+  return intf_open;
+}
+
index a1322db0c49adb3f2d767927bc56097bd03eef4d..f9d1ea0845f62cb667112d7060cd4f97249784e7 100644 (file)
@@ -12,3 +12,4 @@ GtkWidget* create_intf_network (void);
 GtkWidget* create_intf_playlist (void);
 GtkWidget* create_intf_jump (void);
 GtkWidget* create_intf_preferences (void);
+GtkWidget* create_intf_open (void);
index e2aa479a99263fbb62c146722f87040f9916d526..0b8659310e9962e0ced81abc8e45fc5adc3256c5 100644 (file)
@@ -2,7 +2,7 @@
  * gtk.c : Gtk+ plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: gtk.c,v 1.6 2001/12/09 17:01:36 sam Exp $
+ * $Id: gtk.c,v 1.7 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME gtk
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
+#include <errno.h>                                                 /* ENOMEM */
+#include <string.h>                                            /* strerror() */
+#include <stdio.h>
+
+#include <videolan/vlc.h>
+
+#include <gtk/gtk.h>
+
+#include "stream_control.h"
+#include "input_ext-intf.h"
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include "interface.h"
+#include "intf_playlist.h"
 
-#include "modules.h"
-#include "modules_export.h"
+#include "video.h"
+#include "video_output.h"
+
+#include "gtk_callbacks.h"
+#include "gtk_interface.h"
+#include "gtk_support.h"
+#include "gtk_menu.h"
+#include "gtk_display.h"
+#include "gtk_common.h"
 
 /*****************************************************************************
- * Capabilities defined in the other files.
+ * Local prototypes.
  *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list );
+static void intf_getfunctions ( function_list_t * p_function_list );
+static int  intf_Probe        ( probedata_t *p_data );
+static int  intf_Open         ( intf_thread_t *p_intf );
+static void intf_Close        ( intf_thread_t *p_intf );
+static void intf_Run          ( intf_thread_t *p_intf );
+
+static gint GtkManage         ( gpointer p_data );
 
 /*****************************************************************************
  * Building configuration tree
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Gtk+ module" )
-    ADD_COMMENT( "For now, the Gtk+ module cannot be configured" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "Gtk+ interface module";
+    SET_DESCRIPTION( "Gtk+ interface module" )
+#ifndef WIN32
+    if( getenv( "DISPLAY" ) == NULL )
+    {
+        ADD_CAPABILITY( INTF, 10 )
+    }
+    else
+#endif
+    {
+        ADD_CAPABILITY( INTF, 90 )
+    }
+    ADD_SHORTCUT( "gtk" )
+    ADD_PROGRAM( "gvlc" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
+    intf_getfunctions( &p_module->p_functions->intf );
 MODULE_ACTIVATE_STOP
 
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
+/*****************************************************************************
+ * g_atexit: kludge to avoid the Gtk+ thread to segfault at exit
+ *****************************************************************************
+ * gtk_init() makes several calls to g_atexit() which calls atexit() to
+ * register tidying callbacks to be called at program exit. Since the Gtk+
+ * plugin is likely to be unloaded at program exit, we have to export this
+ * symbol to intercept the g_atexit() calls. Talk about crude hack.
+ *****************************************************************************/
+void g_atexit( GVoidFunc func )
+{
+    intf_thread_t *p_intf = p_main->p_intf;
+    int i_dummy;
+
+    for( i_dummy = 0;
+         i_dummy < MAX_ATEXIT && p_intf->p_sys->pf_callback[i_dummy] != NULL;
+         i_dummy++ )
+    {
+        ;
+    }
+
+    if( i_dummy >= MAX_ATEXIT - 1 )
+    {
+        intf_ErrMsg( "intf error: too many atexit() callbacks to register" );
+        return;
+    }
+
+    p_intf->p_sys->pf_callback[i_dummy]     = func;
+    p_intf->p_sys->pf_callback[i_dummy + 1] = NULL;
+}
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+static void intf_getfunctions( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = intf_Probe;
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+/*****************************************************************************
+ * intf_Probe: probe the interface and return a score
+ *****************************************************************************
+ * This function tries to initialize Gtk+ and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+static int intf_Probe( probedata_t *p_data )
+{
+#ifndef WIN32
+    if( getenv( "DISPLAY" ) == NULL )
+    {
+        return( 10 );
+    }
+#endif
+
+    return( 90 );
+}
+
+/*****************************************************************************
+ * intf_Open: initialize and create window
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        intf_ErrMsg("error: %s", strerror(ENOMEM));
+        return( 1 );
+    }
+
+    /* Initialize Gtk+ thread */
+    p_intf->p_sys->b_playing = 1;
+    p_intf->p_sys->b_popup_changed = 0;
+    p_intf->p_sys->b_window_changed = 0;
+    p_intf->p_sys->b_playlist_changed = 0;
+
+    p_intf->p_sys->i_playing = -1;
+    p_intf->p_sys->b_slider_free = 1;
+
+    p_intf->p_sys->pf_callback[0] = NULL;
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * intf_Close: destroy interface window
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * intf_Run: Gtk+ thread
+ *****************************************************************************
+ * this part of the interface is in a separate thread so that we can call
+ * gtk_main() from within it without annoying the rest of the program.
+ * XXX: the approach may look kludgy, and probably is, but I could not find
+ * a better way to dynamically load a Gtk+ interface at runtime.
+ *****************************************************************************/
+static void intf_Run( intf_thread_t *p_intf )
+{
+    /* gtk_init needs to know the command line. We don't care, so we
+     * give it an empty one */
+    char  *p_args[] = { "" };
+    char **pp_args  = p_args;
+    int    i_args   = 1;
+    int    i_dummy;
+
+    /* The data types we are allowed to receive */
+    static GtkTargetEntry target_table[] =
+    {
+        { "STRING", 0, DROP_ACCEPT_STRING },
+        { "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
+        { "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
+    };
+
+    /* Initialize Gtk+ */
+    gtk_init( &i_args, &pp_args );
+
+    /* Create some useful widgets that will certainly be used */
+    p_intf->p_sys->p_window = create_intf_window( );
+    p_intf->p_sys->p_popup = create_intf_popup( );
+    p_intf->p_sys->p_playlist = create_intf_playlist();
+    
+    /* Set the title of the main window */
+    gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
+                          VOUT_TITLE " (Gtk+ interface)");
+
+    /* Accept file drops on the main window */
+    gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ),
+                       GTK_DEST_DEFAULT_ALL, target_table,
+                       1, GDK_ACTION_COPY );
+
+    /* Accept file drops on the playlist window */
+    gtk_drag_dest_set( GTK_WIDGET( lookup_widget( p_intf->p_sys->p_playlist,
+                                   "playlist_clist") ),
+                       GTK_DEST_DEFAULT_ALL, target_table,
+                       1, GDK_ACTION_COPY );
+
+    /* Get the interface labels */
+    p_intf->p_sys->p_slider_frame = GTK_FRAME( gtk_object_get_data(
+        GTK_OBJECT(p_intf->p_sys->p_window ), "slider_frame" ) ); 
+
+#define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
+    p_intf->p_sys->p_label_title = P_LABEL( "title_label" );
+    p_intf->p_sys->p_label_chapter = P_LABEL( "chapter_label" );
+#undef P_LABEL
+
+    /* Connect the date display to the slider */
+#define P_SLIDER GTK_RANGE( gtk_object_get_data( \
+                         GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
+    p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
+
+    gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
+                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
+    p_intf->p_sys->f_adj_oldvalue = 0;
+#undef P_SLIDER
+
+    /* 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;
+    p_intf->p_sys->p_fileopen = NULL;
+    p_intf->p_sys->p_disc = NULL;
+    p_intf->p_sys->p_network = NULL;
+    p_intf->p_sys->p_preferences = NULL;
+    p_intf->p_sys->p_jump = NULL;
+
+    /* Store p_intf to keep an eye on it */
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
+                         "p_intf", p_intf );
+
+    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
+                         "p_intf", p_intf );
+
+    /* Show the control window */
+    gtk_widget_show( p_intf->p_sys->p_window );
+
+    /* Sleep to avoid using all CPU - since some interfaces needs to access
+     * keyboard events, a 100ms delay is a good compromise */
+    i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, GtkManage, p_intf );
+
+    /* Enter Gtk mode */
+    gtk_main();
+
+    /* Remove the timeout */
+    gtk_timeout_remove( i_dummy );
+
+    /* Launch stored callbacks */
+    for( i_dummy = 0;
+         i_dummy < MAX_ATEXIT && p_intf->p_sys->pf_callback[i_dummy] != NULL;
+         i_dummy++ )
+    {
+        p_intf->p_sys->pf_callback[i_dummy]();
+    }
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * GtkManage: manage main thread messages
+ *****************************************************************************
+ * In this function, called approx. 10 times a second, we check what the
+ * main program wanted to tell us.
+ *****************************************************************************/
+static gint GtkManage( gpointer p_data )
+{
+#define p_intf ((intf_thread_t *)p_data)
+
+    vlc_mutex_lock( &p_intf->change_lock );
+    
+    /* If the "display popup" flag has changed */
+    if( p_intf->b_menu_change )
+    {
+        if( !GTK_IS_WIDGET( p_intf->p_sys->p_popup ) )
+        {
+            p_intf->p_sys->p_popup = create_intf_popup();
+            gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_popup ),
+                                 "p_popup", p_intf );
+        }
+        gtk_menu_popup( GTK_MENU( p_intf->p_sys->p_popup ),
+                        NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME );
+        p_intf->b_menu_change = 0;
+    }
+
+    /* update the playlist */
+    GtkPlayListManage( p_data );
+
+    if( p_intf->p_input != NULL && !p_intf->b_die )
+    {
+        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+
+        /* New input or stream map change */
+        if( p_intf->p_input->stream.b_changed )
+        {
+            GtkModeManage( p_intf );
+            GtkSetupMenus( p_intf );
+            p_intf->p_sys->b_playing = 1;
+        }
+
+        /* Manage the slider */
+        if( p_intf->p_input->stream.b_seekable )
+        {
+            float newvalue = p_intf->p_sys->p_adj->value;
+    
+#define p_area p_intf->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 =
+                    ( 100. * p_area->i_tell ) / p_area->i_size;
+    
+                gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
+                                         "value_changed" );
+            }
+            /* Otherwise, send message to the input if the user has
+             * finished dragging the slider */
+            else if( p_intf->p_sys->b_slider_free )
+            {
+                off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+
+                /* release the lock to be able to seek */
+                vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+                input_Seek( p_intf->p_input, i_seek );
+                vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+    
+                /* Update the old value */
+                p_intf->p_sys->f_adj_oldvalue = newvalue;
+            }
+#undef p_area
+        }
+
+        if( p_intf->p_sys->i_part !=
+            p_intf->p_input->stream.p_selected_area->i_part )
+        {
+            p_intf->p_sys->b_chapter_update = 1;
+            GtkSetupMenus( p_intf );
+        }
+
+        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+
+    }
+    else if( p_intf->p_sys->b_playing && !p_intf->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 )
+    {
+        vlc_mutex_unlock( &p_intf->change_lock );
+
+        /* Prepare to die, young Skywalker */
+        gtk_main_quit();
+
+        /* Just in case */
+        return( FALSE );
+    }
+
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return( TRUE );
+
+#undef p_intf
+}
index f0ff3a1eb01b5597514b837b11d67a99c435ff1a..98c9661e1d927afdd5bc8eeb47cb9d00cdcdee3f 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.28 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_callbacks.c,v 1.29 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
 #include <sys/types.h>                                              /* off_t */
 #include <stdlib.h>
 
+#include <videolan/vlc.h>
+
 #include <gtk/gtk.h>
 
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
 #include "gtk_callbacks.h"
 #include "gtk_interface.h"
 #include "gtk_support.h"
-#include "intf_gtk.h"
+#include "gtk_common.h"
 
 #include "netutils.h"
 
-#include "modules_export.h"
-
 /*****************************************************************************
  * Callbacks
  *****************************************************************************/
similarity index 94%
rename from plugins/gtk/intf_gtk.h
rename to plugins/gtk/gtk_common.h
index 8d225ee754d4ae4e473cf2cccba021a2af0e7acb..d9eec84c3058f878c471a4d368f744720b80b4a8 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * intf_gtk.h: private Gtk+ interface description
+ * gtk_common.h: private Gtk+ interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gtk.h,v 1.9 2001/11/16 00:29:52 stef Exp $
+ * $Id: gtk_common.h,v 1.1 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -28,6 +28,8 @@
 #define DROP_ACCEPT_TEXT_PLAIN     1
 #define DROP_ACCEPT_STRING         2
 
+#define MAX_ATEXIT                 10
+
 /*****************************************************************************
  * Useful inline function
  ****************************************************************************/
@@ -82,17 +84,14 @@ typedef struct intf_sys_s
     GtkLabel *          p_label_chapter;
     gint                i_part;                           /* current chapter */
 
-    /* XXX: Ugly kludge, see intf_gnome.c */
-    void             ( *pf_gtk_callback ) ( void );
-    void             ( *pf_gdk_callback ) ( void );
+    /* XXX: Ugly kludge, see gtk.c */
+    void             ( *pf_callback[MAX_ATEXIT] ) ( void );
 
 } intf_sys_t;
 
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-
 gint GtkModeManage   ( intf_thread_t * p_intf );
 void GtkDisplayDate  ( GtkAdjustment *p_adj );
 
-
index b1dd89b3d4b0ad4b43b5fb931dec407575232069..40a2bd35e3a845c151f70c858716eff5c5e7da43 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_control.c : functions to handle stream control buttons.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_control.c,v 1.7 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_control.c,v 1.8 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
 #include <sys/types.h>                                              /* off_t */
 #include <stdlib.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#include <videolan/vlc.h>
+
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
 
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
@@ -56,9 +48,7 @@
 #include "gtk_interface.h"
 #include "gtk_support.h"
 #include "gtk_playlist.h"
-#include "intf_gtk.h"
-
-#include "modules_export.h"
+#include "gtk_common.h"
 
 /****************************************************************************
  * Control functions: this is where the functions are defined
index 3f362191c6e5c7713c3d7a9cf5462e8ee7f14ade..0e61f0ae2c634c4f99a4efae2f7e2a0611b5c1de 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_display.c: Gtk+ tools for main interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: gtk_display.c,v 1.9 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_display.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#include <videolan/vlc.h>
+
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-#include "modules.h"
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -63,9 +52,7 @@
 #include "gtk_support.h"
 #include "gtk_menu.h"
 #include "gtk_display.h"
-#include "intf_gtk.h"
-
-#include "modules_export.h"
+#include "gtk_common.h"
 
 /*****************************************************************************
  * GtkDisplayDate: display stream date
index b5f00b853dae6bf8a5bb3324f8fb4b04167256e4..3fd7da5b9f61c3d549e8ffbc264796f8ceaa0dc4 100644 (file)
@@ -1,10 +1,6 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
+/* This file was created automatically by glade and fixed by fixfiles.sh */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <videolan/vlc.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1533,7 +1529,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), _("/dev/dvd"));
+  gtk_entry_set_text (GTK_ENTRY (disc_name), DVD_DEVICE);
 
   dialog_action_area1 = GTK_DIALOG (intf_disc)->action_area;
   gtk_object_set_data (GTK_OBJECT (intf_disc), "dialog_action_area1", dialog_action_area1);
@@ -2479,7 +2475,7 @@ create_intf_preferences (void)
   gtk_table_attach (GTK_TABLE (preferences_disc_table), preferences_disc_dvd_combo, 1, 2, 0, 1,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (GTK_EXPAND), 0, 0);
-  preferences_disc_dvd_combo_items = g_list_append (preferences_disc_dvd_combo_items, (gpointer) _("/dev/dvd"));
+  preferences_disc_dvd_combo_items = g_list_append (preferences_disc_dvd_combo_items, (gpointer) DVD_DEVICE);
   gtk_combo_set_popdown_strings (GTK_COMBO (preferences_disc_dvd_combo), preferences_disc_dvd_combo_items);
   g_list_free (preferences_disc_dvd_combo_items);
 
@@ -2488,7 +2484,7 @@ create_intf_preferences (void)
   gtk_object_set_data_full (GTK_OBJECT (intf_preferences), "preferences_disc_dvd_entry", preferences_disc_dvd_entry,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (preferences_disc_dvd_entry);
-  gtk_entry_set_text (GTK_ENTRY (preferences_disc_dvd_entry), _("/dev/dvd"));
+  gtk_entry_set_text (GTK_ENTRY (preferences_disc_dvd_entry), DVD_DEVICE);
 
   preferences_disc_vcd_combo = gtk_combo_new ();
   gtk_widget_ref (preferences_disc_vcd_combo);
index a4cf5463f4ebaabace5e14b3a67e9c5757e3ca03..34257881c0a161d45a6b7564b8af457858f3e1bd 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_menu.c : functions to handle menu items.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_menu.c,v 1.16 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_menu.c,v 1.17 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
 #include <sys/types.h>                                              /* off_t */
 #include <stdlib.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#include <videolan/vlc.h>
+
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
 
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
@@ -60,9 +52,7 @@
 #include "gtk_interface.h"
 #include "gtk_support.h"
 #include "gtk_playlist.h"
-#include "intf_gtk.h"
-
-#include "modules_export.h"
+#include "gtk_common.h"
 
 /*
  * Local Prototypes
index 3072769c8f33f45f21e4f462489ffaa8240934a9..8a515c69673dce8719fa5895bb17c254fe4bcbd5 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_modules.c : functions to build modules configuration boxes.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_modules.c,v 1.6 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_modules.c,v 1.7 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
 #include <sys/types.h>                                              /* off_t */
 #include <stdlib.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#include <videolan/vlc.h>
+
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
 
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
@@ -56,7 +48,7 @@
 #include "gtk_interface.h"
 #include "gtk_support.h"
 #include "gtk_playlist.h"
-#include "intf_gtk.h"
+#include "gtk_common.h"
 
 gboolean GtkModulesShow( GtkWidget       *widget,
                          GdkEventButton  *event,
index 48faf85aad3bf97a98771473a8d6f68abb793b64..6a4d1a22407fc4b547bf150db826c31e2ad7757f 100644 (file)
@@ -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.11 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_open.c,v 1.12 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
 #include <sys/types.h>                                              /* off_t */
 #include <stdlib.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#include <videolan/vlc.h>
+
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
 
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
 #include "gtk_interface.h"
 #include "gtk_support.h"
 #include "gtk_playlist.h"
-#include "intf_gtk.h"
+#include "gtk_common.h"
 
 #include "netutils.h"
 
-#include "modules_export.h"
-
 /*****************************************************************************
  * Fileopen callbacks
  *****************************************************************************
index d38003ca550e7a824fd9605b2d24ca25686e6ba4..36c2d34ead41c231b12204f6d3006fc3f236458a 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_playlist.c : Interface for the playlist dialog
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.23 2001/12/29 11:36:00 lool Exp $
+ * $Id: gtk_playlist.c,v 1.24 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Pierre Baillet <oct@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
+#include <videolan/vlc.h>
+
 #include <sys/types.h>          /* for readdir  and stat stuff */
 
 #ifndef WIN32
 #include <sys/stat.h>
 #include <unistd.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -64,9 +55,7 @@
 #include "gtk_interface.h"
 #include "gtk_support.h"
 #include "gtk_playlist.h"
-#include "intf_gtk.h"
-
-#include "modules_export.h"
+#include "gtk_common.h"
 
 /****************************************************************************
  * Playlist window management
@@ -706,26 +695,24 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
     for( i_dummy = 0; i_dummy < p_playlist->i_size ; i_dummy++ )
     {
 #ifdef WIN32 /* WIN32 HACK */
-        ppsz_text[0] = g_strdup( "" );
+        ppsz_text[0] = "";
 #else
-        ppsz_text[0] = rindex( (char *)(p_playlist->p_item[
-                p_playlist->i_size - 1 - i_dummy].psz_name), '/' );
+        ppsz_text[0] = rindex( p_playlist->p_item[
+                p_playlist->i_size - 1 - i_dummy].psz_name, '/' );
         if ( ppsz_text[0] == NULL )
         {
-            ppsz_text[0] = g_strdup( (char *)(p_playlist->p_item[
-                    p_playlist->i_size - 1 - i_dummy].psz_name));
+            ppsz_text[0] =
+              p_playlist->p_item[ p_playlist->i_size - 1 - i_dummy ].psz_name;
         }
         else
         {
-            ppsz_text[0] = g_strdup( ppsz_text[0] + 1 );
+            /* Skip leading '/' */
+            ppsz_text[0]++;
         }
 #endif
-        ppsz_text[1] = g_strdup( "no info" );
+        ppsz_text[1] = "no info";
         
         gtk_clist_insert( p_clist, 0, ppsz_text );
-        
-        free( ppsz_text[0] );
-        free( ppsz_text[1] );
     }
     gtk_clist_set_background( p_clist, p_playlist->i_index, &red);
     gtk_clist_thaw( p_clist );
index 3901f04a39b72da8ac348b52aaf222a35cce1d5a..504897b2f1c667f0c2b00ca533104643d8655a94 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_control.c : functions to handle stream control buttons.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_preferences.c,v 1.8 2001/12/07 18:33:07 sam Exp $
+ * $Id: gtk_preferences.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
 #include <sys/types.h>                                              /* off_t */
 #include <stdlib.h>
 
-#define gtk 12
-#define gnome 42
-#if ( MODULE_NAME == gtk )
-#   include <gtk/gtk.h>
-#elif ( MODULE_NAME == gnome )
+#include <videolan/vlc.h>
+
+#ifdef MODULE_NAME_IS_gnome
 #   include <gnome.h>
+#else
+#   include <gtk/gtk.h>
 #endif
-#undef gtk
-#undef gnome
 
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
@@ -56,9 +48,7 @@
 #include "gtk_interface.h"
 #include "gtk_support.h"
 #include "gtk_playlist.h"
-#include "intf_gtk.h"
-
-#include "modules_export.h"
+#include "gtk_common.h"
 
 /****************************************************************************
  * GtkPreferencesShow: display interface window after initialization
diff --git a/plugins/gtk/intf_gnome.c b/plugins/gtk/intf_gnome.c
deleted file mode 100644 (file)
index 925ecdf..0000000
+++ /dev/null
@@ -1,397 +0,0 @@
-/*****************************************************************************
- * intf_gnome.c: Gnome interface
- *****************************************************************************
- * Copyright (C) 1999-2001 VideoLAN
- * $Id: intf_gnome.c,v 1.8 2001/12/10 04:53:10 sam Exp $
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *          Stéphane Borel <stef@via.ecp.fr>
- *
- * 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.
- *****************************************************************************/
-
-#define MODULE_NAME gnome
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-#include <stdio.h>
-
-#include <gnome.h>
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#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"
-#include "gtk_display.h"
-#include "intf_gtk.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-static int  intf_Probe      ( probedata_t *p_data );
-static int  intf_Open       ( intf_thread_t *p_intf );
-static void intf_Close      ( intf_thread_t *p_intf );
-static void intf_Run        ( intf_thread_t *p_intf );
-
-static gint GnomeManage     ( gpointer p_data );
-
-/*****************************************************************************
- * g_atexit: kludge to avoid the Gnome thread to segfault at exit
- *****************************************************************************
- * gtk_init() makes several calls to g_atexit() which calls atexit() to
- * register tidying callbacks to be called at program exit. Since the Gnome
- * plugin is likely to be unloaded at program exit, we have to export this
- * symbol to intercept the g_atexit() calls. Talk about crude hack.
- *****************************************************************************/
-void g_atexit( GVoidFunc func )
-{
-    intf_thread_t *p_intf = p_main->p_intf;
-
-    if( p_intf->p_sys->pf_gdk_callback == NULL )
-    {
-        p_intf->p_sys->pf_gdk_callback = func;
-    }
-    else if( p_intf->p_sys->pf_gtk_callback == NULL )
-    {
-        p_intf->p_sys->pf_gtk_callback = func;
-    }
-    /* else nothing, but we could do something here */
-    return;
-}
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = intf_Probe;
-    p_function_list->functions.intf.pf_open  = intf_Open;
-    p_function_list->functions.intf.pf_close = intf_Close;
-    p_function_list->functions.intf.pf_run   = intf_Run;
-}
-
-/*****************************************************************************
- * intf_Probe: probe the interface and return a score
- *****************************************************************************
- * This function tries to initialize Gnome and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    if( TestMethod( INTF_METHOD_VAR, "gnome" ) )
-    {
-        return( 999 );
-    }
-
-    if( TestProgram( "gnome-vlc" ) )
-    {
-        return( 200 );
-    }
-
-    return( 100 );
-}
-
-/*****************************************************************************
- * intf_Open: initialize and create window
- *****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
-{
-    /* Allocate instance and initialize some members */
-    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
-    if( p_intf->p_sys == NULL )
-    {
-        intf_ErrMsg("error: %s", strerror(ENOMEM));
-        return( 1 );
-    }
-
-    /* Initialize Gnome thread */
-    p_intf->p_sys->b_playing = 1;
-    p_intf->p_sys->b_popup_changed = 0;
-    p_intf->p_sys->b_window_changed = 0;
-    p_intf->p_sys->b_playlist_changed = 0;
-
-    p_intf->p_sys->i_playing = -1;
-    p_intf->p_sys->b_slider_free = 1;
-
-    p_intf->p_sys->pf_gtk_callback = NULL;
-    p_intf->p_sys->pf_gdk_callback = NULL;
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * intf_Close: destroy interface window
- *****************************************************************************/
-static void intf_Close( intf_thread_t *p_intf )
-{
-    /* Destroy structure */
-    free( p_intf->p_sys );
-}
-
-/*****************************************************************************
- * intf_Run: Gnome thread
- *****************************************************************************
- * this part of the interface is in a separate thread so that we can call
- * gtk_main() from within it without annoying the rest of the program.
- * XXX: the approach may look kludgy, and probably is, but I could not find
- * a better way to dynamically load a Gnome interface at runtime.
- *****************************************************************************/
-static void intf_Run( intf_thread_t *p_intf )
-{
-    /* gnome_init needs to know the command line. We don't care, so we
-     * give it an empty one */
-    char *p_args[] = { "" };
-    int   i_args   = 1;
-
-    /* The data types we are allowed to receive */
-    static GtkTargetEntry target_table[] =
-    {
-        { "STRING", 0, DROP_ACCEPT_STRING },
-        { "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
-        { "text/plain",    0, DROP_ACCEPT_TEXT_PLAIN }
-    };
-
-    /* intf_Manage callback timeout */
-    int i_timeout;
-
-    /* Initialize Gnome */
-    gnome_init( p_main->psz_arg0, VLC_VERSION, i_args, p_args );
-
-    /* Create some useful widgets that will certainly be used */
-    p_intf->p_sys->p_window = create_intf_window( );
-    p_intf->p_sys->p_popup = create_intf_popup( );
-    p_intf->p_sys->p_playlist = create_intf_playlist();
-
-    /* Set the title of the main window */
-    gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
-                          VOUT_TITLE " (Gnome interface)");
-
-    /* Accept file drops on the main window */
-    gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ),
-                       GTK_DEST_DEFAULT_ALL, target_table,
-                       1, GDK_ACTION_COPY );
-    /* Accept file drops on the playlist window */
-    gtk_drag_dest_set( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
-                            p_intf->p_sys->p_playlist ), "playlist_clist") ),
-                       GTK_DEST_DEFAULT_ALL, target_table,
-                       1, GDK_ACTION_COPY );
-
-    /* Get the interface labels */
-    p_intf->p_sys->p_slider_frame = gtk_object_get_data(
-                      GTK_OBJECT( p_intf->p_sys->p_window ), "slider_frame" );
-    #define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
-                         GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
-    p_intf->p_sys->p_label_title = P_LABEL( "title_label" );
-    p_intf->p_sys->p_label_chapter = P_LABEL( "chapter_label" );
-    #undef P_LABEL
-
-    /* Connect the date display to the slider */
-    #define P_SLIDER GTK_RANGE( gtk_object_get_data( \
-                         GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
-    p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
-
-    gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
-                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
-    p_intf->p_sys->f_adj_oldvalue = 0;
-    #undef P_SLIDER
-
-    /* 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;
-    p_intf->p_sys->p_fileopen = NULL;
-    p_intf->p_sys->p_disc = NULL;
-    p_intf->p_sys->p_network = NULL;
-    p_intf->p_sys->p_preferences = NULL;
-    p_intf->p_sys->p_jump = NULL;
-
-    /* Store p_intf to keep an eye on it */
-    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
-                         "p_intf", p_intf );
-
-    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
-                         "p_intf", p_intf );
-
-    gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
-                         "p_intf", p_intf );
-
-    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
-                         "p_intf", p_intf );
-
-    /* Show the control window */
-    gtk_widget_show( p_intf->p_sys->p_window );
-
-    /* Sleep to avoid using all CPU - since some interfaces needs to access
-     * keyboard events, a 100ms delay is a good compromise */
-    i_timeout = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, GnomeManage, p_intf );
-
-    /* Enter gnome mode */
-    gtk_main();
-
-    /* Remove the timeout */
-    gtk_timeout_remove( i_timeout );
-
-    /* Get rid of stored callbacks so we can unload the plugin */
-    if( p_intf->p_sys->pf_gtk_callback != NULL )
-    {
-        p_intf->p_sys->pf_gtk_callback( );
-        p_intf->p_sys->pf_gtk_callback = NULL;
-
-    }
-
-    if( p_intf->p_sys->pf_gdk_callback != NULL )
-    {
-        p_intf->p_sys->pf_gdk_callback( );
-        p_intf->p_sys->pf_gdk_callback = NULL;
-    }
-}
-
-/* following functions are local */
-
-/*****************************************************************************
- * GnomeManage: manage main thread messages
- *****************************************************************************
- * In this function, called approx. 10 times a second, we check what the
- * main program wanted to tell us.
- *****************************************************************************/
-static gint GnomeManage( gpointer p_data )
-{
-#define p_intf ((intf_thread_t *)p_data)
-
-    vlc_mutex_lock( &p_intf->change_lock );
-
-    /* If the "display popup" flag has changed */
-    if( p_intf->b_menu_change )
-    {
-        if( !GTK_IS_WIDGET( p_intf->p_sys->p_popup ) )
-        {
-            p_intf->p_sys->p_popup = create_intf_popup();
-            gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_popup ),
-                                 "p_popup", p_intf );
-        }
-
-        gnome_popup_menu_do_popup( p_intf->p_sys->p_popup,
-                                   NULL, NULL, NULL, NULL );
-        p_intf->b_menu_change = 0;
-    }
-
-    /* update the playlist */
-    GtkPlayListManage( p_intf ); 
-
-    if( p_intf->p_input != NULL && !p_intf->b_die )
-    {
-        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
-
-        /* New input or stream map change */
-        if( p_intf->p_input->stream.b_changed )
-        {
-            GtkModeManage( p_intf );
-            GtkSetupMenus( p_intf );
-            p_intf->p_sys->b_playing = 1;
-        }
-
-        /* Manage the slider */
-        if( p_intf->p_input->stream.b_seekable )
-        {
-            float           newvalue;
-            newvalue = p_intf->p_sys->p_adj->value;
-    
-#define p_area p_intf->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 =
-                    ( 100. * p_area->i_tell ) / p_area->i_size;
-    
-                gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
-                                         "value_changed" );
-            }
-            /* Otherwise, send message to the input if the user has
-             * finished dragging the slider */
-            else if( p_intf->p_sys->b_slider_free )
-            {
-                off_t i_seek = ( newvalue * p_area->i_size ) / 100;
-    
-                vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
-                input_Seek( p_intf->p_input, i_seek );
-                vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
-    
-                /* Update the old value */
-                p_intf->p_sys->f_adj_oldvalue = newvalue;
-            }
-#undef p_area
-        }
-
-        if( p_intf->p_sys->i_part !=
-            p_intf->p_input->stream.p_selected_area->i_part )
-        {
-            p_intf->p_sys->b_chapter_update = 1;
-            GtkSetupMenus( p_intf );
-        }
-
-        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
-    }
-    else if( p_intf->p_sys->b_playing && !p_intf->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 )
-    {
-        vlc_mutex_unlock( &p_intf->change_lock );
-
-        /* Prepare to die, young Skywalker */
-        gtk_main_quit();
-
-        /* Just in case */
-        return( FALSE );
-    }
-
-    vlc_mutex_unlock( &p_intf->change_lock );
-
-    return( TRUE );
-
-#undef p_intf
-}
diff --git a/plugins/gtk/intf_gtk.c b/plugins/gtk/intf_gtk.c
deleted file mode 100644 (file)
index 670777c..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-/*****************************************************************************
- * intf_gtk.c: Gtk+ interface
- *****************************************************************************
- * Copyright (C) 1999-2001 VideoLAN
- * $Id: intf_gtk.c,v 1.29 2001/12/07 18:33:07 sam Exp $
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *          Stéphane Borel <stef@via.ecp.fr>
- *
- * 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.
- *****************************************************************************/
-
-#define MODULE_NAME gtk
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-#include <stdio.h>
-
-#include <gtk/gtk.h>
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#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"
-#include "gtk_menu.h"
-#include "gtk_display.h"
-#include "intf_gtk.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-static int  intf_Probe      ( probedata_t *p_data );
-static int  intf_Open       ( intf_thread_t *p_intf );
-static void intf_Close      ( intf_thread_t *p_intf );
-static void intf_Run        ( intf_thread_t *p_intf );
-
-static gint GtkManage       ( gpointer p_data );
-
-/*****************************************************************************
- * g_atexit: kludge to avoid the Gtk+ thread to segfault at exit
- *****************************************************************************
- * gtk_init() makes several calls to g_atexit() which calls atexit() to
- * register tidying callbacks to be called at program exit. Since the Gtk+
- * plugin is likely to be unloaded at program exit, we have to export this
- * symbol to intercept the g_atexit() calls. Talk about crude hack.
- *****************************************************************************/
-void g_atexit( GVoidFunc func )
-{
-    intf_thread_t *p_intf = p_main->p_intf;
-
-    if( p_intf->p_sys->pf_gdk_callback == NULL )
-    {
-        p_intf->p_sys->pf_gdk_callback = func;
-    }
-    else if( p_intf->p_sys->pf_gtk_callback == NULL )
-    {
-        p_intf->p_sys->pf_gtk_callback = func;
-    }
-    /* else nothing, but we could do something here */
-    return;
-}
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = intf_Probe;
-    p_function_list->functions.intf.pf_open  = intf_Open;
-    p_function_list->functions.intf.pf_close = intf_Close;
-    p_function_list->functions.intf.pf_run   = intf_Run;
-}
-
-/*****************************************************************************
- * intf_Probe: probe the interface and return a score
- *****************************************************************************
- * This function tries to initialize Gtk+ and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    if( TestMethod( INTF_METHOD_VAR, "gtk" ) )
-    {
-        return( 999 );
-    }
-
-    if( TestProgram( "gvlc" ) )
-    {
-        return( 190 );
-    }
-
-    return( 90 );
-}
-
-/*****************************************************************************
- * intf_Open: initialize and create window
- *****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
-{
-    /* Allocate instance and initialize some members */
-    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
-    if( p_intf->p_sys == NULL )
-    {
-        intf_ErrMsg("error: %s", strerror(ENOMEM));
-        return( 1 );
-    }
-
-    /* Initialize Gtk+ thread */
-    p_intf->p_sys->b_playing = 1;
-    p_intf->p_sys->b_popup_changed = 0;
-    p_intf->p_sys->b_window_changed = 0;
-    p_intf->p_sys->b_playlist_changed = 0;
-
-    p_intf->p_sys->i_playing = -1;
-    p_intf->p_sys->b_slider_free = 1;
-
-    p_intf->p_sys->pf_gtk_callback = NULL;
-    p_intf->p_sys->pf_gdk_callback = NULL;
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * intf_Close: destroy interface window
- *****************************************************************************/
-static void intf_Close( intf_thread_t *p_intf )
-{
-    /* Destroy structure */
-    free( p_intf->p_sys );
-}
-
-/*****************************************************************************
- * intf_Run: Gtk+ thread
- *****************************************************************************
- * this part of the interface is in a separate thread so that we can call
- * gtk_main() from within it without annoying the rest of the program.
- * XXX: the approach may look kludgy, and probably is, but I could not find
- * a better way to dynamically load a Gtk+ interface at runtime.
- *****************************************************************************/
-static void intf_Run( intf_thread_t *p_intf )
-{
-    /* gtk_init needs to know the command line. We don't care, so we
-     * give it an empty one */
-    char  *p_args[] = { "" };
-    char **pp_args  = p_args;
-    int    i_args   = 1;
-
-    /* The data types we are allowed to receive */
-    static GtkTargetEntry target_table[] =
-    {
-        { "STRING", 0, DROP_ACCEPT_STRING },
-        { "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
-        { "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
-    };
-
-    /* intf_Manage callback timeout */
-    int i_timeout;
-
-    /* Initialize Gtk+ */
-    gtk_init( &i_args, &pp_args );
-
-    /* Create some useful widgets that will certainly be used */
-    p_intf->p_sys->p_window = create_intf_window( );
-    p_intf->p_sys->p_popup = create_intf_popup( );
-    p_intf->p_sys->p_playlist = create_intf_playlist();
-    
-    /* Set the title of the main window */
-    gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
-                          VOUT_TITLE " (Gtk+ interface)");
-
-    /* Accept file drops on the main window */
-    gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ),
-                       GTK_DEST_DEFAULT_ALL, target_table,
-                       1, GDK_ACTION_COPY );
-
-    /* Accept file drops on the playlist window */
-    gtk_drag_dest_set( GTK_WIDGET( lookup_widget( p_intf->p_sys->p_playlist,
-                                   "playlist_clist") ),
-                       GTK_DEST_DEFAULT_ALL, target_table,
-                       1, GDK_ACTION_COPY );
-
-    /* Get the interface labels */
-    p_intf->p_sys->p_slider_frame = GTK_FRAME( gtk_object_get_data(
-        GTK_OBJECT(p_intf->p_sys->p_window ), "slider_frame" ) ); 
-
-#define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
-                         GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
-    p_intf->p_sys->p_label_title = P_LABEL( "title_label" );
-    p_intf->p_sys->p_label_chapter = P_LABEL( "chapter_label" );
-#undef P_LABEL
-
-    /* Connect the date display to the slider */
-#define P_SLIDER GTK_RANGE( gtk_object_get_data( \
-                         GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
-    p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
-
-    gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
-                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
-    p_intf->p_sys->f_adj_oldvalue = 0;
-#undef P_SLIDER
-
-    /* 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;
-    p_intf->p_sys->p_fileopen = NULL;
-    p_intf->p_sys->p_disc = NULL;
-    p_intf->p_sys->p_network = NULL;
-    p_intf->p_sys->p_preferences = NULL;
-    p_intf->p_sys->p_jump = NULL;
-
-    /* Store p_intf to keep an eye on it */
-    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
-                         "p_intf", p_intf );
-
-    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
-                         "p_intf", p_intf );
-
-    gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
-                         "p_intf", p_intf );
-
-    gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
-                         "p_intf", p_intf );
-
-    /* Show the control window */
-    gtk_widget_show( p_intf->p_sys->p_window );
-
-    /* Sleep to avoid using all CPU - since some interfaces needs to access
-     * keyboard events, a 100ms delay is a good compromise */
-    i_timeout = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, GtkManage, p_intf );
-
-    /* Enter Gtk mode */
-    gtk_main();
-
-    /* Remove the timeout */
-    gtk_timeout_remove( i_timeout );
-
-    /* Launch stored callbacks */
-    if( p_intf->p_sys->pf_gtk_callback != NULL )
-    {
-        p_intf->p_sys->pf_gtk_callback();
-
-        if( p_intf->p_sys->pf_gdk_callback != NULL )
-        {
-            p_intf->p_sys->pf_gdk_callback();
-        }
-    }
-}
-
-/* following functions are local */
-
-/*****************************************************************************
- * GtkManage: manage main thread messages
- *****************************************************************************
- * In this function, called approx. 10 times a second, we check what the
- * main program wanted to tell us.
- *****************************************************************************/
-static gint GtkManage( gpointer p_data )
-{
-#define p_intf ((intf_thread_t *)p_data)
-
-    vlc_mutex_lock( &p_intf->change_lock );
-    
-    /* If the "display popup" flag has changed */
-    if( p_intf->b_menu_change )
-    {
-        if( !GTK_IS_WIDGET( p_intf->p_sys->p_popup ) )
-        {
-            p_intf->p_sys->p_popup = create_intf_popup();
-            gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_popup ),
-                                 "p_popup", p_intf );
-        }
-        gtk_menu_popup( GTK_MENU( p_intf->p_sys->p_popup ),
-                        NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME );
-        p_intf->b_menu_change = 0;
-    }
-
-    /* update the playlist */
-    GtkPlayListManage( p_data );
-
-    if( p_intf->p_input != NULL && !p_intf->b_die )
-    {
-        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
-
-        /* New input or stream map change */
-        if( p_intf->p_input->stream.b_changed )
-        {
-            GtkModeManage( p_intf );
-            GtkSetupMenus( p_intf );
-            p_intf->p_sys->b_playing = 1;
-        }
-
-        /* Manage the slider */
-        if( p_intf->p_input->stream.b_seekable )
-        {
-            float newvalue = p_intf->p_sys->p_adj->value;
-    
-#define p_area p_intf->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 =
-                    ( 100. * p_area->i_tell ) / p_area->i_size;
-    
-                gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
-                                         "value_changed" );
-            }
-            /* Otherwise, send message to the input if the user has
-             * finished dragging the slider */
-            else if( p_intf->p_sys->b_slider_free )
-            {
-                off_t i_seek = ( newvalue * p_area->i_size ) / 100;
-
-                /* release the lock to be able to seek */
-                vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
-                input_Seek( p_intf->p_input, i_seek );
-                vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
-    
-                /* Update the old value */
-                p_intf->p_sys->f_adj_oldvalue = newvalue;
-            }
-#undef p_area
-        }
-
-        if( p_intf->p_sys->i_part !=
-            p_intf->p_input->stream.p_selected_area->i_part )
-        {
-            p_intf->p_sys->b_chapter_update = 1;
-            GtkSetupMenus( p_intf );
-        }
-
-        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
-
-    }
-    else if( p_intf->p_sys->b_playing && !p_intf->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 )
-    {
-        vlc_mutex_unlock( &p_intf->change_lock );
-
-        /* Prepare to die, young Skywalker */
-        gtk_main_quit();
-
-        /* Just in case */
-        return( FALSE );
-    }
-
-    vlc_mutex_unlock( &p_intf->change_lock );
-
-    return( TRUE );
-
-#undef p_intf
-}
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index d440e24754dc4020b5e92002d8b380fd56303265..f8c68d50fdfbead7b3a2fe34af5778484aac883b 100644 (file)
@@ -1,93 +1,5 @@
-###############################################################################
-# vlc (VideoLAN Client) idct module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_IDCT = idct.o
-PLUGIN_IDCTCLASSIC = idctclassic.o
-PLUGIN_IDCTMMX = idctmmx.o
-PLUGIN_IDCTMMXEXT = idctmmxext.o
-PLUGIN_IDCTALTIVEC = idctaltivec.o
-
-BUILTIN_IDCT = $(PLUGIN_IDCT:%.o=BUILTIN_IDCT_%.o)
-BUILTIN_IDCTCLASSIC = $(PLUGIN_IDCTCLASSIC:%.o=BUILTIN_IDCTCLASSIC_%.o)
-BUILTIN_IDCTMMX = $(PLUGIN_IDCTMMX:%.o=BUILTIN_IDCTMMX_%.o)
-BUILTIN_IDCTMMXEXT = $(PLUGIN_IDCTMMXEXT:%.o=BUILTIN_IDCTMMXEXT_%.o)
-BUILTIN_IDCTALTIVEC = $(PLUGIN_IDCTALTIVEC:%.o=BUILTIN_IDCTALTIVEC_%.o)
-
-PLUGIN_C = $(PLUGIN_IDCT) $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTMMXEXT)
-ALL_OBJ = $(PLUGIN_C) $(PLUGIN_IDCTALTIVEC) $(BUILTIN_IDCT) $(BUILTIN_IDCTCLASSIC) $(BUILTIN_IDCTMMX) $(BUILTIN_IDCTMMXEXT) $(BUILTIN_IDCTALTIVEC)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
-$(PLUGIN_IDCTALTIVEC): %.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DPLUGIN $(PCFLAGS) -c -o $@ $<
-
-$(BUILTIN_IDCT): BUILTIN_IDCT_%.o: .dep/%.d
-$(BUILTIN_IDCT): BUILTIN_IDCT_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idct -c -o $@ $<
-
-$(BUILTIN_IDCTCLASSIC): BUILTIN_IDCTCLASSIC_%.o: .dep/%.d
-$(BUILTIN_IDCTCLASSIC): BUILTIN_IDCTCLASSIC_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idctclassic -c -o $@ $<
-
-$(BUILTIN_IDCTMMX): BUILTIN_IDCTMMX_%.o: .dep/%.d
-$(BUILTIN_IDCTMMX): BUILTIN_IDCTMMX_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idctmmx -c -o $@ $<
-
-$(BUILTIN_IDCTMMXEXT): BUILTIN_IDCTMMXEXT_%.o: .dep/%.d
-$(BUILTIN_IDCTMMXEXT): BUILTIN_IDCTMMXEXT_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idctmmxext -c -o $@ $<
-
-$(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: .dep/%.d
-$(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DBUILTIN -DMODULE_NAME=idctaltivec -c -o $@ $<
-
-#
-# Real targets
-#
-
-../idct.so: $(PLUGIN_IDCT)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../idct.a: $(BUILTIN_IDCT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../idctclassic.so: $(PLUGIN_IDCTCLASSIC)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../idctclassic.a: $(BUILTIN_IDCTCLASSIC)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../idctmmx.so: $(PLUGIN_IDCTMMX)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../idctmmx.a: $(BUILTIN_IDCTMMX)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../idctmmxext.a: $(BUILTIN_IDCTMMXEXT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../idctaltivec.so: $(PLUGIN_IDCTALTIVEC)
-       $(CC) -o $@ $^ $(LIB_ALTIVEC) $(PLCFLAGS)
-
-../idctaltivec.a: $(BUILTIN_IDCTALTIVEC)
-       ar r $@ $^
-       $(RANLIB) $@
-
+idct_SOURCES = idct.c
+idctclassic_SOURCES = idctclassic.c
+idctmmx_SOURCES = idctmmx.c
+idctmmxext_SOURCES = idctmmxext.c
+idctaltivec_SOURCES = idctaltivec.c
index 3530aa842a44b70e130f384c5d6fbecf6b4cccca..d223b98b7fcee51a3cfcac55af1bbbfe7af53fbb 100644 (file)
@@ -2,7 +2,7 @@
  * idct.c : C IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idct.c,v 1.18 2001/12/09 17:01:36 sam Exp $
+ * $Id: idct.c,v 1.19 2001/12/30 07:09:55 sam Exp $
  *
  * Author: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME idct
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "idct.h"
 #include "block_c.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -53,14 +41,13 @@ static void idct_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for IDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IDCT;
-    p_module->psz_longname = "IDCT module";
+    SET_DESCRIPTION( "IDCT module" )
+    ADD_CAPABILITY( IDCT, 50 )
+    ADD_SHORTCUT( "c" )
+    ADD_SHORTCUT( "idct" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -77,13 +64,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( TestMethod( IDCT_METHOD_VAR, "idct" )
-         || TestMethod( IDCT_METHOD_VAR, "c" ))
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 50 );
 }
 
index 831fface7e860f36491380504873718c329236b5..d13d699706d29a0ee5bfd7f26c8a0034e72d73ed 100644 (file)
@@ -2,7 +2,7 @@
  * idctaltivec.c : Altivec IDCT module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: idctaltivec.c,v 1.21 2001/12/09 17:01:36 sam Exp $
+ * $Id: idctaltivec.c,v 1.22 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 
 #ifndef __BUILD_ALTIVEC_ASM__
 
-#define MODULE_NAME idctaltivec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 #include <inttypes.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"                                              /* TestCPU() */
+#include <videolan/vlc.h>
 
 #include "idct.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
@@ -55,14 +43,14 @@ static void idct_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Altivec IDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IDCT;
-    p_module->psz_longname = "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
@@ -79,17 +67,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_ALTIVEC ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( IDCT_METHOD_VAR, "idctaltivec" )
-         || TestMethod( IDCT_METHOD_VAR, "altivec" ) )
-    {
-        return( 999 );
-    }
-
     return( 200 );
 }
 
index 9a0bb0bee3b27fe9cb9481cac581087778514dc7..d67765662d15ed7b589d78dd6a9877eeaf2087f0 100644 (file)
@@ -2,7 +2,7 @@
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctclassic.c,v 1.18 2001/12/09 17:01:36 sam Exp $
+ * $Id: idctclassic.c,v 1.19 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME idctclassic
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "idct.h"
 #include "block_c.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -53,14 +41,15 @@ static void idct_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for classic IDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
+    ADD_WINDOW( "Configuration for classic IDCT module" )
+        ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IDCT;
-    p_module->psz_longname = "classic IDCT module";
+    SET_DESCRIPTION( "classic IDCT module" )
+    ADD_CAPABILITY( IDCT, 100 )
+    ADD_SHORTCUT( "classic" )
+    ADD_SHORTCUT( "idctclassic" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -77,13 +66,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( TestMethod( IDCT_METHOD_VAR, "idctclassic" )
-         || TestMethod( IDCT_METHOD_VAR, "classic" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 100 );
 }
 
index 29e10a571818153545b92be0b486d735f0e31d23..a32e8beaed959b6cb161669eae78561a4e868896 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmx.c : MMX IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctmmx.c,v 1.21 2001/12/09 17:01:36 sam Exp $
+ * $Id: idctmmx.c,v 1.22 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME idctmmx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"                                              /* TestCPU() */
+#include <videolan/vlc.h>
 
 #include "mmx.h"
 
 #include "idct.h"
 #include "block_mmx.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
@@ -59,14 +47,14 @@ static void idct_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MMX IDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IDCT;
-    p_module->psz_longname = "MMX IDCT module";
+    SET_DESCRIPTION( "MMX IDCT module" )
+    ADD_CAPABILITY( IDCT, 150 )
+    ADD_REQUIREMENT( MMX )
+    ADD_SHORTCUT( "mmx" )
+    ADD_SHORTCUT( "imdctmmx" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -83,17 +71,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_MMX ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( IDCT_METHOD_VAR, "idctmmx" )
-         || TestMethod( IDCT_METHOD_VAR, "mmx" ) )
-    {
-        return( 999 );
-    }
-
     return( 150 );
 }
 
index 1cf6a22e58d3d5357c933f629aaf9f0c2e766ef8..b29dfa3ca7786efb873862305b84d908be08b0f8 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmxext.c : MMX EXT IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctmmxext.c,v 1.18 2001/12/09 17:01:36 sam Exp $
+ * $Id: idctmmxext.c,v 1.19 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME idctmmxext
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"                                              /* TestCPU() */
+#include <videolan/vlc.h>
 
 #include "mmx.h"
 
 #include "idct.h"
 #include "block_mmx.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
@@ -59,14 +47,14 @@ static void idct_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MMX EXT IDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IDCT;
-    p_module->psz_longname = "MMX EXT IDCT module";
+    SET_DESCRIPTION( "MMX EXT IDCT module" )
+    ADD_CAPABILITY( IDCT, 200 )
+    ADD_REQUIREMENT( MMXEXT )
+    ADD_SHORTCUT( "mmxext" )
+    ADD_SHORTCUT( "idctmmxext" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -83,19 +71,7 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_MMXEXT ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( IDCT_METHOD_VAR, "idctmmxext" )
-         || TestMethod( IDCT_METHOD_VAR, "mmxext" ) )
-    {
-        return( 999 );
-    }
-
     return( 200 );
-
 }
 
 /*****************************************************************************
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 9795630009333ef20aa5256f700701694442a4ec..32c0f91bedbd7510559da169f1030206121f3d08 100644 (file)
@@ -1,67 +1,5 @@
-###############################################################################
-# vlc (VideoLAN Client) imdct module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_IMDCT = imdct.o ac3_imdct_c.o ac3_srfft_c.o
-PLUGIN_IMDCTSSE = imdctsse.o ac3_imdct_sse.o ac3_srfft_sse.o
-PLUGIN_IMDCT3DN = imdct3dn.o ac3_imdct_3dn.o ac3_srfft_3dn.o
-PLUGIN_IMDCTCOMMON = ac3_imdct_common.o
-
-BUILTIN_IMDCT = $(PLUGIN_IMDCT:%.o=BUILTIN_IMDCT_%.o) \
-               $(PLUGIN_IMDCTCOMMON:%.o=BUILTIN_IMDCT_%.o)
-BUILTIN_IMDCTSSE = $(PLUGIN_IMDCTSSE:%.o=BUILTIN_IMDCTSSE_%.o) \
-               $(PLUGIN_IMDCTCOMMON:%.o=BUILTIN_IMDCTSSE_%.o)
-BUILTIN_IMDCT3DN = $(PLUGIN_IMDCT3DN:%.o=BUILTIN_IMDCT3DN_%.o) \
-               $(PLUGIN_IMDCTCOMMON:%.o=BUILTIN_IMDCT3DN_%.o)
-
-PLUGIN_C = $(PLUGIN_IMDCT) $(PLUGIN_IMDCTSSE) $(PLUGIN_IMDCT3DN) $(PLUGIN_IMDCTCOMMON)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_IMDCT) $(BUILTIN_IMDCTSSE) $(BUILTIN_IMDCT3DN)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(BUILTIN_IMDCT): BUILTIN_IMDCT_%.o: .dep/%.d
-$(BUILTIN_IMDCT): BUILTIN_IMDCT_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=imdct -c -o $@ $<
-
-$(BUILTIN_IMDCTSSE): BUILTIN_IMDCTSSE_%.o: .dep/%.d
-$(BUILTIN_IMDCTSSE): BUILTIN_IMDCTSSE_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=imdctsse -c -o $@ $<
-
-$(BUILTIN_IMDCT3DN): BUILTIN_IMDCT3DN_%.o: .dep/%.d
-$(BUILTIN_IMDCT3DN): BUILTIN_IMDCT3DN_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=imdct3dn -c -o $@ $<
-
-#
-# Real targets
-#
-
-../imdct.so: $(PLUGIN_IMDCT) $(PLUGIN_IMDCTCOMMON) $(LIB_IMDCT)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../imdct.a: $(BUILTIN_IMDCT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../imdctsse.so: $(PLUGIN_IMDCTSSE) $(PLUGIN_IMDCTCOMMON) $(LIB_IMDCTSSE)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../imdctsse.a: $(BUILTIN_IMDCTSSE)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../imdct3dn.so: $(PLUGIN_IMDCT3DN) $(PLUGIN_IMDCTCOMMON) $(LIB_IMDCT3DN)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../imdct3dn.a: $(BUILTIN_IMDCT3DN)
-       ar r $@ $^
-       $(RANLIB) $@
+COMMON_SOURCES = ac3_imdct_common.c
 
+imdct_SOURCES = imdct.c ac3_imdct_c.c ac3_srfft_c.c $(COMMON_SOURCES)
+imdctsse_SOURCES = imdctsse.c ac3_imdct_sse.c ac3_srfft_sse.c $(COMMON_SOURCES)
+imdct3dn_SOURCES = imdct3dn.c ac3_imdct_3dn.c ac3_srfft_3dn.c $(COMMON_SOURCES)
index 76267c10720671314508c446025af664209db1e7..24d4420dbce0755d8a960c4c583cf973de64cbe7 100644 (file)
@@ -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.8 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_imdct_3dn.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdct3dn
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_imdct_common.h"
index 973091cc51a8b67ec67e2b614fe6dfa97f0df11a..d1a58df02841ec1b0586243dfd407b711957963d 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_imdct_c.c: ac3 DCT in C
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_imdct_c.c,v 1.4 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_imdct_c.c,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdct
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* memcpy() */
 
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_imdct_common.h"
index 634e238688b09ec8b5be7a72497fb0038e19f657..73a28f5a459fb3ca98dd7ba79ca0a7f553d95b5d 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_imdct_common.c: common ac3 DCT functions
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_imdct_common.c,v 1.5 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_imdct_common.c,v 1.6 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-/* MODULE_NAME defined in Makefile together with -DBUILTIN */
-#ifdef BUILTIN
-#   include "modules_inner.h"
-#else
-#   define _M( foo ) foo
-#endif
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#include <string.h>                                              /* memcpy() */
-
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_retables.h"
index 6c15eb7764cc87e442b5f201a7987a2d5f28ed50..d22fe1791b794618cf5c99c6ce06438400afca2b 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_imdct_sse.c: accelerated SSE ac3 DCT
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_imdct_sse.c,v 1.9 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_imdct_sse.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdctsse
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_imdct_common.h"
index 432362d66e76ae66f1b6fc99d23624871ab490eb..f7444bfee8d8a004538b5219246cb47b3c490732 100644 (file)
@@ -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.4 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_srfft_3dn.c,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdct3dn
-#include "modules_inner.h"
-
 /*****************************************************************************
- *  * Preamble
- *   *****************************************************************************/
-#include <stdio.h>
-
-#include "defs.h"
-
+ * Preamble
+ *****************************************************************************/
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_srfft.h"
index 51e89473d270d1a61246a66978ac67c08647fb94..54a0e05e101ff646e71019dfed9f32cd062934cf 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_srfft.c: ac3 FFT in C
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_srfft_c.c,v 1.3 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_srfft_c.c,v 1.4 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdct
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#include <string.h>                                              /* memcpy() */
-
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_srfft.h"
index cfc94f28d24c4ae2ae95b5074a24dccb3d86a565..5f6333c1651ce95eaa8f113039f2487263f48d95 100644 (file)
@@ -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.10 2001/12/09 17:01:36 sam Exp $
+ * $Id: ac3_srfft_sse.c,v 1.11 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdctsse
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdio.h>
-
-#include "defs.h"
-
 #include <math.h>
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_srfft.h"
index a0897bc92adc93f4c3d020440ee37bd4f51d314b..83d21ae30001bf363dbe34f9d5f59990fcce8570 100644 (file)
@@ -2,7 +2,7 @@
  * imdct.c : IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdct.c,v 1.6 2001/12/09 17:01:36 sam Exp $
+ * $Id: imdct.c,v 1.7 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdct
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_imdct_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -54,14 +42,13 @@ static int  imdct_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for IMDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IMDCT;
-    p_module->psz_longname = "AC3 IMDCT module";
+    SET_DESCRIPTION( "AC3 IMDCT module" )
+    ADD_CAPABILITY( IMDCT, 50 )
+    ADD_SHORTCUT( "c" )
+    ADD_SHORTCUT( "imdct" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -94,13 +81,6 @@ static void imdct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int imdct_Probe( probedata_t *p_data )
 {
-    if( TestMethod( IMDCT_METHOD_VAR, "imdct" )
-         || TestMethod( IMDCT_METHOD_VAR, "c" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 50 );
 }
 
index 4f7b19f0eaade147128a54b0328fdffadf78cdc8..62cee6244475fb21288498d338bee32c8b943da8 100644 (file)
@@ -2,7 +2,7 @@
  * imdct3dn.c : accelerated 3D Now! IMDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: imdct3dn.c,v 1.8 2001/12/09 17:01:36 sam Exp $
+ * $Id: imdct3dn.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdct3dn
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_imdct_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -54,14 +42,15 @@ static int  imdct_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for IMDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IMDCT;
-    p_module->psz_longname = "3D Now! AC3 IMDCT module";
+    SET_DESCRIPTION( "3D Now! AC3 IMDCT module" )
+    ADD_CAPABILITY( IMDCT, 200 )
+    ADD_REQUIREMENT( 3DNOW )
+    ADD_SHORTCUT( "3dn" )
+    ADD_SHORTCUT( "3dnow" )
+    ADD_SHORTCUT( "imdct3dn" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -94,18 +83,6 @@ static void imdct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int imdct_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_3DNOW ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( IMDCT_METHOD_VAR, "imdct3dn" )
-         || TestMethod( IMDCT_METHOD_VAR, "3dn" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 200 );
 }
 
index d812e41b88791a8f86f5944a697e8322c0a06e65..be86203c069235ea8335fe2607d69b6c35aceb47 100644 (file)
@@ -2,7 +2,7 @@
  * imdctsse.c : accelerated SSE IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdctsse.c,v 1.9 2001/12/09 17:01:36 sam Exp $
+ * $Id: imdctsse.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME imdctsse
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "ac3_imdct.h"
 #include "ac3_imdct_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -54,14 +42,14 @@ static int  imdct_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for IMDCT module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_IMDCT;
-    p_module->psz_longname = "SSE AC3 IMDCT module";
+    SET_DESCRIPTION( "SSE AC3 IMDCT module" )
+    ADD_CAPABILITY( IMDCT, 200 )
+    ADD_REQUIREMENT( SSE )
+    ADD_SHORTCUT( "sse" )
+    ADD_SHORTCUT( "imdctsse" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -97,18 +85,6 @@ static int imdct_Probe( probedata_t *p_data )
 #if defined ( __MINGW32__ )
     return 0;
 #else
-    if( !TestCPU( CPU_CAPABILITY_SSE ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( IMDCT_METHOD_VAR, "imdctsse" )
-         || TestMethod( IMDCT_METHOD_VAR, "sse" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 200 );
 #endif
 }
index f70867d9c1ded7defbd67d102cd00ef911e2e4cd..e6a2f8ded927dcc4af20bb2ec2c104ed877df196 100644 (file)
@@ -1,2 +1,5 @@
 *.moc.cpp
 .dep
+*.lo
+*.o.*
+*.lo.*
index 47c0106fd6913989add81e477a86f1ec6e9fb77b..178cead3092e41af478e6d2cf3caa13dc169a93e 100644 (file)
@@ -1,71 +1,6 @@
-###############################################################################
-# vlc (VideoLAN Client) kde module Makefile
-# (c)2001 VideoLAN
-###############################################################################
+MOC_SOURCES = kde_interface.moc.cpp kde_slider.moc.cpp kde_disc.moc.cpp kde_net.moc.cpp kde_menu.moc.cpp
 
-#
-# Objects
-#
-MOCFILES =     kinterfacemain.moc.cpp \
-               kvlcslider.moc.cpp \
-               kdiskdialog.moc.cpp \
-               knetdialog.moc.cpp \
-               ktitlemenu.moc.cpp
+kde_SOURCES = kde.cpp kde_interface.cpp kde_slider.cpp kde_disc.cpp kde_net.cpp kde_menu.cpp $(MOC_SOURCES)
 
-PLUGIN_KDE =   kde.o \
-               kdeinterface.o \
-               kinterfacemain.o \
-               kvlcslider.o \
-               kdiskdialog.o \
-               knetdialog.o \
-               ktitlemenu.o
-
-KDE_CFLAGS = -I/usr/include/kde -I/usr/include/qt
-ifneq ($(KDEDIR),)
-  KDE_CFLAGS += -I$(KDEDIR)/include -I$(QTDIR)/include
-endif
-
-PLUGIN_KDE_MOC = $(MOCFILES:%.cpp=%.o)
-
-BUILTIN_KDE = $(PLUGIN_KDE:%.o=BUILTIN_%.o)
-BUILTIN_KDE_MOC = $(MOCFILES:%.cpp=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_KDE) $(PLUGIN_KDE_MOC) $(BUILTIN_KDE) $(BUILTIN_KDE_MOC)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(MOCFILES): %.moc.cpp: %.h
+$(MOC_SOURCES): %.moc.cpp: %.h
        $(MOC) $< -o $@
-
-$(PLUGIN_KDE): %.o: .dep/%.dpp
-$(PLUGIN_KDE): %.o: %.cpp
-       $(CC) $(CFLAGS) $(PCFLAGS) $(KDE_CFLAGS) -DPLUGIN -DMODULE_NAME=kde -c -o $@ $<
-
-$(PLUGIN_KDE_MOC): %.o: .dep/%.dpp
-$(PLUGIN_KDE_MOC): %.o: %.cpp
-       $(CC) $(CFLAGS) $(PCFLAGS) $(KDE_CFLAGS) -DPLUGIN -DMODULE_NAME=kde -c -o $@ $<
-
-$(BUILTIN_KDE): BUILTIN_%.o: .dep/%.dpp
-$(BUILTIN_KDE): BUILTIN_%.o: %.cpp
-       $(CC) $(CFLAGS) -DBUILTIN $(KDE_CFLAGS) -DBUILTIN -DMODULE_NAME=kde -c -o $@ $<
-
-$(BUILTIN_KDE_MOC): BUILTIN_%.o: .dep/%.dpp
-$(BUILTIN_KDE_MOC): BUILTIN_%.o: %.cpp
-       $(CC) $(CFLAGS) -DBUILTIN $(KDE_CFLAGS) -DBUILTIN -DMODULE_NAME=kde -c -o $@ $<
-
-#
-# Real targets
-#
-
-../kde.so: $(PLUGIN_KDE) $(PLUGIN_KDE_MOC)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_KDE)
-
-../kde.a: $(BUILTIN_KDE) $(BUILTIN_KDE_MOC)
-       ar r $@ $^
-       $(RANLIB) $@
-
index c36b084f0241f7ea6e80b3ef45326985cf1ebc72..53c19f66e80fd660c736e2323445f7c18a6b4327 100644 (file)
@@ -2,7 +2,7 @@
  * kde.cpp : KDE plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: kde.cpp,v 1.4 2001/11/28 15:08:05 massiot Exp $
+ * $Id: kde.cpp,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Andres Krapf <dae@chez.com> Sun Mar 25 2001
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#define MODULE_NAME kde 
-#include "intf_plugin.h"
 
-extern "C"
-{
+#include "kde_common.h"
+
+#include "kde_interface.h"
+
+#include <iostream>
+
+#include <kaction.h>
+#include <kapp.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kmainwindow.h>
+#include <kstdaction.h>
+#include <qwidget.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list );
+static void intf_getfunctions( function_list_t * p_function_list );
 
 /*****************************************************************************
  * Build configuration tree.
  *****************************************************************************/
+extern "C"
+{
+
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for KDE module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
+    ADD_WINDOW( "Configuration for KDE module" )
+        ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "KDE interface module";
+    SET_DESCRIPTION( "KDE interface module" )
+    ADD_CAPABILITY( INTF, 80 )
+    ADD_PROGRAM( "kvlc" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
+    intf_getfunctions( &p_module->p_functions->intf );
 MODULE_ACTIVATE_STOP
 
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
-} /* extern "C" */
+} // extern "C"
+
+/*****************************************************************************
+ * The local class.
+ *****************************************************************************/
+class KInterface;
+class KAboutData;
+
+class KThread
+{
+    private:
+        KThread ( KThread &thread ) { };
+        KThread &operator= ( KThread &thread ) { return ( *this ); };
+
+        intf_thread_t *p_intf;
+        
+    public:
+        KThread(intf_thread_t *p_intf);
+        ~KThread();
+
+        // These methods get exported to the core
+        static int     probe   ( probedata_t *p_data );
+        static int     open    ( intf_thread_t *p_intf );
+        static void    close   ( intf_thread_t *p_intf );
+        static void    run     ( intf_thread_t *p_intf );
+};
+
+/*****************************************************************************
+ * Functions exported as capabilities.
+ *****************************************************************************/
+static void intf_getfunctions( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = KThread::probe;
+    p_function_list->functions.intf.pf_open  = KThread::open;
+    p_function_list->functions.intf.pf_close = KThread::close;
+    p_function_list->functions.intf.pf_run   = KThread::run;
+}
+
+/*****************************************************************************
+ * KThread::KThread: KDE interface constructor
+ *****************************************************************************/
+KThread::KThread(intf_thread_t *p_intf)
+{
+    this->p_intf = p_intf;
+
+    p_intf->p_sys->p_about =
+        new KAboutData( "VideoLAN Client", I18N_NOOP("Kvlc"),
+            VLC_VERSION,
+            "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.", KAboutData::License_GPL,
+            "(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team", 0, 0, "dae@chez.com");
+
+    char *authors[][2] = {
+        { "Régis Duchesne", "<regis@via.ecp.fr>" },
+        { "Michel Lespinasse", "<walken@zoy.org>" },
+        { "Olivier Pomel", "<pomel@via.ecp.fr>" },
+        { "Pierre Baillet", "<oct@zoy.org>" },
+        { "Jean-Philippe Grimaldi", "<jeanphi@via.ecp.fr>" },
+        { "Andres Krapf", "<dae@via.ecp.fr>" },
+        { "Christophe Massiot", "<massiot@via.ecp.fr>" },
+        { "Vincent Seguin", "<seguin@via.ecp.fr>" },
+        { "Benoit Steiner", "<benny@via.ecp.fr>" },
+        { "Arnaud de Bossoreille de Ribou", "<bozo@via.ecp.fr>" },
+        { "Jean-Marc Dressler", "<polux@via.ecp.fr>" },
+        { "Gaël Hendryckx", "<jimmy@via.ecp.fr>" },
+        { "Samuel Hocevar","<sam@zoy.org>" },
+        { "Brieuc Jeunhomme", "<bbp@via.ecp.fr>" },
+        { "Michel Kaempf", "<maxx@via.ecp.fr>" },
+        { "Stéphane Borel", "<stef@via.ecp.fr>" },
+        { "Renaud Dartus", "<reno@via.ecp.fr>" },
+        { "Henri Fallon", "<henri@via.ecp.fr>" },
+        { NULL, NULL },
+    };
+
+    for ( int i = 0; NULL != authors[i][0]; i++ ) {
+        p_intf->p_sys->p_about->addAuthor( authors[i][0], 0, authors[i][1] );
+    }
+
+    int argc = 1;
+    char *argv[] = { p_main->psz_arg0, NULL };
+    KCmdLineArgs::init( argc, argv, p_intf->p_sys->p_about );
+
+    p_intf->p_sys->p_app = new KApplication();
+    p_intf->p_sys->p_window = new KInterface(p_intf);
+    p_intf->p_sys->p_window->setCaption( VOUT_TITLE " (KDE interface)" );
+}
+
+/*****************************************************************************
+ * KThread::~KThread: KDE interface destructor
+ *****************************************************************************/
+KThread::~KThread()
+{
+    /* XXX: can be deleted if the user closed the window ! */
+    //delete p_intf->p_sys->p_window;
+
+    delete p_intf->p_sys->p_app;
+    delete p_intf->p_sys->p_about;
+}
+
+/*****************************************************************************
+ * KThread::probe: probe the interface and return a score
+ *****************************************************************************
+ * This function tries to initialize KDE and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+int KThread::probe(probedata_t *p_data )
+{
+    return ( 80 );
+}
+
+/*****************************************************************************
+ * KThread::open: initialize and create window
+ *****************************************************************************/
+int KThread::open(intf_thread_t *p_intf)
+{
+    /* 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) );
+        return( 1 );
+    }
+
+    p_intf->p_sys->p_thread = new KThread(p_intf);
+    return ( 0 );
+}
+
+/*****************************************************************************
+ * KThread::close: destroy interface window
+ *****************************************************************************/
+void KThread::close(intf_thread_t *p_intf)
+{
+    delete p_intf->p_sys->p_thread;
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * KThread::run: KDE thread
+ *****************************************************************************
+ * This part of the interface is in a separate thread so that we can call
+ * exec() from within it without annoying the rest of the program.
+ *****************************************************************************/
+void KThread::run(intf_thread_t *p_intf)
+{
+    p_intf->p_sys->p_window->show();
+    p_intf->p_sys->p_app->exec();
+}
 
similarity index 70%
rename from plugins/kde/intf_plugin.h
rename to plugins/kde/kde_common.h
index d69a0a46258091e37953857d2314c43fae0efb32..447fcb23fbe1424cff8344e80aee1b8c5b87698e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
-                          intf_plugin.h  -  description
+                          kde_common.h  -  description
                              -------------------
     begin                : Mon Apr 9 2001
     copyright            : (C) 2001 by andres
 
 extern "C"
 {
-#include "modules_inner.h"
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
 #include "intf_playlist.h"
 #include "interface.h"
-
-#include "modules.h"
-#include "modules_export.h"
 }
 
 #endif /* _INTF_PLUGIN_H_ */
similarity index 96%
rename from plugins/kde/kdiskdialog.cpp
rename to plugins/kde/kde_disc.cpp
index 7d1af86e6d18650475d743464eacc018d508a7f8..413e6ed837620c0a6a83e1a8aa33716401906486 100644 (file)
@@ -1,12 +1,12 @@
 /***************************************************************************
-                          kdiskdialog.cpp  -  description
+                          kde_disc.cpp  -  description
                              -------------------
     begin                : Sat Apr 7 2001
     copyright            : (C) 2001 by andres
     email                : dae@chez.com
  ***************************************************************************/
 
-#include "kdiskdialog.h"
+#include "kde_disc.h"
 
 #include <qhbox.h>
 #include <qlabel.h>
@@ -76,4 +76,4 @@ int KDiskDialog::title() const
 int KDiskDialog::chapter() const
 {
        return ( fChapter->value() );
-}
\ No newline at end of file
+}
similarity index 89%
rename from plugins/kde/kdiskdialog.h
rename to plugins/kde/kde_disc.h
index d04cec7e21bc89602c1a17aaf2c4f77966c8dd17..1e4955266ad894fd75c8d0da8d30a2fe5c4e7c19 100644 (file)
@@ -1,13 +1,13 @@
 /***************************************************************************
-                          kdiskdialog.h  -  description
+                          kde_disc.h  -  description
                              -------------------
     begin                : Sat Apr 7 2001
     copyright            : (C) 2001 by andres
     email                : dae@chez.com
  ***************************************************************************/
 
-#ifndef KDISKDIALOG_H
-#define KDISKDIALOG_H
+#ifndef KDE_DISC_H
+#define KDE_DISC_H
 
 #include <kdialogbase.h>
 #include <qstring.h>
diff --git a/plugins/kde/kde_interface.cpp b/plugins/kde/kde_interface.cpp
new file mode 100644 (file)
index 0000000..177c8db
--- /dev/null
@@ -0,0 +1,424 @@
+/***************************************************************************
+                          kde_interface.cpp  -  description
+                             -------------------
+    begin                : Sun Mar 25 2001
+    copyright            : (C) 2001 by andres
+    email                : dae@chez.com
+ ***************************************************************************/
+
+#include "kde_disc.h"
+#include "kde_interface.h"
+#include "kde_net.h"
+#include "kde_menu.h"
+#include "kde_slider.h"
+
+#include <iostream.h>
+
+#include <kaction.h>
+#include <kfiledialog.h>
+#include <klocale.h>
+#include <kstdaction.h>
+#include <kurl.h>
+#include <kurldrag.h>
+#include <qcursor.h>
+#include <qdragobject.h>
+#include <qtimer.h>
+
+#define ID_STATUS_MSG       1
+#define ID_DATE             2
+#define ID_STREAM_SOURCE    3
+
+KInterface::KInterface( intf_thread_t *p_intf, QWidget *parent,
+        const char *name ) : KMainWindow(parent,name)
+{
+    setAcceptDrops(true);
+
+    this->p_intf = p_intf;
+
+    fDiskDialog = new KDiskDialog( this );
+    fNetDialog = new KNetDialog( this );
+    fTitleMenu = new KTitleMenu( p_intf, this );
+
+    fSlider = new KVLCSlider( QSlider::Horizontal, this );
+    connect( fSlider, SIGNAL( userChanged( int ) ), this, SLOT( slotSliderMoved( int ) ) );
+    connect( fSlider, SIGNAL( valueChanged( int ) ), this, SLOT( slotSliderChanged( int ) ) );
+    setCentralWidget(fSlider);
+
+    fTimer = new QTimer( this );
+    connect( fTimer, SIGNAL( timeout() ), this, SLOT( slotManage() ) );
+    fTimer->start( 100 );
+
+    resize( 400, 30 );
+
+    ///////////////////////////////////////////////////////////////////
+    // call inits to invoke all other construction parts
+    // XXX could we move this up ?
+    initStatusBar();
+    initActions();
+
+    // add certain calls to the popup menu
+    fileOpen->plug( fTitleMenu );
+    fileOpenRecent->plug( fTitleMenu );
+    diskOpen->plug( fTitleMenu );
+    streamOpen->plug( fTitleMenu );
+    play->plug( fTitleMenu );
+    pause->plug( fTitleMenu );
+    slow->plug( fTitleMenu );
+    fast->plug( fTitleMenu );
+    fileClose->plug( fTitleMenu );
+    fileQuit->plug( fTitleMenu );
+}
+
+KInterface::~KInterface()
+{
+    ;
+}
+
+void KInterface::initActions()
+{
+    fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
+    fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
+    fileClose = KStdAction::close(this, SLOT(slotFileClose()), actionCollection());
+    fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
+    viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
+    viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
+
+    diskOpen = new KAction( i18n( "Open &Disk" ), 0, 0, this, SLOT( slotOpenDisk() ), actionCollection(), "open_disk" );
+    streamOpen = new KAction( i18n( "Open &Stream" ), 0, 0, this, SLOT( slotOpenStream() ), actionCollection(), "open_stream" );
+    backward = new KAction( i18n( "&Backward" ), 0, 0, this, SLOT( slotBackward() ), actionCollection(), "backward" );
+    stop = new KAction( i18n( "&Stop" ), 0, 0, this, SLOT( slotStop() ), actionCollection(), "stop" );
+    play = new KAction( i18n( "&Play" ), 0, 0, this, SLOT( slotPlay() ), actionCollection(), "play" );
+    pause = new KAction( i18n( "P&ause" ), 0, 0, this, SLOT( slotPause() ), actionCollection(), "pause" );
+    slow = new KAction( i18n( "&Slow" ), 0, 0, this, SLOT( slotSlow() ), actionCollection(), "slow" );
+    fast = new KAction( i18n( "Fas&t" ), 0, 0, this, SLOT( slotFast() ), actionCollection(), "fast" );
+    prev = new KAction( i18n( "Prev" ), 0, 0, this, SLOT( slotPrev() ), actionCollection(), "prev" );
+    next = new KAction( i18n( "Next" ), 0, 0, this, SLOT( slotNext() ), actionCollection(), "next" );
+
+    fileOpen->setStatusText(i18n("Opens an existing document"));
+    fileOpenRecent->setStatusText(i18n("Opens a recently used file"));
+    fileClose->setStatusText(i18n("Closes the actual document"));
+    fileQuit->setStatusText(i18n("Quits the application"));
+    viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
+    viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
+
+    diskOpen->setStatusText( i18n( "Opens a disk") );
+    streamOpen->setStatusText( i18n( "Opens a network stream" ) );
+    backward->setStatusText( i18n( "Backward" ) );
+    stop->setStatusText( i18n( "Stops playback" ) );
+    play->setStatusText( i18n( "Starts playback" ) );
+    pause->setStatusText( i18n( "Pauses playback" ) );
+    slow->setStatusText( i18n( "Slow" ) );
+    fast->setStatusText( i18n( "Fast" ) );
+    prev->setStatusText( i18n( "Prev" ) );
+    next->setStatusText( i18n( "Next" ) );
+    // use the absolute path to your ktestui.rc file for testing purpose in createGUI();
+
+    createGUI("plugins/kde/kde_ui.rc");
+}
+
+void KInterface::initStatusBar()
+{
+  ///////////////////////////////////////////////////////////////////
+  // STATUSBAR
+  // TODO: add your own items you need for displaying current application status.
+    statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG, 1, false);
+    statusBar()->setItemAlignment( ID_STATUS_MSG, AlignLeft | AlignVCenter );
+    statusBar()->insertItem( "0:00:00", ID_DATE, 0, true );
+}
+
+/////////////////////////////////////////////////////////////////////
+// SLOT IMPLEMENTATION
+/////////////////////////////////////////////////////////////////////
+
+void KInterface::slotFileOpen()
+{
+    slotStatusMsg( i18n( "Opening file..." ) );
+    KURL url=KFileDialog::getOpenURL( QString::null,
+            i18n( "*|All files" ), this, i18n( "Open File..." ) );
+
+    if( !url.isEmpty() )
+    {
+        fileOpenRecent->addURL( url );
+        intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, url.path() );
+    }
+
+    slotStatusMsg( i18n( "Ready." ) );
+}
+
+void KInterface::slotFileOpenRecent(const KURL& url)
+{
+  slotStatusMsg(i18n("Opening file..."));
+  slotStatusMsg(i18n("Ready."));
+}
+
+void KInterface::slotFileClose()
+{
+  slotStatusMsg(i18n("Closing file..."));
+    
+  close();
+
+  slotStatusMsg(i18n("Ready."));
+}
+
+void KInterface::slotFileQuit()
+{
+    slotStatusMsg(i18n("Exiting..."));
+    p_intf->p_sys->p_app->quit();
+    slotStatusMsg(i18n("Ready."));
+}
+
+void KInterface::slotViewToolBar()
+{
+  slotStatusMsg(i18n("Toggling toolbar..."));
+  ///////////////////////////////////////////////////////////////////
+  // turn Toolbar on or off
+  if(!viewToolBar->isChecked())
+  {
+    toolBar("mainToolBar")->hide();
+  }
+  else
+  {
+    toolBar("mainToolBar")->show();
+  }        
+
+  slotStatusMsg(i18n("Ready."));
+}
+
+void KInterface::slotViewStatusBar()
+{
+  slotStatusMsg(i18n("Toggle the statusbar..."));
+  ///////////////////////////////////////////////////////////////////
+  //turn Statusbar on or off
+  if(!viewStatusBar->isChecked())
+  {
+    statusBar()->hide();
+  }
+  else
+  {
+    statusBar()->show();
+  }
+
+  slotStatusMsg(i18n("Ready."));
+}
+
+void KInterface::slotStatusMsg(const QString &text)
+{
+  ///////////////////////////////////////////////////////////////////
+  // change status message permanently
+  statusBar()->clear();
+  statusBar()->changeItem(text, ID_STATUS_MSG);
+}
+
+void KInterface::slotManage()
+{
+    vlc_mutex_lock( &p_intf->change_lock );
+
+    /* If the "display popup" flag has changed */
+    if( p_intf->b_menu_change )
+    {
+        fTitleMenu->popup( ( QCursor::pos() ) );
+        p_intf->b_menu_change = 0;
+    }
+
+    /* Update language/chapter menus after user request */
+#if 0
+    if( fInterface->p_input != NULL && p_intf->p_sys->p_window != NULL &&
+        p_intf->p_sys->b_menus_update )
+    {
+//        GnomeSetupMenu( p_intf );
+    }
+#endif
+
+    /* Manage the slider */
+    if( p_intf->p_input != NULL )
+    {
+#define p_area p_intf->p_input->stream.p_selected_area
+        fSlider->setValue( ( 100 * p_area->i_tell ) / p_area->i_size );
+#undef p_area
+    }
+
+    /* Manage core vlc functions through the callback */
+    p_intf->pf_manage(p_intf);
+
+    if( p_intf->b_die )
+    {
+        p_intf->p_sys->p_app->quit();
+    }
+
+    vlc_mutex_unlock( &p_intf->change_lock );
+}
+
+void KInterface::slotSliderMoved( int position )
+{
+// XXX is this locking really useful ?
+    vlc_mutex_lock( &p_intf->change_lock );
+
+    off_t i_seek = ( position * p_intf->p_input->stream.p_selected_area->i_size ) / 100;
+    input_Seek( p_intf->p_input, i_seek );
+
+    vlc_mutex_unlock( &p_intf->change_lock );
+}
+
+void KInterface::slotSliderChanged( int position )
+{
+    if( p_intf->p_input != NULL )
+    {
+        char psz_time[ OFFSETTOTIME_MAX_SIZE ];
+
+        vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
+
+#define p_area p_intf->p_input->stream.p_selected_area
+        statusBar()->changeItem( input_OffsetToTime( p_intf->p_input, psz_time, ( p_area->i_size * position ) / 100 ), ID_DATE );
+#undef p_area
+
+        vlc_mutex_unlock( &p_intf->p_input->stream.stream_lock );
+     }
+}
+
+void KInterface::slotOpenDisk()
+{
+    int r = fDiskDialog->exec();
+    if ( r )
+    {
+        // Build source name
+        QString source;
+        source += fDiskDialog->type();
+        source += ':';
+        source += fDiskDialog->device();
+
+        // Select title and chapter
+        main_PutIntVariable( INPUT_TITLE_VAR, fDiskDialog->title() );
+        main_PutIntVariable( INPUT_CHAPTER_VAR, fDiskDialog->chapter() );
+
+        // add it to playlist
+        intf_PlaylistAdd( p_main->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_intf->p_input != NULL )
+        {
+            p_intf->p_input->b_eof = 1;
+        }
+    }
+}
+
+void KInterface::slotOpenStream()
+{
+    int r = fNetDialog->exec();
+    if ( r )
+    {
+        // Build source name
+        QString source;
+        source += fNetDialog->protocol();
+        source += "://";
+        source += fNetDialog->server();
+        source += ":";
+        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 );
+
+        if( p_intf->p_input != NULL )
+        {
+            p_intf->p_input->b_eof = 1;
+        }
+    }
+}
+
+void KInterface::slotPlay()
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_PLAY );
+    }
+}
+
+void KInterface::slotPause()
+{
+    if ( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_PAUSE );
+    }
+}
+
+void KInterface::slotStop()
+{
+    if( p_intf->p_input != NULL )
+    {
+        /* end playing item */
+        p_intf->p_input->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 );
+    }
+}
+
+void KInterface::slotBackward()
+{
+    intf_ErrMsg( "KInterface::slotBackward() - Unimplemented" );
+}
+
+void KInterface::slotPrev()
+{
+    if( p_intf->p_input != NULL )
+    {
+        /* FIXME: temporary hack */
+        intf_PlaylistPrev( p_main->p_playlist );
+        intf_PlaylistPrev( p_main->p_playlist );
+        p_intf->p_input->b_eof = 1;
+    }
+}
+
+void KInterface::slotNext()
+{
+    if( p_intf->p_input != NULL )
+    {
+        /* FIXME: temporary hack */
+        p_intf->p_input->b_eof = 1;
+    }
+}
+
+void KInterface::slotSlow()
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_SLOWER );
+    }
+}
+
+void KInterface::slotFast()
+{
+    if( p_intf->p_input != NULL )
+    {
+        input_SetStatus( p_intf->p_input, INPUT_STATUS_FASTER );
+    }
+}
+
+void KInterface::dragEnterEvent( QDragEnterEvent *event )
+{
+    event->accept( QUriDrag::canDecode( event ) );
+}
+
+void KInterface::dropEvent( QDropEvent *event )
+{
+    KURL::List urlList;
+
+    if ( KURLDrag::decode( event, urlList ) ) {
+        for ( KURL::List::ConstIterator i = urlList.begin(); i != urlList.end(); i++ )
+        {
+            // XXX add a private function to add a KURL with checking
+            // actually a whole class for core abstraction would be neat
+            if( !(*i).isEmpty() )
+            {
+                fileOpenRecent->addURL( *i );
+                intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (*i).path() );
+            }
+        }
+    }
+}
diff --git a/plugins/kde/kde_interface.h b/plugins/kde/kde_interface.h
new file mode 100644 (file)
index 0000000..e6b5116
--- /dev/null
@@ -0,0 +1,146 @@
+/***************************************************************************
+                          kde_interface.h  -  description
+                             -------------------
+    begin                : Sun Mar 25 2001
+    copyright            : (C) 2001 by andres
+    email                : dae@chez.com
+ ***************************************************************************/
+
+#ifndef _KDE_INTERFACE_H_
+#define _KDE_INTERFACE_H_
+
+#include "kde_common.h"
+
+#include <kmainwindow.h>
+#include <kapplication.h>
+#include <kurl.h>
+#include <qdragobject.h>
+#include <qstring.h>
+#include <qwidget.h>
+
+class KThread;
+
+class KDiskDialog;
+class KNetDialog;
+class KRecentFilesAction;
+class KTitleMenu;
+class KToggleAction;
+class KVLCSlider;
+
+/**Main Window for the KDE vlc interface
+  *@author andres
+  */
+
+class KInterface : public KMainWindow
+{
+    Q_OBJECT
+    public:
+        KInterface(intf_thread_t *p_intf, QWidget *parent=0,
+                   const char *name=0);
+        ~KInterface();
+
+    public slots:
+        /** open a file and load it into the document*/
+        void slotFileOpen();
+        /** opens a file from the recent files menu */
+        void slotFileOpenRecent(const KURL& url);
+        /** asks for saving if the file is modified, then closes the actual file and window*/
+        void slotFileClose();
+        /** closes all open windows by calling close() on each memberList item until the list is empty, then quits the application.
+         * If queryClose() returns false because the user canceled the saveModified() dialog, the closing breaks.
+         */
+        void slotFileQuit();
+        /** toggles the toolbar
+         */
+        void slotViewToolBar();
+        /** toggles the statusbar
+         */
+        void slotViewStatusBar();
+        /** changes the statusbar contents for the standard label permanently, used to indicate current actions.
+         * @param text the text that is displayed in the statusbar
+         */
+        void slotStatusMsg( const QString &text );
+
+    protected:
+        /** initializes the KActions of the application */
+        void initActions();
+        /** sets up the statusbar for the main window by initialzing a statuslabel.
+         */
+        void initStatusBar();
+
+        virtual void dragEnterEvent( QDragEnterEvent *event );
+        virtual void dropEvent( QDropEvent *event );
+
+    private slots:
+        /** we use this to manage the communication with the vlc core */
+        void slotManage();
+
+        /** this slot is called when we drag the position seek bar */
+        void slotSliderMoved( int position );
+
+        /** called every time the slider changes values */
+        void slotSliderChanged( int position );
+
+        void slotOpenDisk();
+        void slotOpenStream();
+
+        void slotBackward();
+        void slotStop();
+        void slotPlay();
+        void slotPause();
+        void slotSlow();
+        void slotFast();
+        void slotPrev();
+        void slotNext();
+
+  private:
+
+        intf_thread_t    *p_intf;
+
+        /** to call p_intf->pf_manage every now and then */
+        QTimer            *fTimer;
+
+        /** slider which works well with user movement */
+        KVLCSlider    *fSlider;
+
+        /** open dvd/vcd */
+        KDiskDialog    *fDiskDialog;
+
+        /** open net stream */
+        KNetDialog        *fNetDialog;
+
+        KTitleMenu        *fTitleMenu;
+
+        // KAction pointers to enable/disable actions
+        KAction             *fileOpen;
+        KAction             *diskOpen;
+        KAction             *streamOpen;
+        KRecentFilesAction  *fileOpenRecent;
+        KAction             *fileClose;
+        KAction             *fileQuit;
+        KToggleAction       *viewToolBar;
+        KToggleAction       *viewStatusBar;
+        KAction             *backward;
+        KAction             *stop;
+        KAction             *play;
+        KAction             *pause;
+        KAction             *slow;
+        KAction             *fast;
+        KAction             *prev;
+        KAction             *next;
+};
+
+/*****************************************************************************
+ * intf_sys_t: description and status of KDE interface
+ *****************************************************************************/
+typedef 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
new file mode 100644 (file)
index 0000000..5503ae9
--- /dev/null
@@ -0,0 +1,81 @@
+/***************************************************************************
+                          kde_menu.cpp  -  description
+                             -------------------
+    begin                : Thu Apr 12 2001
+    copyright            : (C) 2001 by andres
+    email                : dae@chez.com
+ ***************************************************************************/
+
+#include "kde_menu.h"
+
+#include <kaction.h>
+#include <klocale.h>
+
+KTitleMenu::KTitleMenu( intf_thread_t *p_intf, QWidget *parent, const char *name ) : KPopupMenu( parent, name )
+{
+    fInterfaceThread = p_intf;
+    connect( this, SIGNAL( aboutToShow() ), this, SLOT( regenerateSlot() ) );
+    fLanguageList = new KActionMenu( "Language", 0, this );
+}
+
+KTitleMenu::~KTitleMenu()
+{
+}
+
+void KTitleMenu::regenerateSlot()
+{
+    // removal of elements and disconnection of signal/slots happen transparently on delete
+    delete fLanguageList;
+    fLanguageList = new KActionMenu( "Language", 0, this );
+
+    int i_item = 0;
+    vlc_mutex_lock( &fInterfaceThread->p_input->stream.stream_lock );
+
+    for( int i = 0 ; i < fInterfaceThread->p_input->stream.i_es_number ; i++ )
+    {
+        if( fInterfaceThread->p_input->stream.pp_es[i]->i_cat /* == i_cat */ )
+        {
+            i_item++;
+            QString language( fInterfaceThread->p_input->stream.pp_es[i]->psz_desc );
+            if ( QString::null == language )
+            {
+                language += i18n( "Language" );
+                language += " " + i_item;
+            }
+            KRadioAction *action = new KRadioAction( language, 0, this, "language_action" );
+            fLanguageList->insert( action );
+
+            if( /* p_es == */ fInterfaceThread->p_input->stream.pp_es[i] )
+            {
+                /* don't lose p_item when we append into menu */
+                //p_item_active = p_item;
+            }
+        }
+    }
+
+    vlc_mutex_unlock( &fInterfaceThread->p_input->stream.stream_lock );
+
+#if 0
+    /* link the new menu to the menubar item */
+    gtk_menu_item_set_submenu( GTK_MENU_ITEM( p_root ), p_menu );
+
+    /* acitvation will call signals so we can only do it
+     * when submenu is attached to menu - to get intf_window */
+    if( p_item_active != NULL )
+    {
+        gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
+                                        TRUE );
+    }
+#endif
+
+    /* be sure that menu is sensitive if non empty */
+    if ( i_item > 0 )
+    {
+        fLanguageList->setEnabled( true );
+    }
+}
+
+/** this method is called when the user selects a language */
+void KTitleMenu::languageSelectedSlot()
+{
+}
similarity index 82%
rename from plugins/kde/ktitlemenu.h
rename to plugins/kde/kde_menu.h
index 7a7e65436e34fd1625a749e5a208b562f85ef366..3037d9e72ed4847a3deb6c8d0255d7503af2fe0f 100644 (file)
@@ -1,16 +1,15 @@
 /***************************************************************************
-                          ktitlemenu.h  -  description
+                          kde_menu.h  -  description
                              -------------------
     begin                : Thu Apr 12 2001
     copyright            : (C) 2001 by andres
     email                : dae@chez.com
  ***************************************************************************/
 
-#ifndef _KTITLEMENU_H_
-#define _KTITLEMENU_H_
+#ifndef _KDE_MENU_H_
+#define _KDE_MENU_H_
 
-#define MODULE_NAME kde
-#include "intf_plugin.h"
+#include "kde_common.h"
 
 #include <qwidget.h>
 #include <kpopupmenu.h>
@@ -40,4 +39,4 @@ private slots: // Private slots
 
 };
 
-#endif /* _KTITLEMENU_H_ */
+#endif /* _KDE_MENU_H_ */
similarity index 95%
rename from plugins/kde/knetdialog.cpp
rename to plugins/kde/kde_net.cpp
index 5407e388fb858b362e269b74da870f9f00543164..d348ac6193b61c7d7e4c7d63392f2179681c2a02 100644 (file)
@@ -1,12 +1,12 @@
 /***************************************************************************
-                          knetdialog.cpp  -  description
+                          kde_net.cpp  -  description
                              -------------------
     begin                : Mon Apr 9 2001
     copyright            : (C) 2001 by andres
     email                : dae@chez.com
  ***************************************************************************/
 
-#include "knetdialog.h"
+#include "kde_net.h"
 
 #include <kdialogbase.h>
 #include <klineedit.h>
similarity index 87%
rename from plugins/kde/knetdialog.h
rename to plugins/kde/kde_net.h
index cbf5fede8918594d1ed9ca5b737d04c2694e34fc..954b38725126bdb058fa6d44aa23bf76ddd0ea43 100644 (file)
@@ -1,13 +1,13 @@
 /***************************************************************************
-                          knetdialog.h  -  description
+                          kde_net.h  -  description
                              -------------------
     begin                : Mon Apr 9 2001
     copyright            : (C) 2001 by andres
     email                : dae@chez.com
  ***************************************************************************/
 
-#ifndef _KNETDIALOG_H_
-#define _KNETDIALOG_H_
+#ifndef _KDE_NET_H_
+#define _KDE_NET_H_
 
 #include <qwidget.h>
 #include <kdialogbase.h>
@@ -41,4 +41,4 @@ class KNetDialog : public KDialogBase  {
 
 };
 
-#endif /* _KNETDIALOG_H_ */
+#endif /* _KDE_NET_H_ */
similarity index 57%
rename from plugins/kde/kvlcslider.cpp
rename to plugins/kde/kde_slider.cpp
index 75dd39a3bd4df27c675405aa13e1174c396374b5..33bc6166aedbf7c005f37b8eee773d0df391dced 100644 (file)
@@ -1,52 +1,52 @@
 /***************************************************************************
-                          kinterfacemain.cpp  -  description
+                          kde_slider.cpp  -  description
                              -------------------
     begin                : Sun Mar 25 2001
     copyright            : (C) 2001 by andres
     email                : dae@chez.com
  ***************************************************************************/
 /***************************************************************************
-       shamelessly copied from noatun's excellent interface
+    shamelessly copied from noatun's excellent interface
 ****************************************************************************/
 
-#include "kvlcslider.h"
+#include "kde_slider.h"
 
 KVLCSlider::KVLCSlider(QWidget * parent, const char * name) :
-       QSlider(parent,name), pressed(false)
+    QSlider(parent,name), pressed(false)
 {
 }
 
 KVLCSlider::KVLCSlider(Orientation o, QWidget * parent, const char * name) :
-       QSlider(o,parent,name), pressed(false)
+    QSlider(o,parent,name), pressed(false)
 {
 }
 
 KVLCSlider::KVLCSlider(int minValue, int maxValue, int pageStep, int value,
-                          Orientation o, QWidget * parent, const char * name) :
-       QSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false)
+                       Orientation o, QWidget * parent, const char * name) :
+    QSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false)
 {
 }
 
 void KVLCSlider::setValue(int i)
 {
-       if ( !pressed )
-       {
-               QSlider::setValue( i );
-       }
+    if ( !pressed )
+    {
+        QSlider::setValue( i );
+    }
 }
 
 void KVLCSlider::mousePressEvent( QMouseEvent *e )
 {
-       if ( e->button() != RightButton )
-       {
-               pressed=true;
-               QSlider::mousePressEvent( e );
-       }
+    if ( e->button() != RightButton )
+    {
+        pressed=true;
+        QSlider::mousePressEvent( e );
+    }
 }
 
 void KVLCSlider::mouseReleaseEvent( QMouseEvent *e )
 {
-       pressed=false;
-       QSlider::mouseReleaseEvent( e );
-       emit userChanged( value() );
+    pressed=false;
+    QSlider::mouseReleaseEvent( e );
+    emit userChanged( value() );
 }
similarity index 91%
rename from plugins/kde/kvlcslider.h
rename to plugins/kde/kde_slider.h
index 1caedc2c1ab7042e102280c834d36b2060120eae..98b090474b0cff465dcd9893f64d2f8fbe9fc44c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
-                          kvlcslider.h  -  description
+                          kde_slider.h  -  description
                              -------------------
     begin                : Sun Apr 03 2001
     copyright            : (C) 2001 by andres
@@ -8,8 +8,8 @@
 /***************************************************************************
        shamelessly copied from noatun's excellent interface
 ****************************************************************************/
-#ifndef _KVLCSLIDER_H_
-#define _KVLCSLIDER_H_
+#ifndef _KDE_SLIDER_H_
+#define _KDE_SLIDER_H_
 
 #include <qslider.h>
 
@@ -42,4 +42,4 @@ class KVLCSlider : public QSlider
                bool pressed; // set this to true when the user drags the slider
 };
 
-#endif /* _KVLCSLIDER_H_ */
+#endif /* _KDE_SLIDER_H_ */
diff --git a/plugins/kde/kde_ui.rc b/plugins/kde/kde_ui.rc
new file mode 100644 (file)
index 0000000..8f0d817
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE kpartgui>
+<kpartgui name="kvlc" version="0.1">
+
+<ActionProperties>
+  <Action name="open_disk" icon="cdrom_unmount"/>
+  <Action name="open_stream" icon="network"/>
+  <Action name="backward" icon="back"/>
+  <Action name="stop" icon="stop"/>
+  <Action name="play" icon="forward"/>
+  <Action name="pause" icon = "bottom"/>
+  <Action name="slow" icon="undo"/>
+  <Action name="fast" icon="redo"/>
+  <Action name="prev" icon="start"/>
+  <Action name="next" icon="finish"/>
+</ActionProperties>
+
+<MenuBar>
+  <Menu name="file" noMerge="1">
+    <text>&amp;File</text>
+    <Action name="file_open"/>
+    <Action name="file_open_recent"/>
+    <Action name="open_disk"/>
+    <Action name="open_stream"/>
+    <Separator lineSeparator="true"/>
+    <Action name="file_quit"/>
+  </Menu>
+</MenuBar>
+
+<ToolBar name="mainToolBar" iconText="icononly" iconSize="16" noMerge="1">
+  <Action name="file_open"/>
+  <Action name="open_disk"/>
+  <Action name="open_stream"/>
+  <Separator lineSeparator="true"/>
+  <Action name="backward"/>
+  <Action name="stop"/>
+  <Action name="play"/>
+  <Action name="pause"/>
+  <Action name="slow"/>
+  <Action name="fast"/>
+  <Separator lineSeparator="true"/>
+  <Action name="prev"/>
+  <Action name="next"/>
+</ToolBar> 
+
+</kpartgui>
diff --git a/plugins/kde/kdeinterface.cpp b/plugins/kde/kdeinterface.cpp
deleted file mode 100644 (file)
index 7fdba18..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/***************************************************************************
-                          kdeinterface.cpp  -  description
-                             -------------------
-    begin                : Sun Mar 25 2001
-    copyright            : (C) 2001 by andres
-    email                : dae@chez.com
- ***************************************************************************/
-
-#define MODULE_NAME kde
-#include "intf_plugin.h"
-
-#include "kdeinterface.h"
-#include "kinterfacemain.h"
-
-#include <iostream>
-
-#include <kaction.h>
-#include <kapp.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <klocale.h>
-#include <kmainwindow.h>
-#include <kstdaction.h>
-#include <qwidget.h>
-
-/*****************************************************************************
- * Functions exported as capabilities.
- *****************************************************************************/
-extern "C"
-{
-
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = KDEInterface::probe;
-    p_function_list->functions.intf.pf_open  = KDEInterface::open;
-    p_function_list->functions.intf.pf_close = KDEInterface::close;
-    p_function_list->functions.intf.pf_run   = KDEInterface::run;
-}
-
-}
-
-/*****************************************************************************
- * KDEInterface::KDEInterface: KDE interface constructor
- *****************************************************************************/
-KDEInterface::KDEInterface(intf_thread_t *p_intf)
-{
-       fAboutData = new KAboutData("VideoLAN Client", I18N_NOOP("Kvlc"),
-                       VLC_VERSION,
-                       "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.", KAboutData::License_GPL,
-                       "(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team", 0, 0, "dae@chez.com");
-
-       char *authors[][2] = {
-               { "Régis Duchesne", "<regis@via.ecp.fr>" },
-               { "Michel Lespinasse", "<walken@zoy.org>" },
-               { "Olivier Pomel", "<pomel@via.ecp.fr>" },
-               { "Pierre Baillet", "<oct@zoy.org>" },
-               { "Jean-Philippe Grimaldi", "<jeanphi@via.ecp.fr>" },
-               { "Andres Krapf", "<dae@via.ecp.fr>" },
-               { "Christophe Massiot", "<massiot@via.ecp.fr>" },
-               { "Vincent Seguin", "<seguin@via.ecp.fr>" },
-               { "Benoit Steiner", "<benny@via.ecp.fr>" },
-               { "Arnaud de Bossoreille de Ribou", "<bozo@via.ecp.fr>" },
-               { "Jean-Marc Dressler", "<polux@via.ecp.fr>" },
-               { "Gaël Hendryckx", "<jimmy@via.ecp.fr>" },
-               { "Samuel Hocevar","<sam@zoy.org>" },
-               { "Brieuc Jeunhomme", "<bbp@via.ecp.fr>" },
-               { "Michel Kaempf", "<maxx@via.ecp.fr>" },
-               { "Stéphane Borel", "<stef@via.ecp.fr>" },
-               { "Renaud Dartus", "<reno@via.ecp.fr>" },
-               { "Henri Fallon", "<henri@via.ecp.fr>" },
-               { NULL, NULL },
-       };
-
-       for ( int i = 0; NULL != authors[i][0]; i++ ) {
-               fAboutData->addAuthor( authors[i][0], 0, authors[i][1] );
-       }
-
-       int argc = 1;
-       char *argv[] = { "" };
-       KCmdLineArgs::init( argc, argv, fAboutData );
-
-       fApplication = new KApplication();
-       fWindow = new KInterfaceMain(p_intf);
-   fWindow->setCaption( VOUT_TITLE " (KDE interface)" );
-
-}
-
-/*****************************************************************************
- * KDEInterface::~KDEInterface: KDE interface destructor
- *****************************************************************************/
-KDEInterface::~KDEInterface()
-{
-cerr << "entering ~KDEInterface()\n";
-//     delete ( fApplication );
-cerr << "leaving ~KDEInterface()\n";
-}
-
-/*****************************************************************************
- * KDEInterface::probe: probe the interface and return a score
- *****************************************************************************
- * This function tries to initialize KDE and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-int KDEInterface::probe(probedata_t *p_data )
-{
-       if ( TestMethod( INTF_METHOD_VAR, "kde" ) )
-       {
-               return ( 999 );
-       }
-       
-       if ( TestProgram( "kvlc" ) )
-       {
-               return ( 180 );
-       }
-       
-       return ( 80 );
-}
-
-/*****************************************************************************
- * KDEInterface::open: initialize and create window
- *****************************************************************************/
-int KDEInterface::open(intf_thread_t *p_intf)
-{
-       p_intf->p_sys = (intf_sys_s*) new KDEInterface(p_intf); // XXX static_cast ?
-    return ( 0 );
-}
-
-/*****************************************************************************
- * KDEInterface::close: destroy interface window
- *****************************************************************************/
-void KDEInterface::close(intf_thread_t *p_intf)
-{
-//     delete ( ( KDEInterface* ) p_intf->p_sys );
-}
-
-/*****************************************************************************
- * KDEInterface::run: KDE thread
- *****************************************************************************
- * This part of the interface is in a separate thread so that we can call
- * exec() from within it without annoying the rest of the program.
- *****************************************************************************/
-void KDEInterface::run(intf_thread_t *p_intf)
-{
-       // XXX static_cast ?
-       KDEInterface *kdeInterface = (KDEInterface*) p_intf->p_sys;
-       kdeInterface->fWindow->show();
-       kdeInterface->fApplication->exec();
-}
diff --git a/plugins/kde/kdeinterface.h b/plugins/kde/kdeinterface.h
deleted file mode 100644 (file)
index 1fcd2ad..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/***************************************************************************
-                          kdeinterface.h  -  description
-                             -------------------
-    begin                : Sun Mar 25 2001
-    copyright            : (C) 2001 by andres
-    email                : dae@chez.com
- ***************************************************************************/
-
-#ifndef        _KDEINTERFACE_H_
-#define        _KDEINTERFACE_H_
-
-class KApplication;
-class KInterfaceMain;
-class KAboutData;
-
-class KDEInterface
-{
-       private:
-               KDEInterface ( KDEInterface &kdeInterface ) {};
-               KDEInterface &operator= ( KDEInterface &kdeInterface ) { return ( *this ); };
-               
-       public:
-               KDEInterface(intf_thread_t *p_intf);
-               ~KDEInterface();
-
-               // These methods get exported to the core
-               static int              probe   ( probedata_t *p_data );
-               static int              open    ( intf_thread_t *p_intf );
-               static void     close   ( intf_thread_t *p_intf );
-               static void     run             ( intf_thread_t *p_intf );
-       
-       private:
-               KApplication            *fApplication;
-               KInterfaceMain  *fWindow;
-               KAboutData              *fAboutData;
-
-};
-
-#endif /* _KDEINTERFACE_H_ */
diff --git a/plugins/kde/kinterfacemain.cpp b/plugins/kde/kinterfacemain.cpp
deleted file mode 100644 (file)
index 30462ff..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/***************************************************************************
-                          kinterfacemain.cpp  -  description
-                             -------------------
-    begin                : Sun Mar 25 2001
-    copyright            : (C) 2001 by andres
-    email                : dae@chez.com
- ***************************************************************************/
-
-#include "kdiskdialog.h"
-#include "kinterfacemain.h"
-#include "knetdialog.h"
-#include "ktitlemenu.h"
-#include "kvlcslider.h"
-
-#include <iostream>
-
-#include <kaction.h>
-#include <kfiledialog.h>
-#include <klocale.h>
-#include <kstdaction.h>
-#include <kurl.h>
-#include <kurldrag.h>
-#include <qcursor.h>
-#include <qdragobject.h>
-#include <qtimer.h>
-
-#define ID_STATUS_MSG                  1
-#define ID_DATE                                                        2
-#define ID_STREAM_SOURCE       3
-
-KInterfaceMain::KInterfaceMain( intf_thread_t *p_intf, QWidget *parent,
-               const char *name ) : KMainWindow(parent,name)
-{
-       setAcceptDrops(true);
-
-       fInterfaceThread = p_intf;
-
-       fDiskDialog = new KDiskDialog( this );
-       fNetDialog = new KNetDialog( this );
-       fTitleMenu = new KTitleMenu( fInterfaceThread, this );
-
-       fSlider = new KVLCSlider( QSlider::Horizontal, this );
-       connect( fSlider, SIGNAL( userChanged( int ) ), this, SLOT( slotSliderMoved( int ) ) );
-       connect( fSlider, SIGNAL( valueChanged( int ) ), this, SLOT( slotSliderChanged( int ) ) );
-   setCentralWidget(fSlider);
-
-       fTimer = new QTimer( this );
-       connect( fTimer, SIGNAL( timeout() ), this, SLOT( slotManage() ) );
-       fTimer->start( 100 );
-
-       resize( 400, 30 );
-
-  ///////////////////////////////////////////////////////////////////
-  // call inits to invoke all other construction parts
-       // XXX could we move this up ?
-  initStatusBar();
-  initActions();
-
-       // add certain calls to the popup menu
-       fileOpen->plug( fTitleMenu );
-       fileOpenRecent->plug( fTitleMenu );
-       diskOpen->plug( fTitleMenu );
-       streamOpen->plug( fTitleMenu );
-       play->plug( fTitleMenu );
-       pause->plug( fTitleMenu );
-       slow->plug( fTitleMenu );
-       fast->plug( fTitleMenu );
-       fileClose->plug( fTitleMenu );
-       fileQuit->plug( fTitleMenu );
-}
-
-KInterfaceMain::~KInterfaceMain()
-{
-}
-
-void KInterfaceMain::initActions()
-{
-       fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
-       fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
-       fileClose = KStdAction::close(this, SLOT(slotFileClose()), actionCollection());
-       fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
-       viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
-       viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
-
-       diskOpen = new KAction( i18n( "Open &Disk" ), 0, 0, this, SLOT( slotOpenDisk() ), actionCollection(), "open_disk" );
-       streamOpen = new KAction( i18n( "Open &Stream" ), 0, 0, this, SLOT( slotOpenStream() ), actionCollection(), "open_stream" );
-       play = new KAction( i18n( "&Play" ), 0, 0, this, SLOT( slotPlay() ), actionCollection(), "play" );
-       pause = new KAction( i18n( "P&ause" ), 0, 0, this, SLOT( slotPause() ), actionCollection(), "pause" );
-       stop = new KAction( i18n( "&Stop" ), 0, 0, this, SLOT( slotStop() ), actionCollection(), "stop" );
-       backward = new KAction( i18n( "&Backward" ), 0, 0, this, SLOT( slotBackward() ), actionCollection(), "backward" );
-       forward = new KAction( i18n( "&Forward" ), 0, 0, this, SLOT( slotForward() ), actionCollection(), "forward" );
-       slow = new KAction( i18n( "&Slow" ), 0, 0, this, SLOT( slotSlow() ), actionCollection(), "slow" );
-       fast = new KAction( i18n( "Fas&t" ), 0, 0, this, SLOT( slotFast() ), actionCollection(), "fast" );
-
-       fileOpen->setStatusText(i18n("Opens an existing document"));
-       fileOpenRecent->setStatusText(i18n("Opens a recently used file"));
-       fileClose->setStatusText(i18n("Closes the actual document"));
-       fileQuit->setStatusText(i18n("Quits the application"));
-       viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
-       viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
-
-       diskOpen->setStatusText( i18n( "Opens a disk") );
-       streamOpen->setStatusText( i18n( "Opens a network stream" ) );
-       play->setStatusText( i18n( "Starts playback" ) );
-       pause->setStatusText( i18n( "Pauses playback" ) );
-       stop->setStatusText( i18n( "Stops playback" ) );
-       backward->setStatusText( i18n( "Backward" ) );
-       forward->setStatusText( i18n( "Forward" ) );
-       slow->setStatusText( i18n( "Slow" ) );
-       fast->setStatusText( i18n( "Fast" ) );
-       // use the absolute path to your ktestui.rc file for testing purpose in createGUI();
-
-       createGUI("plugins/kde/kvlcui.rc");
-}
-
-void KInterfaceMain::initStatusBar()
-{
-  ///////////////////////////////////////////////////////////////////
-  // STATUSBAR
-  // TODO: add your own items you need for displaying current application status.
-       statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG, 1, false);
-       statusBar()->setItemAlignment( ID_STATUS_MSG, AlignLeft | AlignVCenter );
-       statusBar()->insertItem( "0:00:00", ID_DATE, 0, true );
-}
-
-/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
-/////////////////////////////////////////////////////////////////////
-
-void KInterfaceMain::slotFileOpen()
-{
-       slotStatusMsg( i18n( "Opening file..." ) );
-       KURL url=KFileDialog::getOpenURL( QString::null,
-                       i18n( "*|All files" ), this, i18n( "Open File..." ) );
-
-       if( !url.isEmpty() )
-       {
-               fileOpenRecent->addURL( url );
-               intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, url.path() );
-       }
-
-       slotStatusMsg( i18n( "Ready." ) );
-}
-
-void KInterfaceMain::slotFileOpenRecent(const KURL& url)
-{
-  slotStatusMsg(i18n("Opening file..."));
-  slotStatusMsg(i18n("Ready."));
-}
-
-void KInterfaceMain::slotFileClose()
-{
-  slotStatusMsg(i18n("Closing file..."));
-       
-  close();
-
-  slotStatusMsg(i18n("Ready."));
-}
-
-void KInterfaceMain::slotFileQuit()
-{
-       slotStatusMsg(i18n("Exiting..."));
-       slotStatusMsg(i18n("Ready."));
-}
-
-void KInterfaceMain::slotViewToolBar()
-{
-  slotStatusMsg(i18n("Toggling toolbar..."));
-  ///////////////////////////////////////////////////////////////////
-  // turn Toolbar on or off
-  if(!viewToolBar->isChecked())
-  {
-    toolBar("mainToolBar")->hide();
-  }
-  else
-  {
-    toolBar("mainToolBar")->show();
-  }            
-
-  slotStatusMsg(i18n("Ready."));
-}
-
-void KInterfaceMain::slotViewStatusBar()
-{
-  slotStatusMsg(i18n("Toggle the statusbar..."));
-  ///////////////////////////////////////////////////////////////////
-  //turn Statusbar on or off
-  if(!viewStatusBar->isChecked())
-  {
-    statusBar()->hide();
-  }
-  else
-  {
-    statusBar()->show();
-  }
-
-  slotStatusMsg(i18n("Ready."));
-}
-
-void KInterfaceMain::slotStatusMsg(const QString &text)
-{
-  ///////////////////////////////////////////////////////////////////
-  // change status message permanently
-  statusBar()->clear();
-  statusBar()->changeItem(text, ID_STATUS_MSG);
-}
-
-void KInterfaceMain::slotManage()
-{
-       vlc_mutex_lock( &fInterfaceThread->change_lock );
-
-    /* If the "display popup" flag has changed */
-       if( fInterfaceThread->b_menu_change )
-       {
-               fTitleMenu->popup( ( QCursor::pos() ) );
-               fInterfaceThread->b_menu_change = 0;
-       }
-
-    /* Update language/chapter menus after user request */
-//    if( fInterface->p_input != NULL && p_intf->p_sys->p_window != NULL &&
-//        p_intf->p_sys->b_menus_update )
-//    {
-////        GnomeSetupMenu( p_intf );
-//    }
-
-    /* Manage the slider */
-       if( fInterfaceThread->p_input != NULL )
-       {
-#define p_area fInterfaceThread->p_input->stream.p_selected_area
-               fSlider->setValue( ( 100 * p_area->i_tell ) / p_area->i_size );
-#undef p_area
-    }
-
-       /* Manage core vlc functions through the callback */
-       fInterfaceThread->pf_manage(fInterfaceThread);
-
-       if( fInterfaceThread->b_die )
-       {
-               cerr << "we shoud die\n";
-       }
-
-       vlc_mutex_unlock( &fInterfaceThread->change_lock );
-}
-
-void KInterfaceMain::slotSliderMoved( int position )
-{
-// XXX is this locking really useful ?
-       vlc_mutex_lock( &fInterfaceThread->change_lock );
-
-       off_t i_seek = ( position * fInterfaceThread->p_input->stream.p_selected_area->i_size ) / 100;
-       input_Seek( fInterfaceThread->p_input, i_seek );
-
-       vlc_mutex_unlock( &fInterfaceThread->change_lock );
-}
-
-void KInterfaceMain::slotSliderChanged( int position )
-{
-               if( fInterfaceThread->p_input != NULL )
-               {
-               char psz_time[ OFFSETTOTIME_MAX_SIZE ];
-
-               vlc_mutex_lock( &fInterfaceThread->p_input->stream.stream_lock );
-
-#define p_area fInterfaceThread->p_input->stream.p_selected_area
-               statusBar()->changeItem( input_OffsetToTime( fInterfaceThread->p_input, psz_time, ( p_area->i_size * position ) / 100 ), ID_DATE );
-#undef p_area
-
-        vlc_mutex_unlock( &fInterfaceThread->p_input->stream.stream_lock );
-     }
-}
-
-void KInterfaceMain::slotOpenDisk()
-{
-       int r = fDiskDialog->exec();
-       if ( r )
-       {
-               // Build source name
-               QString source;
-               source += fDiskDialog->type();
-               source += ':';
-               source += fDiskDialog->device();
-
-               // Select title and chapter
-               main_PutIntVariable( INPUT_TITLE_VAR, fDiskDialog->title() );
-               main_PutIntVariable( INPUT_CHAPTER_VAR, fDiskDialog->chapter() );
-
-               // add it to playlist
-               intf_PlaylistAdd( p_main->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( fInterfaceThread->p_input != NULL )
-               {
-                       fInterfaceThread->p_input->b_eof = 1;
-               }
-       }
-}
-
-void KInterfaceMain::slotOpenStream()
-{
-       int r = fNetDialog->exec();
-       if ( r )
-       {
-               // Build source name
-               QString source;
-               source += fNetDialog->protocol();
-               source += "://";
-               source += fNetDialog->server();
-               source += ":";
-               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 );
-
-               if( fInterfaceThread->p_input != NULL )
-               {
-                       fInterfaceThread->p_input->b_eof = 1;
-               }
-       }
-}
-
-void KInterfaceMain::slotPlay()
-{
-       if( fInterfaceThread->p_input != NULL )
-       {
-               input_SetStatus( fInterfaceThread->p_input, INPUT_STATUS_PLAY );
-       }
-}
-
-void KInterfaceMain::slotPause()
-{
-       if ( fInterfaceThread->p_input != NULL )
-       {
-               input_SetStatus( fInterfaceThread->p_input, INPUT_STATUS_PAUSE );
-       }
-}
-
-void KInterfaceMain::slotStop()
-{
-       cerr << "KInterfaceMain::slotStop() - Unimplemented\n";
-}
-
-void KInterfaceMain::slotBackward()
-{
-    if( fInterfaceThread->p_input != NULL )
-    {
-        /* FIXME: temporary hack */
-        intf_PlaylistPrev( p_main->p_playlist );
-        intf_PlaylistPrev( p_main->p_playlist );
-        fInterfaceThread->p_input->b_eof = 1;
-    }
-}
-
-void KInterfaceMain::slotForward()
-{
-       if( fInterfaceThread->p_input != NULL )
-       {
-               /* FIXME: temporary hack */
-               fInterfaceThread->p_input->b_eof = 1;
-       }
-}
-
-void KInterfaceMain::slotSlow()
-{
-       if( fInterfaceThread->p_input != NULL )
-       {
-               input_SetStatus( fInterfaceThread->p_input, INPUT_STATUS_SLOWER );
-       }
-}
-
-void KInterfaceMain::slotFast()
-{
-       if( fInterfaceThread->p_input != NULL )
-       {
-               input_SetStatus( fInterfaceThread->p_input, INPUT_STATUS_FASTER );
-       }
-}
-
-void KInterfaceMain::dragEnterEvent( QDragEnterEvent *event )
-{
-       event->accept( QUriDrag::canDecode( event ) );
-}
-
-void KInterfaceMain::dropEvent( QDropEvent *event )
-{
-       KURL::List urlList;
-
-       if ( KURLDrag::decode( event, urlList ) ) {
-               for ( KURL::List::ConstIterator i = urlList.begin(); i != urlList.end(); i++ )
-               {
-                       // XXX add a private function to add a KURL with checking
-                       // actually a whole class for core abstraction would be neat
-                       if( !(*i).isEmpty() )
-                       {
-                               fileOpenRecent->addURL( *i );
-                               intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (*i).path() );
-                       }
-               }
-       }
-}
diff --git a/plugins/kde/kinterfacemain.h b/plugins/kde/kinterfacemain.h
deleted file mode 100644 (file)
index 6be6021..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/***************************************************************************
-                          kinterfacemain.h  -  description
-                             -------------------
-    begin                : Sun Mar 25 2001
-    copyright            : (C) 2001 by andres
-    email                : dae@chez.com
- ***************************************************************************/
-
-#ifndef _KINTERFACEMAIN_H_
-#define _KINTERFACEMAIN_H_
-
-#define MODULE_NAME kde
-#include "intf_plugin.h"
-
-#include <kmainwindow.h>
-#include <kurl.h>
-#include <qdragobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-
-class KDiskDialog;
-class KNetDialog;
-class KRecentFilesAction;
-class KTitleMenu;
-class KToggleAction;
-class KVLCSlider;
-
-/**Main Window for the KDE vlc interface
-  *@author andres
-  */
-
-class KInterfaceMain : public KMainWindow  {
-               Q_OBJECT
-       public:
-               KInterfaceMain(intf_thread_t *p_intf, QWidget *parent=0,
-                               const char *name=0);
-               ~KInterfaceMain();
-
-  public slots:
-    /** open a file and load it into the document*/
-    void slotFileOpen();
-    /** opens a file from the recent files menu */
-    void slotFileOpenRecent(const KURL& url);
-    /** asks for saving if the file is modified, then closes the actual file and window*/
-    void slotFileClose();
-    /** closes all open windows by calling close() on each memberList item until the list is empty, then quits the application.
-     * If queryClose() returns false because the user canceled the saveModified() dialog, the closing breaks.
-     */
-    void slotFileQuit();
-    /** toggles the toolbar
-     */
-    void slotViewToolBar();
-    /** toggles the statusbar
-     */
-    void slotViewStatusBar();
-    /** changes the statusbar contents for the standard label permanently, used to indicate current actions.
-     * @param text the text that is displayed in the statusbar
-     */
-    void slotStatusMsg( const QString &text );
-
-       protected:
-               /** initializes the KActions of the application */
-               void initActions();
-               /** sets up the statusbar for the main window by initialzing a statuslabel.
-                */
-               void initStatusBar();
-
-               virtual void dragEnterEvent( QDragEnterEvent *event );
-               virtual void dropEvent( QDropEvent *event );
-
-       private slots:
-               /** we use this to manage the communication with the vlc core */
-               void slotManage();
-
-               /** this slot is called when we drag the position seek bar */
-               void slotSliderMoved( int position );
-
-               /** called every time the slider changes values */
-               void slotSliderChanged( int position );
-
-               void slotOpenDisk();
-               void slotOpenStream();
-
-               void slotPlay();
-               void slotPause();
-               void slotStop();
-               void slotBackward();
-               void slotForward();
-               void slotSlow();
-               void slotFast();
-
-  private:
-
-               intf_thread_t   *fInterfaceThread;
-
-               /** to call p_intf->pf_manage every now and then */
-               QTimer                  *fTimer;
-
-               /** slider which works well with user movement */
-               KVLCSlider      *fSlider;
-
-               /** open dvd/vcd */
-               KDiskDialog     *fDiskDialog;
-
-               /** open net stream */
-               KNetDialog              *fNetDialog;
-
-               KTitleMenu              *fTitleMenu;
-
-               // KAction pointers to enable/disable actions
-               KAction                                         *fileOpen;
-               KAction                                         *diskOpen;
-               KAction                                         *streamOpen;
-               KRecentFilesAction              *fileOpenRecent;
-               KAction                                         *fileClose;
-               KAction                                         *fileQuit;
-               KToggleAction                           *viewToolBar;
-               KToggleAction                           *viewStatusBar;
-               KAction                                         *play;
-               KAction                                         *pause;
-               KAction                                         *stop;
-               KAction                                         *backward;
-               KAction                                         *forward;
-               KAction                                         *slow;
-               KAction                                         *fast;
-
-};
-
-#endif /* _KINTERFACEMAIN_H_ */
diff --git a/plugins/kde/ktitlemenu.cpp b/plugins/kde/ktitlemenu.cpp
deleted file mode 100644 (file)
index 4361537..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/***************************************************************************
-                          ktitlemenu.cpp  -  description
-                             -------------------
-    begin                : Thu Apr 12 2001
-    copyright            : (C) 2001 by andres
-    email                : dae@chez.com
- ***************************************************************************/
-
-#include "ktitlemenu.h"
-
-#include <kaction.h>
-#include <klocale.h>
-
-KTitleMenu::KTitleMenu( intf_thread_t *p_intf, QWidget *parent, const char *name ) : KPopupMenu( parent, name )
-{
-       fInterfaceThread = p_intf;
-       connect( this, SIGNAL( aboutToShow() ), this, SLOT( regenerateSlot() ) );
-       fLanguageList = new KActionMenu( "Language", 0, this );
-}
-
-KTitleMenu::~KTitleMenu()
-{
-}
-
-void KTitleMenu::regenerateSlot()
-{
-       // removal of elements and disconnection of signal/slots happen transparently on delete
-       delete fLanguageList;
-       fLanguageList = new KActionMenu( "Language", 0, this );
-
-       int i_item = 0;
-       vlc_mutex_lock( &fInterfaceThread->p_input->stream.stream_lock );
-
-       for( int i = 0 ; i < fInterfaceThread->p_input->stream.i_es_number ; i++ )
-       {
-               if( fInterfaceThread->p_input->stream.pp_es[i]->i_cat /* == i_cat */ )
-               {
-                       i_item++;
-                       QString language( fInterfaceThread->p_input->stream.pp_es[i]->psz_desc );
-                       if ( QString::null == language )
-                       {
-                               language += i18n( "Language" );
-                               language += " " + i_item;
-                       }
-                       KRadioAction *action = new KRadioAction( language, 0, this, "language_action" );
-                       fLanguageList->insert( action );
-
-                       if( /* p_es == */ fInterfaceThread->p_input->stream.pp_es[i] )
-                       {
-                               /* don't lose p_item when we append into menu */
-                               //p_item_active = p_item;
-                       }
-               }
-       }
-
-    vlc_mutex_unlock( &fInterfaceThread->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 );
-//
-//    /* acitvation will call signals so we can only do it
-//     * when submenu is attached to menu - to get intf_window */
-//    if( p_item_active != NULL )
-//    {
-//        gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( p_item_active ),
-//                                        TRUE );
-//    }
-
-    /* be sure that menu is sensitive if non empty */
-       if ( i_item > 0 )
-       {
-               fLanguageList->setEnabled( true );
-       }
-}
-
-/** this method is called when the user selects a language */
-void KTitleMenu::languageSelectedSlot()
-{
-}
diff --git a/plugins/kde/kvlcui.rc b/plugins/kde/kvlcui.rc
deleted file mode 100644 (file)
index 507ea83..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE kpartgui>
-<kpartgui name="kvlc" version="0.1">
-
-<ActionProperties>
-  <Action name="open_disk" icon="dvd_unmount"/>
-  <Action name="open_stream" icon="connect_no"/>
-  <Action name="play" icon="1rightarrow"/>
-  <Action name="pause" icon = "player_pause"/>
-  <Action name="stop" icon="player_stop"/>
-  <Action name="backward" icon="player_start"/>
-  <Action name="forward" icon="player_end"/>
-  <Action name="fast" icon="2rightarrow"/>
-  <Action name="slow" icon="2leftarrow"/>
-</ActionProperties>
-
-<MenuBar>
-  <Menu name="file" noMerge="1"><text>&amp;File</text>
-    <Action name="file_open"/>
-    <Action name="file_open_recent"/>
-    <Action name="open_disk"/>
-    <Action name="open_stream"/>
-    <Separator lineSeparator="true"/>
-    <Action name="file_close"/>
-    <Separator lineSeparator="true"/>
-    <Action name="file_quit"/>
-  </Menu>
-</MenuBar>
-
-<ToolBar name="mainToolBar" noMerge="1">
-</ToolBar>
-
-<ToolBar name="main" iconText="icononly" iconSize="32">
-  <Action name="file_open"/>
-  <Action name="open_disk"/>
-  <Action name="open_stream"/>
-  <Separator lineSeparator="true"/>
-  <Action name="backward"/>
-  <Action name="play"/>
-  <Action name="pause"/>
-  <Action name="stop"/>
-  <Action name="forward"/>
-  <Action name="slow"/>
-  <Action name="fast"/>
-</ToolBar> 
-
-</kpartgui>
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 7377344f78d802c4ca1bda328ef10889ce3e4672..8fe7ddd6ffe99c65d15e1f2bed89a882cb792d88 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) LPCM audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_C = lpcm_adec.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../lpcm_adec.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../lpcm_adec.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+lpcm_adec_SOURCES = lpcm_adec.c
index 21af5b31dc046fada1711ba128c90079b4f8d15c..0b043310c13afe796b39c234d9ee35b9a76561a9 100644 (file)
@@ -2,7 +2,7 @@
  * lpcm_decoder_thread.c: lpcm decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: lpcm_adec.c,v 1.7 2001/12/30 05:38:44 sam Exp $
+ * $Id: lpcm_adec.c,v 1.8 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Henri Fallon <henri@videolan.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME lpcm_adec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>                                              /* getpid() */
-#endif
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <string.h>                                    /* memcpy(), memset() */
 #include <stdlib.h>                                      /* malloc(), free() */
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
+
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>                                           /* getpid() */
+#endif
 
 #include "audio_output.h"
 
@@ -50,9 +42,6 @@
 
 #include "lpcm_adec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -76,13 +65,11 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for lpcm audio decoder module" )
-    ADD_COMMENT( "Nothing to configure" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "Linear PCM audio decoder";
+    SET_DESCRIPTION( "Linear PCM audio decoder" )
+    ADD_CAPABILITY( DECODER, 100 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -97,10 +84,7 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int decoder_Probe( probedata_t *p_data )
 {
-    if( p_data->i_type == LPCM_AUDIO_ES )
-        return( 100 );
-    else
-        return( 0 );
+    return ( p_data->i_type == LPCM_AUDIO_ES ) ? 100 : 0;
 }
 
 /*****************************************************************************
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 3882c3fe6ddb892074b3ee0e18e5d7f8ba1b3c6d..cccda5a4713478517268fdad6cba71c8b2919acb 100644 (file)
@@ -1,39 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) macosx module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_MACOSX = macosx.o intf_main.o intf_controller.o aout_macosx.o vout_macosx.o intf_vlc_wrapper.o intf_qdview.o
-BUILTIN_MACOSX = $(PLUGIN_MACOSX:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_MACOSX): %.o: .dep/%.d
-$(PLUGIN_MACOSX): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) -ObjC -c -o $@ $<
-
-$(BUILTIN_MACOSX): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_MACOSX): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -ObjC -c -o $@ $<
-
-#
-# Real targets
-#
-
-../macosx.so: $(PLUGIN_MACOSX)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX) -lobjc
-
-../macosx.a: $(BUILTIN_MACOSX)
-       ar r $@ $^
-       $(RANLIB) $@
-
+macosx_SOURCES = macosx.c intf_main.c intf_controller.c aout_macosx.c vout_macosx.c intf_vlc_wrapper.c intf_qdview.c
index eeed87cb128920273320b6b9e209eb803e2fa6aa..d27bf55787569129ca018b50600e377b4028996d 100644 (file)
@@ -2,7 +2,7 @@
  * aout_darwin.c : Darwin audio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_macosx.c,v 1.8 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_macosx.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *
  * Find 8 bits files and adapt output
  */
  
-#define MODULE_NAME macosx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
index 3c68f480c5834b590d9ef18c8deb3339f5218b99..efd9a5e139a2db07e0d32a3a6e44b9ee35b0a5ef 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME macosx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <sys/param.h>                                    /* for MAXPATHLEN */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /* OS specific */
 #import <Cocoa/Cocoa.h>
 
index 3e69172b0b6754c06c043f6bc64e5c8a8cb3ee46..5f4ed434f02d54345c7d2827f06a2bd8ff6dddbf 100644 (file)
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.c : MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_vlc_wrapper.c,v 1.5 2001/12/07 18:33:07 sam Exp $
+ * $Id: intf_vlc_wrapper.c,v 1.6 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <sys/param.h>                                    /* for MAXPATHLEN */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "interface.h"
 #include "intf_playlist.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define OSX_COM_STRUCT vout_sys_s
 #define OSX_COM_TYPE vout_sys_t
 #include "macosx.h"
index 52bb8dc9c5a26251ee39d0137610d499f527d1b2..be9187db8c957e41ac3c7dcc3ffd037cb9ca3fb2 100644 (file)
@@ -2,7 +2,7 @@
  * macosx.c : MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: macosx.c,v 1.9 2001/12/09 17:01:36 sam Exp $
+ * $Id: macosx.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME macosx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
index 52cdfca93b2b07e912f09c933ff4f098d024e268..d3d90ef954078d153c53a9c525e74936ff9cf367 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME macosx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "interface.h"
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-
 #include "macosx.h"
 
 #include <QuickTime/QuickTime.h>
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index f7958155a93d0e578ca3dc847bc521100b49acac..de42f85d8392961223a4267d82d477da298eaea1 100644 (file)
@@ -1,37 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) MAD audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_MAD = mad_adec.o mad_libmad.o
-BUILTIN_MAD = $(PLUGIN_MAD:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_MAD) $(BUILTIN_MAD)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_MAD): %.o: .dep/%.d
-$(PLUGIN_MAD): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_MAD) -DPLUGIN -c -o $@ $<
-
-$(BUILTIN_MAD): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_MAD): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_MAD) -DBUILTIN -c -o $@ $<
-
-#
-# Real targets
-#
-
-../mad.so: $(PLUGIN_MAD)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_MAD)
-
-../mad.a: $(BUILTIN_MAD)
-       ar r $@ $^
-       $(RANLIB) $@
-
+mad_SOURCES = mad_adec.c mad_libmad.c
index 9610db534d1e843fccf9039dc05843cad0bdbfd8..b3190f827a16887f2b4be0b0ff0803295ca8b5dd 100644 (file)
  *                                                                         *
  ***************************************************************************/
 
-#define MODULE_NAME mad
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
@@ -75,13 +63,13 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for mad_adec module" )
-    ADD_COMMENT( "No device to configure." )
+    ADD_WINDOW( "Configuration for mad_adec module" )
+        ADD_COMMENT( "No device to configure." )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "Libmad MPEG 1/2/3 audio decoder library";
+    SET_DESCRIPTION( "Libmad MPEG 1/2/3 audio decoder library" )
+    ADD_CAPABILITY( DECODER, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -101,10 +89,6 @@ static int decoder_Probe( probedata_t *p_data )
 {
     if( p_data->i_type == MPEG1_AUDIO_ES || p_data->i_type == MPEG2_AUDIO_ES )
     {
-        if( TestMethod( ADEC_MPEG_VAR, "mad" ) )
-        {
-            return( 999 );
-        }
         return( 50 );
     }
     else
index a835bc7f82f6461b595e87acfdadeab01b3569a8..816423564a402dd78ae4f5f2d7ce0a1f68dff011 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "intf_msg.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 8a613120427aa76ed9d509c5b307db008567b66b..9c16bdc4f3e79b57e5d06b96e2b31392f7b9db0d 100644 (file)
@@ -1,61 +1,4 @@
-###############################################################################
-# vlc (VideoLAN Client) memcpy module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_MEMCPY = memcpy.o
-PLUGIN_MEMCPYMMX = memcpymmx.o
-PLUGIN_MEMCPYMMXEXT = memcpymmxext.o
-PLUGIN_MEMCPY3DN = memcpy3dn.o
-
-BUILTIN_MEMCPY = $(PLUGIN_MEMCPY:%.o=BUILTIN_%.o)
-BUILTIN_MEMCPYMMX = $(PLUGIN_MEMCPYMMX:%.o=BUILTIN_%.o)
-BUILTIN_MEMCPYMMXEXT = $(PLUGIN_MEMCPYMMXEXT:%.o=BUILTIN_%.o)
-BUILTIN_MEMCPY3DN = $(PLUGIN_MEMCPY3DN:%.o=BUILTIN_%.o)
-
-PLUGIN_C = $(PLUGIN_MEMCPY) $(PLUGIN_MEMCPYMMX) $(PLUGIN_MEMCPYMMXEXT) $(PLUGIN_MEMCPY3DN)
-BUILTIN_C = $(BUILTIN_MEMCPY) $(BUILTIN_MEMCPYMMX) $(BUILTIN_MEMCPYMMXEXT) $(BUILTIN_MEMCPY3DN)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../memcpy.so: $(PLUGIN_MEMCPY)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../memcpy.a: $(BUILTIN_MEMCPY)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../memcpymmx.so: $(PLUGIN_MEMCPYMMX)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../memcpymmx.a: $(BUILTIN_MEMCPYMMX)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../memcpymmxext.so: $(PLUGIN_MEMCPYMMXEXT)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../memcpymmxext.a: $(BUILTIN_MEMCPYMMXEXT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../memcpy3dn.so: $(PLUGIN_MEMCPY3DN)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../memcpy3dn.a: $(BUILTIN_MEMCPY3DN)
-       ar r $@ $^
-       $(RANLIB) $@
-
+memcpy_SOURCES = memcpy.c
+memcpymmx_SOURCES = memcpymmx.c
+memcpymmxext_SOURCES = memcpymmxext.c
+memcpy3dn_SOURCES = memcpy3dn.c
index e9fe6f04819a9b47c4efaa500b91a3737560b9fd..165bb3720ef999faca43b33a64b445745f57bbe7 100644 (file)
@@ -2,7 +2,7 @@
  * memcpy.c : classic memcpy module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: memcpy.c,v 1.2 2001/12/07 18:33:07 sam Exp $
+ * $Id: memcpy.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME memcpy
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local and extern prototypes.
@@ -51,14 +39,14 @@ static int  memcpy_Probe       ( probedata_t *p_data );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for C memcpy module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MEMCPY;
-    p_module->psz_longname = "libc memcpy module";
+    SET_DESCRIPTION( "libc memcpy module" )
+    ADD_CAPABILITY( MEMCPY, 50 )
+    ADD_SHORTCUT( "c" )
+    ADD_SHORTCUT( "libc" )
+    ADD_SHORTCUT( "memcpy" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -87,13 +75,6 @@ static void memcpy_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int memcpy_Probe( probedata_t *p_data )
 {
-    if( TestMethod( MEMCPY_METHOD_VAR, "memcpy" )
-         || TestMethod( MEMCPY_METHOD_VAR, "c" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 50 );
 }
 
index 9dd405297039fd5faa88647d05af143235cc7bbb..826d679bd71906e5bfba989c090e6967e0af569d 100644 (file)
@@ -2,7 +2,7 @@
  * memcpy3dn.c : 3D Now! memcpy module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: memcpy3dn.c,v 1.2 2001/12/07 18:33:07 sam Exp $
+ * $Id: memcpy3dn.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME memcpy3dn
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local and extern prototypes.
@@ -59,14 +47,14 @@ void *      _M( fast_memcpy )  ( void * to, const void * from, size_t len );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for 3D Now! memcpy module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MEMCPY;
-    p_module->psz_longname = "3D Now! memcpy module";
+    SET_DESCRIPTION( "3D Now! memcpy module" )
+    ADD_CAPABILITY( MEMCPY, 100 )
+    ADD_REQUIREMENT( 3DNOW )
+    ADD_SHORTCUT( "3dnow" )
+    ADD_SHORTCUT( "3dn" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -95,18 +83,6 @@ static void memcpy_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int memcpy_Probe( probedata_t *p_data )
 {
-    /* Test for 3D Now! support in the CPU */
-    if( !TestCPU( CPU_CAPABILITY_3DNOW ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MEMCPY_METHOD_VAR, "memcpy3dn" )
-         || TestMethod( MEMCPY_METHOD_VAR, "3dn" ) )
-    {
-        return( 999 );
-    }
-
     /* This plugin always works */
     return( 100 );
 }
index b51f81acdebf7b6b160fd16a1c2daa64f5efd63a..f6ad3704d5587db85eed20ce24ebf8c11cf10ecb 100644 (file)
@@ -2,7 +2,7 @@
  * memcpymmx.c : MMX memcpy module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: memcpymmx.c,v 1.2 2001/12/07 18:33:07 sam Exp $
+ * $Id: memcpymmx.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME memcpymmx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local and extern prototypes.
@@ -59,14 +47,14 @@ void *      _M( fast_memcpy )  ( void * to, const void * from, size_t len );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MMX memcpy module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MEMCPY;
-    p_module->psz_longname = "MMX memcpy module";
+    SET_DESCRIPTION( "MMX memcpy module" )
+    ADD_CAPABILITY( MEMCPY, 100 )
+    ADD_REQUIREMENT( MMX )
+    ADD_SHORTCUT( "mmx" )
+    ADD_SHORTCUT( "memcpymmx" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -95,19 +83,6 @@ static void memcpy_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int memcpy_Probe( probedata_t *p_data )
 {
-    /* Test for MMX support in the CPU */
-    if( !TestCPU( CPU_CAPABILITY_MMX ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MEMCPY_METHOD_VAR, "memcpymmx" )
-         || TestMethod( MEMCPY_METHOD_VAR, "mmx" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 100 );
 }
 
index 947d31e4302db106a49ec7009a6231f79142bffa..ae27a1b1b91a188297fc3c0bea151566c12738ec 100644 (file)
@@ -2,7 +2,7 @@
  * memcpymmxext.c : MMX EXT memcpy module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: memcpymmxext.c,v 1.2 2001/12/07 18:33:07 sam Exp $
+ * $Id: memcpymmxext.c,v 1.3 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME memcpymmxext
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local and extern prototypes.
@@ -59,14 +47,14 @@ void *      _M( fast_memcpy )  ( void * to, const void * from, size_t len );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MMX EXT memcpy module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MEMCPY;
-    p_module->psz_longname = "MMX EXT memcpy module";
+    SET_DESCRIPTION( "MMX EXT memcpy module" )
+    ADD_CAPABILITY( MEMCPY, 200 )
+    ADD_REQUIREMENT( MMXEXT )
+    ADD_SHORTCUT( "memcpymmxext" )
+    ADD_SHORTCUT( "mmxext" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -95,19 +83,6 @@ static void memcpy_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int memcpy_Probe( probedata_t *p_data )
 {
-    /* Test for MMX EXT support in the CPU */
-    if( !TestCPU( CPU_CAPABILITY_MMXEXT ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MEMCPY_METHOD_VAR, "memcpymmxext" )
-         || TestMethod( MEMCPY_METHOD_VAR, "mmxext" ) )
-    {
-        return( 999 );
-    }
-
-    /* This plugin always works */
     return( 200 );
 }
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index ca520bde1f2c3e0fc025d2d122defa71df62e7cf..4faa9988c723c6be7a8b27a966d78f0fbb62d365 100644 (file)
@@ -1,31 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) mga module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = mga.o vout_mga.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../mga.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../mga.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+mga_SOURCES = mga.c vout_mga.c
index 2d3c6a935f33b5ea124d7ff864069b7df76f6cf8..39f42ed6fd2abba3f420e35aa1a56075dc5fa781 100644 (file)
@@ -2,7 +2,7 @@
  * mga.c : Matrox Graphic Array plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: mga.c,v 1.8 2001/12/09 17:01:36 sam Exp $
+ * $Id: mga.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mga
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
index 13bfebb5b0cab48b2dd70ca06c6fc2b0754a57fe..1eb3c34f555bdfbb0d33c083fa64260862c55a98 100644 (file)
@@ -2,7 +2,7 @@
  * vout_mga.c: MGA video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_mga.c,v 1.10 2001/12/09 17:01:36 sam Exp $
+ * $Id: vout_mga.c,v 1.11 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mga
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <unistd.h>                                               /* close() */
 #include <stdlib.h>                                                /* free() */
 #include <sys/ioctl.h>                                            /* ioctl() */
 #include <sys/mman.h>                                          /* PROT_WRITE */
 
+#include <videolan/vlc.h>
+
 #ifdef SYS_BSD
 #include <sys/types.h>                                     /* typedef ushort */
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-#include "modules.h"
-
 #include "video.h"
 #include "video_output.h"
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 9dc28b71f401de7694aba3c6609e0ce34af1a089..cf79eda0cafdc5c0a1578098c24c76c024370827 100644 (file)
@@ -1,99 +1,5 @@
-###############################################################################
-# vlc (VideoLAN Client) motion module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_MOTION = motion.o
-PLUGIN_MOTIONMMX = motionmmx.o
-PLUGIN_MOTIONMMXEXT = motionmmxext.o
-PLUGIN_MOTION3DNOW = motion3dnow.o
-PLUGIN_MOTIONALTIVEC = motionaltivec.o
-
-BUILTIN_MOTION = $(PLUGIN_MOTION:%.o=BUILTIN_MOTION_%.o)
-BUILTIN_MOTIONMMX = $(PLUGIN_MOTIONMMX:%.o=BUILTIN_MOTIONMMX_%.o)
-BUILTIN_MOTIONMMXEXT = $(PLUGIN_MOTIONMMXEXT:%.o=BUILTIN_MOTIONMMXEXT_%.o)
-BUILTIN_MOTION3DNOW = $(PLUGIN_MOTION3DNOW:%.o=BUILTIN_MOTION3DNOW_%.o)
-BUILTIN_MOTIONALTIVEC = $(PLUGIN_MOTIONALTIVEC:%.o=BUILTIN_MOTIONALTIVEC_%.o)
-
-PLUGIN_C = $(PLUGIN_MOTION) $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTION3DNOW)
-ALL_OBJ = $(PLUGIN_C) $(PLUGIN_MOTIONALTIVEC) $(BUILTIN_MOTION) $(BUILTIN_MOTIONMMX) $(BUILTIN_MOTIONMMXEXT) $(BUILTIN_MOTION3DNOW)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_MOTIONALTIVEC): %.o: .dep/%.d
-$(PLUGIN_MOTIONALTIVEC): %.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DPLUGIN $(PCFLAGS) -c -o $@ $<
-
-$(BUILTIN_MOTION): BUILTIN_MOTION_%.o: .dep/%.d
-$(BUILTIN_MOTION): BUILTIN_MOTION_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=motion -c -o $@ $<
-
-$(BUILTIN_MOTIONMMX): BUILTIN_MOTIONMMX_%.o: .dep/%.d
-$(BUILTIN_MOTIONMMX): BUILTIN_MOTIONMMX_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=motionmmx -c -o $@ $<
-
-$(BUILTIN_MOTIONMMXEXT): BUILTIN_MOTIONMMXEXT_%.o: .dep/%.d
-$(BUILTIN_MOTIONMMXEXT): BUILTIN_MOTIONMMXEXT_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=motionmmxext -c -o $@ $<
-
-$(BUILTIN_MOTION3DNOW): BUILTIN_MOTION3DNOW_%.o: .dep/%.d
-$(BUILTIN_MOTION3DNOW): BUILTIN_MOTION3DNOW_%.o: %.c
-       $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=motion3dnow -c -o $@ $<
-
-$(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: .dep/%.d
-$(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DBUILTIN -DMODULE_NAME=motionaltivec -c -o $@ $<
-
-#
-# Real targets
-#
-
-../motion.so: $(PLUGIN_MOTION)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../motion.a: $(BUILTIN_MOTION)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../motionclassic.so: $(PLUGIN_MOTIONCLASSIC)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../motionclassic.a: $(BUILTIN_MOTIONCLASSIC)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../motionmmx.so: $(PLUGIN_MOTIONMMX)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../motionmmx.a: $(BUILTIN_MOTIONMMX)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../motionmmxext.a: $(BUILTIN_MOTIONMMXEXT)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../motion3dnow.so: $(PLUGIN_MOTION3DNOW)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../motion3dnow.a: $(BUILTIN_MOTION3DNOW)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../motionaltivec.so: $(PLUGIN_MOTIONALTIVEC)
-       $(CC) -o $@ $^ $(LIB_ALTIVEC) $(PLCFLAGS)
-
-../motionaltivec.a: $(BUILTIN_MOTIONALTIVEC)
-       ar r $@ $^
-       $(RANLIB) $@
+motion_SOURCES = motion.c
+motionmmx_SOURCES = motionmmx.c
+motionmmxext_SOURCES = motionmmxext.c
+motion3dnow_SOURCES = motion3dnow.c
+motionaltivec_SOURCES = motionaltivec.c
index 762f9cabf6dcd9bda4719f02ab98f20e2c7273fc..d4ab84a7ad396045e1c206ecf8fb544264596161 100644 (file)
@@ -2,7 +2,7 @@
  * motion.c : C motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motion.c,v 1.12 2001/12/09 17:01:36 sam Exp $
+ * $Id: motion.c,v 1.13 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME motion
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local and extern prototypes.
@@ -51,14 +39,13 @@ static void motion_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for motion compensation module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MOTION;
-    p_module->psz_longname = "motion compensation module";
+    SET_DESCRIPTION( "motion compensation module" )
+    ADD_CAPABILITY( MOTION, 50 )
+    ADD_SHORTCUT( "c" )
+    ADD_SHORTCUT( "motion" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -73,13 +60,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int motion_Probe( probedata_t *p_data )
 {
-    if( TestMethod( MOTION_METHOD_VAR, "motion" )
-         || TestMethod( MOTION_METHOD_VAR, "c" ) )
-    {
-        return( 999 );
-    }
-
-    /* This module always works */
     return( 50 );
 }
 
index cff28d99e262a672a8948678759d31515e9c6ed8..7ee77c6836c38c87a240766fa0dd9e6584a2d2ad 100644 (file)
@@ -2,7 +2,7 @@
  * motion3dnow.c : 3DNow! motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motion3dnow.c,v 1.5 2001/12/09 17:01:36 sam Exp $
+ * $Id: motion3dnow.c,v 1.6 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME motion3dnow
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "mmx.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -53,14 +41,15 @@ static void motion_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for 3DNow! motion compensation module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MOTION;
-    p_module->psz_longname = "3DNow! motion compensation module";
+    SET_DESCRIPTION( "3DNow! motion compensation module" )
+    ADD_CAPABILITY( MOTION, 150 )
+    ADD_REQUIREMENT( 3DNOW )
+    ADD_SHORTCUT( "3dn" )
+    ADD_SHORTCUT( "3dnow" )
+    ADD_SHORTCUT( "motion3dn" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -75,17 +64,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int motion_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_3DNOW ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MOTION_METHOD_VAR, "motion3dnow" )
-         || TestMethod( MOTION_METHOD_VAR, "3dnow" ) )
-    {
-        return( 999 );
-    }
-
     return( 250 );
 }
 
index 6d4f9ce95bbe804e856aad9b23e310597eb6b359..688dc4374bcc94abeb1d503895ac8db659cd1fef 100644 (file)
@@ -2,7 +2,7 @@
  * motionaltivec.c : Altivec motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionaltivec.c,v 1.8 2001/12/09 17:01:36 sam Exp $
+ * $Id: motionaltivec.c,v 1.9 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *          Paul Mackerras <paulus@linuxcare.com.au>
 
 #ifndef __BUILD_ALTIVEC_ASM__
 
-#define MODULE_NAME motionaltivec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 #include <inttypes.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local and extern prototypes.
@@ -54,14 +42,14 @@ static void motion_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Altivec motion compensation module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MOTION;
-    p_module->psz_longname = "Altivec motion compensation module";
+    SET_DESCRIPTION( "Altivec motion compensation module" )
+    ADD_CAPABILITY( MOTION, 150 )
+    ADD_REQUIREMENT( ALTIVEC )
+    ADD_SHORTCUT( "altivec" )
+    ADD_SHORTCUT( "motionaltivec" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -76,17 +64,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int motion_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_ALTIVEC ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MOTION_METHOD_VAR, "motionaltivec" )
-         || TestMethod( MOTION_METHOD_VAR, "altivec" ) )
-    {
-        return( 999 );
-    }
-
     return( 150 );
 }
 
index e8eeb0e44086459028315f2d1cf13da0c6ffbe8f..5a02d701ffb09a0d52151c77569073acdd57be3e 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmx.c : MMX motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionmmx.c,v 1.13 2001/12/09 17:01:36 sam Exp $
+ * $Id: motionmmx.c,v 1.14 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME motionmmx
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "mmx.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -53,14 +41,14 @@ static void motion_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MMX motion compensation module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MOTION;
-    p_module->psz_longname = "MMX motion compensation module";
+    SET_DESCRIPTION( "MMX motion compensation module" )
+    ADD_CAPABILITY( MOTION, 150 )
+    ADD_REQUIREMENT( MMX )
+    ADD_SHORTCUT( "mmx" )
+    ADD_SHORTCUT( "motionmmx" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -75,17 +63,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int motion_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_MMX ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MOTION_METHOD_VAR, "motionmmx" )
-         || TestMethod( MOTION_METHOD_VAR, "mmx" ) )
-    {
-        return( 999 );
-    }
-
     return( 150 );
 }
 
index 9653867cf844ff5190e091b249c872cf4b737814..962ec2c12a4f49fb374445a457f08a92ee3c9bfd 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmxext.c : MMX EXT motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionmmxext.c,v 1.14 2001/12/09 17:01:36 sam Exp $
+ * $Id: motionmmxext.c,v 1.15 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME motionmmxext
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "mmx.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local and extern prototypes.
  *****************************************************************************/
@@ -53,14 +41,14 @@ static void motion_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MMXEXT motion compensation module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_MOTION;
-    p_module->psz_longname = "MMXEXT motion compensation module";
+    SET_DESCRIPTION( "MMXEXT motion compensation module" )
+    ADD_CAPABILITY( MOTION, 200 )
+    ADD_REQUIREMENT( MMXEXT )
+    ADD_SHORTCUT( "mmxext" )
+    ADD_SHORTCUT( "motionmmxext" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -75,17 +63,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int motion_Probe( probedata_t *p_data )
 {
-    if( !TestCPU( CPU_CAPABILITY_MMXEXT ) )
-    {
-        return( 0 );
-    }
-
-    if( TestMethod( MOTION_METHOD_VAR, "motionmmxext" )
-         || TestMethod( MOTION_METHOD_VAR, "mmxext" ) )
-    {
-        return( 999 );
-    }
-
     return( 200 );
 }
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index c54586d65296baccc5fec624e667cc6e19635dd5..23bef9a9614a75500b0d4e2d5cf81ba76b85bbbf 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) MPEG audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_C = mpeg_adec.o adec_layer1.o adec_layer2.o adec_math.o mpeg_adec_generic.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../mpeg_adec.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../mpeg_adec.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+mpeg_adec_SOURCES = mpeg_adec.c adec_layer1.c adec_layer2.c adec_math.c mpeg_adec_generic.c
index b9909afa23490edc4ebb7510acf14877d1efffcc..a66600c154fbf74cfa3ca9b41558dd5848986cf7 100644 (file)
@@ -2,7 +2,7 @@
  * adec_layer1.c: MPEG Layer I audio decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: adec_layer1.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: adec_layer1.c,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include "defs.h"
-
 #include <stdlib.h>                                                  /* NULL */
 #include <string.h>                                    /* memcpy(), memset() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
@@ -39,8 +34,6 @@
 #include "mpeg_adec.h"
 #include "adec_math.h"                                     /* DCT32(), PCM() */
 
-#include "modules_export.h"
-
 /**** wkn ****/
 
 static float adec_scalefactor_table[64] =
index af8fa7f789335c1e61eb3a37d2a8cc30c8d8baec..73dd904a0101b31b175c3712445b9d93648ca977 100644 (file)
@@ -2,7 +2,7 @@
  * adec_layer2.c: MPEG Layer II audio decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: adec_layer2.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: adec_layer2.c,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include "defs.h"
-
 #include <stdlib.h>                                                  /* NULL */
 #include <string.h>                                    /* memcpy(), memset() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
+
 #include "stream_control.h"
 #include "input_ext-dec.h"
 
@@ -38,8 +34,6 @@
 #include "mpeg_adec.h"
 #include "adec_math.h"                                     /* DCT32(), PCM() */
 
-#include "modules_export.h"
-
 /**** wkn ****/
 
 static float adec_scalefactor_table[64] =
index 6826e6efdb9d0625224226206c155f5741844185..7ef62b5ee0b0964830d1f536f0a6e77360783dbd 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_adec.c: MPEG audio decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: mpeg_adec.c,v 1.9 2001/12/30 05:38:44 sam Exp $
+ * $Id: mpeg_adec.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_adec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"               /* aout_fifo_t (for audio_decoder.h) */
 
@@ -48,9 +39,6 @@
 #include "mpeg_adec_generic.h"
 #include "mpeg_adec.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define ADEC_FRAME_SIZE (2*1152)
 
 /*****************************************************************************
@@ -61,7 +49,6 @@ static int   decoder_Run   ( decoder_config_t * );
 static void  EndThread     ( adec_thread_t * );
 static void  DecodeThread  ( adec_thread_t * );
 
-
 /*****************************************************************************
  * Capabilities
  *****************************************************************************/
@@ -75,13 +62,13 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for mpeg audio decoder module" )
-    ADD_COMMENT( "Nothing to configure" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "Mpeg I layer 1/2 audio decoder";
+    SET_DESCRIPTION( "Mpeg I layer 1/2 audio decoder" )
+    ADD_CAPABILITY( DECODER, 100 )
+    ADD_REQUIREMENT( FPU )
+    ADD_SHORTCUT( "builtin" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -96,20 +83,8 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int decoder_Probe( probedata_t *p_data )
 {
-    if( p_data->i_type == MPEG1_AUDIO_ES || p_data->i_type == MPEG2_AUDIO_ES )
-    {
-        if( !TestCPU( CPU_CAPABILITY_FPU ) )
-        {
-            /* This can work but we'd really prefer libmad to take over. */
-            return( 1 );
-        }
-        if( TestMethod( ADEC_MPEG_VAR, "builtin" ) )
-        {
-            return( 999 );
-        }
-        return( 100 );
-    }
-    return( 0 );
+    return( ( p_data->i_type == MPEG1_AUDIO_ES
+               || p_data->i_type == MPEG2_AUDIO_ES ) ? 100 : 0 );
 }
 
 /*****************************************************************************
index 942d008a27fcfead27627d713908495c1e92805e..8a7ec655a248371468650ba585547a5c90cc91ef 100644 (file)
@@ -2,7 +2,7 @@
  * adec_generic.c: MPEG audio decoder
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: mpeg_adec_generic.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: mpeg_adec_generic.c,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "input_ext-dec.h"
 #include "stream_control.h"
@@ -40,9 +35,6 @@
 #include "adec_layer1.h"
 #include "adec_layer2.h"
 
-#include "modules.h"
-#include "modules_export.h"     /* Used for exporting vlc symbols to plugins */
-
 int adec_Init( adec_thread_t * p_adec )
 {
     p_adec->bank_0.actual = p_adec->bank_0.v1;
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 31b4cb0fddecf843624554331cd43cfbaca9cbb2..4db156a75c72624f247b1fdb3a20ecc6236ff8d2 100644 (file)
@@ -1,51 +1,3 @@
-###############################################################################
-# vlc (VideoLAN Client) mpeg module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_ES = mpeg_es.o input_es.o
-PLUGIN_PS = mpeg_ps.o input_ps.o
-PLUGIN_TS = mpeg_ts.o input_ts.o
-BUILTIN_ES = $(PLUGIN_ES:%.o=BUILTIN_%.o)
-BUILTIN_PS = $(PLUGIN_PS:%.o=BUILTIN_%.o)
-BUILTIN_TS = $(PLUGIN_TS:%.o=BUILTIN_%.o)
-
-PLUGIN_C = $(PLUGIN_ES) $(PLUGIN_PS) $(PLUGIN_TS)
-BUILTIN_C = $(BUILTIN_ES) $(BUILTIN_PS) $(BUILTIN_TS)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../mpeg_es.so: $(PLUGIN_ES)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../mpeg_es.a: $(BUILTIN_ES)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../mpeg_ps.so: $(PLUGIN_PS)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../mpeg_ps.a: $(BUILTIN_PS)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../mpeg_ts.so: $(PLUGIN_TS)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_TS)
-
-../mpeg_ts.a: $(BUILTIN_TS)
-       ar r $@ $^
-       $(RANLIB) $@
-
+mpeg_es_SOURCES = mpeg_es.c input_es.c
+mpeg_ps_SOURCES = mpeg_ps.c input_ps.c
+mpeg_ts_SOURCES = mpeg_ts.c input_ts.c
index 700a61e82e1996bc2a41bd2f44b748b24cd795cf..07bc40849b3bf1e46327a865cf9e34d2c54865c1 100644 (file)
@@ -2,7 +2,7 @@
  * input_es.c: Elementary Stream demux and packet management
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_es.c,v 1.10 2001/12/30 04:26:53 sam Exp $
+ * $Id: input_es.c,v 1.11 2001/12/30 07:09:55 sam Exp $
  *
  * Author: Christophe Massiot <massiot@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_es
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
+#include <videolan/vlc.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #   include <sys/uio.h>                                      /* struct iovec */
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #if defined( WIN32 )
 #   include "input_iovec.h"
 #endif
@@ -67,9 +58,6 @@
 
 #include "debug.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -138,11 +126,6 @@ static int ESProbe( probedata_t *p_data )
 {
     int i_score = 5;
 
-    if( TestMethod( INPUT_METHOD_VAR, "es" ) )
-    {
-        return( 999 );
-    }
-
     return( i_score );
 }
 
index ef714e2df28de1577d8fd06a08be9bdb6c08c251..757485733bab45d76d55e1fdba398fcb40f61be3 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ps.c,v 1.10 2001/12/30 04:26:53 sam Exp $
+ * $Id: input_ps.c,v 1.11 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_ps
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 
+#include <videolan/vlc.h>
+
 #ifdef STRNCASECMP_IN_STRINGS_H
 #   include <strings.h>
 #endif
 
 #include <fcntl.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #include "stream_control.h"
 #include "input_ext-intf.h"
 #include "input_ext-dec.h"
@@ -65,9 +56,6 @@
 
 #include "debug.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * fseeko: fseeko replacement for BSDI.
  *****************************************************************************/
@@ -145,11 +133,6 @@ static int PSProbe( probedata_t *p_data )
     char * psz_name = p_input->p_source;
     int i_score = 10;
 
-    if( TestMethod( INPUT_METHOD_VAR, "ps" ) )
-    {
-        return( 999 );
-    }
-
     if( ( strlen(psz_name) > 5 ) && (!strncasecmp( psz_name, "file:", 5 )
                                       || !strncasecmp( psz_name, "http:", 5 )) )
     {
index fe1254ebda4d4ad7ace0548afe80736284bb271c..d794d11be659cc4f286062530c276e6da2fa29fa 100644 (file)
@@ -2,7 +2,7 @@
  * input_ts.c: TS demux and netlist management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ts.c,v 1.9 2001/12/30 04:26:53 sam Exp $
+ * $Id: input_ts.c,v 1.10 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_ts
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
+#include <videolan/vlc.h>
+
 #ifdef STRNCASECMP_IN_STRINGS_H
 #   include <strings.h>
 #endif
 #   include <sys/uio.h>                                      /* struct iovec */
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #if defined( WIN32 )
 #   include "input_iovec.h"
 #endif
@@ -79,9 +70,6 @@
 
 #include "input_ts.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -140,11 +128,6 @@ static int TSProbe( probedata_t * p_data )
     char * psz_name = p_input->p_source;
     int i_score = 2;
 
-    if( TestMethod( INPUT_METHOD_VAR, "ts" ) )
-    {
-        return( 999 );
-    }
-
     if( ( strlen(psz_name) >= 10 && !strncasecmp( psz_name, "udpstream:", 10 ) )
             || ( strlen(psz_name) >= 4 && !strncasecmp( psz_name, "udp:", 4 ) ) )
     {
index 6dccf501485ee91240805dc5155736861110935a..f59acbaf2526c545439317428674657aa81595ae 100644 (file)
@@ -2,7 +2,7 @@
  * input_ts.h: structures of the input not exported to other modules
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ts.h,v 1.4 2001/12/27 03:47:09 massiot Exp $
+ * $Id: input_ts.h,v 1.5 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Henri Fallon <henri@via.ecp.fr>
  *          Boris Dorès <babal@via.ecp.fr>
@@ -73,7 +73,7 @@ static __inline__ int read_network( int i_fd, char * p_base,
          i_bytes = p_sys->i_length - p_sys->i_offset;
     }
 
-    p_main->fast_memcpy( p_base, p_sys->p_buffer + p_sys->i_offset, i_bytes );
+    FAST_MEMCPY( p_base, p_sys->p_buffer + p_sys->i_offset, i_bytes );
     p_sys->i_offset += i_bytes;
 
     return i_bytes;
index 0e90535a0a762e3355ab2de955337accff87efc0..af8fbce8bbfbe0bf426fcbc362b3ca1f865a0a6a 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_es.c : Elementary Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: mpeg_es.c,v 1.1 2001/12/09 17:01:36 sam Exp $
+ * $Id: mpeg_es.c,v 1.2 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_es
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -49,14 +38,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for ES module" )
-    ADD_COMMENT( "foobar !" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INPUT;
-    p_module->psz_longname = "ISO 13818-1 MPEG Elementary Stream input module";
+    SET_DESCRIPTION( "ISO 13818-1 MPEG Elementary Stream input" )
+    ADD_CAPABILITY( INPUT, 50 )
+    ADD_SHORTCUT( "es" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index dab4a249b1a5b892a42b0ecd43ab7ad97a79cc63..a043865b9afe55b6438c704585fecd4e121754d9 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_ps.c : Program Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: mpeg_ps.c,v 1.1 2001/12/09 17:01:36 sam Exp $
+ * $Id: mpeg_ps.c,v 1.2 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_ps
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -49,14 +38,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for PS module" )
-    ADD_COMMENT( "foobar !" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INPUT;
-    p_module->psz_longname = "ISO 13818-1 MPEG Program Stream input module";
+    SET_DESCRIPTION( "ISO 13818-1 MPEG Program Stream input" )
+    ADD_CAPABILITY( INPUT, 100 )
+    ADD_SHORTCUT( "ps" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 9259905685cc4eb33e23dad23e43fd914719e609..4717079b3ebee1d32751cb8479cb3b2bb5ec2370 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_ts.c : Transport Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: mpeg_ts.c,v 1.1 2001/12/09 17:01:36 sam Exp $
+ * $Id: mpeg_ts.c,v 1.2 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Henri Fallon <henri@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_ts
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -49,14 +38,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for TS module" )
-    ADD_COMMENT( "foobar !" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INPUT;
-    p_module->psz_longname = "ISO 13818-1 MPEG Transport Stream input module";
+    SET_DESCRIPTION( "ISO 13818-1 MPEG Transport Stream input" )
+    ADD_CAPABILITY( INPUT, 50 )
+    ADD_SHORTCUT( "ts" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 06fb9acb1d09ccb39fbe241ddbf47adfb8cecb54..333394c4729f5807230ce9be14ecfc90943a84f0 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) MPEG audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_C = video_parser.o vpar_headers.o vpar_blocks.o vpar_synchro.o vpar_pool.o video_decoder.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../mpeg_vdec.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../mpeg_vdec.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+mpeg_vdec_SOURCES = video_parser.c vpar_headers.c vpar_blocks.c vpar_synchro.c vpar_pool.c video_decoder.c
index b1002c5f1cb9e48034f21ff2adb0520d8f3962f8..c2309bbff604d5cc3ce738f472e7e5bec8d1d016 100644 (file)
@@ -2,7 +2,7 @@
  * video_decoder.c : video decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_decoder.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: video_decoder.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>                                              /* getpid() */
-#endif
-
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                    /* memcpy(), memset() */
 #include <errno.h>                                                  /* errno */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
+
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>                                           /* getpid() */
+#endif
 
 #include "video.h"
 #include "video_output.h"
@@ -51,8 +46,6 @@
 #include "vpar_pool.h"
 #include "video_parser.h"
 
-#include "modules_export.h"
-
 /*
  * Local prototypes
  */
index 7c4025894d13e00298c97a86d4703e55b5ac5300..49d1361bea23526dee7ef6fb1d4d5bab48c072c9 100644 (file)
@@ -2,7 +2,7 @@
  * video_parser.c : video parser thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_parser.c,v 1.9 2001/12/30 05:38:44 sam Exp $
+ * $Id: video_parser.c,v 1.10 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME mpeg_vdec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>                                              /* getpid() */
 #endif
 #   include <sys/times.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "video.h"
 #include "video_output.h"
 
@@ -58,9 +50,6 @@
 #include "vpar_pool.h"
 #include "video_parser.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*
  * Local prototypes
  */
@@ -83,13 +72,11 @@ void _M( vdec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for MPEG video decoder module" )
-    ADD_COMMENT( "Nothing to configure" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "MPEG I/II video decoder module";
+    SET_DESCRIPTION( "MPEG I/II video decoder module" )
+    ADD_CAPABILITY( DECODER, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -108,10 +95,8 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int decoder_Probe( probedata_t *p_data )
 {
-    if( p_data->i_type == MPEG1_VIDEO_ES || p_data->i_type == MPEG2_VIDEO_ES )
-        return( 50 );
-    else
-        return( 0 );
+    return( ( p_data->i_type == MPEG1_VIDEO_ES
+               || p_data->i_type == MPEG2_VIDEO_ES ) ? 50 : 0 );
 }
 
 /*****************************************************************************
@@ -199,7 +184,9 @@ static int InitThread( vpar_thread_t *p_vpar )
     /*
      * Choose the best motion compensation module
      */
-    p_vpar->p_motion_module = module_Need( MODULE_CAPABILITY_MOTION, NULL );
+    p_vpar->p_motion_module = module_Need( MODULE_CAPABILITY_MOTION,
+                                main_GetPszVariable( MOTION_METHOD_VAR, NULL ),
+                                NULL );
 
     if( p_vpar->p_motion_module == NULL )
     {
@@ -215,7 +202,9 @@ static int InitThread( vpar_thread_t *p_vpar )
     /*
      * Choose the best IDCT module
      */
-    p_vpar->p_idct_module = module_Need( MODULE_CAPABILITY_IDCT, NULL );
+    p_vpar->p_idct_module = module_Need( MODULE_CAPABILITY_IDCT,
+                                  main_GetPszVariable( IDCT_METHOD_VAR, NULL ),
+                                  NULL );
 
     if( p_vpar->p_idct_module == NULL )
     {
index fa83662a2b95d4d7bbe096e830b93b2e09a79392..e4e2893d4dabfa0e1028bbe9701571a249b94593 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_blocks.c : blocks parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vpar_blocks.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: vpar_blocks.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *          Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                                /* memset */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -47,8 +42,6 @@
 
 #include "vpar_blocks.h"
 
-#include "modules_export.h"
-
 /*
  * Welcome to vpar_blocks.c ! Here's where the heavy processor-critical parsing
  * task is done. This file is divided in several parts :
index cb29ce221d4467123beb863d5a7095f7fff34d24..931432234dcef69538c1058ad1cfc62d6078cc11 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_headers.c : headers parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vpar_headers.c,v 1.7 2001/12/16 16:18:36 sam Exp $
+ * $Id: vpar_headers.c,v 1.8 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                    /* memcpy(), memset() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -46,8 +41,6 @@
 #include "video_parser.h"
 #include "video_decoder.h"
 
-#include "modules_export.h"
-
 /*
  * Local prototypes
  */
@@ -495,7 +488,6 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
             vlc_mutex_unlock( &p_vout_bank->lock );
 
             p_vpar->p_fifo->b_error = 1;
-            /* XXX ! XXX ! XXX ! what to do here ? */
             return;
         }
         
index 60be7419d531f8b14aeb3435a3267eb5fe49ddb9..4e8d025ea90c4a92f3e47f0e564fa68f781d3345 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_pool.c : management of the pool of decoder threads
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vpar_pool.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: vpar_pool.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 #include <stdlib.h>                                             /* realloc() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -45,8 +40,6 @@
 #include "video_parser.h"
 #include "video_decoder.h"
 
-#include "modules_export.h"
-
 /*
  * Local prototypes
  */
index 3df308cf0258d041115829376fc8d5c64e6f31a1..bad3772992484275edd0e9c59a00fcae7c0db7d2 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_synchro.c : frame dropping routines
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vpar_synchro.c,v 1.4 2001/12/10 04:53:11 sam Exp $
+ * $Id: vpar_synchro.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 #include "vpar_pool.h"
 #include "video_parser.h"
 
-#include "modules_export.h"
-
 /*
  * Local prototypes
  */
index 8b5889a10c78411cea807dc42cd806dda9731a04..6d127837dbc04df224a2a944449377fbca3c6114 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) QNX RTOS module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_C = qnx.o aout_qnx.o vout_qnx.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../qnx.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_QNX) 
-
-../qnx.a: $(BUILTIN_C)
-       ar r $@ $^
+qnx_SOURCES = qnx.c aout_qnx.c vout_qnx.c
index 1210e677bdc88d04e894f0f6c68795690301dd87..fbe3f49c0a2c4ce025ff458e73577e22edc0f5df 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME qnx 
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>                                           /* "intf_msg.h" */
 
 #include <sys/asoundlib.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 typedef struct aout_sys_s
 {
     snd_pcm_t  * p_pcm_handle;
index 07cc1b6802ad22d8de8e94f69e03cea54d58edd7..8c1cee4c9019998ebdeb2e0bf7fa01db8943cd9d 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME qnx 
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  ******************************************************************************/
index 13531ac48bcc1a0bdc83777cbff5e66fdeb2437d..dbf1c2dd71868f139c939d4097517ac0d2acf85b 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME qnx 
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 #include <photon/PtLabel.h>
 #include <photon/PdDirect.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * vout_sys_t: video output QNX method descriptor
  *****************************************************************************
index 6f900ee7e34be61fcebdbc2fe9fad0c622946014..102046de772720c4a9d6c074736f91b85786cf6d 100644 (file)
@@ -1,2 +1,6 @@
 *.moc
+*.lmoc
 .dep
+*.lo
+*.o.*
+*.lo.*
index 25c7a2acd0eaea3616aa76c022c382242fce5ad7..93a602cb152728a8ef778086e20df7396dd0770b 100644 (file)
@@ -1,43 +1,7 @@
-###############################################################################
-# vlc (VideoLAN Client) qt module Makefile
-# (c)2001 VideoLAN
-###############################################################################
+qt_SOURCES = qt.cpp intf_qt.cpp
+MOC_QT = intf_qt.moc
 
-#
-# Objects
-#
-
-PLUGIN_QT = qt.o intf_qt.o
-BUILTIN_QT = $(PLUGIN_QT:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_QT) $(BUILTIN_QT)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_QT): %.o: .dep/%.dpp
-$(PLUGIN_QT): %.o: %.moc
-       $(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -DPLUGIN -DMODULE_NAME=qt -c -o $@ $(<:%.moc=%.cpp)
-$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
-       grep -q Q_OBJECT $< && $(MOC) -i $< -o $@ || true
-
-$(BUILTIN_QT): BUILTIN_%.o: .dep/%.dpp
-$(BUILTIN_QT): %.o: %.moc
-       $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/qt -I${QTDIR}/include -DBUILTIN -DMODULE_NAME=qt -c -o $@ $(<:BUILTIN_%.moc=%.cpp)
-$(BUILTIN_QT:%.o=%.moc): BUILTIN_%.moc: %.cpp
-       grep -q Q_OBJECT $< && $(MOC) -i $< -o $@ || true
-
-#
-# Real targets
-#
-
-../qt.so: $(PLUGIN_QT)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_QT)
-
-../qt.a: $(BUILTIN_QT)
-       ar r $@ $^
-       $(RANLIB) $@
+EXTRA_DEP = $(MOC_QT)
 
+$(MOC_QT): %.moc: %.cpp
+       $(MOC) -i $< -o $@
index 93048b766397fd424a73c1b7331f78ad7fa8081c..80a06957e8c79c52f91749f35aa2ae3a36e4990d 100644 (file)
@@ -2,7 +2,7 @@
  * intf_qt.cpp: Qt interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_qt.cpp,v 1.9 2001/12/07 18:33:08 sam Exp $
+ * $Id: intf_qt.cpp,v 1.10 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 extern "C"
 {
 
-#define MODULE_NAME qt
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -49,9 +40,6 @@ extern "C"
 #include "intf_playlist.h"
 #include "interface.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 } /* extern "C" */
 
 #include <qapplication.h>
@@ -113,7 +101,7 @@ private slots:
     void Manage( void );
 
     void FileOpen  ( void );
-    void FileQuit  ( void ) { p_intf->b_die = 1; };
+    void FileQuit  ( void ) { qApp->quit(); };
 
     void PlaybackPlay  ( void );
     void PlaybackPause ( void );
@@ -139,11 +127,7 @@ private:
     QLabel     *p_date;
 };
 
-#ifdef BUILTIN
-#   include "BUILTIN_intf_qt.moc"
-#else
-#   include "intf_qt.moc"
-#endif
+#include "intf_qt.moc"
 
 #define SLIDER_MIN    0x00000
 #define SLIDER_MAX    0x10000
@@ -192,16 +176,6 @@ void _M( intf_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int intf_Probe( probedata_t *p_data )
 {
-    if( TestMethod( INTF_METHOD_VAR, "qt" ) )
-    {
-        return( 999 );
-    }
-
-    if( TestProgram( "qvlc" ) )
-    {
-        return( 180 );
-    }
-
     return( 80 );
 }
 
@@ -499,17 +473,13 @@ void IntfWindow::Manage( void )
         p_intf->b_menu_change = 0;
     }
 
-    /* Manage core vlc functions through the callback */
-    p_intf->pf_manage( p_intf );
-
     if( p_intf->b_die )
     {
-        /* Prepare to die, young Skywalker */
         qApp->quit();
-
-        /* Just in case */
-        return;
     }
+
+    /* Manage core vlc functions through the callback */
+    p_intf->pf_manage( p_intf );
 }
 
 /*****************************************************************************
index 0359766eb929b53408483036be007870aab0ae3b..d21bd0666a6a1bca4916fb36082f4893373e1f6d 100644 (file)
@@ -2,7 +2,7 @@
  * qt.cpp : Qt plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: qt.cpp,v 1.5 2001/12/09 17:01:37 sam Exp $
+ * $Id: qt.cpp,v 1.6 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME qt
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
 extern "C"
 {
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -51,14 +40,14 @@ void _M( intf_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for Qt module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
+    ADD_WINDOW( "Configuration for Qt module" )
+        ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "Qt interface module";
+    SET_DESCRIPTION( "Qt interface module" )
+    ADD_CAPABILITY( INTF, 80 )
+    ADD_PROGRAM( "qvlc" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 3ccd0eabac740e5cb48508be90ac31778036b704..76f44623c9b3c6d02fb1f7bec4caee4fc7ae3059 100644 (file)
@@ -1,39 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) sdl module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_SDL = sdl.o vout_sdl.o aout_sdl.o
-BUILTIN_SDL = $(PLUGIN_SDL:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_SDL) $(BUILTIN_SDL)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_SDL): %.o: .dep/%.d
-$(PLUGIN_SDL): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_SDL) -DPLUGIN -c -o $@ $<
-
-$(BUILTIN_SDL): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_SDL): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_SDL) -DBUILTIN -c -o $@ $<
-
-#
-# Real targets
-#
-
-../sdl.so: $(PLUGIN_SDL)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_SDL)
-
-../sdl.a: $(BUILTIN_SDL)
-       ar r $@ $^
-       $(RANLIB) $@
-
+sdl_SOURCES = sdl.c vout_sdl.c aout_sdl.c
index 65ac324caa7a251bd6ac76420c83547abbe0b637..865766d4cd4dbaea6fbbd8882a58cb5d8afbf938 100644 (file)
@@ -2,7 +2,7 @@
  * aout_sdl.c : audio sdl functions library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_sdl.c,v 1.21 2001/12/19 03:50:22 sam Exp $
+ * $Id: aout_sdl.c,v 1.22 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME sdl
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 
-#include SDL_INCLUDE_FILE
+#include <videolan/vlc.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include SDL_INCLUDE_FILE
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * aout_sys_t: dsp audio output method descriptor
  *****************************************************************************
@@ -142,11 +130,6 @@ static int aout_Probe( probedata_t *p_data )
     SDL_CloseAudio();
 #endif
 
-    if( TestMethod( AOUT_METHOD_VAR, "sdl" ) )
-    {
-        return( 999 );
-    }
-
     return( 40 );
 }
 
index 7ff3300de74fe35a056c8a17bd4a108139e5ce3d..6a1a3f21d2d895bf3f220173bc59ca880a80b1af 100644 (file)
@@ -2,7 +2,7 @@
  * sdl.c : SDL plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: sdl.c,v 1.18 2001/12/09 17:01:37 sam Exp $
+ * $Id: sdl.c,v 1.19 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME sdl
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 
 #include "video.h"
 #include "video_output.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Capabilities defined in the other files.
  *****************************************************************************/
@@ -57,15 +46,13 @@ void _M( vout_getfunctions )( function_list_t * p_function_list );
  * Building configuration tree
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for SDL module" )
-    ADD_COMMENT( "For now, the SDL module cannot be configured" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT
-                                | MODULE_CAPABILITY_AOUT;
-    p_module->psz_longname = "Simple DirectMedia Layer module";
+    SET_DESCRIPTION( "Simple DirectMedia Layer module" )
+    ADD_CAPABILITY( AOUT, 40 )
+    ADD_CAPABILITY( VOUT, 100 )
+    ADD_SHORTCUT( "sdl" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 549b408c8772de9db9b1b2fc2f1c7ed96fbe2c76..b2cf77f4c3dea97c8bd8692546cf561cd0c73726 100644 (file)
@@ -2,7 +2,7 @@
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_sdl.c,v 1.73 2001/12/20 15:43:15 sam Exp $
+ * $Id: vout_sdl.c,v 1.74 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME sdl
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 
+#include <videolan/vlc.h>
+
 #include <sys/types.h>
 #ifndef WIN32
 #   include <netinet/in.h>                            /* BSD: struct in_addr */
 
 #include SDL_INCLUDE_FILE
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
 #include "netutils.h"
-#include "tests.h"
 
 #include "video.h"
 #include "video_output.h"
@@ -57,9 +49,6 @@
 #include "stream_control.h"                 /* needed by input_ext-intf.h... */
 #include "input_ext-intf.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define SDL_MAX_DIRECTBUFFERS 5
 #define SDL_DEFAULT_BPP 16
 
@@ -77,6 +66,8 @@ typedef struct vout_sys_s
     int i_width;
     int i_height;
 
+    int i_surfaces;
+
     boolean_t   b_cursor;
     boolean_t   b_cursor_autohidden;
     mtime_t     i_lastmoved;
@@ -139,11 +130,6 @@ static int vout_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( VOUT_METHOD_VAR, "sdl" ) )
-    {
-        return( 999 );
-    }
-
     return( 100 );
 }
 
@@ -200,6 +186,7 @@ static int vout_Create( vout_thread_t *p_vout )
             * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
     }
 
+#if 0
     if( p_vout->p_sys->i_width <= 300 && p_vout->p_sys->i_height <= 300 )
     {
         p_vout->p_sys->i_width <<= 1;
@@ -210,6 +197,7 @@ static int vout_Create( vout_thread_t *p_vout )
         p_vout->p_sys->i_width += p_vout->p_sys->i_width >> 1;
         p_vout->p_sys->i_height += p_vout->p_sys->i_height >> 1;
     }
+#endif
 
     if( SDLOpenDisplay( p_vout ) )
     {
@@ -232,6 +220,8 @@ static int vout_Init( vout_thread_t *p_vout )
     int i_index;
     picture_t *p_pic;
 
+    p_vout->p_sys->i_surfaces = 0;
+
     I_OUTPUTPICTURES = 0;
 
     /* Initialize the output structure */
@@ -245,7 +235,14 @@ static int vout_Init( vout_thread_t *p_vout )
             break;
 
         default:
-            return( 0 );
+            /* All we have is a 16bpp image with square pixels */
+            /* FIXME: and if screen depth != 16 ?! */
+            p_vout->output.i_chroma = RGB_16BPP_PICTURE;
+            p_vout->output.i_width = p_vout->p_sys->i_width;
+            p_vout->output.i_height = p_vout->p_sys->i_height;
+            p_vout->output.i_aspect = p_vout->p_sys->i_width
+                             * VOUT_ASPECT_FACTOR / p_vout->p_sys->i_height;
+            break;
     }
 
     /* Try to initialize SDL_MAX_DIRECTBUFFERS direct buffers */
@@ -298,8 +295,21 @@ static void vout_End( vout_thread_t *p_vout )
     for( i_index = I_OUTPUTPICTURES ; i_index ; )
     {
         i_index--;
-        SDL_UnlockYUVOverlay( PP_OUTPUTPICTURE[ i_index ]->p_sys->p_overlay );
-        SDL_FreeYUVOverlay( PP_OUTPUTPICTURE[ i_index ]->p_sys->p_overlay );
+        switch( p_vout->output.i_chroma )
+        {
+            case YUV_420_PICTURE:
+                SDL_UnlockYUVOverlay(
+                        PP_OUTPUTPICTURE[ i_index ]->p_sys->p_overlay );
+                SDL_FreeYUVOverlay(
+                        PP_OUTPUTPICTURE[ i_index ]->p_sys->p_overlay );
+                break;
+
+            case RGB_16BPP_PICTURE:
+                break;
+
+            default:
+                break;
+        }
         free( PP_OUTPUTPICTURE[ i_index ]->p_sys );
     }
 }
@@ -522,9 +532,21 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
     disp.w = w;
     disp.h = h;
 
-    SDL_UnlockYUVOverlay( p_pic->p_sys->p_overlay);
-    SDL_DisplayYUVOverlay( p_pic->p_sys->p_overlay , &disp );
-    SDL_LockYUVOverlay( p_pic->p_sys->p_overlay);
+    switch( p_vout->output.i_chroma )
+    {
+        case RGB_16BPP_PICTURE:
+            SDL_Flip(p_vout->p_sys->p_display);
+            break;
+
+        case YUV_420_PICTURE:
+            SDL_UnlockYUVOverlay( p_pic->p_sys->p_overlay);
+            SDL_DisplayYUVOverlay( p_pic->p_sys->p_overlay , &disp );
+            SDL_LockYUVOverlay( p_pic->p_sys->p_overlay);
+            break;
+
+        default:
+            break;
+    }
 }
 
 /* following functions are local */
@@ -541,7 +563,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
     int    i_bpp;
 
     /* Initialize flags and cursor */
-    i_flags = SDL_ANYFORMAT | SDL_HWPALETTE | SDL_HWSURFACE;
+    i_flags = SDL_ANYFORMAT | SDL_HWPALETTE | SDL_HWSURFACE | SDL_DOUBLEBUF;
     i_flags |= p_vout->b_fullscreen ? SDL_FULLSCREEN : SDL_RESIZABLE;
 
     i_bpp = SDL_VideoModeOK( p_vout->p_sys->i_width, p_vout->p_sys->i_height,
@@ -612,14 +634,37 @@ static void SDLCloseDisplay( vout_thread_t *p_vout )
  *****************************************************************************/
 static int SDLNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 {
+#define P p_pic->planes
     int i_width  = p_vout->output.i_width;
     int i_height = p_vout->output.i_height;
 
     switch( p_vout->output.i_chroma )
     {
+        case RGB_16BPP_PICTURE:
+            if( p_vout->p_sys->i_surfaces )
+            {
+                /* We already allocated this surface, return */
+                return -1;
+            }
+
+            p_pic->p_sys = malloc( sizeof( picture_sys_t ) );
+
+            if( p_pic->p_sys == NULL )
+            {
+                return -1;
+            }
+
+            P[ RGB_PLANE ].p_data = p_vout->p_sys->p_display->pixels;
+            P[ RGB_PLANE ].i_bytes = 2 * i_width * i_height;
+            P[ RGB_PLANE ].i_line_bytes = 2 * i_width;
+
+            p_vout->p_sys->i_surfaces++;
+
+            p_pic->i_planes = 1;
+
+            return 0;
+
         case YUV_420_PICTURE:
-            /* We know this 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 )
@@ -640,23 +685,18 @@ static int SDLNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 
             SDL_LockYUVOverlay( p_pic->p_sys->p_overlay );
 
-            /* Precalculate some values */
-            p_pic->i_size         = i_width * i_height;
-            p_pic->i_chroma_width = i_width / 2;
-            p_pic->i_chroma_size  = i_height * ( i_width / 2 );
-
             /* FIXME: try to get the right i_bytes value from p_overlay */
-            p_pic->planes[ Y_PLANE ].p_data = p_pic->p_sys->p_overlay->pixels[ 0 ];
-            p_pic->planes[ Y_PLANE ].i_bytes = p_pic->i_size * sizeof( u8 );
-            p_pic->planes[ Y_PLANE ].i_line_bytes = i_width * sizeof( u8 );
+            P[ Y_PLANE ].p_data = p_pic->p_sys->p_overlay->pixels[ 0 ];
+            P[ Y_PLANE ].i_bytes = i_width * i_height;
+            P[ Y_PLANE ].i_line_bytes = i_width;
 
-            p_pic->planes[ U_PLANE ].p_data = p_pic->p_sys->p_overlay->pixels[ 2 ];
-            p_pic->planes[ U_PLANE ].i_bytes = p_pic->i_size * sizeof( u8 ) / 4;
-            p_pic->planes[ U_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof( u8 );
+            P[ U_PLANE ].p_data = p_pic->p_sys->p_overlay->pixels[ 2 ];
+            P[ U_PLANE ].i_bytes = i_width * i_height / 4;
+            P[ U_PLANE ].i_line_bytes = i_width / 2;
 
-            p_pic->planes[ V_PLANE ].p_data = p_pic->p_sys->p_overlay->pixels[ 1 ];
-            p_pic->planes[ V_PLANE ].i_bytes = p_pic->i_size * sizeof( u8 ) / 4;
-            p_pic->planes[ V_PLANE ].i_line_bytes = p_pic->i_chroma_width * sizeof( u8 );
+            P[ V_PLANE ].p_data = p_pic->p_sys->p_overlay->pixels[ 1 ];
+            P[ V_PLANE ].i_bytes = i_width * i_height / 4;
+            P[ V_PLANE ].i_line_bytes = i_width / 2;
 
             p_pic->i_planes = 3;
 
@@ -666,7 +706,8 @@ static int SDLNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
             /* Unknown chroma, tell the guy to get lost */
             p_pic->i_planes = 0;
 
-            return 0;
+            return -1;
     }
+#undef P
 }
 
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index bce1907cb9adda093f822f0a89b41b3338705d1b..47e79e14e5fafbaad31cf6754a7ea50a802c99ab 100644 (file)
@@ -1,29 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) MPEG audio decoder module makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-PLUGIN_C = spu_decoder.o
-BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../spudec.so: $(PLUGIN_C)
-       $(CC) -o $@ $^ $(PLCFLAGS) 
-
-../spudec.a: $(BUILTIN_C)
-       ar r $@ $^
-       $(RANLIB) $@
-
+spudec_SOURCES = spu_decoder.c
index 4869e21ea14dd6b487eb43b4da745c49ad8076b4..5a436033a338ab00db045ce4a7bd5ff5ae2cc64a 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.5 2001/12/30 05:38:44 sam Exp $
+ * $Id: spu_decoder.c,v 1.6 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME spudec
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
+#include <stdlib.h>                                      /* malloc(), free() */
+#include <string.h>                                    /* memcpy(), memset() */
+
+#include <videolan/vlc.h>
 
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>                                              /* getpid() */
+#   include <unistd.h>                                           /* getpid() */
 #endif
 
 #ifdef WIN32                   /* getpid() for win32 is located in process.h */
-#include <process.h>
+#   include <process.h>
 #endif
 
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>                                    /* memcpy(), memset() */
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "video.h"
 #include "video_output.h"
 
@@ -53,9 +45,6 @@
 
 #include "spu_decoder.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -82,13 +71,11 @@ void _M( spudec_getfunctions )( function_list_t * p_function_list )
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for SPU decoder module" )
-    ADD_COMMENT( "Nothing to configure" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_DEC;
-    p_module->psz_longname = "subtitles decoder module";
+    SET_DESCRIPTION( "DVD subtitles decoder module" )
+    ADD_CAPABILITY( DECODER, 50 )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -106,10 +93,7 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static int decoder_Probe( probedata_t *p_data )
 {
-    if( p_data->i_type == DVD_SPU_ES )
-        return( 50 );
-    else
-        return( 0 );
+    return ( p_data->i_type == DVD_SPU_ES ) ? 50 : 0;
 }
 
 /*****************************************************************************
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index ea58661848c70d8b443dea6a7b86a974c64a4337..e4af72a3c134ac21b0fea8d6befdb903e3288d03 100644 (file)
@@ -1,42 +1,2 @@
-###############################################################################
-# vlc (VideoLAN Client) text module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_NCURSES = ncurses.o intf_ncurses.o
-PLUGIN_RC = rc.o intf_rc.o
-BUILTIN_NCURSES = $(PLUGIN_NCURSES:%.o=BUILTIN_%.o)
-BUILTIN_RC = $(PLUGIN_RC:%.o=BUILTIN_%.o)
-
-PLUGIN_C = $(PLUGIN_NCURSES) $(PLUGIN_RC)
-BUILTIN_C = $(BUILTIN_NCURSES) $(BUILTIN_RC)
-ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-#
-# Real targets
-#
-
-../ncurses.so: $(PLUGIN_NCURSES)
-       $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_NCURSES)
-
-../ncurses.a: $(BUILTIN_NCURSES)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../rc.so: $(PLUGIN_RC)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_RC)
-
-../rc.a: $(BUILTIN_RC)
-       ar r $@ $^
-       $(RANLIB) $@
-
+ncurses_SOURCES = ncurses.c
+rc_SOURCES = rc.c
diff --git a/plugins/text/intf_ncurses.c b/plugins/text/intf_ncurses.c
deleted file mode 100644 (file)
index f286bf6..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * intf_ncurses.c: ncurses interface
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: intf_ncurses.c,v 1.7 2001/12/07 18:33:08 sam Exp $
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#define MODULE_NAME ncurses
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-#include <stdio.h>
-
-#include <curses.h>
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "stream_control.h"
-#include "input_ext-intf.h"
-
-#include "interface.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * intf_sys_t: description and status of ncurses interface
- *****************************************************************************/
-typedef struct intf_sys_s
-{
-    /* special actions */
-    vlc_mutex_t         change_lock;                      /* the change lock */
-
-} intf_sys_t;
-
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-static int  intf_Probe     ( probedata_t *p_data );
-static int  intf_Open      ( intf_thread_t *p_intf );
-static void intf_Close     ( intf_thread_t *p_intf );
-static void intf_Run       ( intf_thread_t *p_intf );
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = intf_Probe;
-    p_function_list->functions.intf.pf_open  = intf_Open;
-    p_function_list->functions.intf.pf_close = intf_Close;
-    p_function_list->functions.intf.pf_run   = intf_Run;
-}
-
-/*****************************************************************************
- * intf_Probe: probe the interface and return a score
- *****************************************************************************
- * This function tries to initialize ncurses and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    if( TestMethod( INTF_METHOD_VAR, "ncurses" ) )
-    {
-        return( 999 );
-    }
-
-    return( 40 );
-}
-
-/*****************************************************************************
- * intf_Open: initialize and create window
- *****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
-{
-    /* Allocate instance and initialize some members */
-    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
-    if( p_intf->p_sys == NULL )
-    {
-        intf_ErrMsg( "intf error: %s", strerror(ENOMEM) );
-        return( 1 );
-    }
-
-    /* Initialize the curses library */
-    initscr();
-    /* Don't do NL -> CR/NL */
-    nonl();
-    /* Take input chars one at a time */
-    cbreak();
-    /* Don't echo */
-    noecho();
-
-    curs_set(0);
-    timeout(0);
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * intf_Close: destroy interface window
- *****************************************************************************/
-static void intf_Close( intf_thread_t *p_intf )
-{
-    /* Close the ncurses interface */
-    endwin();
-
-    /* Destroy structure */
-    free( p_intf->p_sys );
-}
-
-/*****************************************************************************
- * intf_Run: ncurses thread
- *****************************************************************************/
-static void intf_Run( intf_thread_t *p_intf )
-{
-    signed char i_key;
-
-    while( !p_intf->b_die )
-    {
-        p_intf->pf_manage( p_intf );
-
-        msleep( INTF_IDLE_SLEEP );
-
-        mvaddstr( 1, 2, VOUT_TITLE " (ncurses interface)" );
-        mvaddstr( 3, 2, "keys:" );
-        mvaddstr( 4, 2, "Q,q.......quit" );
-        //mvaddstr( 5, 2, "No other keys are active yet." );
-
-        while( (i_key = getch()) != -1 )
-       {
-            switch( i_key )
-            {
-                case 'q':
-                case 'Q':
-                    p_intf->b_die = 1;
-                    break;
-
-                default:
-                    break;
-            }
-        }
-    }
-}
-
-/* following functions are local */
-
diff --git a/plugins/text/intf_rc.c b/plugins/text/intf_rc.c
deleted file mode 100644 (file)
index ead0d39..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-/*****************************************************************************
- * intf_rc.cpp: remote control interface
- *****************************************************************************
- * Copyright (C) 1999-2001 VideoLAN
- * $Id: intf_rc.cpp,v 0.1 2001/04/27 shurdeek
- *
- * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
- *
- * 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.
- *****************************************************************************/
-
-#define MODULE_NAME rc
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
-#if defined( WIN32 )
-#include <winsock2.h>                                            /* select() */
-#endif
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "stream_control.h"
-#include "input_ext-intf.h"
-
-#include "intf_playlist.h"
-#include "interface.h"
-
-#include "video.h"
-#include "video_output.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * intf_sys_t: description and status of rc interface
- *****************************************************************************/
-typedef struct intf_sys_s
-{
-    vlc_mutex_t         change_lock;
-
-} intf_sys_t;
-
-#define MAX_LINE_LENGTH 256
-
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-static int  intf_Probe     ( probedata_t *p_data );
-static int  intf_Open      ( intf_thread_t *p_intf );
-static void intf_Close     ( intf_thread_t *p_intf );
-static void intf_Run       ( intf_thread_t *p_intf );
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = intf_Probe;
-    p_function_list->functions.intf.pf_open  = intf_Open;
-    p_function_list->functions.intf.pf_close = intf_Close;
-    p_function_list->functions.intf.pf_run   = intf_Run;
-}
-
-/*****************************************************************************
- * intf_Probe: probe the interface and return a score
- *****************************************************************************
- * This function tries to initialize rc and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    if( TestMethod( INTF_METHOD_VAR, "rc" ) )
-    {
-        return( 999 );
-    }
-
-    return( 2 );
-}
-
-/*****************************************************************************
- * intf_Open: initialize and create stuff
- *****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
-{
-    /* Non-buffered stdout */
-    setvbuf( stdout, (char *)NULL, _IOLBF, 0 );
-
-    /* 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) );
-        return( 1 );
-    }
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * intf_Close: destroy interface stuff
- *****************************************************************************/
-static void intf_Close( intf_thread_t *p_intf )
-{
-    /* Destroy structure */
-    free( p_intf->p_sys );
-}
-
-/*****************************************************************************
- * intf_Run: rc thread
- *****************************************************************************
- * This part of the interface is in a separate thread so that we can call
- * exec() from within it without annoying the rest of the program.
- *****************************************************************************/
-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? */
-    struct timeval tv;                                   /* how long to wait */
-
-    double    f_cpos;
-    double    f_ratio = 1;
-
-    while( !p_intf->b_die )
-    {
-#define S p_intf->p_input->stream
-        if( p_intf->p_input != NULL )
-        {
-            /* Get position */
-            if( 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 ) );
-                }
-            }
-       }
-#undef S
-
-        b_complete = 0;
-        i_cmd_pos = 0;
-
-        /* Check stdin */
-        tv.tv_sec = 0;
-        tv.tv_usec = 50000;
-        FD_ZERO( &fds );
-        FD_SET( STDIN_FILENO, &fds );
-
-        if( select( 32, &fds, NULL, NULL, &tv ) )
-        {
-            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_cmd_pos++;
-            }
-
-            if( i_cmd_pos == MAX_LINE_LENGTH
-                 || p_cmd[ i_cmd_pos ] == '\r'
-                 || p_cmd[ i_cmd_pos ] == '\n' )
-            {
-                p_cmd[ i_cmd_pos ] = 0;
-                b_complete = 1;
-            }
-        }
-
-        /* Is there something to do? */
-        if( b_complete == 1 )
-        {
-            switch( p_cmd[ 0 ] )
-            {
-            case 'p':
-            case 'P':
-                if( p_intf->p_input != NULL )
-                {
-                    input_SetStatus( p_intf->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 )
-                {
-                    p_vout_bank->pp_vout[0]->i_changes
-                                      |= VOUT_FULLSCREEN_CHANGE;
-                }
-                vlc_mutex_unlock( &p_vout_bank->lock );
-                break;
-
-            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
-                break;
-
-            case 's':
-            case 'S':
-                ;
-                break;
-
-            case 'q':
-            case 'Q':
-                p_intf->b_die = 1;
-                break;
-
-            case 'r':
-            case 'R':
-                if( p_intf->p_input != NULL )
-                {
-                    for( i_dummy = 1;
-                         i_dummy < MAX_LINE_LENGTH && p_cmd[ i_dummy ] >= '0'
-                                                   && p_cmd[ i_dummy ] <= '9';
-                         i_dummy++ )
-                    {
-                        ;
-                    }
-
-                    p_cmd[ i_dummy ] = 0;
-                    f_cpos = atof( p_cmd + 1 );
-                    input_Seek( p_intf->p_input, (off_t) (f_cpos / f_ratio) );
-                    /* rcreseek(f_cpos); */
-                }
-                break;
-
-            default:
-                intf_Msg( "rc: unknown command `%s'", p_cmd );
-                break;
-            }
-        }
-
-        p_intf->pf_manage( p_intf );
-        msleep( INTF_IDLE_SLEEP );
-    }
-}
-
index 13c2599629aa83463b1dfedaacb9ca2c7a550317..8dd8663a067b29dd65a03b0a7965c6d37a4e1abe 100644 (file)
@@ -2,7 +2,7 @@
  * ncurses.c : NCurses plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ncurses.c,v 1.8 2001/12/09 17:01:37 sam Exp $
+ * $Id: ncurses.c,v 1.9 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME ncurses
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
+#include <errno.h>                                                 /* ENOMEM */
+#include <stdio.h>
+
+#include <curses.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
-#include "modules.h"
-#include "modules_export.h"
+#include "stream_control.h"
+#include "input_ext-intf.h"
+
+#include "interface.h"
 
 /*****************************************************************************
- * Capabilities defined in the other files.
+ * Local prototypes.
  *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list );
+static void intf_getfunctions ( function_list_t * p_function_list );
+static int  intf_Probe        ( probedata_t *p_data );
+static int  intf_Open         ( intf_thread_t *p_intf );
+static void intf_Close        ( intf_thread_t *p_intf );
+static void intf_Run          ( intf_thread_t *p_intf );
 
 /*****************************************************************************
  * Building configuration tree
@@ -57,12 +59,122 @@ MODULE_INIT_START
     p_module->i_capabilities = MODULE_CAPABILITY_NULL
                                 | MODULE_CAPABILITY_INTF;
     p_module->psz_longname = "ncurses interface module";
+    ADD_SHORTCUT( "ncurses" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
+    intf_getfunctions( &p_module->p_functions->intf );
 MODULE_ACTIVATE_STOP
 
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
+/*****************************************************************************
+ * intf_sys_t: description and status of ncurses interface
+ *****************************************************************************/
+typedef struct intf_sys_s
+{
+    /* special actions */
+    vlc_mutex_t         change_lock;                      /* the change lock */
+
+} intf_sys_t;
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+static void intf_getfunctions( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = intf_Probe;
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+/*****************************************************************************
+ * intf_Probe: probe the interface and return a score
+ *****************************************************************************
+ * This function tries to initialize ncurses and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+static int intf_Probe( probedata_t *p_data )
+{
+    return( 40 );
+}
+
+/*****************************************************************************
+ * intf_Open: initialize and create window
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        intf_ErrMsg( "intf error: %s", strerror(ENOMEM) );
+        return( 1 );
+    }
+
+    /* Initialize the curses library */
+    initscr();
+    /* Don't do NL -> CR/NL */
+    nonl();
+    /* Take input chars one at a time */
+    cbreak();
+    /* Don't echo */
+    noecho();
+
+    curs_set(0);
+    timeout(0);
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * intf_Close: destroy interface window
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Close the ncurses interface */
+    endwin();
+
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * intf_Run: ncurses thread
+ *****************************************************************************/
+static void intf_Run( intf_thread_t *p_intf )
+{
+    signed char i_key;
+
+    while( !p_intf->b_die )
+    {
+        p_intf->pf_manage( p_intf );
+
+        msleep( INTF_IDLE_SLEEP );
+
+        mvaddstr( 1, 2, VOUT_TITLE " (ncurses interface)" );
+        mvaddstr( 3, 2, "keys:" );
+        mvaddstr( 4, 2, "Q,q.......quit" );
+        //mvaddstr( 5, 2, "No other keys are active yet." );
+
+        while( (i_key = getch()) != -1 )
+       {
+            switch( i_key )
+            {
+                case 'q':
+                case 'Q':
+                    p_intf->b_die = 1;
+                    break;
+
+                default:
+                    break;
+            }
+        }
+    }
+}
+
+/* following functions are local */
+
index 3108f01ae3352ead34646b19ce8e0c7f0a027ee6..615521df80d5686dc28c7d07f71d3e88b029c24b 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * rc.cpp : remote control stdin/stdout plugin for vlc
+ * rc.c : remote control stdin/stdout plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: rc.cpp,v 0.1 2001/04/27 shurdeek
+ * $Id: rc.c,v 1.7 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME rc
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <errno.h>                                                 /* ENOMEM */
+#include <stdio.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+#include <videolan/vlc.h>
+
+#if defined( WIN32 )
+#include <winsock2.h>                                            /* select() */
+#endif
 
-#include "modules.h"
-#include "modules_export.h"
+#include "stream_control.h"
+#include "input_ext-intf.h"
+
+#include "intf_playlist.h"
+#include "interface.h"
+
+#include "video.h"
+#include "video_output.h"
 
 /*****************************************************************************
- * Capabilities defined in the other files.
+ * intf_sys_t: description and status of rc interface
  *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list );
+typedef struct intf_sys_s
+{
+    vlc_mutex_t         change_lock;
+
+} intf_sys_t;
+
+#define MAX_LINE_LENGTH 256
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+static void intf_getfunctions ( function_list_t * p_function_list );
+static int  intf_Probe        ( probedata_t *p_data );
+static int  intf_Open         ( intf_thread_t *p_intf );
+static void intf_Close        ( intf_thread_t *p_intf );
+static void intf_Run          ( intf_thread_t *p_intf );
 
 /*****************************************************************************
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for rc module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INTF;
-    p_module->psz_longname = "remote control interface module";
+    SET_DESCRIPTION( "remote control interface module" )
+    ADD_CAPABILITY( INTF, 20 )
+    ADD_SHORTCUT( "rc" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
+    intf_getfunctions( &p_module->p_functions->intf );
 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 intf_getfunctions( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = intf_Probe;
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+/*****************************************************************************
+ * intf_Probe: probe the interface and return a score
+ *****************************************************************************
+ * This function tries to initialize rc and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+static int intf_Probe( probedata_t *p_data )
+{
+    return( 20 );
+}
+
+/*****************************************************************************
+ * intf_Open: initialize and create stuff
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    /* Non-buffered stdout */
+    setvbuf( stdout, (char *)NULL, _IOLBF, 0 );
+
+    /* 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) );
+        return( 1 );
+    }
+
+    intf_Msg( "rc: remote control interface initialized, `h' for help" );
+    return( 0 );
+}
+
+/*****************************************************************************
+ * intf_Close: destroy interface stuff
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * intf_Run: rc thread
+ *****************************************************************************
+ * This part of the interface is in a separate thread so that we can call
+ * exec() from within it without annoying the rest of the program.
+ *****************************************************************************/
+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? */
+    struct timeval tv;                                   /* how long to wait */
+
+    double    f_cpos;
+    double    f_ratio = 1;
+
+    while( !p_intf->b_die )
+    {
+#define S p_intf->p_input->stream
+        if( p_intf->p_input != NULL )
+        {
+            /* Get position */
+            if( 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 ) );
+                }
+            }
+       }
+#undef S
+
+        b_complete = 0;
+        i_cmd_pos = 0;
+
+        /* Check stdin */
+        tv.tv_sec = 0;
+        tv.tv_usec = 50000;
+        FD_ZERO( &fds );
+        FD_SET( STDIN_FILENO, &fds );
+
+        if( select( 32, &fds, NULL, NULL, &tv ) )
+        {
+            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_cmd_pos++;
+            }
+
+            if( i_cmd_pos == MAX_LINE_LENGTH
+                 || p_cmd[ i_cmd_pos ] == '\r'
+                 || p_cmd[ i_cmd_pos ] == '\n' )
+            {
+                p_cmd[ i_cmd_pos ] = 0;
+                b_complete = 1;
+            }
+        }
+
+        /* Is there something to do? */
+        if( b_complete == 1 )
+        {
+            switch( p_cmd[ 0 ] )
+            {
+            case 'a':
+            case 'A':
+                if( p_cmd[ 1 ] == ' ' )
+                {
+                    intf_PlaylistAdd( p_main->p_playlist,
+                                      PLAYLIST_END, p_cmd + 2 );
+                    if( p_intf->p_input != NULL )
+                    {
+                        p_intf->p_input->b_eof = 1;
+                    }
+                    intf_PlaylistJumpto( p_main->p_playlist,
+                                         p_main->p_playlist->i_size - 2 );
+                }
+                break;
+
+            case 'p':
+            case 'P':
+                if( p_intf->p_input != NULL )
+                {
+                    input_SetStatus( p_intf->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 )
+                {
+                    p_vout_bank->pp_vout[0]->i_changes
+                                      |= VOUT_FULLSCREEN_CHANGE;
+                }
+                vlc_mutex_unlock( &p_vout_bank->lock );
+                break;
+
+            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
+                break;
+
+            case 's':
+            case 'S':
+                ;
+                break;
+
+            case 'q':
+            case 'Q':
+                p_intf->b_die = 1;
+                break;
+
+            case 'r':
+            case 'R':
+                if( p_intf->p_input != NULL )
+                {
+                    for( i_dummy = 1;
+                         i_dummy < MAX_LINE_LENGTH && p_cmd[ i_dummy ] >= '0'
+                                                   && p_cmd[ i_dummy ] <= '9';
+                         i_dummy++ )
+                    {
+                        ;
+                    }
+
+                    p_cmd[ i_dummy ] = 0;
+                    f_cpos = atof( p_cmd + 1 );
+                    input_Seek( p_intf->p_input, (off_t) (f_cpos / f_ratio) );
+                    /* rcreseek(f_cpos); */
+                }
+                break;
+
+            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" );
+                break;
+
+            default:
+                intf_Msg( "rc: unknown command `%s'", p_cmd );
+                break;
+            }
+        }
+
+        p_intf->pf_manage( p_intf );
+        msleep( INTF_IDLE_SLEEP );
+    }
+}
+
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 5d7907922aa713fcb68439d2d2f65195898fb26b..461ef1e14101764fe6b0e89fe4efaf980a402832 100644 (file)
@@ -1,40 +1 @@
-###############################################################################
-# vlc (VideoLAN Client) dvd module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_VCD = vcd.o input_vcd.o linux_cdrom_tools.o
-BUILTIN_VCD = $(PLUGIN_VCD:%.o=BUILTIN_%.o)
-
-ALL_OBJ = $(PLUGIN_VCD) $(BUILTIN_VCD)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-$(PLUGIN_VCD): %.o: .dep/%.d
-$(PLUGIN_VCD): %.o: %.c
-       $(CC) $(CFLAGS_VCD) $(CFLAGS) $(PCFLAGS) -DPLUGIN -c -o $@ $<
-
-$(BUILTIN_VCD): BUILTIN_%.o: .dep/%.d
-$(BUILTIN_VCD): BUILTIN_%.o: %.c
-       $(CC) $(CFLAGS_VCD) $(CFLAGS) -DBUILTIN -c -o $@ $<
-
-#
-# Real targets
-#
-
-../vcd.so: $(PLUGIN_VCD)
-       $(CC) -o $@ $(PLUGIN_VCD) $(PLCFLAGS)
-
-../vcd.a: $(BUILTIN_VCD)
-       ar r $@ $(BUILTIN_VCD)
-       $(RANLIB) $@
-
-
+vcd_SOURCES = vcd.c input_vcd.c linux_cdrom_tools.c
index b1e691b82a6cb9b47dee78e9e539f0d7517cb250..c3ef1298e03e368ef0ff785c0aa291ec90ef1944 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME vcd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
 #   include <sys/uio.h>                                      /* struct iovec */
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
 #if defined( WIN32 )
 #   include "input_iovec.h"
 #endif
@@ -67,9 +58,6 @@
 
 #include "debug.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #include "input_vcd.h"
 #include "linux_cdrom_tools.h"
 
@@ -145,12 +133,7 @@ static int VCDProbe( probedata_t *p_data )
     input_thread_t * p_input = (input_thread_t *)p_data;
 
     char * psz_name = p_input->p_source;
-    int i_score = 5;
-
-    if( TestMethod( INPUT_METHOD_VAR, "vcd" ) )
-    {
-        return( 999 );
-    }
+    int i_score = 0;
 
     if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "vcd:", 4 ) )
     {
@@ -188,7 +171,7 @@ static void VCDOpen( struct input_thread_s *p_input )
     else
     {
         p_input->i_handle
-            = open( p_input->p_source + 4, O_RDONLY | O_NONBLOCK );
+            = open( p_input->p_source, O_RDONLY | O_NONBLOCK );
     }
 
     if( p_input->i_handle == -1 )
@@ -230,18 +213,28 @@ static void VCDInit( input_thread_t * p_input )
 
     if( (p_input->p_method_data = input_BuffersInit()) == NULL )
     {
+        free( p_vcd );
         p_input->b_error = 1;
         return;
     }
 
     p_vcd->i_handle = p_input->i_handle;
-    p_vcd->b_end_of_track = 0;
 
-    /* we read the Table Of Content information */
-    if ( VCDReadToc( p_vcd ) == -1 )
+    /* We read the Table Of Content information */
+    p_vcd->nb_tracks = ioctl_GetTrackCount( p_input->i_handle );
+    if( p_vcd->nb_tracks < 0 )
     {
-        intf_ErrMsg( "vcd error: could not read TOC" );
         input_BuffersEnd( p_input->p_method_data );
+        free( p_vcd );
+        p_input->b_error = 1;
+        return;
+    }
+
+    p_vcd->p_sectors = ioctl_GetSectors( p_input->i_handle );
+    if ( p_vcd->p_sectors == NULL )
+    {
+        input_BuffersEnd( p_input->p_method_data );
+        free( p_vcd );
         p_input->b_error = 1;
         return;
     }
@@ -255,7 +248,6 @@ static void VCDInit( input_thread_t * p_input )
     /* disc input method */
     p_input->stream.i_method = INPUT_METHOD_VCD;
 
-
 #define area p_input->stream.pp_areas
     for( i = 1 ; i <= p_vcd->nb_tracks - 1 ; i++ )
     {
@@ -265,8 +257,9 @@ static void VCDInit( input_thread_t * p_input )
         area[i]->i_id = i;
 
         /* Absolute start offset and size */
-        area[i]->i_start = p_vcd->p_sectors[i];
-        area[i]->i_size = p_vcd->p_sectors[i+1] - p_vcd->p_sectors[i];
+        area[i]->i_start = (off_t)p_vcd->p_sectors[i] * (off_t)VCD_DATA_SIZE;
+        area[i]->i_size = (off_t)(p_vcd->p_sectors[i+1] - p_vcd->p_sectors[i])
+                           * (off_t)VCD_DATA_SIZE;
 
         /* Number of chapters */
         area[i]->i_part_nb = 0;   // will be the entry points
@@ -307,7 +300,7 @@ static void VCDInit( input_thread_t * p_input )
     input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
     p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
 
-    /* No PSM to read in disc mode, we already have all information */
+    /* No PSM to read in disc mode, we already have all the information */
     p_input->stream.p_selected_program->b_is_ok = 1;
 
     p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xe0, 0 );
@@ -320,8 +313,7 @@ static void VCDInit( input_thread_t * p_input )
         input_SelectES( p_input, p_es );
     }
 
-    p_es = input_AddES( p_input,
-                p_input->stream.p_selected_program, 0xc0, 0 );
+    p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xc0, 0 );
     p_es->i_stream_id = 0xc0;
     p_es->i_type = MPEG1_AUDIO_ES;
     p_es->b_audio = 1;
@@ -342,11 +334,11 @@ static void VCDEnd( input_thread_t * p_input )
 {
     thread_vcd_data_t *     p_vcd;
 
+    input_BuffersEnd( p_input->p_method_data );
+
     p_vcd = (thread_vcd_data_t*)p_input->p_plugin_data;
 
     free( p_vcd );
-
-    input_BuffersEnd( p_input->p_method_data );
 }
 
 /*****************************************************************************
@@ -409,6 +401,7 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
     int                     i_packet;
     u32                     i_header;
     byte_t                  p_buffer[ VCD_DATA_SIZE ];
+    boolean_t               b_eot = 0; /* end of track */
     /* boolean_t               b_eoc; No chapters yet */
 
     p_vcd = (thread_vcd_data_t *)p_input->p_plugin_data;
@@ -416,32 +409,44 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
     i_packet = 0;
     *pp_data = NULL;
 
-    while( i_packet < VCD_DATA_ONCE && !p_vcd->b_end_of_track )
+    while( i_packet < VCD_DATA_ONCE )
     {
-        if ( VCDReadSector( p_vcd, p_buffer ) == -1 )
+        if( ioctl_ReadSector( p_vcd->i_handle, p_vcd->i_sector, p_buffer ) )
+        {
+            /* Read error, but assume we reached the end of the track */
+            b_eot = 1;
+            break;
+        }
+
+        p_vcd->i_sector++;
+
+        if( p_vcd->i_sector >= p_vcd->p_sectors[p_vcd->i_track + 1] )
         {
-            return -1;
+            b_eot = 1;
+            break;
         }
 
         i_index = 0;
 
-        while( i_index < BUFFER_SIZE - 6
-                && !p_vcd->b_end_of_track
-                && i_packet < VCD_DATA_ONCE )
+        while( i_index < BUFFER_SIZE-6 && i_packet < VCD_DATA_ONCE )
         {
             i_header = U32_AT(p_buffer + i_index);
 
-            /* This is not the startcode of a packet. Read the stream
-             * until we find one. */
+            /* 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. */
+            while( !i_header && (++i_index < BUFFER_SIZE - 4) )
+            {
+                i_header = U32_AT(p_buffer + i_index);
+            }
+
             if( !i_header )
             {
-                /* 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( 12, "vcd warning: garbage at input" );
+                intf_WarnMsg( 12, "vcd warning: zero-padded packet" );
                 break;
             }
 
+            /* Read the stream until we find a startcode. */
             while( (i_header & 0xFFFFFF00) != 0x100L
                      && (++i_index < BUFFER_SIZE - 4) )
             {
@@ -450,13 +455,12 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
 
             if( (i_header & 0xFFFFFF00) != 0x100L )
             {
-                intf_WarnMsg( 3, "vcd warning: no packet at sector %d\n",
+                intf_WarnMsg( 3, "vcd warning: no packet at sector %d",
                                  p_vcd->i_sector - 1 );
                 break; /* go to the next sector */
             }
-#ifdef DEBUG
-            intf_DbgMsg( "packet start code : %X\n", i_header );
-#endif
+
+            intf_DbgMsg( "packet start code : %X", i_header );
 
             switch( i_header )
             {
@@ -479,7 +483,8 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
                     }
                     else
                     {
-                        intf_ErrMsg( "Unable to determine stream type" );
+                        intf_ErrMsg( "vcd error: unable to determine "
+                                     "stream type" );
                         return( -1 );
                     }
                     break;
@@ -491,8 +496,8 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
                     break;
             }
 
-            intf_DbgMsg("i_index : %d\n", i_index);
-            intf_DbgMsg("i_packet_size : %d\n", i_packet_size);
+            intf_DbgMsg( "i_index : %d", i_index );
+            intf_DbgMsg( "i_packet_size : %d", i_packet_size );
 
             if ( i_index + i_packet_size > BUFFER_SIZE )
             {
@@ -513,8 +518,8 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
 
             if( U32_AT(p_buffer) != 0x1B9 )
             {
-                p_main->fast_memcpy( p_data->p_demux_start, p_buffer + i_index,
-                                     6 + i_packet_size );
+                FAST_MEMCPY( p_data->p_demux_start, p_buffer + i_index,
+                             6 + i_packet_size );
                 i_index += ( 6 + i_packet_size );
             }
             else
@@ -535,17 +540,20 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
     vlc_mutex_lock( &p_input->stream.stream_lock );
 
     p_input->stream.p_selected_area->i_tell =
-        p_vcd->i_sector - p_input->stream.p_selected_area->i_start;
+        (off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE
+          - p_input->stream.p_selected_area->i_start;
 
     /* no chapter for the moment*/
-    /*if( b_eoc )
+#if 0
+    if( b_eoc )
     {
-        * We modify i_part only at end of chapter not to erase
-         * some modification from the interface *
+        /* We modify i_part only at end of chapter not to erase
+         * some modification from the interface */
         p_input->stream.p_selected_area->i_part = p_vcd->i_chapter;
-    }*/
+    }
+#endif
 
-    if( p_vcd->b_end_of_track )
+    if( b_eot )
     {
         input_area_t *p_area;
 
@@ -558,8 +566,6 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
 
         intf_WarnMsg( 4, "vcd info: new title" );
 
-        p_vcd->b_end_of_track = 0;
-
         p_area = p_input->stream.pp_areas[
                                  p_input->stream.p_selected_area->i_id + 1 ];
 
@@ -589,9 +595,11 @@ static void VCDSeek( input_thread_t * p_input, off_t i_off )
 
     p_vcd = (thread_vcd_data_t *) p_input->p_plugin_data;
 
-    p_vcd->i_sector = p_vcd->p_sectors[p_vcd->i_track] + i_off;
+    p_vcd->i_sector = p_vcd->p_sectors[p_vcd->i_track]
+                       + i_off / (off_t)VCD_DATA_SIZE;
 
-    p_input->stream.p_selected_area->i_tell = p_vcd->i_sector
-        - p_input->stream.p_selected_area->i_start;
+    p_input->stream.p_selected_area->i_tell = 
+        (off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE
+         - p_input->stream.p_selected_area->i_start;
 }
 
index c22c296cd0a3dc033f2bbfdd5accdd7593fa5ac9..abafc3a10d21883e86a7e68d58e2e41f4b16de54 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME vcd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
 #include <string.h>
 #include <errno.h>
 
-#ifdef STRNCASECMP_IN_STRINGS_H
-#   include <strings.h>
-#endif
-
-#if defined( WIN32 )
-#   include <io.h>                                                 /* read() */
-#else
-#   include <sys/uio.h>                                      /* struct iovec */
-#endif
-
 #include <sys/ioctl.h>
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#if defined( WIN32 )
-#   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 "linux_cdrom_tools.h"
 
-#include "debug.h"
+/*****************************************************************************
+ * ioctl_ReadTocHeader: Read the TOC header and return the track number.
+ *****************************************************************************/
+int ioctl_GetTrackCount( int i_fd )
+{
+    struct cdrom_tochdr   tochdr;
 
-#include "modules.h"
-#include "modules_export.h"
+    /* First we read the TOC header */
+    if( ioctl( i_fd, CDROMREADTOCHDR, &tochdr ) == -1 )
+    {
+        intf_ErrMsg( "vcd error: could not read TOCHDR" );
+        return -1;
+    }
 
-#include "input_vcd.h"
-#include "linux_cdrom_tools.h"
+    return tochdr.cdth_trk1 - tochdr.cdth_trk0 + 1;
+}
 
 /*****************************************************************************
- * VCDReadToc: Read the Table of Contents and fill p_vcd.
+ * ioctl_GetSectors: Read the Table of Contents and fill p_vcd.
  *****************************************************************************/
-int VCDReadToc( thread_vcd_data_t * p_vcd )
+int * ioctl_GetSectors( int i_fd )
 {
-    int i;
+    int  i, i_tracks;
+    int *p_sectors;
     struct cdrom_tochdr   tochdr;
     struct cdrom_tocentry tocent;
 
     /* First we read the TOC header */
-    if( ioctl( p_vcd->i_handle, CDROMREADTOCHDR, &tochdr ) == -1 )
+    if( ioctl( i_fd, CDROMREADTOCHDR, &tochdr ) == -1 )
     {
         intf_ErrMsg( "vcd error: could not read TOCHDR" );
-        return -1;
+        return NULL;
     }
 
-    p_vcd->nb_tracks = tochdr.cdth_trk1 - tochdr.cdth_trk0 + 1;
+    i_tracks = tochdr.cdth_trk1 - tochdr.cdth_trk0 + 1;
 
-    /* nb_tracks + 1 because we put the lead_out tracks for computing last
-     * track's size */
-    p_vcd->p_sectors = malloc( ( p_vcd->nb_tracks + 1 ) * sizeof( int ) );
-    if ( p_vcd->p_sectors == NULL )
+    p_sectors = malloc( (i_tracks + 1) * sizeof(int) );
+    if( p_sectors == NULL )
     {
         intf_ErrMsg( "vcd error: could not allocate p_sectors" );
-        return -1;
+        return NULL;
     }
 
     /* Fill the p_sectors structure with the track/sector matches */
-    for( i = 0 ; i <= p_vcd->nb_tracks ; i++ )
+    for( i = 0 ; i <= i_tracks ; i++ )
     {
         tocent.cdte_format = CDROM_LBA;
         tocent.cdte_track =
-            ( i == p_vcd->nb_tracks ) ? CDROM_LEADOUT : tochdr.cdth_trk0 + i;
+            ( i == i_tracks ) ? CDROM_LEADOUT : tochdr.cdth_trk0 + i;
 
-        if( ioctl( p_vcd->i_handle, CDROMREADTOCENTRY, &tocent ) == -1 )
+        if( ioctl( i_fd, CDROMREADTOCENTRY, &tocent ) == -1 )
         {
             intf_ErrMsg( "vcd error: could not read TOCENTRY" );
-            free ( p_vcd->p_sectors );
-            return -1;
+            freep_sectors );
+            return NULL;
         }
 
-        p_vcd->p_sectors[ i ] = tocent.cdte_addr.lba;
+        p_sectors[ i ] = tocent.cdte_addr.lba;
     }
 
-    return 1;
+    return p_sectors;
 }
 
 /****************************************************************************
- * VCDReadSector: Read a sector (2324 bytes)
+ * ioctl_ReadSector: Read a sector (2324 bytes)
  ****************************************************************************/
-int VCDReadSector( struct thread_vcd_data_s * p_vcd, byte_t * p_buffer )
+int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer )
 {
     byte_t p_block[ VCD_SECTOR_SIZE ];
-    int    i_dummy = p_vcd->i_sector + 2 * CD_FRAMES;
+    int    i_dummy = i_sector + 2 * CD_FRAMES;
 
 #define p_msf ((struct cdrom_msf0 *)p_block)
     p_msf->minute =   i_dummy / (CD_FRAMES * CD_SECS);
     p_msf->second = ( i_dummy % (CD_FRAMES * CD_SECS) ) / CD_FRAMES;
     p_msf->frame =  ( i_dummy % (CD_FRAMES * CD_SECS) ) % CD_FRAMES;
 
-#ifdef DEBUG
     intf_DbgMsg( "vcd debug: playing frame %d:%d-%d",
                  p_msf->minute, p_msf->second, p_msf->frame);
-#endif
+#undef p_msf
 
-    if( ioctl(p_vcd->i_handle, CDROMREADRAW, p_block) == -1 )
+    if( ioctl(i_fd, CDROMREADRAW, p_block) == -1 )
     {
-        intf_ErrMsg( "vcd error: could not read block from disc" );
+        intf_ErrMsg( "vcd error: could not read block %i from disc",
+                     i_sector );
         return -1;
     }
 
     /* We don't want to keep the header of the read sector */
-    p_main->fast_memcpy( p_buffer, p_block + VCD_DATA_START, VCD_DATA_SIZE );
-
-    p_vcd->i_sector++;
-
-    if( p_vcd->i_sector >= p_vcd->p_sectors[p_vcd->i_track + 1] )
-    {
-        p_vcd->b_end_of_track = 1;
-    }
+    FAST_MEMCPY( p_buffer, p_block + VCD_DATA_START, VCD_DATA_SIZE );
 
-    return 1;
-
-#undef p_msf
+    return 0;
 }
 
index 85c6615f22424fdd17e8b6d443c4413b8f30723b..7c4e182c4ae4b996c5bb17c14378d2640a1fefac 100644 (file)
@@ -36,6 +36,7 @@
 /******************************************************************************
 * Prototypes                                                                  *
 ******************************************************************************/
-int VCDReadToc    ( struct thread_vcd_data_s * );
-int VCDReadSector ( struct thread_vcd_data_s *, byte_t * );
+int ioctl_GetTrackCount ( int );
+int * ioctl_GetSectors  ( int );
+int ioctl_ReadSector    ( int, int, byte_t * );
 
index 9cfaa652ab68ab696ec15e4aa3f1f71bbcc19b80..617fef5b9457c9134991c6f81a4bca5b80344c99 100644 (file)
@@ -2,7 +2,7 @@
  * vcd.c : VCD input module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.3 2001/12/09 17:01:37 sam Exp $
+ * $Id: vcd.c,v 1.4 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME vcd
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>                                              /* strdup() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "modules.h"
-#include "modules_export.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Capabilities defined in the other files.
@@ -53,15 +42,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for VCD module" )
-    ADD_COMMENT( "foobar !" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_INPUT;
-    p_module->psz_longname = "basic VCD input module";
-    
+    SET_DESCRIPTION( "VCD input module" )
+    ADD_CAPABILITY( INPUT, 180 )
+    ADD_SHORTCUT( "vcd" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
index 63e7180a26eb3574ac73f7bbca2d713c004ab40f..435f39ed89bdf3cf66192588af795ed084062909 100644 (file)
@@ -1 +1,4 @@
 .dep
+*.lo
+*.o.*
+*.lo.*
index 0f20c69228c2ec8615848d6bdc1194ae635679f5..a2e53c05f87d54ad02e1d3a228e4db7dcc298e2d 100644 (file)
@@ -1,69 +1,2 @@
-###############################################################################
-# vlc (VideoLAN Client) x11 module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-
-#
-# Objects
-#
-
-PLUGIN_X11 = x11.o vout_x11.o
-PLUGIN_XVIDEO = xvideo.o vout_xvideo.o
-PLUGIN_COMMON = vout_common.o
-
-BUILTIN_X11 = $(PLUGIN_X11:%.o=BUILTIN_X11_%.o) \
-              $(PLUGIN_COMMON:%.o=BUILTIN_X11_%.o)
-BUILTIN_XVIDEO = $(PLUGIN_XVIDEO:%.o=BUILTIN_XVIDEO_%.o) \
-                 $(PLUGIN_COMMON:%.o=BUILTIN_XVIDEO_%.o)
-
-ALL_OBJ = $(PLUGIN_X11) $(PLUGIN_XVIDEO) $(PLUGIN_COMMON) \
-         $(PLUGIN_COMMON:%.o=%_xvideo.o) $(BUILTIN_X11) $(BUILTIN_XVIDEO)
-
-#
-# Virtual targets
-#
-
-include ../../Makefile.modules
-
-# X11 plugin
-$(PLUGIN_X11) $(PLUGIN_COMMON): %.o: .dep/%.d
-$(PLUGIN_X11) $(PLUGIN_COMMON): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_X11) -DPLUGIN -DMODULE_NAME=x11 -c -o $@ $<
-
-# X11 builtin
-$(BUILTIN_X11): BUILTIN_X11_%.o: .dep/%.d
-$(BUILTIN_X11): BUILTIN_X11_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_X11) -DBUILTIN -DMODULE_NAME=x11 -c -o $@ $<
-
-# XVideo plugin
-$(PLUGIN_XVIDEO): %.o: .dep/%.d
-$(PLUGIN_XVIDEO): %.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_XVIDEO) -DPLUGIN -DMODULE_NAME=xvideo -c -o $@ $<
-
-$(PLUGIN_COMMON:%.o=%_xvideo.o): %_xvideo.o: .dep/%.d
-$(PLUGIN_COMMON:%.o=%_xvideo.o): %_xvideo.o: %.c
-       $(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_XVIDEO) -DPLUGIN -DMODULE_NAME=xvideo -c -o $@ $<
-
-# XVideo builtin
-$(BUILTIN_XVIDEO): BUILTIN_XVIDEO_%.o: .dep/%.d
-$(BUILTIN_XVIDEO): BUILTIN_XVIDEO_%.o: %.c
-       $(CC) $(CFLAGS) $(CFLAGS_XVIDEO) -DBUILTIN -DMODULE_NAME=xvideo -c -o $@ $<
-
-#
-# Real targets
-#
-
-../x11.so: $(PLUGIN_X11) $(PLUGIN_COMMON)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_X11)
-
-../x11.a: $(BUILTIN_X11)
-       ar r $@ $^
-       $(RANLIB) $@
-
-../xvideo.so: $(PLUGIN_XVIDEO) $(PLUGIN_COMMON:%.o=%_xvideo.o)
-       $(CC) -o $@ $^ $(PLCFLAGS) $(LIB_XVIDEO)
-
-../xvideo.a: $(BUILTIN_XVIDEO)
-       ar r $@ $^
-       $(RANLIB) $@
-
+x11_SOURCES = x11.c xcommon.c
+xvideo_SOURCES = xvideo.c xcommon.c
diff --git a/plugins/x11/vout_common.c b/plugins/x11/vout_common.c
deleted file mode 100644 (file)
index b727339..0000000
+++ /dev/null
@@ -1,745 +0,0 @@
-/*****************************************************************************
- * vout_common.c: Functions common to the X11 and XVideo plugins
- *****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_common.c,v 1.7 2001/12/20 15:43:15 sam Exp $
- *
- * Authors: Vincent Seguin <seguin@via.ecp.fr>
- *          Samuel Hocevar <sam@zoy.org>
- *          David Kennedy <dkennedy@tinytoad.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-
-#ifdef HAVE_MACHINE_PARAM_H
-/* BSD */
-#include <machine/param.h>
-#include <sys/types.h>                                     /* typedef ushort */
-#include <sys/ipc.h>
-#endif
-
-#ifndef WIN32
-#include <netinet/in.h>                               /* BSD: struct in_addr */
-#endif
-
-#include <sys/shm.h>                                   /* shmget(), shmctl() */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XShm.h>
-
-#define x11 12
-#define xvideo 42
-#if ( MODULE_NAME == x11 )
-#   define MODULE_NAME_IS_x11 1
-#elif ( MODULE_NAME == xvideo )
-#   define MODULE_NAME_IS_xvideo 1
-#   include <X11/extensions/Xv.h>
-#   include <X11/extensions/Xvlib.h>
-#   include <X11/extensions/dpms.h>
-#endif
-#undef x11
-#undef xvideo
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "video.h"
-#include "video_output.h"
-#include "vout_common.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 "modules.h"
-#include "modules_export.h"
-
-static __inline__ void vout_Seek( off_t i_seek )
-{
-#define area p_main->p_intf->p_input->stream.p_selected_area
-    off_t i_tell = area->i_tell;
-
-    i_tell += i_seek * (off_t)50 * p_main->p_intf->p_input->stream.i_mux_rate;
-
-    i_tell = ( i_tell <= area->i_start ) ? area->i_start
-           : ( i_tell >= area->i_size ) ? area->i_size
-           : i_tell;
-
-    input_Seek( p_main->p_intf->p_input, i_tell );
-#undef area
-}
-
-/*****************************************************************************
- * vout_Manage: handle X11 events
- *****************************************************************************
- * This function should be called regularly by video output thread. It manages
- * X11 events and allows window resizing. It returns a non null value on
- * error.
- *****************************************************************************/
-int _M( vout_Manage ) ( vout_thread_t *p_vout )
-{
-    XEvent      xevent;                                         /* X11 event */
-    boolean_t   b_resized;                        /* window has been resized */
-    char        i_key;                                    /* ISO Latin-1 key */
-    KeySym      x_key_symbol;
-
-    /* Handle X11 events: ConfigureNotify events are parsed to know if the
-     * output window's size changed, MapNotify and UnmapNotify to know if the
-     * window is mapped (and if the display is useful), and ClientMessages
-     * to intercept window destruction requests */
-
-    b_resized = 0;
-    while( XCheckWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                              StructureNotifyMask | KeyPressMask |
-                              ButtonPressMask | ButtonReleaseMask | 
-                              PointerMotionMask | Button1MotionMask , &xevent )
-           == True )
-    {
-        /* ConfigureNotify event: prepare  */
-        if( (xevent.type == ConfigureNotify)
-          && ((xevent.xconfigure.width != p_vout->p_sys->i_width)
-             || (xevent.xconfigure.height != p_vout->p_sys->i_height)) )
-        {
-            /* Update dimensions */
-            b_resized = 1;
-            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 )
-            {
-                _M( XCommonDisableScreenSaver ) ( 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 )
-            {
-                _M( XCommonEnableScreenSaver ) ( p_vout );
-                p_vout->b_active = 0;
-            }
-        }
-        /* Keyboard event */
-        else if( xevent.type == KeyPress )
-        {
-            /* We may have keys like F1 trough F12, ESC ... */
-            x_key_symbol = XKeycodeToKeysym( p_vout->p_sys->p_display,
-                                             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_main->p_intf->p_input,
-                     p_main->p_intf->p_input->stream.p_selected_area->i_start );
-                     break;
-                 case XK_End:
-                     input_Seek( p_main->p_intf->p_input,
-                     p_main->p_intf->p_input->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_main->p_intf->p_input,
-                                      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_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:
-                            intf_DbgMsg( "vout: unhandled key '%c' (%i)", 
-                                         (char)i_key, i_key );
-                            break;
-                        }
-                    }
-                break;
-            }
-        }
-        /* Mouse click */
-        else if( xevent.type == ButtonPress )
-        {
-            switch( ((XButtonEvent *)&xevent)->button )
-            {
-                case Button1:
-                    /* In this part we will eventually manage
-                     * clicks for DVD navigation for instance. For the
-                     * moment just pause the stream. */
-                    input_SetStatus( p_main->p_intf->p_input,
-                                     INPUT_STATUS_PAUSE );
-                    break;
-
-                case Button4:
-                    vout_Seek( 15 );
-                    break;
-
-                case Button5:
-                    vout_Seek( -15 );
-                    break;
-            }
-        }
-        /* Mouse release */
-        else if( xevent.type == ButtonRelease )
-        {
-            switch( ((XButtonEvent *)&xevent)->button )
-            {
-                case Button3:
-                    /* FIXME: need locking ! */
-                    p_main->p_intf->b_menu_change = 1;
-                    break;
-            }
-        }
-        /* Mouse move */
-        else if( xevent.type == MotionNotify )
-        {
-            p_vout->p_sys->i_time_mouse_last_moved = mdate();
-            if( ! p_vout->p_sys->b_mouse_pointer_visible )
-            {
-                _M( XCommonToggleMousePointer ) ( p_vout ); 
-            }
-        }
-        /* Other event */
-        else
-        {
-            intf_WarnMsg( 3, "vout: unhandled event %d received", xevent.type );
-        }
-    }
-
-    /* Handle events for YUV video output sub-window */
-    while( XCheckWindowEvent( p_vout->p_sys->p_display,
-                              p_vout->p_sys->yuv_window,
-                              ExposureMask, &xevent ) == True )
-    {
-        /* Window exposed (only handled if stream playback is paused) */
-        if( xevent.type == Expose )
-        {
-            if( ((XExposeEvent *)&xevent)->count == 0 )
-            {
-                /* (if this is the last a collection of expose events...) */
-                if( p_main->p_intf->p_input != NULL )
-                {
-                    if( PAUSE_S ==
-                            p_main->p_intf->p_input->stream.control.i_status )
-                    {
-/*                        XVideoDisplay( p_vout )*/;
-                    }
-                }
-            }
-        }
-    }
-
-    /* ClientMessage event - only WM_PROTOCOLS with WM_DELETE_WINDOW data
-     * are handled - according to the man pages, the format is always 32
-     * in this case */
-    while( XCheckTypedEvent( p_vout->p_sys->p_display,
-                             ClientMessage, &xevent ) )
-    {
-        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;
-        }
-        else
-        {
-            intf_DbgMsg( "vout: unhandled ClientMessage received" );
-        }
-    }
-
-    if ( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
-    {
-        p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
-
-        p_vout->b_fullscreen = !p_vout->b_fullscreen;
-
-        /* Get rid of the old window */
-        _M( XCommonDestroyWindow ) ( p_vout );
-
-        /* And create a new one */
-        if( _M( XCommonCreateWindow ) ( p_vout ) )
-        {
-            intf_ErrMsg( "vout error: cannot create X11 window" );
-            XCloseDisplay( p_vout->p_sys->p_display );
-
-            free( p_vout->p_sys );
-            return( 1 );
-        }
-
-    }
-
-#ifdef MODULE_NAME_IS_x11
-    /*
-     * Handle vout window resizing
-     */
-    if( b_resized )
-    {
-        /* If interface window has been resized, change vout size */
-        intf_DbgMsg( "vout: resizing output window" );
-        p_vout->i_width =  p_vout->p_sys->i_width;
-        p_vout->i_height = p_vout->p_sys->i_height;
-        p_vout->i_changes |= VOUT_SIZE_CHANGE;
-    }
-    else if( (p_vout->i_width  != p_vout->p_sys->i_width) ||
-             (p_vout->i_height != p_vout->p_sys->i_height) )
-    {
-        /* If video output size has changed, change interface window size */
-        intf_DbgMsg( "vout: resizing output window" );
-        p_vout->p_sys->i_width =    p_vout->i_width;
-        p_vout->p_sys->i_height =   p_vout->i_height;
-        XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                       p_vout->p_sys->i_width, p_vout->p_sys->i_height );
-    }
-    /*
-     * Color/Grayscale or gamma change: in 8bpp, just change the colormap
-     */
-    if( (p_vout->i_changes & VOUT_GRAYSCALE_CHANGE)
-        && (p_vout->i_screen_depth == 8) )
-    {
-        /* FIXME: clear flags ?? */
-    }
-
-    /*
-     * Size change
-     */
-    if( p_vout->i_changes & VOUT_SIZE_CHANGE )
-    {
-        intf_DbgMsg( "vout info: resizing window" );
-        p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
-
-        /* Resize window */
-        XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                       p_vout->i_width, p_vout->i_height );
-
-        /* Destroy XImages to change their size */
-        vout_End( p_vout );
-
-        /* Recreate XImages. If SysInit failed, the thread can't go on. */
-        if( vout_Init( p_vout ) )
-        {
-            intf_ErrMsg( "vout error: cannot resize display" );
-            return( 1 );
-       }
-
-        /* Tell the video output thread that it will need to rebuild YUV
-         * tables. This is needed since conversion buffer size may have
-         * changed */
-        p_vout->i_changes |= VOUT_YUV_CHANGE;
-        intf_Msg( "vout: video display resized (%dx%d)",
-                  p_vout->i_width, p_vout->i_height);
-    }
-#else
-    /*
-     * Size change
-     */
-    if( p_vout->i_changes & VOUT_SIZE_CHANGE )
-    {
-        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 );
-    }
-#endif
-
-    /* Autohide Cursour */
-    if( mdate() - p_vout->p_sys->i_time_mouse_last_moved > 2000000 )
-    {
-        /* Hide the mouse automatically */
-        if( p_vout->p_sys->b_mouse_pointer_visible )
-        {
-            _M( XCommonToggleMousePointer ) ( p_vout ); 
-        }
-    }
-
-    return 0;
-}
-
-/*****************************************************************************
- * XCommonCreateWindow: open and set-up X11 main window
- *****************************************************************************/
-int _M( XCommonCreateWindow ) ( vout_thread_t *p_vout )
-{
-    XSizeHints              xsize_hints;
-    XSetWindowAttributes    xwindow_attributes;
-    XGCValues               xgcvalues;
-    XEvent                  xevent;
-    Atom                    prop;
-    mwmhints_t              mwmhints;
-
-    boolean_t               b_expose;
-    boolean_t               b_configure_notify;
-    boolean_t               b_map_notify;
-
-    /* If we're full screen, we're full screen! */
-    if( p_vout->b_fullscreen ) 
-    {
-        p_vout->p_sys->i_width =
-           DisplayWidth( p_vout->p_sys->p_display, p_vout->p_sys->i_screen );
-        p_vout->p_sys->i_height =
-           DisplayHeight( p_vout->p_sys->p_display, p_vout->p_sys->i_screen ); 
-    }
-    else
-    {
-        /* Set main window's size */
-        if( p_vout->render.i_height * p_vout->render.i_aspect
-             >= p_vout->render.i_width * VOUT_ASPECT_FACTOR )
-        {
-            p_vout->p_sys->i_width = p_vout->render.i_height
-                * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR;
-            p_vout->p_sys->i_height = p_vout->render.i_height;
-        }
-        else
-        {
-            p_vout->p_sys->i_width = p_vout->render.i_width;
-            p_vout->p_sys->i_height = p_vout->render.i_width
-                * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
-        }
-
-        if( p_vout->p_sys->i_width <= 300 && p_vout->p_sys->i_height <= 300 )
-        {
-            p_vout->p_sys->i_width <<= 1;
-            p_vout->p_sys->i_height <<= 1;
-        }
-        else if( p_vout->p_sys->i_width <= 400
-                  && p_vout->p_sys->i_height <= 400 )
-        {
-            p_vout->p_sys->i_width += p_vout->p_sys->i_width >> 1;
-            p_vout->p_sys->i_height += p_vout->p_sys->i_height >> 1;
-        }
-    }
-
-    /* Prepare window manager hints and properties */
-    xsize_hints.base_width          = p_vout->p_sys->i_width;
-    xsize_hints.base_height         = p_vout->p_sys->i_height;
-    xsize_hints.flags               = PSize;
-    p_vout->p_sys->wm_protocols     = XInternAtom( p_vout->p_sys->p_display,
-                                                   "WM_PROTOCOLS", True );
-    p_vout->p_sys->wm_delete_window = XInternAtom( p_vout->p_sys->p_display,
-                                                   "WM_DELETE_WINDOW", True );
-
-    /* Prepare window attributes */
-    xwindow_attributes.backing_store = Always;       /* save the hidden part */
-    xwindow_attributes.background_pixel = BlackPixel( p_vout->p_sys->p_display,
-                                                      p_vout->p_sys->i_screen );
-    xwindow_attributes.event_mask = ExposureMask | StructureNotifyMask;
-    
-
-    /* Create the window and set hints - the window must receive ConfigureNotify
-     * events, and, until it is displayed, Expose and MapNotify events. */
-
-    p_vout->p_sys->window =
-        XCreateWindow( p_vout->p_sys->p_display,
-                       DefaultRootWindow( p_vout->p_sys->p_display ),
-                       0, 0,
-                       p_vout->p_sys->i_width,
-                       p_vout->p_sys->i_height,
-#ifdef MODULE_NAME_IS_x11
-                       /* XXX - what's this ? */
-                       0,
-#else
-                       1,
-#endif
-                       0, InputOutput, 0,
-                       CWBackingStore | CWBackPixel | CWEventMask,
-                       &xwindow_attributes );
-
-    if ( p_vout->b_fullscreen )
-    {
-        prop = XInternAtom(p_vout->p_sys->p_display, "_MOTIF_WM_HINTS", False);
-        mwmhints.flags = MWM_HINTS_DECORATIONS;
-        mwmhints.decorations = 0;
-        XChangeProperty( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                         prop, prop, 32, PropModeReplace,
-                         (unsigned char *)&mwmhints, PROP_MWM_HINTS_ELEMENTS );
-
-        XSetTransientForHint( p_vout->p_sys->p_display,
-                              p_vout->p_sys->window, None );
-        XRaiseWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
-    }
-
-    /* Set window manager hints and properties: size hints, command,
-     * window's name, and accepted protocols */
-    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 );
-    XStoreName( p_vout->p_sys->p_display, p_vout->p_sys->window,
-#ifdef MODULE_NAME_IS_x11
-                VOUT_TITLE " (X11 output)"
-#else
-                VOUT_TITLE " (XVideo output)"
-#endif
-              );
-
-    if( (p_vout->p_sys->wm_protocols == None)        /* use WM_DELETE_WINDOW */
-        || (p_vout->p_sys->wm_delete_window == None)
-        || !XSetWMProtocols( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                             &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" );
-    }
-
-    /* Creation of a graphic context that doesn't generate a GraphicsExpose
-     * event when using functions like XCopyArea */
-    xgcvalues.graphics_exposures = False;
-    p_vout->p_sys->gc = XCreateGC( p_vout->p_sys->p_display,
-                                   p_vout->p_sys->window,
-                                   GCGraphicsExposures, &xgcvalues);
-
-    /* Send orders to server, and wait until window is displayed - three
-     * events must be received: a MapNotify event, an Expose event allowing
-     * drawing in the window, and a ConfigureNotify to get the window
-     * dimensions. Once those events have been received, only ConfigureNotify
-     * events need to be received. */
-    b_expose = 0;
-    b_configure_notify = 0;
-    b_map_notify = 0;
-    XMapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window);
-    do
-    {
-        XNextEvent( p_vout->p_sys->p_display, &xevent);
-        if( (xevent.type == Expose)
-            && (xevent.xexpose.window == p_vout->p_sys->window) )
-        {
-            b_expose = 1;
-        }
-        else if( (xevent.type == MapNotify)
-                 && (xevent.xmap.window == p_vout->p_sys->window) )
-        {
-            b_map_notify = 1;
-        }
-        else if( (xevent.type == ConfigureNotify)
-                 && (xevent.xconfigure.window == p_vout->p_sys->window) )
-        {
-            b_configure_notify = 1;
-            p_vout->p_sys->i_width = xevent.xconfigure.width;
-            p_vout->p_sys->i_height = xevent.xconfigure.height;
-        }
-    } while( !( b_expose && b_configure_notify && b_map_notify ) );
-
-    XSelectInput( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                  StructureNotifyMask | KeyPressMask |
-                  ButtonPressMask | ButtonReleaseMask | 
-                  PointerMotionMask );
-
-    if( p_vout->b_fullscreen )
-    {
-        XSetInputFocus( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                        RevertToNone, CurrentTime );
-        XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->window, 0, 0 );
-    }
-
-#ifdef MODULE_NAME_IS_x11
-    if( XDefaultDepth(p_vout->p_sys->p_display, p_vout->p_sys->i_screen) == 8 )
-    {
-        /* Allocate a new palette */
-        p_vout->p_sys->colormap =
-            XCreateColormap( p_vout->p_sys->p_display,
-                             DefaultRootWindow( p_vout->p_sys->p_display ),
-                             DefaultVisual( p_vout->p_sys->p_display,
-                                            p_vout->p_sys->i_screen ),
-                             AllocAll );
-
-        xwindow_attributes.colormap = p_vout->p_sys->colormap;
-        XChangeWindowAttributes( p_vout->p_sys->p_display,
-                                 p_vout->p_sys->window,
-                                 CWColormap, &xwindow_attributes );
-    }
-
-#else
-    /* Create YUV output sub-window. */
-    p_vout->p_sys->yuv_window=XCreateSimpleWindow( p_vout->p_sys->p_display,
-                         p_vout->p_sys->window, 0, 0, 1, 1, 0,
-                         BlackPixel( p_vout->p_sys->p_display,
-                                         p_vout->p_sys->i_screen ),
-                         WhitePixel( p_vout->p_sys->p_display,
-                                         p_vout->p_sys->i_screen ) );
-
-    p_vout->p_sys->yuv_gc = XCreateGC( p_vout->p_sys->p_display,
-                                       p_vout->p_sys->yuv_window,
-                                       GCGraphicsExposures, &xgcvalues );
-    
-    XSetWindowBackground( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
-             BlackPixel(p_vout->p_sys->p_display, p_vout->p_sys->i_screen ) );
-    
-    XMapWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window );
-    XSelectInput( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
-                  ExposureMask );
-#endif
-
-    /* If the cursor was formerly blank than blank it again */
-    if( !p_vout->p_sys->b_mouse_pointer_visible )
-    {
-        _M( XCommonToggleMousePointer ) ( p_vout );
-        _M( XCommonToggleMousePointer ) ( p_vout );
-    }
-
-    XSync( p_vout->p_sys->p_display, False );
-
-    /* At this stage, the window is open, displayed, and ready to
-     * receive data */
-
-    return( 0 );
-}
-
-void _M( XCommonDestroyWindow ) ( vout_thread_t *p_vout )
-{
-    XSync( p_vout->p_sys->p_display, False );
-
-#ifdef MODULE_NAME_IS_xvideo
-    XFreeGC( p_vout->p_sys->p_display, p_vout->p_sys->yuv_gc );
-    XDestroyWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window );
-#endif
-
-    XUnmapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
-    XFreeGC( p_vout->p_sys->p_display, p_vout->p_sys->gc );
-    XDestroyWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
-}
-
-/*****************************************************************************
- * XCommonEnableScreenSaver: enable screen saver
- *****************************************************************************
- * This function enable the screen saver on a display after it had been
- * disabled by XDisableScreenSaver. Both functions use a counter mechanism to
- * know wether the screen saver can be activated or not: if n successive calls
- * are made to XDisableScreenSaver, n successive calls to XEnableScreenSaver
- * will be required before the screen saver could effectively be activated.
- *****************************************************************************/
-void _M( XCommonEnableScreenSaver ) ( vout_thread_t *p_vout )
-{
-    intf_DbgMsg( "vout: enabling screen saver" );
-    XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
-                     p_vout->p_sys->i_ss_interval,
-                     p_vout->p_sys->i_ss_blanking,
-                     p_vout->p_sys->i_ss_exposure );
-}
-
-/*****************************************************************************
- * XCommonDisableScreenSaver: disable screen saver
- *****************************************************************************
- * See XEnableScreenSaver
- *****************************************************************************/
-void _M( XCommonDisableScreenSaver ) ( vout_thread_t *p_vout )
-{
-    /* Save screen saver informations */
-    XGetScreenSaver( p_vout->p_sys->p_display, &p_vout->p_sys->i_ss_timeout,
-                     &p_vout->p_sys->i_ss_interval,
-                     &p_vout->p_sys->i_ss_blanking,
-                     &p_vout->p_sys->i_ss_exposure );
-
-    /* Disable screen saver */
-    intf_DbgMsg( "vout: disabling screen saver" );
-    XSetScreenSaver( p_vout->p_sys->p_display, 0,
-                     p_vout->p_sys->i_ss_interval,
-                     p_vout->p_sys->i_ss_blanking,
-                     p_vout->p_sys->i_ss_exposure );
-
-#ifdef MODULE_NAME_IS_xvideo
-    DPMSDisable( p_vout->p_sys->p_display );
-#endif
-}
-
-/*****************************************************************************
- * XCommonToggleMousePointer: hide or show the mouse pointer
- *****************************************************************************
- * This function hides the X pointer if it is visible by putting it at
- * coordinates (32,32) and setting the pointer sprite to a blank one. To
- * show it again, we disable the sprite and restore the original coordinates.
- *****************************************************************************/
-void _M( XCommonToggleMousePointer ) ( vout_thread_t *p_vout )
-{
-    if( p_vout->p_sys->b_mouse_pointer_visible )
-    {
-        XDefineCursor( p_vout->p_sys->p_display,
-                       p_vout->p_sys->window,
-                       p_vout->p_sys->blank_cursor );
-        p_vout->p_sys->b_mouse_pointer_visible = 0;
-    }
-    else
-    {
-        XUndefineCursor( p_vout->p_sys->p_display, p_vout->p_sys->window );
-        p_vout->p_sys->b_mouse_pointer_visible = 1;
-    }
-}
-
diff --git a/plugins/x11/vout_common.h b/plugins/x11/vout_common.h
deleted file mode 100644 (file)
index 883a5c1..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * vout_xvideo.c: Xvideo video output display method
- *****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_common.h,v 1.2 2001/12/13 12:47:17 sam Exp $
- *
- * Authors: Shane Harper <shanegh@optusnet.com.au>
- *          Vincent Seguin <seguin@via.ecp.fr>
- *          Samuel Hocevar <sam@zoy.org>
- *          David Kennedy <dkennedy@tinytoad.com>
- *
- * 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.
- *****************************************************************************/
-
-/*****************************************************************************
- * vout_sys_t: video output method descriptor
- *****************************************************************************
- * 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
-{
-    /* User settings */
-#if 0
-    /* this plugin (currently) requires the SHM Ext... */
-    boolean_t           b_shm;               /* shared memory extension flag */
-#endif
-
-    /* Internal settings and properties */
-    Display *           p_display;                        /* display pointer */
-#if MODULE_NAME == xvideo
-    Visual *            p_visual;                          /* visual pointer */
-#endif
-    int                 i_screen;                           /* screen number */
-    Window              window;                               /* root window */
-    GC                  gc;              /* graphic context instance handler */
-#if MODULE_NAME == xvideo
-    Window              yuv_window;   /* sub-window for displaying yuv video
-                                                                        data */
-    GC                  yuv_gc;
-    int                 i_xvport;
-#else
-    Colormap            colormap;               /* colormap used (8bpp only) */
-
-    /* Display buffers and shared memory information */
-    XImage *            p_ximage[2];                       /* XImage pointer */
-    XShmSegmentInfo     shm_info[2];       /* shared memory zone information */
-#endif
-
-    /* X11 generic properties */
-    Atom                wm_protocols;
-    Atom                wm_delete_window;
-
-    int                 i_width;                     /* width of main window */
-    int                 i_height;                   /* height of main window */
-
-    /* Screen saver properties */
-    int                 i_ss_timeout;                             /* timeout */
-    int                 i_ss_interval;           /* interval between changes */
-    int                 i_ss_blanking;                      /* blanking mode */
-    int                 i_ss_exposure;                      /* exposure mode */
-
-    /* Mouse pointer properties */
-    boolean_t           b_mouse_pointer_visible;
-    mtime_t             i_time_mouse_last_moved; /* used to auto-hide pointer*/
-    Cursor              blank_cursor;                   /* the hidden cursor */
-    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
-{
-    XvImage *           p_xvimage;
-    XShmSegmentInfo     shminfo;       /* shared memory zone information */
-
-} picture_sys_t;
-
-/*****************************************************************************
- * mwmhints_t: window manager hints
- *****************************************************************************
- * Fullscreen needs to be able to hide the wm decorations so we provide
- * this structure to make it easier.
- *****************************************************************************/
-#define MWM_HINTS_DECORATIONS   (1L << 1)
-#define PROP_MWM_HINTS_ELEMENTS 5
-typedef struct mwmhints_s
-{
-    u32 flags;
-    u32 functions;
-    u32 decorations;
-    s32 input_mode;
-    u32 status;
-} mwmhints_t;
-
-/*****************************************************************************
- * Common prototypes
- *****************************************************************************/
-int  _M( vout_Manage )   ( struct vout_thread_s * );
-
-int  _M( XCommonCreateWindow )    ( vout_thread_t *p_vout );
-void _M( XCommonDestroyWindow )   ( vout_thread_t *p_vout );
-
-void _M( XCommonEnableScreenSaver )       ( vout_thread_t *p_vout );
-void _M( XCommonDisableScreenSaver )      ( vout_thread_t *p_vout );
-void _M( XCommonToggleMousePointer )      ( vout_thread_t *p_vout );
-
diff --git a/plugins/x11/vout_x11.c b/plugins/x11/vout_x11.c
deleted file mode 100644 (file)
index 59f156f..0000000
+++ /dev/null
@@ -1,661 +0,0 @@
-/*****************************************************************************
- * vout_x11.c: X11 video output display method
- *****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_x11.c,v 1.34 2001/12/09 17:01:37 sam Exp $
- *
- * Authors: Vincent Seguin <seguin@via.ecp.fr>
- *          Samuel Hocevar <sam@zoy.org>
- *          David Kennedy <dkennedy@tinytoad.com>
- *
- * 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.
- *****************************************************************************/
-
-#define MODULE_NAME x11
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-
-#ifdef HAVE_MACHINE_PARAM_H
-/* BSD */
-#include <machine/param.h>
-#include <sys/types.h>                                     /* typedef ushort */
-#include <sys/ipc.h>
-#endif
-
-#ifndef WIN32
-#include <netinet/in.h>                               /* BSD: struct in_addr */
-#endif
-
-#include <sys/shm.h>                                   /* shmget(), shmctl() */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XShm.h>
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "video.h"
-#include "video_output.h"
-#include "vout_common.h"
-
-#include "interface.h"
-#include "netutils.h"                                 /* network_ChannelJoin */
-
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
-static int  vout_Create    ( struct vout_thread_s * );
-static int  vout_Init      ( struct vout_thread_s * );
-static void vout_End       ( struct vout_thread_s * );
-static void vout_Destroy   ( struct vout_thread_s * );
-static void vout_Display   ( struct vout_thread_s * );
-static void vout_SetPalette( struct vout_thread_s *, u16*, u16*, u16*, u16* );
-
-static int  X11InitDisplay      ( vout_thread_t *p_vout, char *psz_display );
-
-static int  X11CreateImage      ( vout_thread_t *p_vout, XImage **pp_ximage );
-static void X11DestroyImage     ( XImage *p_ximage );
-static int  X11CreateShmImage   ( vout_thread_t *p_vout, XImage **pp_ximage,
-                                  XShmSegmentInfo *p_shm_info );
-static void X11DestroyShmImage  ( vout_thread_t *p_vout, XImage *p_ximage,
-                                  XShmSegmentInfo *p_shm_info );
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( vout_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = vout_Probe;
-    p_function_list->functions.vout.pf_create     = vout_Create;
-    p_function_list->functions.vout.pf_init       = vout_Init;
-    p_function_list->functions.vout.pf_end        = vout_End;
-    p_function_list->functions.vout.pf_destroy    = vout_Destroy;
-    p_function_list->functions.vout.pf_manage     = _M( vout_Manage );
-    p_function_list->functions.vout.pf_display    = vout_Display;
-    p_function_list->functions.vout.pf_setpalette = vout_SetPalette;
-}
-
-/*****************************************************************************
- * vout_Probe: probe the video driver and return a score
- *****************************************************************************
- * This function tries to initialize SDL and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    if( TestMethod( VOUT_METHOD_VAR, "x11" ) )
-    {
-        return( 999 );
-    }
-
-    return( 50 );
-}
-
-/*****************************************************************************
- * vout_Create: allocate X11 video thread output method
- *****************************************************************************
- * This function allocate and initialize a X11 vout method. It uses some of the
- * vout properties to choose the window size, and change them according to the
- * actual properties of the display.
- *****************************************************************************/
-static int vout_Create( vout_thread_t *p_vout )
-{
-    char *psz_display;
-    XColor cursor_color;
-
-    /* Allocate structure */
-    p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
-    if( p_vout->p_sys == NULL )
-    {
-        intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
-        return( 1 );
-    }
-
-    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
-    psz_display = XDisplayName( main_GetPszVariable( VOUT_DISPLAY_VAR, NULL ) );
-    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", psz_display );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-    p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
-
-    /* Spawn base window - this window will include the video output window,
-     * but also command buttons, subtitles and other indicators */
-
-    if( _M( XCommonCreateWindow ) ( p_vout ) )
-    {
-        intf_ErrMsg( "vout error: cannot create X11 window" );
-        XCloseDisplay( p_vout->p_sys->p_display );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-
-    /* Open and initialize device. This function issues its own error messages.
-     * Since XLib is usually not thread-safe, we can't use the same display
-     * pointer than the interface or another thread. However, the root window
-     * id is still valid. */
-    if( X11InitDisplay( p_vout, psz_display ) )
-    {
-        intf_ErrMsg( "vout error: cannot initialize X11 display" );
-        XCloseDisplay( p_vout->p_sys->p_display );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-
-    /* Create blank cursor (for mouse cursor autohiding) */
-    p_vout->p_sys->b_mouse_pointer_visible = 1;
-    p_vout->p_sys->cursor_pixmap = XCreatePixmap( p_vout->p_sys->p_display,
-                                                  DefaultRootWindow(
-                                                     p_vout->p_sys->p_display),
-                                                  1, 1, 1 );
-    
-    XParseColor( p_vout->p_sys->p_display,
-                 XCreateColormap( p_vout->p_sys->p_display,
-                                  DefaultRootWindow(
-                                                    p_vout->p_sys->p_display ),
-                                  DefaultVisual(
-                                                p_vout->p_sys->p_display,
-                                                p_vout->p_sys->i_screen ),
-                                  AllocNone ),
-                 "black", &cursor_color );
-    
-    p_vout->p_sys->blank_cursor = XCreatePixmapCursor(
-                                      p_vout->p_sys->p_display,
-                                      p_vout->p_sys->cursor_pixmap,
-                                      p_vout->p_sys->cursor_pixmap,
-                                      &cursor_color,
-                                      &cursor_color, 1, 1 );    
-
-    /* Disable screen saver and return */
-    _M( XCommonDisableScreenSaver ) ( p_vout );
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * vout_Init: initialize X11 video thread output method
- *****************************************************************************
- * This function create the XImages needed by the output thread. It is called
- * at the beginning of the thread, but also each time the window is resized.
- *****************************************************************************/
-static int vout_Init( vout_thread_t *p_vout )
-{
-    int i_err;
-
-#ifdef SYS_DARWIN
-    /* FIXME : As of 2001-03-16, XFree4 for MacOS X does not support Xshm. */
-    p_vout->p_sys->b_shm = 0;
-#endif
-
-    /* Create XImages using XShm extension - on failure, fall back to regular
-     * way (and destroy the first image if it was created successfully) */
-    if( p_vout->p_sys->b_shm )
-    {
-        /* Create first image */
-        i_err = X11CreateShmImage( p_vout, &p_vout->p_sys->p_ximage[0],
-                                   &p_vout->p_sys->shm_info[0] );
-        if( !i_err )                         /* first image has been created */
-        {
-            /* Create second image */
-            if( X11CreateShmImage( p_vout, &p_vout->p_sys->p_ximage[1],
-                                   &p_vout->p_sys->shm_info[1] ) )
-            {                             /* error creating the second image */
-                X11DestroyShmImage( p_vout, p_vout->p_sys->p_ximage[0],
-                                    &p_vout->p_sys->shm_info[0] );
-                i_err = 1;
-            }
-        }
-        if( i_err )                                      /* an error occured */
-        {
-            intf_Msg( "vout: XShm video extension unavailable" );
-            p_vout->p_sys->b_shm = 0;
-        }
-    }
-
-    /* Create XImages without XShm extension */
-    if( !p_vout->p_sys->b_shm )
-    {
-        if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) )
-        {
-            intf_ErrMsg( "vout error: cannot create images" );
-            p_vout->p_sys->p_ximage[0] = NULL;
-            p_vout->p_sys->p_ximage[1] = NULL;
-            return( 1 );
-        }
-        if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) )
-        {
-            intf_ErrMsg( "vout error: cannot create images" );
-            X11DestroyImage( p_vout->p_sys->p_ximage[0] );
-            p_vout->p_sys->p_ximage[0] = NULL;
-            p_vout->p_sys->p_ximage[1] = NULL;
-            return( 1 );
-        }
-    }
-
-    /* Set bytes per line and initialize buffers */
-    p_vout->i_bytes_per_line = p_vout->p_sys->p_ximage[0]->bytes_per_line;
-    p_vout->pf_setbuffers( p_vout, p_vout->p_sys->p_ximage[ 0 ]->data,
-                                   p_vout->p_sys->p_ximage[ 1 ]->data );
-
-    /* Set date for autohiding cursor */
-    p_vout->p_sys->i_lastmoved = mdate();
-    
-    return( 0 );
-}
-
-/*****************************************************************************
- * vout_End: terminate X11 video thread output method
- *****************************************************************************
- * Destroy the X11 XImages created by vout_Init. It is called at the end of
- * the thread, but also each time the window is resized.
- *****************************************************************************/
-static void vout_End( vout_thread_t *p_vout )
-{
-    if( p_vout->p_sys->b_shm )                             /* Shm XImages... */
-    {
-        X11DestroyShmImage( p_vout, p_vout->p_sys->p_ximage[0],
-                            &p_vout->p_sys->shm_info[0] );
-        X11DestroyShmImage( p_vout, p_vout->p_sys->p_ximage[1],
-                            &p_vout->p_sys->shm_info[1] );
-    }
-    else                                          /* ...or regular XImages */
-    {
-        X11DestroyImage( p_vout->p_sys->p_ximage[0] );
-        X11DestroyImage( p_vout->p_sys->p_ximage[1] );
-    }
-}
-
-/*****************************************************************************
- * vout_Destroy: destroy X11 video thread output method
- *****************************************************************************
- * Terminate an output method created by vout_CreateOutputMethod
- *****************************************************************************/
-static void vout_Destroy( vout_thread_t *p_vout )
-{
-    /* Enable screen saver */
-    _M( XCommonEnableScreenSaver ) ( p_vout );
-
-    /* Restore cursor if it was blanked */
-    if( !p_vout->p_sys->b_mouse_pointer_visible )
-    {
-        _M( XCommonToggleMousePointer ) ( p_vout );
-    }
-
-    /* Destroy blank cursor pixmap */
-    XFreePixmap( p_vout->p_sys->p_display, p_vout->p_sys->cursor_pixmap );
-
-    /* Destroy colormap */
-    if( p_vout->i_screen_depth == 8 )
-    {
-        XFreeColormap( p_vout->p_sys->p_display, p_vout->p_sys->colormap );
-    }
-
-    /* Destroy window */
-    XUnmapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
-    XFreeGC( p_vout->p_sys->p_display, p_vout->p_sys->gc );
-    XDestroyWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
-
-    XCloseDisplay( p_vout->p_sys->p_display );
-
-    /* Destroy structure */
-    free( p_vout->p_sys );
-}
-
-/*****************************************************************************
- * vout_Display: displays previously rendered output
- *****************************************************************************
- * This function send the currently rendered image to X11 server, wait until
- * it is displayed and switch the two rendering buffer, preparing next frame.
- *****************************************************************************/
-static void vout_Display( vout_thread_t *p_vout )
-{
-    if( p_vout->p_sys->b_shm)                                /* XShm is used */
-    {
-        /* Display rendered image using shared memory extension */
-        XShmPutImage(p_vout->p_sys->p_display, p_vout->p_sys->window, p_vout->p_sys->gc,
-                     p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ],
-                     0, 0, 0, 0,
-                     p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->width,
-                     p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->height, False);
-
-        /* Send the order to the X server */
-        XSync(p_vout->p_sys->p_display, False);
-    }
-    else                                /* regular X11 capabilities are used */
-    {
-        XPutImage(p_vout->p_sys->p_display, p_vout->p_sys->window, p_vout->p_sys->gc,
-                  p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ],
-                  0, 0, 0, 0,
-                  p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->width,
-                  p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->height);
-
-        /* Send the order to the X server */
-        XSync(p_vout->p_sys->p_display, False);
-    }
-}
-
-/*****************************************************************************
- * 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];
-
-    intf_DbgMsg( "vout: Palette change called" );
-
-    /* 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 );
-}
-
-/* following functions are local */
-
-/*****************************************************************************
- * X11InitDisplay: open and initialize X11 device
- *****************************************************************************
- * Create a window according to video output given size, and set other
- * properties according to the display properties.
- *****************************************************************************/
-static int X11InitDisplay( vout_thread_t *p_vout, char *psz_display )
-{
-    XPixmapFormatValues *       p_formats;                 /* pixmap formats */
-    XVisualInfo *               p_xvisual;           /* visuals informations */
-    XVisualInfo                 xvisual_template;         /* visual template */
-    int                         i_count;                       /* array size */
-
-
-    /* Initialize structure */
-    p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
-    p_vout->p_sys->b_shm    = ( XShmQueryExtension( p_vout->p_sys->p_display )
-                                 == True );
-    if( !p_vout->p_sys->b_shm )
-    {
-        intf_Msg( "vout: XShm video extension is not available" );
-    }
-
-    /* Get screen depth */
-    p_vout->i_screen_depth = XDefaultDepth( p_vout->p_sys->p_display,
-                                            p_vout->p_sys->i_screen );
-    switch( p_vout->i_screen_depth )
-    {
-    case 8:
-        /*
-         * Screen depth is 8bpp. Use PseudoColor visual with private colormap.
-         */
-        xvisual_template.screen =   p_vout->p_sys->i_screen;
-        xvisual_template.class =    DirectColor;
-        p_xvisual = XGetVisualInfo( p_vout->p_sys->p_display,
-                                    VisualScreenMask | VisualClassMask,
-                                    &xvisual_template, &i_count );
-        if( p_xvisual == NULL )
-        {
-            intf_ErrMsg( "vout error: no PseudoColor visual available" );
-            return( 1 );
-        }
-        p_vout->i_bytes_per_pixel = 1;
-        break;
-    case 15:
-    case 16:
-    case 24:
-    default:
-        /*
-         * Screen depth is higher than 8bpp. TrueColor visual is used.
-         */
-        xvisual_template.screen =   p_vout->p_sys->i_screen;
-        xvisual_template.class =    TrueColor;
-        p_xvisual = XGetVisualInfo( p_vout->p_sys->p_display,
-                                    VisualScreenMask | VisualClassMask,
-                                    &xvisual_template, &i_count );
-        if( p_xvisual == NULL )
-        {
-            intf_ErrMsg( "vout error: no TrueColor visual available" );
-            return( 1 );
-        }
-        p_vout->i_red_mask =        p_xvisual->red_mask;
-        p_vout->i_green_mask =      p_xvisual->green_mask;
-        p_vout->i_blue_mask =       p_xvisual->blue_mask;
-
-        /* There is no difference yet between 3 and 4 Bpp. The only way
-         * to find the actual number of bytes per pixel is to list supported
-         * pixmap formats. */
-        p_formats = XListPixmapFormats( p_vout->p_sys->p_display, &i_count );
-        p_vout->i_bytes_per_pixel = 0;
-
-        for( ; i_count-- ; p_formats++ )
-        {
-            /* Under XFree4.0, the list contains pixmap formats available
-             * through all video depths ; so we have to check against current
-             * depth. */
-            if( p_formats->depth == p_vout->i_screen_depth )
-            {
-                if( p_formats->bits_per_pixel / 8
-                        > p_vout->i_bytes_per_pixel )
-                {
-                    p_vout->i_bytes_per_pixel = p_formats->bits_per_pixel / 8;
-                }
-            }
-        }
-        break;
-    }
-    p_vout->p_sys->p_visual = p_xvisual->visual;
-    XFree( p_xvisual );
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * X11CreateImage: create an XImage
- *****************************************************************************
- * Create a simple XImage used as a buffer.
- *****************************************************************************/
-static int X11CreateImage( vout_thread_t *p_vout, XImage **pp_ximage )
-{
-    byte_t *    pb_data;                          /* image data storage zone */
-    int         i_quantum;                     /* XImage quantum (see below) */
-
-    /* Allocate memory for image */
-    p_vout->i_bytes_per_line = p_vout->i_width * p_vout->i_bytes_per_pixel;
-    pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
-    if( !pb_data )                                                  /* error */
-    {
-        intf_ErrMsg( "vout error: %s", strerror(ENOMEM));
-        return( 1 );
-    }
-
-    /* Optimize the quantum of a scanline regarding its size - the quantum is
-       a diviser of the number of bits between the start of two scanlines. */
-    if( !(( p_vout->i_bytes_per_line ) % 32) )
-    {
-        i_quantum = 32;
-    }
-    else
-    {
-        if( !(( p_vout->i_bytes_per_line ) % 16) )
-        {
-            i_quantum = 16;
-        }
-        else
-        {
-            i_quantum = 8;
-        }
-    }
-
-    /* Create XImage */
-    *pp_ximage = XCreateImage( p_vout->p_sys->p_display,
-                               p_vout->p_sys->p_visual, p_vout->i_screen_depth,
-                               ZPixmap, 0, pb_data,
-                               p_vout->i_width, p_vout->i_height, i_quantum, 0);
-    if(! *pp_ximage )                                               /* error */
-    {
-        intf_ErrMsg( "vout error: XCreateImage() failed" );
-        free( pb_data );
-        return( 1 );
-    }
-
-    return 0;
-}
-
-/*****************************************************************************
- * X11CreateShmImage: create an XImage using shared memory extension
- *****************************************************************************
- * Prepare an XImage for DisplayX11ShmImage function.
- * The order of the operations respects the recommandations of the mit-shm
- * document by J.Corbet and K.Packard. Most of the parameters were copied from
- * there.
- *****************************************************************************/
-static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
-                              XShmSegmentInfo *p_shm_info)
-{
-    /* Create XImage */
-    *pp_ximage =
-        XShmCreateImage( p_vout->p_sys->p_display, p_vout->p_sys->p_visual,
-                         p_vout->i_screen_depth, ZPixmap, 0,
-                         p_shm_info, p_vout->i_width, p_vout->i_height );
-    if(! *pp_ximage )                                               /* error */
-    {
-        intf_ErrMsg( "vout error: XShmCreateImage() failed" );
-        return( 1 );
-    }
-
-    /* Allocate shared memory segment - 0777 set the access permission
-     * rights (like umask), they are not yet supported by X servers */
-    p_shm_info->shmid =
-        shmget( IPC_PRIVATE, (*pp_ximage)->bytes_per_line
-                                 * (*pp_ximage)->height, IPC_CREAT | 0777);
-    if( p_shm_info->shmid < 0)                                      /* error */
-    {
-        intf_ErrMsg( "vout error: cannot allocate shared image data (%s)",
-                    strerror(errno));
-        XDestroyImage( *pp_ximage );
-        return( 1 );
-    }
-
-    /* Attach shared memory segment to process (read/write) */
-    p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
-    if(! p_shm_info->shmaddr )
-    {                                                               /* error */
-        intf_ErrMsg( "vout error: cannot attach shared memory (%s)",
-                    strerror(errno));
-        shmctl( p_shm_info->shmid, IPC_RMID, 0 );      /* free shared memory */
-        XDestroyImage( *pp_ximage );
-        return( 1 );
-    }
-
-#if 0
-    /* Mark the shm segment to be removed when there will be no more
-     * attachements, so it is automatic on process exit or after shmdt */
-    shmctl( p_shm_info->shmid, IPC_RMID, 0 );
-#endif
-
-    /* Attach shared memory segment to X server (read only) */
-    p_shm_info->readOnly = True;
-    if( XShmAttach( p_vout->p_sys->p_display, p_shm_info )
-         == False )                                                 /* error */
-    {
-        intf_ErrMsg( "vout error: cannot attach shared memory to X11 server" );
-        shmctl( p_shm_info->shmid, IPC_RMID, 0 );      /* free shared memory */
-        shmdt( p_shm_info->shmaddr );   /* detach shared memory from process
-                                         * and automatic free */
-        XDestroyImage( *pp_ximage );
-        return( 1 );
-    }
-
-    /* Send image to X server. This instruction is required, since having
-     * built a Shm XImage and not using it causes an error on XCloseDisplay */
-    XFlush( p_vout->p_sys->p_display );
-    return( 0 );
-}
-
-/*****************************************************************************
- * X11DestroyImage: destroy an XImage
- *****************************************************************************
- * Destroy XImage AND associated data. If pointer is NULL, the image won't be
- * destroyed (see vout_ManageOutputMethod())
- *****************************************************************************/
-static void X11DestroyImage( XImage *p_ximage )
-{
-    if( p_ximage != NULL )
-    {
-        XDestroyImage( p_ximage );                     /* no free() required */
-    }
-}
-
-/*****************************************************************************
- * X11DestroyShmImage
- *****************************************************************************
- * Destroy XImage AND associated data. Detach shared memory segment from
- * server and process, then free it. If pointer is NULL, the image won't be
- * destroyed (see vout_ManageOutputMethod())
- *****************************************************************************/
-static void X11DestroyShmImage( vout_thread_t *p_vout, XImage *p_ximage,
-                                XShmSegmentInfo *p_shm_info )
-{
-    /* If pointer is NULL, do nothing */
-    if( p_ximage == NULL )
-    {
-        return;
-    }
-
-    XShmDetach( p_vout->p_sys->p_display, p_shm_info );/* detach from server */
-    XDestroyImage( p_ximage );
-
-    shmctl( p_shm_info->shmid, IPC_RMID, 0 );          /* free shared memory */
-
-    if( shmdt( p_shm_info->shmaddr ) )  /* detach shared memory from process */
-    {
-        intf_ErrMsg( "vout error: cannot detach shared memory (%s)",
-                     strerror(errno) );
-    }
-}
-
diff --git a/plugins/x11/vout_xvideo.c b/plugins/x11/vout_xvideo.c
deleted file mode 100644 (file)
index d13b107..0000000
+++ /dev/null
@@ -1,788 +0,0 @@
-/*****************************************************************************
- * vout_xvideo.c: Xvideo video output display method
- *****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_xvideo.c,v 1.43 2001/12/29 00:39:49 massiot Exp $
- *
- * Authors: Shane Harper <shanegh@optusnet.com.au>
- *          Vincent Seguin <seguin@via.ecp.fr>
- *          Samuel Hocevar <sam@zoy.org>
- *          David Kennedy <dkennedy@tinytoad.com>
- *
- * 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.
- *****************************************************************************/
-
-#define MODULE_NAME xvideo
-#include "modules_inner.h"
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include "defs.h"
-
-#include <errno.h>                                                 /* ENOMEM */
-#include <stdlib.h>                                                /* free() */
-#include <string.h>                                            /* strerror() */
-
-#ifdef HAVE_MACHINE_PARAM_H
-/* BSD */
-#include <machine/param.h>
-#include <sys/types.h>                                     /* typedef ushort */
-#include <sys/ipc.h>
-#endif
-
-#ifndef WIN32
-#include <netinet/in.h>                               /* BSD: struct in_addr */
-#endif
-
-#include <sys/shm.h>                                   /* shmget(), shmctl() */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XShm.h>
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvlib.h>
-#include <X11/extensions/dpms.h>
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
-
-#include "video.h"
-#include "video_output.h"
-#include "vout_common.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 "modules.h"
-#include "modules_export.h"
-
-#define XVIDEO_MAX_DIRECTBUFFERS 5
-#define GUID_YUV12_PLANAR 0x32315659
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int  vout_Probe     ( probedata_t * );
-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 void vout_Display   ( vout_thread_t *, picture_t * );
-
-static int  XVideoNewPicture   ( vout_thread_t *, picture_t * );
-
-static XvImage *CreateShmImage ( Display *, int, XShmSegmentInfo *, int, int );
-static void     DestroyShmImage( Display *, XvImage *, XShmSegmentInfo * );
-
-static int  CheckForXVideo     ( Display * );
-static int  GetXVideoPort      ( Display * );
-
-/*static void XVideoSetAttribute       ( vout_thread_t *, char *, float );*/
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( vout_getfunctions )( function_list_t * p_function_list )
-{
-    p_function_list->pf_probe = vout_Probe;
-    p_function_list->functions.vout.pf_create     = vout_Create;
-    p_function_list->functions.vout.pf_init       = vout_Init;
-    p_function_list->functions.vout.pf_end        = vout_End;
-    p_function_list->functions.vout.pf_destroy    = vout_Destroy;
-    p_function_list->functions.vout.pf_manage     = _M( vout_Manage );
-    p_function_list->functions.vout.pf_display    = vout_Display;
-    p_function_list->functions.vout.pf_setpalette = NULL;
-}
-
-/*****************************************************************************
- * vout_Probe: probe the video driver and return a score
- *****************************************************************************
- * This returns a score to the plugin manager so that it can select the best
- * plugin.
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    Display *p_display;                                   /* display pointer */
-    char    *psz_display;
-
-    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
-    psz_display = XDisplayName( main_GetPszVariable(VOUT_DISPLAY_VAR, NULL) );
-    p_display = XOpenDisplay( psz_display );
-    if( p_display == NULL )                                         /* error */
-    {
-        intf_WarnMsg( 3, "vout: Xvideo cannot open display %s", psz_display );
-        intf_WarnMsg( 3, "vout: Xvideo not supported" );
-        return( 0 );
-    }
-
-    if( !CheckForXVideo( p_display ) )
-    {
-        intf_WarnMsg( 3, "vout: Xvideo not supported" );
-        XCloseDisplay( p_display );
-        return( 0 );
-    }
-
-    if( GetXVideoPort( p_display ) < 0 )
-    {
-        intf_WarnMsg( 3, "vout: Xvideo not supported" );
-        XCloseDisplay( p_display );
-        return( 0 );
-    }
-
-    /* Clean-up everyting */
-    XCloseDisplay( p_display );
-
-    if( TestMethod( VOUT_METHOD_VAR, "xvideo" ) )
-    {
-        return( 999 );
-    }
-
-    return( 150 );
-}
-
-/*****************************************************************************
- * vout_Create: allocate XVideo video thread output method
- *****************************************************************************
- * This function allocates and initialize a XVideo vout method. It uses some of
- * the vout properties to choose the window size, and change them according to
- * the actual properties of the display.
- *****************************************************************************/
-static int vout_Create( vout_thread_t *p_vout )
-{
-    char *psz_display;
-    XColor cursor_color;
-
-    /* Allocate structure */
-    p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
-    if( p_vout->p_sys == NULL )
-    {
-        intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
-        return( 1 );
-    }
-
-    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
-    psz_display = XDisplayName( main_GetPszVariable( VOUT_DISPLAY_VAR, NULL ) );
-    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", psz_display );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-    p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
-
-    if( !CheckForXVideo( p_vout->p_sys->p_display ) )
-    {
-        intf_ErrMsg( "vout error: no XVideo extension" );
-        XCloseDisplay( p_vout->p_sys->p_display );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-
-    /* Check we have access to a video port */
-    if( (p_vout->p_sys->i_xvport = GetXVideoPort(p_vout->p_sys->p_display)) <0 )
-    {
-        intf_ErrMsg( "vout error: cannot get XVideo port" );
-        XCloseDisplay( p_vout->p_sys->p_display );
-        free( p_vout->p_sys );
-        return 1;
-    }
-    intf_DbgMsg( "Using xv port %d" , p_vout->p_sys->i_xvport );
-
-    /* Create blank cursor (for mouse cursor autohiding) */
-    p_vout->p_sys->b_mouse_pointer_visible = 1;
-    p_vout->p_sys->cursor_pixmap = XCreatePixmap( p_vout->p_sys->p_display,
-                                                  DefaultRootWindow(
-                                                     p_vout->p_sys->p_display),
-                                                  1, 1, 1 );
-
-    XParseColor( p_vout->p_sys->p_display,
-                 XCreateColormap( p_vout->p_sys->p_display,
-                                  DefaultRootWindow(
-                                                    p_vout->p_sys->p_display ),
-                                  DefaultVisual(
-                                                p_vout->p_sys->p_display,
-                                                p_vout->p_sys->i_screen ),
-                                  AllocNone ),
-                 "black", &cursor_color );
-
-    p_vout->p_sys->blank_cursor = XCreatePixmapCursor(
-                                      p_vout->p_sys->p_display,
-                                      p_vout->p_sys->cursor_pixmap,
-                                      p_vout->p_sys->cursor_pixmap,
-                                      &cursor_color,
-                                      &cursor_color, 1, 1 );
-
-    /* Spawn base window - this window will include the video output window,
-     * but also command buttons, subtitles and other indicators */
-    if( _M( XCommonCreateWindow ) ( p_vout ) )
-    {
-        intf_ErrMsg( "vout error: no suitable Xvideo image input port" );
-        _M( XCommonDestroyWindow ) ( p_vout );
-        XCloseDisplay( p_vout->p_sys->p_display );
-        free( p_vout->p_sys );
-        return( 1 );
-    }
-
-#if 0
-    /* XXX The brightness and contrast values should be read from environment
-     * XXX variables... */
-    XVideoSetAttribute( p_vout, "XV_BRIGHTNESS", 0.5 );
-    XVideoSetAttribute( p_vout, "XV_CONTRAST",   0.5 );
-#endif
-
-    /* Disable screen saver and return */
-    _M( XCommonDisableScreenSaver ) ( p_vout );
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * vout_Init: initialize XVideo video thread output method
- *****************************************************************************/
-static int vout_Init( vout_thread_t *p_vout )
-{
-    int i_index;
-    picture_t *p_pic;
-
-    I_OUTPUTPICTURES = 0;
-
-    /* Initialize the output structure */
-    switch( p_vout->render.i_chroma )
-    {
-        case YUV_420_PICTURE:
-            p_vout->output.i_chroma = p_vout->render.i_chroma;
-            p_vout->output.i_width  = p_vout->render.i_width;
-            p_vout->output.i_height = p_vout->render.i_height;
-            p_vout->output.i_aspect = p_vout->render.i_aspect;
-            break;
-
-        default:
-            return( 0 );
-    }
-
-    /* Try to initialize up to XVIDEO_MAX_DIRECTBUFFERS direct buffers */
-    while( I_OUTPUTPICTURES < XVIDEO_MAX_DIRECTBUFFERS )
-    {
-        p_pic = NULL;
-
-        /* Find an empty picture slot */
-        for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
-        {
-            if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
-            {
-                p_pic = p_vout->p_picture + i_index;
-                break;
-            }
-        }
-
-        /* Allocate the picture */
-        if( XVideoNewPicture( p_vout, p_pic ) )
-        {
-            break;
-        }
-
-        p_pic->i_status        = DESTROYED_PICTURE;
-        p_pic->i_type          = DIRECT_PICTURE;
-
-        p_pic->i_left_margin   =
-        p_pic->i_right_margin  =
-        p_pic->i_top_margin    =
-        p_pic->i_bottom_margin = 0;
-
-        PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
-
-        I_OUTPUTPICTURES++;
-    }
-
-    return( 0 );
-}
-
-/*****************************************************************************
- * vout_End: terminate XVideo video thread output method
- *****************************************************************************
- * Destroy the XvImage. It is called at the end of the thread, but also each
- * time the image is resized.
- *****************************************************************************/
-static void vout_End( vout_thread_t *p_vout )
-{
-    int i_index;
-
-    /* Free the direct buffers we allocated */
-    for( i_index = I_OUTPUTPICTURES ; i_index ; )
-    {
-        i_index--;
-        DestroyShmImage( p_vout->p_sys->p_display,
-                         PP_OUTPUTPICTURE[ i_index ]->p_sys->p_xvimage,
-                         &PP_OUTPUTPICTURE[ i_index ]->p_sys->shminfo );
-        free( PP_OUTPUTPICTURE[ i_index ]->p_sys );
-    }
-}
-
-/*****************************************************************************
- * vout_Destroy: destroy XVideo video thread output method
- *****************************************************************************
- * Terminate an output method created by vout_Create
- *****************************************************************************/
-static void vout_Destroy( vout_thread_t *p_vout )
-{
-    /* Restore cursor if it was blanked */
-    if( !p_vout->p_sys->b_mouse_pointer_visible )
-    {
-        _M( XCommonToggleMousePointer ) ( p_vout );
-    }
-
-    /* Destroy blank cursor pixmap */
-    XFreePixmap( p_vout->p_sys->p_display, p_vout->p_sys->cursor_pixmap );
-
-    _M( XCommonEnableScreenSaver ) ( p_vout );
-    _M( XCommonDestroyWindow ) ( p_vout );
-    XCloseDisplay( p_vout->p_sys->p_display );
-
-    /* Destroy structure */
-    free( p_vout->p_sys );
-}
-
-/*****************************************************************************
- * vout_Display: displays previously rendered output
- *****************************************************************************
- * This function sends the currently rendered image to X11 server.
- * (The Xv extension takes care of "double-buffering".)
- *****************************************************************************/
-static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
-{
-    int i_width, i_height, i_x, i_y;
-
-    vout_PlacePicture( p_vout, p_vout->p_sys->i_width, p_vout->p_sys->i_height,
-                       &i_x, &i_y, &i_width, &i_height );
-
-    XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport,
-                   p_vout->p_sys->yuv_window, p_vout->p_sys->gc,
-                   p_pic->p_sys->p_xvimage, 0 /*src_x*/, 0 /*src_y*/,
-                   p_vout->output.i_width, p_vout->output.i_height,
-                   0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height,
-                   False /* Don't put True here or you'll waste your CPU */ );
-
-    XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
-                   i_width, i_height );
-
-    XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
-                 i_x, i_y );
-
-    /* Force synchronization */
-    XSync( p_vout->p_sys->p_display, False );
-}
-
-/* following functions are local */
-
-/*****************************************************************************
- * CheckForXVideo: check for the XVideo extension
- *****************************************************************************/
-static int CheckForXVideo( Display *p_display )
-{
-    unsigned int i;
-
-    switch( XvQueryExtension( p_display, &i, &i, &i, &i, &i ) )
-    {
-        case Success:
-            return( 1 );
-
-        case XvBadExtension:
-            intf_WarnMsg( 3, "vout error: XvBadExtension" );
-            return( 0 );
-
-        case XvBadAlloc:
-            intf_WarnMsg( 3, "vout error: XvBadAlloc" );
-            return( 0 );
-
-        default:
-            intf_WarnMsg( 3, "vout error: XvQueryExtension failed" );
-            return( 0 );
-    }
-}
-
-/*****************************************************************************
- * XVideoNewPicture: allocate a picture
- *****************************************************************************
- * Returns 0 on success, -1 otherwise
- *****************************************************************************/
-static int XVideoNewPicture( vout_thread_t *p_vout, picture_t *p_pic )
-{
-    int i_width  = p_vout->output.i_width;
-    int i_height = p_vout->output.i_height;
-
-    switch( p_vout->output.i_chroma )
-    {
-        case YUV_420_PICTURE:
-            /* We know this 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;
-            }
-
-            /* Create XvImage using XShm extension */
-            p_pic->p_sys->p_xvimage =
-                CreateShmImage( p_vout->p_sys->p_display,
-                                p_vout->p_sys->i_xvport,
-                                &p_pic->p_sys->shminfo,
-                                p_vout->output.i_width,
-                                p_vout->output.i_height );
-            if( p_pic->p_sys->p_xvimage == NULL )
-            {
-                free( p_pic->p_sys );
-                return -1;
-            }
-
-
-            /* Precalculate some values */
-            p_pic->i_size         = i_width * i_height;
-            p_pic->i_chroma_width = i_width / 2;
-            p_pic->i_chroma_size  = i_height * ( i_width / 2 );
-
-            /* FIXME: try to get the right i_bytes value from p_xvimage */
-            p_pic->planes[Y_PLANE].p_data  = p_pic->p_sys->p_xvimage->data;
-            p_pic->planes[Y_PLANE].i_bytes = p_pic->i_size * sizeof(u8);
-            p_pic->planes[Y_PLANE].i_line_bytes = i_width * sizeof(u8);
-
-            p_pic->planes[U_PLANE].p_data  = (u8*)p_pic->p_sys->p_xvimage->data
-                                               + p_pic->i_size * 5 / 4;
-            p_pic->planes[U_PLANE].i_bytes = p_pic->i_size * sizeof(u8) / 4;
-            p_pic->planes[U_PLANE].i_line_bytes = p_pic->i_chroma_width
-                                                   * sizeof(u8);
-
-            p_pic->planes[V_PLANE].p_data  = (u8*)p_pic->p_sys->p_xvimage->data
-                                               + p_pic->i_size;
-            p_pic->planes[V_PLANE].i_bytes = p_pic->i_size * sizeof(u8) / 4;
-            p_pic->planes[V_PLANE].i_line_bytes = p_pic->i_chroma_width
-                                                   * sizeof(u8);
-
-            p_pic->i_planes = 3;
-
-            return 0;
-
-        default:
-            /* Unknown chroma, tell the guy to get lost */
-            p_pic->i_planes = 0;
-
-            return -1;
-    }
-}
-
-/*****************************************************************************
- * CreateShmImage: create an XvImage using shared memory extension
- *****************************************************************************
- * Prepare an XvImage for display function.
- * The order of the operations respects the recommandations of the mit-shm
- * document by J.Corbet and K.Packard. Most of the parameters were copied from
- * there.
- *****************************************************************************/
-static XvImage *CreateShmImage( Display* p_display, int i_xvport,
-                                XShmSegmentInfo *p_shminfo,
-                                int i_width, int i_height )
-{
-    XvImage *p_xvimage;
-
-    p_xvimage = XvShmCreateImage( p_display, i_xvport,
-                                  GUID_YUV12_PLANAR, 0,
-                                  i_width, i_height,
-                                  p_shminfo );
-    if( p_xvimage == NULL )
-    {
-        intf_ErrMsg( "vout error: XvShmCreateImage failed." );
-        return( NULL );
-    }
-
-    p_shminfo->shmid = shmget( IPC_PRIVATE, p_xvimage->data_size,
-                               IPC_CREAT | 0776 );
-    if( p_shminfo->shmid < 0 ) /* error */
-    {
-        intf_ErrMsg( "vout error: cannot allocate shared image data (%s)",
-                     strerror( errno ) );
-        return( NULL );
-    }
-
-    p_shminfo->shmaddr = p_xvimage->data = shmat( p_shminfo->shmid, 0, 0 );
-    p_shminfo->readOnly = False;
-
-    if( !XShmAttach( p_display, p_shminfo ) )
-    {
-        intf_ErrMsg( "vout error: XShmAttach failed" );
-        shmctl( p_shminfo->shmid, IPC_RMID, 0 );
-        shmdt( p_shminfo->shmaddr );
-        return( NULL );
-    }
-
-    /* Send image to X server. This instruction is required, since having
-     * built a Shm XImage and not using it causes an error on XCloseDisplay */
-    XSync( p_display, False );
-
-#if 1
-    /* Mark the shm segment to be removed when there are no more
-     * attachements, so it is automatic on process exit or after shmdt */
-    shmctl( p_shminfo->shmid, IPC_RMID, 0 );
-#endif
-
-    return( p_xvimage );
-}
-
-/*****************************************************************************
- * DestroyShmImage
- *****************************************************************************
- * Destroy XImage AND associated data. Detach shared memory segment from
- * server and process, then free it. If pointer is NULL, the image won't be
- * destroyed (see vout_Manage())
- *****************************************************************************/
-static void DestroyShmImage( Display *p_display, XvImage *p_xvimage,
-                             XShmSegmentInfo *p_shminfo )
-{
-    /* Detach from server */
-    XShmDetach( p_display, p_shminfo );
-    XSync( p_display, False );
-
-#if 0
-    XDestroyImage( p_xvimage ); /* XXX */
-#endif
-
-    XFree( p_xvimage );
-
-    if( shmdt( p_shminfo->shmaddr ) )   /* detach shared memory from process */
-    {
-        intf_ErrMsg( "vout error: cannot detach shared memory (%s)",
-                     strerror(errno) );
-    }
-}
-
-/*****************************************************************************
- * GetXVideoPort: get YUV12 port
- *****************************************************************************
- * 
- *****************************************************************************/
-static int GetXVideoPort( Display *dpy )
-{
-    XvAdaptorInfo *p_adaptor;
-    int i_adaptor, i_num_adaptors, i_requested_adaptor;
-    int i_selected_port;
-
-    switch( XvQueryAdaptors( dpy, DefaultRootWindow( dpy ),
-                             &i_num_adaptors, &p_adaptor ) )
-    {
-        case Success:
-            break;
-
-        case XvBadExtension:
-            intf_WarnMsg( 3, "vout error: XvBadExtension for XvQueryAdaptors" );
-            return( -1 );
-
-        case XvBadAlloc:
-            intf_WarnMsg( 3, "vout error: XvBadAlloc for XvQueryAdaptors" );
-            return( -1 );
-
-        default:
-            intf_WarnMsg( 3, "vout error: XvQueryAdaptors failed" );
-            return( -1 );
-    }
-
-    i_selected_port = -1;
-    i_requested_adaptor = main_GetIntVariable( VOUT_XVADAPTOR_VAR, -1 );
-
-    /* No special xv port has been requested so try all of them */
-    for( i_adaptor = 0; i_adaptor < i_num_adaptors; ++i_adaptor )
-    {
-        XvImageFormatValues *p_formats;
-        int i_format, i_num_formats;
-        int i_port;
-
-        /* If we requested an adaptor and it's not this one, we aren't
-         * interested */
-        if( i_requested_adaptor != -1 && i_adaptor != i_requested_adaptor )
-       {
-            continue;
-       }
-
-       /* If the adaptor doesn't have the required properties, skip it */
-        if( !( p_adaptor[ i_adaptor ].type & XvInputMask ) ||
-            !( p_adaptor[ i_adaptor ].type & XvImageMask ) )
-        {
-            continue;
-       }
-
-        /* Check that port supports YUV12 planar format... */
-        p_formats = XvListImageFormats( dpy, p_adaptor[i_adaptor].base_id,
-                                        &i_num_formats );
-
-        for( i_format = 0; i_format < i_num_formats; i_format++ )
-        {
-            XvEncodingInfo  *p_enc;
-            int             i_enc, i_num_encodings;
-            XvAttribute     *p_attr;
-            int             i_attr, i_num_attributes;
-
-            /* If this is not the format we want, forget it */
-            if( p_formats[ i_format ].id != GUID_YUV12_PLANAR )
-            {
-                continue;
-            }
-
-            /* Look for the first available port supporting this format */
-            for( i_port = p_adaptor[i_adaptor].base_id;
-                 ( i_port < p_adaptor[i_adaptor].base_id
-                             + p_adaptor[i_adaptor].num_ports )
-                   && ( i_selected_port == -1 );
-                 i_port++ )
-            {
-                if( XvGrabPort( dpy, i_port, CurrentTime ) == Success )
-                {
-                    i_selected_port = i_port;
-                }
-            }
-
-            /* If no free port was found, forget it */
-            if( i_selected_port == -1 )
-            {
-                continue;
-            }
-
-            /* If we found a port, print information about it */
-            intf_WarnMsg( 3, "vout: GetXVideoPort found adaptor %i, port %i",
-                             i_adaptor, i_selected_port );
-            intf_WarnMsg( 3, "  image format 0x%x (%4.4s) %s supported",
-                             p_formats[ i_format ].id,
-                             (char *)&p_formats[ i_format ].id,
-                             ( p_formats[ i_format ].format
-                                == XvPacked ) ? "packed" : "planar" );
-
-            intf_WarnMsg( 4, " encoding list:" );
-
-            if( XvQueryEncodings( dpy, i_selected_port,
-                                  &i_num_encodings, &p_enc )
-                 != Success )
-            {
-                intf_WarnMsg( 4, "  XvQueryEncodings failed" );
-                continue;
-            }
-
-            for( i_enc = 0; i_enc < i_num_encodings; i_enc++ )
-            {
-                intf_WarnMsg( 4, "  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 )
-            {
-                XvFreeEncodingInfo( p_enc );
-            }
-
-            intf_WarnMsg( 4, " attribute list:" );
-            p_attr = XvQueryPortAttributes( dpy, i_selected_port,
-                                            &i_num_attributes );
-            for( i_attr = 0; i_attr < i_num_attributes; i_attr++ )
-            {
-                intf_WarnMsg( 4,
-                      "  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" : "",
-                      p_attr[i_attr].min_value, p_attr[i_attr].max_value );
-            }
-
-            if( p_attr != NULL )
-            {
-                XFree( p_attr );
-            }
-        }
-
-        if( p_formats != NULL )
-        {
-            XFree( p_formats );
-        }
-
-    }
-
-    if( i_num_adaptors > 0 )
-    {
-        XvFreeAdaptorInfo( p_adaptor );
-    }
-
-    if( i_selected_port == -1 )
-    {
-        if( i_requested_adaptor == -1 )
-        {
-            intf_WarnMsg( 3, "vout: no free XVideo port found for YV12" );
-        }
-        else
-        {
-            intf_WarnMsg( 3, "vout: XVideo adaptor %i does not have a free "
-                             "XVideo port for YV12", i_requested_adaptor );
-        }
-    }
-
-    return( i_selected_port );
-}
-
-#if 0
-/*****************************************************************************
- * XVideoSetAttribute
- *****************************************************************************
- * This function can be used to set attributes, e.g. XV_BRIGHTNESS and
- * XV_CONTRAST. "f_value" should be in the range of 0 to 1.
- *****************************************************************************/
-static void XVideoSetAttribute( vout_thread_t *p_vout,
-                                char *attr_name, float f_value )
-{
-    int             i_attrib;
-    XvAttribute    *p_attrib;
-    Display        *p_display = p_vout->p_sys->p_display;
-    int             i_xvport  = p_vout->p_sys->i_xvport;
-
-    p_attrib = XvQueryPortAttributes( p_display, i_xvport, &i_attrib );
-
-    do
-    {
-        i_attrib--;
-
-        if( i_attrib >= 0 && !strcmp( p_attrib[ i_attrib ].name, attr_name ) )
-        {
-            int i_sv = f_value * ( p_attrib[ i_attrib ].max_value
-                                    - p_attrib[ i_attrib ].min_value + 1 )
-                        + p_attrib[ i_attrib ].min_value;
-
-            XvSetPortAttribute( p_display, i_xvport,
-                            XInternAtom( p_display, attr_name, False ), i_sv );
-            break;
-        }
-
-    } while( i_attrib > 0 );
-
-    if( p_attrib )
-        XFree( p_attrib );
-}
-#endif
-
index 5a3d73e60a5d879667e9df9107e2f3ec3cce1288..2b8906b26a534aa578afff71caa830009dbc9c3b 100644 (file)
@@ -1,10 +1,12 @@
 /*****************************************************************************
  * x11.c : X11 plugin for vlc
  *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
- * $Id: x11.c,v 1.9 2001/12/09 17:01:37 sam Exp $
+ * Copyright (C) 1998-2001 VideoLAN
+ * $Id: x11.c,v 1.10 2001/12/30 07:09:56 sam Exp $
  *
- * Authors: Samuel Hocevar <sam@zoy.org>
+ * Authors: Vincent Seguin <seguin@via.ecp.fr>
+ *          Samuel Hocevar <sam@zoy.org>
+ *          David Kennedy <dkennedy@tinytoad.com>
  *      
  * 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
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME x11
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
+#include <string.h>                                            /* strerror() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
-#include "video.h"
-#include "video_output.h"
-
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * Capabilities defined in the other files.
- *****************************************************************************/
-void _M( vout_getfunctions )( function_list_t * p_function_list );
+#include "xcommon.h"
 
 /*****************************************************************************
  * Building configuration tree
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for X11 module" )
-    ADD_COMMENT( "For now, the X11 module cannot be configured" )
+    ADD_WINDOW( "Configuration for X11 module" )
+        ADD_COMMENT( "For now, the X11 module cannot be configured" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "X11 module";
+    SET_DESCRIPTION( "X11 module" )
+    ADD_CAPABILITY( VOUT, 50 )
+    ADD_SHORTCUT( "x11" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -69,3 +54,37 @@ 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];
+
+    intf_DbgMsg( "vout: Palette change called" );
+
+    /* 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
new file mode 100644 (file)
index 0000000..0857b20
--- /dev/null
@@ -0,0 +1,1841 @@
+/*****************************************************************************
+ * xcommon.c: Functions common to the X11 and XVideo plugins
+ *****************************************************************************
+ * Copyright (C) 1998-2001 VideoLAN
+ * $Id: xcommon.c,v 1.1 2001/12/30 07:09:56 sam Exp $
+ *
+ * Authors: Vincent Seguin <seguin@via.ecp.fr>
+ *          Samuel Hocevar <sam@zoy.org>
+ *          David Kennedy <dkennedy@tinytoad.com>
+ *
+ * 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 <errno.h>                                                 /* ENOMEM */
+#include <stdlib.h>                                                /* free() */
+#include <string.h>                                            /* strerror() */
+
+#include <videolan/vlc.h>
+
+#ifdef HAVE_MACHINE_PARAM_H
+/* BSD */
+#include <machine/param.h>
+#include <sys/types.h>                                     /* typedef ushort */
+#include <sys/ipc.h>
+#endif
+
+#ifndef WIN32
+#include <netinet/in.h>                               /* BSD: struct in_addr */
+#endif
+
+#include <sys/shm.h>                                   /* shmget(), shmctl() */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/keysym.h>
+#include <X11/extensions/XShm.h>
+
+#ifdef MODULE_NAME_IS_xvideo
+#   include <X11/extensions/Xv.h>
+#   include <X11/extensions/Xvlib.h>
+#   include <X11/extensions/dpms.h>
+#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_format
+#   define EXTRA_ARGS_SHM int i_xvport, int i_format, XShmSegmentInfo *p_shm
+#   define DATA_SIZE      p_image->data_size
+    /* There is nothing like XvDestroyImage */
+#   define IMAGE_FREE     XFree
+#else
+#   define IMAGE_TYPE     XImage
+#   define EXTRA_ARGS     Visual *p_visual, int i_depth, int i_bytes_per_pixel
+#   define EXTRA_ARGS_SHM Visual *p_visual, int i_depth, XShmSegmentInfo *p_shm
+#   define DATA_SIZE      (p_image->bytes_per_line * p_image->height)
+#   define IMAGE_FREE     XDestroyImage
+#endif
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int  vout_Probe     ( probedata_t * );
+static int  vout_Create    ( vout_thread_t * );
+static void vout_Destroy   ( vout_thread_t * );
+static void vout_Display   ( vout_thread_t *, picture_t * );
+static int  vout_Manage    ( vout_thread_t * );
+static int  vout_Init      ( vout_thread_t * );
+static void vout_End       ( vout_thread_t * );
+
+static int  InitDisplay    ( vout_thread_t * );
+
+static int  CreateWindow   ( vout_thread_t * );
+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 *CreateShmImage ( Display *, EXTRA_ARGS_SHM, int, int );
+
+static void EnableXScreenSaver    ( vout_thread_t * );
+static void DisableXScreenSaver   ( vout_thread_t * );
+
+static void CreateCursor   ( vout_thread_t * );
+static void DestroyCursor  ( vout_thread_t * );
+static void ToggleCursor   ( vout_thread_t * );
+
+#ifdef MODULE_NAME_IS_xvideo
+static int  XVideoGetPort         ( Display *, int );
+static void XVideoReleasePort     ( Display *, int );
+#endif
+
+/*****************************************************************************
+ * vout_sys_t: video output method descriptor
+ *****************************************************************************
+ * 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
+{
+    /* Internal settings and properties */
+    Display *           p_display;                        /* display pointer */
+
+    Visual *            p_visual;                          /* visual pointer */
+    int                 i_screen;                           /* screen number */
+    Window              window;                               /* root window */
+    GC                  gc;              /* graphic context instance handler */
+
+    boolean_t           b_shm;               /* shared memory extension flag */
+
+#ifdef MODULE_NAME_IS_xvideo
+    Window              yuv_window;   /* sub-window for displaying yuv video
+                                                                        data */
+    GC                  yuv_gc;
+    int                 i_xvport;
+#else
+    Colormap            colormap;               /* colormap used (8bpp only) */
+
+    int                 i_screen_depth;
+    int                 i_bytes_per_pixel;
+    int                 i_bytes_per_line;
+    int                 i_red_mask;
+    int                 i_green_mask;
+    int                 i_blue_mask;
+#endif
+
+    /* X11 generic properties */
+    Atom                wm_protocols;
+    Atom                wm_delete_window;
+
+    int                 i_width;                     /* width of main window */
+    int                 i_height;                   /* height of main window */
+
+    /* Screen saver properties */
+    int                 i_ss_timeout;                             /* timeout */
+    int                 i_ss_interval;           /* interval between changes */
+    int                 i_ss_blanking;                      /* blanking mode */
+    int                 i_ss_exposure;                      /* exposure mode */
+
+    /* Mouse pointer properties */
+    boolean_t           b_mouse_pointer_visible;
+    mtime_t             i_time_mouse_last_moved; /* used to auto-hide pointer*/
+    Cursor              blank_cursor;                   /* the hidden cursor */
+    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
+{
+    IMAGE_TYPE *        p_image;
+
+    XShmSegmentInfo     shminfo;       /* shared memory zone information */
+
+} picture_sys_t;
+
+/*****************************************************************************
+ * mwmhints_t: window manager hints
+ *****************************************************************************
+ * Fullscreen needs to be able to hide the wm decorations so we provide
+ * this structure to make it easier.
+ *****************************************************************************/
+#define MWM_HINTS_DECORATIONS   (1L << 1)
+#define PROP_MWM_HINTS_ELEMENTS 5
+typedef struct mwmhints_s
+{
+    u32 flags;
+    u32 functions;
+    u32 decorations;
+    s32 input_mode;
+    u32 status;
+} mwmhints_t;
+
+/*****************************************************************************
+ * Chroma defines
+ *****************************************************************************/
+#ifdef MODULE_NAME_IS_xvideo
+#   define GUID_YUV12_PLANAR 0x32315659
+#   define MAX_DIRECTBUFFERS 5
+#else
+#   define MAX_DIRECTBUFFERS 2
+#endif
+
+/*****************************************************************************
+ * Seeking function TODO: put this in a generic location !
+ *****************************************************************************/
+static __inline__ void vout_Seek( off_t i_seek )
+{
+#define area p_main->p_intf->p_input->stream.p_selected_area
+    off_t i_tell = area->i_tell;
+
+    i_tell += i_seek * (off_t)50 * p_main->p_intf->p_input->stream.i_mux_rate;
+
+    i_tell = ( i_tell <= 0/*area->i_start*/ ) ? 0/*area->i_start*/
+           : ( i_tell >= area->i_size ) ? area->i_size
+           : i_tell;
+
+    input_Seek( p_main->p_intf->p_input, i_tell );
+#undef area
+}
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+void _M( vout_getfunctions )( function_list_t * p_function_list )
+{
+    p_function_list->pf_probe = vout_Probe;
+    p_function_list->functions.vout.pf_create     = vout_Create;
+    p_function_list->functions.vout.pf_init       = vout_Init;
+    p_function_list->functions.vout.pf_end        = vout_End;
+    p_function_list->functions.vout.pf_destroy    = vout_Destroy;
+    p_function_list->functions.vout.pf_manage     = vout_Manage;
+    p_function_list->functions.vout.pf_display    = vout_Display;
+    p_function_list->functions.vout.pf_setpalette = NULL;
+}
+
+/*****************************************************************************
+ * vout_Probe: probe the video driver and return a score
+ *****************************************************************************
+ * This function tries to initialize SDL and returns a score to the
+ * plugin manager so that it can select the best plugin.
+ *****************************************************************************/
+static int vout_Probe( probedata_t *p_data )
+{
+    Display *p_display;                                   /* display pointer */
+    char    *psz_display;
+#ifdef MODULE_NAME_IS_xvideo
+    int      i_xvport;
+#endif
+
+    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
+    psz_display = XDisplayName( main_GetPszVariable(VOUT_DISPLAY_VAR, NULL) );
+    p_display = XOpenDisplay( psz_display );
+    if( p_display == NULL )                                         /* error */
+    {
+        intf_WarnMsg( 3, "vout: cannot open display %s", psz_display );
+        return( 0 );
+    }
+
+#ifdef MODULE_NAME_IS_xvideo 
+    /* Check that there is an available XVideo port */
+    i_xvport = XVideoGetPort( p_display, GUID_YUV12_PLANAR );
+    if( i_xvport < 0 )
+    {
+        intf_WarnMsg( 3, "vout: no XVideo port available" );
+        XCloseDisplay( p_display );
+        return( 0 );
+    }
+    XVideoReleasePort( p_display, i_xvport );
+#endif
+
+    /* Clean-up everyting */
+    XCloseDisplay( p_display );
+
+#ifdef MODULE_NAME_IS_xvideo 
+    return( 150 );
+#else
+    return( 50 );
+#endif
+}
+
+/*****************************************************************************
+ * vout_Create: allocate X11 video thread output method
+ *****************************************************************************
+ * This function allocate and initialize a X11 vout method. It uses some of the
+ * vout properties to choose the window size, and change them according to the
+ * actual properties of the display.
+ *****************************************************************************/
+static int vout_Create( vout_thread_t *p_vout )
+{
+    char *psz_display;
+
+    /* Allocate structure */
+    p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
+    if( p_vout->p_sys == NULL )
+    {
+        intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
+        return( 1 );
+    }
+
+    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
+    psz_display = XDisplayName( main_GetPszVariable( VOUT_DISPLAY_VAR, NULL ) );
+    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", psz_display );
+        free( p_vout->p_sys );
+        return( 1 );
+    }
+    p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
+
+#ifdef MODULE_NAME_IS_xvideo
+    /* Check that we have access to an XVideo port */
+    p_vout->p_sys->i_xvport = XVideoGetPort( p_vout->p_sys->p_display,
+                                             GUID_YUV12_PLANAR );
+    if( p_vout->p_sys->i_xvport < 0 )
+    {
+        intf_ErrMsg( "vout error: cannot get XVideo port" );
+        XCloseDisplay( p_vout->p_sys->p_display );
+        free( p_vout->p_sys );
+        return 1;
+    }
+#endif
+
+    /* Spawn base window - this window will include the video output window,
+     * but also command buttons, subtitles and other indicators */
+    if( CreateWindow( p_vout ) )
+    {
+        intf_ErrMsg( "vout error: cannot create X11 window" );
+        XCloseDisplay( p_vout->p_sys->p_display );
+        free( p_vout->p_sys );
+        return( 1 );
+    }
+
+    /* Open and initialize device. */
+    if( InitDisplay( p_vout ) )
+    {
+        intf_ErrMsg( "vout error: cannot initialize X11 display" );
+        XCloseDisplay( p_vout->p_sys->p_display );
+        free( p_vout->p_sys );
+        return( 1 );
+    }
+
+    /* Create blank cursor (for mouse cursor autohiding) */
+    CreateCursor( p_vout );
+
+    p_vout->p_sys->b_mouse_pointer_visible = 1;
+
+    /* Disable screen saver and return */
+    DisableXScreenSaver( p_vout );
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * vout_Destroy: destroy X11 video thread output method
+ *****************************************************************************
+ * Terminate an output method created by vout_CreateOutputMethod
+ *****************************************************************************/
+static void vout_Destroy( vout_thread_t *p_vout )
+{
+    /* Restore cursor if it was blanked */
+    if( !p_vout->p_sys->b_mouse_pointer_visible )
+    {
+        ToggleCursor( p_vout );
+    }
+
+#ifdef MODULE_NAME_IS_xvideo   
+    XVideoReleasePort( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport );
+#else
+#if 0
+    /* Destroy colormap */
+    if( p_vout->p_sys->i_screen_depth == 8 )
+    {
+        XFreeColormap( p_vout->p_sys->p_display, p_vout->p_sys->colormap );
+    }
+#endif
+#endif
+
+    DestroyCursor( p_vout );
+    EnableXScreenSaver( p_vout );
+    DestroyWindow( p_vout );
+
+    XCloseDisplay( p_vout->p_sys->p_display );
+
+    /* Destroy structure */
+    free( p_vout->p_sys );
+}
+
+/*****************************************************************************
+ * vout_Init: initialize X11 video thread output method
+ *****************************************************************************
+ * This function create the XImages needed by the output thread. It is called
+ * at the beginning of the thread, but also each time the window is resized.
+ *****************************************************************************/
+static int vout_Init( vout_thread_t *p_vout )
+{
+    int i_index;
+    picture_t *p_pic;
+
+    I_OUTPUTPICTURES = 0;
+
+#ifdef MODULE_NAME_IS_xvideo
+    /* Initialize the output structure */
+    switch( p_vout->render.i_chroma )
+    {
+        case YUV_420_PICTURE:
+            p_vout->output.i_chroma = p_vout->render.i_chroma;
+            p_vout->output.i_width  = p_vout->render.i_width;
+            p_vout->output.i_height = p_vout->render.i_height;
+            p_vout->output.i_aspect = p_vout->render.i_aspect;
+            break;
+
+        default:
+            return( 0 );
+    }
+#else
+    /* Initialize the output structure: RGB with square pixels, whatever
+     * the input format is, since it's the only format we know */
+    p_vout->output.i_chroma = RGB_16BPP_PICTURE;
+    p_vout->output.i_width = p_vout->p_sys->i_width;
+    p_vout->output.i_height = p_vout->p_sys->i_height;
+    p_vout->output.i_aspect = p_vout->p_sys->i_width
+                               * VOUT_ASPECT_FACTOR / p_vout->p_sys->i_height;
+#endif
+
+    /* Try to initialize up to MAX_DIRECTBUFFERS direct buffers */
+    while( I_OUTPUTPICTURES < MAX_DIRECTBUFFERS )
+    {
+        p_pic = NULL;
+
+        /* Find an empty picture slot */
+        for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
+        {
+            if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
+            {
+                p_pic = p_vout->p_picture + i_index;
+                break;
+            }
+        }
+
+        /* Allocate the picture */
+        if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
+        {
+            break;
+        }
+
+        p_pic->i_status        = DESTROYED_PICTURE;
+        p_pic->i_type          = DIRECT_PICTURE;
+
+        p_pic->i_left_margin   =
+        p_pic->i_right_margin  =
+        p_pic->i_top_margin    = 
+        p_pic->i_bottom_margin = 0;
+
+        PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
+
+        I_OUTPUTPICTURES++;
+    }
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * vout_Display: displays previously rendered output
+ *****************************************************************************
+ * This function sends the currently rendered image to X11 server.
+ * (The Xv extension takes care of "double-buffering".)
+ *****************************************************************************/
+static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
+{
+    int i_width, i_height, i_x, i_y;
+
+    vout_PlacePicture( p_vout, p_vout->p_sys->i_width, p_vout->p_sys->i_height,
+                       &i_x, &i_y, &i_width, &i_height );
+
+    if( p_vout->p_sys->b_shm )
+    {
+        /* Display rendered image using shared memory extension */
+#ifdef MODULE_NAME_IS_xvideo
+        XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport,
+                       p_vout->p_sys->yuv_window, p_vout->p_sys->gc,
+                       p_pic->p_sys->p_image, 0 /*src_x*/, 0 /*src_y*/,
+                       p_vout->output.i_width, p_vout->output.i_height,
+                       0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height,
+                       False /* Don't put True here or you'll waste your CPU */ );
+#else
+        XShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                      p_vout->p_sys->gc, p_pic->p_sys->p_image,
+                      0 /*src_x*/, 0 /*src_y*/, 0 /*dest_x*/, 0 /*dest_y*/,
+                      p_vout->output.i_width, p_vout->output.i_height,
+                      False /* Don't put True here ! */ );
+#endif
+    }
+    else
+    {
+        /* Use standard XPutImage -- this is gonna be slow ! */
+#ifdef MODULE_NAME_IS_xvideo
+        XvPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport,
+                    p_vout->p_sys->yuv_window, p_vout->p_sys->gc,
+                    p_pic->p_sys->p_image, 0 /*src_x*/, 0 /*src_y*/,
+                    p_vout->output.i_width, p_vout->output.i_height,
+                    0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height );
+#else
+        XPutImage( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                   p_vout->p_sys->gc, p_pic->p_sys->p_image,
+                   0 /*src_x*/, 0 /*src_y*/, 0 /*dest_x*/, 0 /*dest_y*/,
+                   p_vout->output.i_width, p_vout->output.i_height );
+#endif
+    }
+
+#ifdef MODULE_NAME_IS_xvideo
+    XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
+                   i_width, i_height );
+    XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
+                 i_x, i_y );
+#endif
+
+    /* Force synchronization */
+    XSync( p_vout->p_sys->p_display, False );
+}
+
+/*****************************************************************************
+ * vout_Manage: handle X11 events
+ *****************************************************************************
+ * This function should be called regularly by video output thread. It manages
+ * X11 events and allows window resizing. It returns a non null value on
+ * error.
+ *****************************************************************************/
+static int vout_Manage( vout_thread_t *p_vout )
+{
+    XEvent      xevent;                                         /* X11 event */
+    boolean_t   b_resized;                        /* window has been resized */
+    char        i_key;                                    /* ISO Latin-1 key */
+    KeySym      x_key_symbol;
+
+    /* Handle X11 events: ConfigureNotify events are parsed to know if the
+     * output window's size changed, MapNotify and UnmapNotify to know if the
+     * window is mapped (and if the display is useful), and ClientMessages
+     * to intercept window destruction requests */
+
+    b_resized = 0;
+    while( XCheckWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                              StructureNotifyMask | KeyPressMask |
+                              ButtonPressMask | ButtonReleaseMask | 
+                              PointerMotionMask | Button1MotionMask , &xevent )
+           == True )
+    {
+        /* ConfigureNotify event: prepare  */
+        if( (xevent.type == ConfigureNotify)
+          && ((xevent.xconfigure.width != p_vout->p_sys->i_width)
+             || (xevent.xconfigure.height != p_vout->p_sys->i_height)) )
+        {
+            /* Update dimensions */
+            b_resized = 1;
+            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 )
+        {
+            /* We may have keys like F1 trough F12, ESC ... */
+            x_key_symbol = XKeycodeToKeysym( p_vout->p_sys->p_display,
+                                             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_main->p_intf->p_input,
+                     p_main->p_intf->p_input->stream.p_selected_area->i_start );
+                     break;
+                 case XK_End:
+                     input_Seek( p_main->p_intf->p_input,
+                     p_main->p_intf->p_input->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_main->p_intf->p_input,
+                                      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_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:
+                            intf_DbgMsg( "vout: unhandled key '%c' (%i)", 
+                                         (char)i_key, i_key );
+                            break;
+                        }
+                    }
+                break;
+            }
+        }
+        /* Mouse click */
+        else if( xevent.type == ButtonPress )
+        {
+            switch( ((XButtonEvent *)&xevent)->button )
+            {
+                case Button1:
+                    /* In this part we will eventually manage
+                     * clicks for DVD navigation for instance. For the
+                     * moment just pause the stream. */
+                    input_SetStatus( p_main->p_intf->p_input,
+                                     INPUT_STATUS_PAUSE );
+                    break;
+
+                case Button4:
+                    vout_Seek( 15 );
+                    break;
+
+                case Button5:
+                    vout_Seek( -15 );
+                    break;
+            }
+        }
+        /* Mouse release */
+        else if( xevent.type == ButtonRelease )
+        {
+            switch( ((XButtonEvent *)&xevent)->button )
+            {
+                case Button3:
+                    /* FIXME: need locking ! */
+                    p_main->p_intf->b_menu_change = 1;
+                    break;
+            }
+        }
+        /* Mouse move */
+        else if( xevent.type == MotionNotify )
+        {
+            p_vout->p_sys->i_time_mouse_last_moved = mdate();
+            if( ! p_vout->p_sys->b_mouse_pointer_visible )
+            {
+                ToggleCursor( p_vout ); 
+            }
+        }
+        /* Other event */
+        else
+        {
+            intf_WarnMsg( 3, "vout: unhandled event %d received", xevent.type );
+        }
+    }
+
+#ifdef MODULE_NAME_IS_xvideo
+    /* Handle events for YUV video output sub-window */
+    while( XCheckWindowEvent( p_vout->p_sys->p_display,
+                              p_vout->p_sys->yuv_window,
+                              ExposureMask, &xevent ) == True )
+    {
+        /* Window exposed (only handled if stream playback is paused) */
+        if( xevent.type == Expose )
+        {
+            if( ((XExposeEvent *)&xevent)->count == 0 )
+            {
+                /* (if this is the last a collection of expose events...) */
+                if( p_main->p_intf->p_input != NULL )
+                {
+                    if( PAUSE_S ==
+                            p_main->p_intf->p_input->stream.control.i_status )
+                    {
+/*                        XVideoDisplay( p_vout )*/;
+                    }
+                }
+            }
+        }
+    }
+#endif
+
+    /* ClientMessage event - only WM_PROTOCOLS with WM_DELETE_WINDOW data
+     * are handled - according to the man pages, the format is always 32
+     * in this case */
+    while( XCheckTypedEvent( p_vout->p_sys->p_display,
+                             ClientMessage, &xevent ) )
+    {
+        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;
+        }
+        else
+        {
+            intf_DbgMsg( "vout: unhandled ClientMessage received" );
+        }
+    }
+
+    if ( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
+    {
+        p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
+
+        p_vout->b_fullscreen = !p_vout->b_fullscreen;
+
+        /* Get rid of the old window */
+        DestroyWindow( p_vout );
+
+        /* And create a new one */
+        if( CreateWindow( p_vout ) )
+        {
+            intf_ErrMsg( "vout error: cannot create X11 window" );
+            XCloseDisplay( p_vout->p_sys->p_display );
+
+            free( p_vout->p_sys );
+            return( 1 );
+        }
+
+    }
+
+#ifdef MODULE_NAME_IS_x11
+    /*
+     * Handle vout window resizing
+     */
+#if 0
+    if( b_resized )
+    {
+        /* If interface window has been resized, change vout size */
+        intf_DbgMsg( "vout: resizing output window" );
+        p_vout->i_width =  p_vout->p_sys->i_width;
+        p_vout->i_height = p_vout->p_sys->i_height;
+        p_vout->i_changes |= VOUT_SIZE_CHANGE;
+    }
+    else if( (p_vout->i_width  != p_vout->p_sys->i_width) ||
+             (p_vout->i_height != p_vout->p_sys->i_height) )
+    {
+        /* If video output size has changed, change interface window size */
+        intf_DbgMsg( "vout: resizing output window" );
+        p_vout->p_sys->i_width =    p_vout->i_width;
+        p_vout->p_sys->i_height =   p_vout->i_height;
+        XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                       p_vout->p_sys->i_width, p_vout->p_sys->i_height );
+    }
+    /*
+     * Color/Grayscale or gamma change: in 8bpp, just change the colormap
+     */
+    if( (p_vout->i_changes & VOUT_GRAYSCALE_CHANGE)
+        && (p_vout->i_screen_depth == 8) )
+    {
+        /* FIXME: clear flags ?? */
+    }
+
+    /*
+     * Size change
+     */
+    if( p_vout->i_changes & VOUT_SIZE_CHANGE )
+    {
+        intf_DbgMsg( "vout info: resizing window" );
+        p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
+
+        /* Resize window */
+        XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                       p_vout->i_width, p_vout->i_height );
+
+        /* Destroy XImages to change their size */
+        vout_End( p_vout );
+
+        /* Recreate XImages. If SysInit failed, the thread can't go on. */
+        if( vout_Init( p_vout ) )
+        {
+            intf_ErrMsg( "vout error: cannot resize display" );
+            return( 1 );
+       }
+
+        /* Tell the video output thread that it will need to rebuild YUV
+         * tables. This is needed since conversion buffer size may have
+         * changed */
+        p_vout->i_changes |= VOUT_YUV_CHANGE;
+        intf_Msg( "vout: video display resized (%dx%d)",
+                  p_vout->i_width, p_vout->i_height);
+    }
+#endif /* #if 0 */
+#else
+    /*
+     * Size change
+     */
+    if( p_vout->i_changes & VOUT_SIZE_CHANGE )
+    {
+        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 );
+    }
+#endif
+
+    /* Autohide Cursour */
+    if( mdate() - p_vout->p_sys->i_time_mouse_last_moved > 2000000 )
+    {
+        /* Hide the mouse automatically */
+        if( p_vout->p_sys->b_mouse_pointer_visible )
+        {
+            ToggleCursor( p_vout ); 
+        }
+    }
+
+    return 0;
+}
+
+/*****************************************************************************
+ * vout_End: terminate X11 video thread output method
+ *****************************************************************************
+ * Destroy the X11 XImages created by vout_Init. It is called at the end of
+ * the thread, but also each time the window is resized.
+ *****************************************************************************/
+static void vout_End( vout_thread_t *p_vout )
+{
+    int i_index;
+
+    /* Free the direct buffers we allocated */
+    for( i_index = I_OUTPUTPICTURES ; i_index ; )
+    {
+        i_index--;
+        FreePicture( p_vout, PP_OUTPUTPICTURE[ i_index ] );
+    }
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * CreateWindow: open and set-up X11 main window
+ *****************************************************************************/
+static int CreateWindow( vout_thread_t *p_vout )
+{
+    XSizeHints              xsize_hints;
+    XSetWindowAttributes    xwindow_attributes;
+    XGCValues               xgcvalues;
+    XEvent                  xevent;
+    Atom                    prop;
+    mwmhints_t              mwmhints;
+
+    boolean_t               b_expose;
+    boolean_t               b_configure_notify;
+    boolean_t               b_map_notify;
+
+    /* If we're full screen, we're full screen! */
+    if( p_vout->b_fullscreen ) 
+    {
+        p_vout->p_sys->i_width =
+           DisplayWidth( p_vout->p_sys->p_display, p_vout->p_sys->i_screen );
+        p_vout->p_sys->i_height =
+           DisplayHeight( p_vout->p_sys->p_display, p_vout->p_sys->i_screen ); 
+    }
+    else
+    {
+        /* Set main window's size */
+        if( p_vout->render.i_height * p_vout->render.i_aspect
+             >= p_vout->render.i_width * VOUT_ASPECT_FACTOR )
+        {
+            p_vout->p_sys->i_width = p_vout->render.i_height
+                * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR;
+            p_vout->p_sys->i_height = p_vout->render.i_height;
+        }
+        else
+        {
+            p_vout->p_sys->i_width = p_vout->render.i_width;
+            p_vout->p_sys->i_height = p_vout->render.i_width
+                * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
+        }
+
+#if 0
+        if( p_vout->p_sys->i_width <= 300 && p_vout->p_sys->i_height <= 300 )
+        {
+            p_vout->p_sys->i_width <<= 1;
+            p_vout->p_sys->i_height <<= 1;
+        }
+        else if( p_vout->p_sys->i_width <= 400
+                  && p_vout->p_sys->i_height <= 400 )
+        {
+            p_vout->p_sys->i_width += p_vout->p_sys->i_width >> 1;
+            p_vout->p_sys->i_height += p_vout->p_sys->i_height >> 1;
+        }
+#endif
+    }
+
+    /* Prepare window manager hints and properties */
+    xsize_hints.base_width          = p_vout->p_sys->i_width;
+    xsize_hints.base_height         = p_vout->p_sys->i_height;
+    xsize_hints.flags               = PSize;
+    p_vout->p_sys->wm_protocols     = XInternAtom( p_vout->p_sys->p_display,
+                                                   "WM_PROTOCOLS", True );
+    p_vout->p_sys->wm_delete_window = XInternAtom( p_vout->p_sys->p_display,
+                                                   "WM_DELETE_WINDOW", True );
+
+    /* Prepare window attributes */
+    xwindow_attributes.backing_store = Always;       /* save the hidden part */
+    xwindow_attributes.background_pixel = BlackPixel( p_vout->p_sys->p_display,
+                                                      p_vout->p_sys->i_screen );
+    xwindow_attributes.event_mask = ExposureMask | StructureNotifyMask;
+    
+
+    /* Create the window and set hints - the window must receive ConfigureNotify
+     * events, and, until it is displayed, Expose and MapNotify events. */
+
+    p_vout->p_sys->window =
+        XCreateWindow( p_vout->p_sys->p_display,
+                       DefaultRootWindow( p_vout->p_sys->p_display ),
+                       0, 0,
+                       p_vout->p_sys->i_width,
+                       p_vout->p_sys->i_height,
+#ifdef MODULE_NAME_IS_x11
+                       /* XXX - what's this ? */
+                       0,
+#else
+                       1,
+#endif
+                       0, InputOutput, 0,
+                       CWBackingStore | CWBackPixel | CWEventMask,
+                       &xwindow_attributes );
+
+    if ( p_vout->b_fullscreen )
+    {
+        prop = XInternAtom(p_vout->p_sys->p_display, "_MOTIF_WM_HINTS", False);
+        mwmhints.flags = MWM_HINTS_DECORATIONS;
+        mwmhints.decorations = 0;
+        XChangeProperty( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                         prop, prop, 32, PropModeReplace,
+                         (unsigned char *)&mwmhints, PROP_MWM_HINTS_ELEMENTS );
+
+        XSetTransientForHint( p_vout->p_sys->p_display,
+                              p_vout->p_sys->window, None );
+        XRaiseWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
+    }
+
+    /* Set window manager hints and properties: size hints, command,
+     * window's name, and accepted protocols */
+    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 );
+    XStoreName( p_vout->p_sys->p_display, p_vout->p_sys->window,
+#ifdef MODULE_NAME_IS_x11
+                VOUT_TITLE " (X11 output)"
+#else
+                VOUT_TITLE " (XVideo output)"
+#endif
+              );
+
+    if( (p_vout->p_sys->wm_protocols == None)        /* use WM_DELETE_WINDOW */
+        || (p_vout->p_sys->wm_delete_window == None)
+        || !XSetWMProtocols( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                             &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" );
+    }
+
+    /* Creation of a graphic context that doesn't generate a GraphicsExpose
+     * event when using functions like XCopyArea */
+    xgcvalues.graphics_exposures = False;
+    p_vout->p_sys->gc = XCreateGC( p_vout->p_sys->p_display,
+                                   p_vout->p_sys->window,
+                                   GCGraphicsExposures, &xgcvalues);
+
+    /* Send orders to server, and wait until window is displayed - three
+     * events must be received: a MapNotify event, an Expose event allowing
+     * drawing in the window, and a ConfigureNotify to get the window
+     * dimensions. Once those events have been received, only ConfigureNotify
+     * events need to be received. */
+    b_expose = 0;
+    b_configure_notify = 0;
+    b_map_notify = 0;
+    XMapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window);
+    do
+    {
+        XNextEvent( p_vout->p_sys->p_display, &xevent);
+        if( (xevent.type == Expose)
+            && (xevent.xexpose.window == p_vout->p_sys->window) )
+        {
+            b_expose = 1;
+        }
+        else if( (xevent.type == MapNotify)
+                 && (xevent.xmap.window == p_vout->p_sys->window) )
+        {
+            b_map_notify = 1;
+        }
+        else if( (xevent.type == ConfigureNotify)
+                 && (xevent.xconfigure.window == p_vout->p_sys->window) )
+        {
+            b_configure_notify = 1;
+            p_vout->p_sys->i_width = xevent.xconfigure.width;
+            p_vout->p_sys->i_height = xevent.xconfigure.height;
+        }
+    } while( !( b_expose && b_configure_notify && b_map_notify ) );
+
+    XSelectInput( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                  StructureNotifyMask | KeyPressMask |
+                  ButtonPressMask | ButtonReleaseMask | 
+                  PointerMotionMask );
+
+    if( p_vout->b_fullscreen )
+    {
+        XSetInputFocus( p_vout->p_sys->p_display, p_vout->p_sys->window,
+                        RevertToNone, CurrentTime );
+        XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->window, 0, 0 );
+    }
+
+#ifdef MODULE_NAME_IS_x11
+    if( XDefaultDepth(p_vout->p_sys->p_display, p_vout->p_sys->i_screen) == 8 )
+    {
+        /* Allocate a new palette */
+        p_vout->p_sys->colormap =
+            XCreateColormap( p_vout->p_sys->p_display,
+                             DefaultRootWindow( p_vout->p_sys->p_display ),
+                             DefaultVisual( p_vout->p_sys->p_display,
+                                            p_vout->p_sys->i_screen ),
+                             AllocAll );
+
+        xwindow_attributes.colormap = p_vout->p_sys->colormap;
+        XChangeWindowAttributes( p_vout->p_sys->p_display,
+                                 p_vout->p_sys->window,
+                                 CWColormap, &xwindow_attributes );
+    }
+
+#else
+    /* Create YUV output sub-window. */
+    p_vout->p_sys->yuv_window = XCreateSimpleWindow( p_vout->p_sys->p_display,
+                         p_vout->p_sys->window, 0, 0, 1, 1, 0,
+                         BlackPixel( p_vout->p_sys->p_display,
+                                         p_vout->p_sys->i_screen ),
+                         WhitePixel( p_vout->p_sys->p_display,
+                                         p_vout->p_sys->i_screen ) );
+
+    p_vout->p_sys->yuv_gc = XCreateGC( p_vout->p_sys->p_display,
+                                       p_vout->p_sys->yuv_window,
+                                       GCGraphicsExposures, &xgcvalues );
+    
+    XSetWindowBackground( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
+             BlackPixel(p_vout->p_sys->p_display, p_vout->p_sys->i_screen ) );
+    
+    XMapWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window );
+    XSelectInput( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
+                  ExposureMask );
+#endif
+
+    /* If the cursor was formerly blank than blank it again */
+    if( !p_vout->p_sys->b_mouse_pointer_visible )
+    {
+        ToggleCursor( p_vout );
+        ToggleCursor( p_vout );
+    }
+
+    XSync( p_vout->p_sys->p_display, False );
+
+    /* At this stage, the window is open, displayed, and ready to
+     * receive data */
+
+    return( 0 );
+}
+
+static void DestroyWindow( vout_thread_t *p_vout )
+{
+    XSync( p_vout->p_sys->p_display, False );
+
+#ifdef MODULE_NAME_IS_xvideo
+    XFreeGC( p_vout->p_sys->p_display, p_vout->p_sys->yuv_gc );
+    XDestroyWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window );
+#endif
+
+    XUnmapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
+    XFreeGC( p_vout->p_sys->p_display, p_vout->p_sys->gc );
+    XDestroyWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
+}
+
+/*****************************************************************************
+ * NewPicture: allocate a picture
+ *****************************************************************************
+ * Returns 0 on success, -1 otherwise
+ *****************************************************************************/
+static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
+{
+#define P p_pic->planes
+    int i_width  = p_vout->output.i_width;
+    int i_height = p_vout->output.i_height;
+    
+    switch( p_vout->output.i_chroma )
+    {
+#ifdef MODULE_NAME_IS_xvideo
+        case YUV_420_PICTURE:
+            /* We know this 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;
+            }
+
+            if( p_vout->p_sys->b_shm )
+            {
+                /* Create XvImage using XShm extension */
+                p_pic->p_sys->p_image =
+                    CreateShmImage( p_vout->p_sys->p_display,
+                                    p_vout->p_sys->i_xvport,
+                                    GUID_YUV12_PLANAR,
+                                    &p_pic->p_sys->shminfo,
+                                    p_vout->output.i_width,
+                                    p_vout->output.i_height );
+            }
+            else
+            {
+                /* Create XvImage using XShm extension */
+                p_pic->p_sys->p_image =
+                    CreateImage( p_vout->p_sys->p_display,
+                                 p_vout->p_sys->i_xvport,
+                                 GUID_YUV12_PLANAR,
+                                 p_vout->output.i_width,
+                                 p_vout->output.i_height );
+            }
+
+            if( p_pic->p_sys->p_image == NULL )
+            {
+                free( p_pic->p_sys );
+                return -1;
+            }
+
+            /* FIXME: try to get the right i_bytes value from p_image */
+            P[Y_PLANE].p_data = p_pic->p_sys->p_image->data;
+            P[Y_PLANE].i_bytes = i_width * i_height;
+            P[Y_PLANE].i_line_bytes = i_width;
+
+            P[U_PLANE].p_data = P[Y_PLANE].p_data + i_width * i_height * 5 / 4;
+            P[U_PLANE].i_bytes = i_width * i_height / 4;
+            P[U_PLANE].i_line_bytes = i_width / 2;
+
+            P[V_PLANE].p_data = P[Y_PLANE].p_data + i_width * i_height;
+            P[V_PLANE].i_bytes = i_width * i_height / 4;
+            P[V_PLANE].i_line_bytes = i_width / 2;
+
+            p_pic->i_planes = 3;
+
+            return 0;
+#endif
+
+#ifdef MODULE_NAME_IS_x11
+        case RGB_16BPP_PICTURE:
+            p_pic->p_sys = malloc( sizeof( picture_sys_t ) );
+
+            if( p_pic->p_sys == NULL )
+            {
+                return -1;
+            }
+
+            if( p_vout->p_sys->b_shm )
+            {
+                p_pic->p_sys->p_image =
+                    CreateShmImage( p_vout->p_sys->p_display,
+                                    p_vout->p_sys->p_visual,
+                                    p_vout->p_sys->i_screen_depth,
+                                    &p_pic->p_sys->shminfo,
+                                    i_width, i_height );
+            }
+            else
+            {
+                p_pic->p_sys->p_image =
+                    CreateImage( p_vout->p_sys->p_display,
+                                 p_vout->p_sys->p_visual,
+                                 p_vout->p_sys->i_screen_depth, 
+                                 p_vout->p_sys->i_bytes_per_pixel,
+                                 i_width, i_height );
+            }
+
+            if( p_pic->p_sys->p_image == NULL )
+            {
+                free( p_pic->p_sys );
+                return -1;
+            }
+
+            /* FIXME: try to get the right i_bytes value from p_image */
+            P[ RGB_PLANE ].p_data = p_pic->p_sys->p_image->data;
+            P[ RGB_PLANE ].i_bytes = 2 * i_width * i_height;
+            P[ RGB_PLANE ].i_line_bytes = 2 * i_width;
+
+            p_pic->i_planes = 1;
+
+            return 0;
+#endif
+
+        default:
+            /* Unknown chroma, tell the guy to get lost */
+            p_pic->i_planes = 0;
+
+            return -1;
+    }
+#undef P
+}
+
+/*****************************************************************************
+ * FreePicture: destroy a picture allocated with NewPicture
+ *****************************************************************************
+ * Destroy XImage AND associated data. If using Shm, detach shared memory
+ * segment from server and process, then free it. The XDestroyImage manpage
+ * says that both the image structure _and_ the data pointed to by the
+ * image structure are freed, so no need to free p_image->data.
+ *****************************************************************************/
+static void FreePicture( vout_thread_t *p_vout, picture_t *p_pic )
+{
+    /* FIXME: check the operation order */
+
+    if( p_vout->p_sys->b_shm )
+    {
+        XShmDetach( p_vout->p_sys->p_display, &p_pic->p_sys->shminfo );
+
+        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) );
+        }
+    }
+
+    XSync( p_vout->p_sys->p_display, False );
+    IMAGE_FREE( p_pic->p_sys->p_image );
+
+    free( p_pic->p_sys );
+}
+
+/*****************************************************************************
+ * EnableXScreenSaver: enable screen saver
+ *****************************************************************************
+ * This function enable the screen saver on a display after it had been
+ * disabled by XDisableXScreenSaver. Both functions use a counter mechanism to
+ * know wether the screen saver can be activated or not: if n successive calls
+ * are made to XDisableXScreenSaver, n successive calls to XEnableXScreenSaver
+ * will be required before the screen saver could effectively be activated.
+ *****************************************************************************/
+static void EnableXScreenSaver( vout_thread_t *p_vout )
+{
+    intf_DbgMsg( "vout: enabling screen saver" );
+    XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
+                     p_vout->p_sys->i_ss_interval,
+                     p_vout->p_sys->i_ss_blanking,
+                     p_vout->p_sys->i_ss_exposure );
+}
+
+/*****************************************************************************
+ * DisableXScreenSaver: disable screen saver
+ *****************************************************************************
+ * See XEnableXScreenSaver
+ *****************************************************************************/
+static void DisableXScreenSaver( vout_thread_t *p_vout )
+{
+    /* Save screen saver informations */
+    XGetScreenSaver( p_vout->p_sys->p_display, &p_vout->p_sys->i_ss_timeout,
+                     &p_vout->p_sys->i_ss_interval,
+                     &p_vout->p_sys->i_ss_blanking,
+                     &p_vout->p_sys->i_ss_exposure );
+
+    /* Disable screen saver */
+    intf_DbgMsg( "vout: disabling screen saver" );
+    XSetScreenSaver( p_vout->p_sys->p_display, 0,
+                     p_vout->p_sys->i_ss_interval,
+                     p_vout->p_sys->i_ss_blanking,
+                     p_vout->p_sys->i_ss_exposure );
+
+#ifdef MODULE_NAME_IS_xvideo
+    DPMSDisable( p_vout->p_sys->p_display );
+#endif
+}
+
+/*****************************************************************************
+ * CreateCursor: create a blank mouse pointer
+ *****************************************************************************/
+static void CreateCursor( vout_thread_t *p_vout )
+{
+    XColor cursor_color;
+
+    p_vout->p_sys->cursor_pixmap =
+        XCreatePixmap( p_vout->p_sys->p_display,
+                       DefaultRootWindow( p_vout->p_sys->p_display ),
+                       1, 1, 1 );
+
+    XParseColor( p_vout->p_sys->p_display,
+                 XCreateColormap( p_vout->p_sys->p_display,
+                                  DefaultRootWindow( p_vout->p_sys->p_display ),
+                                  DefaultVisual( p_vout->p_sys->p_display,
+                                                 p_vout->p_sys->i_screen ),
+                                  AllocNone ),
+                 "black", &cursor_color );
+
+    p_vout->p_sys->blank_cursor =
+        XCreatePixmapCursor( p_vout->p_sys->p_display,
+                             p_vout->p_sys->cursor_pixmap,
+                             p_vout->p_sys->cursor_pixmap,
+                             &cursor_color, &cursor_color, 1, 1 );
+}
+
+/*****************************************************************************
+ * DestroyCursor: destroy the blank mouse pointer
+ *****************************************************************************/
+static void DestroyCursor( vout_thread_t *p_vout )
+{
+    XFreePixmap( p_vout->p_sys->p_display, p_vout->p_sys->cursor_pixmap );
+}
+
+/*****************************************************************************
+ * ToggleCursor: hide or show the mouse pointer
+ *****************************************************************************
+ * This function hides the X pointer if it is visible by putting it at
+ * coordinates (32,32) and setting the pointer sprite to a blank one. To
+ * show it again, we disable the sprite and restore the original coordinates.
+ *****************************************************************************/
+static void ToggleCursor( vout_thread_t *p_vout )
+{
+    if( p_vout->p_sys->b_mouse_pointer_visible )
+    {
+        XDefineCursor( p_vout->p_sys->p_display,
+                       p_vout->p_sys->window,
+                       p_vout->p_sys->blank_cursor );
+        p_vout->p_sys->b_mouse_pointer_visible = 0;
+    }
+    else
+    {
+        XUndefineCursor( p_vout->p_sys->p_display, p_vout->p_sys->window );
+        p_vout->p_sys->b_mouse_pointer_visible = 1;
+    }
+}
+
+#ifdef MODULE_NAME_IS_xvideo
+/*****************************************************************************
+ * XVideoGetPort: get YUV12 port
+ *****************************************************************************/
+static int XVideoGetPort( Display *dpy, int i_id )
+{
+    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 ) )
+    {
+        case Success:
+            break;
+
+        case XvBadExtension:
+            intf_WarnMsg( 3, "vout error: XvBadExtension" );
+            return( -1 );
+
+        case XvBadAlloc:
+            intf_WarnMsg( 3, "vout error: XvBadAlloc" );
+            return( -1 );
+
+        default:
+            intf_WarnMsg( 3, "vout error: XvQueryExtension failed" );
+            return( -1 );
+    }
+
+    switch( XvQueryAdaptors( dpy, DefaultRootWindow( dpy ),
+                             &i_num_adaptors, &p_adaptor ) )
+    {
+        case Success:
+            break;
+
+        case XvBadExtension:
+            intf_WarnMsg( 3, "vout error: XvBadExtension for XvQueryAdaptors" );
+            return( -1 );
+
+        case XvBadAlloc:
+            intf_WarnMsg( 3, "vout error: XvBadAlloc for XvQueryAdaptors" );
+            return( -1 );
+
+        default:
+            intf_WarnMsg( 3, "vout error: XvQueryAdaptors failed" );
+            return( -1 );
+    }
+
+    i_selected_port = -1;
+    i_requested_adaptor = main_GetIntVariable( VOUT_XVADAPTOR_VAR, -1 );
+
+    /* No special xv port has been requested so try all of them */
+    for( i_adaptor = 0; i_adaptor < i_num_adaptors; ++i_adaptor )
+    {
+        XvImageFormatValues *p_formats;
+        int i_format, i_num_formats;
+        int i_port;
+
+        /* If we requested an adaptor and it's not this one, we aren't
+         * interested */
+        if( i_requested_adaptor != -1 && i_adaptor != i_requested_adaptor )
+       {
+            continue;
+       }
+
+       /* If the adaptor doesn't have the required properties, skip it */
+        if( !( p_adaptor[ i_adaptor ].type & XvInputMask ) ||
+            !( p_adaptor[ i_adaptor ].type & XvImageMask ) )
+        {
+            continue;
+       }
+
+        /* Check that port supports YUV12 planar format... */
+        p_formats = XvListImageFormats( dpy, p_adaptor[i_adaptor].base_id,
+                                        &i_num_formats );
+
+        for( i_format = 0; i_format < i_num_formats; i_format++ )
+        {
+            XvEncodingInfo  *p_enc;
+            int             i_enc, i_num_encodings;
+            XvAttribute     *p_attr;
+            int             i_attr, i_num_attributes;
+
+            /* If this is not the format we want, forget it */
+            if( p_formats[ i_format ].id != i_id )
+            {
+                continue;
+            }
+
+            /* Look for the first available port supporting this format */
+            for( i_port = p_adaptor[i_adaptor].base_id;
+                 ( i_port < p_adaptor[i_adaptor].base_id
+                             + p_adaptor[i_adaptor].num_ports )
+                   && ( i_selected_port == -1 );
+                 i_port++ )
+            {
+                if( XvGrabPort( dpy, i_port, CurrentTime ) == Success )
+                {
+                    i_selected_port = i_port;
+                }
+            }
+
+            /* If no free port was found, forget it */
+            if( i_selected_port == -1 )
+            {
+                continue;
+            }
+
+            /* 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" );
+
+            intf_WarnMsg( 10, " encoding list:" );
+
+            if( XvQueryEncodings( dpy, i_selected_port,
+                                  &i_num_encodings, &p_enc )
+                 != Success )
+            {
+                intf_WarnMsg( 10, "  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 );
+            }
+
+            if( p_enc != NULL )
+            {
+                XvFreeEncodingInfo( p_enc );
+            }
+
+            intf_WarnMsg( 10, " attribute list:" );
+            p_attr = XvQueryPortAttributes( dpy, 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",
+                      p_attr[i_attr].name,
+                      (p_attr[i_attr].flags & XvGettable) ? " get" : "",
+                      (p_attr[i_attr].flags & XvSettable) ? " set" : "",
+                      p_attr[i_attr].min_value, p_attr[i_attr].max_value );
+            }
+
+            if( p_attr != NULL )
+            {
+                XFree( p_attr );
+            }
+        }
+
+        if( p_formats != NULL )
+        {
+            XFree( p_formats );
+        }
+
+    }
+
+    if( i_num_adaptors > 0 )
+    {
+        XvFreeAdaptorInfo( p_adaptor );
+    }
+
+    if( i_selected_port == -1 )
+    {
+        if( i_requested_adaptor == -1 )
+        {
+            intf_WarnMsg( 3, "vout: no free XVideo port found for YV12" );
+        }
+        else
+        {
+            intf_WarnMsg( 3, "vout: XVideo adaptor %i does not have a free "
+                             "XVideo port for YV12", i_requested_adaptor );
+        }
+    }
+
+    return( i_selected_port );
+}
+
+/*****************************************************************************
+ * XVideoReleasePort: release YUV12 port
+ *****************************************************************************/
+static void XVideoReleasePort( Display *dpy, int i_port )
+{
+    XvGrabPort( dpy, i_port, CurrentTime );
+}
+#endif
+
+/*****************************************************************************
+ * InitDisplay: open and initialize X11 device
+ *****************************************************************************
+ * Create a window according to video output given size, and set other
+ * properties according to the display properties.
+ *****************************************************************************/
+static int InitDisplay( vout_thread_t *p_vout )
+{
+#ifdef MODULE_NAME_IS_x11
+    XPixmapFormatValues *       p_formats;                 /* pixmap formats */
+    XVisualInfo *               p_xvisual;           /* visuals informations */
+    XVisualInfo                 xvisual_template;         /* visual template */
+    int                         i_count;                       /* array size */
+#endif
+
+#ifdef SYS_DARWIN
+    /* FIXME : As of 2001-03-16, XFree4 for MacOS X does not support Xshm. */
+    p_vout->p_sys->b_shm = 0;
+#else
+    p_vout->p_sys->b_shm = ( XShmQueryExtension( p_vout->p_sys->p_display )
+                              == True );
+#endif
+    if( !p_vout->p_sys->b_shm )
+    {
+        intf_WarnMsg( 1, "vout warning: XShm video extension is unavailable" );
+    }
+
+#ifdef MODULE_NAME_IS_xvideo
+    /* XXX The brightness and contrast values should be read from environment
+     * XXX variables... */
+#if 0
+    XVideoSetAttribute( p_vout, "XV_BRIGHTNESS", 0.5 );
+    XVideoSetAttribute( p_vout, "XV_CONTRAST",   0.5 );
+#endif
+#endif
+
+#ifdef MODULE_NAME_IS_x11
+    /* Initialize structure */
+    p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
+
+    /* Get screen depth */
+    p_vout->p_sys->i_screen_depth = XDefaultDepth( p_vout->p_sys->p_display,
+                                                   p_vout->p_sys->i_screen );
+    switch( p_vout->p_sys->i_screen_depth )
+    {
+    case 8:
+        /*
+         * Screen depth is 8bpp. Use PseudoColor visual with private colormap.
+         */
+        xvisual_template.screen =   p_vout->p_sys->i_screen;
+        xvisual_template.class =    DirectColor;
+        p_xvisual = XGetVisualInfo( p_vout->p_sys->p_display,
+                                    VisualScreenMask | VisualClassMask,
+                                    &xvisual_template, &i_count );
+        if( p_xvisual == NULL )
+        {
+            intf_ErrMsg( "vout error: no PseudoColor visual available" );
+            return( 1 );
+        }
+        p_vout->p_sys->i_bytes_per_pixel = 1;
+        break;
+    case 15:
+    case 16:
+    case 24:
+    default:
+        /*
+         * Screen depth is higher than 8bpp. TrueColor visual is used.
+         */
+        xvisual_template.screen =   p_vout->p_sys->i_screen;
+        xvisual_template.class =    TrueColor;
+        p_xvisual = XGetVisualInfo( p_vout->p_sys->p_display,
+                                    VisualScreenMask | VisualClassMask,
+                                    &xvisual_template, &i_count );
+        if( p_xvisual == NULL )
+        {
+            intf_ErrMsg( "vout error: no TrueColor visual available" );
+            return( 1 );
+        }
+        p_vout->p_sys->i_red_mask =        p_xvisual->red_mask;
+        p_vout->p_sys->i_green_mask =      p_xvisual->green_mask;
+        p_vout->p_sys->i_blue_mask =       p_xvisual->blue_mask;
+
+        /* There is no difference yet between 3 and 4 Bpp. The only way
+         * to find the actual number of bytes per pixel is to list supported
+         * pixmap formats. */
+        p_formats = XListPixmapFormats( p_vout->p_sys->p_display, &i_count );
+        p_vout->p_sys->i_bytes_per_pixel = 0;
+
+        for( ; i_count-- ; p_formats++ )
+        {
+            /* Under XFree4.0, the list contains pixmap formats available
+             * through all video depths ; so we have to check against current
+             * depth. */
+            if( p_formats->depth == p_vout->p_sys->i_screen_depth )
+            {
+                if( p_formats->bits_per_pixel / 8
+                        > p_vout->p_sys->i_bytes_per_pixel )
+                {
+                    p_vout->p_sys->i_bytes_per_pixel = p_formats->bits_per_pixel / 8;
+                }
+            }
+        }
+        break;
+    }
+    p_vout->p_sys->p_visual = p_xvisual->visual;
+    XFree( p_xvisual );
+#endif
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * CreateShmImage: create an XImage or XvImage using shared memory extension
+ *****************************************************************************
+ * Prepare an XImage or XvImage for display function.
+ * The order of the operations respects the recommandations of the mit-shm
+ * document by J.Corbet and K.Packard. Most of the parameters were copied from
+ * there.
+ *****************************************************************************/
+static IMAGE_TYPE * CreateShmImage( Display* p_display, EXTRA_ARGS_SHM,
+                                    int i_width, int i_height )
+{
+    IMAGE_TYPE *p_image;
+
+    /* Create XImage / XvImage */
+#ifdef MODULE_NAME_IS_xvideo
+    p_image = XvShmCreateImage( p_display, i_xvport, i_format, 0,
+                                i_width, i_height, p_shm );
+#else
+    p_image = XShmCreateImage( p_display, p_visual, i_depth, ZPixmap, 0,
+                               p_shm, i_width, i_height );
+#endif
+    if( p_image == NULL )
+    {
+        intf_ErrMsg( "vout error: image creation failed." );
+        return( NULL );
+    }
+
+    /* Allocate shared memory segment - 0776 set the access permission
+     * rights (like umask), they are not yet supported by all X servers */
+    p_shm->shmid = shmget( IPC_PRIVATE, DATA_SIZE, IPC_CREAT | 0776 );
+    if( p_shm->shmid < 0 )
+    {
+        intf_ErrMsg( "vout error: cannot allocate shared image data (%s)",
+                     strerror( errno ) );
+        IMAGE_FREE( p_image );
+        return( NULL );
+    }
+
+    /* Attach shared memory segment to process (read/write) */
+    p_shm->shmaddr = p_image->data = shmat( p_shm->shmid, 0, 0 );
+    if(! p_shm->shmaddr )
+    {                                                               /* error */
+        intf_ErrMsg( "vout error: cannot attach shared memory (%s)",
+                    strerror(errno));
+        shmctl( p_shm->shmid, IPC_RMID, 0 );      /* free shared memory */
+        IMAGE_FREE( p_image );
+        return( NULL );
+    }
+
+    /* Attach shared memory segment to X server */
+#ifdef MODULE_NAME_IS_xvideo
+    p_shm->readOnly = False; /* XXX: What's this ? */
+#else
+    p_shm->readOnly = True;
+#endif
+    if( XShmAttach( p_display, p_shm ) == False )
+    {
+        intf_ErrMsg( "vout error: cannot attach shared memory to X server" );
+        shmctl( p_shm->shmid, IPC_RMID, 0 );
+        shmdt( p_shm->shmaddr );
+        IMAGE_FREE( p_image );
+        return( NULL );
+    }
+
+    /* Send image to X server. This instruction is required, since having
+     * built a Shm XImage and not using it causes an error on XCloseDisplay */
+    XSync( p_display, False );
+
+#if 0
+    /* Mark the shm segment to be removed when there are no more
+     * attachements, so it is automatic on process exit or after shmdt */
+    shmctl( p_shm->shmid, IPC_RMID, 0 );
+#endif
+
+    return( p_image );
+}
+
+/*****************************************************************************
+ * CreateImage: create an XImage or XvImage
+ *****************************************************************************
+ * Create a simple image used as a buffer.
+ *****************************************************************************/
+static IMAGE_TYPE * CreateImage( Display *p_display, EXTRA_ARGS,
+                                 int i_width, int i_height )
+{
+    byte_t *    p_data;                           /* image data storage zone */
+    IMAGE_TYPE *p_image;
+#ifdef MODULE_NAME_IS_x11
+    int         i_quantum;                     /* XImage quantum (see below) */
+    int         i_bytes_per_line;
+#endif
+
+    /* Allocate memory for image */
+#ifdef MODULE_NAME_IS_xvideo
+    p_data = (byte_t *) malloc( i_width * i_height * 2 ); /* XXX */
+#else
+    i_bytes_per_line = i_width * i_bytes_per_pixel;
+    p_data = (byte_t *) malloc( i_bytes_per_line * i_height );
+#endif
+    if( !p_data )
+    {
+        intf_ErrMsg( "vout error: %s", strerror(ENOMEM));
+        return( NULL );
+    }
+
+#ifdef MODULE_NAME_IS_x11
+    /* Optimize the quantum of a scanline regarding its size - the quantum is
+       a diviser of the number of bits between the start of two scanlines. */
+    if( i_bytes_per_line & 0xf )
+    {
+        i_quantum = 0x8;
+    }
+    else if( i_bytes_per_line & 0x10 )
+    {
+        i_quantum = 0x10;
+    }
+    else
+    {
+        i_quantum = 0x20;
+    }
+#endif
+
+    /* Create XImage. p_data will be automatically freed */
+#ifdef MODULE_NAME_IS_xvideo
+    p_image = XvCreateImage( p_display, i_xvport, i_format,
+                             p_data, i_width, i_height );
+#else
+    p_image = XCreateImage( p_display, p_visual, i_depth, ZPixmap, 0,
+                            p_data, i_width, i_height, i_quantum, 0 );
+#endif
+    if( p_image == NULL )
+    {
+        intf_ErrMsg( "vout error: XCreateImage() failed" );
+        free( p_data );
+        return( NULL );
+    }
+
+    return p_image;
+}
+
similarity index 60%
rename from include/tests.h
rename to plugins/x11/xcommon.h
index de18afa9baedd3ac54d57bfb7212a8c797880c3c..02d64792c713bafa09ebf4376ff1f6117ab0b463 100644 (file)
@@ -1,16 +1,19 @@
 /*****************************************************************************
- * tests.h: several test functions needed by the plugins
+ * xcommon.h: Common X11 and Xvideo video output display method
  *****************************************************************************
- * Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN
- * $Id: tests.h,v 1.12 2001/12/04 13:47:46 massiot Exp $
+ * Copyright (C) 1998-2001 VideoLAN
+ * $Id: xcommon.h,v 1.1 2001/12/30 07:09:56 sam Exp $
  *
- * Authors: Samuel Hocevar <sam@zoy.org>
+ * Authors: Shane Harper <shanegh@optusnet.com.au>
+ *          Vincent Seguin <seguin@via.ecp.fr>
+ *          Samuel Hocevar <sam@zoy.org>
+ *          David Kennedy <dkennedy@tinytoad.com>
  *
  * 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
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define CPU_CAPABILITY_NONE    0
-#define CPU_CAPABILITY_486     1<<0
-#define CPU_CAPABILITY_586     1<<1
-#define CPU_CAPABILITY_PPRO    1<<2
-#define CPU_CAPABILITY_MMX     1<<3
-#define CPU_CAPABILITY_3DNOW   1<<4
-#define CPU_CAPABILITY_MMXEXT  1<<5
-#define CPU_CAPABILITY_SSE     1<<6
-#define CPU_CAPABILITY_ALTIVEC 1<<16
-#define CPU_CAPABILITY_FPU     1<<31
-
 /*****************************************************************************
- * TestVersion: tests if the given string equals the current version
+ * Common prototypes
  *****************************************************************************/
-int TestProgram  ( char * );
-int TestMethod   ( char *, char * );
-int TestCPU      ( int );
+void _M( vout_getfunctions )( function_list_t * p_function_list );
 
index 33ce5b69672e0d4e926aecb4e32d1f64bb23f514..40b07f821f916a0783c3a6366dac8589b6dcca2c 100644 (file)
@@ -1,10 +1,13 @@
 /*****************************************************************************
  * xvideo.c : Xvideo plugin for vlc
  *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
- * $Id: xvideo.c,v 1.5 2001/12/09 17:01:37 sam Exp $
+ * Copyright (C) 1998-2001 VideoLAN
+ * $Id: xvideo.c,v 1.6 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Shane Harper <shanegh@optusnet.com.au>
+ *          Vincent Seguin <seguin@via.ecp.fr>
+ *          Samuel Hocevar <sam@zoy.org>
+ *          David Kennedy <dkennedy@tinytoad.com>
  *      
  * 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
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME xvideo
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
-
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <string.h>                                            /* strerror() */
 
-#include "video.h"
-#include "video_output.h"
+#include <videolan/vlc.h>
 
-#include "modules.h"
-#include "modules_export.h"
-
-/*****************************************************************************
- * Capabilities defined in the other files.
- *****************************************************************************/
-void _M( vout_getfunctions )( function_list_t * p_function_list );
+#include "xcommon.h"
 
 /*****************************************************************************
  * Building configuration tree
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for xvideo module" )
-    ADD_COMMENT( "For now, the xvideo module cannot be configured" )
+    ADD_WINDOW( "Configuration for xvideo module" )
+        ADD_COMMENT( "For now, the xvideo module cannot be configured" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "XVideo extension module";
+    SET_DESCRIPTION( "XVideo extension module" )
+    ADD_CAPABILITY( VOUT, 150 )
+    ADD_SHORTCUT( "xvideo" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -69,3 +55,44 @@ MODULE_ACTIVATE_STOP
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
+/* following functions are local */
+
+#if 0
+/*****************************************************************************
+ * XVideoSetAttribute
+ *****************************************************************************
+ * This function can be used to set attributes, e.g. XV_BRIGHTNESS and
+ * XV_CONTRAST. "f_value" should be in the range of 0 to 1.
+ *****************************************************************************/
+static void XVideoSetAttribute( vout_thread_t *p_vout,
+                                char *attr_name, float f_value )
+{
+    int             i_attrib;
+    XvAttribute    *p_attrib;
+    Display        *p_display = p_vout->p_sys->p_display;
+    int             i_xvport  = p_vout->p_sys->i_xvport;
+
+    p_attrib = XvQueryPortAttributes( p_display, i_xvport, &i_attrib );
+
+    do
+    {
+        i_attrib--;
+
+        if( i_attrib >= 0 && !strcmp( p_attrib[ i_attrib ].name, attr_name ) )
+        {
+            int i_sv = f_value * ( p_attrib[ i_attrib ].max_value
+                                    - p_attrib[ i_attrib ].min_value + 1 )
+                        + p_attrib[ i_attrib ].min_value;
+
+            XvSetPortAttribute( p_display, i_xvport,
+                            XInternAtom( p_display, attr_name, False ), i_sv );
+            break;
+        }
+
+    } while( i_attrib > 0 );
+
+    if( p_attrib )
+        XFree( p_attrib );
+}
+#endif
+
index 4a224d40d5717fcd98038efb09df7a82478223b1..a1aa41df1e22508de47310111da524f795f1e519 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -18,7 +18,7 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:152
 #: plugins/gtk/gtk_interface.c:1096
 msgid "_Open File..."
-msgstr "_Ouvrir Fichier"
+msgstr "_Ouvrir fichier..."
 
 #: plugins/gtk/gnome_interface.c:24
 #: plugins/gtk/gnome_interface.c:339
@@ -34,7 +34,7 @@ msgstr "Ouvre un Fichier"
 #: plugins/gtk/gtk_interface.c:167
 #: plugins/gtk/gtk_interface.c:1108
 msgid "Open _Disc..."
-msgstr "Ouvrir _Disque"
+msgstr "Ouvrir _disque..."
 
 #: plugins/gtk/gnome_interface.c:31
 #: plugins/gtk/gnome_interface.c:351
@@ -50,7 +50,7 @@ msgstr "Ouvre un DVD ou un VCD"
 #: plugins/gtk/gtk_interface.c:182
 #: plugins/gtk/gtk_interface.c:1120
 msgid "_Network Stream..."
-msgstr ""
+msgstr "Flux réseau..."
 
 #: plugins/gtk/gnome_interface.c:38
 #: plugins/gtk/gnome_interface.c:363
@@ -59,96 +59,96 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:475
 #: plugins/gtk/gtk_interface.c:1128
 msgid "Select a Network Stream"
-msgstr ""
+msgstr "Sélectionne un flux réseau"
 
 #: plugins/gtk/gnome_interface.c:51
 #: plugins/gtk/gtk_interface.c:238
 msgid "_Hide interface"
-msgstr ""
+msgstr "Cac_he l'interface"
 
 #: plugins/gtk/gnome_interface.c:58
 #: plugins/gtk/gnome_interface.c:825
 #: plugins/gtk/gtk_interface.c:250
 #: plugins/gtk/gtk_interface.c:986
 msgid "_Fullscreen"
-msgstr ""
+msgstr "Plein Ã©cran"
 
 #: plugins/gtk/gnome_interface.c:66
 #: plugins/gtk/gtk_interface.c:269
 msgid "_Title"
-msgstr ""
+msgstr "_Titre"
 
 #: plugins/gtk/gnome_interface.c:67
 msgid "Choose title"
-msgstr ""
+msgstr "Choisir le titre"
 
 #: plugins/gtk/gnome_interface.c:73
 #: plugins/gtk/gtk_interface.c:282
 msgid "_Chapter"
-msgstr ""
+msgstr "Chapitre"
 
 #: plugins/gtk/gnome_interface.c:74
 msgid "Choose chapter"
-msgstr ""
+msgstr "Choisir le chapitre"
 
 #: plugins/gtk/gnome_interface.c:80
 #: plugins/gtk/gnome_interface.c:861
 #: plugins/gtk/gtk_interface.c:294
 #: plugins/gtk/gtk_interface.c:1042
 msgid "An_gle"
-msgstr ""
+msgstr "An_gle"
 
 #: plugins/gtk/gnome_interface.c:81
 msgid "Choose angle"
-msgstr ""
+msgstr "Choisir l'angle"
 
 #: plugins/gtk/gnome_interface.c:88
 #: plugins/gtk/gtk_interface.c:314
 msgid "_Playlist..."
-msgstr ""
+msgstr "_Playlist..."
 
 #: plugins/gtk/gnome_interface.c:89
 #: plugins/gtk/gtk_interface.c:322
 msgid "Open the playlist window"
-msgstr ""
+msgstr "Ouvre la fenêtre playlist"
 
 #: plugins/gtk/gnome_interface.c:95
 #: plugins/gtk/gtk_interface.c:326
 msgid "_Modules..."
-msgstr ""
+msgstr "_Modules..."
 
 #: plugins/gtk/gnome_interface.c:96
 #: plugins/gtk/gtk_interface.c:335
 msgid "Open the plugin manager"
-msgstr ""
+msgstr "Ouvre le gestionnaire de modules"
 
 #: plugins/gtk/gnome_interface.c:107
 #: plugins/gtk/gnome_interface.c:868
 #: plugins/gtk/gtk_interface.c:1054
 msgid "_Audio"
-msgstr ""
+msgstr "_Audio"
 
 #: plugins/gtk/gnome_interface.c:108
 #: plugins/gtk/gnome_interface.c:869
 msgid "Select audio channel"
-msgstr ""
+msgstr "Sélectionne la piste audio"
 
 #: plugins/gtk/gnome_interface.c:114
 #: plugins/gtk/gnome_interface.c:875
 #: plugins/gtk/gtk_interface.c:370
 #: plugins/gtk/gtk_interface.c:1066
 msgid "_Subtitles"
-msgstr ""
+msgstr "_Sous-titres"
 
 #: plugins/gtk/gnome_interface.c:115
 msgid "Select subtitle unit"
-msgstr ""
+msgstr "Sélectionne la piste de sous-titres"
 
 #: plugins/gtk/gnome_interface.c:189
 #: plugins/gtk/gtk_interface.c:108
 #: plugins/gtk/gtk_interface.c:1278
 msgid "VideoLAN Client"
-msgstr ""
+msgstr "Client VideoLAN"
 
 #: plugins/gtk/gnome_interface.c:338
 #: plugins/gtk/gnome_interface.c:1658
@@ -158,7 +158,7 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:2177
 #: plugins/gtk/gtk_interface.c:2437
 msgid "File"
-msgstr ""
+msgstr "Fichier"
 
 #: plugins/gtk/gnome_interface.c:350
 #: plugins/gtk/gnome_interface.c:529
@@ -169,83 +169,83 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:2053
 #: plugins/gtk/gtk_interface.c:2530
 msgid "Disc"
-msgstr ""
+msgstr "Disque"
 
 #: plugins/gtk/gnome_interface.c:362
 #: plugins/gtk/gtk_interface.c:474
 msgid "Net"
-msgstr ""
+msgstr "Réseau"
 
 #: plugins/gtk/gnome_interface.c:376
 #: plugins/gtk/gnome_interface.c:796
 #: plugins/gtk/gtk_interface.c:487
 #: plugins/gtk/gtk_interface.c:941
 msgid "Back"
-msgstr ""
+msgstr "Retour"
 
 #: plugins/gtk/gnome_interface.c:377
 #: plugins/gtk/gtk_interface.c:488
 msgid "Go Backwards"
-msgstr ""
+msgstr "Retour arrière"
 
 #: plugins/gtk/gnome_interface.c:389
 #: plugins/gtk/gnome_interface.c:789
 #: plugins/gtk/gtk_interface.c:499
 #: plugins/gtk/gtk_interface.c:934
 msgid "Stop"
-msgstr ""
+msgstr "Stop"
 
 #: plugins/gtk/gnome_interface.c:390
 #: plugins/gtk/gtk_interface.c:500
 msgid "Stop Stream"
-msgstr ""
+msgstr "Arrêter le flux"
 
 #: plugins/gtk/gnome_interface.c:401
 #: plugins/gtk/gnome_interface.c:775
 #: plugins/gtk/gtk_interface.c:510
 msgid "Play"
-msgstr ""
+msgstr "Joue"
 
 #: plugins/gtk/gnome_interface.c:402
 #: plugins/gtk/gtk_interface.c:511
 msgid "Play Stream"
-msgstr ""
+msgstr "Jouer le flux"
 
 #: plugins/gtk/gnome_interface.c:413
 #: plugins/gtk/gnome_interface.c:782
 #: plugins/gtk/gtk_interface.c:521
 #: plugins/gtk/gtk_interface.c:926
 msgid "Pause"
-msgstr ""
+msgstr "Pause"
 
 #: plugins/gtk/gnome_interface.c:414
 #: plugins/gtk/gtk_interface.c:522
 msgid "Pause Stream"
-msgstr ""
+msgstr "Pauser le flux"
 
 #: plugins/gtk/gnome_interface.c:426
 #: plugins/gtk/gnome_interface.c:803
 #: plugins/gtk/gtk_interface.c:533
 #: plugins/gtk/gtk_interface.c:949
 msgid "Slow"
-msgstr ""
+msgstr "Ralenti"
 
 #: plugins/gtk/gnome_interface.c:427
 #: plugins/gtk/gtk_interface.c:534
 msgid "Play Slower"
-msgstr ""
+msgstr "Jouer plus lentement"
 
 #: plugins/gtk/gnome_interface.c:439
 #: plugins/gtk/gnome_interface.c:810
 #: plugins/gtk/gtk_interface.c:545
 #: plugins/gtk/gtk_interface.c:957
 msgid "Fast"
-msgstr ""
+msgstr "Accéléré"
 
 #: plugins/gtk/gnome_interface.c:440
 #: plugins/gtk/gtk_interface.c:546
 msgid "Play Faster"
-msgstr ""
+msgstr "Jouer plus rapidement"
 
 #: plugins/gtk/gnome_interface.c:454
 #: plugins/gtk/gnome_interface.c:1768
@@ -255,12 +255,12 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:2024
 #: plugins/gtk/gtk_interface.c:3114
 msgid "Playlist"
-msgstr ""
+msgstr "Playlist"
 
 #: plugins/gtk/gnome_interface.c:455
 #: plugins/gtk/gtk_interface.c:560
 msgid "Open Playlist"
-msgstr ""
+msgstr "Ouvre la playlist"
 
 #: plugins/gtk/gnome_interface.c:466
 #: plugins/gtk/gnome_interface.c:840
@@ -269,12 +269,12 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:700
 #: plugins/gtk/gtk_interface.c:1010
 msgid "Prev"
-msgstr ""
+msgstr "Précédent"
 
 #: plugins/gtk/gnome_interface.c:467
 #: plugins/gtk/gtk_interface.c:571
 msgid "Previous File"
-msgstr ""
+msgstr "Fichier précédent"
 
 #: plugins/gtk/gnome_interface.c:478
 #: plugins/gtk/gnome_interface.c:833
@@ -283,12 +283,12 @@ msgstr ""
 #: plugins/gtk/gtk_interface.c:708
 #: plugins/gtk/gtk_interface.c:1003
 msgid "Next"
-msgstr ""
+msgstr "Suivant"
 
 #: plugins/gtk/gnome_interface.c:479
 #: plugins/gtk/gtk_interface.c:582
 msgid "Next File"
-msgstr ""
+msgstr "Fichier suivant"
 
 #: plugins/gtk/gnome_interface.c:493
 #: plugins/gtk/gtk_interface.c:589
@@ -297,7 +297,7 @@ msgstr ""
 
 #: plugins/gtk/gnome_interface.c:543
 msgid "Title:"
-msgstr ""
+msgstr "Titre:"
 
 #: plugins/gtk/gnome_interface.c:550
 #: plugins/gtk/gtk_interface.c:649
@@ -306,11 +306,11 @@ msgstr ""
 
 #: plugins/gtk/gnome_interface.c:563
 msgid "Select previous title"
-msgstr ""
+msgstr "Sélectionner le titre précédent"
 
 #: plugins/gtk/gnome_interface.c:588
 msgid "Chapter:"
-msgstr ""
+msgstr "Chapitre:"
 
 #: plugins/gtk/gnome_interface.c:595
 #: plugins/gtk/gtk_interface.c:693
@@ -319,19 +319,19 @@ msgstr ""
 
 #: plugins/gtk/gnome_interface.c:608
 msgid "Select previous chapter"
-msgstr ""
+msgstr "Sélectionner le chapitre précédent"
 
 #: plugins/gtk/gnome_interface.c:617
 msgid "Select next chapter"
-msgstr ""
+msgstr "Sélectionner le chapitre suivant"
 
 #: plugins/gtk/gnome_interface.c:626
 msgid "No server"
-msgstr ""
+msgstr "Pas de serveur"
 
 #: plugins/gtk/gnome_interface.c:640
 msgid "Network Channel:"
-msgstr ""
+msgstr "Canal réseau:"
 
 #: plugins/gtk/gnome_interface.c:655
 #: plugins/gtk/gtk_interface.c:752
@@ -341,60 +341,60 @@ msgstr ""
 #: plugins/gtk/gnome_interface.c:818
 #: plugins/gtk/gtk_interface.c:975
 msgid "Toggle _Interface"
-msgstr ""
+msgstr "Cacher/montrer l'_interface"
 
 #: plugins/gtk/gnome_interface.c:826
 msgid "Toggle fullscreen mode"
-msgstr ""
+msgstr "Mode fenêtré/plein Ã©cran"
 
 #: plugins/gtk/gnome_interface.c:847
 #: plugins/gtk/gtk_interface.c:1019
 msgid "_Jump..."
-msgstr ""
+msgstr "Sauter Ã ..."
 
 #: plugins/gtk/gnome_interface.c:848
 msgid "Got directly so specified point"
-msgstr ""
+msgstr "Aller directement Ã  un endroit spécifié"
 
 #: plugins/gtk/gnome_interface.c:854
 #: plugins/gtk/gtk_interface.c:1030
 msgid "_Navigation"
-msgstr ""
+msgstr "_Navigation"
 
 #: plugins/gtk/gnome_interface.c:855
 msgid "Navigate through titles and chapters"
-msgstr ""
+msgstr "Naviguer Ã  travers les titres et les chapitres"
 
 #: plugins/gtk/gnome_interface.c:876
 msgid "Select subtitle channel"
-msgstr ""
+msgstr "Sélectionner la piste de sous-titres"
 
 #: plugins/gtk/gnome_interface.c:884
 #: plugins/gtk/gtk_interface.c:1149
 msgid "Playlist..."
-msgstr ""
+msgstr "Playlist..."
 
 #: plugins/gtk/gnome_interface.c:1081
 #: plugins/gtk/gtk_interface.c:1286
 msgid "(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team"
-msgstr ""
+msgstr "(C) 1996, 1997, 1998, 1999, 2000, 2001 - l'équipe VideoLAN"
 
 #: plugins/gtk/gnome_interface.c:1083
 #: plugins/gtk/gtk_interface.c:1312
 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."
-msgstr ""
+msgstr "Ceci est le client VideoLAN, un lecteur de DVD et de MPEG. Il peut jouer des fichiers MPEG et MPEG2 Ã  partir d'un fichier ou d'une source réseau."
 
 #: plugins/gtk/gnome_interface.c:1097
 msgid "Open File"
-msgstr ""
+msgstr "Ouvrir un fichier"
 
 #: plugins/gtk/gnome_interface.c:1134
 msgid "Modules"
-msgstr ""
+msgstr "Modules"
 
 #: plugins/gtk/gnome_interface.c:1142
 msgid "Sorry, the module manager isn't functional yet. Please retry in a later version."
-msgstr ""
+msgstr "Désolé, le gestionnaire de modules ne fonctionne pas encore. Veuillez réessayer dans une prochaine version"
 
 #: plugins/gtk/gnome_interface.c:1208
 #: plugins/gtk/gtk_interface.c:1405
index 6da735ce97fc35f584d7a1ca65a67fbdac8fe3a5..4580c3ac25d22edb07600a6134b2ff023ed6f99b 100644 (file)
 /* XPM */
 static char * gnome_vlc_xpm[] = {
-"48 48 540 2",
+"32 32 335 2",
 "      c None",
-".     c #000000",
-"+     c #C76D00",
-"@     c #DD831A",
-"#     c #D78626",
-"$     c #B16E1F",
-"%     c #C66C00",
-"&     c #CC7F24",
-"*     c #B07633",
-"=     c #B68857",
-"-     c #D88F3B",
-";     c #E39C4C",
-">     c #DE9F58",
-",     c #E3A969",
-"'     c #F4B675",
-")     c #CD9962",
-"!     c #DD9038",
-"~     c #FFAE51",
-"{     c #FFB562",
-"]     c #FFBC72",
-"^     c #FFBF7B",
-"/     c #DDA56A",
-"(     c #E39235",
-"_     c #FFAC4D",
-":     c #FFB35D",
-"<     c #FFBA6D",
-"[     c #E3AA6D",
-"}     c #CD7D1F",
-"|     c #F99F36",
-"1     c #FFAA48",
-"2     c #FFB158",
-"3     c #FFB869",
-"4     c #FFBF79",
-"5     c #F9BA78",
-"6     c #040404",
-"7     c #D78C33",
-"8     c #F9A849",
-"9     c #FDA947",
-"0     c #FFAF54",
-"a     c #FFB664",
-"b     c #FFBD74",
-"c     c #FFC07E",
-"d     c #DDAB76",
-"e     c #050505",
-"f     c #181818",
-"g     c #C3A887",
-"h     c #E1C6A6",
-"i     c #F3B369",
-"j     c #FAB667",
-"k     c #FCBE77",
-"l     c #FFC688",
-"m     c #FFD09F",
-"n     c #E3CBB4",
-"o     c #393939",
-"p     c #343434",
-"q     c #C2B5A5",
-"r     c #D7D3CF",
-"s     c #DBCEBF",
-"t     c #E7D9C9",
-"u     c #F3E6D7",
-"v     c #FFF3E6",
-"w     c #FFF5EC",
-"x     c #F9F4F0",
-"y     c #CDBDAE",
-"z     c #232323",
-"A     c #1D1D1D",
-"B     c #B49B7B",
-"C     c #D1CECA",
-"D     c #D6D6D6",
-"E     c #D6D5D5",
-"F     c #E3E2E2",
-"G     c #F1F0F0",
-"H     c #FFFEFE",
-"I     c #DDD2C9",
-"J     c #212121",
-"K     c #1B1B1B",
-"L     c #BFAE99",
-"M     c #D6D5D4",
-"N     c #E3E3E3",
-"O     c #F1F1F1",
-"P     c #FFFFFF",
-"Q     c #E3DAD1",
-"R     c #3E3E3E",
-"S     c #E9E8E7",
-"T     c #BAB0A9",
-"U     c #5A5047",
-"V     c #C3A57F",
-"W     c #DBCBB8",
-"X     c #D7D4D0",
-"Y     c #FFFCFA",
-"Z     c #F9EDE2",
-"`     c #CCB69F",
-" .    c #40403F",
-"..    c #E0DEDD",
-"+.    c #EEECEB",
-"@.    c #ADA59E",
-"#.    c #4B423B",
-"$.    c #1D1A17",
-"%.    c #070707",
-"&.    c #DD851A",
-"*.    c #F3A240",
-"=.    c #E1C3A0",
-"-.    c #DDCBB7",
-";.    c #E7D8C6",
-">.    c #F3E5D4",
-",.    c #FFF1E2",
-"'.    c #FFF2E5",
-").    c #FFECD9",
-"!.    c #D8AC80",
-"~.    c #BFBDBC",
-"{.    c #B5ADA7",
-"].    c #6B5E54",
-"^.    c #ACA9A8",
-"/.    c #DEDBDA",
-"(.    c #DCD9D6",
-"_.    c #9E948D",
-":.    c #49413A",
-"<.    c #0E0C0B",
-"[.    c #CD7000",
-"}.    c #F98800",
-"|.    c #FD8E07",
-"1.    c #F99C2C",
-"2.    c #F8A340",
-"3.    c #FAAC50",
-"4.    c #FCB460",
-"5.    c #FFBC70",
-"6.    c #FFC27D",
-"7.    c #FFC687",
-"8.    c #FEBF7D",
-"9.    c #C7AC8D",
-"0.    c #E4E2E0",
-"a.    c #BCB2AB",
-"b.    c #5D5249",
-"c.    c #484039",
-"d.    c #9F9E9C",
-"e.    c #DBD7D4",
-"f.    c #BEB6AE",
-"g.    c #96887D",
-"h.    c #4D443C",
-"i.    c #050504",
-"j.    c #DD7900",
-"k.    c #FF8C00",
-"l.    c #FF910E",
-"m.    c #FF981E",
-"n.    c #FF9F2E",
-"o.    c #FFA63F",
-"p.    c #FFAD4F",
-"q.    c #FFB45F",
-"r.    c #FFBB70",
-"s.    c #FDBD7A",
-"t.    c #BDA287",
-"u.    c #B8B0A9",
-"v.    c #A79C93",
-"w.    c #4F463E",
-"x.    c #322C28",
-"y.    c #6D6863",
-"z.    c #ADA39A",
-"A.    c #998C81",
-"B.    c #7F7166",
-"C.    c #37312B",
-"D.    c #020101",
-"E.    c #FF8F09",
-"F.    c #FF9619",
-"G.    c #FF9D2A",
-"H.    c #FFA43A",
-"I.    c #FFAB4A",
-"J.    c #FFB25B",
-"K.    c #FFB96B",
-"L.    c #FEBE7A",
-"M.    c #C59C70",
-"N.    c #8A7D73",
-"O.    c #635950",
-"P.    c #1C1816",
-"Q.    c #070605",
-"R.    c #171413",
-"S.    c #5B5149",
-"T.    c #5B5048",
-"U.    c #403832",
-"V.    c #0E0D0B",
-"W.    c #E37C00",
-"X.    c #FF8D04",
-"Y.    c #FF9415",
-"Z.    c #FF9B25",
-"`.    c #FFA235",
-" +    c #FFA946",
-".+    c #FEB056",
-"++    c #EFB778",
-"@+    c #EEB679",
-"#+    c #E6AC70",
-"$+    c #62503D",
-"%+    c #171411",
-"&+    c #181613",
-"*+    c #2C2622",
-"=+    c #0B0909",
-"-+    c #C87817",
-";+    c #F3921C",
-">+    c #FD8E05",
-",+    c #FF9210",
-"'+    c #FF9920",
-")+    c #FFA031",
-"!+    c #FFA741",
-"~+    c #F2AB5A",
-"{+    c #EBE6E2",
-"]+    c #BAAFA3",
-"^+    c #B4895D",
-"/+    c #BB8C5C",
-"(+    c #4A3A28",
-"_+    c #010101",
-":+    c #312C29",
-"<+    c #141210",
+".     c #8A4E06",
+"+     c #915917",
+"@     c #583710",
+"#     c #271A0B",
+"$     c #894D06",
+"%     c #8C5616",
+"&     c #281E13",
+"*     c #875A26",
+"=     c #966935",
+"-     c #966E42",
+";     c #C2915D",
+">     c #3B2C1C",
+",     c #956025",
+"'     c #FFB055",
+")     c #FFB96B",
+"!     c #F4B776",
+"~     c #4A3824",
+"{     c #3B2409",
+"]     c #CF832B",
+"^     c #FFAD4F",
+"/     c #FFB665",
+"(     c #FBBC78",
+"_     c #AC8052",
+":     c #4D3921",
+"<     c #E6A860",
+"[     c #FBAE55",
+"}     c #FEB665",
+"|     c #FFC27F",
+"1     c #EABB8A",
+"2     c #161616",
+"3     c #5D5750",
+"4     c #D2C5B5",
+"5     c #E6C8A4",
+"6     c #F3D5B2",
+"7     c #FFE6CB",
+"8     c #F6E7D9",
+"9     c #7E756E",
+"0     c #1C1C1C",
+"a     c #C1B19D",
+"b     c #D5D4D3",
+"c     c #DADADA",
+"d     c #ECECEC",
+"e     c #FFFEFE",
+"f     c #A39C96",
+"g     c #191919",
+"h     c #CAB59B",
+"i     c #D8D3CC",
+"j     c #FFFDFC",
+"k     c #D5C9BD",
+"l     c #68615A",
+"m     c #E9E8E7",
+"n     c #918881",
+"o     c #332D28",
+"p     c #3F2404",
+"q     c #EC8D1B",
+"r     c #EDAD60",
+"s     c #E8C294",
+"t     c #F3D1A8",
+"u     c #FFE0BE",
+"v     c #FFE0BF",
+"w     c #F0C08F",
+"x     c #CEC0B1",
+"y     c #9C928B",
+"z     c #5A5047",
+"A     c #B9B7B5",
+"B     c #D6D1CE",
+"C     c #80766E",
+"D     c #201C19",
+"E     c #904F00",
+"F     c #FD8B01",
+"G     c #FD9211",
+"H     c #FD9E2F",
+"I     c #FEA844",
+"J     c #FFB45F",
+"K     c #FFBD73",
+"L     c #E9B680",
+"M     c #C5B8AB",
+"N     c #90867D",
+"O     c #423A34",
+"P     c #938D88",
+"Q     c #ADA39A",
+"R     c #6F6359",
+"S     c #171412",
+"T     c #955100",
+"U     c #FF8C00",
+"V     c #FF8E05",
+"W     c #FF981D",
+"X     c #FFA133",
+"Y     c #FFAD4E",
+"Z     c #FBB668",
+"`     c #EBB376",
+" .    c #987F66",
+"..    c #37312C",
+"+.    c #090807",
+"@.    c #2B2622",
+"#.    c #49403A",
+"$.    c #221E1B",
+"%.    c #030302",
+"&.    c #3D260B",
+"*.    c #CB7712",
+"=.    c #FE8D02",
+"-.    c #FF8C01",
+";.    c #FF9517",
+">.    c #FF9E2D",
+",.    c #FCA94A",
+"'.    c #F0C89D",
+").    c #C9A884",
+"!.    c #AA8258",
+"~.    c #261E16",
+"{.    c #000000",
+"].    c #1D1A18",
+"^.    c #070606",
+"/.    c #51493E",
+"(.    c #D4BD9F",
+"_.    c #ECAC5F",
+":.    c #F0A64B",
+"<.    c #FB9822",
+"[.    c #FEA030",
+"}.    c #F3A74E",
+"|.    c #C9B198",
+"1.    c #655D56",
+"2.    c #776552",
+"3.    c #B2A69A",
+"4.    c #676461",
+"5.    c #DBDAD9",
+"6.    c #DBD9D8",
+"7.    c #CCC8C5",
+"8.    c #A49A93",
+"9.    c #73675D",
+"0.    c #514C45",
+"a.    c #CEC8BF",
+"b.    c #D8D1CA",
+"c.    c #DACEC1",
+"d.    c #E6C091",
+"e.    c #F3CC9D",
+"f.    c #F6D5AE",
+"g.    c #AE9C8B",
+"h.    c #2C2824",
+"i.    c #383635",
+"j.    c #E1DCD8",
+"k.    c #C2BDB9",
+"l.    c #E1DDDA",
+"m.    c #CEC8C3",
+"n.    c #BBB4AE",
+"o.    c #A1978F",
+"p.    c #5E544B",
+"q.    c #14110F",
+"r.    c #827668",
+"s.    c #D1CDC8",
+"t.    c #D6D6D6",
+"u.    c #ECEBEB",
+"v.    c #F8F7F7",
+"w.    c #D8D5D4",
+"x.    c #838180",
+"y.    c #9F9E9E",
+"z.    c #E7E5E4",
+"A.    c #E3E0DD",
+"B.    c #B2A79E",
+"C.    c #9E9186",
+"D.    c #9A8D83",
+"E.    c #7F7268",
+"F.    c #26211E",
+"G.    c #010101",
+"H.    c #0B0B0B",
+"I.    c #D09F63",
+"J.    c #DBCAB6",
+"K.    c #DACDBE",
+"L.    c #D8D2CC",
+"M.    c #E8E7E7",
+"N.    c #DDDAD8",
+"O.    c #BDB6B0",
+"P.    c #8B847F",
+"Q.    c #DDD7D1",
+"R.    c #E6E3E1",
+"S.    c #CEC7C2",
+"T.    c #9D8F84",
+"U.    c #9B8D82",
+"V.    c #9A8C82",
+"W.    c #70655C",
+"X.    c #0B0A08",
+"Y.    c #E78308",
+"Z.    c #FB9416",
+"`.    c #F9961E",
+" +    c #EDAA58",
+".+    c #E8BB84",
+"++    c #F0C490",
+"@+    c #A28565",
+"#+    c #473E35",
+"$+    c #221C16",
+"%+    c #A38A6F",
+"&+    c #D4CFCA",
+"*+    c #ADA39B",
+"=+    c #8D8177",
+"-+    c #887B71",
+";+    c #4E453E",
+">+    c #181613",
+",+    c #663800",
+"'+    c #F68700",
+")+    c #FD8E07",
+"!+    c #FD900C",
+"~+    c #FE9312",
+"{+    c #E48B23",
+"]+    c #8D591D",
+"^+    c #5D401E",
+"/+    c #B38F68",
+"(+    c #CEC7C1",
+"_+    c #AFA39A",
+":+    c #8A7E74",
+"<+    c #49423B",
 "[+    c #060505",
-"}+    c #E1C199",
-"|+    c #F3A03B",
-"1+    c #F89824",
-"2+    c #F9961D",
-"3+    c #FD9110",
-"4+    c #FF971C",
-"5+    c #FF9E2C",
-"6+    c #FFA53C",
-"7+    c #DEA360",
-"8+    c #CFCBC9",
-"9+    c #948A83",
-"0+    c #42372D",
-"a+    c #B89673",
-"b+    c #D0BAA5",
-"c+    c #2D2D2D",
-"d+    c #C8C8C8",
-"e+    c #E0DFDE",
-"f+    c #D1CECC",
-"g+    c #B9B4AF",
-"h+    c #91857C",
-"i+    c #74685E",
-"j+    c #D7D3CE",
-"k+    c #DBCBB7",
-"l+    c #DDC9B1",
-"m+    c #FAA239",
-"n+    c #FCAA49",
-"o+    c #FFB259",
-"p+    c #D69E5E",
-"q+    c #A19489",
-"r+    c #5A524B",
-"s+    c #090807",
-"t+    c #635F5B",
-"u+    c #EFEAE6",
-"v+    c #CCBCAD",
-"w+    c #6F6E6E",
-"x+    c #E8E6E4",
-"y+    c #E8E5E3",
-"z+    c #DCD9D7",
-"A+    c #E0DCD9",
-"B+    c #B7B0AB",
-"C+    c #ACA097",
-"D+    c #87796D",
-"E+    c #494139",
-"F+    c #BEAE99",
-"G+    c #E7D5BF",
-"H+    c #F3E2CE",
-"I+    c #FFEFDC",
-"J+    c #EDDFCF",
-"K+    c #8A7F75",
-"L+    c #332E29",
-"M+    c #010000",
-"N+    c #494949",
-"O+    c #E5E4E4",
-"P+    c #D7D0C9",
-"Q+    c #DEDCDA",
-"R+    c #E2DEDA",
-"S+    c #D4CFCA",
-"T+    c #BDB4AD",
-"U+    c #B8AFA8",
-"V+    c #9F968F",
-"W+    c #988D84",
-"X+    c #71655A",
-"Y+    c #1B1715",
-"Z+    c #030202",
-"`+    c #C2B4A2",
-" @    c #F8F7F7",
-".@    c #C9C7C6",
-"+@    c #706E6D",
-"@@    c #454545",
-"#@    c #919191",
-"$@    c #E1E1E0",
-"%@    c #EBE8E8",
-"&@    c #E3E0DD",
-"*@    c #C7BFB8",
-"=@    c #AA9E95",
-"-@    c #9C8F84",
-";@    c #9F9288",
-">@    c #92857B",
-",@    c #70655C",
-"'@    c #453C36",
-")@    c #030303",
-"!@    c #B89368",
-"~@    c #D2CCC3",
-"{@    c #F0F0F0",
-"]@    c #EEEEEE",
-"^@    c #C9C2BE",
-"/@    c #B3B0AD",
-"(@    c #EAE9E9",
-"_@    c #EEEDED",
-":@    c #E8E6E5",
-"<@    c #F1EFEE",
-"[@    c #D6D0CB",
-"}@    c #9E9186",
-"|@    c #93857A",
-"1@    c #9B8E83",
-"2@    c #9F9187",
-"3@    c #908176",
-"4@    c #807368",
-"5@    c #1E1B18",
-"6@    c #D3882D",
-"7@    c #DCC9B1",
-"8@    c #E8E7E7",
-"9@    c #D5D1CE",
-"0@    c #D0CCC8",
-"a@    c #A1978E",
-"b@    c #4A423C",
-"c@    c #B4ABA3",
-"d@    c #E5DDD4",
-"e@    c #E5E1DE",
-"f@    c #E1DEDB",
-"g@    c #B7AEA5",
-"h@    c #9F9085",
-"i@    c #9E9084",
-"j@    c #9C8E83",
-"k@    c #A09288",
-"l@    c #908277",
-"m@    c #514841",
-"n@    c #090806",
-"o@    c #DB7B04",
-"p@    c #F89823",
-"q@    c #E7D4BC",
-"r@    c #EBD9C4",
-"s@    c #A89B8E",
-"t@    c #6E655C",
-"u@    c #4A433D",
-"v@    c #574736",
-"w@    c #D2B595",
-"x@    c #DFDAD6",
-"y@    c #CDC7C2",
-"z@    c #9F948A",
-"A@    c #91857A",
-"B@    c #93857B",
-"C@    c #998B80",
-"D@    c #7C6F65",
-"E@    c #4A413A",
-"F@    c #12100E",
-"G@    c #FA9A26",
-"H@    c #FCA031",
-"I@    c #E8983C",
-"J@    c #654724",
-"K@    c #0A0805",
-"L@    c #372919",
-"M@    c #C6A786",
-"N@    c #D6D1CC",
-"O@    c #B6ACA4",
-"P@    c #A49990",
-"Q@    c #81766E",
-"R@    c #877C73",
-"S@    c #1B1815",
-"T@    c #FF8E07",
-"U@    c #FE9416",
-"V@    c #EC9024",
-"W@    c #A86B24",
-"X@    c #6F4A1F",
-"Y@    c #AB773C",
-"Z@    c #CCA982",
-"`@    c #D8D2CD",
-" #    c #BFB6AD",
-".#    c #AA9D92",
-"+#    c #9F9287",
-"@#    c #6A5F55",
-"##    c #211D1A",
-"$#    c #FF8C02",
-"%#    c #FF9312",
-"&#    c #FF9A23",
-"*#    c #FB9E32",
-"=#    c #F4A040",
-"-#    c #F6A951",
-";#    c #CFA77A",
-">#    c #C8BFB9",
-",#    c #A2958A",
-"'#    c #96887C",
-")#    c #554B43",
-"!#    c #070604",
-"~#    c #221300",
-"{#    c #DBD8D5",
-"]#    c #DEDBD8",
-"^#    c #D8D3D0",
-"/#    c #BFB7B1",
-"(#    c #84776D",
-"_#    c #B16100",
-":#    c #FEAC4E",
-"<#    c #D2A471",
-"[#    c #C3BAB1",
-"}#    c #C4BCB4",
-"|#    c #A6998D",
-"1#    c #847569",
-"2#    c #39322D",
-"3#    c #804600",
-"4#    c #DF7A00",
-"5#    c #151414",
-"6#    c #DAD6D4",
-"7#    c #E8E5E2",
-"8#    c #E4E0DD",
-"9#    c #D1CBC6",
-"0#    c #BCB3AB",
-"a#    c #75685E",
-"b#    c #28231F",
-"c#    c #FA8900",
-"d#    c #FEAA49",
-"e#    c #D59F63",
-"f#    c #BBAEA3",
-"g#    c #A5988D",
-"h#    c #8B7C70",
-"i#    c #36302A",
-"j#    c #AA5C00",
-"k#    c #F38500",
-"l#    c #A96008",
-"m#    c #989088",
-"n#    c #B2A79E",
-"o#    c #BAB0A7",
-"p#    c #A79A90",
-"q#    c #94877D",
-"r#    c #040303",
-"s#    c #B66300",
-"t#    c #FE8B00",
-"u#    c #E97F00",
-"v#    c #E88000",
-"w#    c #A05C00",
-"x#    c #F9A544",
-"y#    c #E19F55",
-"z#    c #B8A694",
-"A#    c #BFB6AF",
-"B#    c #A99D92",
-"C#    c #8A7B6F",
-"D#    c #4E453D",
-"E#    c #1B130B",
-"F#    c #B76400",
-"G#    c #F88700",
-"H#    c #D27300",
-"I#    c #38332F",
-"J#    c #8E837A",
-"K#    c #AFA49B",
-"L#    c #9F9186",
-"M#    c #26221E",
-"N#    c #F98900",
-"O#    c #D27500",
-"P#    c #885100",
-"Q#    c #774800",
-"R#    c #81581A",
-"S#    c #857460",
-"T#    c #A6998F",
-"U#    c #7C6F63",
-"V#    c #4F463D",
-"W#    c #6D4921",
-"X#    c #C16A00",
-"Y#    c #8D8B88",
-"Z#    c #D1CCC7",
-"`#    c #A7998F",
-" $    c #74675D",
-".$    c #0F0D0C",
-"+$    c #DE7B00",
-"@$    c #DC7B00",
-"#$    c #CC7200",
-"$$    c #764800",
-"%$    c #764903",
-"&$    c #764A05",
-"*$    c #774D0B",
-"=$    c #885914",
-"-$    c #C97000",
-";$    c #9C641E",
-">$    c #85786C",
-",$    c #9A8C81",
-"'$    c #9D8E83",
-")$    c #948578",
-"!$    c #84766A",
-"~$    c #897F76",
-"{$    c #87807C",
-"]$    c #A09B97",
-"^$    c #CFCDCC",
-"/$    c #EBEAE9",
-"($    c #D5CFCA",
-"_$    c #A0948A",
-":$    c #534942",
-"<$    c #D97700",
-"[$    c #CB7000",
-"}$    c #D87800",
-"|$    c #DD7B00",
-"1$    c #E37E00",
-"2$    c #DC7A04",
-"3$    c #79644F",
-"4$    c #8C7F75",
-"5$    c #9B8D82",
-"6$    c #988A7E",
-"7$    c #95867A",
-"8$    c #A09287",
-"9$    c #ACA096",
-"0$    c #CFC8C2",
-"a$    c #DCD7D3",
-"b$    c #887B71",
-"c$    c #292420",
-"d$    c #DE7900",
-"e$    c #E47D00",
-"f$    c #C96E00",
-"g$    c #201C19",
-"h$    c #6D6056",
-"i$    c #8A7D72",
-"j$    c #98897D",
-"k$    c #938479",
-"l$    c #A4978D",
-"m$    c #B9AFA6",
-"n$    c #040403",
-"o$    c #39332D",
-"p$    c #5D5149",
-"q$    c #75675C",
-"r$    c #908175",
-"s$    c #A09388",
-"t$    c #AA9E94",
-"u$    c #9A8C80",
-"v$    c #A4968C",
-"w$    c #998A80",
-"x$    c #9E9086",
-"y$    c #73675D",
-"z$    c #1E1A18",
-"A$    c #0B0908",
-"B$    c #2F2924",
-"C$    c #64584F",
-"D$    c #7C6F64",
-"E$    c #918277",
-"F$    c #8F8175",
-"G$    c #94867A",
-"H$    c #2C2723",
-"I$    c #171412",
-"J$    c #25211D",
-"K$    c #302A25",
-"L$    c #514840",
-"M$    c #554B42",
-"N$    c #191614",
-"O$    c #060504",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                    . . . .                                                     ",
-"                                  . + @ # $ .                                                   ",
-"                                . . % @ & . .                                                   ",
-"                                . * . . . = .                                                   ",
-"                                . - ; > , ' ) .                                                 ",
-"                                . ! ~ { ] ^ / .                                                 ",
-"                                . ( _ : < ^ [ .                                                 ",
-"                              . } | 1 2 3 4 5 ) .                                               ",
-"                              6 7 8 9 0 a b c d e                                               ",
-"                              f g h i j k l m n o                                               ",
-"                              p q r s t u v w x y z                                             ",
-"                            A B C D E F G H H H I J                                             ",
-"                            K L M D D N O P P H Q R             S T U                           ",
-"                            f V W X E F G H H Y Z `  .        ..+.@.#.$.                        ",
-"                            %.&.*.=.-.;.>.,.'.).m !.~.{.].  ^./.(._.:.<.                        ",
-"                          . [.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.                        ",
-"                          . j.k.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D..                       ",
-"                          . j.k.k.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.. .                       ",
-"                          . W.k.k.X.Y.Z.`. +.+++@+#+$+%+. .   &+*+=+. .                         ",
-"                        %.-+;+>+k.k.,+'+)+!+~+{+]+^+/+(+_+.       :+<+[+                        ",
-"                        f V }+|+1+2+3+4+5+6+7+8+9+0+a+b+c+    d+e+f+g+h+i+                      ",
-"                        K L j+k+l+}+*.m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+                    ",
-"                        K F+E E E r W G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+                  ",
-"                        p `+E D D D E F G H  @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@.                   ",
-"                      f !@~@E E E D D N {@]@G ^@/@(@_@:@<@[@}@|@1@2@3@4@5@. .                   ",
-"                      6 6@}+l+7@k+r E F 8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@. .                   ",
-"                      . o@2+p@1+|+}+l+q@r@s@t@u@<+v@w@x@y@z@A@B@C@D@E@F@_+.                     ",
-"                      . W.k.k.k.>+2+p@G@H@I@J@K@. L@M@N@O@P@Q@R@T.S@. . .                       ",
-"                    . [.}.k.k.k.k.k.k.k.T@U@V@W@X@Y@Z@`@ #.#+#@###. . .                         ",
-"                  . . j.k.k.k.k.k.k.k.k.$#%#&#*#=#-#;#>#*@,#'#)#!#~#. .     {#]#^#/#(#          ",
-"              . . _#. j.k.k.k.k.k.k.k.k.k.l.m.n.o.:#<#[#}#|#1#2#. 3#4#[.5#6#7#8#9#0#a#b#        ",
-"            . [.W.j.. W.c#k.c#k.k.k.k.k.k.E.F.G.H.d#e#f# #g#h#i#. j#k.k#l#m#n#o#p#q##.r#.       ",
-"          . s#k#t#}.u#}.v#w#k.k.k.k.k.k.k.X.Y.Z.`.x#y#z#A#B#C#D#E#F#G#H#. I#J#K#L#B.M#. .       ",
-"          . . [.j.j.W.}.N#O#P#Q#P#k.k.k.k.k.,+'+)+!+R#S#T#g#3@U#V#W#X#.     Y#Z#`# $.$.         ",
-"              . . . . [.j.4#+$@$#$P#Q#$$$$$$%$&$*$=$-$;$>$,$'$)$!$>$~${$]$^$/$($_$:$r#.         ",
-"                . . . . . . [.j.<$[$}$@$@$@$@$@$|$1$N#2$3$4$5$6$7$8$9$T+0$&@a$0#b$c$_+.         ",
-"                . . . . . . . . . . [.j.d$e$}.k.k.}.W.f$g$h$i$5$j$k$8$5$l$m$9$,$)#s+.           ",
-"                  . . . . . . . . . . . . . [.j.j.[.. . n$o$p$q$r$s$t$u$v$w$x$y$z$. .           ",
-"                        . . . . . . . . . . . . . . . . . A$B$E@C$D$E$F$7$G$y$H$D..             ",
-"                              . . . . . . . . . . . . . . . . I$J$K$E@L$M$:.N$_+. .             ",
-"                                      . . . . . . . . . .       [+r#O$[+O$D.. . .               ",
-"                                              . . . .               . . . . .                   ",
-"                                                                                                ",
-"                                                                                                "};
+"}+    c #271600",
+"|+    c #935100",
+"1+    c #FF9516",
+"2+    c #FD9D2C",
+"3+    c #F8A545",
+"4+    c #DEA76A",
+"5+    c #C6BEB6",
+"6+    c #AFA49A",
+"7+    c #796D62",
+"8+    c #1C1916",
+"9+    c #442600",
+"0+    c #462600",
+"a+    c #DFDBD9",
+"b+    c #DDD9D5",
+"c+    c #C6BFB9",
+"d+    c #73675E",
+"e+    c #3B2000",
+"f+    c #925000",
+"g+    c #8A4B00",
+"h+    c #965200",
+"i+    c #FD8B00",
+"j+    c #FF9210",
+"k+    c #FF9B26",
+"l+    c #FFA741",
+"m+    c #E2A45E",
+"n+    c #BFB4AA",
+"o+    c #AEA398",
+"p+    c #6D6157",
+"q+    c #12100E",
+"r+    c #B96500",
+"s+    c #EB8100",
+"t+    c #8A673E",
+"u+    c #BDB5AE",
+"v+    c #C2B9B1",
+"w+    c #A89D94",
+"x+    c #413933",
+"y+    c #070605",
+"z+    c #9E5600",
+"A+    c #EF8300",
+"B+    c #ED8100",
+"C+    c #F38500",
+"D+    c #D97900",
+"E+    c #CA7200",
+"F+    c #D47600",
+"G+    c #F28500",
+"H+    c #FF8F08",
+"I+    c #FF981E",
+"J+    c #FEA339",
+"K+    c #D49142",
+"L+    c #AC9D8E",
+"M+    c #ADA197",
+"N+    c #7C6F64",
+"O+    c #3D342B",
+"P+    c #B66607",
+"Q+    c #AA5D00",
+"R+    c #131110",
+"S+    c #78716B",
+"T+    c #B2A79F",
+"U+    c #887A70",
+"V+    c #141210",
+"W+    c #291600",
+"X+    c #482700",
+"Y+    c #4A2900",
+"Z+    c #AC5E00",
+"`+    c #E27C00",
+" @    c #CA7100",
+".@    c #B96900",
+"+@    c #B26500",
+"@@    c #A45F00",
+"#@    c #A46002",
+"$@    c #A4630C",
+"%@    c #A86C1B",
+"&@    c #B16C11",
+"*@    c #93724B",
+"=@    c #998C81",
+"-@    c #94867A",
+";@    c #7B6E62",
+">@    c #876E52",
+",@    c #706151",
+"'@    c #B0ACA9",
+")@    c #CCCBCA",
+"!@    c #C3BBB5",
+"~@    c #756961",
+"{@    c #050404",
+"]@    c #5B3200",
+"^@    c #8A4C00",
+"/@    c #D77700",
+"(@    c #DD7A00",
+"_@    c #E17D00",
+":@    c #E78000",
+"<@    c #E98100",
+"[@    c #EF8400",
+"}@    c #AD6816",
+"|@    c #75675B",
+"1@    c #97897E",
+"2@    c #97887C",
+"3@    c #A09287",
+"4@    c #AEA39A",
+"5@    c #C7C0B9",
+"6@    c #CFC8C3",
+"7@    c #9D9289",
+"8@    c #3C3530",
+"9@    c #4A2800",
+"0@    c #7C4400",
+"a@    c #E47D00",
+"b@    c #311C03",
+"c@    c #36302B",
+"d@    c #73665D",
+"e@    c #8D7E73",
+"f@    c #9F9287",
+"g@    c #A4968C",
+"h@    c #A3968C",
+"i@    c #655B53",
+"j@    c #28231F",
+"k@    c #483F38",
+"l@    c #6A5F56",
+"m@    c #7A6D63",
+"n@    c #7E7166",
+"o@    c #62584F",
+"p@    c #110F0E",
+"q@    c #161311",
+"r@    c #1E1B18",
+"s@    c #1E1A17",
+"t@    c #0E0C0B",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                        . + @                                   ",
+"                      # $ % &                                   ",
+"                      * = - ; >                                 ",
+"                      , ' ) ! ~                                 ",
+"                    { ] ^ / ( _                                 ",
+"                    : < [ } | 1 2                               ",
+"                    3 4 5 6 7 8 9                               ",
+"                  0 a b c d e e f                               ",
+"                  g h i c d e j k l       m n o                 ",
+"                  p q r s t u v w x y z A B C D                 ",
+"                  E F G H I J K L M N O P Q R S                 ",
+"                  T U V W X Y Z `  ...+.@.#.$.%.                ",
+"                &.*.=.-.;.>.,.'.).!.~.{.    ].^.                ",
+"                /.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.              ",
+"                0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.            ",
+"                r.s.t.t.c u.v.w.x.y.z.A.B.C.D.E.F.G.            ",
+"              H.I.J.K.L.c M.N.O.P.Q.R.S.T.U.V.W.X.{.            ",
+"              {.Y.Z.`. +.+++@+#+$+%+&+*+=+-+;+>+{.              ",
+"              ,+'+U -.)+!+~+{+]+^+/+(+_+:+<+[+{.                ",
+"            }+|+U U U U U -.1+2+3+4+5+6+7+8+9+0+  a+b+c+d+      ",
+"        e+f+g+h+i+i+U U U U j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+    ",
+"      {.z+A+B+C+D+E+F+G+U U H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+{.    ",
+"        W+X+Y+Z+`+ @.@+@@@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@      ",
+"          {.{.{.{.]@f+^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@{.      ",
+"            {.{.{.{.{.{.0+9@0@a@a@0@b@c@d@e@f@C.g@h@i@q+{.      ",
+"                {.{.{.{.{.{.{.{.{.{.{.{@j@k@l@m@n@o@V+{.        ",
+"                        {.{.{.{.{.{.{.{.  p@q@r@s@t@{.{.        ",
+"                                {.{.          {.{.{.            ",
+"                                                                "};
index b8d89fe527f36267009475080f2741a37b22159a..c2d116493da772d85543b657d0826f9d59ab34d1 100644 (file)
 /* XPM */
 static char * gvlc_xpm[] = {
-"48 48 527 2",
+"32 32 352 2",
 "      c None",
-".     c #000000",
-"+     c #C76D00",
-"@     c #DD831A",
-"#     c #D78626",
-"$     c #B16E1F",
-"%     c #C66C00",
-"&     c #CC7F24",
-"*     c #B07633",
-"=     c #B68857",
-"-     c #D88F3B",
-";     c #E39C4C",
-">     c #DE9F58",
-",     c #E3A969",
-"'     c #F4B675",
-")     c #CD9962",
-"!     c #DD9038",
-"~     c #FFAE51",
-"{     c #FFB562",
-"]     c #FFBC72",
-"^     c #FFBF7B",
-"/     c #DDA56A",
-"(     c #E39235",
-"_     c #FFAC4D",
-":     c #FFB35D",
-"<     c #FFBA6D",
-"[     c #E3AA6D",
-"}     c #CD7D1F",
-"|     c #F99F36",
-"1     c #FFAA48",
-"2     c #FFB158",
-"3     c #FFB869",
-"4     c #FFBF79",
-"5     c #F9BA78",
-"6     c #040404",
-"7     c #D78C33",
-"8     c #F9A849",
-"9     c #FDA947",
-"0     c #FFAF54",
-"a     c #FFB664",
-"b     c #FFBD74",
-"c     c #FFC07E",
-"d     c #DDAB76",
-"e     c #050505",
-"f     c #181818",
-"g     c #C3A887",
-"h     c #E1C6A6",
-"i     c #F3B369",
-"j     c #FAB667",
-"k     c #FCBE77",
-"l     c #FFC688",
-"m     c #FFD09F",
-"n     c #E3CBB4",
-"o     c #393939",
-"p     c #343434",
-"q     c #C2B5A5",
-"r     c #D7D3CF",
-"s     c #DBCEBF",
-"t     c #E7D9C9",
-"u     c #F3E6D7",
-"v     c #FFF3E6",
-"w     c #FFF5EC",
-"x     c #F9F4F0",
-"y     c #CDBDAE",
-"z     c #232323",
-"A     c #1D1D1D",
-"B     c #B49B7B",
-"C     c #D1CECA",
-"D     c #D6D6D6",
-"E     c #D6D5D5",
-"F     c #E3E2E2",
-"G     c #F1F0F0",
-"H     c #FFFEFE",
-"I     c #DDD2C9",
-"J     c #212121",
-"K     c #1B1B1B",
-"L     c #BFAE99",
-"M     c #D6D5D4",
-"N     c #E3E3E3",
-"O     c #F1F1F1",
-"P     c #FFFFFF",
-"Q     c #E3DAD1",
-"R     c #3E3E3E",
-"S     c #C3A57F",
-"T     c #DBCBB8",
-"U     c #D7D4D0",
-"V     c #FFFCFA",
-"W     c #F9EDE2",
-"X     c #CDB79F",
-"Y     c #1C1C1C",
-"Z     c #070707",
-"`     c #DD851A",
-" .    c #F3A240",
-"..    c #E1C3A0",
-"+.    c #DDCBB7",
-"@.    c #E7D8C6",
-"#.    c #F3E5D4",
-"$.    c #FFF1E2",
-"%.    c #FFF2E5",
-"&.    c #FFECD9",
-"*.    c #DDAC7A",
-"=.    c #CD7000",
-"-.    c #F98800",
-";.    c #FD8E07",
-">.    c #F99C2C",
-",.    c #F8A340",
-"'.    c #FAAC50",
-").    c #FCB460",
-"!.    c #FFBC70",
-"~.    c #FFC27D",
-"{.    c #FFC687",
-"].    c #DD7900",
-"^.    c #FF8C00",
-"/.    c #FF910E",
-"(.    c #FF981E",
-"_.    c #FF9F2E",
-":.    c #FFA63F",
-"<.    c #FFAD4F",
-"[.    c #FFB45F",
-"}.    c #FFBB70",
-"|.    c #101439",
-"1.    c #11245A",
-"2.    c #FF8F09",
-"3.    c #FF9619",
-"4.    c #FF9D2A",
-"5.    c #FFA43A",
-"6.    c #FFAB4A",
-"7.    c #FFB25B",
-"8.    c #FFB96B",
-"9.    c #0C1A1D",
-"0.    c #080F1A",
-"a.    c #030911",
-"b.    c #121944",
-"c.    c #4071E5",
-"d.    c #1E3B62",
-"e.    c #030208",
-"f.    c #E37C00",
-"g.    c #FF8D04",
-"h.    c #FF9415",
-"i.    c #FF9B25",
-"j.    c #FFA235",
-"k.    c #FFA946",
-"l.    c #FFB056",
-"m.    c #FFB766",
-"n.    c #FFBE77",
-"o.    c #010408",
-"p.    c #080C20",
-"q.    c #24408D",
-"r.    c #4171E1",
-"s.    c #3A71DF",
-"t.    c #3E71DE",
-"u.    c #3976DE",
-"v.    c #070108",
-"w.    c #C87817",
-"x.    c #F3921C",
-"y.    c #FD8E05",
-"z.    c #FF9210",
-"A.    c #FF9920",
-"B.    c #FFA031",
-"C.    c #FFA741",
-"D.    c #F9BB7B",
-"E.    c #CD9F6E",
-"F.    c #080808",
-"G.    c #040608",
-"H.    c #08051D",
-"I.    c #0C223E",
-"J.    c #080720",
-"K.    c #050408",
-"L.    c #070407",
-"M.    c #070007",
-"N.    c #030308",
-"O.    c #315FB0",
-"P.    c #3972DE",
-"Q.    c #193067",
-"R.    c #050108",
-"S.    c #E1C199",
-"T.    c #F3A03B",
-"U.    c #F89824",
-"V.    c #F9961D",
-"W.    c #FD9110",
-"X.    c #FF971C",
-"Y.    c #FF9E2C",
-"Z.    c #FFA53C",
-"`.    c #FFBB71",
-" +    c #FFC88D",
-".+    c #000408",
-"++    c #060408",
-"@+    c #2E5CB9",
-"#+    c #070B07",
-"$+    c #010308",
-"%+    c #15164D",
-"&+    c #3C72DE",
-"*+    c #4075DE",
-"=+    c #0D0930",
-"-+    c #000405",
-";+    c #0F123A",
-">+    c #4175E6",
-",+    c #3975DE",
-"'+    c #040808",
-")+    c #290C4A",
-"!+    c #D7D3CE",
-"~+    c #DBCBB7",
-"{+    c #DDC9B1",
-"]+    c #FAA239",
-"^+    c #FCAA49",
-"/+    c #FFB259",
-"(+    c #FFB866",
-"_+    c #FFBE74",
-":+    c #FFCB92",
-"<+    c #02040F",
-"[+    c #3165C6",
-"}+    c #3971DE",
-"|+    c #3D73E2",
-"1+    c #1E4B85",
-"2+    c #08010A",
-"3+    c #0D114D",
-"4+    c #3E73E3",
-"5+    c #3C72E1",
-"6+    c #3A75DF",
-"7+    c #3C76E1",
-"8+    c #080A1D",
-"9+    c #080729",
-"0+    c #3D73DE",
-"a+    c #346BC7",
-"b+    c #080408",
-"c+    c #BEAE99",
-"d+    c #E7D5BF",
-"e+    c #F3E2CE",
-"f+    c #FFEFDC",
-"g+    c #FFF0DF",
-"h+    c #FFF4E9",
-"i+    c #0C1010",
-"j+    c #A43936",
-"k+    c #40456E",
-"l+    c #3D71DE",
-"m+    c #3C71E1",
-"n+    c #1C2684",
-"o+    c #3E74E3",
-"p+    c #001208",
-"q+    c #07041F",
-"r+    c #366ED8",
-"s+    c #3E75E3",
-"t+    c #4075E5",
-"u+    c #4175E5",
-"v+    c #3C76DE",
-"w+    c #3766D2",
-"x+    c #383C49",
-"y+    c #7B2F7E",
-"z+    c #C2B4A2",
-"A+    c #1C1620",
-"B+    c #F65E5C",
-"C+    c #AE3E37",
-"D+    c #13040E",
-"E+    c #3D71E2",
-"F+    c #3C6ACD",
-"G+    c #080D2A",
-"H+    c #2C4BA4",
-"I+    c #3E74DE",
-"J+    c #2F61BD",
-"K+    c #030403",
-"L+    c #3A71DE",
-"M+    c #112022",
-"N+    c #33C139",
-"O+    c #41E641",
-"P+    c #B89368",
-"Q+    c #D2CCC3",
-"R+    c #140C14",
-"S+    c #F76368",
-"T+    c #EA5555",
-"U+    c #1C0610",
-"V+    c #3F67C3",
-"W+    c #04110C",
-"X+    c #030408",
-"Y+    c #070008",
-"Z+    c #366FD5",
-"`+    c #4072DE",
-" @    c #0C201C",
-".@    c #294529",
-"+@    c #39E639",
-"@@    c #39E739",
-"#@    c #39EA39",
-"$@    c #D3882D",
-"%@    c #DCC9B1",
-"&@    c #FFFCF9",
-"*@    c #08080C",
-"=@    c #F1615D",
-"-@    c #EF615B",
-";@    c #F65A55",
-">@    c #E14F4A",
-",@    c #BB3739",
-"'@    c #120A0E",
-")@    c #3974DE",
-"!@    c #3C73E1",
-"~@    c #3C71DE",
-"{@    c #346BC3",
-"]@    c #1F232C",
-"^@    c #1B1417",
-"/@    c #3AE63A",
-"(@    c #3DE83D",
-"_@    c #39E939",
-":@    c #39DE39",
-"<@    c #DB7B04",
-"[@    c #F89823",
-"}@    c #E7D4BC",
-"|@    c #F3E0CB",
-"1@    c #FFEDD9",
-"2@    c #FFEEDC",
-"3@    c #FFEFDE",
-"4@    c #FFE8CD",
-"5@    c #F75B57",
-"6@    c #F65850",
-"7@    c #5A1224",
-"8@    c #F35750",
-"9@    c #DF4548",
-"0@    c #E0414A",
-"a@    c #300E15",
-"b@    c #3457C5",
-"c@    c #3E72E3",
-"d@    c #336EC5",
-"e@    c #273DA2",
-"f@    c #050105",
-"g@    c #39E439",
-"h@    c #3CE63C",
-"i@    c #0C4214",
-"j@    c #3BE03B",
-"k@    c #092A19",
-"l@    c #FA9A26",
-"m@    c #FCA031",
-"n@    c #FFA842",
-"o@    c #FFAE4F",
-"p@    c #FFB35C",
-"q@    c #FFB765",
-"r@    c #F15A4F",
-"s@    c #F5574E",
-"t@    c #08040B",
-"u@    c #040408",
-"v@    c #A53936",
-"w@    c #E84746",
-"x@    c #49131C",
-"y@    c #A73A36",
-"z@    c #08120F",
-"A@    c #349535",
-"B@    c #3EE63E",
-"C@    c #39DF39",
-"D@    c #051108",
-"E@    c #2B8A30",
-"F@    c #3FE73F",
-"G@    c #010608",
-"H@    c #FF8E07",
-"I@    c #FF9517",
-"J@    c #FF9C27",
-"K@    c #FFA338",
-"L@    c #000808",
-"M@    c #F15151",
-"N@    c #F35A55",
-"O@    c #050405",
-"P@    c #080008",
-"Q@    c #8E352E",
-"R@    c #1F0C0E",
-"S@    c #24191D",
-"T@    c #39E539",
-"U@    c #40E640",
-"V@    c #27A12A",
-"W@    c #070208",
-"X@    c #39E839",
-"Y@    c #3BE93B",
-"Z@    c #FF8C02",
-"`@    c #FF9312",
-" #    c #FF9A23",
-".#    c #FFA133",
-"+#    c #FFA843",
-"@#    c #080208",
-"##    c #A32A3A",
-"$#    c #F75B56",
-"%#    c #F75A55",
-"&#    c #331417",
-"*#    c #000401",
-"=#    c #F14F42",
-"-#    c #202828",
-";#    c #3AEA3A",
-">#    c #030703",
-",#    c #102F18",
-"'#    c #083408",
-")#    c #010401",
-"!#    c #B16100",
-"~#    c #080404",
-"{#    c #AF2B38",
-"]#    c #EF5A4D",
-"^#    c #25120F",
-"/#    c #16040F",
-"(#    c #070408",
-"_#    c #F35042",
-":#    c #121A12",
-"<#    c #3AE93A",
-"[#    c #39E239",
-"}#    c #030808",
-"|#    c #082F0D",
-"1#    c #258C26",
-"2#    c #3DE63D",
-"3#    c #3EE23F",
-"4#    c #100408",
-"5#    c #FA8900",
-"6#    c #F7584E",
-"7#    c #F4584E",
-"8#    c #120B0B",
-"9#    c #050308",
-"0#    c #F35246",
-"a#    c #E64845",
-"b#    c #F35144",
-"c#    c #051305",
-"d#    c #32CA32",
-"e#    c #3AE23A",
-"f#    c #030708",
-"g#    c #000407",
-"h#    c #2FB431",
-"i#    c #47135E",
-"j#    c #B66300",
-"k#    c #F38500",
-"l#    c #FE8B00",
-"m#    c #E97F00",
-"n#    c #E88000",
-"o#    c #A05C00",
-"p#    c #10040C",
-"q#    c #C7383F",
-"r#    c #F75A54",
-"s#    c #F15B50",
-"t#    c #10080C",
-"u#    c #080108",
-"v#    c #F65243",
-"w#    c #F45246",
-"x#    c #F35342",
-"y#    c #051308",
-"z#    c #18521C",
-"A#    c #25A126",
-"B#    c #011208",
-"C#    c #135424",
-"D#    c #155815",
-"E#    c #F98900",
-"F#    c #D27500",
-"G#    c #885100",
-"H#    c #774800",
-"I#    c #290814",
-"J#    c #DB4048",
-"K#    c #E15045",
-"L#    c #EA4E46",
-"M#    c #0B060C",
-"N#    c #08050B",
-"O#    c #F65446",
-"P#    c #F65346",
-"Q#    c #EF5344",
-"R#    c #030E08",
-"S#    c #2BAA2B",
-"T#    c #030303",
-"U#    c #39E339",
-"V#    c #080F08",
-"W#    c #3DDB3D",
-"X#    c #249C24",
-"Y#    c #3B4B43",
-"Z#    c #DF7A00",
-"`#    c #DE7B00",
-" $    c #DC7B00",
-".$    c #CC7200",
-"+$    c #764800",
-"@$    c #764903",
-"#$    c #764A05",
-"$$    c #774D0B",
-"%$    c #424331",
-"&$    c #5B1721",
-"*$    c #EC5442",
-"=$    c #EE5342",
-"-$    c #F65242",
-";$    c #10050B",
-">$    c #F45042",
-",$    c #EB5242",
-"'$    c #DA4645",
-")$    c #081208",
-"!$    c #081C18",
-"~$    c #D97700",
-"{$    c #CB7000",
-"]$    c #D87800",
-"^$    c #DD7B00",
-"/$    c #E37E00",
-"($    c #2D232E",
-"_$    c #F15345",
-":$    c #ED5242",
-"<$    c #DB4944",
-"[$    c #DC4448",
-"}$    c #E24546",
-"|$    c #40E540",
-"1$    c #15781C",
-"2$    c #05180D",
-"3$    c #3CD83C",
-"4$    c #201A24",
-"5$    c #020406",
-"6$    c #DE7900",
-"7$    c #E47D00",
-"8$    c #C76E02",
-"9$    c #12090B",
-"0$    c #DC4146",
-"a$    c #DF4444",
-"b$    c #E34645",
-"c$    c #E54644",
-"d$    c #E04748",
-"e$    c #000403",
-"f$    c #3EE33E",
-"g$    c #3CE33C",
-"h$    c #010F08",
-"i$    c #08100C",
-"j$    c #6E1D26",
-"k$    c #E54746",
-"l$    c #E64745",
-"m$    c #E14847",
-"n$    c #39E53A",
-"o$    c #33D336",
-"p$    c #292731",
-"q$    c #170312",
-"r$    c #E84A46",
-"s$    c #060C0B",
-"t$    c #1C0A0E",
-"u$    c #080B0F",
-"v$    c #CA4341",
-"w$    c #000708",
-"x$    c #0F4316",
-"y$    c #0A0E12",
-"z$    c #251140",
-"A$    c #180F3E",
-"B$    c #593769",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                    . . . .                                                     ",
-"                                  . + @ # $ .                                                   ",
-"                                . . % @ & . .                                                   ",
-"                                . * . . . = .                                                   ",
-"                                . - ; > , ' ) .                                                 ",
-"                                . ! ~ { ] ^ / .                                                 ",
-"                                . ( _ : < ^ [ .                                                 ",
-"                              . } | 1 2 3 4 5 ) .                                               ",
-"                              6 7 8 9 0 a b c d e                                               ",
-"                              f g h i j k l m n o                                               ",
-"                              p q r s t u v w x y z                                             ",
-"                            A B C D E F G H H H I J                                             ",
-"                            K L M D D N O P P H Q R                                             ",
-"                            f S T U E F G H H V W X Y                                           ",
-"                            Z `  ...+.@.#.$.%.&.m *.e                                           ",
-"                          . =.-.;.>.,.'.).!.~.{.c [ .                                           ",
-"                          . ].^.^./.(._.:.<.[.}.^ 5 ) .             |.  1.                      ",
-"                          . ].^.^.2.3.4.5.6.7.8.^ ^ / .         9.0.a.b.c.d.e.                  ",
-"                          . f.^.^.g.h.i.j.k.l.m.n.^ [ .       o.p.q.r.c.s.t.u.v.                ",
-"                        Z w.x.y.^.^.z.A.B.C.~ { ] ^ D.E.F.G.H.c.I.J.K.L.M.N.O.P.Q.R.            ",
-"                        f S S.T.U.V.W.X.Y.Z._ : `. +m .+++@+P.#+$+%+&+*+c.=+-+;+>+,+'+)+        ",
-"                        K L !+~+{+S. .]+^+/+(+_+:+&.<+[+}+|+1+2+3+4+5+s.6+7+8+9+c.7+0+a+b+      ",
-"                        K c+E E E r T d+e+f+g+$.h+i+j+k+P.l+m+M.n+u.o+p+q+r+s+t+u+v+0+w+x+y+    ",
-"                        p z+E D D D E F G H H H H A+B+C+D+E+7+F+G+H+I+J+o.K+m+P.L+5+M+N+O+      ",
-"                      f P+Q+E E E D D N O P P P P R+B+S+T+U+V+s.W+X+R.Y+L.Z+I+`+ @.@+@@@#@      ",
-"                      6 $@S.{+%@~+r E F G H H H &@*@=@-@;@>@,@'@)@!@~@6+>+{@]@^@/@@@(@_@:@      ",
-"                      . <@V.[@U.T.S.{+}@|@1@2@3@4@F.5@6@7@8@9@0@a@b@c@d@e@f@g@+@+@h@i@j@k@      ",
-"                      . f.^.^.^.y.V.[@l@m@n@o@p@q@*@r@s@t@u@v@w@x@y@b+z@A@@@B@C@#@D@E@F@G@      ",
-"                    . =.-.^.^.^.^.^.^.^.H@I@J@K@1 L@M@N@X+.+O@P@Q@R@S@T@U@.+V@+@W@R.X@Y@b+      ",
-"                  . . ].^.^.^.^.^.^.^.^.Z@`@ #.#+#@###$#%#&#f@*#v.=#-#;#+@>#,#'#)#@@(@_@.+      ",
-"              . . !#. ].^.^.^.^.^.^.^.^.^./.(._.:.~#{#]#%#^#f@/#(#_#:#<#[#}#|#)#1#@@2#3#4#      ",
-"            . =.f.].. f.5#^.5#^.^.^.^.^.^.2.3.4.5.4###6#7#8#9#0#a#b#c#d#e#>#f#g#o.+@g@h#i#      ",
-"          . j#k#l#-.m#-.n#o#^.^.^.^.^.^.^.g.h.i.j.p#q#r#s#t#u#v#w#x#y#/@+@K+z#A#B#f#C#D#        ",
-"          . . =.].].f.-.E#F#G#H#G#^.^.^.^.^.z.A.B.I#J#K#L#M#N#O#P#Q#R#/@S#T#U#C@+@V#W#X#Y#      ",
-"              . . . . =.].Z#`# $.$G#H#+$+$+$@$#$$$%$&$*$=$-$;$>$,$'$R.+@S#R.h@@@/@_@X@)$!$      ",
-"                . . . . . . =.].~${$]$ $ $ $ $ $^$/$($b+_$_#:$<$[$}$R.|$1$2$h@/@#@3$4$5$        ",
-"                . . . . . . . . . . =.].6$7$-.^.^.-.f.8$9$0$a$b$c$d$e$U@;#f$g$+@h$R.            ",
-"                  . . . . . . . . . . . . . =.].].=.. . . i$j$k$l$m$-++@n$+@o$$+                ",
-"                        . . . . . . . . . . . . . . . . . . p$q$w@r$u#|$+@s$t$                  ",
-"                              . . . . . . . . . . . . . . . . . u$v$w$x$b+                      ",
-"                                      . . . . . . . . . .         y$z$A$                        ",
-"                                              . . . .               B$                          ",
-"                                                                                                ",
-"                                                                                                "};
+".     c #8A4E06",
+"+     c #915917",
+"@     c #583710",
+"#     c #271A0B",
+"$     c #894D06",
+"%     c #8C5616",
+"&     c #281E13",
+"*     c #875A26",
+"=     c #966935",
+"-     c #966E42",
+";     c #C2915D",
+">     c #3B2C1C",
+",     c #956025",
+"'     c #FFB055",
+")     c #FFB96B",
+"!     c #F4B776",
+"~     c #4A3824",
+"{     c #3B2409",
+"]     c #CF832B",
+"^     c #FFAD4F",
+"/     c #FFB665",
+"(     c #FBBC78",
+"_     c #AC8052",
+":     c #4D3921",
+"<     c #E6A860",
+"[     c #FBAE55",
+"}     c #FEB665",
+"|     c #FFC27F",
+"1     c #EABB8A",
+"2     c #161616",
+"3     c #5D5750",
+"4     c #D2C5B5",
+"5     c #E6C8A4",
+"6     c #F3D5B2",
+"7     c #FFE6CB",
+"8     c #F6E7D9",
+"9     c #7E756E",
+"0     c #1C1C1C",
+"a     c #C1B19D",
+"b     c #D5D4D3",
+"c     c #DADADA",
+"d     c #ECECEC",
+"e     c #FFFEFE",
+"f     c #A39C96",
+"g     c #191919",
+"h     c #CAB59B",
+"i     c #D8D3CC",
+"j     c #FFFDFC",
+"k     c #D6C9BD",
+"l     c #534D46",
+"m     c #3F2404",
+"n     c #EC8D1B",
+"o     c #EDAD60",
+"p     c #E8C294",
+"q     c #F3D1A8",
+"r     c #FFE0BE",
+"s     c #FFE0BF",
+"t     c #F4C08A",
+"u     c #4D3B29",
+"v     c #904F00",
+"w     c #FD8B01",
+"x     c #FD9211",
+"y     c #FD9E2F",
+"z     c #FEA844",
+"A     c #FFB45F",
+"B     c #FFBD73",
+"C     c #FBBC79",
+"D     c #955100",
+"E     c #FF8C00",
+"F     c #FF8E05",
+"G     c #FF981D",
+"H     c #FFA133",
+"I     c #FFAD4E",
+"J     c #FFB664",
+"K     c #FFBF7A",
+"L     c #EAAF70",
+"M     c #000000",
+"N     c #09131B",
+"O     c #132348",
+"P     c #1E336E",
+"Q     c #3765C6",
+"R     c #1C3563",
+"S     c #3D260B",
+"T     c #CB7712",
+"U     c #FE8D02",
+"V     c #FF8C01",
+"W     c #FF9517",
+"X     c #FF9E2D",
+"Y     c #FFAA48",
+"Z     c #FFB35E",
+"`     c #FFBD76",
+" .    c #F6B978",
+"..    c #685239",
+"+.    c #050708",
+"@.    c #172453",
+"#.    c #152B56",
+"$.    c #141F48",
+"%.    c #1A2851",
+"&.    c #18264F",
+"*.    c #2A529A",
+"=.    c #24458B",
+"-.    c #0C1128",
+";.    c #51493E",
+">.    c #D4BD9F",
+",.    c #ECAC5F",
+"'.    c #F0A64B",
+").    c #FB9822",
+"!.    c #FEA030",
+"~.    c #FFAC4B",
+"{.    c #FFB460",
+"].    c #FFC78A",
+"^.    c #C7A481",
+"/.    c #13264A",
+"(.    c #2A509F",
+"_.    c #224683",
+":.    c #060817",
+"<.    c #2B499F",
+"[.    c #3D73DF",
+"}.    c #335BBB",
+"|.    c #0B132C",
+"1.    c #1E306F",
+"2.    c #3C75E1",
+"3.    c #1E2C5B",
+"4.    c #1E1C49",
+"5.    c #514C45",
+"6.    c #CEC8BF",
+"7.    c #D8D1CA",
+"8.    c #DACEC1",
+"9.    c #E6C091",
+"0.    c #F3CC9D",
+"a.    c #FFDCB2",
+"b.    c #FFDFBB",
+"c.    c #C9B7A4",
+"d.    c #683837",
+"e.    c #3A5BA7",
+"f.    c #3C72DF",
+"g.    c #244384",
+"h.    c #12154E",
+"i.    c #3C74E1",
+"j.    c #214881",
+"k.    c #234188",
+"l.    c #305CB4",
+"m.    c #345CBB",
+"n.    c #3E75E1",
+"o.    c #3B6FD9",
+"p.    c #2D3E67",
+"q.    c #827668",
+"r.    c #D1CDC8",
+"s.    c #D6D6D6",
+"t.    c #B2B0B3",
+"u.    c #AC4547",
+"v.    c #A23C3C",
+"w.    c #403E75",
+"x.    c #3C6FD6",
+"y.    c #182E5C",
+"z.    c #233C7D",
+"A.    c #254588",
+"B.    c #09101D",
+"C.    c #2F59AE",
+"D.    c #3669C8",
+"E.    c #325FA2",
+"F.    c #26862F",
+"G.    c #3BDF3D",
+"H.    c #0B0B0B",
+"I.    c #D09F63",
+"J.    c #DBCAB6",
+"K.    c #DACDBE",
+"L.    c #D8D2CC",
+"M.    c #AEACAC",
+"N.    c #A64343",
+"O.    c #F25F5C",
+"P.    c #BB4241",
+"Q.    c #6C3E61",
+"R.    c #254681",
+"S.    c #294D98",
+"T.    c #294D97",
+"U.    c #3059AB",
+"V.    c #2D4D88",
+"W.    c #28594C",
+"X.    c #31AD32",
+"Y.    c #3BE83B",
+"Z.    c #39E439",
+"`.    c #E78308",
+" +    c #FB9416",
+".+    c #F9961E",
+"++    c #EDAA58",
+"@+    c #E8BB84",
+"#+    c #F3C793",
+"$+    c #FFD7A9",
+"%+    c #FFDAB1",
+"&+    c #AD9275",
+"*+    c #A63F3B",
+"=+    c #B93F3E",
+"-+    c #822C2F",
+";+    c #D34244",
+">+    c #712128",
+",+    c #4B4D97",
+"'+    c #274F8E",
+")+    c #24565B",
+"!+    c #2FB22F",
+"~+    c #39E539",
+"{+    c #2FB72F",
+"]+    c #238728",
+"^+    c #185F21",
+"/+    c #663800",
+"(+    c #F68700",
+"_+    c #FD8E07",
+":+    c #FD900C",
+"<+    c #FE9312",
+"[+    c #FF9E2A",
+"}+    c #FFA63F",
+"|+    c #AB773A",
+"1+    c #A23B39",
+"2+    c #A43D3A",
+"3+    c #020408",
+"4+    c #421618",
+"5+    c #6B2424",
+"6+    c #3C181A",
+"7+    c #247024",
+"8+    c #2EA230",
+"9+    c #259529",
+"0+    c #2EB22E",
+"a+    c #0B1F0D",
+"b+    c #37D338",
+"c+    c #185119",
+"d+    c #271600",
+"e+    c #935100",
+"f+    c #FF9516",
+"g+    c #FF9E2C",
+"h+    c #AD702E",
+"i+    c #721D28",
+"j+    c #F55A54",
+"k+    c #712B2A",
+"l+    c #060205",
+"m+    c #070307",
+"n+    c #AA4137",
+"o+    c #30A832",
+"p+    c #279B28",
+"q+    c #0A220F",
+"r+    c #082808",
+"s+    c #2AAA2A",
+"t+    c #3CE73C",
+"u+    c #175019",
+"v+    c #3B2000",
+"w+    c #925000",
+"x+    c #8A4B00",
+"y+    c #965200",
+"z+    c #FD8B00",
+"A+    c #FF9210",
+"B+    c #FF9B26",
+"C+    c #AE6F2A",
+"D+    c #741E28",
+"E+    c #F5594F",
+"F+    c #622623",
+"G+    c #3C1416",
+"H+    c #A03432",
+"I+    c #A53D30",
+"J+    c #269526",
+"K+    c #279928",
+"L+    c #041008",
+"M+    c #051309",
+"N+    c #2AAA2C",
+"O+    c #38DA39",
+"P+    c #344A3D",
+"Q+    c #9E5600",
+"R+    c #EF8300",
+"S+    c #ED8100",
+"T+    c #F38500",
+"U+    c #D97900",
+"V+    c #CA7200",
+"W+    c #D47600",
+"X+    c #F28500",
+"Y+    c #FF8F08",
+"Z+    c #FF981E",
+"`+    c #B26D27",
+" @    c #912931",
+".@    c #EF574E",
+"+@    c #592222",
+"@@    c #571D1D",
+"#@    c #F55245",
+"$@    c #A33D2F",
+"%@    c #289F29",
+"&@    c #248D24",
+"*@    c #18581A",
+"=@    c #249726",
+"-@    c #0A240D",
+";@    c #1F7B26",
+">@    c #27602A",
+",@    c #291600",
+"'@    c #482700",
+")@    c #4A2900",
+"!@    c #AC5E00",
+"~@    c #E27C00",
+"{@    c #CA7100",
+"]@    c #B96900",
+"^@    c #B26500",
+"/@    c #A45F00",
+"(@    c #A46002",
+"_@    c #A4630C",
+":@    c #81561D",
+"<@    c #6C282C",
+"[@    c #EA5243",
+"}@    c #BF4136",
+"|@    c #5A1E1E",
+"1@    c #F15243",
+"2@    c #973330",
+"3@    c #289B29",
+"4@    c #1E721F",
+"5@    c #299929",
+"6@    c #2EB82E",
+"7@    c #2DAD2D",
+"8@    c #16321F",
+"9@    c #5B3200",
+"0@    c #8A4C00",
+"a@    c #D77700",
+"b@    c #DD7A00",
+"c@    c #E17D00",
+"d@    c #E78000",
+"e@    c #E98100",
+"f@    c #955614",
+"g@    c #672E15",
+"h@    c #D4453D",
+"i@    c #E54C43",
+"j@    c #DF4646",
+"k@    c #972F31",
+"l@    c #2C9A2D",
+"m@    c #1E8823",
+"n@    c #30B732",
+"o@    c #33CF34",
+"p@    c #29962A",
+"q@    c #16131A",
+"r@    c #462600",
+"s@    c #4A2800",
+"t@    c #7C4400",
+"u@    c #E47D00",
+"v@    c #2E1902",
+"w@    c #361716",
+"x@    c #AF3437",
+"y@    c #E54745",
+"z@    c #963131",
+"A@    c #3AE63A",
+"B@    c #38DD39",
+"C@    c #114616",
+"D@    c #17121A",
+"E@    c #6E2326",
+"F@    c #963130",
+"G@    c #227624",
+"H@    c #207721",
+"I@    c #150B0D",
+"J@    c #3A1A26",
+"K@    c #161A30",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                        . + @                                   ",
+"                      # $ % &                                   ",
+"                      * = - ; >                                 ",
+"                      , ' ) ! ~                                 ",
+"                    { ] ^ / ( _                                 ",
+"                    : < [ } | 1 2                               ",
+"                    3 4 5 6 7 8 9                               ",
+"                  0 a b c d e e f                               ",
+"                  g h i c d e j k l                             ",
+"                  m n o p q r s t u                             ",
+"                  v w x y z A B C _                             ",
+"                  D E F G H I J K L M     N O P Q R             ",
+"                S T U V W X Y Z `  ...+.@.#.$.%.&.*.=.-.        ",
+"                ;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.    ",
+"                5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.    ",
+"                q.r.s.s.c d e e t.u.v.w.x.y.z.A.B.C.D.E.F.G.    ",
+"              H.I.J.K.L.c d e e M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.    ",
+"              M `. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+    ",
+"              /+(+E V _+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+    ",
+"            d+e+E E E E E V f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+    ",
+"        v+w+x+y+z+z+E E E E A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+    ",
+"      M Q+R+S+T+U+V+W+X+E E Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@    ",
+"        ,@'@)@!@~@{@]@^@/@/@(@_@:@<@[@}@|@1@2@3@4@5@~+6@7@8@    ",
+"          M M M M 9@w+0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@      ",
+"            M M M M M M r@s@t@u@u@t@v@w@x@y@z@3@A@B@C@          ",
+"                M M M M M M M M M M M M D@E@F@G@H@I@            ",
+"                        M M M M M M M M     J@K@                ",
+"                                M M                             ",
+"                                                                "};
index 123f59271e40629da5ee4dfc04e26981983b59d7..e7b27e38df7d22c6f52f6b73041b7fa477b158f2 100644 (file)
 /* XPM */
 static char * kvlc_xpm[] = {
-"48 48 295 2",
+"32 32 256 2",
 "      c None",
-".     c #000000",
-"+     c #FF8C00",
-"@     c #FF981E",
-"#     c #FF9F2E",
-"$     c #FFAB4A",
-"%     c #FFBF7B",
-"&     c #FFA946",
-"*     c #FFB056",
-"=     c #FFB766",
-"-     c #FFBE77",
-";     c #FFA741",
-">     c #FFAE51",
-",     c #FFB562",
-"'     c #FFBC72",
-")     c #FFA53C",
-"!     c #FFAC4D",
-"~     c #FFB35D",
-"{     c #FFBA6D",
-"]     c #FF9C27",
-"^     c #FFA338",
-"/     c #FFAA48",
-"(     c #FFB158",
-"_     c #FFB869",
-":     c #FFBF79",
-"<     c #F9A23B",
-"[     c #F9A849",
-"}     c #FDA947",
-"|     c #FFAF54",
-"1     c #FFB664",
-"2     c #FFBD74",
-"3     c #FFC07E",
-"4     c #FFC689",
-"5     c #E2C29C",
-"6     c #E1C6A6",
-"7     c #F3B369",
-"8     c #FAB667",
-"9     c #FCBE77",
-"0     c #FFC688",
-"a     c #FFD09F",
-"b     c #FFE5CB",
-"c     c #DBCCBA",
-"d     c #D7D3CF",
-"e     c #DBCEBF",
-"f     c #E7D9C9",
-"g     c #F3E6D7",
-"h     c #FFF3E6",
-"i     c #FFF5EC",
-"j     c #FFFAF6",
-"k     c #FFECD9",
-"l     c #E1C19A",
-"m     c #D6D6D6",
-"n     c #D6D5D5",
-"o     c #E3E2E2",
-"p     c #F1F0F0",
-"q     c #FFFEFE",
-"r     c #FFF3E8",
-"s     c #DDC9B1",
-"t     c #D6D5D4",
-"u     c #E3E3E3",
-"v     c #F1F1F1",
-"w     c #FFFFFF",
-"x     c #FFF5EB",
-"y     c #E2BF93",
-"z     c #DBCBB8",
-"A     c #D7D4D0",
-"B     c #FFFCFA",
-"C     c #FFE4C7",
-"D     c #F9961E",
-"E     c #F3A240",
-"F     c #E1C3A0",
-"G     c #DDCBB7",
-"H     c #E7D8C6",
-"I     c #F3E5D4",
-"J     c #FFF1E2",
-"K     c #FFF2E5",
-"L     c #FFC78D",
-"M     c #FD8E07",
-"N     c #F99C2C",
-"O     c #F8A340",
-"P     c #FAAC50",
-"Q     c #FCB460",
-"R     c #FFBC70",
-"S     c #FFC27D",
-"T     c #FFC687",
-"U     c #FF910E",
-"V     c #FFA63F",
-"W     c #FFAD4F",
-"X     c #FFB45F",
-"Y     c #FFBB70",
-"Z     c #050505",
-"`     c #FF8F09",
-" .    c #FF9619",
-"..    c #FF9D2A",
-"+.    c #FFA43A",
-"@.    c #FFB25B",
-"#.    c #FFB96B",
-"$.    c #FDFDFD",
-"%.    c #FEFEFE",
-"&.    c #FCFCFC",
-"*.    c #E4E4E4",
-"=.    c #FF8D04",
-"-.    c #FF9415",
-";.    c #FF9B25",
-">.    c #FFA235",
-",.    c #747474",
-"'.    c #DADADA",
-").    c #0B0B0B",
-"!.    c #F9961D",
-"~.    c #FD8E05",
-"{.    c #FF9210",
-"].    c #FF9920",
-"^.    c #FFA031",
-"/.    c #A5A5A5",
-"(.    c #AFAFAE",
-"_.    c #6B6156",
-":.    c #7E7E7E",
-"<.    c #C6C6C6",
-"[.    c #F7F7F7",
-"}.    c #868686",
-"|.    c #E1C199",
-"1.    c #F3A03B",
-"2.    c #F89824",
-"3.    c #FD9110",
-"4.    c #FF971C",
-"5.    c #FF9E2C",
-"6.    c #B6B5B3",
-"7.    c #F4F4F4",
-"8.    c #FAFAFA",
-"9.    c #CACACA",
-"0.    c #505050",
-"a.    c #FBFBFB",
-"b.    c #AAAAAA",
-"c.    c #D7D3CE",
-"d.    c #DBCBB7",
-"e.    c #FAA239",
-"f.    c #FCAA49",
-"g.    c #FFB259",
-"h.    c #FFB866",
-"i.    c #ADADAC",
-"j.    c #EAEAEA",
-"k.    c #4B4B4B",
-"l.    c #919191",
-"m.    c #D7D7D7",
-"n.    c #DCC9B1",
-"o.    c #E7D5BF",
-"p.    c #F3E2CE",
-"q.    c #FFEFDC",
-"r.    c #FFF0DF",
-"s.    c #F7E9DA",
-"t.    c #989898",
-"u.    c #E5E5E5",
-"v.    c #B8B8B8",
-"w.    c #BABABA",
-"x.    c #FEFDFD",
-"y.    c #CCCCCC",
-"z.    c #A6A6A6",
-"A.    c #D0D0D0",
-"B.    c #DEDEDE",
-"C.    c #222222",
-"D.    c #E6B882",
-"E.    c #D8D1C8",
-"F.    c #E6E5E5",
-"G.    c #BBBBBB",
-"H.    c #EEEEEC",
-"I.    c #F5F5F5",
-"J.    c #3E3E3E",
-"K.    c #F49E34",
-"L.    c #FFFCF9",
-"M.    c #E1E1E1",
-"N.    c #A4A09A",
-"O.    c #FEFEFC",
-"P.    c #060606",
-"Q.    c #F89823",
-"R.    c #E7D4BC",
-"S.    c #F3E0CB",
-"T.    c #FAE8D5",
-"U.    c #E8DACA",
-"V.    c #F8F8F6",
-"W.    c #FEFEFA",
-"X.    c #E9E9E9",
-"Y.    c #676767",
-"Z.    c #FA9A26",
-"`.    c #FCA031",
-" +    c #BD915D",
-".+    c #F6F6F6",
-"++    c #A9A9A9",
-"@+    c #C4C4C4",
-"#+    c #FEFEF4",
-"$+    c #FEFEE5",
-"%+    c #E0E0E0",
-"&+    c #E6E6E6",
-"*+    c #8F8F8F",
-"=+    c #FF8E07",
-"-+    c #F2F2F2",
-";+    c #E2E2E2",
-">+    c #BEBEBE",
-",+    c #C8C8C8",
-"'+    c #FEFED9",
-")+    c #FEF3BF",
-"!+    c #C1C1C1",
-"~+    c #B6B6B6",
-"{+    c #7B7B7B",
-"]+    c #FF8C02",
-"^+    c #0F0F0F",
-"/+    c #F0F0F0",
-"(+    c #B7B7B7",
-"_+    c #FEF1B5",
-":+    c #FED99B",
-"<+    c #ACA399",
-"[+    c #F8F8F8",
-"}+    c #F9F9F9",
-"|+    c #7A7A7A",
-"1+    c #C97817",
-"2+    c #8B8B8B",
-"3+    c #8C8C8C",
-"4+    c #CFCFCF",
-"5+    c #FDD794",
-"6+    c #FAC776",
-"7+    c #B47A3F",
-"8+    c #D1D1D1",
-"9+    c #6F6F6F",
-"0+    c #F88B08",
-"a+    c #D47C14",
-"b+    c #5F5F5F",
-"c+    c #DBDBDB",
-"d+    c #E1B776",
-"e+    c #E7B365",
-"f+    c #BE8446",
-"g+    c #AB753C",
-"h+    c #EDEDED",
-"i+    c #595959",
-"j+    c #FA9114",
-"k+    c #EF9122",
-"l+    c #CE822A",
-"m+    c #ACACAC",
-"n+    c #C2C2C2",
-"o+    c #E4AC61",
-"p+    c #BA8346",
-"q+    c #C38B4A",
-"r+    c #7F7F7F",
-"s+    c #FE981F",
-"t+    c #FA9C30",
-"u+    c #E1943A",
-"v+    c #C7A376",
-"w+    c #B87F41",
-"x+    c #B7864C",
-"y+    c #A4A4A4",
-"z+    c #F3F3F3",
-"A+    c #C0C0C0",
-"B+    c #A1A1A1",
-"C+    c #996D42",
-"D+    c #D9D8D7",
-"E+    c #929292",
-"F+    c #D5D5D5",
-"G+    c #9D9D9D",
-"H+    c #F58802",
-"I+    c #BDA38B",
-"J+    c #AF8055",
-"K+    c #B58251",
-"L+    c #BF966B",
-"M+    c #DAC5AF",
-"N+    c #CDCDCD",
-"O+    c #636363",
-"P+    c #777777",
-"Q+    c #D4D4D4",
-"R+    c #CECECE",
-"S+    c #707070",
-"T+    c #AFAFAF",
-"U+    c #A3A3A3",
-"V+    c #C5C5C5",
-"W+    c #ADADAD",
-"X+    c #6D655C",
-"Y+    c #B9B9B9",
-"Z+    c #C3C3C3",
-"`+    c #313131",
-" @    c #656565",
-".@    c #8D8D8D",
-"+@    c #8E8E8E",
-"@@    c #797979",
-"#@    c #080808",
-"$@    c #C7C7C7",
-"%@    c #717171",
-"&@    c #0E0E0E",
-"*@    c #515151",
-"=@    c #343434",
-"-@    c #A8A8A8",
-";@    c #727272",
-">@    c #010101",
-",@    c #070707",
-"'@    c #040404",
-")@    c #8A8A8A",
-"!@    c #B2B2B2",
-"~@    c #2E2E2E",
-"{@    c #333333",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                    . . . .                                                     ",
-"                                  . + @ # # .                                                   ",
-"                                . . + @ # . .                                                   ",
-"                                . $ . . . % .                                                   ",
-"                                . & * = - % % .                                                 ",
-"                                . ; > , ' % % .                                                 ",
-"                                . ) ! ~ { % % .                                                 ",
-"                              . ] ^ / ( _ : % % .                                               ",
-"                              . < [ } | 1 2 3 4 .                                               ",
-"                              . 5 6 7 8 9 0 a b .                                               ",
-"                              . c d e f g h i j k .                                             ",
-"                            . l d m n o p q q q r .                                             ",
-"                            . s t m m u v w w q x .                                             ",
-"                            . y z A n o p q q B r C .                                           ",
-"                            . D E F G H I J K k a L .                                           ",
-"                          . + + M N O P Q R S T 3 % .                                           ",
-"                          . + + + U @ # V W X Y % % % .     . . . . . .           Z .           ",
-"                          . + + + `  ...+.$ @.#.% % % .     . $.%.&.%..         . v *.. .       ",
-"                          . + + + =.-.;.>.& * = - . . .     . %.%.%.%..     ,.. '.%.%.%.'.. ).  ",
-"                        . !.!.~.+ + {.].^.; > , . /.(._..   . %.%.%.%.. . :.. <.$.%.%.[.}..     ",
-"                        . y |.1.2.!.3.4.5.) ! . 6.7.8.9.. . . %.%.%.%.. 0.. . a.%.%.&.b..       ",
-"                        . s c.d.s |.E e.f.g.h.. i.a.%.j.k.j.. %.%.%.%.. l.. v %.%.$.m.. .       ",
-"                        . n.n n n d z o.p.q.r.s.. t.u.v.'.w.. %.%.%.%.. . u %.%.&.m.. .         ",
-"                        . d.n m m m n o p q q x.p . . y.z.. . %.%.%.%.. A.$.%.%.B.. C.          ",
-"                      . D.E.n n n m m u v w w w %.F.. G.. H.. %.%.%.%.A.$.%.%.I.. J..           ",
-"                      . K.|.s n.d.d n o p q q q L.. M.N.. O.. %.%.%.%.%.%.%.%.v . . P.          ",
-"                      . ~.!.Q.2.1.|.s R.S.T.U.. . . y.. V.W.. %.%.%.%.X.%.%.%.a.. Y.. .         ",
-"                      . + + + + ~.!.Q.Z.`. +. '..+++@+. #+$+. %.%.%.%.. %+%.%.%.&+. *+A.. .     ",
-"                    . + + + + + + + + + =+. -+I.;+>+,+. '+)+. %.%.%.%.. . &+%.%.&.!+. z.~+{+.   ",
-"                  . . + + + + + + + + + ]+^+%+/+&+(+<.. _+:+. %.%.%.%.. . <+[+%.%.}+/.. ++|+.   ",
-"              . . + . + + + + + + + + + + 1+. 2+>+3+4+. 5+6+. %.%.%.%.. 7+. 8+%.%.%.I.9+. . .   ",
-"            . + + + . + + + + + + + + + + 0+a+. . b+c+. d+e+. %.%.%.%.. f+g+. h+%.%.%.j.i+.     ",
-"          . + + + + + + + . + + + + + + + =.j+k+l+. m+n+. o+. %.%.%.%.. p+q+. r+v %.%.%.>+.     ",
-"          . . + + + + + + + . . . + + + + + {.s+t+u+. 8+. v+. %.%.%.%.. w+x+. . y+%.%.z+. ^+    ",
-"              . . . . + + + + + + . . . . . . . . . A+B+c+. . . . . . . C+. D+E+. F+G+. .       ",
-"                      . . . + + + + + + + + + H+. &.X.b.t.*.. I+J+K+L+M+. N+z.O+P+. . P.        ",
-"                            . . . . + + + + + . ,+&+Q+R+S+. T+. . . . . U+. . <.V+W+B+.         ",
-"                                    . . . . + . X+Y+Z+|+. `+.  @.@+@.@@@. . #@. $@Y+%@.         ",
-"                                            . . &@*@=@. .     . G.y+-@;@.     #@. . . .         ",
-"                                                . . . .       . T+A.w.. >@        ,@'@          ",
-"                                                              . )@,+!@.                         ",
-"                                                                . . . ~@                        ",
-"                                                                  '@{@                          ",
-"                                                                                                "};
+".     c #AA6007",
+"+     c #AA681B",
+"@     c #804F17",
+"#     c #392610",
+"$     c #392A1B",
+"%     c #AA7130",
+"&     c #AA773D",
+"*     c #AA7D4C",
+"=     c #E3AA6D",
+"-     c #493723",
+";     c #AA6F2A",
+">     c #FFB055",
+",     c #FFB96B",
+"'     c #FFBF7B",
+")     c #554029",
+"!     c #492D0B",
+"~     c #E3902F",
+"{     c #FFAD4F",
+"]     c #FFB665",
+"^     c #FFBF7A",
+"/     c #C69560",
+"(     c #503A1E",
+"_     c #F1B064",
+":     c #FBAE55",
+"<     c #FEB665",
+"[     c #FFC27F",
+"}     c #FFCD98",
+"|     c #000000",
+"1     c #4A433B",
+"2     c #DBCDBC",
+"3     c #E6C8A4",
+"4     c #F3D5B2",
+"5     c #FFE6CB",
+"6     c #FFF0E1",
+"7     c #80766C",
+"8     c #DDC9B1",
+"9     c #D6D5D4",
+"0     c #DADADA",
+"a     c #ECECEC",
+"b     c #FFFEFE",
+"c     c #AAA29B",
+"d     c #DEC6A9",
+"e     c #D8D3CC",
+"f     c #FFFDFC",
+"g     c #E3D5C8",
+"h     c #494139",
+"i     c #492800",
+"j     c #F9961C",
+"k     c #EDAD60",
+"l     c #E8C294",
+"m     c #F3D1A8",
+"n     c #FFE0BE",
+"o     c #FFE0BF",
+"p     c #FFC990",
+"q     c #55412D",
+"r     c #AA5D00",
+"s     c #FF8C01",
+"t     c #FD9211",
+"u     c #FD9E2F",
+"v     c #FEA844",
+"w     c #FFB45F",
+"x     c #FFBD73",
+"y     c #FFBF7C",
+"z     c #FF8C00",
+"A     c #FF8E05",
+"B     c #FF981D",
+"C     c #FFA133",
+"D     c #FFAD4E",
+"E     c #FFB664",
+"F     c #E3AA6C",
+"G     c #AA7F52",
+"H     c #545454",
+"I     c #FEFEFE",
+"J     c #FDFDFD",
+"K     c #555555",
+"L     c #2C2C2C",
+"M     c #BCBCBC",
+"N     c #BABABA",
+"O     c #4D4D4D",
+"P     c #472B08",
+"Q     c #DF8313",
+"R     c #FE8D02",
+"S     c #FF9517",
+"T     c #FF9E2D",
+"U     c #FFAA48",
+"V     c #FFB35E",
+"W     c #5D4F3F",
+"X     c #727272",
+"Y     c #35312B",
+"Z     c #2A2A2A",
+"`     c #3C3C3C",
+" .    c #A8A8A8",
+"..    c #FAFAFA",
+"+.    c #FCFCFC",
+"@.    c #BFBFBF",
+"#.    c #020202",
+"$.    c #4B4134",
+"%.    c #DFC5A6",
+"&.    c #ECAC5F",
+"*.    c #F0A64B",
+"=.    c #FB9822",
+"-.    c #FEA030",
+";.    c #FFAC4B",
+">.    c #553B1C",
+",.    c #C9C9C8",
+"'.    c #969696",
+").    c #444444",
+"!.    c #363636",
+"~.    c #C6C6C6",
+"{.    c #262626",
+"].    c #49433B",
+"^.    c #D8D1C7",
+"/.    c #D8D1CA",
+"(.    c #DACEC1",
+"_.    c #E6C091",
+":.    c #F3CC9D",
+"<.    c #FFDCB2",
+"[.    c #C3B19E",
+"}.    c #646464",
+"|.    c #DCDCDC",
+"1.    c #535353",
+"2.    c #D9D9D9",
+"3.    c #303030",
+"4.    c #7C6D5C",
+"5.    c #D7D2CD",
+"6.    c #D6D6D6",
+"7.    c #BDBDBD",
+"8.    c #1A1919",
+"9.    c #A9A9A9",
+"0.    c #5A5A59",
+"a.    c #838383",
+"b.    c #E9E9E9",
+"c.    c #3F3F3F",
+"d.    c #171717",
+"e.    c #EAB16C",
+"f.    c #DCCBB6",
+"g.    c #DACDBE",
+"h.    c #D8D2CC",
+"i.    c #C3C2C1",
+"j.    c #7E7D7D",
+"k.    c #72716E",
+"l.    c #A6A6A4",
+"m.    c #F4F4F4",
+"n.    c #A2A2A2",
+"o.    c #0E0E0E",
+"p.    c #040404",
+"q.    c #FD8F09",
+"r.    c #FB9416",
+"s.    c #F9961E",
+"t.    c #EDAA58",
+"u.    c #E8BB84",
+"v.    c #F3C793",
+"w.    c #CDB8A0",
+"x.    c #64615D",
+"y.    c #494949",
+"z.    c #999999",
+"A.    c #535352",
+"B.    c #FDFDF4",
+"C.    c #F7F7F7",
+"D.    c #C2C2C2",
+"E.    c #474747",
+"F.    c #373737",
+"G.    c #804600",
+"H.    c #FD8E07",
+"I.    c #FD900C",
+"J.    c #FE9312",
+"K.    c #60564A",
+"L.    c #D3D3D3",
+"M.    c #D8D8D8",
+"N.    c #C1C1C1",
+"O.    c #55554B",
+"P.    c #FEF9D3",
+"Q.    c #818181",
+"R.    c #F9F9F9",
+"S.    c #FBFBFB",
+"T.    c #A7A7A7",
+"U.    c #5C5C5C",
+"V.    c #8D8D8D",
+"W.    c #3E3E3E",
+"X.    c #391F00",
+"Y.    c #65533E",
+"Z.    c #BBBBBB",
+"`.    c #C9C9C9",
+" +    c #BEBEBE",
+".+    c #554D39",
+"++    c #FDDA98",
+"@+    c #4E3F30",
+"#+    c #C3C1BF",
+"$+    c #8C8C8C",
+"%+    c #575757",
+"&+    c #CA740D",
+"*+    c #4E3A23",
+"=+    c #4F4F4F",
+"-+    c #B4B4B4",
+";+    c #4E412B",
+">+    c #ECBC72",
+",+    c #A2703A",
+"'+    c #54483C",
+")+    c #F6F6F6",
+"!+    c #E8E8E8",
+"~+    c #686868",
+"{+    c #C66D00",
+"]+    c #8E4E00",
+"^+    c #E37C00",
+"/+    c #FE8E08",
+"(+    c #F7931C",
+"_+    c #AC6D24",
+":+    c #655D53",
+"<+    c #858585",
+"[+    c #927145",
+"}+    c #BB8446",
+"|+    c #402E19",
+"1+    c #808080",
+"2+    c #F1F1F1",
+"3+    c #050505",
+"4+    c #331C00",
+"5+    c #552F00",
+"6+    c #713E00",
+"7+    c #552F02",
+"8+    c #553209",
+"9+    c #513311",
+"0+    c #6E665C",
+"a+    c #5D554B",
+"b+    c #1C1C1C",
+"c+    c #815C34",
+"d+    c #756F68",
+"e+    c #1B1B1B",
+"f+    c #C26B01",
+"g+    c #7E7E7E",
+"h+    c #949494",
+"i+    c #514B46",
+"j+    c #785D45",
+"k+    c #7B5B3C",
+"l+    c #8B7966",
+"m+    c #525252",
+"n+    c #777777",
+"o+    c #888888",
+"p+    c #252525",
+"q+    c #A09C98",
+"r+    c #C8C8C8",
+"s+    c #707070",
+"t+    c #222222",
+"u+    c #3D3D3D",
+"v+    c #5E5E5E",
+"w+    c #242424",
+"x+    c #6E6E6E",
+"y+    c #565656",
+"z+    c #181818",
+"A+    c #292929",
+"B+    c #7A7A7A",
+"C+    c #B1B1B1",
+"D+    c #6D6D6D",
+"E+    c #010101",
+"F+    c #C3C3C3",
+"G+    c #070707",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                        . + @                                   ",
+"                      # . + $                                   ",
+"                      % & * = -                                 ",
+"                      ; > , ' )                                 ",
+"                    ! ~ { ] ^ /                                 ",
+"                    ( _ : < [ } |                               ",
+"                    1 2 3 4 5 6 7                               ",
+"                  | 8 9 0 a b b c                               ",
+"                  | d e 0 a b f g h                             ",
+"                  i j k l m n o p q                             ",
+"                  r s t u v w x y /     | | | |                 ",
+"                  r z A B C D E F G |   H I J K     L M N O     ",
+"                P Q R s S T U V W X Y   K I I K Z `  ...+.@.#.  ",
+"                $.%.&.*.=.-.;.>.,...'.` K I I K ).!.J I ~.{.    ",
+"                ].^./.(._.:.<.[.}.|.@.@.K I I K 1.2.I a 3.|     ",
+"                4.5.6.6.0 a b b 7.8.9.0.K I I a.b.I 2.c.d.      ",
+"              | e.f.g.h.0 a b b i.j.k.l.K I I m.I I n.o.p.      ",
+"              | q.r.s.t.u.v.w.x.y.z.A.B.K I I M C.I D.E.F.Z     ",
+"              G.z z s H.I.J.K.L.M.N.O.P.K I I K Q.R.S.T.U.V.W.  ",
+"            X.r z z z z z s Y.Z.`. +.+++K I I K @+#+I +.$+%+!.  ",
+"        i r r r z z z z z z &+*+=+-+;+>+K I I K ,+'+)+I !+~+|   ",
+"      | {+z z z {+]+r ^+z z /+(+_+:+<+[+K I I K }+|+1+2+J  .3+  ",
+"        4+5+5+{+z {+r 6+5+5+7+8+9+0+T.a+b+K K b+c+d+1.9.z.e+    ",
+"                | G.r r z z z f+g+!+ .h+i+j+k+l+m+n+o+%+p+      ",
+"                        5+5+]+5+q+r+s+t+u+K v+K w+p.x+Z.y+      ",
+"                              | z+A+|     B+C+D+|   3+#.E+      ",
+"                                          }.F+`                 ",
+"                                            G+t+                ",
+"                                                                "};
index cac0de250ff3e7274fd02302c4845d8f0818e429..f7b7d7707d4b898b7faab958270a252b59be581a 100644 (file)
 /* XPM */
 static char * qvlc_xpm[] = {
-"48 48 147 2",
+"32 32 156 2",
 "      c None",
-".     c #000000",
-"+     c #FF8C00",
-"@     c #FF981E",
-"#     c #FF9F2E",
-"$     c #FFAB4A",
-"%     c #FFBF7B",
-"&     c #FFA946",
-"*     c #FFB056",
-"=     c #FFB766",
-"-     c #FFBE77",
-";     c #FFA741",
-">     c #FFAE51",
-",     c #FFB562",
-"'     c #FFBC72",
-")     c #FFA53C",
-"!     c #FFAC4D",
-"~     c #FFB35D",
-"{     c #FFBA6D",
-"]     c #FF9C27",
-"^     c #FFA338",
-"/     c #FFAA48",
-"(     c #FFB158",
-"_     c #FFB869",
-":     c #FFBF79",
-"<     c #F9A23B",
-"[     c #F9A849",
-"}     c #FDA947",
-"|     c #FFAF54",
-"1     c #FFB664",
-"2     c #FFBD74",
-"3     c #FFC07E",
-"4     c #FFC689",
-"5     c #E2C29C",
-"6     c #E1C6A6",
-"7     c #F3B369",
-"8     c #FAB667",
-"9     c #FCBE77",
-"0     c #FFC688",
-"a     c #FFD09F",
-"b     c #FFE5CB",
-"c     c #DBCCBA",
-"d     c #D7D3CF",
-"e     c #DBCEBF",
-"f     c #E7D9C9",
-"g     c #F3E6D7",
-"h     c #FFF3E6",
-"i     c #FFF5EC",
-"j     c #FFFAF6",
-"k     c #FFECD9",
-"l     c #E1C19A",
-"m     c #D6D6D6",
-"n     c #D6D5D5",
-"o     c #E3E2E2",
-"p     c #F1F0F0",
-"q     c #FFFEFE",
-"r     c #FFF3E8",
-"s     c #DDC9B1",
-"t     c #D6D5D4",
-"u     c #E3E3E3",
-"v     c #F1F1F1",
-"w     c #FFFFFF",
-"x     c #FFF5EB",
-"y     c #E2BF93",
-"z     c #DBCBB8",
-"A     c #D7D4D0",
-"B     c #FFFCFA",
-"C     c #FFE4C7",
-"D     c #F9961E",
-"E     c #F3A240",
-"F     c #E1C3A0",
-"G     c #DDCBB7",
-"H     c #E7D8C6",
-"I     c #F3E5D4",
-"J     c #FFF1E2",
-"K     c #FFF2E5",
-"L     c #FFC78D",
-"M     c #FD8E07",
-"N     c #F99C2C",
-"O     c #F8A340",
-"P     c #FAAC50",
-"Q     c #FCB460",
-"R     c #FFBC70",
-"S     c #FFC27D",
-"T     c #FFC687",
-"U     c #FF910E",
-"V     c #FFA63F",
-"W     c #FFAD4F",
-"X     c #FFB45F",
-"Y     c #FFBB70",
-"Z     c #FF8F09",
-"`     c #FF9619",
-" .    c #FF9D2A",
-"..    c #FFA43A",
-"+.    c #FFB25B",
-"@.    c #FFB96B",
-"#.    c #FF8D04",
-"$.    c #FF9415",
-"%.    c #FF9B25",
-"&.    c #FFA235",
-"*.    c #F9961D",
-"=.    c #FD8E05",
-"-.    c #FF9210",
-";.    c #FF9920",
-">.    c #FFA031",
-",.    c #0000D2",
-"'.    c #E1C199",
-").    c #F3A03B",
-"!.    c #F89824",
-"~.    c #FD9110",
-"{.    c #FF971C",
-"].    c #FF9E2C",
-"^.    c #FFBB71",
-"/.    c #FFC88D",
-"(.    c #0101D2",
-"_.    c #D7D3CE",
-":.    c #DBCBB7",
-"<.    c #FAA239",
-"[.    c #FCAA49",
-"}.    c #FFB259",
-"|.    c #FFB866",
-"1.    c #FFBE74",
-"2.    c #FFCB92",
-"3.    c #DCC9B1",
-"4.    c #E7D5BF",
-"5.    c #F3E2CE",
-"6.    c #FFEFDC",
-"7.    c #FFF0DF",
-"8.    c #E6B882",
-"9.    c #D8D1C8",
-"0.    c #0606D3",
-"a.    c #0C0CD4",
-"b.    c #F49E34",
-"c.    c #F89823",
-"d.    c #E7D4BC",
-"e.    c #F3E0CB",
-"f.    c #FFEDD9",
-"g.    c #FFEEDC",
-"h.    c #FA9A26",
-"i.    c #FCA031",
-"j.    c #FFA842",
-"k.    c #FFAE4F",
-"l.    c #FF8E07",
-"m.    c #FF9517",
-"n.    c #FF8C02",
-"o.    c #FF9312",
-"p.    c #FF9A23",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                    . . . .                                                     ",
-"                                  . + @ # # .                                                   ",
-"                                . . + @ # . .                                                   ",
-"                                . $ . . . % .                                                   ",
-"                                . & * = - % % .                                                 ",
-"                                . ; > , ' % % .                                                 ",
-"                                . ) ! ~ { % % .                                                 ",
-"                              . ] ^ / ( _ : % % .                                               ",
-"                              . < [ } | 1 2 3 4 .                                               ",
-"                              . 5 6 7 8 9 0 a b .                                               ",
-"                              . c d e f g h i j k .                                             ",
-"                            . l d m n o p q q q r .                                             ",
-"                            . s t m m u v w w q x .                                             ",
-"                            . y z A n o p q q B r C .                                           ",
-"                            . D E F G H I J K k a L .                                           ",
-"                          . + + M N O P Q R S T 3 % .                                           ",
-"                          . + + + U @ # V W X Y % % % .                                         ",
-"                          . + + + Z `  ...$ +.@.% % % .                                         ",
-"                          . + + + #.$.%.&.& * = - % % .   . . . . . . . .                       ",
-"                        . *.*.=.+ + -.;.>.; > , ' % 3 . . ,.,.,.,.,.,.,.,.. .                   ",
-"                        . y '.).!.*.~.{.].) ! ~ ^./.. ,.,.,.,.,.,.,.,.,.,.,.(..                 ",
-"                        . s _.:.s '.E <.[.}.|.1.2.. ,.,.,.(.,.,.,.,.,.,.,.,.,.,..               ",
-"                        . 3.n n n d z 4.5.6.7.J . ,.,.,.,.,.. . . . . . ,.,.,.,.,..             ",
-"                        . :.n m m m n o p q q q . ,.,.,.. .       .     . . ,.,.,..             ",
-"                      . 8.9.n n n m m u v w w . ,.,.0.,.. C .   . ,..     . ,.,.,.a..           ",
-"                      . b.'.s 3.:.d n o p q q . ,.,.,.. a L . . ,.,.,..     . ,.,.,..           ",
-"                      . =.*.c.!.).'.s d.e.f.g.. ,.,.,.. 3 % . ,.,.,.,.,..   . ,.,.,..           ",
-"                      . + + + + =.*.c.h.i.j.k.. ,.,.,.. % . ,.,.,.,.,..     . ,.,.,..           ",
-"                    . + + + + + + + + + l.m.] . ,.,.,.. . ,.,.,.,.,.,.,..   . ,.,.,..           ",
-"                  . . + + + + + + + + + n.o.p.. ,.,.,.. % . ,.,.,.,.,.,.,.. ,.,.,.,..           ",
-"              . . + . + + + + + + + + + + U @ . ,.,.,.. % % . ,.. ,.,.,.,.,.,.,.,.,..           ",
-"            . + + + . + + + + + + + + + + Z ` . ,.,.,.,.. % X . . . ,.,.,.,.,.,.,..             ",
-"          . + + + + + + + . + + + + + + + #.$.%.. ,.,.,.. . + + + + . ,.,.,.,.,..               ",
-"          . . + + + + + + + . . . + + + + + -.;.. ,.,.,.,.,.. . . . ,.,.,.,.,.,.,..             ",
-"              . . . . + + + + + + . . . . . . . . . ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,..           ",
-"                      . . . + + + + + + + + + + + + . ,.,.,.,.,.,.,.,.,.,.. ,.,.,.,.,..         ",
-"                            . . . . + + + + + + + + + . . ,.,.,.,.,.,.,..   . ,.,.,..           ",
-"                                    . . . . + + + + . .   . . . . . . .       . ,..             ",
-"                                            . . . .                             .               ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                "};
+".     c #AA6007",
+"+     c #AA681B",
+"@     c #804F17",
+"#     c #392610",
+"$     c #392A1B",
+"%     c #AA7130",
+"&     c #AA773D",
+"*     c #AA7D4C",
+"=     c #E3AA6D",
+"-     c #493723",
+";     c #AA6F2A",
+">     c #FFB055",
+",     c #FFB96B",
+"'     c #FFBF7B",
+")     c #554029",
+"!     c #492D0B",
+"~     c #E3902F",
+"{     c #FFAD4F",
+"]     c #FFB665",
+"^     c #FFBF7A",
+"/     c #C69560",
+"(     c #503A1E",
+"_     c #F1B064",
+":     c #FBAE55",
+"<     c #FEB665",
+"[     c #FFC27F",
+"}     c #FFCD98",
+"|     c #000000",
+"1     c #4A433B",
+"2     c #DBCDBC",
+"3     c #E6C8A4",
+"4     c #F3D5B2",
+"5     c #FFE6CB",
+"6     c #FFF0E1",
+"7     c #80766C",
+"8     c #DDC9B1",
+"9     c #D6D5D4",
+"0     c #DADADA",
+"a     c #ECECEC",
+"b     c #FFFEFE",
+"c     c #AAA29B",
+"d     c #DEC6A9",
+"e     c #D8D3CC",
+"f     c #FFFDFC",
+"g     c #E3D5C8",
+"h     c #494139",
+"i     c #492800",
+"j     c #F9961C",
+"k     c #EDAD60",
+"l     c #E8C294",
+"m     c #F3D1A8",
+"n     c #FFE0BE",
+"o     c #FFE0BF",
+"p     c #FFC990",
+"q     c #55412D",
+"r     c #AA5D00",
+"s     c #FF8C01",
+"t     c #FD9211",
+"u     c #FD9E2F",
+"v     c #FEA844",
+"w     c #FFB45F",
+"x     c #FFBD73",
+"y     c #FFBF7C",
+"z     c #FF8C00",
+"A     c #FF8E05",
+"B     c #FF981D",
+"C     c #FFA133",
+"D     c #FFAD4E",
+"E     c #FFB664",
+"F     c #472B08",
+"G     c #DF8313",
+"H     c #FE8D02",
+"I     c #FF9517",
+"J     c #FF9E2D",
+"K     c #FFAA48",
+"L     c #FFB35E",
+"M     c #FFBD76",
+"N     c #000069",
+"O     c #00008C",
+"P     c #4B4134",
+"Q     c #DFC5A6",
+"R     c #ECAC5F",
+"S     c #F0A64B",
+"T     c #FB9822",
+"U     c #FEA030",
+"V     c #FFAC4B",
+"W     c #FFB460",
+"X     c #E3AD72",
+"Y     c #392C4E",
+"Z     c #0000D2",
+"`     c #00003C",
+" .    c #49433B",
+"..    c #D8D1C7",
+"+.    c #D8D1CA",
+"@.    c #DACEC1",
+"#.    c #E6C091",
+"$.    c #F3CC9D",
+"%.    c #FFDCB2",
+"&.    c #FFDFBB",
+"*.    c #392D4F",
+"=.    c #0000BB",
+"-.    c #000046",
+";.    c #7C6D5C",
+">.    c #D7D2CD",
+",.    c #D6D6D6",
+"'.    c #C6C6C6",
+").    c #000075",
+"!.    c #0101D2",
+"~.    c #39332C",
+"{.    c #030375",
+"].    c #EAB16C",
+"^.    c #DCCBB6",
+"/.    c #DACDBE",
+"(.    c #D8D2CC",
+"_.    c #555555",
+":.    c #392E52",
+"<.    c #E3B98E",
+"[.    c #0303D2",
+"}.    c #FD8F09",
+"|.    c #FB9416",
+"1.    c #F9961E",
+"2.    c #EDAA58",
+"3.    c #E8BB84",
+"4.    c #F3C793",
+"5.    c #FFD7A9",
+"6.    c #55483A",
+"7.    c #55402A",
+"8.    c #0000A3",
+"9.    c #804600",
+"0.    c #FD8E07",
+"a.    c #FD900C",
+"b.    c #FE9312",
+"c.    c #FF9E2A",
+"d.    c #553611",
+"e.    c #1C150E",
+"f.    c #1C156B",
+"g.    c #391F00",
+"h.    c #FF9516",
+"i.    c #55330B",
+"j.    c #8E6A44",
+"k.    c #FF9210",
+"l.    c #553209",
+"m.    c #715042",
+"n.    c #000017",
+"o.    c #C66D00",
+"p.    c #8E4E00",
+"q.    c #E37C00",
+"r.    c #FF8F08",
+"s.    c #FF981E",
+"t.    c #713E17",
+"u.    c #00002A",
+"v.    c #331C00",
+"w.    c #552F00",
+"x.    c #713E00",
+"y.    c #552F02",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                        . + @                                   ",
+"                      # . + $                                   ",
+"                      % & * = -                                 ",
+"                      ; > , ' )                                 ",
+"                    ! ~ { ] ^ /                                 ",
+"                    ( _ : < [ } |                               ",
+"                    1 2 3 4 5 6 7                               ",
+"                  | 8 9 0 a b b c                               ",
+"                  | d e 0 a b f g h                             ",
+"                  i j k l m n o p q                             ",
+"                  r s t u v w x y /                             ",
+"                  r z A B C D E ^ ' |                           ",
+"                F G H s I J K L M y | N O O O O N |             ",
+"                P Q R S T U V W X Y Z Z Z Z Z Z Z Z `           ",
+"                 ...+.@.#.$.%.&.*.=.Z Z -.-.-.-.Z Z =.`         ",
+"                ;.>.,.,.0 a b '.).!.O ~.    `   | O Z {.        ",
+"              | ].^./.(.0 a b _.Z !.:.<.| N =.`   ` Z [.|       ",
+"              | }.|.1.2.3.4.5.6.Z Z 7./ ).Z Z 8.  | Z Z |       ",
+"              9.z z s 0.a.b.c.d.Z Z e.f.Z Z Z 8.  | Z Z |       ",
+"            g.r z z z z z s h.i.Z Z ) j.8.8.Z Z 8.8.Z Z |       ",
+"        i r r r z z z z z z k.l.Z Z f./ m.n.).Z Z Z Z ).        ",
+"      | o.z z z o.p.r q.z z r.s.-.Z 8.-.r r t.8.Z Z 8.u.        ",
+"        v.w.w.o.z o.r x.w.w.y.l.n.8.Z Z O O 8.Z Z Z Z 8.        ",
+"                | 9.r r z z z z z p.O =.Z Z Z Z N N Z Z N       ",
+"                        w.w.p.z z p.| ` -.-.-.-.    ).).        ",
+"                              | |                               ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
index 86187b11e971dce3f53666f151e8a29e7c8f055e..438600837c78cdd006b038be7266d7033ec85ea0 100644 (file)
 /* XPM */
 static char * vlc_xpm[] = {
-"48 48 243 2",
+"32 32 228 2",
 "      c None",
-".     c #000000",
-"+     c #C76D00",
-"@     c #DD831A",
-"#     c #D78626",
-"$     c #B16E1F",
-"%     c #C66C00",
-"&     c #CC7F24",
-"*     c #B07633",
-"=     c #B68857",
-"-     c #D88F3B",
-";     c #E39C4C",
-">     c #DE9F58",
-",     c #E3A969",
-"'     c #F4B675",
-")     c #CD9962",
-"!     c #DD9038",
-"~     c #FFAE51",
-"{     c #FFB562",
-"]     c #FFBC72",
-"^     c #FFBF7B",
-"/     c #DDA56A",
-"(     c #E39235",
-"_     c #FFAC4D",
-":     c #FFB35D",
-"<     c #FFBA6D",
-"[     c #E3AA6D",
-"}     c #CD7D1F",
-"|     c #F99F36",
-"1     c #FFAA48",
-"2     c #FFB158",
-"3     c #FFB869",
-"4     c #FFBF79",
-"5     c #F9BA78",
-"6     c #040404",
-"7     c #D78C33",
-"8     c #F9A849",
-"9     c #FDA947",
-"0     c #FFAF54",
-"a     c #FFB664",
-"b     c #FFBD74",
-"c     c #FFC07E",
-"d     c #DDAB76",
-"e     c #050505",
-"f     c #181818",
-"g     c #C3A887",
-"h     c #E1C6A6",
-"i     c #F3B369",
-"j     c #FAB667",
-"k     c #FCBE77",
-"l     c #FFC688",
-"m     c #FFD09F",
-"n     c #E3CBB4",
-"o     c #393939",
-"p     c #343434",
-"q     c #C2B5A5",
-"r     c #D7D3CF",
-"s     c #DBCEBF",
-"t     c #E7D9C9",
-"u     c #F3E6D7",
-"v     c #FFF3E6",
-"w     c #FFF5EC",
-"x     c #F9F4F0",
-"y     c #CDBDAE",
-"z     c #232323",
-"A     c #1D1D1D",
-"B     c #B49B7B",
-"C     c #D1CECA",
-"D     c #D6D6D6",
-"E     c #D6D5D5",
-"F     c #E3E2E2",
-"G     c #F1F0F0",
-"H     c #FFFEFE",
-"I     c #DDD2C9",
-"J     c #212121",
-"K     c #1B1B1B",
-"L     c #BFAE99",
-"M     c #D6D5D4",
-"N     c #E3E3E3",
-"O     c #F1F1F1",
-"P     c #FFFFFF",
-"Q     c #E3DAD1",
-"R     c #3E3E3E",
-"S     c #C3A57F",
-"T     c #DBCBB8",
-"U     c #D7D4D0",
-"V     c #FFFCFA",
-"W     c #F9EDE2",
-"X     c #CDB79F",
-"Y     c #1C1C1C",
-"Z     c #070707",
-"`     c #DD851A",
-" .    c #F3A240",
-"..    c #E1C3A0",
-"+.    c #DDCBB7",
-"@.    c #E7D8C6",
-"#.    c #F3E5D4",
-"$.    c #FFF1E2",
-"%.    c #FFF2E5",
-"&.    c #FFECD9",
-"*.    c #DDAC7A",
-"=.    c #CD7000",
-"-.    c #F98800",
-";.    c #FD8E07",
-">.    c #F99C2C",
-",.    c #F8A340",
-"'.    c #FAAC50",
-").    c #FCB460",
-"!.    c #FFBC70",
-"~.    c #FFC27D",
-"{.    c #FFC687",
-"].    c #DD7900",
-"^.    c #FF8C00",
-"/.    c #FF910E",
-"(.    c #FF981E",
-"_.    c #FF9F2E",
-":.    c #FFA63F",
-"<.    c #FFAD4F",
-"[.    c #FFB45F",
-"}.    c #FFBB70",
-"|.    c #FF8F09",
-"1.    c #FF9619",
-"2.    c #FF9D2A",
-"3.    c #FFA43A",
-"4.    c #FFAB4A",
-"5.    c #FFB25B",
-"6.    c #FFB96B",
-"7.    c #E37C00",
-"8.    c #FF8D04",
-"9.    c #FF9415",
-"0.    c #FF9B25",
-"a.    c #FFA235",
-"b.    c #FFA946",
-"c.    c #FFB056",
-"d.    c #FFB766",
-"e.    c #FFBE77",
-"f.    c #C87817",
-"g.    c #F3921C",
-"h.    c #FD8E05",
-"i.    c #FF9210",
-"j.    c #FF9920",
-"k.    c #FFA031",
-"l.    c #FFA741",
-"m.    c #F9BB7B",
-"n.    c #CD9F6E",
-"o.    c #080808",
-"p.    c #E1C199",
-"q.    c #F3A03B",
-"r.    c #F89824",
-"s.    c #F9961D",
-"t.    c #FD9110",
-"u.    c #FF971C",
-"v.    c #FF9E2C",
-"w.    c #FFA53C",
-"x.    c #FFBB71",
-"y.    c #FFC88D",
-"z.    c #D7D3CE",
-"A.    c #DBCBB7",
-"B.    c #DDC9B1",
-"C.    c #FAA239",
-"D.    c #FCAA49",
-"E.    c #FFB259",
-"F.    c #FFB866",
-"G.    c #FFBE74",
-"H.    c #FFCB92",
-"I.    c #FFF5EB",
-"J.    c #BEAE99",
-"K.    c #E7D5BF",
-"L.    c #F3E2CE",
-"M.    c #FFEFDC",
-"N.    c #FFF0DF",
-"O.    c #FFF4E9",
-"P.    c #C2B4A2",
-"Q.    c #B89368",
-"R.    c #D2CCC3",
-"S.    c #D3882D",
-"T.    c #DCC9B1",
-"U.    c #FFFCF9",
-"V.    c #FFF3E7",
-"W.    c #DB7B04",
-"X.    c #F89823",
-"Y.    c #E7D4BC",
-"Z.    c #F3E0CB",
-"`.    c #FFEDD9",
-" +    c #FFEEDC",
-".+    c #FFEFDE",
-"++    c #FFE8CD",
-"@+    c #FFC98D",
-"#+    c #FFC789",
-"$+    c #FFC78D",
-"%+    c #FA9A26",
-"&+    c #FCA031",
-"*+    c #FFA842",
-"=+    c #FFAE4F",
-"-+    c #FFB35C",
-";+    c #FFB765",
-">+    c #FFB561",
-",+    c #FF8E07",
-"'+    c #FF9517",
-")+    c #FF9C27",
-"!+    c #FFA338",
-"~+    c #FF8C02",
-"{+    c #FF9312",
-"]+    c #FF9A23",
-"^+    c #FFA133",
-"/+    c #FFA843",
-"(+    c #B06000",
-"_+    c #B16100",
-":+    c #FA8900",
-"<+    c #FABB78",
-"[+    c #E38B25",
-"}+    c #F38500",
-"|+    c #B66300",
-"1+    c #FE8B00",
-"2+    c #E97F00",
-"3+    c #E88000",
-"4+    c #A05C00",
-"5+    c #F9A544",
-"6+    c #A07842",
-"7+    c #D27300",
-"8+    c #F98900",
-"9+    c #D27500",
-"0+    c #885100",
-"a+    c #774800",
-"b+    c #885C1B",
-"c+    c #77541D",
-"d+    c #88632B",
-"e+    c #DF7A00",
-"f+    c #DE7B00",
-"g+    c #DC7B00",
-"h+    c #CC7200",
-"i+    c #764800",
-"j+    c #764903",
-"k+    c #764A05",
-"l+    c #774D0B",
-"m+    c #885914",
-"n+    c #E37E00",
-"o+    c #D97700",
-"p+    c #CB7000",
-"q+    c #D87800",
-"r+    c #DD7B00",
-"s+    c #E47D00",
-"t+    c #DE7900",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                    . . . .                                                     ",
-"                                  . + @ # $ .                                                   ",
-"                                . . % @ & . .                                                   ",
-"                                . * . . . = .                                                   ",
-"                                . - ; > , ' ) .                                                 ",
-"                                . ! ~ { ] ^ / .                                                 ",
-"                                . ( _ : < ^ [ .                                                 ",
-"                              . } | 1 2 3 4 5 ) .                                               ",
-"                              6 7 8 9 0 a b c d e                                               ",
-"                              f g h i j k l m n o                                               ",
-"                              p q r s t u v w x y z                                             ",
-"                            A B C D E F G H H H I J                                             ",
-"                            K L M D D N O P P H Q R                                             ",
-"                            f S T U E F G H H V W X Y                                           ",
-"                            Z `  ...+.@.#.$.%.&.m *.e                                           ",
-"                          . =.-.;.>.,.'.).!.~.{.c [ .                                           ",
-"                          . ].^.^./.(._.:.<.[.}.^ 5 ) .                                         ",
-"                          . ].^.^.|.1.2.3.4.5.6.^ ^ / .                                         ",
-"                          . 7.^.^.8.9.0.a.b.c.d.e.^ [ .                                         ",
-"                        Z f.g.h.^.^.i.j.k.l.~ { ] ^ m.n.o.                                      ",
-"                        f S p.q.r.s.t.u.v.w._ : x.y.m n o                                       ",
-"                        K L z.A.B.p. .C.D.E.F.G.H.&.I.x y z                                     ",
-"                        K J.E E E r T K.L.M.N.$.O.V H H I J                                     ",
-"                        p P.E D D D E F G H H H H P P H Q R                                     ",
-"                      f Q.R.E E E D D N O P P P P H H V W X Y                                   ",
-"                      6 S.p.B.T.A.r E F G H H H U.O.V.&.m *.e                                   ",
-"                      . W.s.X.r.q.p.B.Y.Z.`. +.+++@+#+$+c [ .                                   ",
-"                      . 7.^.^.^.h.s.X.%+&+*+=+-+;+>+< ^ ^ 5 ) .                                 ",
-"                    . =.-.^.^.^.^.^.^.^.,+'+)+!+1 2 3 4 ^ ^ / . . .                             ",
-"                  . . ].^.^.^.^.^.^.^.^.~+{+]+^+/+0 a b ^ ^ [ . (+% . .                         ",
-"              . . _+. ].^.^.^.^.^.^.^.^.^./.(._.:.<.[.}.^ ^ 5 ) . ].7.=.. .                     ",
-"            . =.7.].. 7.:+^.:+^.^.^.^.^.^.|.1.2.3.4.5.6.<+^ [.[+. 7.^.}+|+.                     ",
-"          . |+}+1+-.2+-.3+4+^.^.^.^.^.^.^.8.9.0.a.5+c.d.e.6+3+-.2+-.-.7+.                       ",
-"          . . =.].].7.-.8+9+0+a+0+^.^.^.^.^.i.j.k.l.b+c+d+9+8+^.-.7.=..                         ",
-"              . . . . =.].e+f+g+h+0+a+i+i+i+j+k+l+m+h+g+n+8+-.7.=.. . . .                       ",
-"                . . . . . . =.].o+p+q+g+g+g+g+g+r+n+8+-.s+].=.. . . . . .                       ",
-"                . . . . . . . . . . =.].t+s+-.^.^.-.7.=.. . . . . . . .                         ",
-"                  . . . . . . . . . . . . . =.].].=.. . . . . . . . .                           ",
-"                        . . . . . . . . . . . . . . . . . . . . . .                             ",
-"                              . . . . . . . . . . . . . . . . .                                 ",
-"                                      . . . . . . . . . .                                       ",
-"                                              . . . .                                           ",
-"                                                                                                ",
-"                                                                                                "};
+".     c #8A4E06",
+"+     c #915917",
+"@     c #583710",
+"#     c #271A0B",
+"$     c #894D06",
+"%     c #8C5616",
+"&     c #281E13",
+"*     c #875A26",
+"=     c #966935",
+"-     c #966E42",
+";     c #C2915D",
+">     c #3B2C1C",
+",     c #956025",
+"'     c #FFB055",
+")     c #FFB96B",
+"!     c #F4B776",
+"~     c #4A3824",
+"{     c #3B2409",
+"]     c #CF832B",
+"^     c #FFAD4F",
+"/     c #FFB665",
+"(     c #FBBC78",
+"_     c #AC8052",
+":     c #4D3921",
+"<     c #E6A860",
+"[     c #FBAE55",
+"}     c #FEB665",
+"|     c #FFC27F",
+"1     c #EABB8A",
+"2     c #161616",
+"3     c #5D5750",
+"4     c #D2C5B5",
+"5     c #E6C8A4",
+"6     c #F3D5B2",
+"7     c #FFE6CB",
+"8     c #F6E7D9",
+"9     c #7E756E",
+"0     c #1C1C1C",
+"a     c #C1B19D",
+"b     c #D5D4D3",
+"c     c #DADADA",
+"d     c #ECECEC",
+"e     c #FFFEFE",
+"f     c #A39C96",
+"g     c #191919",
+"h     c #CAB59B",
+"i     c #D8D3CC",
+"j     c #FFFDFC",
+"k     c #D6C9BD",
+"l     c #534D46",
+"m     c #3F2404",
+"n     c #EC8D1B",
+"o     c #EDAD60",
+"p     c #E8C294",
+"q     c #F3D1A8",
+"r     c #FFE0BE",
+"s     c #FFE0BF",
+"t     c #F4C08A",
+"u     c #4D3B29",
+"v     c #904F00",
+"w     c #FD8B01",
+"x     c #FD9211",
+"y     c #FD9E2F",
+"z     c #FEA844",
+"A     c #FFB45F",
+"B     c #FFBD73",
+"C     c #FBBC79",
+"D     c #955100",
+"E     c #FF8C00",
+"F     c #FF8E05",
+"G     c #FF981D",
+"H     c #FFA133",
+"I     c #FFAD4E",
+"J     c #FFB664",
+"K     c #FFBF7A",
+"L     c #EAAF70",
+"M     c #000000",
+"N     c #3D260B",
+"O     c #CB7712",
+"P     c #FE8D02",
+"Q     c #FF8C01",
+"R     c #FF9517",
+"S     c #FF9E2D",
+"T     c #FFAA48",
+"U     c #FFB35E",
+"V     c #FFBD76",
+"W     c #F6B978",
+"X     c #685239",
+"Y     c #51493E",
+"Z     c #D4BD9F",
+"`     c #ECAC5F",
+" .    c #F0A64B",
+"..    c #FB9822",
+"+.    c #FEA030",
+"@.    c #FFAC4B",
+"#.    c #FFB460",
+"$.    c #FFC78A",
+"%.    c #FFDAB2",
+"&.    c #C0B2A5",
+"*.    c #4E4B48",
+"=.    c #514C45",
+"-.    c #CEC8BF",
+";.    c #D8D1CA",
+">.    c #DACEC1",
+",.    c #E6C091",
+"'.    c #F3CC9D",
+").    c #FFDCB2",
+"!.    c #FFDFBB",
+"~.    c #FFECD8",
+"{.    c #FFFAF5",
+"].    c #F1EBE6",
+"^.    c #5E5A56",
+"/.    c #827668",
+"(.    c #D1CDC8",
+"_.    c #D6D6D6",
+":.    c #FFFFFF",
+"<.    c #F8F4F0",
+"[.    c #978F86",
+"}.    c #0B0B0B",
+"|.    c #D09F63",
+"1.    c #DBCAB6",
+"2.    c #DACDBE",
+"3.    c #D8D2CC",
+"4.    c #FFFBF7",
+"5.    c #FFF7EF",
+"6.    c #FEE9D4",
+"7.    c #E4BE96",
+"8.    c #0D0D0D",
+"9.    c #E78308",
+"0.    c #FB9416",
+"a.    c #F9961E",
+"b.    c #EDAA58",
+"c.    c #E8BB84",
+"d.    c #F3C793",
+"e.    c #FFD7A9",
+"f.    c #FFDAB1",
+"g.    c #FFD19C",
+"h.    c #FFC37F",
+"i.    c #FFC384",
+"j.    c #F1B575",
+"k.    c #663800",
+"l.    c #F68700",
+"m.    c #FD8E07",
+"n.    c #FD900C",
+"o.    c #FE9312",
+"p.    c #FF9E2A",
+"q.    c #FFA63F",
+"r.    c #FFB765",
+"s.    c #FEBE7A",
+"t.    c #906B45",
+"u.    c #271600",
+"v.    c #935100",
+"w.    c #FF9516",
+"x.    c #FF9E2C",
+"y.    c #FFAA47",
+"z.    c #FFB35D",
+"A.    c #FFBD75",
+"B.    c #FFBF7B",
+"C.    c #B38656",
+"D.    c #653C0B",
+"E.    c #A25900",
+"F.    c #472700",
+"G.    c #3B2000",
+"H.    c #925000",
+"I.    c #8A4B00",
+"J.    c #965200",
+"K.    c #FD8B00",
+"L.    c #FF9210",
+"M.    c #FF9B26",
+"N.    c #FFA741",
+"O.    c #FFB057",
+"P.    c #FEBB71",
+"Q.    c #F2A958",
+"R.    c #493013",
+"S.    c #E87F00",
+"T.    c #EB8100",
+"U.    c #512C00",
+"V.    c #9E5600",
+"W.    c #EF8300",
+"X.    c #ED8100",
+"Y.    c #F38500",
+"Z.    c #D97900",
+"`.    c #CA7200",
+" +    c #D47600",
+".+    c #F28500",
+"++    c #FF8F08",
+"@+    c #FF981E",
+"#+    c #FEA339",
+"$+    c #E39A43",
+"%+    c #D49953",
+"&+    c #BE853D",
+"*+    c #F38400",
+"=+    c #AB5E00",
+"-+    c #291600",
+";+    c #482700",
+">+    c #4A2900",
+",+    c #AC5E00",
+"'+    c #E27C00",
+")+    c #CA7100",
+"!+    c #B96900",
+"~+    c #B26500",
+"{+    c #A45F00",
+"]+    c #A46002",
+"^+    c #A4630C",
+"/+    c #A86C1B",
+"(+    c #B36D12",
+"_+    c #BE700B",
+":+    c #DF7E05",
+"<+    c #F58600",
+"[+    c #E17B00",
+"}+    c #492800",
+"|+    c #170C00",
+"1+    c #5B3200",
+"2+    c #8A4C00",
+"3+    c #D77700",
+"4+    c #DD7A00",
+"5+    c #E17D00",
+"6+    c #E78000",
+"7+    c #E98100",
+"8+    c #EF8400",
+"9+    c #CF7100",
+"0+    c #955200",
+"a+    c #462600",
+"b+    c #4A2800",
+"c+    c #7C4400",
+"d+    c #E47D00",
+"e+    c #2E1900",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                        . + @                                   ",
+"                      # $ % &                                   ",
+"                      * = - ; >                                 ",
+"                      , ' ) ! ~                                 ",
+"                    { ] ^ / ( _                                 ",
+"                    : < [ } | 1 2                               ",
+"                    3 4 5 6 7 8 9                               ",
+"                  0 a b c d e e f                               ",
+"                  g h i c d e j k l                             ",
+"                  m n o p q r s t u                             ",
+"                  v w x y z A B C _                             ",
+"                  D E F G H I J K L M                           ",
+"                N O P Q R S T U V W X                           ",
+"                Y Z `  ...+.@.#.$.%.&.*.                        ",
+"                =.-.;.>.,.'.).!.~.{.].^.                        ",
+"                /.(._._.c d e e e :.<.[.                        ",
+"              }.|.1.2.3.c d e e 4.5.6.7.8.                      ",
+"              M 9.0.a.b.c.d.e.f.g.h.i.j.>                       ",
+"              k.l.E Q m.n.o.p.q.' r.K s.t.M                     ",
+"            u.v.E E E E E Q w.x.y.z.A.B.C.D.E.F.                ",
+"        G.H.I.J.K.K.E E E E L.M.N.O.P.s.Q.R.S.T.U.              ",
+"      M V.W.X.Y.Z.`. +.+E E ++@+#+$+%+&+.+*+W.=+                ",
+"        -+;+>+,+'+)+!+~+{+{+]+^+/+(+_+:+<+[+}+|+                ",
+"          M M M M 1+H.2+3+4+5+6+7+8+9+0+1+M M M                 ",
+"            M M M M M M a+b+c+d+d+c+e+M M M M M                 ",
+"                M M M M M M M M M M M M M M                     ",
+"                        M M M M M M M M                         ",
+"                                M M                             ",
+"                                                                "};
index aace8e4aed616188242a9c7ac38201fd5259befe..2bf1149e8ad628e8821928f32cbc2ce92f167975 100644 (file)
@@ -2,7 +2,7 @@
  * aout_ext-dec.c : exported fifo management functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_ext-dec.c,v 1.7 2001/12/07 18:33:08 sam Exp $
+ * $Id: aout_ext-dec.c,v 1.8 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 #include "aout_common.h"
index 5712d981d662fad312c05a1540d18be2533d9dea..950e7df9a6b936f44b8314f32dc669a3cf7749e9 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 #include "aout_common.h"
index d6b2c17b9fb8fd3f1f0dd7fc29af9bbff240b961..e0ddd5f9fe1108f318bff1b2a1924739ca9627df 100644 (file)
@@ -2,7 +2,7 @@
  * aout_s8.c: 8 bit signed audio output functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_s8.c,v 1.4 2001/12/09 17:01:37 sam Exp $
+ * $Id: aout_s8.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 #include "aout_common.h"
index cd5d80de30dd9543a4ee575f8d39eb9fba53fe98..958003277ca877a025e38a4f57a2abd5beb52006 100644 (file)
@@ -2,7 +2,7 @@
  * aout_spdif: ac3 passthrough output
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_spdif.c,v 1.20 2001/12/09 17:01:37 sam Exp $
+ * $Id: aout_spdif.c,v 1.21 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>                                              /* memset() */
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 #include "aout_common.h"
index 0bcb338f4c3ce5308d8f9bc10b5409a0d94543b6..d81a51b4a775f53f4850802c70ad5323ca1dc9ef 100644 (file)
@@ -2,7 +2,7 @@
  * aout_u16.c: 16 bit unsigned audio output functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_u16.c,v 1.4 2001/12/09 17:01:37 sam Exp $
+ * $Id: aout_u16.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 #include "aout_common.h"
index f34c858644164dc67ebf9e76a15faff7b95708dc..a032c4129fd58c1c41b7e084f0e3d88f91b6e563 100644 (file)
@@ -2,7 +2,7 @@
  * aout_u8.c: 8 bit unsigned audio output functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_u8.c,v 1.9 2001/12/07 18:33:08 sam Exp $
+ * $Id: aout_u8.c,v 1.10 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>
 
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
+#include <videolan/vlc.h>
 
 #include "audio_output.h"
 #include "aout_common.h"
index 93a2873510c4a28e6890f3978d1d8be1baf8ef28..dd8da1fe6ad0466372b78b87bd00a6d4069ee1b0 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.c : audio output thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: audio_output.c,v 1.68 2001/12/07 18:33:08 sam Exp $
+ * $Id: audio_output.c,v 1.69 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
+#include <stdio.h>                                           /* "intf_msg.h" */
+#include <stdlib.h>                            /* calloc(), malloc(), free() */
+#include <string.h>
+
+#include <videolan/vlc.h>
 
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>                                              /* getpid() */
+#   include <unistd.h>                                           /* getpid() */
 #endif
 
 #ifdef WIN32                   /* getpid() for win32 is located in process.h */
-#include <process.h>
+#   include <process.h>
 #endif
 
-#include <stdio.h>                                           /* "intf_msg.h" */
-#include <stdlib.h>                            /* calloc(), malloc(), free() */
-#include <string.h>
-
-#include "common.h"
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"                             /* mtime_t, mdate(), msleep() */
-#include "modules.h"
-
 #include "audio_output.h"
 #include "aout_common.h"
 
@@ -98,7 +92,9 @@ aout_thread_t *aout_CreateThread( int *pi_status )
     }
 
     /* Choose the best module */
-    p_aout->p_module = module_Need( MODULE_CAPABILITY_AOUT, NULL );
+    p_aout->p_module = module_Need( MODULE_CAPABILITY_AOUT,
+                           main_GetPszVariable( AOUT_METHOD_VAR, NULL ), 
+                           NULL );
 
     if( p_aout->p_module == NULL )
     {
index 51ee2d0bb55839639926c26c13c62329f3a6ed46..cb2ee451b2e7922efa1ab018e299d1938f7956a4 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input.c,v 1.166 2001/12/27 03:47:09 massiot Exp $
+ * $Id: input.c,v 1.167 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #elif defined( _MSC_VER ) && defined( _WIN32 )
 #   include <sys/times.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
 #include "netutils.h"
-#include "modules.h"
 
 #include "intf_playlist.h"
 
@@ -203,7 +197,7 @@ void input_DestroyThread( input_thread_t *p_input, int *pi_status )
     /* Request thread destruction */
     p_input->b_die = 1;
 
-    /* Make the thread exit of an eventual vlc_cond_wait() */
+    /* Make the thread exit from a possible vlc_cond_wait() */
     vlc_mutex_lock( &p_input->stream.stream_lock );
     vlc_cond_signal( &p_input->stream.stream_wait );
     vlc_mutex_unlock( &p_input->stream.stream_lock );
@@ -389,7 +383,6 @@ static void RunThread( input_thread_t *p_input )
  *****************************************************************************/
 static int InitThread( input_thread_t * p_input )
 {
-
     /* Initialize statistics */
     p_input->c_loops                    = 0;
     p_input->stream.c_packets_read      = 0;
@@ -403,7 +396,8 @@ static int InitThread( input_thread_t * p_input )
 
     /* Find appropriate module. */
     p_input->p_input_module = module_Need( MODULE_CAPABILITY_INPUT,
-                                           (probedata_t *)p_input );
+                                 main_GetPszVariable( INPUT_METHOD_VAR, NULL ),
+                                 (probedata_t *)p_input );
 
     if( p_input->p_input_module == NULL )
     {
@@ -427,12 +421,17 @@ static int InitThread( input_thread_t * p_input )
     p_input->pf_rewind        = f.pf_rewind;
     p_input->pf_seek          = f.pf_seek;
 
+    if( f.pf_open != NULL )
+    {
+        f.pf_open( p_input );
+        p_input->stream.i_method = INPUT_METHOD_DVD;
+    }
 #if !defined( SYS_BEOS ) && !defined( SYS_NTO )
     /* FIXME : this is waaaay too kludgy */
-    if( ( strlen( p_input->p_source ) >= 10
-          && !strncasecmp( p_input->p_source, "udpstream:", 10 ) )
-          || ( strlen( p_input->p_source ) >= 4
-                && !strncasecmp( p_input->p_source, "udp:", 4 ) ) )
+    else if( ( strlen( p_input->p_source ) >= 10
+               && !strncasecmp( p_input->p_source, "udpstream:", 10 ) )
+               || ( strlen( p_input->p_source ) >= 4
+                     && !strncasecmp( p_input->p_source, "udp:", 4 ) ) )
     {
         /* Network stream */
         NetworkOpen( p_input );
@@ -445,33 +444,7 @@ static int InitThread( input_thread_t * p_input )
         HTTPOpen( p_input );
         p_input->stream.i_method = INPUT_METHOD_NETWORK;
     }
-    else 
 #endif
-        if( ( ( ( strlen( p_input->p_source ) > 4 )
-                  && !strncasecmp( p_input->p_source, "dvd:", 4 ) )
-              || TestMethod( INPUT_METHOD_VAR, "dvd" ) ) 
-             && f.pf_open != NULL )
-    {
-        /* DVD - this is THE kludge */
-        f.pf_open( p_input );
-        p_input->stream.i_method = INPUT_METHOD_DVD;
-    }
-    else if( ( ( ( strlen( p_input->p_source ) > 8 )
-                   && !strncasecmp( p_input->p_source, "dvdread:", 8 ) )
-                || TestMethod( INPUT_METHOD_VAR, "dvdread" ) )
-             && f.pf_open != NULL )
-    {
-        /* DVDRead - this is THE kludge */
-        f.pf_open( p_input );
-        p_input->stream.i_method = INPUT_METHOD_DVD;
-    }
-    else if( ( strlen( p_input->p_source ) > 4 )
-               && !strncasecmp( p_input->p_source, "vlc:", 4 )
-               && f.pf_open != NULL )
-    {
-        /* Dummy input - very kludgy */
-        f.pf_open( p_input );
-    }
     else if( ( strlen( p_input->p_source ) == 1 )
                && *p_input->p_source == '-' )
     {
@@ -570,12 +543,16 @@ static void CloseThread( input_thread_t * p_input )
 {
 #define f p_input->p_input_module->p_functions->input.functions.input
 
+    if( f.pf_close != NULL )
+    {
+        f.pf_close( p_input );
+    }
 #if !defined( SYS_BEOS ) && !defined( SYS_NTO )
     /* Close stream */
-    if( ( strlen( p_input->p_source ) > 10
-          && !strncasecmp( p_input->p_source, "udpstream:", 10 ) )
-          || ( strlen( p_input->p_source ) > 4
-                && !strncasecmp( p_input->p_source, "udp:", 4 ) ) )
+    else if( ( strlen( p_input->p_source ) > 10
+               && !strncasecmp( p_input->p_source, "udpstream:", 10 ) )
+               || ( strlen( p_input->p_source ) > 4
+                     && !strncasecmp( p_input->p_source, "udp:", 4 ) ) )
     {
         NetworkClose( p_input );
     }
@@ -584,25 +561,7 @@ static void CloseThread( input_thread_t * p_input )
     {
         NetworkClose( p_input );
     }
-    else 
 #endif
-    if( ( ( strlen( p_input->p_source ) > 4 )
-            && !strncasecmp( p_input->p_source, "dvd:", 4 ) )
-        || TestMethod( INPUT_METHOD_VAR, "dvd" ) )
-    {
-        f.pf_close( p_input );
-    }
-    else if( ( ( strlen( p_input->p_source ) > 8 )
-                 && !strncasecmp( p_input->p_source, "dvdread:", 8 ) )
-             || TestMethod( INPUT_METHOD_VAR, "dvdread" ) )
-    {
-        f.pf_close( p_input );
-    }
-    else if( ( strlen( p_input->p_source ) > 4 )
-               && !strncasecmp( p_input->p_source, "vlc:", 4 ) )
-    {
-        f.pf_close( p_input );
-    }
     else
     {
         FileClose( p_input );
index 37b418ee683d980fead79456ead9f7df0be712fd..a8b84c2ebd586cd8a3e16713a6a36fe37167611b 100644 (file)
@@ -2,7 +2,7 @@
  * input_clock.c: Clock/System date convertions, stream management
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_clock.c,v 1.27 2001/12/07 18:33:08 sam Exp $
+ * $Id: input_clock.c,v 1.28 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
index 76a4384eb8bcdffe590983bb08fb1400f4ff5370..8e57bd8d1af36fbd676c734083767d189004ca96 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.21 2001/12/27 01:49:34 massiot Exp $
+ * $Id: input_dec.c,v 1.22 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
 #include "input_ext-intf.h"
 #include "input_ext-plugins.h"
 
-#include "modules.h"
-
 static decoder_config_t * CreateDecoderConfig( input_thread_t * p_input,
                                                es_descriptor_t * p_es );
 static void DeleteDecoderConfig( decoder_config_t * p_config );
@@ -58,7 +51,7 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
     /* Get a suitable module */
     probedata.i_type = p_es->i_type;
 
-    p_es->p_module = module_Need( MODULE_CAPABILITY_DEC, &probedata );
+    p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, NULL, &probedata );
     if( p_es->p_module == NULL )
     {
         intf_ErrMsg( "input error: no suitable decoder module for type 0x%x",
index 9706b4bdc30c16eb93241e8934f85c4c1fa6b932..53f095cf12f64bb6b4bd52089e7e606032f30e98 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.c: services to the decoders
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-dec.c,v 1.25 2001/12/30 05:46:14 sam Exp $
+ * $Id: input_ext-dec.c,v 1.26 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
index 1c08b7aacfb930a5760f9d3ac8d5135694090ede..130c742427e4269982ee69732f6dedabe1df26b7 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-intf.c: services to the interface
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-intf.c,v 1.31 2001/12/09 17:01:37 sam Exp $
+ * $Id: input_ext-intf.c,v 1.32 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-dec.h"
index 96e4d83c25d29fa341026f2bbcbbdd0b36571f36..e2f30c0ea5604e15be27a541aa9a503d8783e1d2 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.69 2001/12/07 18:33:08 sam Exp $
+ * $Id: input_programs.c,v 1.70 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "debug.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
 #include "input_ext-dec.h"
 #include "input_ext-plugins.h"
 
+#include "debug.h"
+
 /*
  * NOTICE : all of these functions expect you to have taken the lock on
  * p_input->stream.lock
index f02dc01499241bf85613841991762edadf668014..47045f86bea50e9b9d55652a81274ec194fcdb4a 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: mpeg_system.c,v 1.76 2001/12/19 10:00:00 massiot Exp $
+ * $Id: mpeg_system.c,v 1.77 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
index daaf16b69eec98a7695221418e681ce9281df938..e4ffb8ba9868c32c549d9378f3c17bc331a5fd06 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as command line.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: interface.c,v 1.84 2001/12/10 04:53:11 sam Exp $
+ * $Id: interface.c,v 1.85 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                      /* free(), strtol() */
 #include <stdio.h>                                                   /* FILE */
 #include <string.h>                                            /* strerror() */
 #include <sys/types.h>                                              /* off_t */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "modules.h"
+#include <videolan/vlc.h>
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -76,7 +70,9 @@ intf_thread_t* intf_Create( void )
     }
 
     /* Choose the best module */
-    p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF, NULL );
+    p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF,
+                           main_GetPszVariable( INTF_METHOD_VAR, NULL ),
+                           NULL );
 
     if( p_intf->p_module == NULL )
     {
index eb0ff2d85dea230e8486626a535a8a035eaac775..9229262b39abba662bb608273d204f7e2fd7bba7 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: intf_msg.c,v 1.40 2001/12/07 18:33:08 sam Exp $
+ * $Id: intf_msg.c,v 1.41 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -26,8 +26,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                  /* errno */
 #include <fcntl.h>                     /* O_CREAT, O_TRUNC, O_WRONLY, O_SYNC */
 #include <stdio.h>                                               /* required */
 #include <stdlib.h>                                              /* malloc() */
 #include <string.h>                                            /* strerror() */
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>                                      /* close(), write() */
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
 #include "interface.h"
 
 /*****************************************************************************
index d7e2639f775a9bca2c9f460bcfbc13ba30021c87..2fc3ba34543ef173bf4352b759b451d6ff234c10 100644 (file)
@@ -2,7 +2,7 @@
  * intf_playlist.c : Playlist management functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: intf_playlist.c,v 1.11 2001/12/07 18:33:08 sam Exp $
+ * $Id: intf_playlist.c,v 1.12 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                                      /* free(), strtol() */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 #include <errno.h>                                                 /* ENOMEM */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
+#include <videolan/vlc.h>
 
 #include "intf_playlist.h"
 
index c2c8d0b8d8ec5a2a60ad864f2fe9ec1e0fa9397c..476bc96bbdc3df72913b0be8d5f7769e4625f9ef 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.140 2001/12/29 03:44:38 massiot Exp $
+ * $Id: main.c,v 1.141 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <signal.h>                               /* SIGHUP, SIGINT, SIGKILL */
 #include <stdio.h>                                              /* sprintf() */
 #include <setjmp.h>                                       /* longjmp, setjmp */
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_GETOPT_LONG
 #   ifdef HAVE_GETOPT_H
 #       include <getopt.h>                                       /* getopt() */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <sys/stat.h>                                             /* S_IREAD */
 
-#include "common.h"
-#include "debug.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"                                              /* TestCPU() */
-#include "modules.h"
+#include "netutils.h"                                 /* network_ChannelJoin */
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
 #include "video.h"
 #include "video_output.h"
 
-#ifdef SYS_BEOS
-#   include "beos_specific.h"
-#endif
-
-#ifdef SYS_DARWIN
-#   include "darwin_specific.h"
-#endif
-
-#ifdef WIN32
-#   include "win32_specific.h"
-#endif
-
-#include "netutils.h"                                 /* network_ChannelJoin */
+#include "debug.h"
 
 /*****************************************************************************
  * Command line options constants. If something is changed here, be sure that
@@ -248,7 +230,7 @@ static void InitSignalHandler       ( void );
 static void SimpleSignalHandler     ( int i_signal );
 static void FatalSignalHandler      ( int i_signal );
 static void InstructionSignalHandler( int i_signal );
-static int  CPUCapabilities         ( void );
+static u32  CPUCapabilities         ( void );
 
 static int  RedirectSTDOUT          ( void );
 static void ShowConsole             ( void );
@@ -371,7 +353,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
         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 );
+        intf_StatMsg( "info: CPU has capabilities : %s", p_capabilities );
     }
 
     /*
@@ -401,19 +383,11 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Choose the best memcpy module
      */
-    p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY, NULL );
-
-    if( p_main->p_memcpy_module != NULL )
-    {
-#define f p_main->p_memcpy_module->p_functions->memcpy.functions.memcpy
-        p_main->fast_memcpy = f.fast_memcpy;
-#undef f
-    }
-    else
+    if( module_NeedMemcpy( &p_main->memcpy ) )
     {
         intf_ErrMsg( "intf error: no suitable memcpy module, "
                      "using libc default" );
-        p_main->fast_memcpy = memcpy;
+        p_main->memcpy.pf_memcpy = memcpy;
     }
 
     /*
@@ -465,11 +439,11 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     }
 
     /*
-     * Free memcpy module
+     * Free memcpy module if it was allocated
      */
-    if( p_main->p_memcpy_module != NULL )
+    if( p_main->memcpy.p_module != NULL )
     {
-        module_Unneed( p_main->p_memcpy_module );
+        module_UnneedMemcpy( &p_main->memcpy );
     }
 
     /*
@@ -976,7 +950,7 @@ static void Usage( int i_fashion )
           "\n  -h, --help                     \tprint help and exit"
           "\n  -H, --longhelp                 \tprint long help and exit"
           "\n      --version                  \toutput version information and exit"
-          "\n\nPlaylist items :"
+          "\n\nPlaylist items:"
           "\n  *.mpg, *.vob                   \tPlain MPEG-1/2 files"
           "\n  dvd:<device>[@<raw device>]    \tDVD device"
           "\n  vcd:<device>                   \tVCD device"
@@ -1147,9 +1121,9 @@ static void InstructionSignalHandler( int i_signal )
  *****************************************************************************
  * This function is called to list extensions the CPU may have.
  *****************************************************************************/
-static int CPUCapabilities( void )
+static u32 CPUCapabilities( void )
 {
-    volatile int i_capabilities = CPU_CAPABILITY_NONE;
+    volatile u32 i_capabilities = CPU_CAPABILITY_NONE;
 
 #if defined( SYS_DARWIN )
     struct host_basic_info hi;
index b0a3daab263380ae7f56e23ae1ecbd671fd0b4ee..2d78da70c687e4056238dad527ef28aa72897eff 100644 (file)
@@ -2,7 +2,7 @@
  * beos_init.cpp: Initialization for BeOS specific features 
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: beos_specific.cpp,v 1.13 2001/12/09 17:01:37 sam Exp $
+ * $Id: beos_specific.cpp,v 1.14 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *
@@ -20,8 +20,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
-
 #include <Application.h>
 #include <Roster.h>
 #include <Path.h>
 
 extern "C"
 {
-#include "common.h"
+#include <videolan/vlc.h>
+
 #include "intf_msg.h"
 #include "threads.h"
 #include "mtime.h"
 }
-#include "beos_specific.h"
 
 /*****************************************************************************
  * The VlcApplication class
index 70d131fa6b10dc2078e404a1fcbd67630f19c946..a9e00e031997629decbc075faae68823c58f995e 100644 (file)
@@ -2,7 +2,7 @@
  * darwin_specific.c: Darwin specific features 
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: darwin_specific.c,v 1.6 2001/12/09 17:01:37 sam Exp $
+ * $Id: darwin_specific.c,v 1.7 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* strdup() */
 #include <stdlib.h>                                                /* free() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "darwin_specific.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Static vars
index 43fb94815c5ca1ef420004287f4378044d321e42..36d1b3777517154abb53ac13722170d41bc8bec7 100644 (file)
@@ -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.2 2001/12/09 17:01:37 sam Exp $
+ * $Id: iso_lang.c,v 1.3 2001/12/30 07:09:56 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>
 
-#include "common.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * Local tables
index 65b7c4bfdf1640e92fd21b20c0b01b60ab786dcd..4fc8c56f5891673e807afa0d9f3c90d0935ccfe6 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.45 2001/12/10 04:53:11 sam Exp $
+ * $Id: modules.c,v 1.46 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -21,7 +21,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
 
 /* Some faulty libcs have a broken struct dirent when _FILE_OFFSET_BITS
  * is set to 64. Don't try to be cleverer. */
@@ -33,6 +32,8 @@
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                              /* strdup() */
 
+#include <videolan/vlc.h>
+
 #if !defined( _MSC_VER )
 #include <dirent.h>
 #endif
 #   undef HAVE_DYNAMIC_PLUGINS
 #endif
 
-#ifdef SYS_BEOS
-#   include "beos_specific.h"
-#endif
-
-#ifdef SYS_DARWIN
-#   include "darwin_specific.h"
-#endif
-
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
 #include "netutils.h"
-#include "modules.h"
 
 #include "interface.h"
 #include "intf_playlist.h"
 #include "iso_lang.h"
 
 #ifdef HAVE_DYNAMIC_PLUGINS
-#   include "modules_core.h"
+#   include "modules_plugin.h"
 #endif
 #include "modules_builtin.h"
-#include "modules_export.h"
 
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
 #ifdef HAVE_DYNAMIC_PLUGINS
-static int AllocatePluginModule ( char * );
-#endif
-#ifdef ALLOCATE_ALL_BUILTINS
-static int AllocateBuiltinModule( int ( * ) ( module_t * ),
-                                  int ( * ) ( module_t * ),
-                                  int ( * ) ( module_t * ) );
+static void AllocateAllPlugins   ( void );
+static int  AllocatePluginModule ( char * );
 #endif
-static int DeleteModule ( module_t * );
-static int LockModule   ( module_t * );
-static int UnlockModule ( module_t * );
+static void AllocateAllBuiltins  ( void );
+static int  AllocateBuiltinModule( int ( * ) ( module_t * ),
+                                   int ( * ) ( module_t * ),
+                                   int ( * ) ( module_t * ) );
+static int  DeleteModule ( module_t * );
+static int  LockModule   ( module_t * );
+static int  UnlockModule ( module_t * );
 #ifdef HAVE_DYNAMIC_PLUGINS
-static int HideModule   ( module_t * );
-static int CallSymbol   ( module_t *, char * );
+static int  HideModule   ( module_t * );
+static int  CallSymbol   ( module_t *, char * );
 #endif
 
 static module_symbols_t symbols;
@@ -115,117 +101,31 @@ static module_symbols_t symbols;
  *****************************************************************************/
 void module_InitBank( void )
 {
-#ifdef HAVE_DYNAMIC_PLUGINS
-    static char * path[] = { ".", "plugins", PLUGIN_PATH, NULL, NULL };
-
-    char **         ppsz_path = path;
-    char *          psz_fullpath;
-    char *          psz_file;
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
-    char *          psz_vlcpath = system_GetProgramPath();
-    int             i_vlclen = strlen( psz_vlcpath );
-    boolean_t       b_notinroot;
-#endif
-    DIR *           dir;
-    struct dirent * file;
-#endif /* HAVE_DYNAMIC_PLUGINS */
-
     p_module_bank->first = NULL;
+    p_module_bank->i_count = 0;
     vlc_mutex_init( &p_module_bank->lock );
 
     /*
      * Store the symbols to be exported
      */
     STORE_SYMBOLS( &symbols );
-#ifdef TRACE
-    STORE_TRACE_SYMBOLS( &symbols );
-#endif
 
     /*
      * Check all the built-in modules
      */
-#ifdef ALLOCATE_ALL_BUILTINS
     intf_WarnMsg( 2, "module: checking built-in modules" );
-
-    ALLOCATE_ALL_BUILTINS();
-#endif
+    AllocateAllBuiltins();
 
     /*
      * Check all the plugin modules we can find
      */
 #ifdef HAVE_DYNAMIC_PLUGINS
     intf_WarnMsg( 2, "module: checking plugin modules" );
-
-    for( ; *ppsz_path != NULL ; ppsz_path++ )
-    {
-        /* Store strlen(*ppsz_path) for later use. */
-        int i_dirlen = strlen( *ppsz_path );
-
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
-        b_notinroot = 0;
-        /* Under BeOS, we need to add beos_GetProgramPath() to access
-         * files under the current directory */
-        if( ( i_dirlen > 1 ) && strncmp( *ppsz_path, "/", 1 ) )
-        {
-            i_dirlen += i_vlclen + 2;
-            b_notinroot = 1;
-
-            psz_fullpath = malloc( i_dirlen );
-            if( psz_fullpath == NULL )
-            {
-                continue;
-            }
-            sprintf( psz_fullpath, "%s/%s", psz_vlcpath, *ppsz_path );
-        }
-        else
-#endif
-        {
-            psz_fullpath = *ppsz_path;
-        }
-
-        intf_WarnMsgImm( 1, "module: browsing `%s'", psz_fullpath );
-
-        if( (dir = opendir( psz_fullpath )) )
-        {
-            /* Parse the directory and try to load all files it contains. */
-            while( (file = readdir( dir )) )
-            {
-                int i_filelen = strlen( file->d_name );
-
-                /* We only load files ending with ".so" */
-                if( i_filelen > 3
-                        && !strncmp( file->d_name + i_filelen - 3, ".so", 3 ) )
-                {
-                    psz_file = malloc( i_dirlen + i_filelen + 2 );
-                    if( psz_file == NULL )
-                    {
-                        continue;
-                    }
-                    sprintf( psz_file, "%s/%s", psz_fullpath, file->d_name );
-
-                    /* We created a nice filename -- now we just try to load
-                     * it as a plugin module. */
-                    AllocatePluginModule( psz_file );
-
-                    /* We don't care if the allocation succeeded */
-                    free( psz_file );
-                }
-            }
-
-            /* Close the directory if successfully opened */
-            closedir( dir );
-        }
-
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
-        if( b_notinroot )
-        {
-            free( psz_fullpath );
-        }
+    AllocateAllPlugins();
 #endif
-    }
-#endif /* HAVE_DYNAMIC_PLUGINS */
 
-    intf_WarnMsg( 3, "module: module bank initialized" );
+    intf_WarnMsg( 2, "module: module bank initialized, found %i modules",
+                     p_module_bank->i_count );
 
     return;
 }
@@ -245,7 +145,7 @@ void module_EndBank( void )
         if( DeleteModule( p_module_bank->first ) )
         {
             /* Module deletion failed */
-            intf_ErrMsg( "module error: `%s' can't be removed. trying harder.",
+            intf_ErrMsg( "module error: `%s' can't be removed, trying harder",
                          p_module_bank->first->psz_name );
 
             /* We just free the module by hand. Niahahahahaha. */
@@ -318,86 +218,221 @@ void module_ManageBank( void )
     return;
 }
 
+int module_NeedMemcpy( memcpy_module_t *p_memcpy )
+{
+    p_memcpy->p_module = module_Need( MODULE_CAPABILITY_MEMCPY, NULL, NULL );
+
+    if( p_memcpy->p_module == NULL )
+    {
+        return -1;
+    }
+
+    p_memcpy->pf_memcpy = p_memcpy->p_module->p_functions->memcpy.functions.memcpy.fast_memcpy;
+
+    return 0;
+}
+
+void module_UnneedMemcpy( memcpy_module_t *p_memcpy )
+{
+    module_Unneed( p_memcpy->p_module );
+}
+
+#if 0
+int module_NeedIntf( intf_module_t *p_intf )
+{
+    p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF, NULL );
+
+    if( p_intf->p_module == NULL )
+    {
+        return -1;
+    }
+
+    p_intf->pf_open = p_intf->p_module->p_functions->intf.functions.intf.pf_open;
+    p_intf->pf_run = p_intf->p_module->p_functions->intf.functions.intf.pf_run;
+    p_intf->pf_close = p_intf->p_module->p_functions->intf.functions.intf.pf_close;
+
+    return 0;
+}
+#endif
+
 /*****************************************************************************
  * module_Need: return the best module function, given a capability list.
  *****************************************************************************
  * This function returns the module that best fits the asked capabilities.
  *****************************************************************************/
-module_t * module_Need( int i_capabilities, void *p_data )
+module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
 {
     module_t * p_module;
-    module_t * p_bestmodule = NULL;
-    int i_score, i_totalscore, i_bestscore = 0;
-    int i_index;
 
     /* We take the global lock */
     vlc_mutex_lock( &p_module_bank->lock );
 
-    /* Parse the module list for capabilities and probe each of them */
-    for( p_module = p_module_bank->first ;
-         p_module != NULL ;
-         p_module = p_module->next )
+    if( psz_name != NULL && *psz_name )
     {
-        /* Test that this module can do everything we need */
-        if( ( p_module->i_capabilities & i_capabilities ) == i_capabilities )
+        /* A module name was requested. Use the first matching one. */
+        int       i_index;
+        boolean_t b_ok = 0;
+
+        for( p_module = p_module_bank->first;
+             p_module != NULL;
+             p_module = p_module->next )
         {
-            i_totalscore = 0;
+            /* Test that this module can do everything we need */
+            if( !(p_module->i_capabilities & ( 1 << i_capability )) )
+            {
+                continue;
+            }
 
+            /* Test if we have the required CPU */
+            if( (p_module->i_cpu_capabilities & p_main->i_cpu_capabilities)
+                  != p_module->i_cpu_capabilities )
+            {
+                continue;
+            }
+
+            /* Test if this plugin exports the required shortcut */
+            for( i_index = 0;
+                 !b_ok && p_module->pp_shortcuts[i_index];
+                 i_index++ )
+            {
+                b_ok = !strcmp( psz_name, p_module->pp_shortcuts[i_index] );
+            }
+
+            if( b_ok )
+            {
+                break;
+            }
+        }
+
+        if( b_ok )
+        {
+            /* Open it ! */
             LockModule( p_module );
+        }
+        else
+        {
+            intf_ErrMsg( "module error: requested %s module `%s' not found",
+                         GetCapabilityName( i_capability ), psz_name );
+        }
+    }
+    else
+    {
+        /* No module name was requested. Sort the modules and test them */
+        typedef struct module_list_s
+        {
+            struct module_s *p_module;
+            struct module_list_s* p_next;
+        } module_list_t;
+
+        int i_score = 0;
+        int i_index = 0;
+        struct module_list_s *p_list = malloc( p_module_bank->i_count
+                                                * sizeof( module_list_t ) );
+        struct module_list_s *p_first = NULL;
+
+        /* Parse the module list for capabilities and probe each of them */
+        for( p_module = p_module_bank->first ;
+             p_module != NULL ;
+             p_module = p_module->next )
+        {
+            /* Test that this module can do everything we need */
+            if( !(p_module->i_capabilities & ( 1 << i_capability )) )
+            {
+                continue;
+            }
 
-            /* Parse all the requested capabilities and test them */
-            for( i_index = 0 ; (1 << i_index) <= i_capabilities ; i_index++ )
+            /* Test if we have the required CPU */
+            if( (p_module->i_cpu_capabilities & p_main->i_cpu_capabilities)
+                  != p_module->i_cpu_capabilities )
             {
-                if( ( (1 << i_index) & i_capabilities ) )
-                {
-                    i_score = ( (function_list_t *)p_module->p_functions)
-                                                  [i_index].pf_probe( p_data );
+                continue;
+            }
 
-                    if( i_score )
-                    {
-                        i_totalscore += i_score;
-                    }
-                    else
-                    {
-                        break;
-                    }
-                }
+            /* Test if we requested a particular intf plugin */
+#if 0
+            if( i_capability == MODULE_CAPABILITY_INTF
+                 && p_module->psz_program != NULL
+                 && strcmp( p_module->psz_program, p_main->psz_arg0 ) )
+            {
+                continue;
             }
-            intf_WarnMsg( 3, "module: %s has score %d",
-                          p_module->psz_name, i_totalscore );
+#endif
 
-            /* If the high score was broken, we have a new champion */
-            if( i_totalscore > i_bestscore )
+            /* Store this new module */
+            p_list[ i_index ].p_module = p_module;
+
+            if( i_index == 0 )
+            {
+                p_list[ i_index ].p_next = NULL;
+                p_first = p_list;
+            }
+            else
             {
-                /* Keep the current module locked, but release the previous */
-                if( p_bestmodule != NULL )
+                /* 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;
+
+                if( p_first->p_module->pi_score[i_capability]
+                     < p_module->pi_score[i_capability] )
                 {
-                    UnlockModule( p_bestmodule );
+                    p_list[ i_index ].p_next = p_first;
+                    p_first = &p_list[ i_index ];
                 }
+                else
+                {
+                    while( p_newlist->p_next != NULL
+                            && p_newlist->p_next
+                                 ->p_module->pi_score[i_capability]
+                                >= p_module->pi_score[i_capability] )
+                    {
+                        p_newlist = p_newlist->p_next;
+                    }
 
-                /* This is the new best module */
-                i_bestscore = i_totalscore;
-                p_bestmodule = p_module;
+                    p_list[ i_index ].p_next = p_newlist->p_next;
+                    p_newlist->p_next = &p_list[ i_index ];
+                }
             }
-            else
+
+            i_index++;
+        }
+
+        /* Parse the linked list and use the first successful module */
+        while( p_first != NULL )
+        {
+            LockModule( p_first->p_module );
+
+            /* Test the requested capability */
+            i_score += ((function_list_t *)p_first->p_module->p_functions)
+                                            [i_capability].pf_probe( p_data );
+
+            /* If the high score was broken, we have a new champion */
+            if( i_score )
             {
-                /* This module wasn't interesting, unlock it and forget it */
-                UnlockModule( p_module );
+                break;
             }
+
+            UnlockModule( p_first->p_module );
+
+            p_first = p_first->p_next;
         }
+
+        p_module = (p_first == NULL) ? NULL : p_first->p_module;
+        free( p_list );
     }
 
     /* We can release the global lock, module refcount was incremented */
     vlc_mutex_unlock( &p_module_bank->lock );
 
-    if( p_bestmodule != NULL )
+    if( p_module != NULL )
     {
-        intf_WarnMsg( 1, "module: locking module `%s'",
-                      p_bestmodule->psz_name );
+        intf_WarnMsg( 1, "module: locking %s module `%s'",
+                         GetCapabilityName( i_capability ),
+                         p_module->psz_name );
     }
 
     /* Don't forget that the module is still locked if bestmodule != NULL */
-    return( p_bestmodule );
+    return( p_module );
 }
 
 /*****************************************************************************
@@ -427,7 +462,94 @@ void module_Unneed( module_t * p_module )
  * Following functions are local.
  *****************************************************************************/
 
+/*****************************************************************************
+ * AllocateAllPlugins: load all plugin modules we can find.
+ *****************************************************************************/
 #ifdef HAVE_DYNAMIC_PLUGINS
+static void AllocateAllPlugins( void )
+{
+    static char * path[] = { ".", "plugins", PLUGIN_PATH, NULL, NULL };
+
+    char **         ppsz_path = path;
+    char *          psz_fullpath;
+    char *          psz_file;
+#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
+    char *          psz_vlcpath = system_GetProgramPath();
+    int             i_vlclen = strlen( psz_vlcpath );
+    boolean_t       b_notinroot;
+#endif
+    DIR *           dir;
+    struct dirent * file;
+
+    for( ; *ppsz_path != NULL ; ppsz_path++ )
+    {
+        /* Store strlen(*ppsz_path) for later use. */
+        int i_dirlen = strlen( *ppsz_path );
+
+#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
+        b_notinroot = 0;
+        /* Under BeOS, we need to add beos_GetProgramPath() to access
+         * files under the current directory */
+        if( ( i_dirlen > 1 ) && strncmp( *ppsz_path, "/", 1 ) )
+        {
+            i_dirlen += i_vlclen + 2;
+            b_notinroot = 1;
+
+            psz_fullpath = malloc( i_dirlen );
+            if( psz_fullpath == NULL )
+            {
+                continue;
+            }
+            sprintf( psz_fullpath, "%s/%s", psz_vlcpath, *ppsz_path );
+        }
+        else
+#endif
+        {
+            psz_fullpath = *ppsz_path;
+        }
+
+        intf_WarnMsgImm( 1, "module: browsing `%s'", psz_fullpath );
+
+        if( (dir = opendir( psz_fullpath )) )
+        {
+            /* Parse the directory and try to load all files it contains. */
+            while( (file = readdir( dir )) )
+            {
+                int i_filelen = strlen( file->d_name );
+
+                /* We only load files ending with ".so" */
+                if( i_filelen > 3
+                        && !strncmp( file->d_name + i_filelen - 3, ".so", 3 ) )
+                {
+                    psz_file = malloc( i_dirlen + i_filelen + 2 );
+                    if( psz_file == NULL )
+                    {
+                        continue;
+                    }
+                    sprintf( psz_file, "%s/%s", psz_fullpath, file->d_name );
+
+                    /* We created a nice filename -- now we just try to load
+                     * it as a plugin module. */
+                    AllocatePluginModule( psz_file );
+
+                    /* We don't care if the allocation succeeded */
+                    free( psz_file );
+                }
+            }
+
+            /* Close the directory if successfully opened */
+            closedir( dir );
+        }
+
+#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
+        if( b_notinroot )
+        {
+            free( psz_fullpath );
+        }
+#endif
+    }
+}
+
 /*****************************************************************************
  * AllocatePluginModule: load a module into memory and initialize it.
  *****************************************************************************
@@ -437,6 +559,7 @@ void module_Unneed( module_t * p_module )
  *****************************************************************************/
 static int AllocatePluginModule( char * psz_filename )
 {
+    char **pp_shortcut;
     module_t * p_module, * p_othermodule;
     module_handle_t handle;
 
@@ -465,7 +588,7 @@ static int AllocatePluginModule( char * psz_filename )
     p_module->p_symbols = &symbols;
 
     /* Initialize the module : fill p_module->psz_name, etc. */
-    if( CallSymbol( p_module, "InitModule" ) != 0 )
+    if( CallSymbol( p_module, "InitModule" MODULE_SUFFIX ) != 0 )
     {
         /* We couldn't call InitModule() */
         free( p_module );
@@ -473,14 +596,6 @@ static int AllocatePluginModule( char * psz_filename )
         return( -1 );
     }
 
-    /* Check that version numbers match */
-    if( strcmp( VLC_VERSION, p_module->psz_version ) )
-    {
-        free( p_module );
-        module_unload( handle );
-        return( -1 );
-    }
-
     /* Check that we don't already have a module with this name */
     for( p_othermodule = p_module_bank->first ;
          p_othermodule != NULL ;
@@ -488,6 +603,9 @@ static int AllocatePluginModule( char * psz_filename )
     {
         if( !strcmp( p_othermodule->psz_name, p_module->psz_name ) )
         {
+            intf_WarnMsg( 5, "module warning: cannot load %s, a module named "
+                             "`%s' already exists",
+                             psz_filename, p_module->psz_name );
             free( p_module );
             module_unload( handle );
             return( -1 );
@@ -495,7 +613,7 @@ static int AllocatePluginModule( char * psz_filename )
     }
 
     /* Activate the module : fill the capability structure, etc. */
-    if( CallSymbol( p_module, "ActivateModule" ) != 0 )
+    if( CallSymbol( p_module, "ActivateModule" MODULE_SUFFIX ) != 0 )
     {
         /* We couldn't call ActivateModule() */
         free( p_module );
@@ -503,45 +621,39 @@ static int AllocatePluginModule( char * psz_filename )
         return( -1 );
     }
 
+    for( pp_shortcut = p_module->pp_shortcuts ; *pp_shortcut ; pp_shortcut++ )
+    {
+        *pp_shortcut = strdup( *pp_shortcut );
+    }
+
     /* We strdup() these entries so that they are still valid when the
      * 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_longname = strdup( p_module->psz_longname );
-    p_module->psz_version = strdup( p_module->psz_version );
+
     if( p_module->is.plugin.psz_filename == NULL 
             || p_module->psz_name == NULL
-            || p_module->psz_longname == NULL
-            || p_module->psz_version == NULL )
+            || p_module->psz_longname == NULL )
     {
         intf_ErrMsg( "module error: can't duplicate strings" );
 
-        if( p_module->is.plugin.psz_filename != NULL )
-        {
-            free( p_module->is.plugin.psz_filename );
-        }
-
-        if( p_module->psz_name != NULL )
-        {
-            free( p_module->psz_name );
-        }
-
-        if( p_module->psz_longname != NULL )
-        {
-            free( p_module->psz_longname );
-        }
-
-        if( p_module->psz_version != NULL )
-        {
-            free( p_module->psz_version );
-        }
+        free( p_module->is.plugin.psz_filename );
+        free( p_module->psz_name );
+        free( p_module->psz_longname );
+        free( p_module->psz_program );
 
         free( p_module );
         module_unload( handle );
         return( -1 );
     }
 
+    if( p_module->psz_program != NULL )
+    {
+        p_module->psz_program = strdup( p_module->psz_program );
+    }
+
     /* Everything worked fine ! The module is ready to be added to the list. */
     p_module->i_usage = 0;
     p_module->i_unused_delay = 0;
@@ -556,6 +668,7 @@ static int AllocatePluginModule( char * psz_filename )
     p_module->next = p_module_bank->first;
     p_module->prev = NULL;
     p_module_bank->first = p_module;
+    p_module_bank->i_count++;
 
     /* Immediate message so that a slow module doesn't make the user wait */
     intf_WarnMsgImm( 2, "module: new plugin module `%s', %s",
@@ -565,7 +678,14 @@ static int AllocatePluginModule( char * psz_filename )
 }
 #endif /* HAVE_DYNAMIC_PLUGINS */
 
-#ifdef ALLOCATE_ALL_BUILTINS
+/*****************************************************************************
+ * AllocateAllBuiltins: load all modules we were built with.
+ *****************************************************************************/
+static void AllocateAllBuiltins( void )
+{
+    ALLOCATE_ALL_BUILTINS();
+}
+
 /*****************************************************************************
  * AllocateBuiltinModule: initialize a built-in module.
  *****************************************************************************
@@ -598,13 +718,6 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
         return( -1 );
     }
 
-    /* Check that version numbers match */
-    if( strcmp( VLC_VERSION, p_module->psz_version ) )
-    {
-        free( p_module );
-        return( -1 );
-    }
-
     /* Check that we don't already have a module with this name */
     for( p_othermodule = p_module_bank->first ;
          p_othermodule != NULL ;
@@ -612,6 +725,9 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
     {
         if( !strcmp( p_othermodule->psz_name, p_module->psz_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 );
         }
@@ -627,36 +743,6 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
         return( -1 );
     }
 
-    /* We strdup() these entries so that they are still valid when the
-     * module is unloaded. */
-    p_module->psz_name = strdup( p_module->psz_name );
-    p_module->psz_longname = strdup( p_module->psz_longname );
-    p_module->psz_version = strdup( p_module->psz_version );
-    if( p_module->psz_name == NULL 
-            || p_module->psz_longname == NULL
-            || p_module->psz_version == NULL )
-    {
-        intf_ErrMsg( "module error: can't duplicate strings" );
-
-        if( p_module->psz_name != NULL )
-        {
-            free( p_module->psz_name );
-        }
-
-        if( p_module->psz_longname != NULL )
-        {
-            free( p_module->psz_longname );
-        }
-
-        if( p_module->psz_version != NULL )
-        {
-            free( p_module->psz_version );
-        }
-
-        free( p_module );
-        return( -1 );
-    }
-
     /* Everything worked fine ! The module is ready to be added to the list. */
     p_module->i_usage = 0;
     p_module->i_unused_delay = 0;
@@ -672,6 +758,7 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
     p_module->next = p_module_bank->first;
     p_module->prev = NULL;
     p_module_bank->first = p_module;
+    p_module_bank->i_count++;
 
     /* Immediate message so that a slow module doesn't make the user wait */
     intf_WarnMsgImm( 2, "module: new builtin module `%s', %s",
@@ -679,7 +766,6 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
 
     return( 0 );
 }
-#endif /* ALLOCATE_ALL_BUILTINS */
 
 /*****************************************************************************
  * DeleteModule: delete a module and its structure.
@@ -729,31 +815,39 @@ static int DeleteModule( module_t * p_module )
 #endif
 
     /* Unlink the module from the linked list. */
-    if( p_module == p_module_bank->first )
-    {
-        p_module_bank->first = p_module->next;
-    }
-
     if( p_module->prev != NULL )
     {
         p_module->prev->next = p_module->next;
     }
+    else
+    {
+        p_module_bank->first = p_module->next;
+    }
 
     if( p_module->next != NULL )
     {
         p_module->next->prev = p_module->prev;
     }
 
+    p_module_bank->i_count--;
+
     /* We free the structures that we strdup()ed in Allocate*Module(). */
 #ifdef HAVE_DYNAMIC_PLUGINS
     if( !p_module->b_builtin )
     {
+        char **pp_shortcut = p_module->pp_shortcuts;
+
+        for( ; *pp_shortcut ; pp_shortcut++ )
+        {
+            free( *pp_shortcut );
+        }
+
         free( p_module->is.plugin.psz_filename );
+        free( p_module->psz_name );
+        free( p_module->psz_longname );
+        free( p_module->psz_program );
     }
 #endif
-    free( p_module->psz_name );
-    free( p_module->psz_longname );
-    free( p_module->psz_version );
 
     free( p_module );
 
@@ -810,7 +904,7 @@ static int LockModule( module_t * p_module )
      * to be a bit more clever here. */
 
     /* Activate the module : fill the capability structure, etc. */
-    if( CallSymbol( p_module, "ActivateModule" ) != 0 )
+    if( CallSymbol( p_module, "ActivateModule" MODULE_SUFFIX ) != 0 )
     {
         /* We couldn't call ActivateModule() -- looks nasty, but
          * we can't do much about it. Just try to unload module. */
@@ -882,7 +976,7 @@ static int HideModule( module_t * p_module )
     }
 
     /* Deactivate the module : free the capability structure, etc. */
-    if( CallSymbol( p_module, "DeactivateModule" ) != 0 )
+    if( CallSymbol( p_module, "DeactivateModule" MODULE_SUFFIX ) != 0 )
     {
         /* We couldn't call DeactivateModule() -- looks nasty, but
          * we can't do much about it. Just try to unload module anyway. */
index ccbfa125f40129a9696764b9308b458c36f30bdd..90c399b76c8516b4237ab29926755b0c3ef1e369 100644 (file)
@@ -21,9 +21,9 @@
  *****************************************************************************/
 
 #define ALLOCATE_BUILTIN( NAME ) \
-    AllocateBuiltinModule( module_ ## NAME ## _InitModule, \
-                           module_ ## NAME ## _ActivateModule, \
-                           module_ ## NAME ## _DeactivateModule );
+    AllocateBuiltinModule( InitModule__MODULE_ ## NAME, \
+                           ActivateModule__MODULE_ ## NAME, \
+                           DeactivateModule__MODULE_ ## NAME );
 
 /* Add stuff here */
 
similarity index 51%
rename from src/misc/modules_core.h
rename to src/misc/modules_plugin.h
index 1dbcf0ef7ff9a46454ab383400ccab2974d912b2..f16a6a1533c323fb0db13fb73571a77257dfa904 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * modules_core.h : Module management functions used by the core application.
+ * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_core.h,v 1.4 2001/10/22 12:28:53 massiot Exp $
+ * $Id: modules_plugin.h,v 1.1 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -143,3 +143,91 @@ module_error( void )
 #endif
 }
 
+/*****************************************************************************
+ * STORE_SYMBOLS: store known symbols into p_symbols for plugin access.
+ *****************************************************************************/
+#ifdef TRACE
+#   define STORE_TRACE_SYMBOLS( p_symbols ) \
+        (p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
+        (p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;
+#else
+#   define STORE_TRACE_SYMBOLS( p_symbols )
+#endif
+
+#define STORE_SYMBOLS( p_symbols ) \
+    STORE_TRACE_SYMBOLS( p_symbols ) \
+    (p_symbols)->p_main = p_main; \
+    (p_symbols)->p_aout_bank = p_aout_bank; \
+    (p_symbols)->p_vout_bank = p_vout_bank; \
+    (p_symbols)->main_GetIntVariable = main_GetIntVariable; \
+    (p_symbols)->main_GetPszVariable = main_GetPszVariable; \
+    (p_symbols)->main_PutIntVariable = main_PutIntVariable; \
+    (p_symbols)->main_PutPszVariable = main_PutPszVariable; \
+    (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_WarnMsgImm = intf_WarnMsgImm; \
+    (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)->msleep = msleep; \
+    (p_symbols)->mdate = mdate; \
+    (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_ChangeArea = input_ChangeArea; \
+    (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)->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_ParsePS = input_ParsePS; \
+    (p_symbols)->input_DemuxPS = input_DemuxPS; \
+    (p_symbols)->input_DemuxTS = input_DemuxTS; \
+    (p_symbols)->input_DemuxPSI = input_DemuxPSI; \
+    (p_symbols)->input_ClockManageControl = input_ClockManageControl; \
+    (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)->UnalignedGetBits = UnalignedGetBits; \
+    (p_symbols)->UnalignedRemoveBits = UnalignedRemoveBits; \
+    (p_symbols)->UnalignedShowBits = UnalignedShowBits; \
+    (p_symbols)->DecodeLanguage = DecodeLanguage; \
+    (p_symbols)->module_Need = module_Need; \
+    (p_symbols)->module_Unneed = module_Unneed;
+    
+
index 7a053893fdd4ed79934eccf9c7098d52edcf50c3..140752c925626f7d4a30e893047f0403dfe8e2a6 100644 (file)
@@ -3,7 +3,7 @@
  * Functions are prototyped in mtime.h.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: mtime.c,v 1.26 2001/12/09 17:01:37 sam Exp $
+ * $Id: mtime.c,v 1.27 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdio.h>                                              /* sprintf() */
 
+#include <videolan/vlc.h>
+
 #if defined( PTH_INIT_IN_PTH_H )                                  /* GNU Pth */
 #   include <pth.h>
 #endif
@@ -52,9 +52,6 @@
 #   include <sys/time.h>
 #endif
 
-#include "common.h"
-#include "mtime.h"
-
 /*****************************************************************************
  * mstrtime: return a date in a readable format
  *****************************************************************************
index a0a12b689740f72e85602543ad59e59d8c667752..d8ef718b952a9f3d2fe95a83112ca492f223580e 100644 (file)
@@ -2,7 +2,7 @@
  * netutils.c: various network functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: netutils.c,v 1.53 2001/12/07 18:33:08 sam Exp $
+ * $Id: netutils.c,v 1.54 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Benoit Steiner <benny@via.ecp.fr>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <stdlib.h>                             /* free(), realloc(), atoi() */
 #include <errno.h>                                                /* errno() */
 #include <string.h>                                              /* memset() */
 
+#include <videolan/vlc.h>
+
 #ifdef STRNCASECMP_IN_STRINGS_H
 #   include <strings.h>
 #endif
 #include <sys/sockio.h>
 #endif
 
-#include "common.h"
-#include "mtime.h"
-#include "intf_msg.h"
-#include "threads.h"
+#include "netutils.h"
 
 #include "intf_playlist.h"
 
-#include "netutils.h"
-
 /*****************************************************************************
  * input_channel_t: channel library data
  *****************************************************************************
diff --git a/src/misc/tests.c b/src/misc/tests.c
deleted file mode 100644 (file)
index a44efcc..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*****************************************************************************
- * tests.c: several test functions needed by the plugins
- * Functions are prototyped in tests.h.
- *****************************************************************************
- * Copyright (C) 2000-2001 VideoLAN
- * $Id: tests.c,v 1.10 2001/12/19 03:50:22 sam Exp $
- *
- * Authors: Samuel Hocevar <sam@via.ecp.fr>
- *
- * 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 "defs.h"
-
-#include <string.h>                                    /* memcpy(), memset() */
-
-#include "common.h"
-#include "intf_msg.h"
-#include "tests.h"
-
-/*****************************************************************************
- * TestProgram: tests if the given string equals the program name
- *****************************************************************************/
-int TestProgram( char * psz_program )
-{
-    return( !strcmp( psz_program, p_main->psz_arg0 ) );
-}
-
-/*****************************************************************************
- * TestMethod: tests if the given method was requested
- *****************************************************************************/
-int TestMethod( char * psz_var, char * psz_method )
-{
-    int   i_len = strlen( psz_method );
-    int   i_index = 0;
-    char *psz_requested = main_GetPszVariable( psz_var, "" );
-
-    while( psz_requested[i_index] && psz_requested[i_index] != ':' )
-    {
-        i_index++;
-    }
-
-    if( i_index != i_len )
-    {
-        return 0;
-    }
-
-    return !strncmp( psz_method, psz_requested, i_len );
-}
-
-/*****************************************************************************
- * TestCPU: tests if the processor has MMX support and other capabilities
- *****************************************************************************/
-int TestCPU( int i_capabilities )
-{
-    return( (i_capabilities & p_main->i_cpu_capabilities) == i_capabilities );
-}
-
index 8121458d21f440176aedda76edcff2235f80b91a..9c4396e6289b6792a7c2bc203ce3e7169603ee42 100644 (file)
@@ -2,7 +2,7 @@
  * win32_specific.c: Win32 specific features 
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: win32_specific.c,v 1.4 2001/12/09 17:01:37 sam Exp $
+ * $Id: win32_specific.c,v 1.5 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include "defs.h"
-
 #include <string.h>                                              /* strdup() */
 #include <stdlib.h>                                                /* free() */
 #include <fcntl.h>
 
 #include <winsock2.h>
 
-#include "common.h"
-
-#include "win32_specific.h"
+#include <videolan/vlc.h>
 
 /*****************************************************************************
  * system_Init: initialize winsock.
index c31e67f7a640c84405458fd668b53787b8961e94..ee8bfac532f333a6a2ac38cfbe32e531c2e3ef4b 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.148 2001/12/16 16:18:36 sam Exp $
+ * $Id: video_output.c,v 1.149 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_SYS_TIMES_H
 #   include <sys/times.h>
 #endif
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "modules.h"
-
 #include "video.h"
 #include "video_output.h"
 
@@ -55,6 +49,7 @@ 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      ReduceHeight      ( int );
 
 /*****************************************************************************
  * vout_InitBank: initialize the video output bank.
@@ -110,7 +105,11 @@ vout_thread_t * vout_CreateThread   ( int *pi_status,
     }
 
     /* Choose the best module */
-    p_vout->p_module = module_Need( MODULE_CAPABILITY_VOUT, NULL );
+    p_vout->p_module =
+        module_Need( MODULE_CAPABILITY_VOUT,
+                     main_GetPszVariable( VOUT_FILTER_VAR,
+                         main_GetPszVariable( VOUT_METHOD_VAR, NULL ) ),
+                     NULL );
 
     if( p_vout->p_module == NULL )
     {
@@ -242,7 +241,8 @@ void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status )
  *****************************************************************************/
 static int InitThread( vout_thread_t *p_vout )
 {
-    int i_index;
+    int i, i_pgcd;
+    probedata_t data;
 
     /* Update status */
     *p_vout->pi_status = THREAD_START;
@@ -269,6 +269,22 @@ static int InitThread( vout_thread_t *p_vout )
         return( 1 );
     }
 
+    intf_WarnMsg( 1, "vout info: 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 %i, "
+                     "aspect ratio %i:%i",
+                  p_vout->render.i_width, p_vout->render.i_height,
+                  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 %i, "
+                     "aspect ratio %i:%i",
+                  p_vout->output.i_width, p_vout->output.i_height,
+                  p_vout->output.i_chroma, p_vout->output.i_aspect / i_pgcd,
+                  VOUT_ASPECT_FACTOR / i_pgcd );
+
     /* Check whether we managed to create direct buffers similar to
      * the render buffers, ie same size, chroma and aspect ratio */
     if( ( p_vout->output.i_width == p_vout->render.i_width )
@@ -276,33 +292,70 @@ static int InitThread( vout_thread_t *p_vout )
      && ( p_vout->output.i_chroma == p_vout->render.i_chroma )
      && ( p_vout->output.i_aspect == p_vout->render.i_aspect ) )
     {
+        /* Cool ! We have direct buffers, we can ask the decoder to
+         * directly decode into them ! Map the first render buffers to
+         * the first direct buffers, but keep the first direct buffer
+         * for memcpy operations */
         p_vout->b_direct = 1;
 
-        /* Map the first render buffers to the first direct buffers, but
-         * leave the first direct buffer for memcpy operations */
-        i_index = 1;
+        intf_WarnMsg( 2, "vout info: 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++ )
+        {
+            PP_RENDERPICTURE[ I_RENDERPICTURES ] = &p_vout->p_picture[ i ];
+            I_RENDERPICTURES++;
+        }
+
     }
     else
     {
+        /* Rats... Something is wrong here, we could not find an output
+         * plugin able to directly render what we decode. See if we can
+         * find a chroma plugin to do the conversion */
         p_vout->b_direct = 0;
 
-        /* Append render buffers after the direct buffers */
-        i_index = I_RENDERPICTURES;
-    }
+        /* Choose the best module */
+        data.chroma.p_render = &p_vout->render;
+        data.chroma.p_output = &p_vout->output;
+        p_vout->chroma.p_module
+            = module_Need( MODULE_CAPABILITY_CHROMA, NULL, &data );
 
-    for( ; i_index < VOUT_MAX_PICTURES; i_index++ )
-    {
-        PP_RENDERPICTURE[ I_RENDERPICTURES ] = &p_vout->p_picture[ i_index ];
-        I_RENDERPICTURES++;
-    }
+        if( p_vout->chroma.p_module == NULL )
+        {
+            intf_ErrMsg( "vout error: no suitable chroma module" );
+            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 );
-    intf_WarnMsg( 1, "vout info: picture in %ix%i chroma %i aspect ratio %i",
-                  p_vout->render.i_width, p_vout->render.i_height,
-                  p_vout->render.i_chroma, p_vout->render.i_aspect );
-    intf_WarnMsg( 1, "vout info: picture out %ix%i chroma %i aspect ratio %i",
-                  p_vout->output.i_width, p_vout->output.i_height,
-                  p_vout->output.i_chroma, p_vout->output.i_aspect );
+#define f p_vout->chroma.p_module->p_functions->chroma.functions.chroma
+        p_vout->chroma.pf_init       = f.pf_init;
+        p_vout->chroma.pf_end        = f.pf_end;
+#undef f
+
+        if( p_vout->chroma.pf_init( p_vout ) )
+        {
+            intf_ErrMsg( "vout error: could not initialize chroma module" );
+            module_Unneed( p_vout->chroma.p_module );
+            p_vout->pf_end( p_vout );
+            vlc_mutex_unlock( &p_vout->change_lock );
+            return( 1 );
+        }
+
+        intf_WarnMsg( 2, "vout info: mapping "
+                         "render pictures %i-%i to system pictures %i-%i",
+                         I_OUTPUTPICTURES - 1, VOUT_MAX_PICTURES - 2,
+                         I_OUTPUTPICTURES, VOUT_MAX_PICTURES - 1 );
+
+        /* Append render buffers after the direct buffers */
+        for( i = I_OUTPUTPICTURES; i < VOUT_MAX_PICTURES; i++ )
+        {
+            PP_RENDERPICTURE[ I_RENDERPICTURES ] = &p_vout->p_picture[ i ];
+            I_RENDERPICTURES++;
+        }
+    }
 
     /* Mark thread as running and return */
     p_vout->b_active = 1;
@@ -563,6 +616,12 @@ static void EndThread( vout_thread_t *p_vout )
     }
 #endif
 
+    if( !p_vout->b_direct )
+    {
+        p_vout->chroma.pf_end( p_vout );
+        module_Unneed( p_vout->chroma.p_module );
+    }
+
     /* Destroy all remaining pictures */
     for( i_index = 0; i_index < VOUT_MAX_PICTURES; i_index++ )
     {
@@ -614,3 +673,33 @@ static void DestroyThread( vout_thread_t *p_vout, int i_status )
     *pi_status = i_status;
 }
 
+static int ReduceHeight( int i_ratio )
+{
+    int i_dummy = VOUT_ASPECT_FACTOR;
+    int i_pgcd  = 1;
+    /* VOUT_ASPECT_FACTOR is (2^7 * 3^3 * 5^3), we just check for 2, 3 and 5 */
+    while( !(i_ratio & 1) && !(i_dummy & 1) )
+    {
+        i_ratio >>= 1;
+        i_dummy >>= 1;
+        i_pgcd  <<= 1;
+    }
+
+    while( !(i_ratio % 3) && !(i_ratio % 3) )
+    {
+        i_ratio /= 3;
+        i_dummy /= 3;
+        i_pgcd  *= 3;
+    }
+
+    while( !(i_ratio % 5) && !(i_ratio % 5) )
+    {
+        i_ratio /= 5;
+        i_dummy /= 5;
+        i_pgcd  *= 5;
+    }
+
+    return i_pgcd;
+}
+
index 0010d86290d942749bb62412bf776e3e17760aa0..c0dbd82a2fa59ab6346e4e0e375d853f62df1284 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_text.c,v 1.32 2001/12/09 17:01:37 sam Exp $
+ * $Id: video_text.c,v 1.33 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                  /* errno */
 #include <stdlib.h>                                                /* free() */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 #include <fcntl.h>                                                 /* open() */
 
+#include <videolan/vlc.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>                                    /* read(), close() */
 #elif defined( _MSC_VER ) && defined( _WIN32 )
 #   include <io.h>
 #endif
 
-#ifdef SYS_BEOS
-#   include "beos_specific.h"
-#endif
-
-#ifdef SYS_DARWIN
-#   include "darwin_specific.h"
-#endif
-
 #if defined( WIN32 )
 #   include <io.h>
 #endif
 
-#include "common.h"
 #include "video_text.h"
 
-#include "intf_msg.h"
-
 /*****************************************************************************
  * vout_font_t: bitmap font
  *****************************************************************************
index 8243cd7fd6ca91ee25d1cf85742e87b4b84f28ba..78ff003f69fbf5c6eb834cad13e58f1b6b1289bf 100644 (file)
@@ -2,7 +2,7 @@
  * vout_pictures.c : picture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.5 2001/12/19 03:50:22 sam Exp $
+ * $Id: vout_pictures.c,v 1.6 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
@@ -161,7 +156,6 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
                 p_picture->b_top_field_first = b_top_field_first;
 
                 p_vout->i_heap_size++;
-
                 vlc_mutex_unlock( &p_vout->picture_lock );
                 return( p_picture );
 
@@ -339,7 +333,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
                  * subtitles. */
                 for( i_index = 0 ; i_index < p_picture->i_planes ; i_index++ )
                 {
-                    p_main->fast_memcpy(
+                    FAST_MEMCPY(
                         PP_OUTPUTPICTURE[0]->planes[ i_index ].p_data,
                         p_picture->planes[ i_index ].p_data,
                         p_picture->planes[ i_index ].i_bytes );
@@ -376,9 +370,9 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
                     //printf("memcpy (not a direct buffer)\n");
         for( i_index = 0; i_index < p_picture->i_planes; i_index++ )
         {
-            p_main->fast_memcpy( PP_OUTPUTPICTURE[0]->planes[ i_index ].p_data,
-                                 p_picture->planes[ i_index ].p_data,
-                                 p_picture->planes[ i_index ].i_bytes );
+            FAST_MEMCPY( PP_OUTPUTPICTURE[0]->planes[ i_index ].p_data,
+                         p_picture->planes[ i_index ].p_data,
+                         p_picture->planes[ i_index ].i_bytes );
         }
 
         vout_RenderSubPictures( p_vout, PP_OUTPUTPICTURE[0], p_subpic );
@@ -393,8 +387,9 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_picture,
     /* This usually means software YUV, or hardware YUV with a
      * different chroma. */
 
+    /* XXX: render to the first direct buffer */
                     //printf("render (not a direct buffer)\n");
-    /* XXX: render to direct buffer */
+    p_vout->chroma.pf_convert( p_vout, p_picture, &p_vout->p_picture[0] );
 
     vout_RenderSubPictures( p_vout, p_picture, p_subpic );
 
@@ -456,26 +451,40 @@ void vout_PlacePicture( vout_thread_t *p_vout, int i_width, int i_height,
 void vout_AllocatePicture( picture_t *p_picture,
                            int i_width, int i_height, int i_chroma )
 {
-    int i_data_size = 0;
-
-    p_picture->i_size = i_width * i_height;
+#define P p_picture->planes
+    int i_bytes, i_index;
 
     /* Calculate coordinates */
     switch( i_chroma )
     {
         case YUV_420_PICTURE:        /* YUV 420: 1,1/4,1/4 samples per pixel */
-            p_picture->i_chroma_size = p_picture->i_size / 4;
-            p_picture->i_chroma_width = i_width / 2;
+            P[ Y_PLANE ].i_bytes = i_width * i_height;
+            P[ Y_PLANE ].i_line_bytes = i_width;
+            P[ U_PLANE ].i_bytes = i_width * i_height / 4;
+            P[ U_PLANE ].i_line_bytes = i_width / 2;
+            P[ V_PLANE ].i_bytes = i_width * i_height / 4;
+            P[ V_PLANE ].i_line_bytes = i_width / 2;
+            p_picture->i_planes = 3;
             break;
 
         case YUV_422_PICTURE:        /* YUV 422: 1,1/2,1/2 samples per pixel */
-            p_picture->i_chroma_size = p_picture->i_size / 2;
-            p_picture->i_chroma_width = i_width / 2;
+            P[ Y_PLANE ].i_bytes = i_width * i_height;
+            P[ Y_PLANE ].i_line_bytes = i_width;
+            P[ U_PLANE ].i_bytes = i_width * i_height / 2;
+            P[ U_PLANE ].i_line_bytes = i_width / 2;
+            P[ V_PLANE ].i_bytes = i_width * i_height / 2;
+            P[ V_PLANE ].i_line_bytes = i_width / 2;
+            p_picture->i_planes = 3;
             break;
 
         case YUV_444_PICTURE:            /* YUV 444: 1,1,1 samples per pixel */
-            p_picture->i_chroma_size = p_picture->i_size;
-            p_picture->i_chroma_width = i_width;
+            P[ Y_PLANE ].i_bytes = i_width * i_height;
+            P[ Y_PLANE ].i_line_bytes = i_width;
+            P[ U_PLANE ].i_bytes = i_width * i_height;
+            P[ U_PLANE ].i_line_bytes = i_width;
+            P[ V_PLANE ].i_bytes = i_width * i_height;
+            P[ V_PLANE ].i_line_bytes = i_width;
+            p_picture->i_planes = 3;
             break;
 
         default:
@@ -484,45 +493,24 @@ void vout_AllocatePicture( picture_t *p_picture,
             return;
     }
 
-    /* Allocate memory */
-    switch( i_chroma )
+    /* Calculate how big the new image should be */
+    for( i_bytes = 0, i_index = 0; i_index < p_picture->i_planes; i_index++ )
     {
-        case YUV_420_PICTURE:        /* YUV 420: 1,1/4,1/4 samples per pixel */
-        case YUV_422_PICTURE:        /* YUV 422: 1,1/2,1/2 samples per pixel */
-        case YUV_444_PICTURE:            /* YUV 444: 1,1,1 samples per pixel */
-
-            i_data_size = p_picture->i_size + 2 * p_picture->i_chroma_size;
-
-            /* The Y plane */
-            p_picture->planes[ Y_PLANE ].i_bytes =
-                 p_picture->i_size * sizeof(pixel_data_t);
-            p_picture->planes[ Y_PLANE ].i_line_bytes =
-                 i_width * sizeof(pixel_data_t);
-            p_picture->planes[ Y_PLANE ].p_data =
-                 memalign( 16, i_data_size * sizeof(pixel_data_t) * 4 );
-            /* The U plane */
-            p_picture->planes[ U_PLANE ].i_bytes =
-                 p_picture->i_chroma_size * sizeof(pixel_data_t);
-            p_picture->planes[ U_PLANE ].i_line_bytes =
-                 p_picture->i_chroma_width * sizeof(pixel_data_t);
-            p_picture->planes[ U_PLANE ].p_data =
-                 p_picture->planes[ Y_PLANE ].p_data + p_picture->i_size;
-            /* The V plane */
-            p_picture->planes[ V_PLANE ].i_bytes =
-                 p_picture->i_chroma_size * sizeof(pixel_data_t);
-            p_picture->planes[ V_PLANE ].i_line_bytes =
-                 p_picture->i_chroma_width * sizeof(pixel_data_t);
-            p_picture->planes[ V_PLANE ].p_data =
-                 p_picture->planes[ U_PLANE ].p_data + p_picture->i_chroma_size;
+        i_bytes += P[ i_index ].i_bytes;
+    }
 
-            p_picture->i_planes = 3;
+    P[ 0 ].p_data = memalign( 16, i_bytes );
 
-            break;
-
-        default:
-            p_picture->i_planes = 0;
+    if( P[ 0 ].p_data == NULL )
+    {
+        p_picture->i_planes = 0;
+        return;
+    }
 
-            break;
+    /* Fill the p_data field for each plane */
+    for( i_index = 1; i_index < p_picture->i_planes; i_index++ )
+    {
+        P[ i_index ].p_data = P[ i_index-1 ].p_data + P[ i_index-1 ].i_bytes;
     }
 }
 
index 542d9298a510ffdd807d075a4ead9a8caebc7d99..99147692b78bb188540a56c8ffc43166e597102f 100644 (file)
@@ -2,7 +2,7 @@
  * vout_subpictures.c : subpicture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_subpictures.c,v 1.2 2001/12/13 12:47:17 sam Exp $
+ * $Id: vout_subpictures.c,v 1.3 2001/12/30 07:09:56 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                                /* free() */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"