Commit 0a3aa895 authored by Johan Bilien's avatar Johan Bilien

* Modified vcd input for the new input III.
* Still have problems with end of tracks.
* Modified the command line, as stef did for the DVD :

 [vcd:][device][@[title][,chapter]

 Note that chapter support is not yet implemented.
parent 5ccf6972
...@@ -6521,7 +6521,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ...@@ -6521,7 +6521,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "cdrom_msf0" >/dev/null 2>&1; then egrep "cdrom_msf0" >/dev/null 2>&1; then
rm -rf conftest* rm -rf conftest*
#BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
fi fi
rm -f conftest* rm -f conftest*
...@@ -6530,13 +6530,12 @@ fi ...@@ -6530,13 +6530,12 @@ fi
if test x$enable_vcd != xno -a "${SYS}" = "bsdi" if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
then then
#BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
true #delete me
fi fi
if test x$enable_vcd != xno -a "${SYS}" = "darwin" if test x$enable_vcd != xno -a "${SYS}" = "darwin"
then then
#BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
LIB_VCD="${LIB_VCD} -framework IOKit" LIB_VCD="${LIB_VCD} -framework IOKit"
fi fi
...@@ -6577,7 +6576,7 @@ then ...@@ -6577,7 +6576,7 @@ then
fi fi
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6581 "configure" #line 6580 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <netinet/in.h> #include <netinet/in.h>
EOF EOF
...@@ -6620,17 +6619,17 @@ if test "${with_mad+set}" = set; then ...@@ -6620,17 +6619,17 @@ if test "${with_mad+set}" = set; then
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6624: checking for $ac_hdr" >&5 echo "configure:6623: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6629 "configure" #line 6628 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -6660,7 +6659,7 @@ fi ...@@ -6660,7 +6659,7 @@ fi
done done
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6 echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
echo "configure:6664: checking for mad_bit_init in -lmad" >&5 echo "configure:6663: checking for mad_bit_init in -lmad" >&5
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'` ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -6668,7 +6667,7 @@ else ...@@ -6668,7 +6667,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS" LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6672 "configure" #line 6671 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -6679,7 +6678,7 @@ int main() { ...@@ -6679,7 +6678,7 @@ int main() {
mad_bit_init() mad_bit_init()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -6736,17 +6735,17 @@ then ...@@ -6736,17 +6735,17 @@ then
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6740: checking for $ac_hdr" >&5 echo "configure:6739: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6745 "configure" #line 6744 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -6769,7 +6768,7 @@ EOF ...@@ -6769,7 +6768,7 @@ EOF
PLUGINS="${PLUGINS} dsp" PLUGINS="${PLUGINS} dsp"
echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6 echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
echo "configure:6773: checking for main in -lossaudio" >&5 echo "configure:6772: checking for main in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -6777,14 +6776,14 @@ else ...@@ -6777,14 +6776,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lossaudio $LIBS" LIBS="-lossaudio $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6781 "configure" #line 6780 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -6820,7 +6819,7 @@ if test "${enable_esd+set}" = set; then ...@@ -6820,7 +6819,7 @@ if test "${enable_esd+set}" = set; then
# Extract the first word of "esd-config", so it can be a program name with args. # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2 set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6824: checking for $ac_word" >&5 echo "configure:6823: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -6871,7 +6870,7 @@ if test "${enable_arts+set}" = set; then ...@@ -6871,7 +6870,7 @@ if test "${enable_arts+set}" = set; then
# Extract the first word of "artsc-config", so it can be a program name with args. # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2 set dummy artsc-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6875: checking for $ac_word" >&5 echo "configure:6874: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -6929,17 +6928,17 @@ else ...@@ -6929,17 +6928,17 @@ else
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6933: checking for $ac_hdr" >&5 echo "configure:6932: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6938 "configure" #line 6937 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -6984,17 +6983,17 @@ fi ...@@ -6984,17 +6983,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6988: checking for $ac_hdr" >&5 echo "configure:6987: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6993 "configure" #line 6992 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7037,17 +7036,17 @@ if test "x$enableval" != "xno" -a x$SYS != xmingw32 ...@@ -7037,17 +7036,17 @@ if test "x$enableval" != "xno" -a x$SYS != xmingw32
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7041: checking for $ac_hdr" >&5 echo "configure:7040: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7046 "configure" #line 7045 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7135,7 +7134,7 @@ fi ...@@ -7135,7 +7134,7 @@ fi
# Extract the first word of "sdl12-config", so it can be a program name with args. # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2 set dummy sdl12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7139: checking for $ac_word" >&5 echo "configure:7138: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7175,7 +7174,7 @@ fi ...@@ -7175,7 +7174,7 @@ fi
# Extract the first word of "sdl11-config", so it can be a program name with args. # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2 set dummy sdl11-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7179: checking for $ac_word" >&5 echo "configure:7178: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7216,7 +7215,7 @@ fi ...@@ -7216,7 +7215,7 @@ fi
# Extract the first word of "sdl-config", so it can be a program name with args. # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2 set dummy sdl-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7220: checking for $ac_word" >&5 echo "configure:7219: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7262,17 +7261,17 @@ fi ...@@ -7262,17 +7261,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7266: checking for $ac_hdr" >&5 echo "configure:7265: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7271 "configure" #line 7270 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7342,17 +7341,17 @@ fi ...@@ -7342,17 +7341,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7346: checking for $ac_hdr" >&5 echo "configure:7345: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7351 "configure" #line 7350 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7381,7 +7380,7 @@ done ...@@ -7381,7 +7380,7 @@ done
else else
echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6 echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
echo "configure:7385: checking for directX headers in ${withval}" >&5 echo "configure:7384: checking for directX headers in ${withval}" >&5
if test -f ${withval}/ddraw.h if test -f ${withval}/ddraw.h
then then
PLUGINS="${PLUGINS} directx" PLUGINS="${PLUGINS} directx"
...@@ -7490,7 +7489,7 @@ if test "${enable_gnome+set}" = set; then ...@@ -7490,7 +7489,7 @@ if test "${enable_gnome+set}" = set; then
# Extract the first word of "gnome-config", so it can be a program name with args. # Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2 set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7494: checking for $ac_word" >&5 echo "configure:7493: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7535,17 +7534,17 @@ fi ...@@ -7535,17 +7534,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7539: checking for $ac_hdr" >&5 echo "configure:7538: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7544 "configure" #line 7543 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7605,7 +7604,7 @@ fi ...@@ -7605,7 +7604,7 @@ fi
# Extract the first word of "gtk12-config", so it can be a program name with args. # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2 set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7609: checking for $ac_word" >&5 echo "configure:7608: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7644,7 +7643,7 @@ fi ...@@ -7644,7 +7643,7 @@ fi
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7648: checking for $ac_word" >&5 echo "configure:7647: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7694,17 +7693,17 @@ fi ...@@ -7694,17 +7693,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7698: checking for $ac_hdr" >&5 echo "configure:7697: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7703 "configure" #line 7702 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7762,17 +7761,17 @@ if test x$enable_x11 != xno && ...@@ -7762,17 +7761,17 @@ if test x$enable_x11 != xno &&
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7766: checking for $ac_hdr" >&5 echo "configure:7765: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7771 "configure" #line 7770 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7825,17 +7824,17 @@ if test x$enable_xvideo != xno && ...@@ -7825,17 +7824,17 @@ if test x$enable_xvideo != xno &&
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7829: checking for $ac_hdr" >&5 echo "configure:7828: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7834 "configure" #line 7833 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7859,7 +7858,7 @@ EOF ...@@ -7859,7 +7858,7 @@ EOF
saved_CFLAGS=$CFLAGS saved_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext" CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6 echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
echo "configure:7863: checking for XvSetPortAttribute in -lXv_pic" >&5 echo "configure:7862: checking for XvSetPortAttribute in -lXv_pic" >&5
ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'` ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -7867,7 +7866,7 @@ else ...@@ -7867,7 +7866,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lXv_pic $LIBS" LIBS="-lXv_pic $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7871 "configure" #line 7870 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -7878,7 +7877,7 @@ int main() { ...@@ -7878,7 +7877,7 @@ int main() {
XvSetPortAttribute() XvSetPortAttribute()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -7925,17 +7924,17 @@ if test x$enable_lirc = xyes ...@@ -7925,17 +7924,17 @@ if test x$enable_lirc = xyes
then then
ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
echo "configure:7929: checking for lirc/lirc_client.h" >&5 echo "configure:7928: checking for lirc/lirc_client.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7934 "configure" #line 7933 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <lirc/lirc_client.h> #include <lirc/lirc_client.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7952,7 +7951,7 @@ fi ...@@ -7952,7 +7951,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6 echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
echo "configure:7956: checking for lirc_init in -llirc_client" >&5 echo "configure:7955: checking for lirc_init in -llirc_client" >&5
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'` ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -7960,7 +7959,7 @@ else ...@@ -7960,7 +7959,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-llirc_client $LIBS" LIBS="-llirc_client $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7964 "configure" #line 7963 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -7971,7 +7970,7 @@ int main() { ...@@ -7971,7 +7970,7 @@ int main() {
lirc_init() lirc_init()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -8011,17 +8010,17 @@ if test "${enable_alsa+set}" = set; then ...@@ -8011,17 +8010,17 @@ if test "${enable_alsa+set}" = set; then
then then
ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
echo "configure:8015: checking for alsa/asoundlib.h" >&5 echo "configure:8014: checking for alsa/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8020 "configure" #line 8019 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:8024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -8038,7 +8037,7 @@ fi ...@@ -8038,7 +8037,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6 echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:8042: checking for main in -lasound" >&5 echo "configure:8041: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -8046,14 +8045,14 @@ else ...@@ -8046,14 +8045,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS" LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8050 "configure" #line 8049 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:8057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
......
...@@ -911,19 +911,18 @@ AC_ARG_ENABLE(vcd, ...@@ -911,19 +911,18 @@ AC_ARG_ENABLE(vcd,
if test x$enable_vcd != xno if test x$enable_vcd != xno
then then
AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[ AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
#BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
]) ])
fi fi
if test x$enable_vcd != xno -a "${SYS}" = "bsdi" if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
then then
#BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
true #delete me
fi fi
if test x$enable_vcd != xno -a "${SYS}" = "darwin" if test x$enable_vcd != xno -a "${SYS}" = "darwin"
then then
#BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
LIB_VCD="${LIB_VCD} -framework IOKit" LIB_VCD="${LIB_VCD} -framework IOKit"
fi fi
......
...@@ -62,63 +62,51 @@ ...@@ -62,63 +62,51 @@
#include "cdrom_tools.h" #include "cdrom_tools.h"
/* how many blocks VCDRead will read in each loop */ /* how many blocks VCDRead will read in each loop */
#define VCD_BLOCKS_ONCE 4 #define VCD_BLOCKS_ONCE 20
#define VCD_DATA_ONCE (2 * VCD_BLOCKS_ONCE) #define VCD_DATA_ONCE (VCD_BLOCKS_ONCE * VCD_DATA_SIZE)
#define BUFFER_SIZE VCD_DATA_SIZE
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
/* called from outside */ /* called from outside */
static int VCDProbe ( struct input_thread_s * ); static int VCDInit ( struct input_thread_s * );
static void VCDInit ( struct input_thread_s * ); static void VCDEnd ( struct input_thread_s * );
static int VCDRead ( struct input_thread_s *, data_packet_t ** ); static int PSDemux ( struct input_thread_s * );
static int VCDSetArea ( struct input_thread_s *, struct input_area_s * );
static int VCDSetProgram ( struct input_thread_s *, pgrm_descriptor_t * );
static void VCDOpen ( struct input_thread_s *);
static void VCDClose ( struct input_thread_s *);
static void VCDEnd ( struct input_thread_s *);
static void VCDSeek ( struct input_thread_s *, off_t );
static int VCDRewind ( struct input_thread_s * ); static int VCDRewind ( struct input_thread_s * );
/***************************************************************************** static int VCDOpen ( struct input_thread_s *);
* Declare a buffer manager static void VCDClose ( struct input_thread_s *);
*****************************************************************************/ static int VCDRead ( struct input_thread_s *, byte_t *, size_t );
#define FLAGS BUFFERS_NOFLAGS static void VCDSeek ( struct input_thread_s *, off_t );
#define NB_LIFO 2 static int VCDSetArea ( struct input_thread_s *, struct input_area_s * );
DECLARE_BUFFERS_EMBEDDED( FLAGS, NB_LIFO ); static int VCDSetProgram ( struct input_thread_s *, pgrm_descriptor_t * );
DECLARE_BUFFERS_INIT( FLAGS, NB_LIFO );
DECLARE_BUFFERS_END( FLAGS, NB_LIFO );
DECLARE_BUFFERS_NEWPACKET( FLAGS, NB_LIFO );
DECLARE_BUFFERS_DELETEPACKET( FLAGS, NB_LIFO, 1000 );
DECLARE_BUFFERS_NEWPES( FLAGS, NB_LIFO );
DECLARE_BUFFERS_DELETEPES( FLAGS, NB_LIFO, 1000 );
static ssize_t PSRead ( struct input_thread_s *, data_packet_t ** );
/***************************************************************************** /*****************************************************************************
* Functions exported as capabilities. They are declared as static so that * Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much. * we don't pollute the namespace too much.
*****************************************************************************/ *****************************************************************************/
void _M( input_getfunctions )( function_list_t * p_function_list ) void _M( access_getfunctions )( function_list_t * p_function_list )
{
#define access p_function_list->functions.access
access.pf_open = VCDOpen;
access.pf_close = VCDClose;
access.pf_read = VCDRead;
access.pf_set_area = VCDSetArea;
access.pf_set_program = VCDSetProgram;
access.pf_seek = VCDSeek;
#undef access
}
void _M( demux_getfunctions )( function_list_t * p_function_list )
{ {
#define input p_function_list->functions.input #define demux p_function_list->functions.demux
input.pf_probe = VCDProbe; demux.pf_init = VCDInit;
input.pf_init = VCDInit; demux.pf_end = VCDEnd;
input.pf_open = VCDOpen; demux.pf_demux = PSDemux;
input.pf_close = VCDClose; demux.pf_rewind = VCDRewind;
input.pf_end = VCDEnd; #undef demux
input.pf_init_bit_stream = InitBitstream;
input.pf_read = VCDRead;
input.pf_set_area = VCDSetArea;
input.pf_set_program = VCDSetProgram;
input.pf_demux = input_DemuxPS;
input.pf_new_packet = input_NewPacket;
input.pf_new_pes = input_NewPES;
input.pf_delete_packet = input_DeletePacket;
input.pf_delete_pes = input_DeletePES;
input.pf_rewind = VCDRewind;
input.pf_seek = VCDSeek;
#undef input
} }
/* /*
...@@ -126,123 +114,119 @@ void _M( input_getfunctions )( function_list_t * p_function_list ) ...@@ -126,123 +114,119 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
*/ */
/***************************************************************************** /*****************************************************************************
* VCDProbe: verifies that the stream is a PS stream * VCDOpen: open vcd
*****************************************************************************/ *****************************************************************************/
static int VCDProbe( input_thread_t * p_input ) static int VCDOpen( struct input_thread_s *p_input )
{ {
char * psz_name = p_input->p_source; char * psz_orig;
char * psz_parser;
char * psz_source;
char * psz_next;
thread_vcd_data_t * p_vcd;
int i;
input_area_t * p_area;
int i_title = 1;
int i_chapter = 1;
if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "vcd:", 4 ) ) p_vcd = malloc( sizeof(thread_vcd_data_t) );
if( p_vcd == NULL )
{ {
/* If the user specified "vcd:" then it's probably a VCD */ intf_ErrMsg( "vcd error: out of memory" );
return 0; p_input->b_error = 1;
return -1;
} }
return -1; p_input->i_mtu = VCD_DATA_ONCE;
} p_input->p_access_data = (void *)p_vcd;
/***************************************************************************** /* parse the options passed in command line : */
* VCDOpen: open vcd psz_orig = psz_parser = psz_source = strdup( p_input->psz_name );
*****************************************************************************/
static void VCDOpen( struct input_thread_s *p_input ) if( !psz_orig )
{
vlc_mutex_lock( &p_input->stream.stream_lock );
/* If we are here we can control the pace... */
p_input->stream.b_pace_control = 1;
p_input->stream.b_seekable = 1;
p_input->stream.p_selected_area->i_size = 0;
p_input->stream.p_selected_area->i_tell = 0;
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* XXX: put this shit in an access plugin */
if( strlen( p_input->p_source ) > 4
&& !strncasecmp( p_input->p_source, "vcd:", 4 ) )
{ {
p_input->i_handle return( -1 );
= open( p_input->p_source + 4, O_RDONLY | O_NONBLOCK );
} }
else
while( *psz_parser && *psz_parser != '@' )
{ {
p_input->i_handle psz_parser++;
= open( p_input->p_source, O_RDONLY | O_NONBLOCK );
} }
if( p_input->i_handle == -1 ) if( *psz_parser == '@' )
{ {
p_input->b_error = 1; /* Found options */
} *psz_parser = '\0';
} ++psz_parser;
/***************************************************************************** i_title = (int)strtol( psz_parser, &psz_next, 10 );
* VCDClose: close vcd if( *psz_next )
*****************************************************************************/ {
static void VCDClose( struct input_thread_s *p_input ) psz_parser = psz_next + 1;
{ i_chapter = (int)strtol( psz_parser, &psz_next, 10 );
close( p_input->i_handle ); }
}
/*****************************************************************************
* VCDInit: initializes VCD structures
*****************************************************************************/
static void VCDInit( input_thread_t * p_input )
{
thread_vcd_data_t * p_vcd;
int i_title;
int i_chapter;
int i;
input_area_t * p_area;
es_descriptor_t * p_es;
p_vcd = malloc( sizeof(thread_vcd_data_t) ); i_title = i_title ? i_title : 1;
i_chapter = i_chapter ? i_chapter : 1;
}
if( p_vcd == NULL ) if( !*psz_source )
{ {
intf_ErrMsg( "vcd error: out of memory" ); if( !p_input->psz_access )
p_input->b_error = 1; {
return; free( psz_orig );
return -1;
}
psz_source = config_GetPszVariable( INPUT_VCD_DEVICE_VAR );
} }
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->p_plugin_data = (void *)p_vcd; /* If we are here we can control the pace... */
p_input->stream.b_pace_control = 1;
p_input->stream.b_seekable = 1;
p_input->stream.p_selected_area->i_size = 0;
p_input->stream.p_selected_area->i_tell = 0;
if( (p_input->p_method_data = input_BuffersInit()) == NULL ) vlc_mutex_unlock( &p_input->stream.stream_lock );
p_vcd->i_handle = open( psz_source, O_RDONLY | O_NONBLOCK );
if( p_vcd->i_handle == -1 )
{ {
free( p_vcd ); intf_ErrMsg( "input: vcd: Could not open %s\n", psz_source );
p_input->b_error = 1; p_input->b_error = 1;
return; free (p_vcd);
return -1;
} }
p_vcd->i_handle = p_input->i_handle;
/* We read the Table Of Content information */ /* We read the Table Of Content information */
p_vcd->nb_tracks = ioctl_GetTrackCount( p_input->i_handle, p_vcd->nb_tracks = ioctl_GetTrackCount( p_vcd->i_handle,
p_input->p_source ); psz_source );
if( p_vcd->nb_tracks < 0 ) if( p_vcd->nb_tracks < 0 )
{ {
input_BuffersEnd( p_input->p_method_data ); intf_ErrMsg( "input: vcd: was unable to count tracks" );
free( p_vcd ); free( p_vcd );
p_input->b_error = 1; p_input->b_error = 1;
return; return -1;
} }
else if( p_vcd->nb_tracks <= 1 ) else if( p_vcd->nb_tracks <= 1 )
{ {
intf_ErrMsg( "input error: no movie tracks found" ); intf_ErrMsg( "input: vcd: no movie tracks found" );
input_BuffersEnd( p_input->p_method_data );
free( p_vcd ); free( p_vcd );
p_input->b_error = 1; p_input->b_error = 1;
return; return -1;
} }
p_vcd->p_sectors = ioctl_GetSectors( p_input->i_handle, p_vcd->p_sectors = ioctl_GetSectors( p_vcd->i_handle,
p_input->p_source ); psz_source );
if ( p_vcd->p_sectors == NULL ) if ( p_vcd->p_sectors == NULL )
{ {
input_BuffersEnd( p_input->p_method_data ); input_BuffersEnd( p_input->p_method_data );
free( p_vcd ); free( p_vcd );
p_input->b_error = 1; p_input->b_error = 1;
return; return -1;
} }
/* Set stream and area data */ /* Set stream and area data */
...@@ -271,82 +255,97 @@ static void VCDInit( input_thread_t * p_input ) ...@@ -271,82 +255,97 @@ static void VCDInit( input_thread_t * p_input )
area[i]->i_part_nb = 0; // will be the entry points area[i]->i_part_nb = 0; // will be the entry points
area[i]->i_part = 1; area[i]->i_part = 1;
/* Number of angles */
area[i]->i_angle_nb = 1; // no angle support in VCDs
area[i]->i_angle = 1;
area[i]->i_plugin_data = p_vcd->p_sectors[i]; area[i]->i_plugin_data = p_vcd->p_sectors[i];
} }
#undef area #undef area
/* Get requested title - if none try the first title */
i_title = config_GetIntVariable( INPUT_TITLE_VAR );
if( i_title <= 0 )
{
i_title = 1;
}
// p_vcd->i_track = i_title-1;
/* Get requested chapter - if none defaults to first one */
i_chapter = config_GetIntVariable( INPUT_CHAPTER_VAR );
if( i_chapter <= 0 )
{
i_chapter = 1;
}
p_input->stream.pp_areas[i_title]->i_part = i_chapter;
p_area = p_input->stream.pp_areas[i_title]; p_area = p_input->stream.pp_areas[i_title];
VCDSetArea( p_input, p_area ); VCDSetArea( p_input, p_area );
/* Set program information. */ vlc_mutex_unlock( &p_input->stream.stream_lock );
input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
/* No PSM to read in disc mode, we already have all the information */
p_input->stream.p_selected_program->b_is_ok = 1;
p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xe0, 0 );
p_es->i_stream_id = 0xe0;
p_es->i_type = MPEG1_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
if( p_main->b_video )
{
input_SelectES( p_input, p_es );
}
p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xc0, 0 ); return 0;
p_es->i_stream_id = 0xc0; }
p_es->i_type = MPEG1_AUDIO_ES;
p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES;
if( p_main->b_audio )
{
input_SelectES( p_input, p_es );
}
vlc_mutex_unlock( &p_input->stream.stream_lock ); /*****************************************************************************
* VCDClose: closes vcd
*****************************************************************************/
static void VCDClose( struct input_thread_s *p_input )
{
thread_vcd_data_t * p_vcd
= (thread_vcd_data_t *)p_input->p_access_data;
close( p_vcd->i_handle );
free( p_vcd );
} }
/***************************************************************************** /*****************************************************************************
* VCDEnd: frees unused data * VCDRead: reads from the VCD into PES packets.
*****************************************************************************
* Returns -1 in case of error, 0 in case of EOF, otherwise the number of
* bytes.
*****************************************************************************/ *****************************************************************************/
static void VCDEnd( input_thread_t * p_input ) static int VCDRead( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len )
{ {
thread_vcd_data_t * p_vcd; thread_vcd_data_t * p_vcd;
int i_blocks;
int i_index;
int i_read;
byte_t p_last_sector[ VCD_DATA_SIZE ];
input_BuffersEnd( p_input->p_method_data ); p_vcd = (thread_vcd_data_t *)p_input->p_access_data;
p_vcd = (thread_vcd_data_t*)p_input->p_plugin_data; i_read = 0;
free( p_vcd ); /* Compute the number of blocks we have to read */
i_blocks = i_len / VCD_DATA_SIZE;
for ( i_index = 0 ; i_index < i_blocks ; i_index++ )
{
if ( ioctl_ReadSector( p_vcd->i_handle, p_vcd->i_sector,
p_buffer + i_index * VCD_DATA_SIZE ) < 0 )
{
intf_ErrMsg( "input: vcd: could not read sector %d\n",
p_vcd->i_sector );
return -1;
}
p_vcd->i_sector ++;
if ( p_vcd->i_sector == p_vcd->p_sectors[p_vcd->i_track + 1] )
{
/* FIXME we should go to next track */
return 0;
}
i_read += VCD_DATA_SIZE;
}
if ( i_len % VCD_DATA_SIZE ) /* this should not happen */
{
if ( ioctl_ReadSector( p_vcd->i_handle, p_vcd->i_sector,
p_last_sector ) < 0 )
{
intf_ErrMsg( "input: vcd: could not read sector %d\n",
p_vcd->i_sector );
return -1;
}
FAST_MEMCPY( p_buffer + i_blocks * VCD_DATA_SIZE,
p_last_sector, i_len % VCD_DATA_SIZE );
i_read += i_len % VCD_DATA_SIZE;
}
p_input->stream.p_selected_area->i_tell =
(off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE
- p_input->stream.p_selected_area->i_start;
return i_read;
} }
/***************************************************************************** /*****************************************************************************
* VCDSetProgram: Does nothing since a VCD is mono_program * VCDSetProgram: Does nothing since a VCD is mono_program
*****************************************************************************/ *****************************************************************************/
...@@ -365,7 +364,7 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -365,7 +364,7 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area )
{ {
thread_vcd_data_t * p_vcd; thread_vcd_data_t * p_vcd;
p_vcd = (thread_vcd_data_t*)p_input->p_plugin_data; p_vcd = (thread_vcd_data_t*)p_input->p_access_data;
/* we can't use the interface slider until initilization is complete */ /* we can't use the interface slider until initilization is complete */
p_input->stream.b_seekable = 0; p_input->stream.b_seekable = 0;
...@@ -392,215 +391,226 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -392,215 +391,226 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area )
return 0; return 0;
} }
/***************************************************************************** /*****************************************************************************
* VCDRead: reads from the VCD into PES packets. * VCDRewind : reads a stream backward
*****************************************************************************
* Returns -1 in case of error, 0 in case of EOF, otherwise the number of
* packets.
*****************************************************************************/ *****************************************************************************/
static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data ) static int VCDRewind( input_thread_t * p_input )
{ {
thread_vcd_data_t * p_vcd; return( -1 );
data_packet_t * p_data; }
int i_packet_size;
int i_index;
int i_packet;
u32 i_header;
byte_t p_buffer[ VCD_DATA_SIZE ];
boolean_t b_eot = 0; /* end of track */
/* boolean_t b_eoc; No chapters yet */
p_vcd = (thread_vcd_data_t *)p_input->p_plugin_data; /****************************************************************************
* VCDSeek
****************************************************************************/
static void VCDSeek( input_thread_t * p_input, off_t i_off )
{
thread_vcd_data_t * p_vcd;
i_packet = 0; p_vcd = (thread_vcd_data_t *) p_input->p_access_data;
*pp_data = NULL;
while( i_packet < VCD_DATA_ONCE ) p_vcd->i_sector = p_vcd->p_sectors[p_vcd->i_track]
{ + i_off / (off_t)VCD_DATA_SIZE;
if( ioctl_ReadSector( p_vcd->i_handle, p_vcd->i_sector, p_buffer ) )
{
/* Read error, but assume we reached the end of the track */
b_eot = 1;
break;
}
p_vcd->i_sector++; p_input->stream.p_selected_area->i_tell =
(off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE
- p_input->stream.p_selected_area->i_start;
}
if( p_vcd->i_sector >= p_vcd->p_sectors[p_vcd->i_track + 1] ) /*
{ * Demux functions
b_eot = 1; */
break;
}
i_index = 0;
while( i_index < BUFFER_SIZE-6 && i_packet < VCD_DATA_ONCE ) /*****************************************************************************
{ * VCDInit: initializes VCD structures
i_header = U32_AT(p_buffer + i_index); *****************************************************************************/
static int VCDInit( input_thread_t * p_input )
{
es_descriptor_t * p_es;
/* Set program information. */
/* It is common for MPEG-1 streams to pad with zeros input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
* (although it is forbidden by the recommendation), so p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
* don't bother everybody in this case. */
while( !i_header && (++i_index < BUFFER_SIZE - 4) )
{
i_header = U32_AT(p_buffer + i_index);
}
if( !i_header ) /* No PSM to read in disc mode, we already have all the information */
{ p_input->stream.p_selected_program->b_is_ok = 1;
intf_WarnMsg( 12, "vcd warning: zero-padded packet" );
break;
}
/* Read the stream until we find a startcode. */ p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xe0, 0 );
while( (i_header & 0xFFFFFF00) != 0x100L p_es->i_stream_id = 0xe0;
&& (++i_index < BUFFER_SIZE - 4) ) p_es->i_type = MPEG1_VIDEO_ES;
{ p_es->i_cat = VIDEO_ES;
i_header = U32_AT(p_buffer + i_index);
}
if( (i_header & 0xFFFFFF00) != 0x100L ) if( p_main->b_video )
{ {
intf_WarnMsg( 3, "vcd warning: no packet at sector %d", input_SelectES( p_input, p_es );
p_vcd->i_sector - 1 ); }
break; /* go to the next sector */
}
switch( i_header ) p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xc0, 0 );
{ p_es->i_stream_id = 0xc0;
/* 0x1b9 == SYSTEM_END_CODE, it is only 4 bytes long. */ p_es->i_type = MPEG1_AUDIO_ES;
case 0x1b9: p_es->b_audio = 1;
i_packet_size = -2; p_es->i_cat = AUDIO_ES;
break;
/* Pack header */
case 0x1ba:
if( ( *( p_buffer + ( i_index + 4 ) ) & 0xC0) == 0x40 )
{
/* MPEG-2 */
i_packet_size = 8;
}
else if( (*(p_buffer + ( i_index + 4 ) ) & 0xF0) == 0x20 )
{
/* MPEG-1 */
i_packet_size = 6;
}
else
{
intf_ErrMsg( "vcd error: unable to determine "
"stream type" );
return( -1 );
}
break;
/* The packet is at least 6 bytes long. */
default:
/* That's the case for all packets, except pack header. */
i_packet_size = U16_AT((p_buffer + ( i_index + 4 )));
break;
}
if ( i_index + i_packet_size > BUFFER_SIZE ) if( p_main->b_audio )
{ {
intf_ErrMsg( "vcd error: packet too long (%i)", input_SelectES( p_input, p_es );
i_index + i_packet_size ); }
continue;
}
/* Fetch a packet of the appropriate size. */ vlc_mutex_unlock( &p_input->stream.stream_lock );
p_data = p_input->pf_new_packet( p_input->p_method_data,
i_packet_size + 6 ); return 0;
}
if( p_data == NULL ) /*****************************************************************************
{ * VCDEnd: frees unused data
intf_ErrMsg( "vcd error: out of memory" ); *****************************************************************************/
return( -1 ); static void VCDEnd( input_thread_t * p_input )
} {
thread_vcd_data_t * p_vcd;
if( U32_AT(p_buffer) != 0x1B9 ) input_BuffersEnd( p_input->p_method_data );
{
FAST_MEMCPY( p_data->p_demux_start, p_buffer + i_index,
6 + i_packet_size );
i_index += ( 6 + i_packet_size );
}
else
{
/* Copy the small header. */
memcpy( p_data->p_demux_start, p_buffer + i_index, 4 );
i_index += 4;
}
/* Give the packet to the other input stages. */ p_vcd = (thread_vcd_data_t*)p_input->p_access_data;
*pp_data = p_data;
pp_data = &p_data->p_next;
i_packet++; free( p_vcd );
} }
}
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.p_selected_area->i_tell = /*****************************************************************************
(off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE * The following functions are extracted from mpeg_ps, they should soon
- p_input->stream.p_selected_area->i_start; * be placed in mpeg_system.c so that plugins can use them.
*****************************************************************************/
/* no chapter for the moment*/ /*****************************************************************************
#if 0 * PSRead: reads one PS packet
if( b_eoc ) *****************************************************************************/
{ #define PEEK( SIZE ) \
/* We modify i_part only at end of chapter not to erase i_error = input_Peek( p_input, &p_peek, SIZE ); \
* some modification from the interface */ if( i_error == -1 ) \
p_input->stream.p_selected_area->i_part = p_vcd->i_chapter; { \
return( -1 ); \
} \
else if( i_error < SIZE ) \
{ \
/* EOF */ \
return( 0 ); \
} }
#endif
if( b_eot ) static __inline__ ssize_t PSRead( input_thread_t * p_input,
data_packet_t ** pp_data )
{
byte_t * p_peek;
size_t i_packet_size;
ssize_t i_error, i_read;
/* Read what we believe to be a packet header. */
PEEK( 4 );
if( *p_peek || *(p_peek + 1) || *(p_peek + 2) != 1 )
{ {
input_area_t *p_area; if( *p_peek || *(p_peek + 1) || *(p_peek + 2) )
{
/* It is common for MPEG-1 streams to pad with zeros
* (although it is forbidden by the recommendation), so
* don't bother everybody in this case. */
intf_WarnMsg( 3, "input warning: garbage at input (0x%x%x%x%x)",
*p_peek, *(p_peek + 1), *(p_peek + 2), *(p_peek + 3) );
}
/* EOF ? */ /* This is not the startcode of a packet. Read the stream
if( p_vcd->i_track >= p_vcd->nb_tracks - 1 ) * until we find one. */
while( *p_peek || *(p_peek + 1) || *(p_peek + 2) != 1 )
{ {
vlc_mutex_unlock( &p_input->stream.stream_lock ); p_input->p_current_data++;
return 0; PEEK( 4 );
} }
/* Packet found. */
}
intf_WarnMsg( 4, "vcd info: new title" ); /* 0x1B9 == SYSTEM_END_CODE, it is only 4 bytes long. */
if( p_peek[3] != 0xB9 )
{
/* The packet is at least 6 bytes long. */
PEEK( 6 );
p_area = p_input->stream.pp_areas[ if( p_peek[3] != 0xBA )
p_input->stream.p_selected_area->i_id + 1 ]; {
/* That's the case for all packets, except pack header. */
i_packet_size = (p_peek[4] << 8) | p_peek[5];
}
else
{
/* Pack header. */
if( (p_peek[4] & 0xC0) == 0x40 )
{
/* MPEG-2 */
i_packet_size = 8;
}
else if( (p_peek[4] & 0xF0) == 0x20 )
{
/* MPEG-1 */
i_packet_size = 6;
}
else
{
intf_ErrMsg( "Unable to determine stream type" );
return( -1 );
}
}
}
else
{
/* System End Code */
i_packet_size = -2;
}
p_area->i_part = 1; /* Fetch a packet of the appropriate size. */
VCDSetArea( p_input, p_area ); i_read = input_SplitBuffer( p_input, pp_data, i_packet_size + 6 );
if( i_read <= 0 )
{
return( i_read );
} }
vlc_mutex_unlock( &p_input->stream.stream_lock ); /* In MPEG-2 pack headers we still have to read stuffing bytes. */
if( ((*pp_data)->p_demux_start[3] == 0xBA) && (i_packet_size == 8) )
{
size_t i_stuffing = ((*pp_data)->p_demux_start[13] & 0x7);
/* Force refill of the input buffer - though we don't care
* about p_peek. Please note that this is unoptimized. */
PEEK( i_stuffing );
p_input->p_current_data += i_stuffing;
}
return( i_packet + 1 ); return( 1 );
} }
/***************************************************************************** /*****************************************************************************
* VCDRewind : reads a stream backward * PSDemux: reads and demuxes data packets
*****************************************************************************
* Returns -1 in case of error, 0 in case of EOF, otherwise the number of
* packets.
*****************************************************************************/ *****************************************************************************/
static int VCDRewind( input_thread_t * p_input ) static int PSDemux( input_thread_t * p_input )
{ {
return( -1 ); int i;
}
/**************************************************************************** for( i = 0; i < VCD_BLOCKS_ONCE; i++ )
* VCDSeek {
****************************************************************************/ data_packet_t * p_data;
static void VCDSeek( input_thread_t * p_input, off_t i_off ) ssize_t i_result;
{
thread_vcd_data_t * p_vcd;
p_vcd = (thread_vcd_data_t *) p_input->p_plugin_data; i_result = PSRead( p_input, &p_data );
p_vcd->i_sector = p_vcd->p_sectors[p_vcd->i_track] if( i_result <= 0 )
+ i_off / (off_t)VCD_DATA_SIZE; {
return( i_result );
}
p_input->stream.p_selected_area->i_tell = input_DemuxPS( p_input, p_data );
(off_t)p_vcd->i_sector * (off_t)VCD_DATA_SIZE }
- p_input->stream.p_selected_area->i_start;
return( i );
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vcd.c : VCD input module for vlc * vcd.c : VCD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: vcd.c,v 1.5 2002/02/15 13:32:53 sam Exp $ * $Id: vcd.c,v 1.6 2002/03/05 23:29:36 jobi Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
/***************************************************************************** /*****************************************************************************
* Capabilities defined in the other files. * Capabilities defined in the other files.
*****************************************************************************/ *****************************************************************************/
void _M( input_getfunctions )( function_list_t * p_function_list ); void _M( access_getfunctions )( function_list_t * p_function_list );
void _M( demux_getfunctions )( function_list_t * p_function_list );
/***************************************************************************** /*****************************************************************************
* Build configuration tree. * Build configuration tree.
...@@ -42,12 +43,14 @@ MODULE_CONFIG_STOP ...@@ -42,12 +43,14 @@ MODULE_CONFIG_STOP
MODULE_INIT_START MODULE_INIT_START
SET_DESCRIPTION( "VCD input module" ) SET_DESCRIPTION( "VCD input module" )
ADD_CAPABILITY( INPUT, 180 ) ADD_CAPABILITY( DEMUX, 205 )
ADD_CAPABILITY( ACCESS, 105 )
ADD_SHORTCUT( "vcd" ) ADD_SHORTCUT( "vcd" )
MODULE_INIT_STOP MODULE_INIT_STOP
MODULE_ACTIVATE_START MODULE_ACTIVATE_START
_M( input_getfunctions )( &p_module->p_functions->input ); _M( access_getfunctions )( &p_module->p_functions->access );
_M( demux_getfunctions )( &p_module->p_functions->demux );
MODULE_ACTIVATE_STOP MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START MODULE_DEACTIVATE_START
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment