Commit 1c13a987 authored by Christophe Massiot's avatar Christophe Massiot

Big round of fixes in the aout3.

* Audio and video should now _always_ be perfectly in sync.
* Changes in a52.c (end_date management) must be ported to other codecs,
  otherwise mixer errors will appear.
* Audio output plug-in can now tell whether they can handle a little
  clock drift (for instance, inserting zeroes after a pause).
parent 692795dc
......@@ -5629,6 +5629,7 @@ PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/
PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/float32tos8 audio_filter/converter/float32tou16 audio_filter/converter/float32tou8 audio_filter/converter/a52tospdif audio_filter/converter/fixed32tofloat32 audio_filter/converter/fixed32tos16 audio_filter/converter/s16tofloat32"
PLUGINS="${PLUGINS} audio_filter/resampler/trivial"
PLUGINS="${PLUGINS} audio_filter/channel_mixer/trivial"
PLUGINS="${PLUGINS} audio_mixer/trivial audio_mixer/spdif"
PLUGINS="${PLUGINS} audio_output/file"
#PLUGINS="${PLUGINS} visualization/scope/scope"
......@@ -5648,20 +5649,20 @@ then
fi
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
echo "configure:5652: checking if \$CC groks MMX inline assembly" >&5
echo "configure:5653: checking if \$CC groks MMX inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
#line 5658 "configure"
#line 5659 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mmx_inline=yes
else
......@@ -5679,20 +5680,20 @@ if test "x${ac_cv_mmx_inline}" != "xno"; then
fi
echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
echo "configure:5683: checking if \$CC groks MMX EXT inline assembly" >&5
echo "configure:5684: checking if \$CC groks MMX EXT inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
#line 5689 "configure"
#line 5690 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mmxext_inline=yes
else
......@@ -5710,20 +5711,20 @@ if test "x${ac_cv_mmxext_inline}" != "xno"; then
fi
echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
echo "configure:5714: checking if \$CC groks 3D Now! inline assembly" >&5
echo "configure:5715: checking if \$CC groks 3D Now! inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
#line 5720 "configure"
#line 5721 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_3dnow_inline=yes
else
......@@ -5745,20 +5746,20 @@ EOF
fi
echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
echo "configure:5749: checking if \$CC groks SSE inline assembly" >&5
echo "configure:5750: checking if \$CC groks SSE inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
#line 5755 "configure"
#line 5756 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
; return 0; }
EOF
if { (eval echo configure:5762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sse_inline=yes
else
......@@ -5783,20 +5784,20 @@ fi
# we should be able to remove this test with future versions of mingw32
if test "x${SYS}" != "xmingw32"; then
echo $ac_n "checking if \$CC groks AltiVec inline assembly""... $ac_c" 1>&6
echo "configure:5787: checking if \$CC groks AltiVec inline assembly" >&5
echo "configure:5788: checking if \$CC groks AltiVec inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
#line 5793 "configure"
#line 5794 "configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
if { (eval echo configure:5800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_altivec_inline=yes
else
......@@ -5805,14 +5806,14 @@ else
rm -rf conftest*
CFLAGS="${save_CFLAGS} -Wa,-m7400"
cat > conftest.$ac_ext <<EOF
#line 5809 "configure"
#line 5810 "configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
if { (eval echo configure:5816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_altivec_inline="-Wa,-m7400"
else
......@@ -5843,21 +5844,21 @@ EOF
fi
echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6
echo "configure:5847: checking if \$CC groks AltiVec C extensions" >&5
echo "configure:5848: checking if \$CC groks AltiVec C extensions" >&5
if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -faltivec"
# Darwin test
cat > conftest.$ac_ext <<EOF
#line 5854 "configure"
#line 5855 "configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
if { (eval echo configure:5861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_altivec=-faltivec
else
......@@ -5868,14 +5869,14 @@ else
# Linux/PPC test
CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
cat > conftest.$ac_ext <<EOF
#line 5872 "configure"
#line 5873 "configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_altivec="-fvec"
else
......@@ -5905,20 +5906,20 @@ EOF
fi
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
echo "configure:5909: checking if linker needs -framework vecLib" >&5
echo "configure:5910: checking if linker needs -framework vecLib" >&5
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
cat > conftest.$ac_ext <<EOF
#line 5915 "configure"
#line 5916 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_ld_altivec=yes
else
......@@ -6050,17 +6051,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6054: checking for $ac_hdr" >&5
echo "configure:6055: 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 6059 "configure"
#line 6060 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6065: \"$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*
......@@ -6091,7 +6092,7 @@ done
else
echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
echo "configure:6095: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
echo "configure:6096: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
if test "x${real_dvdcss_tree}" = "x"
then
......@@ -6117,7 +6118,7 @@ echo "configure:6095: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
;;
*)
echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
echo "configure:6121: checking for dvdcss headers in ${with_dvdcss}" >&5
echo "configure:6122: checking for dvdcss headers in ${with_dvdcss}" >&5
if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
then
echo "$ac_t""yes" 1>&6
......@@ -6159,17 +6160,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6163: checking for $ac_hdr" >&5
echo "configure:6164: 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 6168 "configure"
#line 6169 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6174: \"$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*
......@@ -6191,14 +6192,14 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
EOF
cat > conftest.$ac_ext <<EOF
#line 6195 "configure"
#line 6196 "configure"
#include "confdefs.h"
#include <dvdread/dvd_reader.h>
int main() {
int foo() { return DVD_VIDEO_LB_LEN; }
; return 0; }
EOF
if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
PLUGINS="${PLUGINS} access/dvdread/dvdread"
......@@ -6263,17 +6264,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6267: checking for $ac_hdr" >&5
echo "configure:6268: 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 6272 "configure"
#line 6273 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6278: \"$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*
......@@ -6345,17 +6346,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6349: checking for $ac_hdr" >&5
echo "configure:6350: 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 6354 "configure"
#line 6355 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6360: \"$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*
......@@ -6384,7 +6385,7 @@ done
else
echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
echo "configure:6388: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
echo "configure:6389: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
if test "x${real_dvbpsi_tree}" = "x"
then
......@@ -6407,7 +6408,7 @@ echo "configure:6388: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
;;
*)
echo $ac_n "checking for dvbpsi headers in ${with_dvbpsi}""... $ac_c" 1>&6
echo "configure:6411: checking for dvbpsi headers in ${with_dvbpsi}" >&5
echo "configure:6412: checking for dvbpsi headers in ${with_dvbpsi}" >&5
if test "x${with_dvbpsi}" = "x"
then
test_LDFLAGS=""
......@@ -6419,17 +6420,17 @@ echo "configure:6411: checking for dvbpsi headers in ${with_dvbpsi}" >&5
CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
echo "configure:6423: checking for dvbpsi/dr.h" >&5
echo "configure:6424: checking for dvbpsi/dr.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 6428 "configure"
#line 6429 "configure"
#include "confdefs.h"
#include <dvbpsi/dr.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6434: \"$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*
......@@ -6477,17 +6478,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6481: checking for $ac_hdr" >&5
echo "configure:6482: 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 6486 "configure"
#line 6487 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6492: \"$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*
......@@ -6527,7 +6528,7 @@ fi
if test "x${enable_vcd}" != "xno"
then
cat > conftest.$ac_ext <<EOF
#line 6531 "configure"
#line 6532 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -6542,7 +6543,7 @@ rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 6546 "configure"
#line 6547 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
......@@ -6586,12 +6587,12 @@ if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
then
have_ipv6=0
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
echo "configure:6590: checking for inet_pton" >&5
echo "configure:6591: checking for inet_pton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6595 "configure"
#line 6596 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_pton(); below. */
......@@ -6614,7 +6615,7 @@ inet_pton();
; return 0; }
EOF
if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_pton=yes"
else
......@@ -6633,7 +6634,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
echo "configure:6637: checking for inet_pton in -lresolv" >&5
echo "configure:6638: checking for inet_pton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_pton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -6641,7 +6642,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6645 "configure"
#line 6646 "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
......@@ -6652,7 +6653,7 @@ int main() {
inet_pton()
; return 0; }
EOF
if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6657: \"$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
......@@ -6677,9 +6678,9 @@ fi
fi
echo $ac_n "checking for sockaddr_in6 in netinet/in.h""... $ac_c" 1>&6
echo "configure:6681: checking for sockaddr_in6 in netinet/in.h" >&5
echo "configure:6682: checking for sockaddr_in6 in netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
#line 6683 "configure"
#line 6684 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
......@@ -6700,9 +6701,9 @@ fi
if test "x${SYS}" = "xmingw32"
then
echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
echo "configure:6704: checking for getaddrinfo in ws2tcpip.h" >&5
echo "configure:6705: checking for getaddrinfo in ws2tcpip.h" >&5
cat > conftest.$ac_ext <<EOF
#line 6706 "configure"
#line 6707 "configure"
#include "confdefs.h"
#include <ws2tcpip.h>
EOF
......@@ -6784,7 +6785,7 @@ fi
{ echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
fi
echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
echo "configure:6788: checking for mad.h in ${real_mad_tree}/libmad" >&5
echo "configure:6789: checking for mad.h in ${real_mad_tree}/libmad" >&5
if test -f ${real_mad_tree}/libmad/mad.h
then
echo "$ac_t""yes" 1>&6
......@@ -6792,7 +6793,7 @@ echo "configure:6788: checking for mad.h in ${real_mad_tree}/libmad" >&5
mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
echo "configure:6796: checking for mad_bit_init in -lmad" >&5
echo "configure:6797: checking for mad_bit_init in -lmad" >&5
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -6800,7 +6801,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6804 "configure"
#line 6805 "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
......@@ -6811,7 +6812,7 @@ int main() {
mad_bit_init()
; return 0; }
EOF
if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6816: \"$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
......@@ -6848,17 +6849,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6852: checking for $ac_hdr" >&5
echo "configure:6853: 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 6857 "configure"
#line 6858 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6863: \"$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*
......@@ -6886,7 +6887,7 @@ fi
done
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
echo "configure:6890: checking for mad_bit_init in -lmad" >&5
echo "configure:6891: checking for mad_bit_init in -lmad" >&5
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -6894,7 +6895,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6898 "configure"
#line 6899 "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
......@@ -6905,7 +6906,7 @@ int main() {
mad_bit_init()
; return 0; }
EOF
if { (eval echo configure:6909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6910: \"$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
......@@ -6937,17 +6938,17 @@ for ac_hdr in id3tag.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6941: checking for $ac_hdr" >&5
echo "configure:6942: 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 6946 "configure"
#line 6947 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6952: \"$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*
......@@ -7013,7 +7014,7 @@ fi
if test "x${with_ffmpeg_tree}" != "x"
then
echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
echo "configure:7017: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
echo "configure:7018: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test "x${real_ffmpeg_tree}" = x
then
......@@ -7034,7 +7035,7 @@ echo "configure:7017: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS}"
echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
echo "configure:7038: checking for avcodec_init in -lavcodec" >&5
echo "configure:7039: checking for avcodec_init in -lavcodec" >&5
ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7042,7 +7043,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lavcodec $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7046 "configure"
#line 7047 "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
......@@ -7053,7 +7054,7 @@ int main() {
avcodec_init()
; return 0; }
EOF
if { (eval echo configure:7057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7058: \"$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
......@@ -7111,7 +7112,7 @@ fi
if test "x${with_faad_tree}" != "x"
then
echo $ac_n "checking for libfaad.a in ${with_faad_tree}""... $ac_c" 1>&6
echo "configure:7115: checking for libfaad.a in ${with_faad_tree}" >&5
echo "configure:7116: checking for libfaad.a in ${with_faad_tree}" >&5
real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
if test "x${real_faad_tree}" = x
then
......@@ -7135,17 +7136,17 @@ echo "configure:7115: checking for libfaad.a in ${with_faad_tree}" >&5
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7139: checking for $ac_hdr" >&5
echo "configure:7140: 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 7144 "configure"
#line 7145 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7150: \"$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*
......@@ -7173,7 +7174,7 @@ fi
done
echo $ac_n "checking for faacDecOpen in -lfaad""... $ac_c" 1>&6
echo "configure:7177: checking for faacDecOpen in -lfaad" >&5
echo "configure:7178: checking for faacDecOpen in -lfaad" >&5
ac_lib_var=`echo faad'_'faacDecOpen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7181,7 +7182,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lfaad $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7185 "configure"
#line 7186 "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
......@@ -7192,7 +7193,7 @@ int main() {
faacDecOpen()
; return 0; }
EOF
if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7197: \"$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
......@@ -7236,17 +7237,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7240: checking for $ac_hdr" >&5
echo "configure:7241: 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 7245 "configure"
#line 7246 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7251: \"$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*
......@@ -7303,7 +7304,7 @@ fi
{ echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
fi
echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
echo "configure:7307: checking for a52.h in ${real_a52_tree}/include" >&5
echo "configure:7308: checking for a52.h in ${real_a52_tree}/include" >&5
if test -f ${real_a52_tree}/include/a52.h
then
echo "$ac_t""yes" 1>&6
......@@ -7311,7 +7312,7 @@ echo "configure:7307: checking for a52.h in ${real_a52_tree}/include" >&5
a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
echo "configure:7315: checking for a52_free in -la52" >&5
echo "configure:7316: checking for a52_free in -la52" >&5
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7319,7 +7320,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-la52 -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7323 "configure"
#line 7324 "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
......@@ -7330,7 +7331,7 @@ int main() {
a52_free()
; return 0; }
EOF
if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7335: \"$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
......@@ -7384,17 +7385,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7388: checking for $ac_hdr" >&5
echo "configure:7389: 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 7393 "configure"
#line 7394 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7399: \"$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*
......@@ -7416,7 +7417,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
EOF
echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
echo "configure:7420: checking for a52_free in -la52" >&5
echo "configure:7421: checking for a52_free in -la52" >&5
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7424,7 +7425,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-la52 -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7428 "configure"
#line 7429 "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
......@@ -7435,7 +7436,7 @@ int main() {
a52_free()
; return 0; }
EOF
if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7440: \"$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
......@@ -7499,17 +7500,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7503: checking for $ac_hdr" >&5
echo "configure:7504: 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 7508 "configure"
#line 7509 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7514: \"$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*
......@@ -7552,17 +7553,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7556: checking for $ac_hdr" >&5
echo "configure:7557: 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 7561 "configure"
#line 7562 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7567: \"$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*
......@@ -7614,17 +7615,17 @@ if test "x${enable_x11}" != "xno" &&
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7618: checking for $ac_hdr" >&5
echo "configure:7619: 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 7623 "configure"
#line 7624 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7629: \"$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*
......@@ -7670,17 +7671,17 @@ if test "x${enable_xvideo}" != "xno" &&
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7674: checking for $ac_hdr" >&5
echo "configure:7675: 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 7679 "configure"
#line 7680 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7685: \"$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*
......@@ -7703,7 +7704,7 @@ EOF
CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
echo "configure:7707: checking for XvPutImage in -lXv_pic" >&5
echo "configure:7708: checking for XvPutImage in -lXv_pic" >&5
ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7711,7 +7712,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXv_pic $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7715 "configure"
#line 7716 "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
......@@ -7722,7 +7723,7 @@ int main() {
XvPutImage()
; return 0; }
EOF
if { (eval echo configure:7726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7727: \"$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
......@@ -7744,7 +7745,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for XvPutImage in -lXv""... $ac_c" 1>&6
echo "configure:7748: checking for XvPutImage in -lXv" >&5
echo "configure:7749: checking for XvPutImage in -lXv" >&5
ac_lib_var=`echo Xv'_'XvPutImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -7752,7 +7753,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7756 "configure"
#line 7757 "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
......@@ -7763,7 +7764,7 @@ int main() {
XvPutImage()
; return 0; }
EOF
if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7768: \"$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
......@@ -7823,7 +7824,7 @@ fi
# Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7827: checking for $ac_word" >&5
echo "configure:7828: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -7863,7 +7864,7 @@ fi
# Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7867: checking for $ac_word" >&5
echo "configure:7868: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -7904,7 +7905,7 @@ fi
# Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7908: checking for $ac_word" >&5
echo "configure:7909: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -7949,17 +7950,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7953: checking for $ac_hdr" >&5
echo "configure:7954: 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 7958 "configure"
#line 7959 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:7964: \"$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*
......@@ -8029,17 +8030,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8033: checking for $ac_hdr" >&5
echo "configure:8034: 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 8038 "configure"
#line 8039 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8044: \"$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*
......@@ -8068,7 +8069,7 @@ done
else
echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
echo "configure:8072: checking for directX headers in ${with_directx}" >&5
echo "configure:8073: checking for directX headers in ${with_directx}" >&5
if test -f ${with_directx}/ddraw.h
then
PLUGINS="${PLUGINS} video_output/directx/directx"
......@@ -8095,17 +8096,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8099: checking for $ac_hdr" >&5
echo "configure:8100: 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 8104 "configure"
#line 8105 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8110: \"$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*
......@@ -8212,17 +8213,17 @@ if test "x${enable_aa}" = "xyes"
then
ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
echo "configure:8216: checking for aalib.h" >&5
echo "configure:8217: checking for aalib.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 8221 "configure"
#line 8222 "configure"
#include "confdefs.h"
#include <aalib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8227: \"$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*
......@@ -8273,17 +8274,17 @@ then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8277: checking for $ac_hdr" >&5
echo "configure:8278: 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 8282 "configure"
#line 8283 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8288: \"$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*
......@@ -8306,7 +8307,7 @@ EOF
PLUGINS="${PLUGINS} audio_output/oss"
echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
echo "configure:8310: checking for main in -lossaudio" >&5
echo "configure:8311: checking for main in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'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
......@@ -8314,14 +8315,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lossaudio $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8318 "configure"
#line 8319 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:8326: \"$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
......@@ -8357,7 +8358,7 @@ if test "${enable_esd+set}" = set; then
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8361: checking for $ac_word" >&5
echo "configure:8362: 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
......@@ -8408,7 +8409,7 @@ if test "${enable_arts+set}" = set; then
# Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8412: checking for $ac_word" >&5
echo "configure:8413: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -8458,17 +8459,17 @@ if test "${enable_alsa+set}" = set; then
then
ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
echo "configure:8462: checking for alsa/asoundlib.h" >&5
echo "configure:8463: checking for alsa/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 8467 "configure"
#line 8468 "configure"
#include "confdefs.h"
#include <alsa/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8473: \"$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*
......@@ -8485,7 +8486,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:8489: checking for main in -lasound" >&5
echo "configure:8490: 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
......@@ -8493,14 +8494,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8497 "configure"
#line 8498 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:8504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:8505: \"$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
......@@ -8582,7 +8583,7 @@ fi
# Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8586: checking for $ac_word" >&5
echo "configure:8587: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -8621,7 +8622,7 @@ 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:8625: checking for $ac_word" >&5
echo "configure:8626: 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
......@@ -8670,17 +8671,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8674: checking for $ac_hdr" >&5
echo "configure:8675: 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 8679 "configure"
#line 8680 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8685: \"$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*
......@@ -8741,7 +8742,7 @@ fi
# Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8745: checking for $ac_word" >&5
echo "configure:8746: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -8780,7 +8781,7 @@ 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:8784: checking for $ac_word" >&5
echo "configure:8785: 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
......@@ -8829,17 +8830,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8833: checking for $ac_hdr" >&5
echo "configure:8834: 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 8838 "configure"
#line 8839 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8844: \"$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*
......@@ -8885,7 +8886,7 @@ if test "${enable_gnome+set}" = set; then
# Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8889: checking for $ac_word" >&5
echo "configure:8890: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -8929,17 +8930,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:8933: checking for $ac_hdr" >&5
echo "configure:8934: 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 8938 "configure"
#line 8939 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:8944: \"$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*
......@@ -9045,17 +9046,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9049: checking for $ac_hdr" >&5
echo "configure:9050: 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 9054 "configure"
#line 9055 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:9060: \"$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*
......@@ -9098,17 +9099,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9102: checking for $ac_hdr" >&5
echo "configure:9103: 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 9107 "configure"
#line 9108 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:9113: \"$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*
......@@ -9179,17 +9180,17 @@ if test "x${enable_xosd}" = "xyes"
then
ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
echo "configure:9183: checking for xosd.h" >&5
echo "configure:9184: checking for xosd.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 9188 "configure"
#line 9189 "configure"
#include "confdefs.h"
#include <xosd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:9194: \"$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*
......@@ -9212,14 +9213,14 @@ have_xosd="false"
fi
cat > conftest.$ac_ext <<EOF
#line 9216 "configure"
#line 9217 "configure"
#include "confdefs.h"
#include <xosd.h>
int main() {
void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }
; return 0; }
EOF
if { (eval echo configure:9223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:9224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
......@@ -9248,17 +9249,17 @@ if test "x${enable_lirc}" = "xyes"
then
ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
echo "configure:9252: checking for lirc/lirc_client.h" >&5
echo "configure:9253: checking for lirc/lirc_client.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 9257 "configure"
#line 9258 "configure"
#include "confdefs.h"
#include <lirc/lirc_client.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:9263: \"$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*
......@@ -9275,7 +9276,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
echo "configure:9279: checking for lirc_init in -llirc_client" >&5
echo "configure:9280: checking for lirc_init in -llirc_client" >&5
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -9283,7 +9284,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-llirc_client $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9287 "configure"
#line 9288 "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
......@@ -9294,7 +9295,7 @@ int main() {
lirc_init()
; return 0; }
EOF
if { (eval echo configure:9298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:9299: \"$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
......@@ -9349,7 +9350,7 @@ fi
;;
*)
echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
echo "configure:9353: checking whether the byte order is big-endian" >&5
echo "configure:9354: checking whether the byte order is big-endian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -9431,7 +9432,7 @@ if test "${enable_pth+set}" = set; then
enableval="$enable_pth"
if test "x${enable_pth}" = "xyes"; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:9435: checking for pth_init in -lpth" >&5
echo "configure:9436: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -9439,7 +9440,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9443 "configure"
#line 9444 "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
......@@ -9450,7 +9451,7 @@ int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:9454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:9455: \"$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
......@@ -9478,7 +9479,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 9482 "configure"
#line 9483 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
......@@ -9504,7 +9505,7 @@ if test "${enable_st+set}" = set; then
enableval="$enable_st"
if test "x${enable_st}" = "xyes"; then
echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
echo "configure:9508: checking for st_init in -lst" >&5
echo "configure:9509: checking for st_init in -lst" >&5
ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -9512,7 +9513,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lst $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9516 "configure"
#line 9517 "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
......@@ -9523,7 +9524,7 @@ int main() {
st_init()
; return 0; }
EOF
if { (eval echo configure:9527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:9528: \"$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
......@@ -9551,7 +9552,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 9555 "configure"
#line 9556 "configure"
#include "confdefs.h"
#include <st.h>
EOF
......@@ -9587,7 +9588,7 @@ then
# Extract the first word of "mozilla-config", so it can be a program name with args.
set dummy mozilla-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:9591: checking for $ac_word" >&5
echo "configure:9592: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MOZILLA_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -9625,7 +9626,7 @@ fi
if test "x${SYS}" != "xmingw32"; then
LDFLAGS="${save_LDFLAGS} -L${x_libraries}"
echo $ac_n "checking for XtStrings in -lXt""... $ac_c" 1>&6
echo "configure:9629: checking for XtStrings in -lXt" >&5
echo "configure:9630: checking for XtStrings in -lXt" >&5
ac_lib_var=`echo Xt'_'XtStrings | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -9633,7 +9634,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9637 "configure"
#line 9638 "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
......@@ -9644,7 +9645,7 @@ int main() {
XtStrings()
; return 0; }
EOF
if { (eval echo configure:9648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:9649: \"$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
......
......@@ -449,6 +449,7 @@ PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/
PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/float32tos8 audio_filter/converter/float32tou16 audio_filter/converter/float32tou8 audio_filter/converter/a52tospdif audio_filter/converter/fixed32tofloat32 audio_filter/converter/fixed32tos16 audio_filter/converter/s16tofloat32"
PLUGINS="${PLUGINS} audio_filter/resampler/trivial"
PLUGINS="${PLUGINS} audio_filter/channel_mixer/trivial"
PLUGINS="${PLUGINS} audio_mixer/trivial audio_mixer/spdif"
PLUGINS="${PLUGINS} audio_output/file"
#PLUGINS="${PLUGINS} visualization/scope/scope"
......
......@@ -2,7 +2,7 @@
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout_internal.h,v 1.7 2002/08/19 23:12:57 massiot Exp $
* $Id: aout_internal.h,v 1.8 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -82,95 +82,11 @@ typedef struct aout_alloc_t
*****************************************************************************/
typedef struct aout_fifo_t
{
struct aout_buffer_t * p_first;
struct aout_buffer_t ** pp_last;
mtime_t end_date;
aout_buffer_t * p_first;
aout_buffer_t ** pp_last;
audio_date_t end_date;
} aout_fifo_t;
static inline void aout_FifoInit( struct aout_instance_t * p_aout,
aout_fifo_t * p_fifo )
{
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
p_fifo->end_date = 0;
}
static inline void aout_FifoPush( struct aout_instance_t * p_aout,
aout_fifo_t * p_fifo,
aout_buffer_t * p_buffer )
{
*p_fifo->pp_last = p_buffer;
p_fifo->pp_last = &p_buffer->p_next;
*p_fifo->pp_last = NULL;
/* Enforce continuity of the stream. */
if ( p_fifo->end_date )
{
mtime_t duration = p_buffer->end_date - p_buffer->start_date;
p_buffer->start_date = p_fifo->end_date;
p_buffer->end_date = p_fifo->end_date =
p_buffer->start_date + duration;
}
else
{
p_fifo->end_date = p_buffer->end_date;
}
}
static inline mtime_t aout_FifoNextStart( struct aout_instance_t * p_aout,
aout_fifo_t * p_fifo )
{
return p_fifo->end_date;
}
/* Reinit the end_date (for instance after a pause). */
static inline void aout_FifoSet( struct aout_instance_t * p_aout,
aout_fifo_t * p_fifo, mtime_t date )
{
aout_buffer_t * p_buffer;
p_fifo->end_date = date;
/* Remove all buffers. */
p_buffer = p_fifo->p_first;
while ( p_buffer != NULL )
{
aout_buffer_t * p_next = p_buffer->p_next;
aout_BufferFree( p_buffer );
p_buffer = p_next;
}
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
}
/* This function supposes there is at least one buffer in p_fifo. */
static inline aout_buffer_t * aout_FifoPop( struct aout_instance_t * p_aout,
aout_fifo_t * p_fifo )
{
aout_buffer_t * p_buffer;
p_buffer = p_fifo->p_first;
p_fifo->p_first = p_buffer->p_next;
if ( p_fifo->p_first == NULL )
{
p_fifo->pp_last = &p_fifo->p_first;
}
return p_buffer;
}
static inline void aout_FifoDestroy( struct aout_instance_t * p_aout,
aout_fifo_t * p_fifo )
{
aout_buffer_t * p_buffer;
p_buffer = p_fifo->p_first;
while ( p_buffer != NULL )
{
aout_buffer_t * p_next = p_buffer->p_next;
aout_BufferFree( p_buffer );
p_buffer = p_next;
}
}
/*****************************************************************************
* aout_filter_t : audio output filter
*****************************************************************************/
......@@ -297,3 +213,12 @@ void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
void aout_OutputDelete( aout_instance_t * p_aout );
VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) );
void aout_FormatPrepare( audio_sample_format_t * p_format );
void aout_FifoInit( aout_instance_t *, aout_fifo_t *, u32 );
mtime_t aout_FifoNextStart( aout_instance_t *, aout_fifo_t * );
void aout_FifoPush( aout_instance_t *, aout_fifo_t *, aout_buffer_t * );
void aout_FifoSet( aout_instance_t *, aout_fifo_t *, mtime_t );
void aout_FifoMoveDates( aout_instance_t *, aout_fifo_t *, mtime_t );
aout_buffer_t * aout_FifoPop( aout_instance_t * p_aout, aout_fifo_t * p_fifo );
void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo );
......@@ -2,7 +2,7 @@
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.h,v 1.60 2002/08/19 21:31:11 massiot Exp $
* $Id: audio_output.h,v 1.61 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -126,6 +126,16 @@ struct aout_buffer_t
/* Size of a frame for S/PDIF output. */
#define AOUT_SPDIF_SIZE 6144
/*****************************************************************************
* audio_date_t : date incrementation without long-term rounding errors
*****************************************************************************/
struct audio_date_t
{
mtime_t date;
u32 i_divider;
u32 i_remainder;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
......@@ -136,7 +146,11 @@ VLC_EXPORT( void, aout_DeleteInstance, ( aout_instance_t * ) );
VLC_EXPORT( aout_buffer_t *, aout_BufferNew, ( aout_instance_t *, aout_input_t *, size_t ) );
VLC_EXPORT( void, aout_BufferDelete, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
VLC_EXPORT( void, aout_BufferPlay, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
VLC_EXPORT( void, aout_DateInit, ( audio_date_t *, u32 ) );
VLC_EXPORT( void, aout_DateSet, ( audio_date_t *, mtime_t ) );
VLC_EXPORT( void, aout_DateMove, ( audio_date_t *, mtime_t ) );
VLC_EXPORT( mtime_t, aout_DateGet, ( const audio_date_t * ) );
VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, u32 ) );
/* From input.c : */
#define aout_InputNew(a,b,c) __aout_InputNew(VLC_OBJECT(a),b,c)
......
......@@ -105,15 +105,15 @@
/* Duration between the time we receive the data packet, and the time we will
* mark it to be presented */
#define DEFAULT_PTS_DELAY (mtime_t)(.45*CLOCK_FREQ)
#define DEFAULT_PTS_DELAY (mtime_t)(.2*CLOCK_FREQ)
/* DVD and VCD devices */
#ifndef WIN32
# define DVD_DEVICE "/dev/dvd"
# define VCD_DEVICE "/dev/cdrom"
# define DVD_DEVICE "/dev/dvd"
# define VCD_DEVICE "/dev/cdrom"
#else
# define DVD_DEVICE "D"
# define VCD_DEVICE "D"
# define DVD_DEVICE "D"
# define VCD_DEVICE "D"
#endif
/*****************************************************************************
......@@ -139,9 +139,13 @@
* will cause the calling thread to sleep */
#define AOUT_MAX_PREPARE_TIME (mtime_t)(.5*CLOCK_FREQ)
/* Buffers which arrive after pts - AOUT_MIN_PREPARE_TIME will be trashed
* to avoid too heavy resampling */
#define AOUT_MIN_PREPARE_TIME (mtime_t)(.04*CLOCK_FREQ)
/* Max acceptable delay between the coded PTS and the actual presentation
* time, without resampling */
#define AOUT_PTS_TOLERANCE (mtime_t)(.03*CLOCK_FREQ)
#define AOUT_PTS_TOLERANCE (mtime_t)(.02*CLOCK_FREQ)
/*****************************************************************************
* Video configuration
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.21 2002/08/21 15:53:06 sam Exp $
* $Id: vlc_common.h,v 1.22 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -178,6 +178,7 @@ typedef struct aout_sys_t aout_sys_t;
typedef struct aout_input_t aout_input_t;
typedef struct aout_buffer_t aout_buffer_t;
typedef struct audio_sample_format_t audio_sample_format_t;
typedef struct audio_date_t audio_date_t;
/* Video */
typedef struct vout_thread_t vout_thread_t;
......
......@@ -53,6 +53,8 @@ struct module_symbols_t
module_config_t * (* config_FindConfig_inner) ( vlc_object_t *, const char *psz_name ) ;
module_t * (* __module_Need_inner) ( vlc_object_t *, const char *, const char * ) ;
msg_subscription_t* (* __msg_Subscribe_inner) ( vlc_object_t * ) ;
mtime_t (* aout_DateGet_inner) ( const audio_date_t * ) ;
mtime_t (* aout_DateIncrement_inner) ( audio_date_t *, u32 ) ;
mtime_t (* input_ClockGetTS_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ;
mtime_t (* mdate_inner) ( void ) ;
pes_packet_t * (* input_NewPES_inner) ( input_buffers_t * ) ;
......@@ -102,8 +104,10 @@ struct module_symbols_t
void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ;
void (* aout_BufferDelete_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
void (* aout_BufferPlay_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
void (* aout_DateInit_inner) ( audio_date_t *, u32 ) ;
void (* aout_DateMove_inner) ( audio_date_t *, mtime_t ) ;
void (* aout_DateSet_inner) ( audio_date_t *, mtime_t ) ;
void (* aout_DeleteInstance_inner) ( aout_instance_t * ) ;
void (* aout_FormatPrepare_inner) ( audio_sample_format_t * p_format ) ;
void (* aout_InputDelete_inner) ( aout_instance_t *, aout_input_t * ) ;
void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ;
void (* config_SetCallbacks_inner) ( module_config_t *, module_config_t * ) ;
......@@ -210,8 +214,12 @@ struct module_symbols_t
# define aout_BufferDelete p_symbols->aout_BufferDelete_inner
# define aout_BufferNew p_symbols->aout_BufferNew_inner
# define aout_BufferPlay p_symbols->aout_BufferPlay_inner
# define aout_DateGet p_symbols->aout_DateGet_inner
# define aout_DateIncrement p_symbols->aout_DateIncrement_inner
# define aout_DateInit p_symbols->aout_DateInit_inner
# define aout_DateMove p_symbols->aout_DateMove_inner
# define aout_DateSet p_symbols->aout_DateSet_inner
# define aout_DeleteInstance p_symbols->aout_DeleteInstance_inner
# define aout_FormatPrepare p_symbols->aout_FormatPrepare_inner
# define aout_InputDelete p_symbols->aout_InputDelete_inner
# define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
# define config_Duplicate p_symbols->config_Duplicate_inner
......
/*****************************************************************************
* trivial.c : trivial channel mixer plug-in (drops unwanted channels)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.1 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <errno.h>
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <vlc/vlc.h>
#include "audio_output.h"
#include "aout_internal.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int Create ( vlc_object_t * );
static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
aout_buffer_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("audio filter for trivial channel mixing") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
/*****************************************************************************
* Create: allocate trivial channel mixer
*****************************************************************************/
static int Create( vlc_object_t *p_this )
{
aout_filter_t * p_filter = (aout_filter_t *)p_this;
if ( p_filter->input.i_channels == p_filter->output.i_channels
|| p_filter->input.i_format != p_filter->output.i_format
|| p_filter->input.i_rate != p_filter->output.i_rate
|| (p_filter->input.i_format != AOUT_FMT_FLOAT32
&& p_filter->input.i_format != AOUT_FMT_FIXED32) )
{
return -1;
}
p_filter->pf_do_work = DoWork;
if ( p_filter->input.i_channels > p_filter->output.i_channels )
{
/* Downmixing */
p_filter->b_in_place = 1;
}
else
{
/* Upmixing */
p_filter->b_in_place = 0;
}
return 0;
}
/*****************************************************************************
* SparseCopy: trivially downmix or upmix a buffer
*****************************************************************************/
static void SparseCopy( s32 * p_dest, const s32 * p_src, size_t i_len,
int i_output_stride, int i_input_stride )
{
int i;
for ( i = 0; i < i_len; i++ )
{
int j;
for ( j = 0; j < i_output_stride; j++ )
{
p_dest[j] = p_src[j];
}
p_src += i_input_stride;
p_dest += i_output_stride;
}
}
/*****************************************************************************
* DoWork: convert a buffer
*****************************************************************************/
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
SparseCopy( (s32 *)p_out_buf->p_buffer, (s32 *)p_in_buf->p_buffer,
p_in_buf->i_nb_samples, p_filter->output.i_channels,
p_filter->input.i_channels );
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * p_filter->output.i_channels
/ p_filter->input.i_channels;
}
......@@ -2,7 +2,7 @@
* a52tospdif.c : encapsulates A/52 frames into S/PDIF packets
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: a52tospdif.c,v 1.8 2002/08/17 13:26:57 tcastley Exp $
* $Id: a52tospdif.c,v 1.9 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
......@@ -50,7 +50,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for A/52->S/PDIF encapsulation") );
set_description( _("audio filter for A/52->S/PDIF encapsulation") );
set_capability( "audio filter", 10 );
set_callbacks( Create, NULL );
vlc_module_end();
......@@ -82,11 +82,13 @@ static int Create( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
u16 i;
#ifdef WORDS_BIGENDIAN
static const u8 p_sync[6] = { 0xF8, 0x72, 0x4E, 0x1F, 0x00, 0x01 };
#else
static const u8 p_sync[6] = { 0x72, 0xF8, 0x1F, 0x4E, 0x01, 0x00 };
# ifndef HAVE_SWAB
u16 i;
# endif
#endif
u16 i_length = p_in_buf->i_nb_samples;
u16 * pi_length;
......
......@@ -2,7 +2,7 @@
* fixed32float32.c : converter from fixed32 to float32 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: fixed32tofloat32.c,v 1.5 2002/08/19 21:31:11 massiot Exp $
* $Id: fixed32tofloat32.c,v 1.6 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -44,7 +44,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for fixed32->float32 conversion") );
set_description( _("audio filter for fixed32->float32 conversion") );
set_capability( "audio filter", 10 );
set_callbacks( Create, NULL );
vlc_module_end();
......@@ -105,6 +105,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
#endif
/* combined conversion */
/* This has absolutely no chance of working. *p_in is s32, gcc
* doesn't know anything of vlc_fixed_t... --Meuuh */
if ( *p_in >= 8 ) *p_out = (float) 1.0;
else if ( *p_in < -8 ) *p_out = (float) -1.0;
else *p_out =(float) (*p_in/8.0);
......@@ -113,5 +115,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
}
......@@ -2,7 +2,7 @@
* fixed32tos16.c : converter from fixed32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: fixed32tos16.c,v 1.4 2002/08/19 21:31:11 massiot Exp $
* $Id: fixed32tos16.c,v 1.5 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -44,7 +44,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for fixed32->s16 conversion") );
set_description( _("audio filter for fixed32->s16 conversion") );
set_capability( "audio filter", 10 );
set_callbacks( Create, NULL );
vlc_module_end();
......@@ -216,4 +216,5 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
// p_in++; p_out++;
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes / 2;
}
......@@ -2,7 +2,7 @@
* float32tos16.c : converter from float32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: float32tos16.c,v 1.8 2002/08/19 21:31:11 massiot Exp $
* $Id: float32tos16.c,v 1.9 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -44,15 +44,13 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for float32->s16 conversion") );
set_description( _("audio filter for float32->s16 conversion") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
/*****************************************************************************
* Create: allocate trivial mixer
*****************************************************************************
* This function allocates and initializes a Crop vout method.
*****************************************************************************/
static int Create( vlc_object_t *p_this )
{
......@@ -88,7 +86,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
for ( i = p_in_buf->i_nb_samples * p_filter->input.i_channels ; i-- ; )
{
#if 0
/* Slow version */
/* Slow version. */
if ( *p_in >= 1.0 ) *p_out = 32767;
else if ( *p_in < -1.0 ) *p_out = -32768;
else *p_out = *p_in * 32768.0;
......
......@@ -2,7 +2,7 @@
* float32tos8.c : converter from float32 to signed 8 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: float32tos8.c,v 1.3 2002/08/19 21:31:11 massiot Exp $
* $Id: float32tos8.c,v 1.4 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
......@@ -44,7 +44,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for float32->s8 conversion") );
set_description( _("audio filter for float32->s8 conversion") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
......
......@@ -2,7 +2,7 @@
* float32tou16.c : converter from float32 to unsigned 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: float32tou16.c,v 1.3 2002/08/19 21:31:11 massiot Exp $
* $Id: float32tou16.c,v 1.4 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
......@@ -44,7 +44,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for float32->u16 conversion") );
set_description( _("audio filter for float32->u16 conversion") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
......
......@@ -2,7 +2,7 @@
* float32tou8.c : converter from float32 to unsigned 8 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: float32tou8.c,v 1.3 2002/08/19 21:31:11 massiot Exp $
* $Id: float32tou8.c,v 1.4 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
......@@ -44,7 +44,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for float32->u8 conversion") );
set_description( _("audio filter for float32->u8 conversion") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
......
......@@ -2,7 +2,7 @@
* s16tofloat32.c : converter from signed 16 bits integer to float32
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: s16tofloat32.c,v 1.1 2002/08/21 09:27:40 sam Exp $
* $Id: s16tofloat32.c,v 1.2 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -44,7 +44,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for s16->float32 conversion") );
set_description( _("audio filter for s16->float32 conversion") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
......
......@@ -2,7 +2,7 @@
* trivial.c : trivial resampler (skips samples or pads with zeroes)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.3 2002/08/12 22:12:50 massiot Exp $
* $Id: trivial.c,v 1.4 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -44,22 +44,23 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("aout filter for trivial resampling") );
set_description( _("audio filter for trivial resampling") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
/*****************************************************************************
* Create: allocate trivial resampler
*****************************************************************************
* This function allocates and initializes a Crop vout method.
*****************************************************************************/
static int Create( vlc_object_t *p_this )
{
aout_filter_t * p_filter = (aout_filter_t *)p_this;
if ( p_filter->input.i_rate == p_filter->output.i_rate
|| p_filter->input.i_format != p_filter->output.i_format )
|| p_filter->input.i_format != p_filter->output.i_format
|| p_filter->input.i_channels != p_filter->output.i_channels
|| (p_filter->input.i_format != AOUT_FMT_FLOAT32
&& p_filter->input.i_format != AOUT_FMT_FIXED32) )
{
return -1;
}
......@@ -83,7 +84,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if ( p_out_buf != p_in_buf )
{
/* For whatever reason the buffer allocator decided to allocate
* a new buffer. */
* a new buffer. Currently, this never happens. */
p_aout->p_vlc->pf_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer,
__MIN(i_out_nb, i_in_nb) );
}
......@@ -95,5 +96,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf->i_nb_samples = i_out_nb;
p_out_buf->i_nb_bytes = i_out_nb * sizeof(s32);
}
......@@ -2,7 +2,7 @@
* spdif.c : dummy mixer for S/PDIF output (1 input only)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: spdif.c,v 1.4 2002/08/19 21:31:11 massiot Exp $
* $Id: spdif.c,v 1.5 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -45,7 +45,6 @@ static void DoWork ( aout_instance_t *, aout_buffer_t * );
vlc_module_begin();
set_description( _("dummy spdif audio mixer module") );
set_capability( "audio mixer", 1 );
add_shortcut( "spdif" );
set_callbacks( Create, NULL );
vlc_module_end();
......
......@@ -2,7 +2,7 @@
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.5 2002/08/19 21:31:11 massiot Exp $
* $Id: trivial.c,v 1.6 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -43,9 +43,8 @@ static void DoWork ( aout_instance_t *, aout_buffer_t * );
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("trivial aout mixer module") );
set_description( _("trivial audio mixer module") );
set_capability( "audio mixer", 1 );
add_shortcut( "trivial" );
set_callbacks( Create, NULL );
vlc_module_end();
......@@ -67,34 +66,13 @@ static int Create( vlc_object_t *p_this )
return 0;
}
#if 0
/*****************************************************************************
* SparseCopy: trivially downmix or upmix a buffer
*****************************************************************************/
static void SparseCopy( u32 * p_dest, const u32 * p_src, size_t i_len,
int i_output_stride, int i_input_stride )
{
int i;
for ( i = 0; i < i_len; i++ )
{
int j;
for ( j = 0; j < i_output_stride; j++ )
{
p_dest[j] = p_src[j];
}
p_src += i_input_stride;
p_dest += i_output_stride;
}
}
#endif
/*****************************************************************************
* DoWork: mix a new output buffer
*****************************************************************************/
static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
{
aout_input_t * p_input = p_aout->pp_inputs[0];
int i_nb_bytes = p_buffer->i_nb_samples * sizeof(u32)
int i_nb_bytes = p_buffer->i_nb_samples * sizeof(s32)
* p_aout->mixer.mixer.i_channels;
byte_t * p_in = p_input->p_first_byte_to_mix;
byte_t * p_out = p_buffer->p_buffer;
......@@ -104,7 +82,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
ptrdiff_t i_available_bytes = (p_input->fifo.p_first->p_buffer
- p_in)
+ p_input->fifo.p_first->i_nb_samples
* sizeof(u32)
* sizeof(s32)
* p_aout->mixer.mixer.i_channels;
if ( i_available_bytes < i_nb_bytes )
......
......@@ -2,7 +2,7 @@
* sdl.c : SDL audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: sdl.c,v 1.3 2002/08/19 21:31:11 massiot Exp $
* $Id: sdl.c,v 1.4 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -150,7 +150,7 @@ static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len )
{
aout_instance_t * p_aout = (aout_instance_t *)_p_aout;
/* FIXME : take into account SDL latency instead of mdate() */
aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 );
aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 1 );
if ( i_len != FRAME_SIZE * sizeof(s16)
* p_aout->output.output.i_channels )
......
......@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: a52.c,v 1.5 2002/08/19 21:31:11 massiot Exp $
* $Id: a52.c,v 1.6 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -77,7 +77,7 @@ typedef struct a52_thread_s
aout_instance_t * p_aout; /* opaque */
aout_input_t * p_aout_input; /* opaque */
audio_sample_format_t output_format;
mtime_t last_date;
audio_date_t end_date;
} a52_thread_t;
/*****************************************************************************
......@@ -195,6 +195,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
{
p_dec->output_format.i_rate = i_rate;
/* p_dec->output_format.i_channels = i_channels; */
aout_DateInit( &p_dec->end_date, i_rate );
p_dec->p_aout_input = aout_InputNew( p_dec->p_fifo,
&p_dec->p_aout,
&p_dec->output_format );
......@@ -208,9 +209,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
/* Set the Presentation Time Stamp */
CurrentPTS( &p_dec->bit_stream, &pts, NULL );
if ( pts != 0 )
if ( pts != 0 && pts != aout_DateGet( &p_dec->end_date ) )
{
p_dec->last_date = pts;
aout_DateSet( &p_dec->end_date, pts );
}
/* Get the complete frame */
......@@ -248,7 +249,6 @@ static int InitThread( a52_thread_t * p_dec, decoder_fifo_t * p_fifo )
p_dec->p_fifo = p_fifo;
p_dec->output_format.i_format = AOUT_FMT_FLOAT32;
p_dec->output_format.i_channels = 2; /* FIXME ! */
p_dec->last_date = 0;
/* Initialize liba52 */
p_dec->p_a52_state = a52_init( 0 );
......@@ -294,7 +294,7 @@ static int DecodeFrame( a52_thread_t * p_dec, byte_t * p_frame_buffer )
int i_bytes_per_block = 256 * p_dec->output_format.i_channels
* sizeof(float);
if( !p_dec->last_date )
if( !aout_DateGet( &p_dec->end_date ) )
{
/* We've just started the stream, wait for the first PTS. */
return 0;
......@@ -303,10 +303,9 @@ static int DecodeFrame( a52_thread_t * p_dec, byte_t * p_frame_buffer )
p_buffer = aout_BufferNew( p_dec->p_aout, p_dec->p_aout_input,
A52_FRAME_NB );
if ( p_buffer == NULL ) return -1;
p_buffer->start_date = p_dec->last_date;
p_dec->last_date += (mtime_t)A52_FRAME_NB * 1000000
/ p_dec->output_format.i_rate;
p_buffer->end_date = p_dec->last_date;
p_buffer->start_date = aout_DateGet( &p_dec->end_date );
p_buffer->end_date = aout_DateIncrement( &p_dec->end_date,
A52_FRAME_NB );
/* FIXME */
i_flags = A52_STEREO | A52_ADJUST_LEVEL;
......
/*****************************************************************************
* audio_output.c : audio output instance
* audio_output.c : audio output instance miscellaneous functions
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: audio_output.c,v 1.98 2002/08/19 23:12:57 massiot Exp $
* $Id: audio_output.c,v 1.99 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -36,6 +36,10 @@
#include "audio_output.h"
#include "aout_internal.h"
/*
* Instances management (see also input.c:aout_InputNew())
*/
/*****************************************************************************
* aout_NewInstance: initialize aout structure
*****************************************************************************/
......@@ -77,6 +81,11 @@ void aout_DeleteInstance( aout_instance_t * p_aout )
vlc_object_destroy( p_aout );
}
/*
* Buffer management (interface to the decoders)
*/
/*****************************************************************************
* aout_BufferNew : ask for a new empty buffer
*****************************************************************************/
......@@ -142,6 +151,11 @@ void aout_BufferPlay( aout_instance_t * p_aout, aout_input_t * p_input,
aout_MixerRun( p_aout );
}
/*
* Formats management (internal)
*/
/*****************************************************************************
* aout_FormatPrepare : compute the number of bytes per frame & frame length
*****************************************************************************/
......@@ -183,3 +197,181 @@ void aout_FormatPrepare( audio_sample_format_t * p_format )
p_format->i_frame_length = 1;
}
/*
* FIFO management (internal) - please understand that solving race conditions
* is _your_ job, ie. in the audio output you should own the mixer lock
* before calling any of these functions.
*/
/*****************************************************************************
* aout_FifoInit : initialize the members of a FIFO
*****************************************************************************/
void aout_FifoInit( aout_instance_t * p_aout, aout_fifo_t * p_fifo,
u32 i_rate )
{
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
aout_DateInit( &p_fifo->end_date, i_rate );
}
/*****************************************************************************
* aout_FifoPush : push a packet into the FIFO
*****************************************************************************/
void aout_FifoPush( aout_instance_t * p_aout, aout_fifo_t * p_fifo,
aout_buffer_t * p_buffer )
{
*p_fifo->pp_last = p_buffer;
p_fifo->pp_last = &p_buffer->p_next;
*p_fifo->pp_last = NULL;
/* Enforce the continuity of the stream. */
if ( aout_DateGet( &p_fifo->end_date ) )
{
p_buffer->start_date = aout_DateGet( &p_fifo->end_date );
p_buffer->end_date = aout_DateIncrement( &p_fifo->end_date,
p_buffer->i_nb_samples );
}
else
{
aout_DateSet( &p_fifo->end_date, p_buffer->end_date );
}
}
/*****************************************************************************
* aout_FifoSet : set end_date and trash all buffers (because they aren't
* properly dated)
*****************************************************************************/
void aout_FifoSet( aout_instance_t * p_aout, aout_fifo_t * p_fifo,
mtime_t date )
{
aout_buffer_t * p_buffer;
aout_DateSet( &p_fifo->end_date, date );
p_buffer = p_fifo->p_first;
while ( p_buffer != NULL )
{
aout_buffer_t * p_next = p_buffer->p_next;
aout_BufferFree( p_buffer );
p_buffer = p_next;
}
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
}
/*****************************************************************************
* aout_FifoMoveDates : Move forwards or backwards all dates in the FIFO
*****************************************************************************/
void aout_FifoMoveDates( aout_instance_t * p_aout, aout_fifo_t * p_fifo,
mtime_t difference )
{
aout_buffer_t * p_buffer;
aout_DateMove( &p_fifo->end_date, difference );
p_buffer = p_fifo->p_first;
while ( p_buffer != NULL )
{
p_buffer->start_date += difference;
p_buffer->end_date += difference;
p_buffer = p_buffer->p_next;
}
}
/*****************************************************************************
* aout_FifoNextStart : return the current end_date
*****************************************************************************/
mtime_t aout_FifoNextStart( aout_instance_t * p_aout, aout_fifo_t * p_fifo )
{
return aout_DateGet( &p_fifo->end_date );
}
/*****************************************************************************
* aout_FifoPop : get the next buffer out of the FIFO
*****************************************************************************/
aout_buffer_t * aout_FifoPop( aout_instance_t * p_aout, aout_fifo_t * p_fifo )
{
aout_buffer_t * p_buffer;
p_buffer = p_fifo->p_first;
if ( p_buffer == NULL ) return NULL;
p_fifo->p_first = p_buffer->p_next;
if ( p_fifo->p_first == NULL )
{
p_fifo->pp_last = &p_fifo->p_first;
}
return p_buffer;
}
/*****************************************************************************
* aout_FifoDestroy : destroy a FIFO and its buffers
*****************************************************************************/
void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo )
{
aout_buffer_t * p_buffer;
p_buffer = p_fifo->p_first;
while ( p_buffer != NULL )
{
aout_buffer_t * p_next = p_buffer->p_next;
aout_BufferFree( p_buffer );
p_buffer = p_next;
}
}
/*
* Date management (internal and external)
*/
/*****************************************************************************
* aout_DateInit : set the divider of an audio_date_t
*****************************************************************************/
void aout_DateInit( audio_date_t * p_date, u32 i_divider )
{
p_date->date = 0;
p_date->i_divider = i_divider;
p_date->i_remainder = 0;
}
/*****************************************************************************
* aout_DateSet : set the date of an audio_date_t
*****************************************************************************/
void aout_DateSet( audio_date_t * p_date, mtime_t new_date )
{
p_date->date = new_date;
p_date->i_remainder = 0;
}
/*****************************************************************************
* aout_DateMove : move forwards or backwards the date of an audio_date_t
*****************************************************************************/
void aout_DateMove( audio_date_t * p_date, mtime_t difference )
{
p_date->date += difference;
}
/*****************************************************************************
* aout_DateGet : get the date of an audio_date_t
*****************************************************************************/
mtime_t aout_DateGet( const audio_date_t * p_date )
{
return p_date->date;
}
/*****************************************************************************
* aout_DateIncrement : increment the date and return the result, taking
* into account rounding errors
*****************************************************************************/
mtime_t aout_DateIncrement( audio_date_t * p_date, u32 i_nb_samples )
{
mtime_t i_dividend = (mtime_t)i_nb_samples * 1000000;
p_date->date += i_dividend / p_date->i_divider;
p_date->i_remainder += i_dividend % p_date->i_divider;
if ( p_date->i_remainder >= p_date->i_divider )
{
/* This is Bresenham algorithm. */
p_date->date++;
p_date->i_remainder -= p_date->i_divider;
}
return p_date->date;
}
......@@ -2,7 +2,7 @@
* input.c : internal management of input streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: input.c,v 1.6 2002/08/19 23:12:57 massiot Exp $
* $Id: input.c,v 1.7 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -63,7 +63,7 @@ static aout_input_t * InputNew( aout_instance_t * p_aout,
aout_FormatPrepare( &p_input->input );
/* Prepare FIFO. */
aout_FifoInit( p_aout, &p_input->fifo );
aout_FifoInit( p_aout, &p_input->fifo, p_aout->mixer.mixer.i_rate );
p_input->p_first_byte_to_mix = NULL;
/* Create filters. */
......@@ -220,8 +220,8 @@ void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
vlc_mutex_unlock( &p_aout->input_lock );
/* We don't care if someone changes the start date behind our back after
* aout_FifoNextStart. aout_FifoPush will deal with that, and we will
* compensate with the next incoming buffer. */
* this. We'll deal with that when pushing the buffer, and compensate
* with the next incoming buffer. */
start_date = aout_FifoNextStart( p_aout, &p_input->fifo );
if ( start_date != 0 && start_date < mdate() )
......@@ -237,7 +237,7 @@ void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
start_date = 0;
}
if ( p_buffer->start_date < mdate() )
if ( p_buffer->start_date < mdate() - AOUT_MIN_PREPARE_TIME )
{
/* The decoder gives us f*cked up PTS. It's its business, but we
* can't present it anyway, so drop the buffer. */
......@@ -268,6 +268,7 @@ void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
int i_ratio, i_nb_filters;
mtime_t old_duration;
aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
aout_buffer_t * p_new_buffer;
aout_alloc_t dummy_alloc;
mtime_t drift = p_buffer->start_date - start_date;
......@@ -280,15 +281,15 @@ void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
duration = p_buffer->end_date - start_date;
i_ratio = duration * 100 / old_duration;
/* If the ratio is too != 100, the sound quality will be awful. */
if ( i_ratio < 90 /* % */ )
if ( i_ratio < 66 /* % */ )
{
duration = old_duration * 90 / 100;
duration = old_duration * 66 / 100;
}
if ( i_ratio > 110 /* % */ )
if ( i_ratio > 150 /* % */ )
{
duration = old_duration * 110 / 100;
duration = old_duration * 150 / 100;
}
new_output.i_rate = new_output.i_rate * old_duration / duration;
new_output.i_rate = new_output.i_rate * duration / old_duration;
if ( aout_FiltersCreatePipeline( p_aout, pp_filters,
&i_nb_filters, &p_input->input,
......@@ -311,6 +312,20 @@ void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
dummy_alloc.i_bytes_per_sec = -1;
aout_FiltersHintBuffers( p_aout, pp_filters, i_nb_filters,
&dummy_alloc );
dummy_alloc.i_bytes_per_sec = __MAX(
dummy_alloc.i_bytes_per_sec,
p_input->input.i_bytes_per_frame
* p_input->input.i_rate
/ p_input->input.i_frame_length );
dummy_alloc.i_alloc_type = AOUT_ALLOC_HEAP;
aout_BufferAlloc( &dummy_alloc, old_duration, NULL, p_new_buffer );
memcpy( p_new_buffer->p_buffer, p_buffer->p_buffer,
p_buffer->i_nb_bytes );
p_new_buffer->i_nb_samples = p_buffer->i_nb_samples;
p_new_buffer->i_nb_bytes = p_buffer->i_nb_bytes;
aout_BufferFree( p_buffer );
p_buffer = p_new_buffer;
aout_FiltersPlay( p_aout, pp_filters, i_nb_filters,
&p_buffer );
......@@ -327,10 +342,10 @@ void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
&p_buffer );
}
vlc_mutex_lock( &p_aout->mixer_lock );
/* Adding the start date will be managed by aout_FifoPush(). */
p_buffer->start_date = start_date;
p_buffer->end_date = start_date + duration;
vlc_mutex_lock( &p_aout->mixer_lock );
aout_FifoPush( p_aout, &p_input->fifo, p_buffer );
vlc_mutex_unlock( &p_aout->mixer_lock );
......
......@@ -2,7 +2,7 @@
* mixer.c : audio output mixing operations
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: mixer.c,v 1.8 2002/08/19 23:12:57 massiot Exp $
* $Id: mixer.c,v 1.9 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -66,10 +66,15 @@ static int MixBuffer( aout_instance_t * p_aout )
int i;
aout_buffer_t * p_output_buffer;
mtime_t start_date, end_date;
audio_date_t exact_start_date;
/* Retrieve the date of the next buffer. */
vlc_mutex_lock( &p_aout->mixer_lock );
start_date = aout_FifoNextStart( p_aout, &p_aout->output.fifo );
/* Retrieve the date of the next buffer. */
memcpy( &exact_start_date, &p_aout->output.fifo.end_date,
sizeof(audio_date_t) );
start_date = aout_DateGet( &exact_start_date );
if ( start_date != 0 && start_date < mdate() )
{
/* The output is _very_ late. This can only happen if the user
......@@ -77,7 +82,9 @@ static int MixBuffer( aout_instance_t * p_aout )
* happen :). */
msg_Warn( p_aout, "Output PTS is out of range (%lld), clearing out",
start_date );
start_date = p_aout->output.fifo.end_date = 0;
aout_FifoSet( p_aout, &p_aout->output.fifo, 0 );
aout_DateSet( &exact_start_date, 0 );
start_date = 0;
}
/* See if we have enough data to prepare a new buffer for the audio
......@@ -99,6 +106,7 @@ static int MixBuffer( aout_instance_t * p_aout )
if ( !start_date || start_date < p_buffer->start_date )
{
aout_DateSet( &exact_start_date, p_buffer->start_date );
start_date = p_buffer->start_date;
}
}
......@@ -110,8 +118,8 @@ static int MixBuffer( aout_instance_t * p_aout )
return -1;
}
}
end_date = start_date + (mtime_t)p_aout->output.i_nb_samples * 1000000
/ p_aout->output.output.i_rate;
aout_DateIncrement( &exact_start_date, p_aout->output.i_nb_samples );
end_date = aout_DateGet( &exact_start_date );
/* Check that start_date and end_date are available for all input
* streams. */
......@@ -163,13 +171,13 @@ static int MixBuffer( aout_instance_t * p_aout )
mixer_nb_bytes = p_input->p_first_byte_to_mix
- p_buffer->p_buffer;
if ( i_nb_bytes + p_aout->mixer.mixer.i_bytes_per_frame
< mixer_nb_bytes ||
i_nb_bytes - p_aout->mixer.mixer.i_bytes_per_frame
> mixer_nb_bytes )
if ( !((i_nb_bytes + p_aout->mixer.mixer.i_bytes_per_frame
> mixer_nb_bytes) &&
(i_nb_bytes < p_aout->mixer.mixer.i_bytes_per_frame
+ mixer_nb_bytes)) )
{
msg_Warn( p_aout,
"mixer start isn't output start (%ld)",
"mixer start isn't output start (%d)",
i_nb_bytes - mixer_nb_bytes );
/* Round to the nearest multiple */
......
......@@ -2,7 +2,7 @@
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: output.c,v 1.8 2002/08/19 23:12:57 massiot Exp $
* $Id: output.c,v 1.9 2002/08/21 22:41:59 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -42,9 +42,6 @@ int aout_OutputNew( aout_instance_t * p_aout,
int i_rate = config_GetInt( p_aout, "aout-rate" );
int i_channels = config_GetInt( p_aout, "aout-channels" );
/* Prepare FIFO. */
aout_FifoInit( p_aout, &p_aout->output.fifo );
p_aout->output.p_module = module_Need( p_aout, "audio output",
psz_name );
if ( psz_name != NULL ) free( psz_name );
......@@ -79,6 +76,9 @@ int aout_OutputNew( aout_instance_t * p_aout,
}
aout_FormatPrepare( &p_aout->output.output );
/* Prepare FIFO. */
aout_FifoInit( p_aout, &p_aout->output.fifo, p_aout->output.output.i_rate );
msg_Dbg( p_aout, "output format=%d rate=%d channels=%d",
p_aout->output.output.i_format, p_aout->output.output.i_rate,
p_aout->output.output.i_channels );
......@@ -149,10 +149,10 @@ void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
p_aout->output.i_nb_filters,
&p_buffer );
/* Please remember that we have the mixer_lock in this function. */
vlc_mutex_lock( &p_aout->mixer_lock );
aout_FifoPush( p_aout, &p_aout->output.fifo, p_buffer );
p_aout->output.pf_play( p_aout );
vlc_mutex_unlock( &p_aout->mixer_lock );
}
/*****************************************************************************
......@@ -160,7 +160,7 @@ void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
*****************************************************************************
* If b_can_sleek is 1, the aout core functions won't try to resample
* new buffers to catch up - that is we suppose that the output plug-in can
* do it by itself. S/PDIF outputs should always set b_can_sleek = 1.
* compensate it by itself. S/PDIF outputs should always set b_can_sleek = 1.
*****************************************************************************/
aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
mtime_t start_date ,
......@@ -171,10 +171,10 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
vlc_mutex_lock( &p_aout->mixer_lock );
p_buffer = p_aout->output.fifo.p_first;
while ( p_buffer != NULL && p_buffer->end_date < start_date )
while ( p_buffer != NULL && p_buffer->start_date < start_date )
{
msg_Dbg( p_aout, "audio output is too slow (%lld)",
start_date - p_buffer->end_date );
start_date - p_buffer->start_date );
p_buffer = p_buffer->p_next;
}
......@@ -183,7 +183,7 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
{
p_aout->output.fifo.pp_last = &p_aout->output.fifo.p_first;
/* Set date to 0, to allow the mixer to send a new buffer ASAP */
p_aout->output.fifo.end_date = 0;
aout_FifoSet( p_aout, &p_aout->output.fifo, 0 );
vlc_mutex_unlock( &p_aout->mixer_lock );
msg_Dbg( p_aout, "audio output is starving" );
return NULL;
......@@ -200,22 +200,26 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
return NULL;
}
#if 0
if ( !b_can_sleek )
if ( !b_can_sleek &&
( (p_buffer->start_date - start_date > AOUT_PTS_TOLERANCE)
|| (start_date - p_buffer->start_date > AOUT_PTS_TOLERANCE) ) )
{
/* Try to compensate the drift by doing some resampling. */
int i;
mtime_t difference = p_buffer->start_date - start_date;
msg_Warn( p_aout, "output date isn't PTS date, resampling (%lld)",
difference );
/* Take the mixer lock because no input can be removed when the
* the mixer lock is taken. */
vlc_mutex_lock( &p_aout->output.fifo.lock );
for ( i = 0; i < p_input->i_nb_inputs; i++ )
/* Remember that we still own the mixer lock. */
for ( i = 0; i < p_aout->i_nb_inputs; i++ )
{
aout_input_t * p_input = p_aout->pp_inputs[i];
aout_fifo_t * p_fifo = &p_aout->pp_inputs[i]->fifo;
aout_FifoMoveDates( p_aout, p_fifo, difference );
}
vlc_mutex_lock( &p_aout->output.fifo.lock );
aout_FifoMoveDates( p_aout, &p_aout->output.fifo, difference );
}
#endif
p_aout->output.fifo.p_first = p_buffer->p_next;
if ( p_buffer->p_next == NULL )
......
......@@ -185,7 +185,11 @@ static const char * module_error( char *psz_buffer )
(p_symbols)->aout_BufferNew_inner = aout_BufferNew; \
(p_symbols)->aout_BufferDelete_inner = aout_BufferDelete; \
(p_symbols)->aout_BufferPlay_inner = aout_BufferPlay; \
(p_symbols)->aout_FormatPrepare_inner = aout_FormatPrepare; \
(p_symbols)->aout_DateInit_inner = aout_DateInit; \
(p_symbols)->aout_DateSet_inner = aout_DateSet; \
(p_symbols)->aout_DateMove_inner = aout_DateMove; \
(p_symbols)->aout_DateGet_inner = aout_DateGet; \
(p_symbols)->aout_DateIncrement_inner = aout_DateIncrement; \
(p_symbols)->__aout_InputNew_inner = __aout_InputNew; \
(p_symbols)->aout_InputDelete_inner = aout_InputDelete; \
(p_symbols)->__config_GetInt_inner = __config_GetInt; \
......
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