N: Wade Majors
E: guru@startrek.com
-D: BeOS testing and icon integration
+D: BeOS testing, icon integration, debugging and fixes
N: Christophe Massiot
E: massiot@via.ecp.fr
HEAD
- * Got rid of the sleep() hack in beos_specific.cpp
+ * Beginning of the built-in modules support.
+ * Got rid of the sleep() hack in beos_specific.cpp.
* Fixed a segfault when launched without argument under Darwin.
* Fix for Darwin program path handling.
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) main makefile
+# (c)1998 VideoLAN
+###############################################################################
+# This makefile is the main makefile for the VideoLAN client.
+###############################################################################
+
+include Makefile.opts
+
+###############################################################################
+# Objects and files
+###############################################################################
+
+#
+# All possible plugin directories, needed for make clean
+#
+PLUGINS_DIR := alsa beos darwin dsp dummy \
+ dvd esd fb ggi glide gnome gtk \
+ idct \
+ macosx mga \
+ motion \
+ mpeg null qt sdl \
+ text x11 yuv
+
+#
+# All possible plugin objects
+#
+PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin dsp/dsp dummy/dummy \
+ dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gnome/gnome gtk/gtk \
+ idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext \
+ macosx/macosx mga/mga \
+ motion/motion motion/motionmmx motion/motionmmxext \
+ mpeg/ps mpeg/ts null/null qt/qt sdl/sdl \
+ text/text x11/x11 yuv/yuv yuv/yuvmmx
+
+#
+# Translate plugin names
+#
+PLUGINS_OBJ := $(shell for i in $(PLUGINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed 's@.*/\('$$i'\) .*@lib/\1.so@ ; s@^ .*@@' ; done)
+BUILTINS_OBJ := $(shell for i in $(BUILTINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed 's@.*/\('$$i'\) .*@lib/\1.a@ ; s@^ .*@@' ; done)
+
+#
+# C Objects
+#
+INTERFACE = src/interface/main.o \
+ src/interface/interface.o \
+ src/interface/intf_msg.o \
+ src/interface/intf_cmd.o \
+ src/interface/intf_ctrl.o \
+ src/interface/intf_playlist.o \
+ src/interface/intf_channels.o \
+ src/interface/intf_console.o \
+ src/interface/intf_urldecode.o \
+
+INPUT = src/input/input_ext-dec.o \
+ src/input/input_ext-intf.o \
+ src/input/input_dec.o \
+ src/input/input_programs.o \
+ src/input/input_netlist.o \
+ src/input/input_clock.o \
+ src/input/input.o \
+ src/input/mpeg_system.o
+
+AUDIO_OUTPUT = src/audio_output/audio_output.o \
+ src/audio_output/aout_fifo.o \
+ src/audio_output/aout_u8.o \
+ src/audio_output/aout_s8.o \
+ src/audio_output/aout_u16.o \
+ src/audio_output/aout_s16.o
+
+VIDEO_OUTPUT = src/video_output/video_output.o \
+ src/video_output/video_text.o \
+ src/video_output/video_spu.o \
+ src/video_output/video_yuv.o
+
+AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
+ src/ac3_decoder/ac3_decoder.o \
+ src/ac3_decoder/ac3_parse.o \
+ src/ac3_decoder/ac3_exponent.o \
+ src/ac3_decoder/ac3_bit_allocate.o \
+ src/ac3_decoder/ac3_mantissa.o \
+ src/ac3_decoder/ac3_rematrix.o \
+ src/ac3_decoder/ac3_imdct.o \
+ src/ac3_decoder/ac3_downmix.o \
+ src/ac3_decoder/ac3_downmix_c.o
+
+LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
+ src/lpcm_decoder/lpcm_decoder.o
+
+AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
+ src/audio_decoder/adec_generic.o \
+ src/audio_decoder/adec_layer1.o \
+ src/audio_decoder/adec_layer2.o \
+ src/audio_decoder/adec_math.o
+
+SPU_DECODER = src/spu_decoder/spu_decoder.o
+
+#GEN_DECODER = src/generic_decoder/generic_decoder.o
+
+VIDEO_PARSER = src/video_parser/video_parser.o \
+ src/video_parser/vpar_headers.o \
+ src/video_parser/vpar_blocks.o \
+ src/video_parser/vpar_synchro.o \
+ src/video_parser/video_fifo.o
+
+VIDEO_DECODER = src/video_decoder/video_decoder.o
+
+MISC = src/misc/mtime.o \
+ src/misc/tests.o \
+ src/misc/rsc_files.o \
+ src/misc/modules.o \
+ src/misc/netutils.o
+
+C_OBJ = $(INTERFACE) \
+ $(INPUT) \
+ $(VIDEO_OUTPUT) \
+ $(AUDIO_OUTPUT) \
+ $(AC3_DECODER) \
+ $(LPCM_DECODER) \
+ $(AUDIO_DECODER) \
+ $(SPU_DECODER) \
+ $(GEN_DECODER) \
+ $(VIDEO_PARSER) \
+ $(VIDEO_DECODER) \
+ $(MISC)
+
+#
+# Misc Objects
+#
+ifeq ($(GETOPT),1)
+C_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o
+endif
+
+ifeq ($(SYS),beos)
+CPP_OBJ = src/misc/beos_specific.o
+endif
+
+ifneq (,$(findstring darwin,$(SYS)))
+C_OBJ += src/misc/darwin_specific.o
+endif
+
+#
+# Generated header
+#
+H_OBJ = include/modules_builtin.h
+
+#
+# Other lists of files
+#
+objects := $(C_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+cppobjects := $(CPP_OBJ)
+cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
+
+# All symbols must be exported
+export
+
+###############################################################################
+# Targets
+###############################################################################
+
+#
+# Virtual targets
+#
+all: vlc ${ALIASES} plugins vlc.app
+
+clean:
+ for d in $(PLUGINS_DIR) ; do ( cd plugins/$${d} && make clean ) ; done
+ rm -f $(C_OBJ) $(CPP_OBJ)
+ rm -f src/*/*.o extras/*/*.o
+ rm -f lib/*.so lib/*.a vlc gnome-vlc gvlc kvlc qvlc
+ rm -rf vlc.app
+
+distclean: clean
+ rm -f **/*.o **/*~ *.log
+ rm -f Makefile.opts Makefile.modules
+ rm -f include/defs.h include/config.h include/modules_builtin.h
+ rm -f config.status config.cache config.log
+ rm -f gmon.out core build-stamp
+ rm -Rf .dep
+ rm -f .gdb_history
+
+install:
+ mkdir -p $(DESTDIR)$(bindir)
+ $(INSTALL) vlc $(DESTDIR)$(bindir)
+# ugly
+ for alias in "" ${ALIASES} ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
+ mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
+ $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
+ mkdir -p $(DESTDIR)$(datadir)/videolan
+ $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
+ $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
+ $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
+
+show:
+ @echo CC: $(CC)
+ @echo CFLAGS: $(CFLAGS)
+ @echo DCFLAGS: $(DCFLAGS)
+ @echo LCFLAGS: $(LCFLAGS)
+ @echo C_OBJ: $(C_OBJ)
+ @echo CPP_OBJ: $(CPP_OBJ)
+ @echo objects: $(objects)
+ @echo cppobjects: $(cppobjects)
+ @echo PLUGINS_OBJ: $(PLUGINS_OBJ)
+ @echo BUILTINS_OBJ: $(BUILTINS_OBJ)
+
+# ugliest of all, but I have no time to do it -- sam
+snapshot:
+ rm -Rf /tmp/vlc-${PROGRAM_VERSION}* /tmp/vlc-${PROGRAM_VERSION}nocss*
+ # copy archive in /tmp
+ find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
+ do mkdir -p /tmp/vlc-${PROGRAM_VERSION}/$$i ; \
+ done
+ find debian -mindepth 1 -maxdepth 1 -type d | \
+ while read i ; do rm -Rf /tmp/vlc-${PROGRAM_VERSION}/$$i ; done
+ # .c .h .in .cpp
+ find include src plugins -type f -name '*.[chi]*' | while read i ; \
+ do cp $$i /tmp/vlc-${PROGRAM_VERSION}/$$i ; \
+ done
+ # extra files
+ cp -a extras/* /tmp/vlc-${PROGRAM_VERSION}/extras
+ cp -a doc/* /tmp/vlc-${PROGRAM_VERSION}/doc
+ find /tmp/vlc-${PROGRAM_VERSION}/extras \
+ /tmp/vlc-${PROGRAM_VERSION}/doc \
+ -type d -name CVS | while read i ; \
+ do rm -Rf $$i ; \
+ done
+ # copy misc files
+ cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO todo.pl \
+ Makefile Makefile.opts.in Makefile.dep Makefile.modules \
+ configure configure.in install-sh config.sub config.guess \
+ /tmp/vlc-${PROGRAM_VERSION}/
+ for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
+ changelog changelog-css rules rules-css vlc.dirs \
+ vlc.menu ; do \
+ cp debian/$$file /tmp/vlc-${PROGRAM_VERSION}/debian/ ; \
+ done
+ for file in default8x16.psf default8x9.psf vlc_beos.rsrc ; do \
+ cp share/$$file /tmp/vlc-${PROGRAM_VERSION}/share/ ; done
+ for icon in vlc gvlc qvlc gnome-vlc kvlc ; do \
+ cp share/$$icon.xpm share/$$icon.png \
+ /tmp/vlc-${PROGRAM_VERSION}/share/ ; done
+
+ # build css-enabled archives
+ (cd /tmp ; tar cf vlc-${PROGRAM_VERSION}.tar vlc-${PROGRAM_VERSION} ; \
+ bzip2 -f -9 < vlc-${PROGRAM_VERSION}.tar \
+ > vlc-${PROGRAM_VERSION}.tar.bz2 ; \
+ gzip -f -9 vlc-${PROGRAM_VERSION}.tar )
+ mv /tmp/vlc-${PROGRAM_VERSION}.tar.gz \
+ /tmp/vlc-${PROGRAM_VERSION}.tar.bz2 ..
+
+ # clean up
+ rm -Rf /tmp/vlc-${PROGRAM_VERSION}*
+
+.PHONY: vlc.app
+vlc.app:
+ifneq (,$(findstring darwin,$(SYS)))
+ rm -rf vlc.app
+ mkdir -p vlc.app/Contents/Resources
+ mkdir -p vlc.app/Contents/MacOS/lib
+ mkdir -p vlc.app/Contents/MacOS/share
+ $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
+ $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
+ $(INSTALL) vlc vlc.app/Contents/MacOS/
+ $(INSTALL) share/vlc.icns vlc.app/Contents/Resources/
+ $(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
+ $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
+endif
+
+FORCE:
+
+#
+# GTK/Gnome aliases - don't add too many aliases which could bloat
+# the namespace
+#
+gnome-vlc gvlc kvlc qvlc: vlc
+ rm -f $@ && ln -s vlc $@
+
+#
+# Generic rules (see below)
+#
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f Makefile.dep $@
+
+$(cppdependancies): %.dpp: FORCE
+ @$(MAKE) -s --no-print-directory -f Makefile.dep $@
+
+$(H_OBJ): Makefile.opts Makefile
+ rm -f $@ && cp $@.in $@
+ 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 *);" >> $@ ; \
+ done
+ echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@ ;
+ echo "{ \\" >> $@ ;
+ for i in $(BUILTINS) ; do \
+ echo " ALLOCATE_BUILTIN("$$i"); \\" >> $@ ; \
+ done
+ echo "};" >> $@ ;
+
+$(C_OBJ): %.o: Makefile.dep
+$(C_OBJ): %.o: .dep/%.d
+$(C_OBJ): %.o: %.c
+ifneq (,$(findstring darwin,$(SYS)))
+#this is uglier of all
+ @if test "src/ac3_decoder/ac3_imdct.c" = "$<"; then $(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<; echo "(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<"; else $(CC) $(CFLAGS) -c -o $@ $<; echo "$(CC) $(CFLAGS) -c -o $@ $<"; fi
+else
+ $(CC) $(CFLAGS) -c -o $@ $<
+endif
+
+$(CPP_OBJ): %.o: Makefile.dep
+$(CPP_OBJ): %.o: .dep/%.dpp
+$(CPP_OBJ): %.o: %.cpp
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+#
+# Main application target
+#
+vlc: $(H_OBJ) $(C_OBJ) $(CPP_OBJ) $(BUILTINS_OBJ)
+ $(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(BUILTINS_OBJ) $(LCFLAGS)
+ifeq ($(SYS),beos)
+ rm -f ./lib/_APP_
+ ln -s ../vlc ./lib/_APP_
+ xres -o $@ ./share/vlc_beos.rsrc
+ mimeset -f $@
+endif
+
+#
+# Plugins target
+#
+plugins: $(PLUGINS_OBJ)
+$(PLUGINS_OBJ): FORCE
+ cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed 's@.* \([^/]*/\)'$(@:lib/%.so=%)' .*@plugins/\1@ ; s@^ .*@@') && make $(@:%=../../%)
+
+#
+# Built-in modules target
+#
+builtins: $(BUILTINS_OBJ)
+$(BUILTINS_OBJ): FORCE
+ cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed 's@.* \([^/]*/\)'$(@:lib/%.a=%)' .*@plugins/\1@ ; s@^ .*@@') && make $(@:%=../../%)
+
################################################################################
# This Makefile is dedicated to build of .d files. It should not be called
# directly by user, but only through main Makefile.
-# See notes at the end of the main makefile for explanations.
################################################################################
+###############################################################################
+# Note on generic rules and dependancies
+###############################################################################
+
+# Note on dependancies: each .c file is associated with a .d file, which
+# depends of it. The .o file associated with a .c file depends of the .d, of the
+# .c itself, and of Makefile. The .d files are stored in a separate .dep/
+# directory.
+# The dep directory should be ignored by CVS.
+
+# Note on inclusions: depending of the target, the dependancies files must
+# or must not be included. The problem is that if we ask make to include a file,
+# and this file does not exist, it is made before it can be included. In a
+# general way, a .d file should be included if and only if the corresponding .o
+# needs to be re-made.
+
+# The object Makefile knows how to make a .o from a .c, and includes
+# dependancies for the target, but only those required.
+
# All settings and options are passed through main Makefile
################################################################################
+++ /dev/null
-################################################################################
-# vlc (VideoLAN Client) main makefile
-# (c)1998 VideoLAN
-################################################################################
-# This makefile is the main makefile for the VideoLAN client.
-################################################################################
-
-################################################################################
-# Configuration
-################################################################################
-
-# Debugging mode on or off (set to 1 to activate)
-DEBUG=@DEBUG@
-STATS=@STATS@
-OPTIMS=@OPTIMS@
-
-SYS=@SYS@
-PLUGINS=@PLUGINS@
-INSTALL=@INSTALL@
-ARCH=@ARCH@
-
-exec_prefix=@exec_prefix@
-prefix=@prefix@
-bindir=@bindir@
-datadir=@datadir@
-libdir=@libdir@
-
-CC=@CC@
-SHELL=@SHELL@
-
-#----------------- do not change anything below this line ----------------------
-
-################################################################################
-# Configuration pre-processing
-################################################################################
-
-# PROGRAM_OPTIONS is an identification string of the compilation options
-PROGRAM_OPTIONS = $(SYS) $(ARCH)
-ifeq ($(DEBUG),1)
-PROGRAM_OPTIONS += DEBUG
-DEFINE += -DDEBUG
-endif
-ifeq ($(STATS),1)
-PROGRAM_OPTIONS += DEBUG
-DEFINE += -DSTATS
-endif
-
-# PROGRAM_BUILD is a complete identification of the build
-# (we can't use fancy options with date since OSes like Solaris
-# or FreeBSD have strange date implementations)
-ifeq ($(SYS),beos)
-# XXX: beos does not support hostname (how lame...)
-PROGRAM_BUILD = `date` $(USER)
-else
-PROGRAM_BUILD = `date` $(USER)@`hostname`
-endif
-
-# DEFINE will contain some of the constants definitions decided in Makefile,
-# including SYS_xx. It will be passed to C compiler.
-DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr '[a-z].' '[A-Z]_')
-
-# On Linux activate 64-bit off_t (by default under BSD)
-ifneq (,$(findstring linux,$(SYS)))
-DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
-endif
-
-################################################################################
-# Tuning and other variables - do not change anything except if you know
-# exactly what you are doing
-################################################################################
-
-#
-# C headers directories
-#
-INCLUDE += @INCLUDE@
-INCLUDE += -Iinclude -Iextras -I/usr/local/include
-
-#
-# Libraries
-#
-LIB = @LIB@ -L/usr/local/lib
-
-ifeq ($(SYS),beos)
-LIB += -lbe -lroot -lgame
-else
-LIB += -lm
-endif
-
-#
-# C compiler flags: mainstream compilation
-#
-CFLAGS += $(DEFINE) $(INCLUDE)
-CFLAGS += -Wall -Winline
-CFLAGS += -D_REENTRANT
-CFLAGS += -D_GNU_SOURCE
-
-# flags needed for clean beos compilation
-ifeq ($(SYS),beos)
-CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
-endif
-
-ifneq (,$(findstring darwin,$(SYS)))
-CFLAGS += -traditional-cpp
-endif
-
-# Optimizations : don't compile debug versions with them
-ifeq ($(OPTIMS),1)
-CFLAGS += -O3
-CFLAGS += -ffast-math -funroll-loops
-CFLAGS += -fomit-frame-pointer
-
-# Optimizations for x86 familiy
-ifneq (,$(findstring 86,$(ARCH)))
-# Optional Pentium Pro optimizations
-ifneq (,$(findstring ppro,$(ARCH)))
-CFLAGS += -march=pentiumpro -mcpu=pentiumpro
-else
-CFLAGS += -march=pentium -mcpu=pentium
-endif
-endif
-
-# Optimizations for PowerPC
-ifneq (,$(findstring powerpc,$(ARCH)))
-CFLAGS += -mmultiple -mhard-float -mstring
-endif
-
-# Optimizations for Sparc
-ifneq (,$(findstring sparc,$(ARCH)))
-CFLAGS += -mhard-float
-endif
-
-#end of optimisations
-endif
-
-# Optional MMX optimizations for x86
-ifneq (,$(findstring mmx,$(ARCH)))
-CFLAGS += -DHAVE_MMX
-endif
-
-#
-# C compiler flags: plugin compilation
-#
-PCFLAGS += -fPIC
-
-#
-# C compiler flags: plugin linking
-#
-ifneq (,$(findstring darwin,$(SYS)))
-PLCFLAGS += -bundle -undefined suppress
-else
-ifeq ($(SYS),beos)
-PLCFLAGS += -nostart plugins/_APP_
-else
-PLCFLAGS += -shared
-endif
-endif
-
-#
-# C compiler flags: dependancies
-#
-DCFLAGS += $(INCLUDE)
-DCFLAGS += -MM
-
-#
-# C compiler flags: linking
-#
-LCFLAGS += @LCFLAGS@ $(LIB)
-LCFLAGS += -Wall
-#LCFLAGS += -s
-
-ifeq ($(SYS),beos)
-LCFLAGS += -Xlinker -soname=_APP_
-else
-ifneq (,$(findstring qnx,$(SYS)))
-LCFLAGS += -Xlinker -export-dynamic
-else
-ifneq (,$(findstring darwin,$(SYS)))
-LCFLAGS += -dyn
-else
-LCFLAGS += --export-dynamic
-endif
-endif
-endif
-
-#
-# Debugging and profiling support (unless optimisations are active)
-#
-ifneq ($(OPTIMS),1)
-CFLAGS += -g
-endif
-
-#################################################################################
-# Objects and files
-#################################################################################
-
-#
-# C Objects
-#
-INTERFACE = src/interface/main.o \
- src/interface/interface.o \
- src/interface/intf_msg.o \
- src/interface/intf_cmd.o \
- src/interface/intf_ctrl.o \
- src/interface/intf_playlist.o \
- src/interface/intf_channels.o \
- src/interface/intf_console.o \
- src/interface/intf_urldecode.o \
-
-INPUT = src/input/input_ext-dec.o \
- src/input/input_ext-intf.o \
- src/input/input_dec.o \
- src/input/input_programs.o \
- src/input/input_netlist.o \
- src/input/input_clock.o \
- src/input/input.o \
- src/input/mpeg_system.o
-
-AUDIO_OUTPUT = src/audio_output/audio_output.o \
- src/audio_output/aout_fifo.o \
- src/audio_output/aout_u8.o \
- src/audio_output/aout_s8.o \
- src/audio_output/aout_u16.o \
- src/audio_output/aout_s16.o
-
-VIDEO_OUTPUT = src/video_output/video_output.o \
- src/video_output/video_text.o \
- src/video_output/video_spu.o \
- src/video_output/video_yuv.o
-
-AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
- src/ac3_decoder/ac3_decoder.o \
- src/ac3_decoder/ac3_parse.o \
- src/ac3_decoder/ac3_exponent.o \
- src/ac3_decoder/ac3_bit_allocate.o \
- src/ac3_decoder/ac3_mantissa.o \
- src/ac3_decoder/ac3_rematrix.o \
- src/ac3_decoder/ac3_imdct.o \
- src/ac3_decoder/ac3_downmix.o \
- src/ac3_decoder/ac3_downmix_c.o
-
-LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
- src/lpcm_decoder/lpcm_decoder.o
-
-AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
- src/audio_decoder/adec_generic.o \
- src/audio_decoder/adec_layer1.o \
- src/audio_decoder/adec_layer2.o \
- src/audio_decoder/adec_math.o
-
-SPU_DECODER = src/spu_decoder/spu_decoder.o
-
-#GEN_DECODER = src/generic_decoder/generic_decoder.o
-
-VIDEO_PARSER = src/video_parser/video_parser.o \
- src/video_parser/vpar_headers.o \
- src/video_parser/vpar_blocks.o \
- src/video_parser/vpar_synchro.o \
- src/video_parser/video_fifo.o
-
-VIDEO_DECODER = src/video_decoder/video_decoder.o
-
-MISC = src/misc/mtime.o \
- src/misc/tests.o \
- src/misc/rsc_files.o \
- src/misc/modules.o \
- src/misc/netutils.o
-
-C_OBJ = $(INTERFACE) \
- $(INPUT) \
- $(VIDEO_OUTPUT) \
- $(AUDIO_OUTPUT) \
- $(AC3_DECODER) \
- $(LPCM_DECODER) \
- $(AUDIO_DECODER) \
- $(SPU_DECODER) \
- $(GEN_DECODER) \
- $(VIDEO_PARSER) \
- $(VIDEO_DECODER) \
- $(MISC) \
- @GETOPT@
-
-
-#
-# Misc Objects
-#
-ifeq ($(SYS),beos)
-CPP_OBJ = src/misc/beos_specific.o
-endif
-
-ifneq (,$(findstring darwin,$(SYS)))
-C_OBJ += src/misc/darwin_specific.o
-endif
-
-#
-# Assembler Objects
-#
-ifneq (,$(findstring 86,$(ARCH)))
-ifneq (,$(findstring mmx,$(ARCH)))
-ASM_OBJ =
-endif
-endif
-
-#
-# Plugins
-#
-PLUGIN_ALSA = plugins/alsa/alsa.o \
- plugins/alsa/aout_alsa.o
-
-PLUGIN_BEOS = plugins/beos/beos.o \
- plugins/beos/aout_beos.o \
- plugins/beos/intf_beos.o \
- plugins/beos/vout_beos.o \
- plugins/beos/DrawingTidbits.o \
- plugins/beos/TransportButton.o
-
-PLUGIN_DARWIN = plugins/darwin/darwin.o
-
-PLUGIN_DSP = plugins/dsp/dsp.o \
- plugins/dsp/aout_dsp.o
-
-PLUGIN_DUMMY = plugins/dummy/dummy.o \
- plugins/dummy/aout_dummy.o \
- plugins/dummy/intf_dummy.o \
- plugins/dummy/vout_dummy.o
-
-PLUGIN_DVD = plugins/dvd/dvd.o \
- plugins/dvd/input_dvd.o \
- plugins/dvd/dvd_netlist.o \
- plugins/dvd/dvd_ioctl.o \
- plugins/dvd/dvd_ifo.o \
- plugins/dvd/dvd_udf.o \
- plugins/dvd/dvd_css.o
-
-PLUGIN_ESD = plugins/esd/esd.o \
- plugins/esd/aout_esd.o
-
-PLUGIN_FB = plugins/fb/fb.o \
- plugins/fb/vout_fb.o
-
-PLUGIN_GGI = plugins/ggi/ggi.o \
- plugins/ggi/vout_ggi.o
-
-PLUGIN_GLIDE = plugins/glide/glide.o \
- plugins/glide/vout_glide.o
-
-PLUGIN_GNOME = plugins/gnome/gnome.o \
- plugins/gnome/intf_gnome.o \
- plugins/gnome/gnome_callbacks.o \
- plugins/gnome/gnome_interface.o \
- plugins/gnome/gnome_support.o
-
-PLUGIN_GTK = plugins/gtk/gtk.o \
- plugins/gtk/intf_gtk.o \
- plugins/gtk/gtk_callbacks.o \
- plugins/gtk/gtk_interface.o \
- plugins/gtk/gtk_support.o \
- plugins/gtk/gtk_playlist.o
-
-PLUGIN_IDCT = plugins/idct/idct.o
-
-PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o
-
-PLUGIN_IDCTMMX = plugins/idct/idctmmx.o
-
-PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o
-
-PLUGIN_IDCTALTIVEC = plugins/idct/idctaltivec.o
-
-PLUGIN_IDCTCOMMON = plugins/idct/idct_common.o
-
-PLUGIN_KDE = plugins/kde/kde.o \
- plugins/kde/intf_kde.o
-
-PLUGIN_MACOSX = plugins/macosx/macosx.o \
- plugins/macosx/intf_macosx.o \
- plugins/macosx/aout_macosx.o \
- plugins/macosx/vout_macosx.o
-
-PLUGIN_MGA = plugins/mga/mga.o \
- plugins/mga/vout_mga.o
-
-PLUGIN_MOTION = plugins/motion/motion.o \
- plugins/motion/vdec_motion_inner.o
-
-PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
- plugins/motion/vdec_motion_inner_mmx.o
-
-PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
- plugins/motion/vdec_motion_inner_mmxext.o
-
-PLUGIN_MOTIONCOMMON = plugins/motion/vdec_motion_common.o
-
-PLUGIN_NCURSES = plugins/text/ncurses.o \
- plugins/text/intf_ncurses.o
-
-PLUGIN_NULL = plugins/null/null.o
-
-PLUGIN_PS = plugins/mpeg/ps.o \
- plugins/mpeg/input_ps.o
-
-PLUGIN_QT = plugins/qt/qt.o \
- plugins/qt/intf_qt.o
-
-PLUGIN_SDL = plugins/sdl/sdl.o \
- plugins/sdl/vout_sdl.o \
- plugins/sdl/aout_sdl.o
-
-PLUGIN_TS = plugins/mpeg/ts.o \
- plugins/mpeg/input_ts.o
-
-PLUGIN_XVIDEO = plugins/x11/xvideo.o \
- plugins/x11/vout_xvideo.o
-
-PLUGIN_X11 = plugins/x11/x11.o \
- plugins/x11/vout_x11.o
-
-PLUGIN_YUV = plugins/yuv/yuv.o \
- plugins/yuv/video_yuv.o \
- plugins/yuv/transforms_yuv.o
-
-PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
- plugins/yuv/video_yuvmmx.o \
- plugins/yuv/transforms_yuvmmx.o
-
-STD_PLUGIN_OBJ = \
- $(PLUGIN_ALSA) \
- $(PLUGIN_DARWIN) \
- $(PLUGIN_DSP) \
- $(PLUGIN_DUMMY) \
- $(PLUGIN_DVD) \
- $(PLUGIN_ESD) \
- $(PLUGIN_FB) \
- $(PLUGIN_GGI) \
- $(PLUGIN_IDCT) \
- $(PLUGIN_IDCTCLASSIC) \
- $(PLUGIN_IDCTMMX) \
- $(PLUGIN_IDCTMMXEXT) \
- $(PLUGIN_IDCTCOMMON) \
- $(PLUGIN_MGA) \
- $(PLUGIN_MOTION) \
- $(PLUGIN_MOTIONMMX) \
- $(PLUGIN_MOTIONMMXEXT) \
- $(PLUGIN_MOTIONCOMMON) \
- $(PLUGIN_NCURSES) \
- $(PLUGIN_NULL) \
- $(PLUGIN_PS) \
- $(PLUGIN_SDL) \
- $(PLUGIN_TS) \
- $(PLUGIN_YUV) \
- $(PLUGIN_YUVMMX)
-
-NONSTD_PLUGIN_OBJ = \
- $(PLUGIN_X11) \
- $(PLUGIN_XVIDEO) \
- $(PLUGIN_GLIDE) \
- $(PLUGIN_GTK) \
- $(PLUGIN_GNOME) \
- $(PLUGIN_MACOSX) \
- $(PLUGIN_IDCTALTIVEC)
-
-NONSTD_CPP_PLUGIN_OBJ = \
- $(PLUGIN_BEOS) \
- $(PLUGIN_QT) \
- $(PLUGIN_KDE)
-
-#
-# Other lists of files
-#
-objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
-cdependancies := $(objects:%.o=.dep/%.d)
-cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
-cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
-
-# All symbols must be exported
-export
-
-################################################################################
-# Targets
-################################################################################
-
-#
-# Virtual targets
-#
-all: vlc @ALIASES@ plugins vlc.app
-
-clean:
- rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
- rm -f plugins/*/*.o plugins/*/*.moc plugins/*/*.bak
- rm -f src/*/*.o extras/*/*.o
- rm -f lib/*.so vlc gnome-vlc gvlc kvlc qvlc
- rm -rf vlc.app
-
-distclean: clean
- rm -f **/*.o **/*~ *.log
- rm -f Makefile include/defs.h include/config.h
- rm -f config.status config.cache config.log
- rm -f gmon.out core build-stamp
- rm -Rf .dep
- rm -f .gdb_history
-
-install:
- mkdir -p $(DESTDIR)$(bindir)
- $(INSTALL) vlc $(DESTDIR)$(bindir)
-# ugly
- for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
- mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
- $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
- mkdir -p $(DESTDIR)$(datadir)/videolan
- $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
- $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
- $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
-
-show:
- @echo CC: $(CC)
- @echo CFLAGS: $(CFLAGS)
- @echo DCFLAGS: $(DCFLAGS)
- @echo LCFLAGS: $(LCFLAGS)
- @echo C_OBJ: $(C_OBJ)
- @echo CPP_OBJ: $(CPP_OBJ)
- @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
- @echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
- @echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
- @echo objects: $(objects)
- @echo cppobjects: $(cppobjects)
-
-# ugliest of all, but I have no time to do it -- sam
-snapshot:
- rm -Rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
- # copy archive in /tmp
- find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
- do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
- done
- find debian -mindepth 1 -maxdepth 1 -type d | \
- while read i ; do rm -Rf /tmp/vlc-@VLC_VERSION@/$$i ; done
- # .c .h .in .cpp
- find include src plugins -type f -name '*.[chi]*' | while read i ; \
- do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
- done
- # extra files
- cp -a extras/* /tmp/vlc-@VLC_VERSION@/extras
- cp -a doc/* /tmp/vlc-@VLC_VERSION@/doc
- find /tmp/vlc-@VLC_VERSION@/extras /tmp/vlc-@VLC_VERSION@/doc \
- -type d -name CVS | while read i ; \
- do rm -Rf $$i ; \
- done
- # copy misc files
- cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
- Makefile.in Makefile.dep configure configure.in install-sh \
- config.sub config.guess todo.pl \
- /tmp/vlc-@VLC_VERSION@/
- for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
- changelog changelog-css rules rules-css vlc.dirs \
- vlc.menu ; do \
- cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
- for file in default8x16.psf default8x9.psf vlc_beos.rsrc ; do \
- cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
- for icon in vlc gvlc qvlc gnome-vlc kvlc ; do \
- cp share/$$icon.xpm share/$$icon.png \
- /tmp/vlc-@VLC_VERSION@/share/ ; done
-
- # build css-enabled archives
- (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
- bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
- > vlc-@VLC_VERSION@.tar.bz2 ; \
- gzip -f -9 vlc-@VLC_VERSION@.tar )
- mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
-
- # clean up
- rm -Rf /tmp/vlc-@VLC_VERSION@*
-
-plugins: $(PLUGINS:%=lib/%.so)
-
-.PHONY: vlc.app
-vlc.app:
-ifneq (,$(findstring darwin,$(SYS)))
- rm -rf vlc.app
- mkdir -p vlc.app/Contents/Resources
- mkdir -p vlc.app/Contents/MacOS/lib
- mkdir -p vlc.app/Contents/MacOS/share
- $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
- $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
- $(INSTALL) vlc vlc.app/Contents/MacOS/
- $(INSTALL) share/vlc.icns vlc.app/Contents/Resources/
- $(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
- $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
-endif
-
-FORCE:
-
-#
-# GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
-# the namespace
-#
-gnome-vlc gvlc kvlc qvlc: vlc
- rm -f $@ && ln -s vlc $@
-
-
-#
-# Generic rules (see below)
-#
-$(cdependancies): %.d: FORCE
- @$(MAKE) -s --no-print-directory -f Makefile.dep $@
-
-$(cppdependancies): %.dpp: FORCE
- @$(MAKE) -s --no-print-directory -f Makefile.dep $@
-
-$(C_OBJ): %.o: Makefile.dep
-$(C_OBJ): %.o: .dep/%.d
-$(C_OBJ): %.o: %.c
-ifneq (,$(findstring darwin,$(SYS)))
-#this is uglier of all
- @if test "src/ac3_decoder/ac3_imdct.c" = "$<"; then $(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<; echo "(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<"; else $(CC) $(CFLAGS) -c -o $@ $<; echo "$(CC) $(CFLAGS) -c -o $@ $<"; fi
-else
- $(CC) $(CFLAGS) -c -o $@ $<
-endif
-
-$(CPP_OBJ): %.o: Makefile.dep
-$(CPP_OBJ): %.o: .dep/%.dpp
-$(CPP_OBJ): %.o: %.cpp
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(ASM_OBJ): %.o: Makefile.dep
-$(ASM_OBJ): %.o: %.S
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(STD_PLUGIN_OBJ): %.o: Makefile.dep
-$(STD_PLUGIN_OBJ): %.o: .dep/%.d
-$(STD_PLUGIN_OBJ): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
-
-$(PLUGIN_XVIDEO): %.o: Makefile.dep
-$(PLUGIN_XVIDEO): %.o: .dep/%.d
-$(PLUGIN_XVIDEO): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<
-
-$(PLUGIN_X11): %.o: Makefile.dep
-$(PLUGIN_X11): %.o: .dep/%.d
-$(PLUGIN_X11): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<
-
-$(PLUGIN_GTK): %.o: Makefile.dep
-$(PLUGIN_GTK): %.o: .dep/%.d
-$(PLUGIN_GTK): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
-
-$(PLUGIN_GNOME): %.o: Makefile.dep
-$(PLUGIN_GNOME): %.o: .dep/%.d
-$(PLUGIN_GNOME): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
-
-$(PLUGIN_GLIDE): %.o: Makefile.dep
-$(PLUGIN_GLIDE): %.o: .dep/%.d
-$(PLUGIN_GLIDE): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
-
-$(PLUGIN_QT): %.o: Makefile.dep
-$(PLUGIN_QT): %.o: .dep/%.dpp
-$(PLUGIN_QT): %.o: %.moc
- $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
-$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
- moc -i $< -o $@
-
-$(PLUGIN_KDE): %.o: Makefile.dep
-$(PLUGIN_KDE): %.o: .dep/%.dpp
-$(PLUGIN_KDE): %.o: %.cpp
- $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
-
-$(PLUGIN_BEOS): %.o: Makefile.dep
-$(PLUGIN_BEOS): %.o: .dep/%.dpp
-$(PLUGIN_BEOS): %.o: %.cpp
- $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
-
-$(PLUGIN_IDCTALTIVEC): %.o: Makefile.dep
-$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
-$(PLUGIN_IDCTALTIVEC): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) -faltivec -c -o $@ $<
-
-$(PLUGIN_MACOSX): %.o: Makefile.dep
-$(PLUGIN_MACOSX): %.o: .dep/%.d
-$(PLUGIN_MACOSX): %.o: %.c
- $(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
-
-#
-# Main application target
-#
-
-vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
- $(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(LCFLAGS)
-ifeq ($(SYS),beos)
- rm -f ./plugins/_APP_
- ln -s ../vlc ./plugins/_APP_
- xres -o $@ ./share/vlc_beos.rsrc
- mimeset -f $@
-endif
-
-#
-# Plugin targets
-#
-
-lib/alsa.so: $(PLUGIN_ALSA)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lasound
-
-lib/beos.so: $(PLUGIN_BEOS)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lbe -lgame -lroot -ltracker
-
-lib/esd.so: $(PLUGIN_ESD)
-ifneq (,$(findstring bsd,$(SYS)))
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lesd
-else
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -laudiofile -lesd
-endif
-
-lib/darwin.so: $(PLUGIN_DARWIN)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio
-
-lib/dsp.so: $(PLUGIN_DSP)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/dummy.so: $(PLUGIN_DUMMY)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/dvd.so: $(PLUGIN_DVD)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/fb.so: $(PLUGIN_FB)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/ggi.so: $(PLUGIN_GGI)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GGI@
-
-lib/glide.so: $(PLUGIN_GLIDE)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GLIDE@
-
-lib/gnome.so: $(PLUGIN_GNOME)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
-
-lib/gtk.so: $(PLUGIN_GTK)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gtk-config --libs gtk | sed 's,-rdynamic,,'`
-
-lib/idct.so: $(PLUGIN_IDCT) $(PLUGIN_IDCTCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework vecLib
-
-lib/kde.so: $(PLUGIN_KDE)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lkdeui -lkdecore -lqt -ldl
-
-lib/macosx.so: $(PLUGIN_MACOSX)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio -framework Carbon -framework AGL
-
-lib/mga.so: $(PLUGIN_MGA)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
-
-lib/motion.so: $(PLUGIN_MOTION) $(PLUGIN_MOTIONCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/ncurses.so: $(PLUGIN_NCURSES)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lncurses
-
-lib/null.so: $(PLUGIN_NULL)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/ps.so: $(PLUGIN_PS)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/qt.so: $(PLUGIN_QT)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
-
-lib/sdl.so: $(PLUGIN_SDL)
-ifneq (,$(findstring darwin,$(SYS)))
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@ -framework Carbon -framework AGL
-else
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
-endif
-
-lib/ts.so: $(PLUGIN_TS)
-ifneq (,$(findstring darwin,$(SYS)))
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework AGL -framework Carbon
-else
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-endif
-
-lib/xvideo.so: $(PLUGIN_XVIDEO)
-ifeq ($(SYS),nto-qnx)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv -lsocket
-else
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv
-endif
-
-lib/x11.so: $(PLUGIN_X11)
-ifeq ($(SYS),nto-qnx)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
-else
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
-endif
-
-lib/yuv.so: $(PLUGIN_YUV)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-lib/yuvmmx.so: $(PLUGIN_YUVMMX)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
-
-################################################################################
-# Note on generic rules and dependancies
-################################################################################
-
-# Note on dependancies: each .c file is associated with a .d file, which
-# depends of it. The .o file associated with a .c file depends of the .d, of the
-# .c itself, and of Makefile. The .d files are stored in a separate .dep/
-# directory.
-# The dep directory should be ignored by CVS.
-
-# Note on inclusions: depending of the target, the dependancies files must
-# or must not be included. The problem is that if we ask make to include a file,
-# and this file does not exist, it is made before it can be included. In a
-# general way, a .d file should be included if and only if the corresponding .o
-# needs to be re-made.
-
-# Two makefiles are used: the main one (this one) has regular generic rules,
-# except for .o files, for which it calls the object Makefile. Dependancies
-# are not included in this file.
-# The object Makefile known how to make a .o from a .c, and includes
-# dependancies for the target, but only those required.
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) plugins Makefile
+# (c)1998 VideoLAN
+###############################################################################
+
+#
+# C headers directories
+#
+CFLAGS += -I../../include -I../../extras
+
+#
+# C compiler flags: plugin compilation
+#
+PCFLAGS += -fPIC
+
+#
+# C compiler flags: plugin linking
+#
+ifneq (,$(findstring darwin,$(SYS)))
+PLCFLAGS += -bundle -undefined suppress
+else
+ifeq ($(SYS),beos)
+PLCFLAGS += -nostart plugins/_APP_
+else
+PLCFLAGS += -shared
+endif
+endif
+
+#
+# Libraries for special cases
+#
+LIB_GGI = @LIB_GGI@
+LIB_GLIDE = @LIB_GLIDE@
+LIB_SDL = @LIB_SDL@
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) options Makefile
+# (c)1998 VideoLAN
+###############################################################################
+
+###############################################################################
+# Configuration
+###############################################################################
+
+# Debugging mode on or off (set to 1 to activate)
+DEBUG=@DEBUG@
+STATS=@STATS@
+OPTIMS=@OPTIMS@
+GETOPT=@GETOPT@
+
+PLUGINS:=@PLUGINS@
+BUILTINS:=@BUILTINS@
+
+SYS=@SYS@
+ALIASES=@ALIASES@
+INSTALL=@INSTALL@
+ARCH=@ARCH@
+
+exec_prefix=@exec_prefix@
+prefix=@prefix@
+bindir=@bindir@
+datadir=@datadir@
+libdir=@libdir@
+
+CC=@CC@
+SHELL=@SHELL@
+
+###############################################################################
+# Configuration pre-processing
+###############################################################################
+
+# PROGRAM_OPTIONS is an identification string of the compilation options
+PROGRAM_OPTIONS = $(SYS) $(ARCH)
+ifeq ($(DEBUG),1)
+PROGRAM_OPTIONS += DEBUG
+DEFINE += -DDEBUG
+endif
+ifeq ($(STATS),1)
+PROGRAM_OPTIONS += DEBUG
+DEFINE += -DSTATS
+endif
+
+# PROGRAM_BUILD is a complete identification of the build
+# (we can't use fancy options with date since OSes like Solaris
+# or FreeBSD have strange date implementations)
+ifeq ($(SYS),beos)
+# XXX: beos does not support hostname (how lame...)
+PROGRAM_BUILD = `date` $(USER)
+else
+PROGRAM_BUILD = `date` $(USER)@`hostname`
+endif
+
+# PROGRAM_VERSION is the current vlc version
+PROGRAM_VERSION=@VLC_VERSION@
+
+# DEFINE will contain some of the constants definitions decided in Makefile,
+# including SYS_xx. It will be passed to C compiler.
+DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr '[a-z].' '[A-Z]_')
+
+# On Linux activate 64-bit off_t (by default under BSD)
+ifneq (,$(findstring linux,$(SYS)))
+DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
+endif
+
+###############################################################################
+# Tuning and other variables - do not change anything except if you know
+# exactly what you are doing
+###############################################################################
+
+#
+# C headers directories
+#
+INCLUDE += @INCLUDE@
+INCLUDE += -Iinclude -Iextras -I/usr/local/include
+
+#
+# Libraries
+#
+LIB = @LIB@ -L/usr/local/lib
+
+ifeq ($(SYS),beos)
+LIB += -lbe -lroot -lgame
+else
+LIB += -lm
+endif
+
+#
+# C compiler flags: mainstream compilation
+#
+CFLAGS += $(DEFINE) $(INCLUDE)
+CFLAGS += -Wall -Winline
+CFLAGS += -D_REENTRANT
+CFLAGS += -D_GNU_SOURCE
+
+# flags needed for clean beos compilation
+ifeq ($(SYS),beos)
+CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
+endif
+
+ifneq (,$(findstring darwin,$(SYS)))
+CFLAGS += -traditional-cpp
+endif
+
+# Optimizations : don't compile debug versions with them
+ifeq ($(OPTIMS),1)
+CFLAGS += -O3
+CFLAGS += -ffast-math -funroll-loops
+CFLAGS += -fomit-frame-pointer
+
+# Optimizations for x86 familiy
+ifneq (,$(findstring 86,$(ARCH)))
+# Optional Pentium Pro optimizations
+ifneq (,$(findstring ppro,$(ARCH)))
+CFLAGS += -march=pentiumpro -mcpu=pentiumpro
+else
+CFLAGS += -march=pentium -mcpu=pentium
+endif
+endif
+
+# Optimizations for PowerPC
+ifneq (,$(findstring powerpc,$(ARCH)))
+CFLAGS += -mmultiple -mhard-float -mstring
+endif
+
+# Optimizations for Sparc
+ifneq (,$(findstring sparc,$(ARCH)))
+CFLAGS += -mhard-float
+endif
+
+#end of optimisations
+endif
+
+# Optional MMX optimizations for x86
+ifneq (,$(findstring mmx,$(ARCH)))
+CFLAGS += -DHAVE_MMX
+endif
+
+#
+# C compiler flags: dependancies
+#
+DCFLAGS += $(INCLUDE)
+DCFLAGS += -MM
+
+#
+# C compiler flags: linking
+#
+LCFLAGS += @LCFLAGS@ $(LIB)
+LCFLAGS += -Wall
+#LCFLAGS += -s
+
+ifeq ($(SYS),beos)
+LCFLAGS += -Xlinker -soname=_APP_
+else
+ifneq (,$(findstring qnx,$(SYS)))
+LCFLAGS += -Xlinker -export-dynamic
+else
+ifneq (,$(findstring darwin,$(SYS)))
+LCFLAGS += -dyn
+else
+LCFLAGS += --export-dynamic
+endif
+endif
+endif
+
+#
+# Debugging and profiling support (unless optimisations are active)
+#
+ifneq ($(OPTIMS),1)
+CFLAGS += -g
+endif
+
LIB=${LIB}" -lgnugetopt"
else
echo "$ac_t""no" 1>&6
-GETOPT="extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o"
+GETOPT=1
fi
fi
fi
-PLUGINS=${PLUGINS}"ps ts yuv idct idctclassic motion "
+#PLUGINS=${PLUGINS}"ps ts yuv idct idctclassic motion "
+BUILTINS=${BUILTINS}"ps ts yuv idct idctclassic motion "
if test x$host_os = xbeos; then
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx "
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3100: checking for $ac_hdr" >&5
+echo "configure:3101: 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 3105 "configure"
+#line 3106 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3111: \"$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*
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
- PLUGINS=${PLUGINS}"dvd "
+ #PLUGINS=${PLUGINS}"dvd "
+ BUILTINS=${BUILTINS}"dvd "
for ac_hdr in linux/cdrom.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3135: checking for $ac_hdr" >&5
+echo "configure:3137: 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 3140 "configure"
+#line 3142 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3147: \"$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*
done
cat > conftest.$ac_ext <<EOF
-#line 3172 "configure"
+#line 3174 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
:
fi
-if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
+if test x$enable_dummy != xno; then
+ #PLUGINS=${PLUGINS}"dummy ";
+ BUILTINS=${BUILTINS}"dummy "; fi
# Check whether --enable-null or --disable-null was given.
if test "${enable_null+set}" = set; then
enableval="$enable_null"
:
fi
-if test x$enable_null != xno; then PLUGINS=${PLUGINS}"null "; fi
+if test x$enable_null != xno; then
+ #PLUGINS=${PLUGINS}"null ";
+ BUILTINS=${BUILTINS}"null "; fi
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
enableval="$enable_ppro"
# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
enableval="$enable_mmx"
- if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi
+ if test x$enableval = xyes; then ARCH=${ARCH}" mmx";
+ #PLUGINS=${PLUGINS}${ACCEL_PLUGINS};
+ BUILTINS=${BUILTINS}}${ACCEL_PLUGINS}; fi
else
- if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi
+ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx";
+ #PLUGINS=${PLUGINS}${ACCEL_PLUGINS};
+ BUILTINS=${BUILTINS}${ACCEL_PLUGINS}; fi
fi
# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
enableval="$enable_altivec"
- if test x$enableval = xyes; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi
+ if test x$enableval = xyes; then ARCH=${ARCH}" altivec";
+ #PLUGINS=${PLUGINS}"idctaltivec ";
+ BUILTINS=${BUILTINS}"idctaltivec "; fi
fi
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ])
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3303: checking for $ac_hdr" >&5
+echo "configure:3315: 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 3308 "configure"
+#line 3320 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3325: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3377: checking for $ac_hdr" >&5
+echo "configure:3389: 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 3382 "configure"
+#line 3394 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3399: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3425: checking for $ac_hdr" >&5
+echo "configure:3437: 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 3430 "configure"
+#line 3442 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3447: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3524: checking for $ac_hdr" >&5
+echo "configure:3536: 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 3529 "configure"
+#line 3541 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3546: \"$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*
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:3573: checking for sys/asoundlib.h" >&5
+echo "configure:3585: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3578 "configure"
+#line 3590 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3595: \"$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*
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:3600: checking for main in -lasound" >&5
+echo "configure:3612: 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
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3608 "configure"
+#line 3620 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3627: \"$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
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile.opts Makefile.modules include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
+s%@BUILTINS@%$BUILTINS%g
s%@ALIASES@%$ALIASES%g
s%@INCLUDE@%$INCLUDE%g
s%@DEBUG@%$DEBUG%g
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile include/config.h"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts Makefile.modules include/config.h"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
statistics : ${STATS}
optimizations : ${OPTIMS}
CSS decryption : ${CSS}
-plugins : ${PLUGINS}
+need builtin getopt : ${GETOPT}
+plugin modules : ${PLUGINS}
+built-in modules : ${BUILTINS}
vlc aliases : ${ALIASES}
-"
+
+You may now tune Makefile.opts at your convenience."
[ # FreeBSD has a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt],[getopt_long],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB=${LIB}" -lgnugetopt"],
- [GETOPT="extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o"])])
+ [GETOPT=1])])
AC_SUBST(GETOPT)
AC_FUNC_MMAP
AC_HEADER_TIME
dnl default plugins
-PLUGINS=${PLUGINS}"ps ts yuv idct idctclassic motion "
+#PLUGINS=${PLUGINS}"ps ts yuv idct idctclassic motion "
+BUILTINS=${BUILTINS}"ps ts yuv idct idctclassic motion "
if test x$host_os = xbeos; then
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx "
else
dnl Checks for DVD ioctls
AC_CHECK_HEADERS(sys/ioctl.h,
- [PLUGINS=${PLUGINS}"dvd "
+ [#PLUGINS=${PLUGINS}"dvd "
+ BUILTINS=${BUILTINS}"dvd "
AC_CHECK_HEADERS(linux/cdrom.h)
AC_EGREP_HEADER(dvd,linux/cdrom.h,[AC_DEFINE(LINUX_DVD,1,DVD support for linux)])])
ARCH=${host_cpu}
AC_ARG_ENABLE(dummy,
[ --disable-dummy dummy module (default enabled)])
-if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
+if test x$enable_dummy != xno; then
+ #PLUGINS=${PLUGINS}"dummy ";
+ BUILTINS=${BUILTINS}"dummy "; fi
AC_ARG_ENABLE(null,
[ --disable-null Null module (default enabled)])
-if test x$enable_null != xno; then PLUGINS=${PLUGINS}"null "; fi
+if test x$enable_null != xno; then
+ #PLUGINS=${PLUGINS}"null ";
+ BUILTINS=${BUILTINS}"null "; fi
AC_ARG_ENABLE(ppro,
[ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" ppro"; fi ],
[ if test x${host_cpu} = xi686; then ARCH=${ARCH}" ppro"; fi ])
AC_ARG_ENABLE(mmx,
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
-[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ],
-[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ])
+[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx";
+ #PLUGINS=${PLUGINS}${ACCEL_PLUGINS};
+ BUILTINS=${BUILTINS}}${ACCEL_PLUGINS}; fi ],
+[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx";
+ #PLUGINS=${PLUGINS}${ACCEL_PLUGINS};
+ BUILTINS=${BUILTINS}${ACCEL_PLUGINS}; fi ])
AC_ARG_ENABLE(altivec,
[ --enable-altivec Enable altivec optimizations (default disabled since it is broken)],
-[ if test x$enableval = xyes; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ])
+[ if test x$enableval = xyes; then ARCH=${ARCH}" altivec";
+ #PLUGINS=${PLUGINS}"idctaltivec ";
+ BUILTINS=${BUILTINS}"idctaltivec "; fi ])
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH=${ARCH}" altivec"; PLUGINS=${PLUGINS}"idctaltivec "; fi ])
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
AC_SUBST(SYS)
AC_SUBST(ARCH)
AC_SUBST(PLUGINS)
+AC_SUBST(BUILTINS)
AC_SUBST(ALIASES)
AC_SUBST(INCLUDE)
AC_SUBST(DEBUG)
AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GGI)
-AC_OUTPUT([Makefile include/config.h])
+AC_OUTPUT([Makefile.opts Makefile.modules include/config.h])
echo "
vlc configuration
statistics : ${STATS}
optimizations : ${OPTIMS}
CSS decryption : ${CSS}
-plugins : ${PLUGINS}
+need builtin getopt : ${GETOPT}
+plugin modules : ${PLUGINS}
+built-in modules : ${BUILTINS}
vlc aliases : ${ALIASES}
-"
+
+You may now tune Makefile.opts at your convenience."
DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
+ # remove the yuvmmx plugin, it doesn't like -fPIC
+ rm debian/vlc/usr/lib/videolan/vlc/yuvmmx.so
+
# make symlinks for packages
aliases="ggi gtk gnome esd sdl alsa qt" ; \
if [ $(DEB_BUILD_ARCH) = i386 ]; then aliases=$$aliases" glide" ; fi ; \
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.h,v 1.19 2001/03/21 13:42:33 sam Exp $
+ * $Id: modules.h,v 1.20 2001/04/15 04:19:57 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
{
boolean_t b_builtin; /* Set to true if the module is built in */
- module_handle_t handle; /* Unique handle to refer to the module */
- char * psz_filename; /* Module filename */
+ 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 */
--- /dev/null
+/*****************************************************************************
+ * modules_builtin.h: built-in modules list
+ *****************************************************************************
+ * 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 ALLOCATE_BUILTIN( NAME ) \
+ AllocateBuiltinModule( p_bank, module_ ## NAME ## _InitModule, \
+ module_ ## NAME ## _ActivateModule, \
+ module_ ## NAME ## _DeactivateModule );
+
+/* Add stuff here */
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) ALSA module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_ALSA = alsa.o aout_alsa.o
+BUILTIN_ALSA = $(PLUGIN_ALSA:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_ALSA)
+STD_BUILTIN_OBJ = $(BUILTIN_ALSA)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/alsa.so: $(PLUGIN_ALSA)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lasound
+
+../../lib/alsa.a: $(BUILTIN_ALSA)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) BeOS module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_BEOS = beos.o aout_beos.o vout_beos.o intf_beos.o DrawingTidbits.o TransportButton.o
+BUILTIN_BEOS = $(PLUGIN_BEOS:%.o=%-BUILTIN.o)
+
+NONSTD_CPP_PLUGIN_OBJ = $(PLUGIN_BEOS)
+NONSTD_CPP_BUILTIN_OBJ = $(BUILTIN_BEOS)
+ALL_OBJ = $(NONSTD_CPP_PLUGIN_OBJ) $(NONSTD_CPP_BUILTIN_OBJ)
+
+cppobjects := $(NONSTD_CPP_PLUGIN_OBJ) $(NONSTD_CPP_BUILTIN_OBJ)
+cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cppdependancies): %.dpp: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_BEOS): %.o: .dep/%.dpp
+$(PLUGIN_BEOS): %.o: %.cpp
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(BUILTIN_BEOS): %-BUILTIN.o: .dep/%.dpp
+$(BUILTIN_BEOS): %-BUILTIN.o: %.cpp
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/beos.so: $(PLUGIN_BEOS)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lbe -lgame -lroot -ltracker
+
+../../lib/beos.a: $(BUILTIN_BEOS)
+ ar r $@ $^
+
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: intf_beos.cpp,v 1.24 2001/04/12 11:10:16 tcastley Exp $
+ * $Id: intf_beos.cpp,v 1.25 2001/04/15 04:19:57 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
menu_bar->AddItem( m = new BMenu("File") );
menu_bar->ResizeToPreferred();
- m->AddItem( new BMenuItem("Open File...", new BMessage(OPEN_FILE), 'O'));
+ m->AddItem( new BMenuItem("Open File" B_UTF8_ELLIPSIS, new BMessage(OPEN_FILE), 'O'));
cd_menu = new CDMenu("Open Disc");
m->AddItem(cd_menu);
m->AddSeparatorItem();
- m->AddItem( new BMenuItem("About...", new BMessage(B_ABOUT_REQUESTED), 'A'));
+ m->AddItem( new BMenuItem("About" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED), 'A'));
m->AddItem( new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q'));
menu_bar->AddItem (am = new BMenu("Audio") );
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) Darwin module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_DARWIN = darwin.o
+BUILTIN_DARWIN = $(PLUGIN_DARWIN:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_DARWIN)
+STD_BUILTIN_OBJ = $(BUILTIN_DARWIN)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/darwin.so: $(PLUGIN_DARWIN)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio
+
+../../lib/darwin.a: $(BUILTIN_DARWIN)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) OSS /dev/dsp module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_DSP = dsp.o aout_dsp.o
+BUILTIN_DSP = $(PLUGIN_DSP:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_DSP)
+STD_BUILTIN_OBJ = $(BUILTIN_DSP)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/dsp.so: $(PLUGIN_DSP)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/dsp.a: $(BUILTIN_DSP)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) dummy module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_DUMMY = dummy.o aout_dummy.o vout_dummy.o intf_dummy.o
+BUILTIN_DUMMY = $(PLUGIN_DUMMY:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_DUMMY)
+STD_BUILTIN_OBJ = $(BUILTIN_DUMMY)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/dummy.so: $(PLUGIN_DUMMY)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/dummy.a: $(BUILTIN_DUMMY)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) dvd module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_DVD = dvd.o input_dvd.o dvd_netlist.o dvd_ioctl.o dvd_ifo.o dvd_udf.o dvd_css.o
+BUILTIN_DVD = $(PLUGIN_DVD:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_DVD) $(BUILTIN_DVD)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_DVD): %.o: .dep/%.d
+$(PLUGIN_DVD): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(BUILTIN_DVD): %-BUILTIN.o: .dep/%.d
+$(BUILTIN_DVD): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/dvd.so: $(PLUGIN_DVD)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/dvd.a: $(BUILTIN_DVD)
+ ar r $@ $^
+
* dvd.c : DVD input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: dvd.c,v 1.6 2001/03/21 13:42:33 sam Exp $
+ * $Id: dvd.c,v 1.7 2001/04/15 04:19:57 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include "defs.h"
#ifdef HAVE_CSS
-#define MODULE_NAME dvd-css
-#else /* HAVE_CSS */
#define MODULE_NAME dvd
+#else /* HAVE_CSS */
+#define MODULE_NAME dvdnocss
#endif /* HAVE_CSS */
#include "modules_inner.h"
* contains the basic udf handling functions
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_udf.c,v 1.4 2001/04/13 05:36:12 stef Exp $
+ * $Id: dvd_udf.c,v 1.5 2001/04/15 04:19:57 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"
+#ifdef HAVE_CSS
+#define MODULE_NAME dvd
+#else /* HAVE_CSS */
+#define MODULE_NAME dvdnocss
+#endif /* HAVE_CSS */
+#include "modules_inner.h"
+
#include <stdio.h>
#include <unistd.h>
#include <string.h>
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.45 2001/04/13 05:36:12 stef Exp $
+ * $Id: input_dvd.c,v 1.46 2001/04/15 04:19:57 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
#include "defs.h"
#ifdef HAVE_CSS
-#define MODULE_NAME dvd-css
+#define MODULE_NAME dvd
#else /* HAVE_CSS */
-#define MODULE_NAME dvd-nocss
+#define MODULE_NAME dvdnocss
#endif /* HAVE_CSS */
#include "modules_inner.h"
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) esd module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_ESD = esd.o aout_esd.o
+BUILTIN_ESD = $(PLUGIN_ESD:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_ESD)
+STD_BUILTIN_OBJ = $(BUILTIN_ESD)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/esd.so: $(PLUGIN_ESD)
+ifneq (,$(findstring bsd,$(SYS)))
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lesd
+else
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -laudiofile -lesd
+endif
+
+../../lib/esd.a: $(BUILTIN_ESD)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) fb module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_FB = fb.o vout_fb.o
+BUILTIN_FB = $(PLUGIN_FB:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_FB)
+STD_BUILTIN_OBJ = $(BUILTIN_FB)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/fb.so: $(PLUGIN_FB)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/fb.a: $(BUILTIN_FB)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) ggi module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_GGI = ggi.o vout_ggi.o
+BUILTIN_GGI = $(PLUGIN_GGI:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_GGI)
+STD_BUILTIN_OBJ = $(BUILTIN_GGI)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/ggi.so: $(PLUGIN_GGI)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GGI)
+
+../../lib/ggi.a: $(BUILTIN_GGI)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) glide module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_GLIDE = glide.o vout_glide.o
+BUILTIN_GLIDE = $(PLUGIN_GLIDE:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_GLIDE) $(BUILTIN_GLIDE)
+
+objects := $(PLUGIN_GLIDE) $(BUILTIN_GLIDE)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_GLIDE): %.o: .dep/%.d
+$(PLUGIN_GLIDE): %.o: %.c
+ $(CC) $(CFLAGS) $(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
+#
+../../lib/glide.so: $(PLUGIN_GLIDE)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GLIDE)
+
+../../lib/glide.a: $(BUILTIN_GLIDE)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) gnome module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_GNOME = gnome.o intf_gnome.o gnome_callbacks.o gnome_interface.o gnome_support.o
+BUILTIN_GNOME = $(PLUGIN_GNOME:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_GNOME) $(BUILTIN_GNOME)
+
+objects := $(PLUGIN_GNOME) $(BUILTIN_GNOME)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_GNOME): %.o: .dep/%.d
+$(PLUGIN_GNOME): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
+
+$(BUILTIN_GNOME): %-BUILTIN.o: .dep/%.d
+$(BUILTIN_GNOME): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN `gnome-config --cflags gtk gnomeui` -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/gnome.so: $(PLUGIN_GNOME)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
+
+../../lib/gnome.a: $(BUILTIN_GNOME)
+ ar r $@ $^
+
0, (GdkModifierType) 0, NULL
},
{
- GNOME_APP_UI_ITEM, N_("_Subtitle"),
+ GNOME_APP_UI_ITEM, N_("_Subtitles"),
N_("Select subtitle unit"),
(gpointer) NULL, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
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);
(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);
dvd_chapter_box = gtk_hbox_new (FALSE, 10);
gtk_widget_ref (dvd_chapter_box);
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_NEXT);
gtk_widget_ref (button_chapter_next);
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 (FALSE, 0);
gtk_widget_ref (network_box);
0, (GdkModifierType) 0, NULL
},
{
- GNOME_APP_UI_ITEM, N_("_Subtitle"),
+ GNOME_APP_UI_ITEM, N_("_Subtitles"),
N_("Select subtitle channel"),
(gpointer) NULL, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
<name>menubar_subtitle</name>
<sensitive>False</sensitive>
<tooltip>Select subtitle unit</tooltip>
- <label>_Subtitle</label>
+ <label>_Subtitles</label>
<right_justify>False</right_justify>
</widget>
<last_modification_time>Tue, 03 Apr 2001 03:46:25 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>Tue, 03 Apr 2001 03:47:01 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, 03 Apr 2001 00:53:47 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>Tue, 03 Apr 2001 00:53:40 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>
<name>popup_subtitle</name>
<sensitive>False</sensitive>
<tooltip>Select subtitle channel</tooltip>
- <label>_Subtitle</label>
+ <label>_Subtitles</label>
<right_justify>False</right_justify>
</widget>
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) gtk module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_GTK = gtk.o intf_gtk.o gtk_callbacks.o gtk_interface.o gtk_support.o gtk_playlist.o
+BUILTIN_GTK = $(PLUGIN_GTK:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_GTK) $(BUILTIN_GTK)
+
+objects := $(PLUGIN_GTK) $(BUILTIN_GTK)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_GTK): %.o: .dep/%.d
+$(PLUGIN_GTK): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
+
+$(BUILTIN_GTK): %-BUILTIN.o: .dep/%.d
+$(BUILTIN_GTK): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN `gtk-config --cflags gtk` -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/gtk.so: $(PLUGIN_GTK)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gtk-config --libs gtk | sed 's,-rdynamic,,'`
+
+../../lib/gtk.a: $(BUILTIN_GTK)
+ ar r $@ $^
+
menubar_subpictures = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menubar_subpictures)->child),
- _("Sub _Pictures"));
+ _("_Subtitles"));
gtk_widget_add_accelerator (menubar_subpictures, "activate_item", menubar_settings_menu_accels,
tmp_key, 0, 0);
gtk_widget_ref (menubar_subpictures);
popup_subpictures = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_subpictures)->child),
- _("_Subpictures"));
+ _("_Subtitles"));
gtk_widget_add_accelerator (popup_subpictures, "activate_item", intf_popup_accels,
tmp_key, 0, 0);
gtk_widget_ref (popup_subpictures);
<name>menubar_subpictures</name>
<sensitive>False</sensitive>
<tooltip>Select sub-title</tooltip>
- <label>Sub _Pictures</label>
+ <label>_Subtitles</label>
<right_justify>False</right_justify>
</widget>
<class>GtkMenuItem</class>
<name>popup_subpictures</name>
<sensitive>False</sensitive>
- <label>_Subpictures</label>
+ <label>_Subtitles</label>
<right_justify>False</right_justify>
</widget>
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) idct module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_IDCT = idct.o
+PLUGIN_IDCTCLASSIC = idctclassic.o
+PLUGIN_IDCTMMX = idctmmx.o
+PLUGIN_IDCTMMXEXT = idctmmxext.o
+PLUGIN_IDCTALTIVEC = idctaltivec.o
+PLUGIN_IDCTCOMMON = idct_common.o
+
+BUILTIN_IDCT = $(PLUGIN_IDCT:%.o=%-BUILTIN-IDCT.o) \
+ $(PLUGIN_IDCTCOMMON:%.o=%-BUILTIN-IDCT.o)
+BUILTIN_IDCTCLASSIC = $(PLUGIN_IDCTCLASSIC:%.o=%-BUILTIN-IDCTCLASSIC.o) \
+ $(PLUGIN_IDCTCOMMON:%.o=%-BUILTIN-IDCTCLASSIC.o)
+BUILTIN_IDCTMMX = $(PLUGIN_IDCTMMX:%.o=%-BUILTIN-IDCTMMX.o) \
+ $(PLUGIN_IDCTCOMMON:%.o=%-BUILTIN-IDCTMMX.o)
+BUILTIN_IDCTMMXEXT = $(PLUGIN_IDCTMMXEXT:%.o=%-BUILTIN-IDCTMMXEXT.o) \
+ $(PLUGIN_IDCTCOMMON:%.o=%-BUILTIN-IDCTMMXEXT.o)
+BUILTIN_IDCTALTIVEC = $(PLUGIN_IDCTALTIVEC:%.o=%-BUILTIN-IDCTALTIVEC.o) \
+ $(PLUGIN_IDCTCOMMON:%.o=%-BUILTIN-IDCTALTIVEC.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_IDCT) $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(PLUGIN_IDCTALTIVEC) $(BUILTIN_IDCT) $(BUILTIN_IDCTCLASSIC) $(BUILTIN_IDCTMMX) $(BUILTIN_IDCTMMXEXT) $(BUILTIN_IDCTALTIVEC)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
+$(PLUGIN_IDCTALTIVEC): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -faltivec -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) -DBUILTIN -DMODULE_NAME=idctaltivec -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/idct.so: $(PLUGIN_IDCT) $(PLUGIN_IDCTCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/idct.a: $(BUILTIN_IDCT)
+ ar r $@ $^
+
+../../lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/idctclassic.a: $(BUILTIN_IDCTCLASSIC)
+ ar r $@ $^
+
+../../lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/idctmmx.a: $(BUILTIN_IDCTMMX)
+ ar r $@ $^
+
+../../lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/idctmmxext.a: $(BUILTIN_IDCTMMXEXT)
+ ar r $@ $^
+
+../../lib/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework vecLib
+
+../../lib/idctaltivec.a: $(BUILTIN_IDCTALTIVEC)
+ ar r $@ $^
+
* idct.c : IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct.c,v 1.7 2001/02/20 07:49:13 sam Exp $
+ * $Id: idct.c,v 1.8 2001/04/15 04:19:57 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
static void idct_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = idct_Probe;
- p_function_list->functions.idct.pf_init = vdec_InitIDCT;
- p_function_list->functions.idct.pf_sparse_idct = vdec_SparseIDCT;
- p_function_list->functions.idct.pf_idct = vdec_IDCT;
+ p_function_list->functions.idct.pf_init = _M( vdec_InitIDCT );
+ p_function_list->functions.idct.pf_sparse_idct = _M( vdec_SparseIDCT );
+ p_function_list->functions.idct.pf_idct = _M( vdec_IDCT );
p_function_list->functions.idct.pf_norm_scan = vdec_NormScan;
}
/*****************************************************************************
* vdec_IDCT : IDCT function for normal matrices
*****************************************************************************/
-void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
+void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
int i_idontcare )
{
s32 tmp0, tmp1, tmp2, tmp3;
* idct.h : macros for the inverse discrete cosine transform
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct.h,v 1.2 2001/01/17 18:17:30 massiot Exp $
+ * $Id: idct.h,v 1.3 2001/04/15 04:19:57 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
/*****************************************************************************
* Protoypes
*****************************************************************************/
-void vdec_SparseIDCT ( vdec_thread_t * p_vdec, dctelem_t * p_block,
- int i_sparse_pos);
-void vdec_InitIDCT ( vdec_thread_t * p_vdec );
-void vdec_IDCT ( vdec_thread_t * p_vdec, dctelem_t * p_block,
- int i_idontcare );
+void _M( vdec_SparseIDCT ) ( vdec_thread_t * p_vdec, dctelem_t * p_block,
+ int i_sparse_pos);
+void _M( vdec_InitIDCT ) ( vdec_thread_t * p_vdec );
+void _M( vdec_IDCT ) ( vdec_thread_t * p_vdec, dctelem_t * p_block,
+ int i_idontcare );
* idct_common.c : common IDCT functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct_common.c,v 1.4 2001/04/06 09:15:47 sam Exp $
+ * $Id: idct_common.c,v 1.5 2001/04/15 04:19:57 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
* 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
*****************************************************************************/
/*****************************************************************************
* vdec_InitIDCT : initialize datas for vdec_SparseIDCT
*****************************************************************************/
-void vdec_InitIDCT (vdec_thread_t * p_vdec)
+void _M( vdec_InitIDCT ) (vdec_thread_t * p_vdec)
{
int i;
for( i=0 ; i < 64 ; i++ )
{
p_pre[i*64+i] = 1 << SPARSE_SCALE_FACTOR;
- vdec_IDCT( p_vdec, &p_pre[i*64], 0) ;
+ _M( vdec_IDCT )( p_vdec, &p_pre[i*64], 0) ;
}
return;
}
/*****************************************************************************
* vdec_SparseIDCT : IDCT function for sparse matrices
*****************************************************************************/
-void vdec_SparseIDCT (vdec_thread_t * p_vdec, dctelem_t * p_block,
- int i_sparse_pos)
+void _M( vdec_SparseIDCT ) ( vdec_thread_t * p_vdec, dctelem_t * p_block,
+ int i_sparse_pos)
{
short int val;
int * dp;
* idctaltivec.c : Altivec IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctaltivec.c,v 1.3 2001/03/26 19:06:18 sam Exp $
+ * $Id: idctaltivec.c,v 1.4 2001/04/15 04:19:57 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
static void idct_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = idct_Probe;
- p_function_list->functions.idct.pf_init = vdec_InitIDCT;
- p_function_list->functions.idct.pf_sparse_idct = vdec_SparseIDCT;
- p_function_list->functions.idct.pf_idct = vdec_IDCT;
+ p_function_list->functions.idct.pf_init = _M( vdec_InitIDCT );
+ p_function_list->functions.idct.pf_sparse_idct = _M( vdec_SparseIDCT );
+ p_function_list->functions.idct.pf_idct = _M( vdec_IDCT );
p_function_list->functions.idct.pf_norm_scan = vdec_NormScan;
}
/*****************************************************************************
* vdec_IDCT :
*****************************************************************************/
-void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
+void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
int i_idontcare )
{
IDCT( p_block, p_block );
* idctclassic.c : Classic IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.7 2001/02/20 07:49:13 sam Exp $
+ * $Id: idctclassic.c,v 1.8 2001/04/15 04:19:57 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
static void idct_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = idct_Probe;
- p_function_list->functions.idct.pf_init = vdec_InitIDCT;
- p_function_list->functions.idct.pf_sparse_idct = vdec_SparseIDCT;
- p_function_list->functions.idct.pf_idct = vdec_IDCT;
+ p_function_list->functions.idct.pf_init = _M( vdec_InitIDCT );
+ p_function_list->functions.idct.pf_sparse_idct = _M( vdec_SparseIDCT );
+ p_function_list->functions.idct.pf_idct = _M( vdec_IDCT );
p_function_list->functions.idct.pf_norm_scan = vdec_NormScan;
}
/*****************************************************************************
* vdec_IDCT : IDCT function for normal matrices
*****************************************************************************/
-void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
+void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
int i_idontcare )
{
/* dct classique: pour tester la meilleure entre la classique et la */
* idctmmx.c : MMX IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctmmx.c,v 1.8 2001/02/20 07:49:13 sam Exp $
+ * $Id: idctmmx.c,v 1.9 2001/04/15 04:19:57 sam Exp $
*
* Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
* Michel Lespinasse <walken@zoy.org>
static void idct_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = idct_Probe;
- p_function_list->functions.idct.pf_init = vdec_InitIDCT;
- p_function_list->functions.idct.pf_sparse_idct = vdec_SparseIDCT;
- p_function_list->functions.idct.pf_idct = vdec_IDCT;
+ p_function_list->functions.idct.pf_init = _M( vdec_InitIDCT );
+ p_function_list->functions.idct.pf_sparse_idct = _M( vdec_SparseIDCT );
+ p_function_list->functions.idct.pf_idct = _M( vdec_IDCT );
p_function_list->functions.idct.pf_norm_scan = vdec_NormScan;
}
static s32 rounder5[] ATTR_ALIGN(8) =
rounder (-0.441341716183); // C3*(-C5/C4+C5-C3)/2
-void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
- int i_idontcare )
+void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
+ int i_idontcare )
{
static dctelem_t table04[] ATTR_ALIGN(16) =
table (22725, 21407, 19266, 16384, 12873, 8867, 4520);
* idctmmxext.c : MMX EXT IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctmmxext.c,v 1.5 2001/02/20 07:49:13 sam Exp $
+ * $Id: idctmmxext.c,v 1.6 2001/04/15 04:19:57 sam Exp $
*
* Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
* Michel Lespinasse <walken@zoy.org>
static void idct_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = idct_Probe;
- p_function_list->functions.idct.pf_init = vdec_InitIDCT;
- p_function_list->functions.idct.pf_sparse_idct = vdec_SparseIDCT;
- p_function_list->functions.idct.pf_idct = vdec_IDCT;
+ p_function_list->functions.idct.pf_init = _M( vdec_InitIDCT );
+ p_function_list->functions.idct.pf_sparse_idct = _M( vdec_SparseIDCT );
+ p_function_list->functions.idct.pf_idct = _M( vdec_IDCT );
p_function_list->functions.idct.pf_norm_scan = vdec_NormScan;
}
static s32 rounder5[] ATTR_ALIGN(8) =
rounder (-0.441341716183); // C3*(-C5/C4+C5-C3)/2
-void vdec_IDCT( vdec_thread_t * p_vdec, dctelem_t * p_block,
- int i_idontcare )
+void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
+ int i_idontcare )
{
static dctelem_t table04[] ATTR_ALIGN(16) =
table (22725, 21407, 19266, 16384, 12873, 8867, 4520);
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) macosx module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_MACOSX = macosx.o intf_macosx.o aout_macosx.o vout_macosx.o
+BUILTIN_MACOSX = $(PLUGIN_MACOSX:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_MACOSX) $(BUILTIN_MACOSX)
+
+objects := $(PLUGIN_MACOSX) $(BUILTIN_MACOSX)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_MACOSX): %.o: .dep/%.d
+$(PLUGIN_MACOSX): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
+
+$(BUILTIN_MACOSX): %-BUILTIN.o: .dep/%.d
+$(BUILTIN_MACOSX): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -fpascal-strings -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/macosx.so: $(PLUGIN_MACOSX)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio -framework Carbon -framework AGL
+
+../../lib/macosx.a: $(BUILTIN_MACOSX)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) mga module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_MGA = mga.o vout_mga.o
+BUILTIN_MGA = $(PLUGIN_MGA:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_MGA)
+STD_BUILTIN_OBJ = $(BUILTIN_MGA)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/mga.so: $(PLUGIN_MGA)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/mga.a: $(BUILTIN_MGA)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) motion module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_MOTION = motion.o vdec_motion_inner.o
+PLUGIN_MOTIONMMX = motionmmx.o vdec_motion_inner_mmx.o
+PLUGIN_MOTIONMMXEXT = motionmmxext.o vdec_motion_inner_mmxext.o
+PLUGIN_MOTIONCOMMON = vdec_motion_common.o
+
+BUILTIN_MOTION = $(PLUGIN_MOTION:%.o=%-BUILTIN-MOTION.o) \
+ $(PLUGIN_MOTIONCOMMON:%.o=%-BUILTIN-MOTION.o)
+BUILTIN_MOTIONMMX = $(PLUGIN_MOTIONMMX:%.o=%-BUILTIN-MOTIONMMX.o) \
+ $(PLUGIN_MOTIONCOMMON:%.o=%-BUILTIN-MOTIONMMX.o)
+BUILTIN_MOTIONMMXEXT = $(PLUGIN_MOTIONMMXEXT:%.o=%-BUILTIN-MOTIONMMXEXT.o) \
+ $(PLUGIN_MOTIONCOMMON:%.o=%-BUILTIN-MOTIONMMXEXT.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_MOTION) $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(BUILTIN_MOTION) $(BUILTIN_MOTIONMMX) $(BUILTIN_MOTIONMMXEXT)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(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 $@ $<
+
+#
+# Real targets
+#
+../../lib/motion.so: $(PLUGIN_MOTION) $(PLUGIN_MOTIONCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/motion.a: $(BUILTIN_MOTION)
+ ar r $@ $^
+
+../../lib/motionclassic.so: $(PLUGIN_MOTIONCLASSIC) $(PLUGIN_MOTIONCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/motionclassic.a: $(BUILTIN_MOTIONCLASSIC)
+ ar r $@ $^
+
+../../lib/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/motionmmx.a: $(BUILTIN_MOTIONMMX)
+ ar r $@ $^
+
+../../lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/motionmmxext.a: $(BUILTIN_MOTIONMMXEXT)
+ ar r $@ $^
+
+../../lib/motionaltivec.so: $(PLUGIN_MOTIONALTIVEC) $(PLUGIN_MOTIONCOMMON)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework vecLib
+
+../../lib/motionaltivec.a: $(BUILTIN_MOTIONALTIVEC)
+ ar r $@ $^
+
* motion.c : C motion compensation module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: motion.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: motion.c,v 1.4 2001/04/15 04:19:57 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* motion_Probe: tests probe the CPU and return a score
*****************************************************************************/
-int motion_Probe( probedata_t *p_data )
+int _M( motion_Probe )( probedata_t *p_data )
{
if( TestMethod( MOTION_METHOD_VAR, "motion" ) )
{
* motionmmx.c : MMX motion compensation module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: motionmmx.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: motionmmx.c,v 1.4 2001/04/15 04:19:57 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* motion_Probe: tests probe the CPU and return a score
*****************************************************************************/
-int motion_Probe( probedata_t *p_data )
+int _M( motion_Probe )( probedata_t *p_data )
{
if( TestCPU( CPU_CAPABILITY_MMX ) )
{
* motionmmxext.c : MMX EXT motion compensation module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: motionmmxext.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: motionmmxext.c,v 1.4 2001/04/15 04:19:57 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* motion_Probe: tests probe the CPU and return a score
*****************************************************************************/
-int motion_Probe( probedata_t *p_data )
+int _M( motion_Probe )( probedata_t *p_data )
{
if( TestCPU( CPU_CAPABILITY_MMXEXT ) )
{
* vdec_motion_common.c : common motion compensation routines common
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vdec_motion_common.c,v 1.5 2001/02/20 15:03:00 massiot Exp $
+ * $Id: vdec_motion_common.c,v 1.6 2001/04/15 04:19:57 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
* 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 "vdec_motion.h"
#include "vpar_blocks.h"
-extern int motion_Probe( probedata_t *p_data );
+extern int _M( motion_Probe )( probedata_t *p_data );
static void vdec_MotionFieldField420 ( macroblock_t * p_mb );
static void vdec_MotionFieldField422 ( macroblock_t * p_mb );
*****************************************************************************/
void motion_getfunctions( function_list_t * p_function_list )
{
- p_function_list->pf_probe = motion_Probe;
+ p_function_list->pf_probe = _M( motion_Probe );
#define list p_function_list->functions.motion
#define motion_functions( yuv ) \
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) mpeg module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_PS = ps.o input_ps.o
+PLUGIN_TS = ts.o input_ts.o
+BUILTIN_PS = $(PLUGIN_PS:%.o=%-BUILTIN.o)
+BUILTIN_TS = $(PLUGIN_TS:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_PS) $(PLUGIN_TS)
+STD_BUILTIN_OBJ = $(BUILTIN_PS) $(BUILTIN_TS)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/ps.so: $(PLUGIN_PS)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/ps.a: $(BUILTIN_PS)
+ ar r $@ $^
+
+../../lib/ts.so: $(PLUGIN_TS)
+ifneq (,$(findstring darwin,$(SYS)))
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework AGL -framework Carbon
+else
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+endif
+
+../../lib/ts.a: $(BUILTIN_TS)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) null module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_NULL = null.o
+BUILTIN_NULL = $(PLUGIN_NULL:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_NULL)
+STD_BUILTIN_OBJ = $(BUILTIN_NULL)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/null.so: $(PLUGIN_NULL)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/null.a: $(BUILTIN_NULL)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) qt module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_QT = qt.o intf_qt.o
+BUILTIN_QT = $(PLUGIN_QT:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_QT) $(BUILTIN_QT)
+
+cppobjects := $(ALL_OBJ)
+cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cppdependancies): %.dpp: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_QT): %.o: .dep/%.dpp
+$(PLUGIN_QT): %.o: %.moc
+ $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
+$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
+ moc -i $< -o $@
+
+$(BUILTIN_QT): %.o: .dep/%.dpp
+$(BUILTIN_QT): %.o: %.moc
+ $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
+$(BUILTIN_QT:%.o=%.moc): %.moc: %.cpp
+ moc -i $< -o $@
+
+#
+# Real targets
+#
+../../lib/qt.so: $(PLUGIN_QT)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
+
+../../lib/qt.a: $(BUILTIN_QT)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) sdl module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_SDL = sdl.o vout_sdl.o aout_sdl.o
+BUILTIN_SDL = $(PLUGIN_SDL:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_SDL) $(BUILTIN_SDL)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/sdl.so: $(PLUGIN_SDL)
+ifneq (,$(findstring darwin,$(SYS)))
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_SDL) -framework Carbon -framework AGL
+else
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_SDL)
+endif
+
+../../lib/sdl.a: $(BUILTIN_SDL)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) text module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_NCURSES = ncurses.o vout_ncurses.o
+BUILTIN_NCURSES = $(PLUGIN_NCURSES:%.o=%-BUILTIN.o)
+
+ALL_OBJ = $(PLUGIN_NCURSES) $(BUILTIN_NCURSES)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(PLUGIN_NCURSES): %.o: .dep/%.d
+$(PLUGIN_NCURSES): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(BUILTIN_NCURSES): %-BUILTIN.o: .dep/%.d
+$(BUILTIN_NCURSES): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/ncurses.so: $(PLUGIN_NCURSES)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lncurses
+
+../../lib/ncurses.a: $(BUILTIN_NCURSES)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) x11 module Makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_X11 = x11.o vout_x11.o
+PLUGIN_XVIDEO = xvideo.o vout_xvideo.o
+BUILTIN_X11 = $(PLUGIN_X11:%.o=%-BUILTIN.o)
+BUILTIN_XVIDEO = $(PLUGIN_XVIDEO:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_X11) $(PLUGIN_XVIDEO)
+STD_BUILTIN_OBJ = $(BUILTIN_X11) $(BUILTIN_XVIDEO)
+
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/x11.so: $(PLUGIN_X11)
+ifeq ($(SYS),nto-qnx)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
+else
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
+endif
+
+../../lib/x11.a: $(BUILTIN_X11)
+ ar r $@ $^
+
+../../lib/xvideo.so: $(PLUGIN_XVIDEO)
+ifeq ($(SYS),nto-qnx)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
+else
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
+endif
+
+../../lib/xvideo.a: $(BUILTIN_XVIDEO)
+ ar r $@ $^
+
--- /dev/null
+###############################################################################
+# vlc (VideoLAN Client) yuv module makefile
+# (c)2001 VideoLAN
+###############################################################################
+
+include ../../Makefile.modules
+
+###############################################################################
+# Objects and files
+###############################################################################
+PLUGIN_YUV = yuv.o video_yuv.o transforms_yuv.o
+PLUGIN_YUVMMX = yuvmmx.o video_yuvmmx.o transforms_yuvmmx.o
+
+BUILTIN_YUV = $(PLUGIN_YUV:%.o=%-BUILTIN.o)
+BUILTIN_YUVMMX = $(PLUGIN_YUVMMX:%.o=%-BUILTIN.o)
+
+STD_PLUGIN_OBJ = $(PLUGIN_YUV) $(PLUGIN_YUVMMX)
+STD_BUILTIN_OBJ = $(BUILTIN_YUV) $(BUILTIN_YUVMMX)
+ALL_OBJ = $(STD_PLUGIN_OBJ) $(STD_BUILTIN_OBJ)
+
+objects := $(ALL_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+
+export
+
+#
+# Virtual targets
+#
+all:
+
+clean:
+ rm -f $(ALL_OBJ)
+ rm -f *.o *.moc *.bak *.so *.a *.builtin
+ rm -rf .dep
+
+FORCE:
+
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
+
+$(ALL_OBJ): %.o: ../../Makefile.dep
+
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: .dep/%.d
+$(STD_BUILTIN_OBJ): %-BUILTIN.o: %.c
+ $(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
+
+#
+# Real targets
+#
+../../lib/yuv.so: $(PLUGIN_YUV)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/yuv.a: $(BUILTIN_YUV)
+ ar r $@ $^
+
+../../lib/yuvmmx.so: $(PLUGIN_YUVMMX)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
+
+../../lib/yuvmmx.a: $(BUILTIN_YUVMMX)
+ ar r $@ $^
+
* certain cases by optimized functions.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: transforms_yuv.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: transforms_yuv.c,v 1.5 2001/04/15 04:19:58 sam Exp $
*
* Authors: Vincent Seguin <ptyx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Boston, MA 02111-1307, USA.
*****************************************************************************/
+#define MODULE_NAME yuv
+#include "modules_inner.h"
+
/*****************************************************************************
* Preamble
*****************************************************************************/
/*****************************************************************************
* ConvertY4Gray8: grayscale YUV 4:x:x to RGB 8 bpp
*****************************************************************************/
-void ConvertY4Gray8( YUV_ARGS_8BPP )
+void _M( ConvertY4Gray8 )( YUV_ARGS_8BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_gray = p_vout->yuv.yuv.p_gray8;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV420RGB8: color YUV 4:2:0 to RGB 8 bpp
*****************************************************************************/
-void ConvertYUV420RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV420RGB8 )( YUV_ARGS_8BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
i_chroma_width = i_width / 2;
p_offset_start = p_vout->yuv.p_offset;
p_lookup = p_vout->yuv.p_base;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 1 );
/*
/*****************************************************************************
* ConvertYUV422RGB8: color YUV 4:2:2 to RGB 8 bpp
*****************************************************************************/
-void ConvertYUV422RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV422RGB8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 8" );
}
/*****************************************************************************
* ConvertYUV444RGB8: color YUV 4:4:4 to RGB 8 bpp
*****************************************************************************/
-void ConvertYUV444RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV444RGB8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 8" );
}
/*****************************************************************************
* ConvertY4Gray16: grayscale YUV 4:x:x to RGB 2 Bpp
*****************************************************************************/
-void ConvertY4Gray16( YUV_ARGS_16BPP )
+void _M( ConvertY4Gray16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_gray = p_vout->yuv.yuv.p_gray16;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV420RGB16: color YUV 4:2:0 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV420RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV420RGB16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_yuv = p_vout->yuv.yuv.p_rgb16;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV422RGB16: color YUV 4:2:2 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV422RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV422RGB16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_yuv = p_vout->yuv.yuv.p_rgb16;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV444RGB16: color YUV 4:4:4 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV444RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV444RGB16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_yuv = p_vout->yuv.yuv.p_rgb16;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertY4Gray24: grayscale YUV 4:x:x to RGB 2 Bpp
*****************************************************************************/
-void ConvertY4Gray24( YUV_ARGS_24BPP )
+void _M( ConvertY4Gray24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, grayscale, bpp = 24" );
}
/*****************************************************************************
* ConvertYUV420RGB24: color YUV 4:2:0 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV420RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV420RGB24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, bpp = 24" );
}
/*****************************************************************************
* ConvertYUV422RGB24: color YUV 4:2:2 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV422RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV422RGB24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 24" );
}
/*****************************************************************************
* ConvertYUV444RGB24: color YUV 4:4:4 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV444RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV444RGB24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 24" );
}
/*****************************************************************************
* ConvertY4Gray32: grayscale YUV 4:x:x to RGB 4 Bpp
*****************************************************************************/
-void ConvertY4Gray32( YUV_ARGS_32BPP )
+void _M( ConvertY4Gray32 )( YUV_ARGS_32BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_gray = p_vout->yuv.yuv.p_gray32;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV420RGB32: color YUV 4:2:0 to RGB 4 Bpp
*****************************************************************************/
-void ConvertYUV420RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV420RGB32 )( YUV_ARGS_32BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_yuv = p_vout->yuv.yuv.p_rgb32;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV422RGB32: color YUV 4:2:2 to RGB 4 Bpp
*****************************************************************************/
-void ConvertYUV422RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV422RGB32 )( YUV_ARGS_32BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_yuv = p_vout->yuv.yuv.p_rgb32;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV444RGB32: color YUV 4:4:4 to RGB 4 Bpp
*****************************************************************************/
-void ConvertYUV444RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV444RGB32 )( YUV_ARGS_32BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
p_yuv = p_vout->yuv.yuv.p_rgb32;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
}
}
-void ConvertYUV420YCbr8 ( YUV_ARGS_8BPP )
+void _M( ConvertYUV420YCbr8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 8" );
}
-void ConvertYUV422YCbr8 ( YUV_ARGS_8BPP )
+void _M( ConvertYUV422YCbr8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 8" );
}
-void ConvertYUV444YCbr8 ( YUV_ARGS_8BPP )
+
+void _M( ConvertYUV444YCbr8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 8" );
/*****************************************************************************
* yuv2YCbCr422: color YUV 4:2:0 to color YCbCr 16bpp
*****************************************************************************/
-void ConvertYUV420YCbr16 ( YUV_ARGS_16BPP )
+void _M( ConvertYUV420YCbr16 )( YUV_ARGS_16BPP )
{
int i_y;
}
}
-void ConvertYUV422YCbr16 ( YUV_ARGS_16BPP )
+void _M( ConvertYUV422YCbr16 )( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 16" );
}
-void ConvertYUV444YCbr16 ( YUV_ARGS_16BPP )
+void _M( ConvertYUV444YCbr16 )( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 16" );
}
-void ConvertYUV420YCbr24 ( YUV_ARGS_24BPP )
+void _M( ConvertYUV420YCbr24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 24" );
}
-void ConvertYUV422YCbr24 ( YUV_ARGS_24BPP )
+void _M( ConvertYUV422YCbr24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 24" );
}
-void ConvertYUV444YCbr24 ( YUV_ARGS_24BPP )
+void _M( ConvertYUV444YCbr24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 24" );
}
-void ConvertYUV420YCbr32 ( YUV_ARGS_32BPP )
+void _M( ConvertYUV420YCbr32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 32" );
}
-void ConvertYUV422YCbr32 ( YUV_ARGS_32BPP )
+void _M( ConvertYUV422YCbr32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 32" );
}
-void ConvertYUV444YCbr32 ( YUV_ARGS_32BPP )
+void _M( ConvertYUV444YCbr32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 32" );
* Provides functions to perform the YUV conversion.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: transforms_yuvmmx.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: transforms_yuvmmx.c,v 1.5 2001/04/15 04:19:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* Boston, MA 02111-1307, USA.
*****************************************************************************/
+#define MODULE_NAME yuvmmx
+#include "modules_inner.h"
+
/*****************************************************************************
* Preamble
*****************************************************************************/
/*****************************************************************************
* ConvertY4Gray8: grayscale YUV 4:x:x to RGB 8 bpp
*****************************************************************************/
-void ConvertY4Gray8( YUV_ARGS_8BPP )
+void _M( ConvertY4Gray8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 8" );
}
/*****************************************************************************
* ConvertYUV420RGB8: color YUV 4:2:0 to RGB 8 bpp
*****************************************************************************/
-void ConvertYUV420RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV420RGB8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, bpp = 8" );
}
/*****************************************************************************
* ConvertYUV422RGB8: color YUV 4:2:2 to RGB 8 bpp
*****************************************************************************/
-void ConvertYUV422RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV422RGB8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 8" );
}
/*****************************************************************************
* ConvertYUV444RGB8: color YUV 4:4:4 to RGB 8 bpp
*****************************************************************************/
-void ConvertYUV444RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV444RGB8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 8" );
}
/*****************************************************************************
* ConvertY4Gray16: color YUV 4:4:4 to RGB 2 Bpp
*****************************************************************************/
-void ConvertY4Gray16( YUV_ARGS_16BPP )
+void _M( ConvertY4Gray16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
i_chroma_width = i_width / 2;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
/*****************************************************************************
* ConvertYUV420RGB16: color YUV 4:2:0 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV420RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV420RGB16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
i_chroma_width = i_width / 2;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
}
}
-
/*****************************************************************************
* ConvertYUV422RGB16: color YUV 4:2:2 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV422RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV422RGB16 )( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 16" );
}
/*****************************************************************************
* ConvertYUV444RGB16: color YUV 4:4:4 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV444RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV444RGB16 )( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 16" );
}
/*****************************************************************************
* ConvertY4Gray24: grayscale YUV 4:x:x to RGB 2 Bpp
*****************************************************************************/
-void ConvertY4Gray24( YUV_ARGS_24BPP )
+void _M( ConvertY4Gray24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 24" );
}
/*****************************************************************************
* ConvertYUV420RGB24: color YUV 4:2:0 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV420RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV420RGB24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, bpp = 24" );
}
/*****************************************************************************
* ConvertYUV422RGB24: color YUV 4:2:2 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV422RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV422RGB24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, bpp = 24" );
}
/*****************************************************************************
* ConvertYUV444RGB24: color YUV 4:4:4 to RGB 2 Bpp
*****************************************************************************/
-void ConvertYUV444RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV444RGB24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, bpp = 24" );
}
/*****************************************************************************
* ConvertY4Gray32: grayscale YUV 4:x:x to RGB 4 Bpp
*****************************************************************************/
-void ConvertY4Gray32( YUV_ARGS_32BPP )
+void _M( ConvertY4Gray32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 32" );
}
-
/*****************************************************************************
* ConvertYUV420RGB32: color YUV 4:2:0 to RGB 4 Bpp
*****************************************************************************/
-void ConvertYUV420RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV420RGB32 )( YUV_ARGS_32BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
i_chroma_width = i_width / 2;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
i_scale_count = ( i_vertical_scaling == 1 ) ? i_pic_height : i_height;
/*****************************************************************************
* ConvertYUV422RGB32: color YUV 4:2:2 to RGB 4 Bpp
*****************************************************************************/
-void ConvertYUV422RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV422RGB32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 32" );
}
/*****************************************************************************
* ConvertYUV444RGB32: color YUV 4:4:4 to RGB 4 Bpp
*****************************************************************************/
-void ConvertYUV444RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV444RGB32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 32" );
}
/*****************************************************************************
* ConvertYUV420YCbr8: color YUV 4:2:0 to YCbr 8 Bpp
*****************************************************************************/
-
-void ConvertYUV420YCbr8 ( YUV_ARGS_8BPP )
+void _M( ConvertYUV420YCbr8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, YCbr = 8" );
}
+
/*****************************************************************************
* ConvertYUV422YCbr8: color YUV 4:2:2 to YCbr 8 Bpp
*****************************************************************************/
-
-void ConvertYUV422YCbr8 ( YUV_ARGS_8BPP )
+void _M( ConvertYUV422YCbr8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 8" );
}
+
/*****************************************************************************
* ConvertYUV444YCbr8: color YUV 4:4:4 to YCbr 8 Bpp
*****************************************************************************/
-void ConvertYUV444YCbr8 ( YUV_ARGS_8BPP )
+void _M( ConvertYUV444YCbr8 )( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 8" );
}
+
/*****************************************************************************
* ConvertYUV420YCbr16: color YUV 4:2:0 to YCbr 16 Bpp
*****************************************************************************/
-void ConvertYUV420YCbr16 ( YUV_ARGS_16BPP )
+void _M( ConvertYUV420YCbr16 )( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
i_chroma_width = i_width / 2;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
- SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+ _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
i_scale_count = ( i_vertical_scaling == 1 ) ? i_pic_height : i_height;
}
}
+
/*****************************************************************************
* ConvertYUV422YCbr8: color YUV 4:2:2 to YCbr 16 Bpp
*****************************************************************************/
-
-void ConvertYUV422YCbr16 ( YUV_ARGS_16BPP )
+void _M( ConvertYUV422YCbr16 )( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 16" );
}
+
/*****************************************************************************
* ConvertYUV424YCbr8: color YUV 4:4:4 to YCbr 16 Bpp
*****************************************************************************/
-
-void ConvertYUV444YCbr16 ( YUV_ARGS_16BPP )
+void _M( ConvertYUV444YCbr16 )( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 16" );
}
+
/*****************************************************************************
* ConvertYUV420YCbr24: color YUV 4:2:0 to YCbr 24 Bpp
*****************************************************************************/
-
-void ConvertYUV420YCbr24 ( YUV_ARGS_24BPP )
+void _M( ConvertYUV420YCbr24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, YCbr = 24" );
}
+
/*****************************************************************************
* ConvertYUV422YCbr24: color YUV 4:2:2 to YCbr 24 Bpp
*****************************************************************************/
-
-void ConvertYUV422YCbr24 ( YUV_ARGS_24BPP )
+void _M( ConvertYUV422YCbr24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 24" );
}
+
/*****************************************************************************
* ConvertYUV444YCbr24: color YUV 4:4:4 to YCbr 24 Bpp
*****************************************************************************/
-
-void ConvertYUV444YCbr24 ( YUV_ARGS_24BPP )
+void _M( ConvertYUV444YCbr24 )( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 24" );
}
+
/*****************************************************************************
* ConvertYUV420YCbr32: color YUV 4:2:0 to YCbr 32 Bpp
*****************************************************************************/
-
-void ConvertYUV420YCbr32 ( YUV_ARGS_32BPP )
+void _M( ConvertYUV420YCbr32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, YCbr = 32" );
}
+
/*****************************************************************************
* ConvertYUV422YCbr32: color YUV 4:2:2 to YCbr 32 Bpp
*****************************************************************************/
-
-void ConvertYUV422YCbr32 ( YUV_ARGS_32BPP )
+void _M( ConvertYUV422YCbr32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 32" );
}
+
/*****************************************************************************
* ConvertYUV444YCbr32: color YUV 4:4:4 to YCbr 32 Bpp
*****************************************************************************/
-void ConvertYUV444YCbr32 ( YUV_ARGS_32BPP )
+void _M( ConvertYUV444YCbr32 )( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 32" );
}
-
* case by optimized functions.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_common.h,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: video_common.h,v 1.4 2001/04/15 04:19:58 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* Extern prototypes
*****************************************************************************/
-void SetOffset( int i_width, int i_height, int i_pic_width, int i_pic_height,
- boolean_t *pb_h_scaling, int *pi_v_scaling,
- int *p_offset, boolean_t b_double );
-
-void ConvertY4Gray8 ( YUV_ARGS_8BPP );
-void ConvertYUV420RGB8 ( YUV_ARGS_8BPP );
-void ConvertYUV422RGB8 ( YUV_ARGS_8BPP );
-void ConvertYUV444RGB8 ( YUV_ARGS_8BPP );
-
-void ConvertY4Gray16 ( YUV_ARGS_16BPP );
-void ConvertYUV420RGB16 ( YUV_ARGS_16BPP );
-void ConvertYUV422RGB16 ( YUV_ARGS_16BPP );
-void ConvertYUV444RGB16 ( YUV_ARGS_16BPP );
-
-void ConvertY4Gray24 ( YUV_ARGS_24BPP );
-void ConvertYUV420RGB24 ( YUV_ARGS_24BPP );
-void ConvertYUV422RGB24 ( YUV_ARGS_24BPP );
-void ConvertYUV444RGB24 ( YUV_ARGS_24BPP );
-
-void ConvertY4Gray32 ( YUV_ARGS_32BPP );
-void ConvertYUV420RGB32 ( YUV_ARGS_32BPP );
-void ConvertYUV422RGB32 ( YUV_ARGS_32BPP );
-void ConvertYUV444RGB32 ( YUV_ARGS_32BPP );
-
-void ConvertYUV420YCbr8 ( YUV_ARGS_8BPP );
-void ConvertYUV422YCbr8 ( YUV_ARGS_8BPP );
-void ConvertYUV444YCbr8 ( YUV_ARGS_8BPP );
-
-void ConvertYUV420YCbr16 ( YUV_ARGS_16BPP );
-void ConvertYUV422YCbr16 ( YUV_ARGS_16BPP );
-void ConvertYUV444YCbr16 ( YUV_ARGS_16BPP );
-
-void ConvertYUV420YCbr24 ( YUV_ARGS_24BPP );
-void ConvertYUV422YCbr24 ( YUV_ARGS_24BPP );
-void ConvertYUV444YCbr24 ( YUV_ARGS_24BPP );
-
-void ConvertYUV420YCbr32 ( YUV_ARGS_32BPP );
-void ConvertYUV422YCbr32 ( YUV_ARGS_32BPP );
-void ConvertYUV444YCbr32 ( YUV_ARGS_32BPP );
-
+void _M( SetOffset )( int i_width, int i_height, int i_pic_width,
+ int i_pic_height, boolean_t *pb_h_scaling,
+ int *pi_v_scaling, int *p_offset, boolean_t b_double );
+
+void _M( ConvertY4Gray8 ) ( YUV_ARGS_8BPP );
+void _M( ConvertYUV420RGB8 ) ( YUV_ARGS_8BPP );
+void _M( ConvertYUV422RGB8 ) ( YUV_ARGS_8BPP );
+void _M( ConvertYUV444RGB8 ) ( YUV_ARGS_8BPP );
+
+void _M( ConvertY4Gray16 ) ( YUV_ARGS_16BPP );
+void _M( ConvertYUV420RGB16 ) ( YUV_ARGS_16BPP );
+void _M( ConvertYUV422RGB16 ) ( YUV_ARGS_16BPP );
+void _M( ConvertYUV444RGB16 ) ( YUV_ARGS_16BPP );
+
+void _M( ConvertY4Gray24 ) ( YUV_ARGS_24BPP );
+void _M( ConvertYUV420RGB24 ) ( YUV_ARGS_24BPP );
+void _M( ConvertYUV422RGB24 ) ( YUV_ARGS_24BPP );
+void _M( ConvertYUV444RGB24 ) ( YUV_ARGS_24BPP );
+
+void _M( ConvertY4Gray32 ) ( YUV_ARGS_32BPP );
+void _M( ConvertYUV420RGB32 ) ( YUV_ARGS_32BPP );
+void _M( ConvertYUV422RGB32 ) ( YUV_ARGS_32BPP );
+void _M( ConvertYUV444RGB32 ) ( YUV_ARGS_32BPP );
+
+void _M( ConvertYUV420YCbr8 ) ( YUV_ARGS_8BPP );
+void _M( ConvertYUV422YCbr8 ) ( YUV_ARGS_8BPP );
+void _M( ConvertYUV444YCbr8 ) ( YUV_ARGS_8BPP );
+
+void _M( ConvertYUV420YCbr16 ) ( YUV_ARGS_16BPP );
+void _M( ConvertYUV422YCbr16 ) ( YUV_ARGS_16BPP );
+void _M( ConvertYUV444YCbr16 ) ( YUV_ARGS_16BPP );
+
+void _M( ConvertYUV420YCbr24 ) ( YUV_ARGS_24BPP );
+void _M( ConvertYUV422YCbr24 ) ( YUV_ARGS_24BPP );
+void _M( ConvertYUV444YCbr24 ) ( YUV_ARGS_24BPP );
+
+void _M( ConvertYUV420YCbr32 ) ( YUV_ARGS_32BPP );
+void _M( ConvertYUV422YCbr32 ) ( YUV_ARGS_32BPP );
+void _M( ConvertYUV444YCbr32 ) ( YUV_ARGS_32BPP );
* case by optimized functions.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_yuv.c,v 1.12 2001/03/21 13:42:34 sam Exp $
+ * $Id: video_yuv.c,v 1.13 2001/04/15 04:19:58 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
{
switch( p_vout->i_bytes_per_pixel)
{
+#define _X( foo ) (vout_yuv_convert_t *) _M( foo )
case 1:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr8;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr8;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr8;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr8 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr8 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr8 );
break;
case 2:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr16;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr16;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr16;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr16 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr16 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr16 );
break;
case 3:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr24;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr24;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr24;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr24 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr24 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr24 );
break;
case 4:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr32;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr32;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr32;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr32 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr32 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr32 );
break;
}
+#undef _X
}
else if( p_vout->b_grayscale )
{
/* Grayscale */
switch( p_vout->i_bytes_per_pixel )
{
+#define _X( foo ) (vout_yuv_convert_t *) _M( foo )
case 1:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray8;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray8;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray8;
+ p_vout->yuv.pf_yuv420 = _X( ConvertY4Gray8 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray8 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray8 );
break;
case 2:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray16;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray16;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray16;
+ p_vout->yuv.pf_yuv420 = _X( ConvertY4Gray16 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray16 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray16 );
break;
case 3:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray24;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray24;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray24;
+ p_vout->yuv.pf_yuv420 = _X( ConvertY4Gray24 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray24 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray24 );
break;
case 4:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray32;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray32;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray32;
+ p_vout->yuv.pf_yuv420 = _X( ConvertY4Gray32 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray32 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray32 );
break;
+#undef _X
}
}
else
/* Color */
switch( p_vout->i_bytes_per_pixel )
{
+#define _X( foo ) (vout_yuv_convert_t *) _M( foo )
case 1:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB8;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB8;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB8;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB8 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB8 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB8 );
break;
case 2:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB16;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB16;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB16;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB16 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB16 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB16 );
break;
case 3:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB24;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB24;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB24 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB24 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB24 );
break;
case 4:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB32;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB32;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB32 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB32 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB32 );
break;
+#undef _X
}
}
* It will also set horizontal and vertical scaling indicators. If b_double
* is set, the p_offset structure has interleaved Y and U/V offsets.
*****************************************************************************/
-void SetOffset( int i_width, int i_height, int i_pic_width, int i_pic_height,
- boolean_t *pb_h_scaling, int *pi_v_scaling,
- int *p_offset, boolean_t b_double )
+void _M( SetOffset )( int i_width, int i_height, int i_pic_width,
+ int i_pic_height, boolean_t *pb_h_scaling,
+ int *pi_v_scaling, int *p_offset, boolean_t b_double )
{
int i_x; /* x position in destination */
int i_scale_count; /* modulo counter */
* Provides functions to perform the YUV conversion.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_yuvmmx.c,v 1.7 2001/03/21 13:42:34 sam Exp $
+ * $Id: video_yuvmmx.c,v 1.8 2001/04/15 04:19:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
{
switch( p_vout->i_bytes_per_pixel)
{
+#define _X( foo ) (vout_yuv_convert_t *) _M( foo )
case 1:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr8;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr8;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr8;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr8 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr8 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr8 );
break;
case 2:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr16;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr16;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr16;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr16 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr16 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr16 );
break;
case 3:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr24;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr24;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr24;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr24 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr24 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr24 );
break;
case 4:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr32;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr32;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr32;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420YCbr32 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422YCbr32 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444YCbr32 );
break;
+#undef _X
}
}
else if( p_vout->b_grayscale )
/* Grayscale */
switch( p_vout->i_bytes_per_pixel )
{
+#define _X( foo ) (vout_yuv_convert_t *) _M( foo )
case 1:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray8;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray8;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray8;
+ p_vout->yuv.pf_yuv420 = _X( ConvertY4Gray8 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray8 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray8 );
break;
case 2:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray16;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray16;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray16;
+ p_vout->yuv.pf_yuv420 = _X( ConvertY4Gray16 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray16 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray16 );
break;
case 3:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray24;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray24;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB24 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray24 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray24 );
break;
case 4:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray32;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray32;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB32 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertY4Gray32 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertY4Gray32 );
break;
+#undef _X
}
}
else
/* Color */
switch( p_vout->i_bytes_per_pixel )
{
+#define _X( foo ) (vout_yuv_convert_t *) _M( foo )
case 1:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB8;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB8;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB8;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB8 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB8 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB8 );
break;
case 2:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB16;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB16;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB16;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB16 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB16 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB16 );
break;
case 3:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB24;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB24;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB24 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB24 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB24 );
break;
case 4:
- p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
- p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB32;
- p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB32;
+ p_vout->yuv.pf_yuv420 = _X( ConvertYUV420RGB32 );
+ p_vout->yuv.pf_yuv422 = _X( ConvertYUV422RGB32 );
+ p_vout->yuv.pf_yuv444 = _X( ConvertYUV444RGB32 );
break;
+#undef _X
}
}
}
* It will also set horizontal and vertical scaling indicators. If b_double
* is set, the p_offset structure has interleaved Y and U/V offsets.
*****************************************************************************/
-void SetOffset( int i_width, int i_height, int i_pic_width, int i_pic_height,
- boolean_t *pb_h_scaling, int *pi_v_scaling,
- int *p_offset, boolean_t b_double )
+void _M( SetOffset )( int i_width, int i_height, int i_pic_width,
+ int i_pic_height, boolean_t *pb_h_scaling,
+ int *pi_v_scaling, int *p_offset, boolean_t b_double )
{
int i_x; /* x position in destination */
int i_scale_count; /* modulo counter */
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.97 2001/04/12 02:40:09 stef Exp $
+ * $Id: input.c,v 1.98 2001/04/15 04:19:58 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
{
/* End of file - we do not set b_die because only the
* interface is allowed to do so. */
- intf_WarnMsg( 1, "End of file reached" );
+ intf_WarnMsg( 1, "input: EOF reached" );
p_input->b_eof = 1;
}
else
DestroyThread( p_input );
- intf_DbgMsg("Thread end");
+ intf_DbgMsg("input: Thread end");
}
/*****************************************************************************
*****************************************************************************/
void input_FileClose( input_thread_t * p_input )
{
+ intf_Msg( "input: closing %s", p_input->p_source );
close( p_input->i_handle );
return;
/*****************************************************************************
- * modules.c : Built-in and dynamic modules management functions
+ * modules.c : Built-in and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.22 2001/04/12 01:52:45 sam Exp $
+ * $Id: modules.c,v 1.23 2001/04/15 04:19:58 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
#if defined(HAVE_DLFCN_H) /* Linux, BSD, Hurd */
# include <dlfcn.h> /* dlopen(), dlsym(), dlclose() */
-
+# define HAVE_DYNAMIC_PLUGINS
#elif defined(HAVE_IMAGE_H) /* BeOS */
# include <image.h>
-
+# define HAVE_DYNAMIC_PLUGINS
#else
- /* FIXME: this isn't supposed to be an error */
-# error no dynamic plugins available on your system !
+# undef HAVE_DYNAMIC_PLUGINS
#endif
#ifdef SYS_BEOS
#include "intf_msg.h"
#include "modules.h"
+#include "modules_builtin.h"
#include "modules_core.h"
/* Local prototypes */
-static int AllocateDynModule( module_bank_t * p_bank, char * psz_filename );
-static int HideModule( module_t * p_module );
-static int FreeModule( module_bank_t * p_bank, module_t * p_module );
-static int LockModule( module_t * p_module );
-static int UnlockModule( module_t * p_module );
-static int CallSymbol( module_t * p_module, char * psz_name );
+#ifdef HAVE_DYNAMIC_PLUGINS
+static int AllocatePluginModule ( module_bank_t *, char * );
+#endif
+static int AllocateBuiltinModule( module_bank_t *,
+ int ( * ) ( module_t * ),
+ int ( * ) ( module_t * ),
+ int ( * ) ( module_t * ) );
+static int FreeModule ( module_bank_t * p_bank, 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 * );
+#endif
/*****************************************************************************
* module_CreateBank: create the module bank.
* module_InitBank: create the module bank.
*****************************************************************************
* This function creates a module bank structure and fills it with the
- * built-in modules, as well as all the dynamic modules it can find.
+ * built-in modules, as well as all the plugin modules it can find.
*****************************************************************************/
void module_InitBank( module_bank_t * p_bank )
{
+#ifdef HAVE_DYNAMIC_PLUGINS
static char * path[] = { ".", "lib", PLUGIN_PATH, NULL, NULL };
char ** ppsz_path = path;
#endif
DIR * dir;
struct dirent * file;
+#endif /* HAVE_DYNAMIC_PLUGINS */
p_bank->first = NULL;
vlc_mutex_init( &p_bank->lock );
intf_WarnMsg( 1, "module: module bank initialized" );
+ intf_WarnMsg( 2, "module: checking built-in modules" );
+
+ ALLOCATE_ALL_BUILTINS();
+
+#ifdef HAVE_DYNAMIC_PLUGINS
+ intf_WarnMsg( 2, "module: checking plugin modules" );
+
for( ; *ppsz_path != NULL ; ppsz_path++ )
{
/* Store strlen(*ppsz_path) for later use. */
psz_fullpath = *ppsz_path;
}
- intf_WarnMsgImm( 2, "module: browsing %s", psz_fullpath );
+ intf_WarnMsgImm( 3, "module: browsing `%s'", psz_fullpath );
if( (dir = opendir( psz_fullpath )) )
{
sprintf( psz_file, "%s/%s", psz_fullpath, file->d_name );
/* We created a nice filename -- now we just try to load
- * it as a dynamic module. */
- AllocateDynModule( p_bank, psz_file );
+ * it as a plugin module. */
+ AllocatePluginModule( p_bank, psz_file );
/* We don't care if the allocation succeeded */
free( psz_file );
}
#endif
}
+#endif /* HAVE_DYNAMIC_PLUGINS */
return;
}
/*****************************************************************************
* module_DestroyBank: destroy the module bank.
*****************************************************************************
- * This function unloads all unused dynamic modules and removes the module
+ * This function unloads all unused plugin modules and removes the module
* bank in case of success.
*****************************************************************************/
void module_DestroyBank( module_bank_t * p_bank )
/*****************************************************************************
* module_ResetBank: reset the module bank.
*****************************************************************************
- * This function resets the module bank by unloading all unused dynamic
+ * This function resets the module bank by unloading all unused plugin
* modules.
*****************************************************************************/
void module_ResetBank( module_bank_t * p_bank )
*****************************************************************************/
void module_ManageBank( module_bank_t * p_bank )
{
+#ifdef HAVE_DYNAMIC_PLUGINS
module_t * p_module;
/* We take the global lock */
p_module != NULL ;
p_module = p_module->next )
{
- /* If the module is unused and if it is a dynamic module... */
+ /* If the module is unused and if it is a plugin module... */
if( p_module->i_usage == 0 && !p_module->b_builtin )
{
if( p_module->i_unused_delay < MODULE_HIDE_DELAY )
}
else
{
- intf_WarnMsg( 1, "module: hiding unused module `%s'",
+ intf_WarnMsg( 3, "module: hiding unused module `%s'",
p_module->psz_name );
HideModule( p_module );
}
/* We release the global lock */
vlc_mutex_unlock( &p_bank->lock );
+#endif /* HAVE_DYNAMIC_PLUGINS */
return;
}
}
}
- /* We release the global lock */
+ /* We can release the global lock, module refcount was incremented */
vlc_mutex_unlock( &p_bank->lock );
if( p_bestmodule != NULL )
{
- intf_WarnMsg( 1, "module: locking module `%s'",
+ intf_WarnMsg( 3, "module: locking module `%s'",
p_bestmodule->psz_name );
}
* so there is no need to check the return value. */
UnlockModule( p_module );
- intf_WarnMsg( 1, "module: unlocking module `%s'", p_module->psz_name );
+ intf_WarnMsg( 3, "module: unlocking module `%s'", p_module->psz_name );
/* We release the global lock */
vlc_mutex_unlock( &p_bank->lock );
* Following functions are local.
*****************************************************************************/
+#ifdef HAVE_DYNAMIC_PLUGINS
/*****************************************************************************
- * AllocateDynModule: load a module into memory and initialize it.
+ * AllocatePluginModule: load a module into memory and initialize it.
*****************************************************************************
* This function loads a dynamically loadable module and allocates a structure
* for its information data. The module can then be handled by module_Need,
* module_Unneed and HideModule. It can be removed by FreeModule.
*****************************************************************************/
-static int AllocateDynModule( module_bank_t * p_bank, char * psz_filename )
+static int AllocatePluginModule( module_bank_t * p_bank, char * psz_filename )
{
module_t * p_module, * p_othermodule;
module_handle_t handle;
/* Try to dynamically load the module. */
if( module_load( psz_filename, &handle ) )
{
- /* The dynamic module couldn't be opened */
- intf_WarnMsgImm( 1, "module warning: cannot open %s (%s)",
+ /* The plugin module couldn't be opened */
+ intf_WarnMsgImm( 3, "module warning: cannot open %s (%s)",
psz_filename, module_error() );
return( -1 );
}
}
/* We need to fill these since they may be needed by CallSymbol() */
- p_module->psz_filename = psz_filename;
- p_module->handle = handle;
+ p_module->is.plugin.psz_filename = psz_filename;
+ p_module->is.plugin.handle = handle;
/* Initialize the module : fill p_module->psz_name, etc. */
if( CallSymbol( p_module, "InitModule" ) != 0 )
/* We strdup() these entries so that they are still valid when the
* module is unloaded. */
- p_module->psz_filename = strdup( p_module->psz_filename );
+ 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->psz_filename == NULL
+ if( p_module->is.plugin.psz_filename == NULL
|| p_module->psz_name == NULL
|| p_module->psz_longname == NULL
|| p_module->psz_version == NULL )
{
intf_ErrMsg( "module error: can't duplicate strings" );
- free( p_module->psz_filename );
+ free( p_module->is.plugin.psz_filename );
free( p_module->psz_name );
free( p_module->psz_longname );
free( p_module->psz_version );
p_bank->first = p_module;
/* Immediate message so that a slow module doesn't make the user wait */
- intf_WarnMsgImm( 1, "module: dynamic module `%s', %s",
+ intf_WarnMsgImm( 2, "module: plugin module `%s', %s",
p_module->psz_name, p_module->psz_longname );
return( 0 );
}
+#endif /* HAVE_DYNAMIC_PLUGINS */
/*****************************************************************************
- * HideModule: remove a module from memory but keep its structure.
+ * AllocateBuiltinModule: initialize a built-in module.
*****************************************************************************
- * This function can only be called if i_usage == 0. It will make a call
- * to the module's inner DeactivateModule() symbol, and then unload it
- * from memory. A call to module_Need() will automagically load it again.
+ * This function registers a built-in module and allocates a structure
+ * for its information data. The module can then be handled by module_Need,
+ * module_Unneed and HideModule. It can be removed by FreeModule.
*****************************************************************************/
-static int HideModule( module_t * p_module )
+static int AllocateBuiltinModule( module_bank_t * p_bank,
+ int ( *pf_init ) ( module_t * ),
+ int ( *pf_activate ) ( module_t * ),
+ int ( *pf_deactivate ) ( module_t * ) )
{
- if( p_module->b_builtin )
+ module_t * p_module, * p_othermodule;
+
+ /* Now that we have successfully loaded the module, we can
+ * allocate a structure for it */
+ p_module = malloc( sizeof( module_t ) );
+ if( p_module == NULL )
{
- /* A built-in module should never be hidden. */
- intf_ErrMsg( "module error: trying to hide built-in module `%s'",
- p_module->psz_name );
+ intf_ErrMsg( "module error: can't allocate p_module" );
return( -1 );
}
- if( p_module->i_usage >= 1 )
+ /* Initialize the module : fill p_module->psz_name, etc. */
+ if( pf_init( p_module ) != 0 )
{
- intf_ErrMsg( "module error: trying to hide module `%s' which is still"
- " in use", p_module->psz_name );
+ /* With a well-written module we shouldn't have to print an
+ * additional error message here, but just make sure. */
+ intf_ErrMsg( "module error: failed calling init in builtin module" );
+ free( p_module );
return( -1 );
}
- if( p_module->i_usage <= -1 )
+ /* Check that version numbers match */
+ if( strcmp( VERSION, p_module->psz_version ) )
{
- intf_ErrMsg( "module error: trying to hide module `%s' which is already"
- " hidden", p_module->psz_name );
+ free( p_module );
return( -1 );
}
- /* Deactivate the module : free the capability structure, etc. */
- if( CallSymbol( p_module, "DeactivateModule" ) != 0 )
+ /* Check that we don't already have a module with this name */
+ for( p_othermodule = p_bank->first ;
+ p_othermodule != NULL ;
+ p_othermodule = p_othermodule->next )
{
- /* We couldn't call DeactivateModule() -- looks nasty, but
- * we can't do much about it. Just try to unload module anyway. */
- module_unload( p_module->handle );
- p_module->i_usage = -1;
+ if( !strcmp( p_othermodule->psz_name, p_module->psz_name ) )
+ {
+ free( p_module );
+ return( -1 );
+ }
+ }
+
+ if( pf_activate( p_module ) != 0 )
+ {
+ /* With a well-written module we shouldn't have to print an
+ * additional error message here, but just make sure. */
+ intf_ErrMsg( "module error: failed calling activate "
+ "in builtin module" );
+ free( p_module );
return( -1 );
}
- /* Everything worked fine, we can safely unload the module. */
- module_unload( p_module->handle );
- p_module->i_usage = -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" );
+ free( p_module->psz_name );
+ free( p_module->psz_longname );
+ 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;
+
+ p_module->b_builtin = 1;
+ p_module->is.builtin.pf_deactivate = pf_deactivate;
+
+ /* Link module into the linked list */
+ if( p_bank->first != NULL )
+ {
+ p_bank->first->prev = p_module;
+ }
+ p_module->next = p_bank->first;
+ p_module->prev = NULL;
+ p_bank->first = p_module;
+
+ /* Immediate message so that a slow module doesn't make the user wait */
+ intf_WarnMsgImm( 2, "module: builtin module `%s', %s",
+ p_module->psz_name, p_module->psz_longname );
return( 0 );
}
" usage %i", p_module->psz_name, p_module->i_usage );
return( -1 );
}
+ else
+ {
+ /* We deactivate the module now. */
+ p_module->is.builtin.pf_deactivate( p_module );
+ }
}
+#ifdef HAVE_DYNAMIC_PLUGINS
else
{
if( p_module->i_usage >= 1 )
}
}
}
+#endif
/* Unlink the module from the linked list. */
if( p_module == p_bank->first )
}
/* We free the structures that we strdup()ed in Allocate*Module(). */
- free( p_module->psz_filename );
+#ifdef HAVE_DYNAMIC_PLUGINS
+ if( !p_module->b_builtin )
+ {
+ free( p_module->is.plugin.psz_filename );
+ }
+#endif
free( p_module->psz_name );
free( p_module->psz_longname );
free( p_module->psz_version );
return( -1 );
}
+#ifdef HAVE_DYNAMIC_PLUGINS
if( p_module->i_usage != -1 )
{
/* This shouldn't happen. Ever. We have serious problems here. */
- intf_ErrMsg( "module error: dynamic module `%s' has refcount %i",
+ intf_ErrMsg( "module error: plugin module `%s' has refcount %i",
p_module->psz_name, p_module->i_usage );
return( -1 );
}
/* i_usage == -1, which means that the module isn't in memory */
- if( module_load( p_module->psz_filename, &p_module->handle ) )
+ if( module_load( p_module->is.plugin.psz_filename,
+ &p_module->is.plugin.handle ) )
{
- /* The dynamic module couldn't be opened */
+ /* The plugin module couldn't be opened */
intf_ErrMsg( "module error: cannot open %s (%s)",
- p_module->psz_filename, module_error() );
+ p_module->is.plugin.psz_filename, module_error() );
return( -1 );
}
{
/* We couldn't call ActivateModule() -- looks nasty, but
* we can't do much about it. Just try to unload module. */
- module_unload( p_module->handle );
+ module_unload( p_module->is.plugin.handle );
p_module->i_usage = -1;
return( -1 );
}
/* Everything worked fine ! The module is ready to be used */
p_module->i_usage = 1;
+#endif /* HAVE_DYNAMIC_PLUGINS */
return( 0 );
}
return( 0 );
}
+#ifdef HAVE_DYNAMIC_PLUGINS
+/*****************************************************************************
+ * HideModule: remove a module from memory but keep its structure.
+ *****************************************************************************
+ * This function can only be called if i_usage == 0. It will make a call
+ * to the module's inner DeactivateModule() symbol, and then unload it
+ * from memory. A call to module_Need() will automagically load it again.
+ *****************************************************************************/
+static int HideModule( module_t * p_module )
+{
+ if( p_module->b_builtin )
+ {
+ /* A built-in module should never be hidden. */
+ intf_ErrMsg( "module error: trying to hide built-in module `%s'",
+ p_module->psz_name );
+ return( -1 );
+ }
+
+ if( p_module->i_usage >= 1 )
+ {
+ intf_ErrMsg( "module error: trying to hide module `%s' which is still"
+ " in use", p_module->psz_name );
+ return( -1 );
+ }
+
+ if( p_module->i_usage <= -1 )
+ {
+ intf_ErrMsg( "module error: trying to hide module `%s' which is already"
+ " hidden", p_module->psz_name );
+ return( -1 );
+ }
+
+ /* Deactivate the module : free the capability structure, etc. */
+ if( CallSymbol( p_module, "DeactivateModule" ) != 0 )
+ {
+ /* We couldn't call DeactivateModule() -- looks nasty, but
+ * we can't do much about it. Just try to unload module anyway. */
+ module_unload( p_module->is.plugin.handle );
+ p_module->i_usage = -1;
+ return( -1 );
+ }
+
+ /* Everything worked fine, we can safely unload the module. */
+ module_unload( p_module->is.plugin.handle );
+ p_module->i_usage = -1;
+
+ return( 0 );
+}
+
/*****************************************************************************
* CallSymbol: calls a module symbol.
*****************************************************************************
symbol_t * p_symbol;
/* Try to resolve the symbol */
- p_symbol = module_getsymbol( p_module->handle, psz_name );
+ p_symbol = module_getsymbol( p_module->is.plugin.handle, psz_name );
if( !p_symbol )
{
/* We couldn't load the symbol */
- intf_WarnMsg( 1, "module warning: "
+ intf_WarnMsg( 3, "module warning: "
"cannot find symbol %s in module %s (%s)",
- psz_name, p_module->psz_filename, module_error() );
+ psz_name, p_module->is.plugin.psz_filename,
+ module_error() );
return( -1 );
}
/* With a well-written module we shouldn't have to print an
* additional error message here, but just make sure. */
intf_ErrMsg( "module error: failed calling symbol %s in module %s",
- psz_name, p_module->psz_filename );
+ psz_name, p_module->is.plugin.psz_filename );
return( -1 );
}
/* Everything worked fine, we can return */
return( 0 );
}
+#endif /* HAVE_DYNAMIC_PLUGINS */