N: Nilmoni Deb
E: ndeb@ece.cmu.edu
-D: Minor configure.in and Makefile.in fixes
+D: Minor autoconf and Makefile fixes
N: Cyril Deguet
C: asmax
D: input netlist
D: MPEG TS input
+N: Arnaud Gomes-do-Vale
+E: arnaud@carrosse.frmug.org
+D: autoconf patches
+
N: Jean-Philippe Grimaldi
E: jeanphi@via.ecp.fr
C: jeanphi
N: Arkadiusz Miskiewicz
E: misiek@pld.ORG.PL
-D: Makefile and configure patches
+D: autoconf and Makefile patches
N: Olivier Pomel
E: pomel@via.ecp.fr
N: Espen Skoglund
E: esk@ira.uka.de
-D: FreeBSD configure.in and Makefile patches
+D: FreeBSD autoconf and Makefile patches
N: Benoit Steiner
E: benny@via.ecp.fr
HEAD
- * DVD title change no longer restart the input.
+ * Mandatory step for video output IV and the audio output quality
+ fix: the output threads are now spawned when a decoder needs one,
+ so it can decide the audio frequency or the video window size.
+ * Fixed a few buffer overflows in the Gnome interface.
+ * The module bank is now a global variable. The video output bank and
+ the audio output bank might follow (when they exist).
+ * Coding style and organization fixes to the spdif decoder.
+ * autoconf and Makefile changes by Arnaud Gomes-do-Vale
+ <arnaud@carrosse.frmug.org>.
+ * DVD title change no longer restarts the input.
* BeOS crash fix by Wade Majors <guru@startrek.com>.
* Slight modification in ClockManageRef: after a synchro reinit, we still
do the mwait and re-init last-cr.
make distclean && ./configure --prefix=/usr --enable-gnome \
--enable-fb --with-glide --with-ggi --with-sdl --enable-esd \
- --enable-alsa --enable-mga --enable-gtk --enable-qt --enable-xvideo
+ --enable-mga --enable-gtk --enable-qt --enable-xvideo
If you intend to debug stuff, you may want to disable optimizations:
make distclean && ./configure --prefix=/usr --enable-gnome \
--enable-fb --with-glide --with-ggi --with-sdl --enable-esd \
- --enable-alsa --enable-mga --enable-gtk --enable-qt --enable-xvideo \
+ --enable-mga --enable-gtk --enable-qt --enable-xvideo \
--disable-optimizatons
src/interface/intf_channels.o \
src/interface/intf_urldecode.o \
-INPUT = src/input/input_ext-dec.o \
+INPUT = src/input/input.o \
+ 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_ext-dec.o \
src/audio_output/aout_u8.o \
src/audio_output/aout_s8.o \
src/audio_output/aout_u16.o \
builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
$(BUILTIN_OBJ): FORCE
cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:lib/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
- $(RANLIB) $@
CFLAGS = @CFLAGS@
SHELL = @SHELL@
RANLIB = @RANLIB@
+MOC = @MOC@
#
# Installation environment
fi
done
+for ac_func in swab
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1854: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1859 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:1853: checking for getopt_long" >&5
+echo "configure:1908: checking for getopt_long" >&5
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1858 "configure"
+#line 1913 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getopt_long(); below. */
; return 0; }
EOF
-if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getopt_long=yes"
else
echo "$ac_t""no" 1>&6
# FreeBSD has a gnugetopt library for this:
echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:1903: checking for getopt_long in -lgnugetopt" >&5
+echo "configure:1958: checking for getopt_long in -lgnugetopt" >&5
ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1911 "configure"
+#line 1966 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getopt_long()
; return 0; }
EOF
-if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1977: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1954: checking for $ac_hdr" >&5
+echo "configure:2009: 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 1959 "configure"
+#line 2014 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2019: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1993: checking for $ac_func" >&5
+echo "configure:2048: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1998 "configure"
+#line 2053 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2046: checking for working mmap" >&5
+echo "configure:2101: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2054 "configure"
+#line 2109 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2217: checking return type of signal handlers" >&5
+echo "configure:2272: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2222 "configure"
+#line 2277 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2258: checking for dlopen in -ldl" >&5
+echo "configure:2313: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
+#line 2321 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2332: \"$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
fi
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:2298: checking for pow in -lm" >&5
+echo "configure:2353: checking for pow in -lm" >&5
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2306 "configure"
+#line 2361 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pow()
; return 0; }
EOF
-if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6
-echo "configure:2338: checking for old style FreeBSD -pthread flag" >&5
+echo "configure:2393: checking for old style FreeBSD -pthread flag" >&5
cat > conftest.$ac_ext <<EOF
-#line 2340 "configure"
+#line 2395 "configure"
#include "confdefs.h"
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
yes
rm -rf conftest*
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2356: checking for pthread_create in -lpthread" >&5
+echo "configure:2411: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | 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="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2364 "configure"
+#line 2419 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2430: \"$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
rm -f conftest*
echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
-echo "configure:2399: checking for thread_create in -lthreads" >&5
+echo "configure:2454: checking for thread_create in -lthreads" >&5
ac_lib_var=`echo threads'_'thread_create | 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="-lthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2407 "configure"
+#line 2462 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
thread_create()
; return 0; }
EOF
-if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2473: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2445: checking for $ac_hdr" >&5
+echo "configure:2500: 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 2450 "configure"
+#line 2505 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2510: \"$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:2485: checking for $ac_hdr" >&5
+echo "configure:2540: 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 2490 "configure"
+#line 2545 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2550: \"$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:2525: checking for $ac_hdr" >&5
+echo "configure:2580: 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 2530 "configure"
+#line 2585 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2590: \"$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:2565: checking for $ac_hdr" >&5
+echo "configure:2620: 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 2570 "configure"
+#line 2625 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2630: \"$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:2605: checking for $ac_hdr" >&5
+echo "configure:2660: 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 2610 "configure"
+#line 2665 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2670: \"$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:2645: checking for $ac_hdr" >&5
+echo "configure:2700: 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 2650 "configure"
+#line 2705 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2710: \"$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:2686: checking for $ac_hdr" >&5
+echo "configure:2741: 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 2691 "configure"
+#line 2746 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2751: \"$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 > conftest.$ac_ext <<EOF
-#line 2724 "configure"
+#line 2779 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2741 "configure"
+#line 2796 "configure"
#include "confdefs.h"
#include <strings.h>
EOF
CFLAGS="${CFLAGS} -Wall -Werror"
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:2760: checking for ntohl in sys/param.h" >&5
+echo "configure:2815: checking for ntohl in sys/param.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
+#line 2817 "configure"
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
; return 0; }
EOF
-if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define NTOHL_IN_SYS_PARAM_H 1
CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
echo $ac_n "checking if \$CC groks -rdynamic without complaining too much""... $ac_c" 1>&6
-echo "configure:2787: checking if \$CC groks -rdynamic without complaining too much" >&5
+echo "configure:2842: checking if \$CC groks -rdynamic without complaining too much" >&5
cat > conftest.$ac_ext <<EOF
-#line 2789 "configure"
+#line 2844 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
LCFLAGS="${LCFLAGS} -rdynamic"
echo "$ac_t""yes" 1>&6
CFLAGS="${save_CFLAGS}"
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2811: checking for boolean_t in sys/types.h" >&5
+echo "configure:2866: checking for boolean_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2813 "configure"
+#line 2868 "configure"
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
; return 0; }
EOF
-if { (eval echo configure:2821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_H 1
fi
rm -f conftest*
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:2836: checking for boolean_t in pthread.h" >&5
+echo "configure:2891: checking for boolean_t in pthread.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2838 "configure"
+#line 2893 "configure"
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
; return 0; }
EOF
-if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_PTHREAD_H 1
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2862: checking for working const" >&5
+echo "configure:2917: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2867 "configure"
+#line 2922 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2937: checking for ANSI C header files" >&5
+echo "configure:2992: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2942 "configure"
+#line 2997 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3005: \"$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 $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2967 "configure"
+#line 3022 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2985 "configure"
+#line 3040 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 3006 "configure"
+#line 3061 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3041: checking for size_t" >&5
+echo "configure:3096: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 3101 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3074: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3129: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3079 "configure"
+#line 3134 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3128: checking for $ac_hdr" >&5
+echo "configure:3183: 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 3133 "configure"
+#line 3188 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3193: \"$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:3164: checking for $ac_hdr" >&5
+echo "configure:3219: 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 3169 "configure"
+#line 3224 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3229: \"$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 3201 "configure"
+#line 3256 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
# 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:3352: checking for $ac_word" >&5
+echo "configure:3407: 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:3417: checking for $ac_hdr" >&5
+echo "configure:3472: 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 3422 "configure"
+#line 3477 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3482: \"$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:3498: checking for $ac_hdr" >&5
+echo "configure:3553: 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 3503 "configure"
+#line 3558 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3563: \"$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:3546: checking for $ac_hdr" >&5
+echo "configure:3601: 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 3551 "configure"
+#line 3606 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3611: \"$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*
PLUGINS="${PLUGINS} qt"
ALIASES="${ALIASES} qvlc"
LIB_QT="-lqt -L${QTDIR}/lib"
+ if test -x ${QTDIR}/bin/moc ;
+ then
+ MOC=${QTDIR}/bin/moc
+ else
+ MOC=moc
+ fi
fi
fi
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3650: checking for $ac_word" >&5
+echo "configure:3711: 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:3710: checking for $ac_hdr" >&5
+echo "configure:3771: 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 3715 "configure"
+#line 3776 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3781: \"$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:3772: checking for $ac_hdr" >&5
+echo "configure:3833: 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 3777 "configure"
+#line 3838 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3843: \"$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:3820: checking for sys/asoundlib.h" >&5
+echo "configure:3881: 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 3825 "configure"
+#line 3886 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3891: \"$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:3847: checking for main in -lasound" >&5
+echo "configure:3908: 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 3855 "configure"
+#line 3916 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3923: \"$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%@TRACE@%$TRACE%g
s%@OPTIMS@%$OPTIMS%g
s%@CSS@%$CSS%g
+s%@MOC@%$MOC%g
s%@LCFLAGS@%$LCFLAGS%g
s%@LIB@%$LIB%g
s%@LIB_ALSA@%$LIB_ALSA%g
optimizations : ${OPTIMS}
CSS decryption : ${CSS}
need builtin getopt : ${GETOPT}
-plugin modules :${PLUGINS}
built-in modules :${BUILTINS}
+plugin modules :${PLUGINS}
vlc aliases :${ALIASES}
You may now tune Makefile.opts at your convenience."
AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
])
AC_CHECK_FUNCS(vasprintf)
+AC_CHECK_FUNCS(swab)
AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[ # FreeBSD has a gnugetopt library for this:
PLUGINS="${PLUGINS} qt"
ALIASES="${ALIASES} qvlc"
LIB_QT="-lqt -L${QTDIR}/lib"
+ if test -x ${QTDIR}/bin/moc ;
+ then
+ MOC=${QTDIR}/bin/moc
+ else
+ MOC=moc
+ fi
fi])
dnl
AC_SUBST(TRACE)
AC_SUBST(OPTIMS)
AC_SUBST(CSS)
+AC_SUBST(MOC)
AC_SUBST(LCFLAGS)
AC_SUBST(LIB)
optimizations : ${OPTIMS}
CSS decryption : ${CSS}
need builtin getopt : ${GETOPT}
-plugin modules :${PLUGINS}
built-in modules :${BUILTINS}
+plugin modules :${PLUGINS}
vlc aliases :${ALIASES}
You may now tune Makefile.opts at your convenience."
Specify an audio output module: "dsp", "esd", for instance.
.TP
.B \-\-stereo, \-\-mono
-Choose stereo or mono audio output
+Choose stereo or mono audio output.
+.TP
+.B \-\-spdif
+Activate hardware AC3 pass-through mode.
.TP
.B \-\-novideo
Disable video output.
vlc_aout=<method name> audio method
vlc_dsp=<filename> dsp device path
vlc_stereo={1|0} stereo or mono output
+ vlc_spdif={1|0} AC3 pass-through mode
vlc_audio_rate=<rate> output rate
.TP
.B Video parameters:
* audio_output.h : audio output thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_output.h,v 1.32 2001/04/29 02:48:51 stef Exp $
+ * $Id: audio_output.h,v 1.33 2001/05/01 04:18:17 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-/*****************************************************************************
- * Required headers:
- * - "common.h" ( boolean_t )
- * - "mtime.h" ( mtime_t )
- * - "threads.h" ( vlc_thread_t )
- *****************************************************************************/
-
-/* TODO :
- *
- * - Créer un flag destroy dans les fifos audio pour indiquer au thread audio
- * qu'il peut libérer la mémoire occupée par le buffer de la fifo lorsqu'il
- * le désire (fin du son ou fin du thread)
- *
- */
-
-/*
- * Macros
- */
-#define AOUT_FIFO_ISEMPTY( fifo ) ( (fifo).l_end_frame == (fifo).l_start_frame )
-#define AOUT_FIFO_ISFULL( fifo ) ( ((((fifo).l_end_frame + 1) - (fifo).l_start_frame) & AOUT_FIFO_SIZE) == 0 )
-
/*****************************************************************************
* aout_increment_t
*****************************************************************************
} aout_fifo_t;
+#define AOUT_FIFO_ISEMPTY( fifo ) \
+ ( (fifo).l_end_frame == (fifo).l_start_frame )
+
+#define AOUT_FIFO_ISFULL( fifo ) \
+ ( ((((fifo).l_end_frame + 1) - (fifo).l_start_frame) & AOUT_FIFO_SIZE) == 0 )
+
#define AOUT_EMPTY_FIFO 0
#define AOUT_INTF_MONO_FIFO 1
#define AOUT_INTF_STEREO_FIFO 2
#define AOUT_ADEC_MONO_FIFO 3
#define AOUT_ADEC_STEREO_FIFO 4
+#define AOUT_ADEC_SPDIF_FIFO 5
/*****************************************************************************
* aout_thread_t : audio output thread descriptor
*****************************************************************************/
-typedef int (aout_open_t) ( p_aout_thread_t p_aout );
-typedef int (aout_setformat_t) ( p_aout_thread_t p_aout );
-typedef long (aout_getbufinfo_t) ( p_aout_thread_t p_aout,
- long l_buffer_limit );
-typedef void (aout_play_t) ( p_aout_thread_t p_aout,
- byte_t *buffer, int i_size );
-typedef void (aout_close_t) ( p_aout_thread_t p_aout );
-
typedef struct aout_thread_s
{
vlc_thread_t thread_id;
/* Plugin used and shortcuts to access its capabilities */
struct module_s * p_module;
- aout_open_t * pf_open;
- aout_setformat_t * pf_setformat;
- aout_getbufinfo_t * pf_getbufinfo;
- aout_play_t * pf_play;
- aout_close_t * pf_close;
+ int ( *pf_open ) ( p_aout_thread_t );
+ int ( *pf_setformat ) ( p_aout_thread_t );
+ long ( *pf_getbufinfo ) ( p_aout_thread_t, long );
+ void ( *pf_play ) ( p_aout_thread_t, byte_t *, int );
+ void ( *pf_close ) ( p_aout_thread_t );
void * buffer;
/* The s32 buffer is used to mix all the audio fifos together before
char * psz_device;
int i_fd;
+ /* The current volume */
+ int i_vol;
/* Format of the audio output samples */
int i_format;
/* Number of channels */
* for the OSS output */
p_aout_sys_t p_sys;
-
- /* there is the current volume */
- int vol;
-
} aout_thread_t;
/* Those are from <linux/soundcard.h> but are needed because of formats
* Prototypes
*****************************************************************************/
aout_thread_t * aout_CreateThread ( int *pi_status );
-void aout_DestroyThread ( aout_thread_t *p_aout,
- int *pi_status );
+void aout_DestroyThread ( aout_thread_t *, int * );
-aout_fifo_t * aout_CreateFifo ( aout_thread_t *p_aout,
- aout_fifo_t *p_fifo );
+aout_fifo_t * aout_CreateFifo ( int, int, long, long, long, void * );
void aout_DestroyFifo ( aout_fifo_t *p_fifo );
void aout_FreeFifo ( aout_fifo_t *p_fifo );
#define AOUT_STEREO_VAR "vlc_stereo"
#define AOUT_STEREO_DEFAULT 1
+/* Environment variable for spdif mode */
+#define AOUT_SPDIF_VAR "vlc_spdif"
+#define AOUT_SPDIF_DEFAULT 0
+
/* Volume */
#define VOLUME_DEFAULT 512
#define VOLUME_STEP 128
/* Define if you have the strtol function. */
#undef HAVE_STRTOL
+/* Define if you have the swab function. */
+#undef HAVE_SWAB
+
/* Define if you have the usleep function. */
#undef HAVE_USLEEP
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-dec.h,v 1.30 2001/04/28 03:36:25 sam Exp $
+ * $Id: input_ext-dec.h,v 1.31 2001/05/01 04:18:17 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
*****************************************************************************
* Pointers given to audio decoders threads.
*****************************************************************************/
-struct aout_thread_s;
-
typedef struct adec_config_s
{
- struct aout_thread_s * p_aout;
-
- struct aout_fifo_s * (* pf_create_fifo)( struct aout_thread_s *,
- struct aout_fifo_s * );
- void (* pf_destroy_fifo)( struct aout_thread_s *);
+ struct aout_fifo_s * (* pf_create_fifo)( struct aout_fifo_s * );
+ void (* pf_destroy_fifo)( void );
decoder_config_t decoder_config;
} adec_config_t;
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.34 2001/04/20 05:40:03 stef Exp $
+ * $Id: input_ext-intf.h,v 1.35 2001/05/01 04:18:17 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Decoders control */
struct vout_thread_s * p_vout;
- struct aout_thread_s * p_aout;
int i_es_number; /* size of the following array */
es_descriptor_t ** pp_es; /* array of pointers to ES */
*****************************************************************************
* This structure includes all the local static variables of an input thread
*****************************************************************************/
-struct aout_thread_s;
struct vout_thread_s;
typedef struct input_thread_s
stream_descriptor_t stream; /* PAT tables */
/* For auto-launch of decoders */
- struct aout_thread_s * p_default_aout;
struct vout_thread_s * p_default_vout;
#ifdef STATS
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: main.h,v 1.16 2001/04/29 02:48:51 stef Exp $
+ * $Id: main.h,v 1.17 2001/05/01 04:18:17 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
boolean_t b_audio; /* is audio output allowed ? */
boolean_t b_video; /* is video output allowed ? */
boolean_t b_channels; /* is channel changing supported ? */
- boolean_t b_spdif; /* spdif mode ? */
/* Unique threads */
p_vout_thread_t p_vout; /* video output thread */
/* Shared data - these structures are accessed directly from p_main by
* several modules */
- struct module_bank_s * p_bank; /* module bank */
p_playlist_t p_playlist; /* playlist */
p_intf_msg_t p_msg; /* messages interface data */
p_input_channel_t p_channel; /* channel library data */
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.h,v 1.21 2001/04/28 03:36:25 sam Exp $
+ * $Id: modules.h,v 1.22 2001/05/01 04:18:17 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include <sys/types.h> /* off_t */
#endif
+/*****************************************************************************
+ * bank_t, p_bank (global variable)
+ *****************************************************************************
+ * This global variable is accessed by any function using modules.
+ *****************************************************************************/
+typedef struct
+{
+ struct module_s * first; /* First module of the bank */
+
+ vlc_mutex_t lock; /* Global lock -- you can't imagine how awful it
+ is to design thread-safe linked lists. */
+} bank_t;
+
+extern bank_t *p_bank;
+
+/*****************************************************************************
+ * Module #defines.
+ *****************************************************************************/
+
/* Number of tries before we unload an unused module */
#define MODULE_HIDE_DELAY 100
* Bank and module description structures
*****************************************************************************/
-/* The module bank structure */
-typedef struct module_bank_s
-{
- struct module_s * first; /* First module of the bank */
-
- vlc_mutex_t lock; /* Global lock -- you can't imagine how awful it
- is to design thread-safe linked lists. */
-} module_bank_t;
-
/* The module description structure */
typedef struct module_s
{
/*****************************************************************************
* Exported functions.
*****************************************************************************/
-module_bank_t * module_CreateBank ( void );
-void module_InitBank ( module_bank_t * p_bank );
-void module_DestroyBank ( module_bank_t * p_bank );
-void module_ResetBank ( module_bank_t * p_bank );
-void module_ManageBank ( module_bank_t * p_bank );
-
-module_t * module_Need ( module_bank_t *p_bank,
- int i_capabilities, void *p_data );
-void module_Unneed ( module_bank_t * p_bank,
- module_t * p_module );
+void module_InitBank ( void );
+void module_EndBank ( void );
+void module_ResetBank ( void );
+void module_ManageBank ( void );
+module_t * module_Need ( int i_capabilities, void *p_data );
+void module_Unneed ( module_t * p_module );
*****************************************************************************/
#define ALLOCATE_BUILTIN( NAME ) \
- AllocateBuiltinModule( p_bank, module_ ## NAME ## _InitModule, \
- module_ ## NAME ## _ActivateModule, \
- module_ ## NAME ## _DeactivateModule );
+ AllocateBuiltinModule( module_ ## NAME ## _InitModule, \
+ module_ ## NAME ## _ActivateModule, \
+ module_ ## NAME ## _DeactivateModule );
/* Add stuff here */
* thread, and destroy a previously oppenned video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_output.h,v 1.57 2001/03/21 13:42:33 sam Exp $
+ * $Id: video_output.h,v 1.58 2001/05/01 04:18:17 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
byte_t * p_data; /* memory address */
} vout_buffer_t;
+/*****************************************************************************
+ * vout_fifo_t
+ *****************************************************************************/
+typedef struct vout_fifo_s
+{
+ /* See the fifo types below */
+ int i_type;
+ boolean_t b_die;
+ int i_fifo; /* Just to keep track of the fifo index */
+
+ int i_width;
+ int i_height;
+
+ vlc_mutex_t data_lock;
+ vlc_cond_t data_wait;
+
+} vout_fifo_t;
+
+#define VOUT_EMPTY_FIFO 0
+#define VOUT_YUV_FIFO 1
+#define VOUT_SPU_FIFO 2
+
/*****************************************************************************
* vout_thread_t: video output thread descriptor
*****************************************************************************
*****************************************************************************/
vout_thread_t * vout_CreateThread ( int *pi_status );
void vout_DestroyThread ( vout_thread_t *p_vout, int *pi_status );
+
+vout_fifo_t * vout_CreateFifo ( void );
+void vout_DestroyFifo ( vout_fifo_t *p_fifo );
+void vout_FreeFifo ( vout_fifo_t *p_fifo );
+
picture_t * vout_CreatePicture ( vout_thread_t *p_vout, int i_type,
int i_width, int i_height );
void vout_DestroyPicture ( vout_thread_t *p_vout, picture_t *p_pic );
../../lib/alsa.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/beos.a: $(BUILTIN_CPP)
ar r $@ $^
+ $(RANLIB) $@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: intf_beos.cpp,v 1.26 2001/04/29 17:03:20 sam Exp $
+ * $Id: intf_beos.cpp,v 1.27 2001/05/01 04:18:17 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
// silence the sound, otherwise very horrible
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
snooze(400000);
input_SetStatus(p_intf->p_input, INPUT_STATUS_END);
// {
// if (p_main->p_aout != NULL)
// {
-// p_main->p_aout->vol = vol_val;
+// p_main->p_aout->i_vol = vol_val;
// }
// snooze(400000);
// input_SetStatus(p_intf->p_input, INPUT_STATUS_PLAY);
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
playback_status = PAUSED;
}
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = vol_val;
+ p_main->p_aout->i_vol = vol_val;
}
playback_status = PLAYING;
}
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
snooze(400000);
input_SetStatus(p_intf->p_input, INPUT_STATUS_FASTER);
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
snooze(400000);
input_SetStatus(p_intf->p_input, INPUT_STATUS_SLOWER);
// adjust the volume
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = vol_val;
+ p_main->p_aout->i_vol = vol_val;
}
break;
case VOLUME_MUTE:
// mute
if (p_main->p_aout != NULL)
{
- if (p_main->p_aout->vol == 0)
+ if (p_main->p_aout->i_vol == 0)
{
p_vol->SetEnabled(true);
- p_main->p_aout->vol = vol_val;
+ p_main->p_aout->i_vol = vol_val;
}
else
{
p_vol->SetEnabled(false);
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
}
break;
../../lib/darwin.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/dsp.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/dummy.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/dvd.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/esd.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/fb.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/ggi.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/glide.a: $(BUILTIN_GLIDE)
ar r $@ $^
+ $(RANLIB) $@
../../lib/gnome.a: $(BUILTIN_GNOME)
ar r $@ $^
+ $(RANLIB) $@
* gnome_callbacks.c : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gnome_callbacks.c,v 1.24 2001/04/22 00:08:26 stef Exp $
+ * $Id: gnome_callbacks.c,v 1.25 2001/05/01 04:18:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
GTK_WIDGET(button), "disc_name" ) ) );
/* "dvd:foo" has size 5 + strlen(foo) */
- psz_source = malloc( 5 + strlen( psz_device ) );
+ psz_source = malloc( 3 /* "dvd" */ + 1 /* ":" */
+ + strlen( psz_device ) + 1 /* "\0" */ );
if( psz_source == NULL )
{
return;
}
/* Allocate room for "protocol://server:port" */
- psz_source = malloc( strlen( psz_protocol ) + strlen( psz_server ) + 10 );
+ psz_source = malloc( strlen( psz_protocol ) + 3 /* "://" */
+ + strlen( psz_server ) + 1 /* ":" */
+ + 5 /* 0-65535 */ + 1 /* "\0" */ );
if( psz_source == NULL )
{
return;
* intf_gnome.c: Gnome interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gnome.c,v 1.33 2001/04/29 02:48:51 stef Exp $
+ * $Id: intf_gnome.c,v 1.34 2001/05/01 04:18:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
gint i_cat,
void(*pf_toggle )( GtkCheckMenuItem *, gpointer ) )
{
+#define GNOME_LANGUAGE_MENU_SIZE 64
intf_thread_t * p_intf;
GtkWidget * p_menu;
GtkWidget * p_separator;
GtkWidget * p_item;
GtkWidget * p_item_active;
GSList * p_group;
- char psz_name[12];
+ char psz_name[ GNOME_LANGUAGE_MENU_SIZE ];
gint i_item;
gint i;
p_menu = gtk_menu_new();
/* special case for "off" item */
- sprintf( psz_name, "Off" );
+ snprintf( psz_name, GNOME_LANGUAGE_MENU_SIZE, "Off" );
+ psz_name[ GNOME_LANGUAGE_MENU_SIZE - 1 ] = '\0';
p_item = gtk_radio_menu_item_new_with_label( p_group, psz_name );
p_group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) );
strcpy( psz_name, p_intf->p_input->stream.pp_es[i]->psz_desc );
if( psz_name[0] == '\0' )
{
- sprintf( psz_name, "Language %d", i_item );
+ snprintf( psz_name, GNOME_LANGUAGE_MENU_SIZE,
+ "Language %d", i_item );
+ psz_name[ GNOME_LANGUAGE_MENU_SIZE - 1 ] = '\0';
}
p_item = gtk_radio_menu_item_new_with_label( p_group, psz_name );
static gint GnomeAngleMenu( gpointer p_data, GtkWidget * p_angle,
void(*pf_toggle)( GtkCheckMenuItem *, gpointer ) )
{
+#define GNOME_ANGLE_MENU_SIZE 64
intf_thread_t * p_intf;
- char psz_name[12];
+ char psz_name[ GNOME_ANGLE_MENU_SIZE ];
GtkWidget * p_angle_menu;
GSList * p_angle_group;
GtkWidget * p_item;
i_angle < p_intf->p_input->stream.p_selected_area->i_angle_nb ;
i_angle++ )
{
- sprintf( psz_name, "Angle %d", i_angle + 1 );
+ snprintf( psz_name, GNOME_ANGLE_MENU_SIZE, "Angle %d", i_angle + 1 );
+ psz_name[ GNOME_ANGLE_MENU_SIZE - 1 ] = '\0';
p_item = gtk_radio_menu_item_new_with_label( p_angle_group,
psz_name );
gtk_menu_append( GTK_MENU( p_chapter_menu ), p_menu_item );
}
- sprintf( psz_name, "%d - %d", i_chapter + 1, i_chapter + 10);
+ snprintf( psz_name, GNOME_ANGLE_MENU_SIZE,
+ "%d - %d", i_chapter + 1, i_chapter + 10);
+ psz_name[ GNOME_ANGLE_MENU_SIZE - 1 ] = '\0';
p_menu_item = gtk_menu_item_new_with_label( psz_name );
gtk_widget_show( p_menu_item );
p_chapter_submenu = gtk_menu_new();
}
- sprintf( psz_name, "Chapter %d", i_chapter + 1 );
+ snprintf( psz_name, GNOME_ANGLE_MENU_SIZE,
+ "Chapter %d", i_chapter + 1 );
+ psz_name[ GNOME_ANGLE_MENU_SIZE - 1 ] = '\0';
p_item = gtk_radio_menu_item_new_with_label( p_chapter_group,
psz_name );
GtkWidget * p_navigation,
void(*pf_toggle )( GtkCheckMenuItem *, gpointer ) )
{
+#define GNOME_TITLE_MENU_SIZE 64
intf_thread_t * p_intf;
- char psz_name[12];
+ char psz_name[ GNOME_TITLE_MENU_SIZE ];
GtkWidget * p_title_menu;
GtkWidget * p_title_submenu;
GtkWidget * p_title_item;
gtk_menu_append( GTK_MENU( p_title_menu ), p_title_menu_item );
}
- sprintf( psz_name, "%d - %d", i_title, i_title + 9 );
+ snprintf( psz_name, GNOME_TITLE_MENU_SIZE,
+ "%d - %d", i_title, i_title + 9 );
+ psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0';
p_title_menu_item = gtk_menu_item_new_with_label( psz_name );
gtk_widget_show( p_title_menu_item );
p_title_submenu = gtk_menu_new();
}
- sprintf( psz_name, "Title %d (%d)", i_title, p_intf->p_input->stream.pp_areas[i_title]->i_part_nb );
+ snprintf( psz_name, GNOME_TITLE_MENU_SIZE, "Title %d (%d)", i_title,
+ p_intf->p_input->stream.pp_areas[i_title]->i_part_nb );
+ psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0';
if( pf_toggle == on_menubar_title_toggle )
{
p_chapter_menu_item );
}
- sprintf( psz_name, "%d - %d", i_chapter + 1,
- i_chapter + 10);
+ snprintf( psz_name, GNOME_TITLE_MENU_SIZE,
+ "%d - %d", i_chapter + 1, i_chapter + 10 );
+ psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0';
p_chapter_menu_item =
gtk_menu_item_new_with_label( psz_name );
gtk_widget_show( p_chapter_menu_item );
p_chapter_submenu = gtk_menu_new();
}
- sprintf( psz_name, "Chapter %d", i_chapter + 1 );
+ snprintf( psz_name, GNOME_TITLE_MENU_SIZE,
+ "Chapter %d", i_chapter + 1 );
+ psz_name[ GNOME_TITLE_MENU_SIZE - 1 ] = '\0';
p_item = gtk_radio_menu_item_new_with_label(
p_chapter_group, psz_name );
TRUE );
}
-
return TRUE;
}
if( p_intf->p_sys->b_title_update )
{
- char psz_title[3];
+ char psz_title[5];
p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "menubar_title" ) );
GnomeTitleMenu( p_intf, p_menubar_menu, on_menubar_title_toggle );
- snprintf( psz_title, 3, "%02d",
+ snprintf( psz_title, 5, "%d",
p_intf->p_input->stream.p_selected_area->i_id );
+ psz_title[ 4 ] = '\0';
gtk_label_set_text( p_intf->p_sys->p_label_title, psz_title );
p_intf->p_sys->b_title_update = 0;
if( p_intf->p_sys->b_chapter_update )
{
- char psz_chapter[3];
+ char psz_chapter[5];
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_popup ), "popup_navigation" ) );
p_intf->p_sys->p_window ), "menubar_chapter" ) );
GnomeChapterMenu( p_intf, p_menubar_menu, on_menubar_chapter_toggle );
- snprintf( psz_chapter, 3, "%02d",
+ snprintf( psz_chapter, 5, "%d",
p_intf->p_input->stream.p_selected_area->i_part );
+ psz_chapter[ 4 ] = '\0';
gtk_label_set_text( p_intf->p_sys->p_label_chapter, psz_chapter );
p_intf->p_sys->i_part =
../../lib/gtk.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/idct.a: $(BUILTIN_IDCT)
ar r $@ $^
+ $(RANLIB) $@
../../lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/idctclassic.a: $(BUILTIN_IDCTCLASSIC)
ar r $@ $^
+ $(RANLIB) $@
../../lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/idctmmx.a: $(BUILTIN_IDCTMMX)
ar r $@ $^
+ $(RANLIB) $@
../../lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/idctmmxext.a: $(BUILTIN_IDCTMMXEXT)
ar r $@ $^
+ $(RANLIB) $@
../../lib/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_IDCTALTIVEC)
../../lib/idctaltivec.a: $(BUILTIN_IDCTALTIVEC)
ar r $@ $^
+ $(RANLIB) $@
../../lib/macosx.a: $(BUILTIN_MACOSX)
ar r $@ $^
+ $(RANLIB) $@
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
p_main->p_vout->p_sys->playback_status = PAUSED;
SetMenuItemText( GetMenuHandle(kMenuControls), kControlsPlayORPause, "\pPlay");
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = p_main->p_vout->p_sys->vol_val;
+ p_main->p_aout->i_vol = p_main->p_vout->p_sys->vol_val;
}
p_main->p_vout->p_sys->playback_status = PLAYING;
SetMenuItemText( GetMenuHandle(kMenuControls), kControlsPlayORPause, "\pPause");
// silence the sound, otherwise very horrible
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
//snooze(400000);
input_SetStatus(p_intf->p_input, INPUT_STATUS_END);
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
//snooze(400000);
input_SetStatus(p_intf->p_input, INPUT_STATUS_FASTER);
{
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol = 0;
+ p_main->p_aout->i_vol = 0;
}
//snooze(400000);
input_SetStatus(p_intf->p_input, INPUT_STATUS_SLOWER);
// adjust the volume
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol++;
+ p_main->p_aout->i_vol++;
}
break;
// adjust the volume
if (p_main->p_aout != NULL)
{
- p_main->p_aout->vol--;
+ p_main->p_aout->i_vol--;
}
break;
// mute
if (p_main->p_aout != NULL)
{
- if (p_main->p_aout->vol == 0)
+ if (p_main->p_aout->i_vol == 0)
{
//p_vol->SetEnabled(true);
- p_main->p_aout->vol = p_main->p_vout->p_sys->vol_val;
+ p_main->p_aout->i_vol = p_main->p_vout->p_sys->vol_val;
}
else
{
//p_vol->SetEnabled(false);
- p_main->p_vout->p_sys->vol_val = p_main->p_aout->vol;
- p_main->p_aout->vol = 0;
+ p_main->p_vout->p_sys->vol_val = p_main->p_aout->i_vol;
+ p_main->p_aout->i_vol = 0;
}
}
break;
../../lib/mga.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/motion.a: $(BUILTIN_MOTION)
ar r $@ $^
+ $(RANLIB) $@
../../lib/motionclassic.so: $(PLUGIN_MOTIONCLASSIC) $(PLUGIN_MOTIONCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/motionclassic.a: $(BUILTIN_MOTIONCLASSIC)
ar r $@ $^
+ $(RANLIB) $@
../../lib/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/motionmmx.a: $(BUILTIN_MOTIONMMX)
ar r $@ $^
+ $(RANLIB) $@
../../lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/motionmmxext.a: $(BUILTIN_MOTIONMMXEXT)
ar r $@ $^
+ $(RANLIB) $@
../../lib/es.a: $(BUILTIN_ES)
ar r $@ $^
+ $(RANLIB) $@
../../lib/ps.so: $(PLUGIN_PS)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/ps.a: $(BUILTIN_PS)
ar r $@ $^
+ $(RANLIB) $@
../../lib/ts.so: $(PLUGIN_TS)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_TS)
../../lib/ts.a: $(BUILTIN_TS)
ar r $@ $^
+ $(RANLIB) $@
../../lib/null.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
$(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 $@
+ $(MOC) -i $< -o $@
$(BUILTIN_QT): BUILTIN_%.o: .dep/%.dpp
$(BUILTIN_QT): %.o: %.moc
$(CC) $(CFLAGS) -DBUILTIN -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:BUILTIN_%.moc=%.cpp)
$(BUILTIN_QT:%.o=%.moc): BUILTIN_%.moc: %.cpp
- moc -i $< -o $@
+ $(MOC) -i $< -o $@
#
# Real targets
../../lib/qt.a: $(BUILTIN_QT)
ar r $@ $^
+ $(RANLIB) $@
../../lib/sdl.a: $(BUILTIN_C)
ar r $@ $^
+ $(RANLIB) $@
../../lib/ncurses.a: $(BUILTIN_NCURSES)
ar r $@ $^
+ $(RANLIB) $@
../../lib/rc.so: $(PLUGIN_RC)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/rc.a: $(BUILTIN_RC)
ar r $@ $^
+ $(RANLIB) $@
/*****************************************************************************
- * intf_rc.cpp: rc interface
+ * intf_rc.cpp: remote control interface
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: intf_rc.cpp,v 0.1 2001/04/27 shurdeek
/*****************************************************************************
- * rc.cpp : stdin/stdout plugin for vlc
+ * rc.cpp : remote control stdin/stdout plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: rc.cpp,v 0.1 2001/04/27 shurdeek
MODULE_INIT
{
p_module->psz_name = MODULE_STRING;
- p_module->psz_longname = "rc interface module";
+ p_module->psz_longname = "remote control interface module";
p_module->psz_version = VERSION;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
../../lib/x11.a: $(BUILTIN_X11)
ar r $@ $^
+ $(RANLIB) $@
../../lib/xvideo.so: $(PLUGIN_XVIDEO)
ifeq ($(SYS),nto-qnx)
../../lib/xvideo.a: $(BUILTIN_XVIDEO)
ar r $@ $^
+ $(RANLIB) $@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
- * $Id: vout_xvideo.c,v 1.12 2001/04/27 19:29:11 massiot Exp $
+ * $Id: vout_xvideo.c,v 1.13 2001/05/01 04:18:18 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
return( 999 );
}
- return( 110 );
+ return( 60 );
}
/*****************************************************************************
../../lib/yuv.a: $(BUILTIN_YUV)
ar r $@ $^
+ $(RANLIB) $@
../../lib/yuvmmx.so: $(PLUGIN_YUVMMX)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
../../lib/yuvmmx.a: $(BUILTIN_YUVMMX)
ar r $@ $^
+ $(RANLIB) $@
* ac3_decoder_thread.c: ac3 decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_decoder_thread.c,v 1.30 2001/04/30 21:04:20 reno Exp $
+ * $Id: ac3_decoder_thread.c,v 1.31 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
/*
* Initialize the output properties
*/
- p_ac3dec_t->p_aout = p_config->p_aout;
p_ac3dec_t->p_aout_fifo = NULL;
/* Spawn the ac3 decoder thread */
*****************************************************************************/
static int InitThread (ac3dec_thread_t * p_ac3dec_t)
{
- aout_fifo_t aout_fifo;
-
intf_DbgMsg("ac3dec debug: initializing ac3 decoder thread %p",p_ac3dec_t);
p_ac3dec_t->p_config->decoder_config.pf_init_bit_stream(
p_ac3dec_t->p_config->decoder_config.p_decoder_fifo,
BitstreamCallback, (void *) p_ac3dec_t );
-
- aout_fifo.i_type = AOUT_ADEC_STEREO_FIFO;
- aout_fifo.i_channels = 2;
- aout_fifo.b_stereo = 1;
-
- aout_fifo.l_frame_size = AC3DEC_FRAME_SIZE;
-
/* Creating the audio output fifo */
- if ((p_ac3dec_t->p_aout_fifo = aout_CreateFifo(p_ac3dec_t->p_aout, &aout_fifo)) == NULL)
+ p_ac3dec_t->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_STEREO_FIFO, 2, 0, 0,
+ AC3DEC_FRAME_SIZE, NULL );
+ if ( p_ac3dec_t->p_aout_fifo == NULL )
{
return -1;
}
* ac3_decoder_thread.h : ac3 decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_decoder_thread.h,v 1.5 2001/04/20 12:14:34 reno Exp $
+ * $Id: ac3_decoder_thread.h,v 1.6 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
/*
* Decoder properties
*/
-
ac3dec_t ac3_decoder;
/*
* Output properties
*/
aout_fifo_t * p_aout_fifo; /* stores the decompressed audio frames */
- aout_thread_t * p_aout; /* needed to create the audio fifo */
} ac3dec_thread_t;
* ac3_iec958.c: ac3 to spdif converter
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ac3_iec958.c,v 1.1 2001/04/29 02:48:51 stef Exp $
+ * $Id: ac3_iec958.c,v 1.2 2001/05/01 04:18:18 sam Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
/****************************************************************************
* ac3_iec958_build_burst: builds an iec958/spdif frame based on an ac3 frame
****************************************************************************/
-void ac3_iec958_build_burst( int i_length, u8 * pi_data, u8 * pi_out )
+void ac3_iec958_build_burst( ac3_spdif_thread_t *p_spdif )
{
- const u8 pi_sync[4] = { 0x72, 0xF8, 0x1F, 0x4E };
-
- /* add the spdif headers */
- memcpy( pi_out, pi_sync, 4 );
- if( i_length )
- pi_out[4] = 0x01;
- else
- pi_out[4] = 0;
- pi_out[5] = 0x00;
- pi_out[6] = ( i_length *8 ) & 0xFF;
- pi_out[7] = ( ( i_length *8 ) >> 8 ) & 0xFF;
-
- swab( pi_data, pi_out + 8, i_length );
- /* adds zero to complete the spdif frame
+ const u8 p_sync[4] = { 0x72, 0xF8, 0x1F, 0x4E };
+ int i_length = p_spdif->ac3_info.i_frame_size;
+#ifndef HAVE_SWAB
+ /* Skip the first byte if i_length is odd */
+ u16 * p_in = (u16 *)( p_spdif->p_ac3 + ( i_length & 0x1 ) );
+ u16 * p_out = (u16 *)p_spdif->p_iec;
+#endif
+
+ /* Add the spdif headers */
+ memcpy( p_spdif->p_iec, p_sync, 4 );
+ p_spdif->p_iec[4] = i_length ? 0x01 : 0x00;
+ p_spdif->p_iec[5] = 0x00;
+ p_spdif->p_iec[6] = ( i_length * 8 ) & 0xFF;
+ p_spdif->p_iec[7] = ( ( i_length * 8 ) >> 8 ) & 0xFF;
+
+#ifdef HAVE_SWAB
+ swab( p_spdif->p_ac3, p_spdif->p_iec + 8, i_length );
+#else
+ /* i_length should be even */
+ i_length &= ~0x1;
+
+ while( i_length )
+ {
+ *p_out = ( (*p_in & 0x00ff) << 16 ) | ( (*p_in & 0xff00) >> 16 );
+ p_in++;
+ p_out++;
+ i_length -= 2;
+ }
+#endif
+
+ /* Add zeroes to complete the spdif frame,
* they will be ignored by the decoder */
- memset( pi_out + 8 + i_length, 0, SPDIF_FRAME - 8 - i_length );
+ memset( p_spdif->p_iec + 8 + i_length, 0, SPDIF_FRAME_SIZE - 8 - i_length );
}
/****************************************************************************
* ac3_iec958_parse_syncinfo: parse ac3 sync info
****************************************************************************/
-int ac3_iec958_parse_syncinfo( ac3_spdif_thread_t *p_spdif,
- ac3_info_t *ac3_info,
- u8 * pi_ac3 )
+int ac3_iec958_parse_syncinfo( ac3_spdif_thread_t *p_spdif )
{
- int pi_sample_rates[4] = { 48000, 44100, 32000, -1 };
+ int p_sample_rates[4] = { 48000, 44100, 32000, -1 };
int i_frame_rate_code;
int i_frame_size_code;
-// u8 * pi_tmp;
sync_frame_t * p_sync_frame;
- /* find sync word */
+ /* Find sync word */
while( ShowBits( &p_spdif->bit_stream, 16 ) != 0xb77 )
{
RemoveBits( &p_spdif->bit_stream, 8 );
}
- /* read sync frame */
- pi_ac3 = malloc( sizeof(sync_frame_t) );
- GetChunk( &p_spdif->bit_stream, pi_ac3, sizeof(sync_frame_t) );
- p_sync_frame = (sync_frame_t*)pi_ac3;
+ /* Read sync frame */
+ GetChunk( &p_spdif->bit_stream, p_spdif->p_ac3, sizeof(sync_frame_t) );
+ p_sync_frame = (sync_frame_t*)p_spdif->p_ac3;
- /* compute frame rate */
+ /* Compute frame rate */
i_frame_rate_code = (p_sync_frame->syncinfo.code >> 6) & 0x03;
- ac3_info->i_sample_rate = pi_sample_rates[i_frame_rate_code];
- if (ac3_info->i_sample_rate == -1)
+ p_spdif->ac3_info.i_sample_rate = p_sample_rates[i_frame_rate_code];
+ if( p_spdif->ac3_info.i_sample_rate == -1 )
{
return -1;
}
- /* compute frame size */
+ /* Compute frame size */
i_frame_size_code = p_sync_frame->syncinfo.code & 0x3f;
- ac3_info->i_frame_size = 2 *
+ p_spdif->ac3_info.i_frame_size = 2 *
p_frame_size_code[i_frame_size_code].i_frame_size[i_frame_rate_code];
- ac3_info->i_bit_rate = p_frame_size_code[i_frame_size_code].i_bit_rate;
+ p_spdif->ac3_info.i_bit_rate =
+ p_frame_size_code[i_frame_size_code].i_bit_rate;
if( ( ( p_sync_frame->bsi.bsidmod >> 3 ) & 0x1f ) != 0x08 )
{
return -1;
}
- ac3_info->i_bs_mod = p_sync_frame->bsi.bsidmod & 0x7;
-
-// free( pi_tmp );
+ p_spdif->ac3_info.i_bs_mod = p_sync_frame->bsi.bsidmod & 0x7;
return 0;
}
+
* ac3_iec958.h: ac3 to spdif converter headers
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ac3_iec958.h,v 1.1 2001/04/29 02:48:51 stef Exp $
+ * $Id: ac3_iec958.h,v 1.2 2001/05/01 04:18:18 sam Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
****************************************************************************/
-#ifndef _AC3_IEC958_H
-#define _AC3_IEC958_H
-
/****************************************************************************
* information about ac3 frame
****************************************************************************/
-typedef struct ac3_info_s
-{
- int i_bit_rate;
- int i_frame_size;
- int i_sample_rate;
- int i_bs_mod;
-} ac3_info_t;
-
typedef struct sync_frame_s
{
struct syncinfo
/****************************************************************************
* Prototypes
****************************************************************************/
-void ac3_iec958_build_burst ( int, u8 *, u8 * );
-int ac3_iec958_parse_syncinfo ( struct ac3_spdif_thread_s *,
- struct ac3_info_s *, u8 * );
-#endif
+void ac3_iec958_build_burst ( struct ac3_spdif_thread_s * );
+int ac3_iec958_parse_syncinfo ( struct ac3_spdif_thread_s * );
+
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ac3_spdif.c,v 1.1 2001/04/29 02:48:51 stef Exp $
+ * $Id: ac3_spdif.c,v 1.2 2001/05/01 04:18:18 sam Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
intf_DbgMsg( "spdif debug: creating ac3 pass-through thread" );
/* Allocate the memory needed to store the thread's structure */
- if( ( p_spdif = malloc( sizeof(ac3_spdif_thread_t) ) ) == NULL )
+ p_spdif = malloc( sizeof(ac3_spdif_thread_t) );
+
+ if( p_spdif == NULL )
{
intf_ErrMsg ( "spdif error: not enough memory "
"for spdif_CreateThread() to create the new thread");
return 0;
}
+ /* Temporary buffer to store ac3 frames to be transformed */
+ p_spdif->p_ac3 = malloc( /*ac3_info.i_frame_size*/SPDIF_FRAME_SIZE );
+
+ if( p_spdif->p_ac3 == NULL )
+ {
+ free( p_spdif->p_ac3 );
+ return 0;
+ }
+
/*
* Initialize the thread properties
*/
p_spdif->p_config = p_config;
p_spdif->p_fifo = p_config->decoder_config.p_decoder_fifo;
- p_spdif->p_aout = p_config->p_aout;
p_spdif->p_aout_fifo = NULL;
/* Spawn the ac3 to spdif thread */
(vlc_thread_func_t)RunThread, (void *)p_spdif))
{
intf_ErrMsg( "spdif error: can't spawn spdif thread" );
+ free( p_spdif->p_ac3 );
free( p_spdif );
return 0;
}
****************************************************************************/
static int InitThread( ac3_spdif_thread_t * p_spdif )
{
- aout_fifo_t aout_fifo;
-
p_spdif->p_config->decoder_config.pf_init_bit_stream(
&p_spdif->bit_stream,
p_spdif->p_config->decoder_config.p_decoder_fifo,
BitstreamCallback, (void*)p_spdif );
- aout_fifo.i_type = AOUT_ADEC_MONO_FIFO;
- aout_fifo.i_channels = 1;
- aout_fifo.b_stereo = 0;
+ /* Creating the audio output fifo */
+ p_spdif->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_SPDIF_FIFO, 1, 0, 0,
+ SPDIF_FRAME_SIZE, NULL );
+
+ if( p_spdif->p_aout_fifo == NULL )
+ {
+ return -1;
+ }
- aout_fifo.l_frame_size = SPDIF_FRAME;
+ intf_WarnMsg( 1, "spdif: aout fifo created" );
- /* Creating the audio output fifo */
- if( (p_spdif->p_aout_fifo =
- aout_CreateFifo( p_spdif->p_aout, &aout_fifo ) ) == NULL )
+ /* Check stream properties */
+ if( ac3_iec958_parse_syncinfo( p_spdif ) < 0 )
{
+ intf_ErrMsg( "spdif error: stream not valid");
+
+ aout_DestroyFifo( p_spdif->p_aout_fifo );
return -1;
}
- intf_WarnMsg( 1, "aout fifo for spdif created" );
+ /* Check that we can handle the rate */
+ if( p_spdif->ac3_info.i_sample_rate != 48000 )
+ {
+ intf_ErrMsg( "spdif error: Only 48000 Hz streams supported");
+
+ aout_DestroyFifo( p_spdif->p_aout_fifo );
+ return -1;
+ }
+
+ GetChunk( &p_spdif->bit_stream, p_spdif->p_ac3 + sizeof(sync_frame_t),
+ p_spdif->ac3_info.i_frame_size - sizeof(sync_frame_t) );
+
+ vlc_cond_signal( &p_spdif->p_aout_fifo->data_wait );
return 0;
}
****************************************************************************/
static void RunThread( ac3_spdif_thread_t * p_spdif )
{
- ac3_info_t ac3_info;
- u8 * pi_ac3;
- u8 * pi_iec;
-
- InitThread( p_spdif );
-
- /* temporary buffer to store ac3 frames to be transformed */
- pi_ac3 = malloc( /*ac3_info.i_frame_size*/SPDIF_FRAME );
-
- /* check stream properties */
- if( ac3_iec958_parse_syncinfo( p_spdif, &ac3_info, pi_ac3 ) < 0)
+ /* Initializing the spdif decoder thread */
+ if( InitThread( p_spdif ) )
{
- intf_ErrMsg( "spdif error: stream not valid");
- exit(1);
- }
-
- if( ac3_info.i_sample_rate != 48000) {
- intf_ErrMsg( "spdif error: Only 48000 Hz streams supported");
- exit(1);
+ p_spdif->p_fifo->b_error = 1;
}
- GetChunk( &p_spdif->bit_stream, pi_ac3 + sizeof(sync_frame_t),
- ac3_info.i_frame_size - sizeof(sync_frame_t) );
-
- vlc_cond_signal( &p_spdif->p_aout_fifo->data_wait );
while( !p_spdif->p_fifo->b_die && !p_spdif->p_fifo->b_error )
{
- /* handle the dates */
+ /* Handle the dates */
if(DECODER_FIFO_START(*p_spdif->p_fifo)->i_pts)
{
p_spdif->p_aout_fifo->date[p_spdif->p_aout_fifo->l_end_frame] =
LAST_MDATE;
}
- /* write in the first free packet of aout fifo */
- pi_iec = (p_spdif->p_aout_fifo->buffer) +
- (p_spdif->p_aout_fifo->l_end_frame * SPDIF_FRAME );
+ /* Write in the first free packet of aout fifo */
+ p_spdif->p_iec = (p_spdif->p_aout_fifo->buffer) +
+ (p_spdif->p_aout_fifo->l_end_frame * SPDIF_FRAME_SIZE );
- /* build burst to be sent to hardware decoder */
- ac3_iec958_build_burst( ac3_info.i_frame_size, pi_ac3, pi_iec );
+ /* Build burst to be sent to hardware decoder */
+ ac3_iec958_build_burst( p_spdif );
vlc_mutex_lock (&p_spdif->p_aout_fifo->data_lock);
vlc_mutex_unlock (&p_spdif->p_aout_fifo->data_lock);
- /* find syncword */
+ /* Find syncword */
while( ShowBits( &p_spdif->bit_stream, 16 ) != 0xb77 )
{
RemoveBits( &p_spdif->bit_stream, 8 );
}
- /* read data from bitstream */
- GetChunk( &p_spdif->bit_stream, pi_ac3, ac3_info.i_frame_size );
+ /* Read data from bitstream */
+ GetChunk( &p_spdif->bit_stream, p_spdif->p_ac3,
+ p_spdif->ac3_info.i_frame_size );
}
- free( pi_ac3 );
-
/* If b_error is set, the ac3 spdif thread enters the error loop */
if( p_spdif->p_fifo->b_error )
{
/* Destroy descriptor */
free( p_spdif->p_config );
+ free( p_spdif->p_ac3 );
free( p_spdif );
intf_DbgMsg ("spdif debug: thread %p destroyed", p_spdif );
* ac3_spdif.h: header for ac3 pass-through
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ac3_spdif.h,v 1.1 2001/04/29 02:48:51 stef Exp $
+ * $Id: ac3_spdif.h,v 1.2 2001/05/01 04:18:18 sam Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
****************************************************************************/
-#ifndef _AC3_SPDIF_H
-#define _AC3_SPDIF_H
+#define SPDIF_FRAME_SIZE 6144
-#define SPDIF_FRAME 6144
+typedef struct ac3_info_s
+{
+ int i_bit_rate;
+ int i_frame_size;
+ int i_sample_rate;
+ int i_bs_mod;
+} ac3_info_t;
/*****************************************************************************
* ac3_spdif_thread_t : ac3 pass-through thread descriptor
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t bit_stream;
int i_available;
-
+
+ /*
+ * Decoder properties
+ */
+ ac3_info_t ac3_info;
+ u8 * p_ac3;
+ u8 * p_iec;
+
/*
* Output properties
*/
- aout_fifo_t * p_aout_fifo;/* stores the decompressed audio frames */
- aout_thread_t * p_aout; /* needed to create the audio fifo */
+ aout_fifo_t * p_aout_fifo; /* stores the decompressed audio frames */
} ac3_spdif_thread_t;
*****************************************************************************/
vlc_thread_t spdif_CreateThread( adec_config_t * p_config );
-#endif
* audio_decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_decoder.c,v 1.49 2001/04/25 10:22:32 massiot Exp $
+ * $Id: audio_decoder.c,v 1.50 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
/*
* Initialize the output properties
*/
- p_adec->p_aout = p_config->p_aout;
p_adec->p_aout_fifo = NULL;
/* Spawn the audio decoder thread */
*****************************************************************************/
static int InitThread (adec_thread_t * p_adec)
{
- aout_fifo_t aout_fifo;
-
intf_DbgMsg ("adec debug: initializing audio decoder thread %p", p_adec);
p_adec->p_config->decoder_config.pf_init_bit_stream( &p_adec->bit_stream,
p_adec->p_config->decoder_config.p_decoder_fifo, NULL, NULL );
- aout_fifo.i_type = AOUT_ADEC_STEREO_FIFO;
- aout_fifo.i_channels = 2;
- aout_fifo.b_stereo = 1;
- aout_fifo.l_frame_size = ADEC_FRAME_SIZE;
-
/* Creating the audio output fifo */
- if ( (p_adec->p_aout_fifo =
- aout_CreateFifo(p_adec->p_aout, &aout_fifo)) == NULL )
+ p_adec->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_STEREO_FIFO, 2, 0, 0,
+ ADEC_FRAME_SIZE, NULL );
+ if ( p_adec->p_aout_fifo == NULL )
{
return -1;
}
intf_DbgMsg ( "adec debug: running audio decoder thread (%p) (pid == %i)",
p_adec, getpid() );
- /* You really suck */
- //msleep ( INPUT_PTS_DELAY );
-
/* Initializing the audio decoder thread */
p_adec->p_fifo->b_error = InitThread (p_adec);
* audio_decoder.h : audio decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_decoder.h,v 1.6 2001/03/21 13:42:34 sam Exp $
+ * $Id: audio_decoder.h,v 1.7 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
* Output properties
*/
struct aout_fifo_s * p_aout_fifo; /* stores the decompressed frames */
- struct aout_thread_s * p_aout; /* needed to create the audio fifo */
} adec_thread_t;
* aout_common.h: audio output inner functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: aout_common.h,v 1.3 2001/04/29 02:48:51 stef Exp $
+ * $Id: aout_common.h,v 1.4 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
(integer) += (increment).l_euclidean_integer; \
}
-#define FIFO p_aout->fifo[i_fifo]
-
/*****************************************************************************
* InitializeIncrement
*****************************************************************************/
/*****************************************************************************
- * aout_fifo.c : exported fifo management functions
+ * aout_ext-dec.c : exported fifo management functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: aout_fifo.c,v 1.2 2001/03/21 13:42:34 sam Exp $
+ * $Id: aout_ext-dec.c,v 1.1 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
#include "audio_output.h"
#include "aout_common.h"
+#include "main.h"
+
/*****************************************************************************
* aout_CreateFifo
*****************************************************************************/
-aout_fifo_t * aout_CreateFifo( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
+aout_fifo_t * aout_CreateFifo( int i_type, int i_channels, long l_rate,
+ long l_units, long l_frame_size,
+ void *p_buffer )
{
+#define P_AOUT p_main->p_aout
int i_fifo;
+ /* Spawn an audio output if there is none */
+ if( P_AOUT == NULL )
+ {
+ P_AOUT = aout_CreateThread( NULL );
+
+ if( P_AOUT == NULL )
+ {
+ return NULL;
+ }
+ }
+
/* Take the fifos lock */
- vlc_mutex_lock( &p_aout->fifos_lock );
+ vlc_mutex_lock( &P_AOUT->fifos_lock );
/* Looking for a free fifo structure */
- for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
+ for( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
{
- if ( p_aout->fifo[i_fifo].i_type == AOUT_EMPTY_FIFO)
+ if( P_AOUT->fifo[i_fifo].i_type == AOUT_EMPTY_FIFO )
{
/* Not very clever, but at least we know which fifo it is */
- p_aout->fifo[i_fifo].i_fifo = i_fifo;
+ P_AOUT->fifo[i_fifo].i_fifo = i_fifo;
break;
}
}
- if ( i_fifo == AOUT_MAX_FIFOS )
+ if( i_fifo == AOUT_MAX_FIFOS )
{
intf_ErrMsg( "aout error: no fifo available" );
- vlc_mutex_unlock( &p_aout->fifos_lock );
+ vlc_mutex_unlock( &P_AOUT->fifos_lock );
return( NULL );
}
/* Initialize the new fifo structure */
- switch ( p_aout->fifo[i_fifo].i_type = p_fifo->i_type )
+ switch ( P_AOUT->fifo[i_fifo].i_type = i_type )
{
case AOUT_INTF_MONO_FIFO:
case AOUT_INTF_STEREO_FIFO:
- p_aout->fifo[i_fifo].b_die = 0;
+ P_AOUT->fifo[i_fifo].b_die = 0;
- p_aout->fifo[i_fifo].i_channels = p_fifo->i_channels;
- p_aout->fifo[i_fifo].b_stereo = p_fifo->b_stereo;
- p_aout->fifo[i_fifo].l_rate = p_fifo->l_rate;
+ P_AOUT->fifo[i_fifo].i_channels = i_channels;
+ P_AOUT->fifo[i_fifo].b_stereo = ( i_channels == 2 );
+ P_AOUT->fifo[i_fifo].l_rate = l_rate;
- p_aout->fifo[i_fifo].buffer = p_fifo->buffer;
+ P_AOUT->fifo[i_fifo].buffer = p_buffer;
- p_aout->fifo[i_fifo].l_unit = 0;
- InitializeIncrement( &p_aout->fifo[i_fifo].unit_increment,
- p_fifo->l_rate, p_aout->l_rate );
- p_aout->fifo[i_fifo].l_units = p_fifo->l_units;
+ P_AOUT->fifo[i_fifo].l_unit = 0;
+ InitializeIncrement( &P_AOUT->fifo[i_fifo].unit_increment,
+ l_rate, P_AOUT->l_rate );
+ P_AOUT->fifo[i_fifo].l_units = l_units;
break;
case AOUT_ADEC_MONO_FIFO:
case AOUT_ADEC_STEREO_FIFO:
- p_aout->fifo[i_fifo].b_die = 0;
+ P_AOUT->fifo[i_fifo].b_die = 0;
- p_aout->fifo[i_fifo].i_channels = p_fifo->i_channels;
- p_aout->fifo[i_fifo].b_stereo = p_fifo->b_stereo;
- p_aout->fifo[i_fifo].l_rate = p_fifo->l_rate;
+ P_AOUT->fifo[i_fifo].i_channels = i_channels;
+ P_AOUT->fifo[i_fifo].b_stereo = ( i_channels == 2 );
+ P_AOUT->fifo[i_fifo].l_rate = l_rate;
- p_aout->fifo[i_fifo].l_frame_size = p_fifo->l_frame_size;
+ P_AOUT->fifo[i_fifo].l_frame_size = l_frame_size;
/* Allocate the memory needed to store the audio frames. As the
- * fifo is a rotative fifo, we must be able to find out whether the
- * fifo is full or empty, that's why we must in fact allocate memory
- * for (AOUT_FIFO_SIZE+1) audio frames. */
- p_aout->fifo[i_fifo].buffer = malloc( sizeof(s16)*(AOUT_FIFO_SIZE+1)*p_fifo->l_frame_size );
- if ( p_aout->fifo[i_fifo].buffer == NULL )
+ * fifo is a rotative fifo, we must be able to find out whether
+ * the fifo is full or empty, that's why we must in fact allocate
+ * memory for (AOUT_FIFO_SIZE+1) audio frames. */
+ P_AOUT->fifo[i_fifo].buffer = malloc( sizeof(s16) *
+ ( AOUT_FIFO_SIZE + 1 ) * l_frame_size );
+ if ( P_AOUT->fifo[i_fifo].buffer == NULL )
{
intf_ErrMsg( "aout error: cannot create frame buffer" );
- p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
- vlc_mutex_unlock( &p_aout->fifos_lock );
+ P_AOUT->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
+ vlc_mutex_unlock( &P_AOUT->fifos_lock );
return( NULL );
}
/* Allocate the memory needed to store the dates of the frames */
- p_aout->fifo[i_fifo].date = (mtime_t *)malloc( sizeof(mtime_t)*(AOUT_FIFO_SIZE+1) );
- if ( p_aout->fifo[i_fifo].date == NULL )
+ P_AOUT->fifo[i_fifo].date =
+ malloc( sizeof(mtime_t) * ( AOUT_FIFO_SIZE + 1) );
+
+ if ( P_AOUT->fifo[i_fifo].date == NULL )
{
intf_ErrMsg( "aout error: cannot create date buffer");
- free( p_aout->fifo[i_fifo].buffer );
- p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
- vlc_mutex_unlock( &p_aout->fifos_lock );
+ free( P_AOUT->fifo[i_fifo].buffer );
+ P_AOUT->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
+ vlc_mutex_unlock( &P_AOUT->fifos_lock );
return( NULL );
}
/* Set the fifo's buffer as empty (the first frame that is to be
* played is also the first frame that is not to be played) */
- p_aout->fifo[i_fifo].l_start_frame = 0;
- /* p_aout->fifo[i_fifo].l_next_frame = 0; */
- p_aout->fifo[i_fifo].l_end_frame = 0;
+ P_AOUT->fifo[i_fifo].l_start_frame = 0;
+ /* P_AOUT->fifo[i_fifo].l_next_frame = 0; */
+ P_AOUT->fifo[i_fifo].l_end_frame = 0;
/* Waiting for the audio decoder to compute enough frames to work
* out the fifo's current rate (as soon as the decoder has decoded
* enough frames, the members of the fifo structure that are not
* initialized now will be calculated) */
- p_aout->fifo[i_fifo].b_start_frame = 0;
- p_aout->fifo[i_fifo].b_next_frame = 0;
+ P_AOUT->fifo[i_fifo].b_start_frame = 0;
+ P_AOUT->fifo[i_fifo].b_next_frame = 0;
break;
default:
- intf_ErrMsg( "aout error: unknown fifo type 0x%x", p_aout->fifo[i_fifo].i_type );
- p_aout->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
- vlc_mutex_unlock( &p_aout->fifos_lock );
+ intf_ErrMsg( "aout error: unknown fifo type 0x%x",
+ P_AOUT->fifo[i_fifo].i_type );
+ P_AOUT->fifo[i_fifo].i_type = AOUT_EMPTY_FIFO;
+ vlc_mutex_unlock( &P_AOUT->fifos_lock );
return( NULL );
}
/* Release the fifos lock */
- vlc_mutex_unlock( &p_aout->fifos_lock );
+ vlc_mutex_unlock( &P_AOUT->fifos_lock );
intf_WarnMsg( 2, "aout info: fifo #%i allocated, %i channels, rate %li",
- p_aout->fifo[i_fifo].i_fifo, p_aout->fifo[i_fifo].i_channels, p_aout->fifo[i_fifo].l_rate );
+ P_AOUT->fifo[i_fifo].i_fifo, P_AOUT->fifo[i_fifo].i_channels,
+ P_AOUT->fifo[i_fifo].l_rate );
/* Return the pointer to the fifo structure */
- return( &FIFO );
+ return( &P_AOUT->fifo[i_fifo] );
+#undef P_AOUT
}
/*****************************************************************************
{
((s16 *)p_aout->buffer)[l_buffer] =
(s16)( ( p_aout->s32_buffer[l_buffer] / AOUT_MAX_FIFOS )
- * p_aout->vol / 256 ) ;
+ * p_aout->i_vol / 256 ) ;
p_aout->s32_buffer[l_buffer] = 0;
}
* aout_u8.c: 8 bit unsigned audio output functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: aout_u8.c,v 1.2 2001/03/21 13:42:34 sam Exp $
+ * $Id: aout_u8.c,v 1.3 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
for ( l_buffer = 0; l_buffer < l_buffer_limit; l_buffer++ )
{
- ((u8 *)p_aout->buffer)[l_buffer] = (u8)( ( (p_aout->s32_buffer[l_buffer] / AOUT_MAX_FIFOS / 256 ) + 128 ) * p_aout->vol / 256 );
+ ((u8 *)p_aout->buffer)[l_buffer] = (u8)( ( (p_aout->s32_buffer[l_buffer] / AOUT_MAX_FIFOS / 256 ) + 128 ) * p_aout->i_vol / 256 );
p_aout->s32_buffer[l_buffer] = 0;
}
for ( l_buffer = 0; l_buffer < l_buffer_limit; l_buffer++ )
{
- ((u8 *)p_aout->buffer)[l_buffer] = (u8)( ( (p_aout->s32_buffer[l_buffer] / AOUT_MAX_FIFOS / 256) + 128 ) * p_aout->vol / 256 );
+ ((u8 *)p_aout->buffer)[l_buffer] = (u8)( ( (p_aout->s32_buffer[l_buffer] / AOUT_MAX_FIFOS / 256) + 128 ) * p_aout->i_vol / 256 );
p_aout->s32_buffer[l_buffer] = 0;
}
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
* audio_output.c : audio output thread
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: audio_output.c,v 1.58 2001/04/29 02:48:51 stef Exp $
+ * $Id: audio_output.c,v 1.59 2001/05/01 04:18:18 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
}
/* Choose the best module */
- p_aout->p_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_AOUT, NULL );
+ p_aout->p_module = module_Need( MODULE_CAPABILITY_AOUT, NULL );
if( p_aout->p_module == NULL )
{
*/
if ( p_aout->pf_open( p_aout ) )
{
- module_Unneed( p_main->p_bank, p_aout->p_module );
+ module_Unneed( p_aout->p_module );
free( p_aout );
return( NULL );
}
{
intf_ErrMsg( "aout error: null sample rate" );
p_aout->pf_close( p_aout );
- module_Unneed( p_main->p_bank, p_aout->p_module );
+ module_Unneed( p_aout->p_module );
free( p_aout );
return( NULL );
}
/* special setting for ac3 pass-through mode */
- if( p_main->b_spdif )
+ if( main_GetIntVariable( AOUT_SPDIF_VAR, 0 ) )
{
p_aout->i_format = AOUT_FMT_AC3;
p_aout->i_channels = 1;
if ( p_aout->pf_setformat( p_aout ) )
{
p_aout->pf_close( p_aout );
- module_Unneed( p_main->p_bank, p_aout->p_module );
+ module_Unneed( p_aout->p_module );
free( p_aout );
return( NULL );
}
/* Initialize the volume level */
- p_aout->vol = VOLUME_DEFAULT;
+ p_aout->i_vol = VOLUME_DEFAULT;
/* FIXME: maybe it would be cleaner to change SpawnThread prototype
* see vout to handle status correctly ?? however, it is not critical since
if( aout_SpawnThread( p_aout ) )
{
p_aout->pf_close( p_aout );
- module_Unneed( p_main->p_bank, p_aout->p_module );
+ module_Unneed( p_aout->p_module );
free( p_aout );
return( NULL );
}
p_aout->pf_close( p_aout );
/* Release the aout module */
- module_Unneed( p_main->p_bank, p_aout->p_module );
+ module_Unneed( p_aout->p_module );
/* Free structure */
free( p_aout );
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.103 2001/04/28 23:19:19 henri Exp $
+ * $Id: input.c,v 1.104 2001/05/01 04:18:18 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->stream.control.b_bw = 0;
/* Initialize default settings for spawned decoders */
- p_input->p_default_aout = p_main->p_aout;
p_input->p_default_vout = p_main->p_vout;
/* Create thread and set locks. */
p_input->c_packets_trashed = 0;
#endif
- p_input->p_input_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_INPUT,
+ p_input->p_input_module = module_Need( MODULE_CAPABILITY_INPUT,
(probedata_t *)p_input );
if( p_input->p_input_module == NULL )
{
/* We barfed -- exit nicely */
p_input->pf_close( p_input );
- module_Unneed( p_main->p_bank, p_input->p_input_module );
+ module_Unneed( p_input->p_input_module );
return( -1 );
}
{
/* We barfed -- exit nicely */
p_input->pf_close( p_input );
- module_Unneed( p_main->p_bank, p_input->p_input_module );
+ module_Unneed( p_input->p_input_module );
return( -1 );
}
p_input->pf_close( p_input );
/* Release modules */
- module_Unneed( p_main->p_bank, p_input->p_input_module );
+ module_Unneed( p_input->p_input_module );
}
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.53 2001/04/29 02:48:51 stef Exp $
+ * $Id: input_programs.c,v 1.54 2001/05/01 04:18:18 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->stream.pp_programs[i_pgrm_index]->p_vout
= p_input->p_default_vout;
- p_input->stream.pp_programs[i_pgrm_index]->p_aout
- = p_input->p_default_aout;
if( i_data_len )
{
intf_ErrMsg( "Unable to allocate memory in GetAdecConfig" );
return( NULL );
}
- p_config->p_aout = p_input->p_default_aout;
+
if( InitDecConfig( p_input, p_es, &p_config->decoder_config ) == -1 )
{
free( p_config );
case AC3_AUDIO_ES:
if( p_main->b_audio )
{
- if( !p_main->b_spdif )
+ if( main_GetIntVariable( AOUT_SPDIF_VAR, 0 ) )
{
- decoder.pf_create_thread = ac3dec_CreateThread;
+ decoder.pf_create_thread = spdif_CreateThread;
}
else
{
- decoder.pf_create_thread = spdif_CreateThread;
+ decoder.pf_create_thread = ac3dec_CreateThread;
}
p_config = (void *)GetAdecConfig( p_input, p_es );
* interface, such as command line.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: interface.c,v 1.74 2001/04/30 15:00:59 massiot Exp $
+ * $Id: interface.c,v 1.75 2001/05/01 04:18:18 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
}
/* Choose the best module */
- p_intf->p_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_INTF, NULL );
+ p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF, NULL );
if( p_intf->p_module == NULL )
{
if( p_intf->pf_open( p_intf ) )
{
intf_ErrMsg("intf error: cannot create interface");
- module_Unneed( p_main->p_bank, p_intf->p_module );
+ module_Unneed( p_intf->p_module );
free( p_intf );
return( NULL );
}
intf_FlushMsg();
/* Manage module bank */
- module_ManageBank( p_main->p_bank );
+ module_ManageBank( );
if( ( p_intf->p_input != NULL ) &&
( p_intf->p_input->b_error || p_intf->p_input->b_eof ) )
}
/* Unlock module */
- module_Unneed( p_main->p_bank, p_intf->p_module );
+ module_Unneed( p_intf->p_module );
vlc_mutex_destroy( &p_intf->change_lock );
* half handled directly by the plugins. We should decide what to do. */
break;
case INTF_KEY_INC_VOLUME: /* volume + */
- if( (p_main->p_aout != NULL) && (p_main->p_aout->vol < VOLUME_MAX) )
- p_main->p_aout->vol += VOLUME_STEP;
+ if( (p_main->p_aout != NULL) && (p_main->p_aout->i_vol < VOLUME_MAX) )
+ p_main->p_aout->i_vol += VOLUME_STEP;
break;
case INTF_KEY_DEC_VOLUME: /* volume - */
- if( (p_main->p_aout != NULL) && (p_main->p_aout->vol > VOLUME_STEP) )
- p_main->p_aout->vol -= VOLUME_STEP;
+ if( (p_main->p_aout != NULL) && (p_main->p_aout->i_vol > VOLUME_STEP) )
+ p_main->p_aout->i_vol -= VOLUME_STEP;
break;
case INTF_KEY_TOGGLE_VOLUME: /* toggle mute */
- if( (p_main->p_aout != NULL) && (p_main->p_aout->vol))
+ if( (p_main->p_aout != NULL) && (p_main->p_aout->i_vol))
{
- i_volbackup = p_main->p_aout->vol;
- p_main->p_aout->vol = 0;
+ i_volbackup = p_main->p_aout->i_vol;
+ p_main->p_aout->i_vol = 0;
}
- else if( (p_main->p_aout != NULL) && (!p_main->p_aout->vol))
- p_main->p_aout->vol = i_volbackup;
+ else if( (p_main->p_aout != NULL) && (!p_main->p_aout->i_vol))
+ p_main->p_aout->i_vol = i_volbackup;
break;
case INTF_KEY_DEC_GAMMA: /* gamma - */
if( (p_main->p_vout != NULL) && (p_main->p_vout->f_gamma > -INTF_GAMMA_LIMIT) )
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: main.c,v 1.90 2001/04/29 02:48:51 stef Exp $
+ * $Id: main.c,v 1.91 2001/05/01 04:18:18 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
static const char *psz_shortopts = "hHvgt:T:u:a:s:c:I:A:V:";
/*****************************************************************************
- * Global variable program_data - this is the one and only, see main.h
+ * Global variable program_data - these are the only ones, see main.h and
+ * modules.h
*****************************************************************************/
main_t *p_main;
+bank_t *p_bank;
/*****************************************************************************
* Local prototypes
int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
{
main_t main_data; /* root of all data - see main.h */
+ bank_t module_bank;
- p_main = &main_data; /* set up the global variable */
+ p_main = &main_data; /* set up the global variables */
+ p_bank = &module_bank;
+
+ /*
+ * Initialize the main structure
+ */
+ p_main->i_cpu_capabilities = CPUCapabilities();
+
+ p_main->p_aout = NULL;
+ p_main->p_vout = NULL;
/*
* System specific initialization code
system_Create( &i_argc, ppsz_argv, ppsz_env );
#endif
- p_main->i_cpu_capabilities = CPUCapabilities();
-
/*
* Test if our code is likely to run on this CPU
*/
/*
* Initialize playlist and get commandline files
*/
- p_main->p_playlist = intf_PlaylistCreate( );
+ p_main->p_playlist = intf_PlaylistCreate();
if( !p_main->p_playlist )
{
intf_ErrMsg( "playlist error: playlist initialization failed" );
/*
* Initialize module bank
*/
- p_main->p_bank = module_CreateBank( );
- if( !p_main->p_bank )
- {
- intf_ErrMsg( "module error: module bank initialization failed" );
- intf_PlaylistDestroy( p_main->p_playlist );
- intf_MsgDestroy();
- return( errno );
- }
- module_InitBank( p_main->p_bank );
+ module_InitBank();
/*
* Initialize shared resources and libraries
if( !p_main->p_intf )
{
intf_ErrMsg( "intf error: interface initialization failed" );
- module_DestroyBank( p_main->p_bank );
+ module_EndBank();
intf_PlaylistDestroy( p_main->p_playlist );
intf_MsgDestroy();
return( errno );
*/
InitSignalHandler();
- /*
- * Open audio device and start aout thread
- */
- if( p_main->b_audio )
- {
- p_main->p_aout = aout_CreateThread( NULL );
- if( p_main->p_aout == NULL )
- {
- /* On error during audio initialization, switch off audio */
- intf_ErrMsg( "aout error: audio initialization failed,"
- " audio is deactivated" );
- p_main->b_audio = 0;
- }
- }
-
- /*
- * Open video device and start vout thread
- */
- if( p_main->b_video )
- {
- p_main->p_vout = vout_CreateThread( NULL );
- if( p_main->p_vout == NULL )
- {
- /* On error during video initialization, switch off video */
- intf_ErrMsg( "vout error: video initialization failed,"
- " video is deactivated" );
- p_main->b_video = 0;
- }
- }
-
- /* Flush messages before entering the main loop */
- intf_FlushMsg();
-
/*
* This is the main loop
*/
p_main->p_intf->pf_run( p_main->p_intf );
+ /*
+ * Finished, destroy the interface
+ */
intf_Destroy( p_main->p_intf );
/*
- * Close video device
+ * Close all video devices
*/
- if( p_main->b_video )
+ if( p_main->p_vout != NULL )
{
vout_DestroyThread( p_main->p_vout, NULL );
}
/*
- * Close audio device
+ * Close all audio devices
*/
- if( p_main->b_audio )
+ if( p_main->p_aout != NULL )
{
aout_DestroyThread( p_main->p_aout, NULL );
}
/*
* Free module bank
*/
- module_DestroyBank( p_main->p_bank );
+ module_EndBank();
/*
* Free playlist
p_main->b_audio = 1;
p_main->b_video = 1;
p_main->b_channels = 0;
- p_main->b_spdif = 0;
p_main->i_warning_level = 4;
main_PutIntVariable( AOUT_STEREO_VAR, 0 );
break;
case OPT_SPDIF: /* --spdif */
- p_main->b_spdif = 1;
+ main_PutIntVariable( AOUT_SPDIF_VAR, 1 );
break;
/* Video options */
"\n --noaudio \tdisable audio"
"\n -A, --aout <module> \taudio output method"
"\n --stereo, --mono \tstereo/mono audio"
- "\n --spdif \tac3 pass-through mode"
+ "\n --spdif \tAC3 pass-through mode"
"\n"
"\n --novideo \tdisable video"
"\n -V, --vout <module> \tvideo output method"
"\n " AOUT_METHOD_VAR "=<method name> \taudio method"
"\n " AOUT_DSP_VAR "=<filename> \tdsp device path"
"\n " AOUT_STEREO_VAR "={1|0} \tstereo or mono output"
+ "\n " AOUT_SPDIF_VAR "={1|0} \tAC3 pass-through mode"
"\n " AOUT_RATE_VAR "=<rate> \toutput rate" );
/* Video parameters */
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: lpcm_decoder_thread.c,v 1.13 2001/04/06 09:15:48 sam Exp $
+ * $Id: lpcm_decoder_thread.c,v 1.14 2001/05/01 04:18:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*
* Initialize the output properties
*/
- p_lpcmdec->p_aout = p_config->p_aout;
p_lpcmdec->p_aout_fifo = NULL;
/* Spawn the lpcm decoder thread */
*****************************************************************************/
static int InitThread (lpcmdec_thread_t * p_lpcmdec)
{
- aout_fifo_t aout_fifo;
lpcm_byte_stream_t * byte_stream;
intf_DbgMsg ( "LPCM Debug: initializing lpcm decoder thread %p", p_lpcmdec );
byte_stream->info = p_lpcmdec;
vlc_mutex_unlock (&p_lpcmdec->p_fifo->data_lock);
- aout_fifo.i_type = AOUT_ADEC_STEREO_FIFO;
- aout_fifo.i_channels = 2;
- aout_fifo.b_stereo = 1;
-
- aout_fifo.l_frame_size = LPCMDEC_FRAME_SIZE;
-
/* Creating the audio output fifo */
- if ((p_lpcmdec->p_aout_fifo = aout_CreateFifo(p_lpcmdec->p_aout, &aout_fifo)) == NULL) {
+ p_lpcmdec->p_aout_fifo = aout_CreateFifo( AOUT_ADEC_STEREO_FIFO, 2, 0, 0,
+ LPCMDEC_FRAME_SIZE, NULL );
+ if ( p_lpcmdec->p_aout_fifo == NULL )
+ {
return -1;
}
* lpcm_decoder_thread.h : lpcm decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: lpcm_decoder_thread.h,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: lpcm_decoder_thread.h,v 1.5 2001/05/01 04:18:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*
* Decoder properties
*/
-
lpcmdec_t lpcm_decoder;
/*
* Output properties
*/
aout_fifo_t * p_aout_fifo; /* stores the decompressed audio frames */
- aout_thread_t * p_aout; /* needed to create the audio fifo */
} lpcmdec_thread_t;
* Prototypes
*****************************************************************************/
vlc_thread_t lpcmdec_CreateThread( adec_config_t * p_config );
+
* modules.c : Built-in and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.27 2001/04/28 03:36:25 sam Exp $
+ * $Id: modules.c,v 1.28 2001/05/01 04:18:18 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
#include "intf_msg.h"
#include "modules.h"
#ifdef HAVE_DYNAMIC_PLUGINS
-#include "modules_core.h"
+# include "modules_core.h"
#endif
#include "modules_builtin.h"
/* Local prototypes */
#ifdef HAVE_DYNAMIC_PLUGINS
-static int AllocatePluginModule ( module_bank_t *, char * );
+static int AllocatePluginModule ( char * );
#endif
-static int AllocateBuiltinModule( module_bank_t *,
- int ( * ) ( module_t * ),
+static int AllocateBuiltinModule( int ( * ) ( module_t * ),
int ( * ) ( module_t * ),
int ( * ) ( module_t * ) );
-static int DeleteModule ( module_bank_t * p_bank, module_t * );
+static int DeleteModule ( module_t * );
static int LockModule ( module_t * );
static int UnlockModule ( module_t * );
#ifdef HAVE_DYNAMIC_PLUGINS
static int CallSymbol ( module_t *, char * );
#endif
-/*****************************************************************************
- * module_CreateBank: create the module bank.
- *****************************************************************************
- * This function creates a module bank structure.
- *****************************************************************************/
-module_bank_t * module_CreateBank( void )
-{
- module_bank_t * p_bank;
-
- p_bank = malloc( sizeof( module_bank_t ) );
-
- return( p_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 plugin modules it can find.
*****************************************************************************/
-void module_InitBank( module_bank_t * p_bank )
+void module_InitBank( )
{
#ifdef HAVE_DYNAMIC_PLUGINS
static char * path[] = { ".", "lib", PLUGIN_PATH, NULL, NULL };
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();
/* We created a nice filename -- now we just try to load
* it as a plugin module. */
- AllocatePluginModule( p_bank, psz_file );
+ AllocatePluginModule( psz_file );
/* We don't care if the allocation succeeded */
free( psz_file );
}
#endif /* HAVE_DYNAMIC_PLUGINS */
+ intf_WarnMsg( 1, "module: module bank initialized" );
+
return;
}
/*****************************************************************************
- * module_DestroyBank: destroy the module bank.
+ * module_EndBank: destroy the module bank.
*****************************************************************************
* This function unloads all unused plugin modules and removes the module
* bank in case of success.
*****************************************************************************/
-void module_DestroyBank( module_bank_t * p_bank )
+void module_EndBank( )
{
module_t * p_next;
while( p_bank->first != NULL )
{
- if( DeleteModule( p_bank, p_bank->first ) )
+ if( DeleteModule( p_bank->first ) )
{
/* Module deletion failed */
intf_ErrMsg( "module error: `%s' can't be removed. trying harder.",
/* Destroy the lock */
vlc_mutex_destroy( &p_bank->lock );
-
- /* We can free the module bank */
- free( p_bank );
return;
}
* This function resets the module bank by unloading all unused plugin
* modules.
*****************************************************************************/
-void module_ResetBank( module_bank_t * p_bank )
+void module_ResetBank( )
{
intf_ErrMsg( "FIXME: module_ResetBank unimplemented" );
return;
* This function parses the module bank and hides modules that have been
* unused for a while.
*****************************************************************************/
-void module_ManageBank( module_bank_t * p_bank )
+void module_ManageBank( )
{
#ifdef HAVE_DYNAMIC_PLUGINS
module_t * p_module;
*****************************************************************************
* This function returns the module that best fits the asked capabilities.
*****************************************************************************/
-module_t * module_Need( module_bank_t *p_bank,
- int i_capabilities, void *p_data )
+module_t * module_Need( int i_capabilities, void *p_data )
{
module_t * p_module;
module_t * p_bestmodule = NULL;
* This function must be called by the thread that called module_Need, to
* decrease the reference count and allow for hiding of modules.
*****************************************************************************/
-void module_Unneed( module_bank_t * p_bank, module_t * p_module )
+void module_Unneed( module_t * p_module )
{
/* We take the global lock */
vlc_mutex_lock( &p_bank->lock );
* for its information data. The module can then be handled by module_Need,
* module_Unneed and HideModule. It can be removed by DeleteModule.
*****************************************************************************/
-static int AllocatePluginModule( module_bank_t * p_bank, char * psz_filename )
+static int AllocatePluginModule( char * psz_filename )
{
module_t * p_module, * p_othermodule;
module_handle_t handle;
* for its information data. The module can then be handled by module_Need,
* module_Unneed and HideModule. It can be removed by DeleteModule.
*****************************************************************************/
-static int AllocateBuiltinModule( module_bank_t * p_bank,
- int ( *pf_init ) ( module_t * ),
+static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
int ( *pf_activate ) ( module_t * ),
int ( *pf_deactivate ) ( module_t * ) )
{
*****************************************************************************
* This function can only be called if i_usage <= 0.
*****************************************************************************/
-static int DeleteModule( module_bank_t * p_bank, module_t * p_module )
+static int DeleteModule( module_t * p_module )
{
/* If the module is not in use but is still in memory, we first have
* to hide it and remove it from memory before we can free the
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: video_output.c,v 1.121 2001/04/27 19:29:11 massiot Exp $
+ * $Id: video_output.c,v 1.122 2001/05/01 04:18:18 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
}
/* Choose the best module */
- p_vout->p_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_VOUT, NULL );
+ p_vout->p_module = module_Need( MODULE_CAPABILITY_VOUT, NULL );
if( p_vout->p_module == NULL )
{
* own error messages */
if( p_vout->pf_create( p_vout ) )
{
- module_Unneed( p_main->p_bank, p_vout->p_module );
+ module_Unneed( p_vout->p_module );
free( p_vout );
return( NULL );
}
vlc_mutex_destroy( &p_vout->change_lock );
/* Release the module */
- module_Unneed( p_main->p_bank, p_vout->p_module );
+ module_Unneed( p_vout->p_module );
/* Free structure */
free( p_vout );
* These functions set up YUV tables for colorspace conversion
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_yuv.c,v 1.47 2001/03/21 13:42:35 sam Exp $
+ * $Id: video_yuv.c,v 1.48 2001/05/01 04:18:18 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
#include "intf_msg.h"
-#include "main.h"
-
/*****************************************************************************
* vout_InitYUV: allocate and initialize translation tables
*****************************************************************************
int vout_InitYUV( vout_thread_t *p_vout )
{
/* Choose the best module */
- p_vout->yuv.p_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_YUV, NULL );
+ p_vout->yuv.p_module = module_Need( MODULE_CAPABILITY_YUV, NULL );
if( p_vout->yuv.p_module == NULL )
{
void vout_EndYUV( vout_thread_t *p_vout )
{
p_vout->yuv.pf_end( p_vout );
- module_Unneed( p_main->p_bank, p_vout->yuv.p_module );
+ module_Unneed( p_vout->yuv.p_module );
}
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.81 2001/04/29 14:52:42 stef Exp $
+ * $Id: video_parser.c,v 1.82 2001/05/01 04:18:18 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
#include "../video_decoder/video_parser.h"
#include "../video_decoder/video_fifo.h"
-#include "main.h"
-
/*
* Local prototypes
*/
-static int InitThread ( vpar_thread_t *p_vpar );
-static void RunThread ( vpar_thread_t *p_vpar );
-static void ErrorThread ( vpar_thread_t *p_vpar );
-static void EndThread ( vpar_thread_t *p_vpar );
-static void BitstreamCallback ( bit_stream_t *p_bit_stream,
- boolean_t b_new_pes );
+static int InitThread ( vpar_thread_t * );
+static void RunThread ( vpar_thread_t * );
+static void ErrorThread ( vpar_thread_t * );
+static void EndThread ( vpar_thread_t * );
+static void BitstreamCallback ( bit_stream_t *, boolean_t );
/*****************************************************************************
* vpar_CreateThread: create a generic parser thread
/*
* Choose the best motion compensation module
*/
- p_vpar->p_motion_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_MOTION, NULL );
+ p_vpar->p_motion_module = module_Need( MODULE_CAPABILITY_MOTION, NULL );
if( p_vpar->p_motion_module == NULL )
{
return( 0 );
}
-#define m ( p_vpar->pppf_motion )
-#define s ( p_vpar->ppf_motion_skipped )
-#define f ( p_vpar->p_motion_module->p_functions->motion.functions.motion )
- m[0][0][0] = m[0][0][1] = m[0][0][2] = m[0][0][3] = NULL;
- m[0][1][0] = m[0][1][1] = m[0][1][2] = m[0][1][3] = NULL;
- m[1][0][0] = NULL;
- m[1][1][0] = NULL;
- m[2][0][0] = NULL;
- m[2][1][0] = NULL;
- m[3][0][0] = NULL;
- m[3][1][0] = NULL;
-
- m[1][0][1] = f.pf_field_field_420;
- m[1][1][1] = f.pf_frame_field_420;
- m[2][0][1] = f.pf_field_field_422;
- m[2][1][1] = f.pf_frame_field_422;
- m[3][0][1] = f.pf_field_field_444;
- m[3][1][1] = f.pf_frame_field_444;
-
- m[1][0][2] = f.pf_field_16x8_420;
- m[1][1][2] = f.pf_frame_frame_420;
- m[2][0][2] = f.pf_field_16x8_422;
- m[2][1][2] = f.pf_frame_frame_422;
- m[3][0][2] = f.pf_field_16x8_444;
- m[3][1][2] = f.pf_frame_frame_444;
-
- m[1][0][3] = f.pf_field_dmv_420;
- m[1][1][3] = f.pf_frame_dmv_420;
- m[2][0][3] = f.pf_field_dmv_422;
- m[2][1][3] = f.pf_frame_dmv_422;
- m[3][0][3] = f.pf_field_dmv_444;
- m[3][1][3] = f.pf_frame_dmv_444;
-
- s[0][0] = s[0][1] = s[0][2] = s[0][3] = NULL;
- s[1][0] = NULL;
- s[2][0] = NULL;
- s[3][0] = NULL;
-
- s[1][1] = f.pf_field_field_420;
- s[2][1] = f.pf_field_field_422;
- s[3][1] = f.pf_field_field_444;
-
- s[1][2] = f.pf_field_field_420;
- s[2][2] = f.pf_field_field_422;
- s[3][2] = f.pf_field_field_444;
-
- s[1][3] = f.pf_frame_frame_420;
- s[2][3] = f.pf_frame_frame_422;
- s[3][3] = f.pf_frame_frame_444;
-#undef f
-#undef s
-#undef m
+#define M ( p_vpar->pppf_motion )
+#define S ( p_vpar->ppf_motion_skipped )
+#define F ( p_vpar->p_motion_module->p_functions->motion.functions.motion )
+ M[0][0][0] = M[0][0][1] = M[0][0][2] = M[0][0][3] = NULL;
+ M[0][1][0] = M[0][1][1] = M[0][1][2] = M[0][1][3] = NULL;
+ M[1][0][0] = NULL;
+ M[1][1][0] = NULL;
+ M[2][0][0] = NULL;
+ M[2][1][0] = NULL;
+ M[3][0][0] = NULL;
+ M[3][1][0] = NULL;
+
+ M[1][0][1] = F.pf_field_field_420;
+ M[1][1][1] = F.pf_frame_field_420;
+ M[2][0][1] = F.pf_field_field_422;
+ M[2][1][1] = F.pf_frame_field_422;
+ M[3][0][1] = F.pf_field_field_444;
+ M[3][1][1] = F.pf_frame_field_444;
+
+ M[1][0][2] = F.pf_field_16x8_420;
+ M[1][1][2] = F.pf_frame_frame_420;
+ M[2][0][2] = F.pf_field_16x8_422;
+ M[2][1][2] = F.pf_frame_frame_422;
+ M[3][0][2] = F.pf_field_16x8_444;
+ M[3][1][2] = F.pf_frame_frame_444;
+
+ M[1][0][3] = F.pf_field_dmv_420;
+ M[1][1][3] = F.pf_frame_dmv_420;
+ M[2][0][3] = F.pf_field_dmv_422;
+ M[2][1][3] = F.pf_frame_dmv_422;
+ M[3][0][3] = F.pf_field_dmv_444;
+ M[3][1][3] = F.pf_frame_dmv_444;
+
+ S[0][0] = S[0][1] = S[0][2] = S[0][3] = NULL;
+ S[1][0] = NULL;
+ S[2][0] = NULL;
+ S[3][0] = NULL;
+
+ S[1][1] = F.pf_field_field_420;
+ S[2][1] = F.pf_field_field_422;
+ S[3][1] = F.pf_field_field_444;
+
+ S[1][2] = F.pf_field_field_420;
+ S[2][2] = F.pf_field_field_422;
+ S[3][2] = F.pf_field_field_444;
+
+ S[1][3] = F.pf_frame_frame_420;
+ S[2][3] = F.pf_frame_frame_422;
+ S[3][3] = F.pf_frame_frame_444;
+#undef F
+#undef S
+#undef M
/*
* Choose the best IDCT module
*/
- p_vpar->p_idct_module = module_Need( p_main->p_bank,
- MODULE_CAPABILITY_IDCT, NULL );
+ p_vpar->p_idct_module = module_Need( MODULE_CAPABILITY_IDCT, NULL );
if( p_vpar->p_idct_module == NULL )
{
intf_ErrMsg( "vpar error: no suitable IDCT module" );
- module_Unneed( p_main->p_bank, p_vpar->p_motion_module );
+ module_Unneed( p_vpar->p_motion_module );
free( p_vpar );
return( 0 );
}
(vlc_thread_func_t)RunThread, (void *)p_vpar ) )
{
intf_ErrMsg("vpar error: can't spawn video parser thread");
- module_Unneed( p_main->p_bank, p_vpar->p_idct_module );
- module_Unneed( p_main->p_bank, p_vpar->p_motion_module );
+ module_Unneed( p_vpar->p_idct_module );
+ module_Unneed( p_vpar->p_motion_module );
free( p_vpar );
return( 0 );
}
vlc_mutex_destroy( &(p_vpar->synchro.fifo_lock) );
- module_Unneed( p_main->p_bank, p_vpar->p_idct_module );
- module_Unneed( p_main->p_bank, p_vpar->p_motion_module );
+ module_Unneed( p_vpar->p_idct_module );
+ module_Unneed( p_vpar->p_motion_module );
free( p_vpar );
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.c,v 1.82 2001/04/28 03:36:26 sam Exp $
+ * $Id: vpar_headers.c,v 1.83 2001/05/01 04:18:18 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
#include "../video_decoder/video_parser.h"
#include "../video_decoder/video_fifo.h"
+#include "main.h" /* XXX REMOVE THIS */
+
/*
* Local prototypes
*/
/* Extension and User data */
ExtensionAndUserData( p_vpar );
+
+ /* XXX: The vout request and fifo opening will eventually be here */
+ if( p_main->p_vout == NULL )
+ {
+ intf_Msg( "vpar: no vout present, spawning one" );
+ p_main->p_vout = p_vpar->p_vout = vout_CreateThread( NULL );
+ }
}
/*****************************************************************************
Name: vlc
Version: 0.2.73
-Release: 1
+Release: 2
Copyright: GPL
Url: http://www.videolan.org/
Group: X11/Applications/Graphics
Source0: http://www.videolan.org/packages/0.2.73/vlc-0.2.73.tar.gz
+Prefix: /usr
Packager: Samuel Hocevar <sam@zoy.org>
Buildroot: /tmp/vlc-build
Summary: VideoLAN Client.
+Summary(fr): Client VideoLAN.
%changelog
+* Mon Apr 30 2001 Arnaud Gomes-do-Vale <arnaud@glou.org>
+Added relocation support and compile fixes for Red Hat 7.x.
+
* Sat Apr 28 2001 Henri Fallon <henri@videolan.org>
New upstream release (0.2.73)
The VideoLAN Client allows to play MPEG2 Transport Streams from the
network or from a file, as well as direct DVD playback.
+%description -l fr
+Un lecteur MPEG et DVD utilisable en réseau.
+VideoLAN est un lecteur MPEG1/2. Le client VideoLAN permet la lecture de
+flux MPEG2 depuis le réseau ou depuis un fichier, en plus de la lecture
+directe des DVD.
+
%prep
%setup
%build
-./configure --prefix=/usr --with-sdl --enable-esd --enable-gnome --enable-qt
-make
+if [ -x %{prefix}/bin/kgcc ] ;
+then
+ CC=%{prefix}/bin/kgcc ./configure --prefix=%{prefix} --with-sdl --enable-esd --enable-gnome --enable-qt
+else
+ ./configure --prefix=%{prefix} --with-sdl --enable-esd --enable-gnome --enable-qt
+fi
+if [ -x %{prefix}/bin/kgcc ] ;
+then
+ CC=%{prefix}/bin/kgcc make
+else
+ make
+fi
%install
-mkdir -p $RPM_BUILD_ROOT/usr/lib
-mkdir -p $RPM_BUILD_ROOT/usr/bin
-make install prefix=$RPM_BUILD_ROOT/usr
+mkdir -p $RPM_BUILD_ROOT%{prefix}/lib
+mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
+make install prefix=$RPM_BUILD_ROOT%{prefix}
%files
-%attr(-, root, root) /usr/bin/vlc
-%attr(-, root, root) /usr/share/videolan
-%attr(-, root, root) /usr/lib/videolan
+%attr(-, root, root) %{prefix}/bin/vlc
+%attr(-, root, root) %{prefix}/share/videolan
+%attr(-, root, root) %{prefix}/lib/videolan
%attr(-, root, root) %doc ChangeLog AUTHORS COPYING INSTALL README TODO doc
%clean
rm -rf $RPM_BUILD_ROOT