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"...
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
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
#
# 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)))
# 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
#
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)
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
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
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*
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*
BSD_DVD_STRUCT=0
cat > conftest.$ac_ext <<EOF
-#line 3402 "configure"
+#line 3403 "configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3420 "configure"
+#line 3421 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
fi
cat > conftest.$ac_ext <<EOF
-#line 3444 "configure"
+#line 3445 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
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
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
# 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
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*
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*
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*
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*
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*
# 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
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*
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*
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*
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
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
+
trap '' 1 2 15
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
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
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
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
###############################################################################
# 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)
#
# 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) $@
* 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>
*
/*****************************************************************************
* 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.
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
+ | MODULE_CAPABILITY_INPUT
| MODULE_CAPABILITY_AOUT
| MODULE_CAPABILITY_VOUT
| MODULE_CAPABILITY_INTF;
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 );
--- /dev/null
+/*****************************************************************************
+ * 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;
+}
+
* 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>
*
+++ /dev/null
-###############################################################################
-# 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) $@
-
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.118 2001/05/31 12:45:39 sam Exp $
+ * $Id: input.c,v 1.119 2001/06/07 01:10:33 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->pf_rewind = f.pf_rewind;
p_input->pf_seek = f.pf_seek;
#undef f
+
+ /* We found the appropriate plugin, open the target */
p_input->pf_open( p_input );
if( p_input->b_error )