Commit 214396bc authored by Sam Hocevar's avatar Sam Hocevar

  * Put most builtins in plugins again due to performances issues (more
    about this in a forthcoming post here).
  * Fixed the painfully slow build process (at last!).
  * Moved the null plugin together with the dummy one.
  * Added new dummy input plugin.

   More on the dummy input plugin: we'll use it to insert commands in
  the playlist. Currently implemented are the "quit" and "pause" functions,
  here are examples on how they are used:

    vlc file.mpeg vlc:quit                # exit after file.mpeg has been read.

    vlc file1.mpeg vlc:pause:3 file2.mpeg # pause 3 seconds before playing
                                          # the next file.

   From now we can more efficiently benchmark vlc. For instance, to test
  the video output changes I am doing, I use such a command:

    time vlc -I dummy --noaudio file.mpeg vlc:quit

   Future extentions might include more interesting stuff like "switch
  to full screen", "repeat next file 3 times", "switch to SDL video
  output"...
parent 8dee1230
......@@ -4,7 +4,9 @@
HEAD
* Nothing yet.
* Put most builtins in plugins again due to performances issues.
* Fixed the painfully slow build process (at last!).
* Added new dummy input plugin.
0.2.80
Tue, 5 Jun 2001 04:41:06 +0200
......
......@@ -16,21 +16,21 @@ PLUGINS_DIR := alsa beos darwin directx dsp dummy \
downmix idct imdct \
macosx mga \
motion \
mpeg null qt sdl \
mpeg qt sdl \
text x11 yuv
#
# All possible plugin objects
#
PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin directx/directx \
dsp/dsp dummy/dummy dvd/dvd esd/esd fb/fb ggi/ggi \
glide/glide gtk/gnome gtk/gtk \
dsp/dsp dummy/dummy dummy/null dvd/dvd esd/esd fb/fb \
ggi/ggi glide/glide gtk/gnome gtk/gtk \
downmix/downmix downmix/downmixsse downmix/downmix3dn \
idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext \
imdct/imdct imdct/imdct3dn imdct/imdctsse \
macosx/macosx mga/mga \
motion/motion motion/motionmmx motion/motionmmxext \
mpeg/es mpeg/ps mpeg/ts null/null qt/qt sdl/sdl \
mpeg/es mpeg/ps mpeg/ts qt/qt sdl/sdl \
text/ncurses text/rc x11/x11 x11/xvideo yuv/yuv yuv/yuvmmx
#
......
......@@ -119,7 +119,8 @@ 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 -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
DEFINE += $(DEFINE_CONSTANTS)
# On Linux activate 64-bit off_t (by default under BSD)
ifneq (,$(findstring linux,$(SYS)))
......@@ -150,7 +151,8 @@ endif
# Libraries needed by built-in modules
#
ifneq (,$(BUILTINS))
LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
LIB += $(LIB_BUILTINS)
endif
#
......
......@@ -3263,7 +3263,8 @@ fi
ARCH=${host_cpu}
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
BUILTINS="${BUILTINS} es ps ts"
PLUGINS="${PLUGINS} yuv idct idctclassic motion imdct downmix"
case x$host_os in
xmingw32msvc)
......@@ -3277,16 +3278,16 @@ case x$host_os in
esac
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
echo "configure:3281: checking if \$CC groks MMX inline assembly" >&5
echo "configure:3282: checking if \$CC groks MMX inline assembly" >&5
cat > conftest.$ac_ext <<EOF
#line 3283 "configure"
#line 3284 "configure"
#include "confdefs.h"
void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
int main() {
; return 0; }
EOF
if { (eval echo configure:3290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ACCEL_PLUGINS="${ACCEL_PLUGINS} ${MMX_PLUGINS}"
echo "$ac_t""yes" 1>&6
......@@ -3299,16 +3300,16 @@ fi
rm -f conftest*
echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
echo "configure:3303: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
echo "configure:3304: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
cat > conftest.$ac_ext <<EOF
#line 3305 "configure"
#line 3306 "configure"
#include "confdefs.h"
void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
int main() {
; return 0; }
EOF
if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ACCEL_PLUGINS="${ACCEL_PLUGINS} ${MMXEXT_PLUGINS}"
echo "$ac_t""yes" 1>&6
......@@ -3324,17 +3325,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3328: checking for $ac_hdr" >&5
echo "configure:3329: 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 3333 "configure"
#line 3334 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3339: \"$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*
......@@ -3360,17 +3361,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3364: checking for $ac_hdr" >&5
echo "configure:3365: 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 3369 "configure"
#line 3370 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3375: \"$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*
......@@ -3398,7 +3399,7 @@ done
BSD_DVD_STRUCT=0
cat > conftest.$ac_ext <<EOF
#line 3402 "configure"
#line 3403 "configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
......@@ -3416,7 +3417,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 3420 "configure"
#line 3421 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
......@@ -3440,7 +3441,7 @@ EOF
fi
cat > conftest.$ac_ext <<EOF
#line 3444 "configure"
#line 3445 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -3503,10 +3504,10 @@ fi
if test "${enable_mmx+set}" = set; then
enableval="$enable_mmx"
if test x$enableval = xyes; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi
PLUGINS="${PLUGINS} ${ACCEL_PLUGINS}"; fi
else
if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi
PLUGINS="${PLUGINS} ${ACCEL_PLUGINS}"; fi
fi
......@@ -3514,7 +3515,7 @@ fi
if test "${enable_altivec+set}" = set; then
enableval="$enable_altivec"
if test x$enableval = xyes; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} idctaltivec"
PLUGINS="${PLUGINS} idctaltivec"
LIB_IDCTALTIVEC="-framework vecLib"
fi
fi
......@@ -3592,7 +3593,7 @@ if test "${enable_esd+set}" = set; then
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3596: checking for $ac_word" >&5
echo "configure:3597: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3657,17 +3658,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3661: checking for $ac_hdr" >&5
echo "configure:3662: 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 3666 "configure"
#line 3667 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3672: \"$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*
......@@ -3732,23 +3733,23 @@ if test "${with_sdl+set}" = set; then
if test "x$withval" != "xyes";
then
LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
INCLUDE="${INCLUDE} -I"$withval"/include"
CFLAGS_SDL="-I"$withval"/include"
else
for ac_hdr in SDL/SDL.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3742: checking for $ac_hdr" >&5
echo "configure:3743: 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 3747 "configure"
#line 3748 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3753: \"$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*
......@@ -3786,17 +3787,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3790: checking for $ac_hdr" >&5
echo "configure:3791: 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 3795 "configure"
#line 3796 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3801: \"$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*
......@@ -3840,17 +3841,17 @@ if test "${with_directx+set}" = set; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3844: checking for $ac_hdr" >&5
echo "configure:3845: 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 3849 "configure"
#line 3850 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3855: \"$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*
......@@ -3888,17 +3889,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3892: checking for $ac_hdr" >&5
echo "configure:3893: 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 3897 "configure"
#line 3898 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3903: \"$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*
......@@ -3998,7 +3999,7 @@ if test x$enable_gtk != xno; then
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4002: checking for $ac_word" >&5
echo "configure:4003: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -4058,17 +4059,17 @@ if test x$enable_x11 != xno; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4062: checking for $ac_hdr" >&5
echo "configure:4063: 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 4067 "configure"
#line 4068 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4073: \"$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*
......@@ -4120,17 +4121,17 @@ if test x$enable_xvideo != xno; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4124: checking for $ac_hdr" >&5
echo "configure:4125: 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 4129 "configure"
#line 4130 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4135: \"$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*
......@@ -4168,17 +4169,17 @@ if test "${enable_alsa+set}" = set; then
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:4172: checking for sys/asoundlib.h" >&5
echo "configure:4173: 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 4177 "configure"
#line 4178 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4183: \"$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*
......@@ -4195,7 +4196,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:4199: checking for main in -lasound" >&5
echo "configure:4200: 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
......@@ -4203,14 +4204,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4207 "configure"
#line 4208 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:4214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4215: \"$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
......@@ -4283,6 +4284,7 @@ fi
trap '' 1 2 15
......@@ -4471,6 +4473,7 @@ s%@LIB_XVIDEO@%$LIB_XVIDEO%g
s%@LIB_YUV@%$LIB_YUV%g
s%@CFLAGS_VLC@%$CFLAGS_VLC%g
s%@CFLAGS_GTK@%$CFLAGS_GTK%g
s%@CFLAGS_SDL@%$CFLAGS_SDL%g
s%@CFLAGS_X11@%$CFLAGS_X11%g
CEOF
......
......@@ -148,7 +148,8 @@ ARCH=${host_cpu}
dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
BUILTINS="${BUILTINS} es ps ts"
PLUGINS="${PLUGINS} yuv idct idctclassic motion imdct downmix"
dnl
dnl Accelerated modules
......@@ -248,9 +249,9 @@ dnl
AC_ARG_ENABLE(mmx,
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
[ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ],
PLUGINS="${PLUGINS} ${ACCEL_PLUGINS}"; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ])
PLUGINS="${PLUGINS} ${ACCEL_PLUGINS}"; fi ])
dnl
dnl AltiVec acceleration
......@@ -258,7 +259,7 @@ dnl
AC_ARG_ENABLE(altivec,
[ --enable-altivec Enable altivec optimizations (default disabled since it is broken)],
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} idctaltivec"
PLUGINS="${PLUGINS} idctaltivec"
LIB_IDCTALTIVEC="-framework vecLib"
fi ])
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
......
###############################################################################
# vlc (VideoLAN Client) dummy module makefile
# vlc (VideoLAN Client) dummy and null module makefile
# (c)2001 VideoLAN
###############################################################################
......@@ -7,9 +7,13 @@
# Objects
#
PLUGIN_C = dummy.o aout_dummy.o vout_dummy.o intf_dummy.o
BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
PLUGIN_NULL = null.o
PLUGIN_DUMMY = dummy.o aout_dummy.o vout_dummy.o intf_dummy.o input_dummy.o
BUILTIN_NULL = $(PLUGIN_NULL:%.o=BUILTIN_%.o)
BUILTIN_DUMMY = $(PLUGIN_DUMMY:%.o=BUILTIN_%.o)
PLUGIN_C = $(PLUGIN_NULL) $(PLUGIN_DUMMY)
BUILTIN_C = $(BUILTIN_NULL) $(BUILTIN_DUMMY)
ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
#
......@@ -22,10 +26,17 @@ include ../../Makefile.modules
# Real targets
#
../../lib/dummy.so: $(PLUGIN_C)
../../lib/null.so: $(PLUGIN_NULL)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/dummy.a: $(BUILTIN_C)
../../lib/null.a: $(BUILTIN_NULL)
ar r $@ $^
$(RANLIB) $@
../../lib/dummy.so: $(PLUGIN_DUMMY)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/dummy.a: $(BUILTIN_DUMMY)
ar r $@ $^
$(RANLIB) $@
......@@ -2,7 +2,7 @@
* dummy.c : dummy plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: dummy.c,v 1.9 2001/05/30 17:03:12 sam Exp $
* $Id: dummy.c,v 1.10 2001/06/07 01:10:33 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -42,9 +42,10 @@
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
void _M( aout_getfunctions )( function_list_t * p_function_list );
void _M( vout_getfunctions )( function_list_t * p_function_list );
void _M( intf_getfunctions )( function_list_t * p_function_list );
void _M( input_getfunctions ) ( function_list_t * p_function_list );
void _M( aout_getfunctions ) ( function_list_t * p_function_list );
void _M( vout_getfunctions ) ( function_list_t * p_function_list );
void _M( intf_getfunctions ) ( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
......@@ -56,6 +57,7 @@ MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_INPUT
| MODULE_CAPABILITY_AOUT
| MODULE_CAPABILITY_VOUT
| MODULE_CAPABILITY_INTF;
......@@ -63,6 +65,7 @@ MODULE_INIT_START
MODULE_INIT_STOP
MODULE_ACTIVATE_START
_M( input_getfunctions )( &p_module->p_functions->input );
_M( aout_getfunctions )( &p_module->p_functions->aout );
_M( vout_getfunctions )( &p_module->p_functions->vout );
_M( intf_getfunctions )( &p_module->p_functions->intf );
......
/*****************************************************************************
* input_dummy.c: dummy input plugin, to manage "vlc:***" special options
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input_dummy.c,v 1.1 2001/06/07 01:10:33 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME dummy
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifdef STRNCASECMP_IN_STRINGS_H
# include <strings.h>
#endif
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "interface.h"
#include "intf_msg.h"
#include "main.h"
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input.h"
#include "modules.h"
#include "modules_export.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int DummyProbe ( probedata_t * );
static void DummyOpen ( struct input_thread_s * );
static void DummyClose ( struct input_thread_s * );
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
void _M( input_getfunctions )( function_list_t * p_function_list )
{
#define input p_function_list->functions.input
p_function_list->pf_probe = DummyProbe;
input.pf_init = NULL; /* Not needed, open is called first */
input.pf_open = DummyOpen;
input.pf_close = DummyClose;
input.pf_end = NULL;
input.pf_set_area = NULL;
input.pf_read = NULL;
input.pf_demux = NULL;
input.pf_new_packet = NULL;
input.pf_new_pes = NULL;
input.pf_delete_packet = NULL;
input.pf_delete_pes = NULL;
input.pf_rewind = NULL;
input.pf_seek = NULL;
#undef input
}
/*
* Data reading functions
*/
/*****************************************************************************
* DummyProbe: verifies that the input is a vlc command
*****************************************************************************/
static int DummyProbe( probedata_t *p_data )
{
input_thread_t *p_input = (input_thread_t *)p_data;
char *psz_name = p_input->p_source;
if( TestMethod( INPUT_METHOD_VAR, "dummy" ) )
{
return( 999 );
}
if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "vlc:", 4 ) )
{
/* If the user specified "vlc:" then it's probably a file */
return( 100 );
}
return( 1 );
}
/*****************************************************************************
* DummyOpen: open the target, ie. do what the command says
*****************************************************************************/
static void DummyOpen( input_thread_t * p_input )
{
char *psz_name = p_input->p_source;
int i_len = strlen( psz_name );
int i_arg;
/* XXX: Tell the input layer to quit immediately, there must
* be a nicer way to do this. */
p_input->b_error = 1;
if( ( i_len <= 4 ) || strncasecmp( psz_name, "vlc:", 4 ) )
{
/* If the user specified "vlc:" then it's probably a file */
return;
}
/* We don't need the "vlc:" stuff any more */
psz_name += 4;
i_len -= 4;
/* Check for a "vlc:quit" command */
if( i_len == 4 && !strncasecmp( psz_name, "quit", 4 ) )
{
intf_WarnMsg( 1, "input: playlist command `quit'" );
p_main->p_intf->b_die = 1;
return;
}
/* Check for a "vlc:pause:***" command */
if( i_len > 6 && !strncasecmp( psz_name, "pause:", 6 ) )
{
i_arg = atoi( psz_name + 6 );
intf_WarnMsg( 1, "input: playlist command `pause %i'", i_arg );
intf_FlushMsg();
msleep( i_arg * 1000000 );
return;
}
intf_ErrMsg( "input error: unknown playlist command `%s'", psz_name );
}
/*****************************************************************************
* DummyClose: close the target, ie. do nothing
*****************************************************************************/
static void DummyClose( input_thread_t * p_input )
{
return;
}
......@@ -2,7 +2,7 @@
* null.c : NULL module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: null.c,v 1.8 2001/06/03 12:47:21 sam Exp $
* $Id: null.c,v 1.1 2001/06/07 01:10:33 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......
###############################################################################
# vlc (VideoLAN Client) null module makefile
# (c)2001 VideoLAN
###############################################################################
#
# Objects
#
PLUGIN_C = null.o
BUILTIN_C = $(PLUGIN_C:%.o=BUILTIN_%.o)
ALL_OBJ = $(PLUGIN_C) $(BUILTIN_C)
#
# Virtual targets
#
include ../../Makefile.modules
#
# Real targets
#
../../lib/null.so: $(PLUGIN_C)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/null.a: $(BUILTIN_C)
ar r $@ $^
$(RANLIB) $@