[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[54] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2009-12-26 10:39:47
|
Revision: 54 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=54&view=rev Author: nickols_k Date: 2009-12-26 10:39:37 +0000 (Sat, 26 Dec 2009) Log Message: ----------- increase static level linkage and use new way of configure Modified Paths: -------------- configure functions mplayerxp/Makefile mplayerxp/codec-cfg.c mplayerxp/configure mplayerxp/libmpcodecs/Makefile mplayerxp/libmpcodecs/ad.c mplayerxp/libmpcodecs/ad_acm.c mplayerxp/libmpcodecs/ad_dmo.c mplayerxp/libmpcodecs/ad_dshow.c mplayerxp/libmpcodecs/ad_internal.h mplayerxp/libmpcodecs/ad_qtaudio.c mplayerxp/libmpcodecs/ad_twin.c mplayerxp/libmpcodecs/codecs_ld.c mplayerxp/libmpcodecs/codecs_ld.h mplayerxp/libmpcodecs/vd.c mplayerxp/libmpcodecs/vd_dmo.c mplayerxp/libmpcodecs/vd_dshow.c mplayerxp/libmpcodecs/vd_qtvideo.c mplayerxp/libmpcodecs/vd_vfw.c mplayerxp/libmpdemux/aviprint.h mplayerxp/libmpdemux/demux_mkv.c mplayerxp/libmpdemux/demux_mov.c mplayerxp/libmpdemux/demux_mpxp64.c mplayerxp/libmpdemux/mux_mpxp64.c mplayerxp/libmpdemux/mux_raw.c mplayerxp/libmpdemux/muxer.c mplayerxp/libmpdemux/s_oss.c mplayerxp/libmpdemux/stheader.h mplayerxp/loader/Makefile mplayerxp/loader/afl.c mplayerxp/loader/com.h mplayerxp/loader/dmo/DMO_AudioDecoder.c mplayerxp/loader/dmo/DMO_VideoDecoder.c mplayerxp/loader/dmo/Makefile mplayerxp/loader/dmo/dmo.c mplayerxp/loader/driver.c mplayerxp/loader/dshow/DS_AudioDecoder.c mplayerxp/loader/dshow/DS_Filter.c mplayerxp/loader/dshow/DS_VideoDecoder.c mplayerxp/loader/dshow/Makefile mplayerxp/loader/dshow/allocator.c mplayerxp/loader/dshow/mediatype.c mplayerxp/loader/module.c mplayerxp/loader/pe_image.c mplayerxp/loader/registry.c mplayerxp/loader/resource.c mplayerxp/loader/win32.c mplayerxp/loader/wine/avifmt.h mplayerxp/loader/wine/debugtools.h mplayerxp/postproc/af_format.c Added Paths: ----------- mplayerxp/loader/ Removed Paths: ------------- loader/ mplayerxp/libmpcodecs/interface/dshow/ mplayerxp/libmpdemux/wine/ mplayerxp/loader/configure mplayerxp/loader/cpudetect.c mplayerxp/loader/cpudetect.h mplayerxp/loader/dshow/aviprint.c mplayerxp/loader/get_path.c Modified: configure =================================================================== --- configure 2009-12-21 18:42:47 UTC (rev 53) +++ configure 2009-12-26 10:39:37 UTC (rev 54) @@ -9,7 +9,7 @@ fi done # for parm in ... -for i in codecs loader etc DOCS mplayerxp ; do +for i in codecs etc DOCS mplayerxp ; do echo Entering \'"$i"\' directory cd $i ./configure "$@" Modified: functions =================================================================== --- functions 2009-12-21 18:42:47 UTC (rev 53) +++ functions 2009-12-26 10:39:37 UTC (rev 54) @@ -5,6 +5,14 @@ # Prefer these macros to full length text ! # These macros only return an error code - NO display is done +# Check how echo works in this /bin/sh +init_functions(){ +case `echo -n` in + -n) echo_n= echo_c='\c';; # SysV echo + *) echo_n='-n ' echo_c= ;; # BSD echo +esac +} + log(){ echo "$@" >>"$TMPLOG" } @@ -869,6 +877,10 @@ } mktmps() { +local I +for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do + test "$I" && break +done TMPLOG="configure.log" rm -f "$TMPLOG" TMPC="$I/mplayerxp-conf-$RANDOM-$$.c" @@ -978,8 +990,8 @@ echocheck() { if test "$echocheked" != "yes"; then echocheked=yes - echo "============ Checking for $@ ============" >> "$TMPLOG" - echo ${_echo_n} "Checking for $@ ... ${_echo_c}" + log "============ Checking for $@ ============" + echo $echo_n "Checking for $@ ... "$echo_c fi } @@ -987,19 +999,14 @@ echores() { if test "$echocheked" = "yes"; then echocheked=no - echo "Result is: $@" >> "$TMPLOG" - echo "##########################################" >> "$TMPLOG" - echo "" >> "$TMPLOG" + log "Result is: $@" + log "##########################################" + log "" echo "$@" fi } ############################################################################# -# Check how echo works in this /bin/sh -case `echo -n` in - -n) _echo_n= _echo_c='\c' ;; # SysV echo - *) _echo_n='-n ' _echo_c= ;; # BSD echo -esac # Guessing target system guess_target() { @@ -1112,15 +1119,15 @@ if test -z $CFLAGS ; then add_cflags $locarch fi -if enabled profile || test "$debug" || enabled gcov; then +if enabled profile || test $debug -gt 0 || enabled gcov; then add_cflags "-O2 -fno-builtin" if enabled profile ; then add_cflags "-pg" add_ldflags "-pg" fi -if test -n $debug ; then - add_cflags $debug - add_ldflags $debug +if test $debug -gt 0 ; then + add_cflags "-g$debug" + add_ldflags "-g$debug" fi if enabled gcov ; then add_cflags "-fprofile-arcs -ftest-coverage" @@ -1214,3 +1221,156 @@ #endif /* MPXP_CONFIG_ARCH */ EOF } + +trim() +{ + local trimmed=$1 + trimmed=${trimmed%% } + trimmed=${trimmed## } + echo $trimmed +} + +print_help(){ +echo "Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets." +local list="$1[*]" +list=${!list} +local index=1 +OLD_IFS=$IFS +IFS= +while true +do + local line=$(trim `echo $list | cut -d ',' -f $index`) + test -z $line && break + local opt=$(trim `echo $line | cut -d '|' -f 1`) + local descr=$(trim `echo $line | cut -s -d '|' -f 2`) + local opref=$(trim `echo $line | cut -s -d '|' -f 3`) + echo "$descr:" + opt="$opt[*]" + opt=${!opt} + local i=1 + while true + do + local oval=$(trim `echo $opt | cut -d ',' -f $i`) + test -z $oval && break + local oopt=$(trim `echo $oval | cut -d '|' -f 1`) + local odesc=$(trim `echo $oval | cut -s -d '|' -f 2`) + local odef=$(trim `echo $oval | cut -s -d '|' -f 3`) + printf " " + test -z $opref || printf "%s" $opref +# ((for(j=0;j<(25-lpref);j++))) printf " " + printf "%-25s %s " ${oopt//_/-} $odesc + test -z $odef && echo "" || echo "[$odef]" + (( i++ )) + done + (( index++ )) +done +IFS=$OLD_IFS +} + +make_defaults(){ +local list="$1[*]" +list=${!list} +local index=1 +OLD_IFS=$IFS +IFS= +while true +do + local line=$(trim `echo $list | cut -d ',' -f $index`) + test -z $line && break + local opt=$(trim `echo $line | cut -d '|' -f 1`) + opt="$opt[*]" + opt=${!opt} + local i=1 + while true + do + local oval=$(trim `echo $opt | cut -d ',' -f $i`) + test -z $oval && break + local oopt=$(trim `echo $oval | cut -d '|' -f 1`) + local odef=$(trim `echo $oval | cut -s -d '|' -f 3`) + test -z $odef || eval "$oopt=\"$odef\"" + (( i++ )) + done + (( index++ )) +done +IFS=$OLD_IFS +} + +in_list(){ +local list="$1[*]" +list=${!list} +local index=1 +OLD_IFS=$IFS +IFS= +while true +do + local line=$(trim `echo $list | cut -d ',' -f $index`) + test -z $line && break + local opt=$(trim `echo $line | cut -d '|' -f 1`) + opt="$opt[*]" + opt=${!opt} + local i=1 + while true + do + local oval=$(trim `echo $opt | cut -d ',' -f $i`) + test -z $oval && break + local oopt=$(trim `echo $oval | cut -d '|' -f 1`) + if test $2 = $oopt ; then + IFS=$OLD_IFS + return 0 + fi + (( i++ )) + done + (( index++ )) +done +IFS=$OLD_IFS +return 1 +} + +make_environment(){ +local list="$1[*]" +list=${!list} +local i=1 +OLD_IFS=$IFS +IFS= +while true +do + local oval=$(trim `echo $list | cut -s -d ',' -f $i`) + test -z $oval && break + local oopt=$(trim `echo $oval | cut -d '|' -f 3`) + local odef=$(trim `echo $oval | cut -s -d '|' -f 1`) + eval "odef=\$$odef" + test -z $oopt || test -z $odef || eval "$oopt=\"$odef\"" + (( i++ )) +done +IFS=$OLD_IFS +} + +set_list(){ +local list="$1[*]" +list=${!list} +local i=1 +OLD_IFS=$IFS +IFS= +while true +do + local oval=$(trim `echo $list | cut -s -d ',' -f $i`) + test -z $oval && break + local oopt=$(trim `echo $oval | cut -d '|' -f 1`) + eval "$oopt=$2" + (( i++ )) +done +IFS=$OLD_IFS +} + +enable_list(){ +set_list $1 yes +} + +disable_list(){ +set_list $1 no +} Modified: mplayerxp/Makefile =================================================================== --- mplayerxp/Makefile 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/Makefile 2009-12-26 10:39:37 UTC (rev 54) @@ -14,16 +14,15 @@ PRG_CFG = codec-cfg-xp # these subdirectories required installation due binaries within them SUBDIRS = libmpdemux libmpcodecs libao2 osdep postproc input nls libvo +ifeq ($(TARGET_ARCH_X86),yes) +SUBDIRS+=loader +endif DO_MAKE = @ for i in $(SUBDIRS); do $(MAKE) -C $$i $@ || exit; done DO_MAKE_ALL = @ for i in $(SUBDIRS); do $(MAKE) -C $$i all || exit; done -#prefix = /usr/local -BINDIR = ${prefix}/bin -# BINDIR = /usr/local/bin MANDIR = ${prefix}/man LDFLAGS += -Wl,-rpath,${CODECDIR}/codecs - SRCS_COMMON = cpudetect.c mp_msg.c codec-cfg.c cfgparser.c my_profile.c my_malloc.c spudec.c playtree.c playtreeparser.c asxparser.c mp_image.c subopt-helper.c SRCS_MPLAYER = mplayer.c $(SRCS_COMMON) find_sub.c subreader.c mixer.c vobsub.c mp-opt-reg.c sig_hand.c dump.c dec_ahead.c m_option.c m_property.c m_struct.c @@ -37,6 +36,9 @@ libvo/libvo.a \ osdep/libosdep.a \ nls/libnls.a +ifeq ($(TARGET_ARCH_X86),yes) + MP_LIBS += loader/libloader.a +endif COMMON_LIBS = $(MP_LIBS) $(EXTRALIBS) -lm CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Ilibvo $(EXTRA_INC) Modified: mplayerxp/codec-cfg.c =================================================================== --- mplayerxp/codec-cfg.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/codec-cfg.c 2009-12-26 10:39:37 UTC (rev 54) @@ -24,7 +24,7 @@ #include <string.h> // for mmioFOURCC: -#include "wine/avifmt.h" +#include "loader/wine/avifmt.h" #include "libvo/img_format.h" #include "codec-cfg.h" #define MSGT_CLASS MSGT_CODECCFG Modified: mplayerxp/configure =================================================================== --- mplayerxp/configure 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/configure 2009-12-26 10:39:37 UTC (rev 54) @@ -24,272 +24,193 @@ ############################################################################# . ../functions +init_functions + cd nls LANGUAGES=`echo help_mp-??.h | sed "s/help_mp-\(..\).h/\1/g"` cd .. +linguas=`echo $LANG | sed 's/^\([^_]*\).*$/\1/'` +test -z $linguas && linguas=en -for parm in "$@" ; do - if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then - cat << EOF +# GOTCHA: the variables below defines the default behavior for autodetection +# and have - unless stated otherwise - at least 2 states : yes no +# If autodetection is available then the third state is: auto +ENABLED_LIST=( + "shared|build shared libraries", + "gomp|use GNU OpenMP (requires gcc-4.3+)", + "fastcall|use regparm method on x86 systems", + "fastmemcpy|use 3dnow/sse/mmx optimized memcpy()", + "streaming|build with network support (http/mms/rtp)", + "af_inet6|build with support for IPv6 protocol", + "termcap|build with termcap database for key codes", + "termios|build with termios database for key codes", + "shm|build with shared memory if possible", + "rtc|use RTC (/dev/rtc) on Linux", + "iconv|build with iconv for encoding conversion", + "winsock2|use winsock2.h if possible", + "largefiles|enable support for files > 2GB", + "ossaudio|build with OSS audio output", + "audio_select|use select() on OSS audio device", + "alsa|build with ALSA audio output", + "arts|build with ARTS audio output", + "esd|build with ESD audio ouput", + "openal|build with OpenAL audio output", + "nas|build with NAS uadio output", + "jack|build with JACK audio output", + "libcdio|build with libcdio support", + "x11|build with X11 video ouput", + "xv|build with Xv video output", + "sdl|build with SDL video and audio output", + "sdl_image|build with SDL_image for screenshots", + "fbdev|build with FBDev video ouput", + "jpg|build with JPEG for screenshots", + "png|build with PNG for screenshots", + "opengl|build with OpenGL video output", + "vdpau|build with VDPAU video output", + "dga|build with DGA video output", + "vesa|build with VESA video output", + "vidix|build with VIDIX video output", + "xdpms|build with X11 DPMS support", + "xinerama|build with X11 Xinerama support", + "xf86vm|build with X11 XF86Vm support", + "tv|build wuth TV Interface (tv/dvb grabbers)", + "tv_v4l|build with Video 4 Linux TV Interface support", + "lirc|build with LIRC (remote control) support", + "lircc|build with LIRCC (remote daemon control) support", + "joystick|build with joystick support", + "libcss|build with libcss support", + "libdvdread|build with libdvdread support", + "libdvdnav|build with libdvdnav support", + "libvcd|build with libvcd support" +) +DISABLED_LIST=( + "gcov|compile gnu coverage information into PROGRAM", + "profile|compile profiling information into PROGRAM", + "static|build static libraries" +) -Usage: $0 [OPTIONS]... +AUTOCONF_LIST=( + "ENABLED_LIST", + "DISABLED_LIST" +) -Configuration: - -h, --help display this help and exit +PATH_LIST=( + "prefix|architecture-independent files|/usr/local", + "exec_prefix|architecture-dependent files|\$prefix", + "bindir|user executables|\$exec_prefix/bin", + "libdir|object code libraries|\$exec_prefix/lib", + "datadir|read-only architecture-independent data|\$prefix/share", + "confdir|read-only configuration files|\$prefix/share", + "codecdir|codec's shared libraries|\$libdir/mplayerxp", + "win32libdir|win32 .dll locations [/usr/lib/win32]" +) -Installation directories: - --prefix=DIR use this prefix for installing mplayerxp [/usr/local] +PROGNAME_LIST=( + "program_prefix|prepend PREFIX to installed program names", + "program_suffix|append SUFFIX to installed program names", + "program_transform_name|use TRANSFORM_NAME as program name|mplayerxp" +) -Fine tuning of the installation directories: - --datadir=DIR use this prefix for installing machine independent - data files (fonts, skins) [PREFIX/share/mplayerxp] - --confdir=DIR use this prefix for installing configuration files - [same as datadir] - --libdir=DIR use this prefix to specify library location - [PREFIX/lib] - --codecdir=DIR use this prefix for installing shared libraries - [LIBDIR/mplayerxp] -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build program to run on HOST [BUILD] +SYSTYPES_LIST=( + "build|configure for building on BUILD [guessed]", + "host|cross-compile to build program to run on HOST [BUILD]", + "cc|use this C compiler to build PROGRAM|gcc", + "as|use this ASSEMBLER to build PROGRAM|as", + "ld|use this LINKER to build PROGRAM|gcc", + "ldconfig|use this LDCONFIG to install PROGRAM|ldconfig", + "install|use this INSTALL to install PROGRAM|install", + "pkg_config|use this PKG-CONFIG to configure PROGRAM|pkg-config", + "debug|compile debugging information into PROGRAM|0", + "language|force this language as default for PROGRAM (Available: $LANGUAGES)|$linguas" +) -Program names: - --program-suffix=SUFX append SUFX to installed program names +SYSCONF_LIST=( + "SYSTYPES_LIST", + "PROGNAME_LIST", + "PATH_LIST" +) -Optional features: - --enable-gomp enable GNU OpenMP (requires gcc-4.3+) [autodetect] - --enable-largefiles enable support for files >2^32 bytes long [enable] - --enable-linux-devfs set default devices to devfs ones [disable] - --enable-termcap use termcap database for key codes [autodetect] - --enable-lirc enable LIRC (remote control) support [autodetect] - --enable-lircc enable LIRCC (remote daemon control) support [autodetect] - --enable-png enable png support [autodetect] - --enable-jpeg enable jpeg support [autodetect] - --disable-tv disable TV Interface (tv/dvb grabbers) [enable] - --disable-tv-v4l disable Video 4 Linux TV Interface support [autodetect] - --disable-iconv do not use iconv(3) function [autodetect] - --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect] - --disable-streaming disable network streaming support - (support for: http/mms/rtp) [enable] - --disable-ipv6 disable network IPv6 support [autodetect] - --enable-winsock2 enable winsock2 [autodetect] - --disable-vidix disable VIDIX stuff [autodetect] - --enable-joystick enable joystick support [autodetect] - --disable-sdl-image build with SDL_image support [autodetect] - --disable-libcdio Disable libcdio support [autodetect] - --disable-libcss Disable libcss support [autodetect] - --disable-libdvdread Disable libdvdread support [autodetect] - --disable-libdvdnav Disable libdvdnav support [autodetect] -Video: - --enable-dga build with DGA1 or DGA2 support [autodetect] - --enable-vesa build with VESA support [autodetect] - --enable-sdl build with SDL render support [autodetect] - --enable-vm build with XF86VidMode support for X11 [autodetect] - --enable-x11 build with X11 render support [autodetect] - --enable-xdpms build with X11 DPMS support [autodetect] - --enable-xinerama build with Xinerama support for X11 [autodetect] - --enable-xf86vm build with Xf86vm support for X11 [autodetect] - --enable-xv build with Xv render support for X 4.x [autodetect] - --enable-opengl build with OpenGL render support [autodetect] - --enable-vdpau build with VDPAU render support [autodetect] - --enable-fbdev build with FBDev render support [autodetect] - --enable-fbdev=nocopy yuv12 converts directly into framebuffer - --enable-mlib build with MLIB support (Solaris only) [autodetect] +EXTRA_LIST=( + "asflags|add these FLAGS to [\$ASFLAGS=$ASFLAGS]", + "cflags|add these FLAGS to [\$CFLAGS=$CFLAGS]", + "ldflags|add these FLAGS to [\$LDFLAGS=$LDFLAGS]", + "extralibs|add these LIBS to [\$LIBS=$LIBS]" +) -Audio: - --disable-ossaudio disable OSS sound support [autodetect] - --disable-alsa disable alsa sound support [autodetect] - --disable-arts disable aRts audio output [autodetect] - --disable-esd disable ESound audio output [autodetect] - --disable-openal disable OpenAL audio output [autodetect] - --disable-nas disable NAS audio output [autodetect] - --disable-jack disable JACK audio output [autodetect] - --disable-audio_select disable using select() on OSS audio device [enable] +ADD_LIST=( + "EXTRA_LIST", +) -Miscellaneous options: - --cc=COMPILER use this C compiler to build MPlayerXP [gcc] - --as=ASSEMBLER use this ASSEMBLER to build MPlayerXP [as] - --ld=LINKER use this LINKER to build MPlayerXP [gcc] - --ldconfig=LDCONFIG use this LDCONFIG to install MPlayerXP [ldconfig] - --install=INSTALL use this INSTALL to install MPlayerXP [install] - --language=xx select a language [en] - (Available: $LANGUAGES) +ENVIRONMENT_LIST=( + "MAKE|Make command (example: 'make -j')|make", + "AS|Assembler command|as", + "CC|C compiler command (example: 'gcc -m64')|cc", + "CFLAGS|C compiler flags (example: '-funit-at-a-time')", + "LDFLAGS|linker flags (example: '-L/opt/lib64')", + "LIBS|additional libraries (example: 'LIBS=-lacml_mv')", + "DESTDIR|specifies base of installation" +) -Advanced options: - --disable-fastmemcpy disable 3dnow/sse/mmx optimized memcpy() [enable] - --disable-fastcall disable regparm method on x86 systems [autodetect] - --enable-debug[=1-3] compile debugging information into mplayerxp [disable] - --enable-profile compile profiling information into mplayerxp [disable] - --enable-gcov compile gnu coverage information into biew [disable] +HELP_LIST=( + "PATH_LIST|Fine tuning of the installation directories|--", + "PROGNAME_LIST|Program names|--", + "SYSTYPES_LIST|System types|--", + "EXTRA_LIST|Extralist|--", + "ENABLED_LIST|Optional list of enabled fautures|--disable-", + "DISABLED_LIST|Optional list of disabled fautures|--enable-", + "ENVIRONMENT_LIST|Environment variables| " +) -Use these options if autodetection fails: - --asflags=ASFLAGS add ASFLAGS to [$ASFLAGS] - --cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] - --ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS] - --extralibs=ELIBS add ELIBS [$ELIBS] +DEFAULT_LIST=( + "PATH_LIST|Fine tuning of the installation directories|--", + "SYSTYPES_LIST|System types|--", + "PROGNAME_LIST|Program names|--", + "EXTRA_LIST|Extralist|--" +) -Environment variables: - MAKE Make command (example: "make -j") - AS Assembler command - CC C compiler command (example: "gcc -m64 -mveclibabi=acml") - CFLAGS C compiler flags (example: - "-O3 -msse -msse2 -msse3 -mfpmath=387,sse -mfancy-math-387 - -ffast-math -funroll-all-loops -ftree-loop-optimize - -ftree-vect-loop-version -ftree-vectorize -fomit-frame-pointer - -finline-functions-called-once -funit-at-a-time -pipe") - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - LIBS specifies additional libs (like: export LIBS=-lacml_mv) - DESTDIR specifies base of installation +enable_list "ENABLED_LIST" +disable_list "DISABLED_LIST" +make_defaults "DEFAULT_LIST" +make_environment "ENVIRONMENT_LIST" -EOF - exit 0 - fi -done # for parm in ... +gas=`$cc -print-prog-name=as` +test -n $gas && as=$gas -# GOTCHA: the variables below defines the default behavior for autodetection -# and have - unless stated otherwise - at least 2 states : yes no -# If autodetection is available then the third state is: auto -ENABLED_LIST=' - shared - gomp - fastcall - fastmemcpy - streaming - af_inet6 - termcap - termios - shm - rtc - iconv - winsock2 - largefiles - alsa - arts - esd - openal - nas - jack - libcdio - fbdev - jpg - lirc - lircc - ossaudio - joystick - libcss - libdvdread - libdvdnav - png - sdl - sdl_image - libvcd - tv_v4l - x11 - xdpms - xv - xinerama - xf86vm - opengl - vdpau - dga - vesa - vidix - audio_select - tv -' -DISABLED_LIST=' - gcov - profile - static -' - -enable $ENABLED_LIST -disable $DISABLED_LIST - -AUTOCONF_LIST=" - $ENABLED_LIST - $DISABLED_LIST -" - -PATH_LIST=' - prefix - datadir - confdir - libdir - codecdir -' - -SYSCONF_LIST=" - build - host - cc - as - ld - ldconfig - install - program_suffix - pkg_config - language - $PATH_LIST -" - -EXTRA_LIST=' - asflags - cflags - ldflags - extralibs -' - -# 1st pass checking for vital options -cc=gcc -test "$CC" && cc="$CC" -as=`$cc -print-prog-name=as` -test -z "$as" && as=as -ld=$cc -ldconfig=ldconfig -install=install -linux_devfs=no -bad_options= -program_suffix= -pkg_config=pkg-config -debug= -language= -prefix="/usr/local" for ac_option do optval="${ac_option#*=}" case "$ac_option" in - --enable-debug) - debug='-g' + --help) + print_help "HELP_LIST" + exit 0 ;; - --enable-debug=*) - debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2` - ;; - --enable-*=*|--disable-*=*) eval $(echo "${ac_option%%=*}" | sed 's/--/action=/;s/-/ thing=/') - is_in ${thing} $AUTOCONF_LIST || bad_options="$ac_option $bad_options" + in_list "AUTOCONF_LIST" ${thing} || bad_options="$ac_option $bad_options" if test "$action" = "disable"; then test "${optval}" = "no" && action=enable else test "${optval}" = "no" && action=disable fi + echo "$action ${thing}" $action ${thing} ;; --enable-?*|--disable-?*) eval $(echo "$ac_option" | sed 's/--/action=/;s/-/ thing=/;s/-/_/g') - is_in ${thing} $AUTOCONF_LIST || bad_options="$ac_option $bad_options" + in_list "AUTOCONF_LIST" ${thing} || bad_options="$ac_option $bad_options" +# echo "$action ${thing}" $action ${thing} ;; *) optname="${ac_option%%=*}" optname="${optname#--}" - optname=$(echo "$optname" | sed 's/-/_/g') - if is_in $optname $SYSCONF_LIST; then + optname=${optname//-/_} + if in_list "SYSCONF_LIST" $optname ; then +# echo "eval $optname=$optval" eval $optname=$optval - elif is_in $optname $EXTRA_LIST; then + elif in_list "ADD_LIST" $optname ; then action="add_$optname" +# echo "$action ${optval}" $action ${optval} else bad_options="$ac_option $bad_options" @@ -298,13 +219,6 @@ esac done -# LGB: temporary files -for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do - test "$I" && break -done - -enabled static && add_ldflags "-static" - mktmps guess_target mp_config.mak mp_config.h @@ -316,6 +230,7 @@ # (libraries) which might be installed into /usr/local. Let users use this # stuff explicitly as command line argument. In other words: It would be # resonable have or only /usr/include or only /usr/local/include. +enabled static && add_ldflags "-static" if freebsd ; then add_ldflags "-L/usr/local/lib" @@ -386,7 +301,8 @@ fi echocheck "Program name" -prog_alias="mplayerxp$program_suffix" +prog_alias=$program_transform_name +prog_alias="$program_prefix$prog_alias$program_suffix" echores "$prog_alias" # Atmos: moved this here, to be correct, if --prefix is specified @@ -397,9 +313,6 @@ test -z "$libdir" && libdir="." test -z "$codecdir" && codecdir="." else -test -z "$datadir" && datadir="$prefix/share/$prog_alias" -test -z "$confdir" && confdir="$datadir" -test -z "$libdir" && libdir="$prefix/lib" test -z "$codecdir" && codecdir="$libdir/$prog_alias" fi @@ -436,6 +349,7 @@ ###################### # MAIN TESTS GO HERE # ###################### +add_cflags "-I$srcdir" disable ffmpeg @@ -531,7 +445,7 @@ enabled mmap && check_func2 "sys/mman.h" mlock print_config HAVE_ mp_config.h mp_config.mak mlock -check_func2 "stdarg.h" vsscanf +check_func2 "stdio.h stdarg.h" vsscanf print_config HAVE_ mp_config.h mp_config.mak vsscanf if enabled termcap; then @@ -608,6 +522,25 @@ mp_help="nls/help_mp-$linguas.h" test -f nls/help_mp-$linguas.h || die "nls/help_mp-$linguas.h not found" +enable win32loader +if win32 || ! x86_32 ; then +disable win32loader +fi +win32 && add_ldflags -lkernel32 +print_config HAVE_ mp_config.h mp_config.mak win32loader + +echo -n "win32 dll's ... " +if test -z "$win32libdir" ; then + for I in /usr/local/lib/win32 /usr/lib/win32 ; do + if test -d "$I" ; then + win32libdir="$I" + break; + fi; + done +fi +echo "$win32libdir" +echo "#define WIN32_PATH \"$win32libdir\"" >>mp_config.h + ######### # VIDEO # ######### @@ -795,15 +728,6 @@ # 64 bit file offsets? enabled largefiles && CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D__USE_LARGEFILE -D_LARGEFILE64_SOURCE" -# Determine OS dependent libs -if win32 ; then - def_win32_cmt='/* using native windows system */' - def_win32_loader='#undef WIN32_LOADER' -else - def_win32_cmt='/* using non-native windows system */' - def_win32_loader='#define WIN32_LOADER 1' -fi - # Dynamic linking flags # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly) bsd && add_ldflags "-rdynamic" @@ -827,6 +751,7 @@ LANG = C prefix = $prefix +BINDIR = $bindir DATADIR = $datadir CONFDIR = $confdir LIBDIR = $libdir @@ -868,6 +793,7 @@ /* Common data directory (for fonts, etc) */ #define PROGNAME "$prog_alias" +#define BINDIR "$bindir" #define DATADIR "$datadir" #define CONFDIR "$confdir" #define LIBDIR "$libdir" @@ -933,9 +859,6 @@ $def_ossaudio_devdsp $def_ossaudio_devmixer -$def_win32_cmt -$def_win32_loader - #ifdef sun #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE Modified: mplayerxp/libmpcodecs/Makefile =================================================================== --- mplayerxp/libmpcodecs/Makefile 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/Makefile 2009-12-26 10:39:37 UTC (rev 54) @@ -5,19 +5,56 @@ DO_MAKE = @ for i in $(SUBDIRS); do $(MAKE) -C $$i $@ || exit; done DO_ALL = @ for i in $(SUBDIRS); do $(MAKE) -C $$i all || exit; done -SRCS=dec_video.c vd.c vd_null.c vd_ffmpeg.c vd_divx4.c vd_raw.c vd_nuv.c vd_libmpeg2.c vd_dshow.c vd_vfw.c vd_xvid.c vd_xanim.c vd_mpegpes.c vd_huffyuv.c vd_real.c vd_dmo.c vd_qtvideo.c vd_theora.c -SRCS+=ad.c dec_audio.c ad_null.c ad_ffmp3.c ad_mp3.c ad_a52.c ad_dca.c ad_hwac3.c ad_pcm.c ad_dvdpcm.c ad_dshow.c ad_acm.c ad_vorbis.c ad_real.c ad_dmo.c ad_qtaudio.c ad_faad.c ad_twin.c -SRCS+=codecs_ld.c +SRCS=dec_video.c \ + vd.c \ + vd_null.c \ + vd_ffmpeg.c \ + vd_divx4.c \ + vd_raw.c \ + vd_nuv.c \ + vd_libmpeg2.c \ + vd_xvid.c \ + vd_xanim.c \ + vd_mpegpes.c \ + vd_huffyuv.c \ + vd_real.c \ + vd_theora.c \ + ad.c \ + dec_audio.c \ + ad_null.c \ + ad_ffmp3.c \ + ad_mp3.c \ + ad_a52.c \ + ad_dca.c \ + ad_hwac3.c \ + ad_pcm.c \ + ad_dvdpcm.c \ + ad_vorbis.c \ + ad_real.c \ + ad_faad.c \ + codecs_ld.c +ifeq ($(HAVE_WIN32LOADER),yes) +SRCS+=vd_dshow.c \ + vd_vfw.c \ + vd_dmo.c \ + vd_qtvideo.c \ + ad_dshow.c \ + ad_acm.c \ + ad_dmo.c \ + ad_qtaudio.c \ + ad_twin.c +endif + OBJS=$(SRCS:.c=.o) -CFLAGS = $(OPTFLAGS) -I. -I.. -I../libmpdemux -I../loader -Wall +CFLAGS = $(OPTFLAGS) -I. -I.. -I../libmpdemux -I../loader -Wall .SUFFIXES: .c .o .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: $(LIBNAME) $(SUBDIRS): $(DO_ALL) Modified: mplayerxp/libmpcodecs/ad.c =================================================================== --- mplayerxp/libmpcodecs/ad.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad.c 2009-12-26 10:39:37 UTC (rev 54) @@ -23,7 +23,7 @@ extern const ad_functions_t mpcodecs_ad_hwac3; extern const ad_functions_t mpcodecs_ad_pcm; extern const ad_functions_t mpcodecs_ad_dvdpcm; -extern const ad_functions_t mpcodecs_ad_divx; +extern const ad_functions_t mpcodecs_ad_dshow; extern const ad_functions_t mpcodecs_ad_msacm; extern const ad_functions_t mpcodecs_ad_faad; extern const ad_functions_t mpcodecs_ad_vorbis; @@ -42,14 +42,16 @@ &mpcodecs_ad_ffmp3, &mpcodecs_ad_pcm, &mpcodecs_ad_dvdpcm, - &mpcodecs_ad_divx, - &mpcodecs_ad_msacm, &mpcodecs_ad_faad, &mpcodecs_ad_vorbis, &mpcodecs_ad_real, +#ifdef HAVE_WIN32LOADER + &mpcodecs_ad_dshow, &mpcodecs_ad_twin, + &mpcodecs_ad_msacm, &mpcodecs_ad_dmo, &mpcodecs_ad_qtaudio, +#endif NULL }; Modified: mplayerxp/libmpcodecs/ad_acm.c =================================================================== --- mplayerxp/libmpcodecs/ad_acm.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad_acm.c 2009-12-26 10:39:37 UTC (rev 54) @@ -6,7 +6,7 @@ #define __AD_ACM #include "ad_internal.h" #include "codecs_ld.h" -#include "../../loader/wineacm.h" +#include "loader/wineacm.h" #include "../libmpdemux/aviprint.h" #include "help_mp.h" @@ -24,23 +24,6 @@ LIBAD_EXTERN(msacm) -/* ACM audio and VfW video codecs initialization */ -/* based on the avifile library [http://divx.euro.ru] */ -static MMRESULT WINAPI (*acmStreamConvert_ptr)(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert); -static MMRESULT WINAPI (*acmStreamOpen_ptr)(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc,PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD dwCallback,DWORD dwInstance, DWORD fdwOpen); -static MMRESULT WINAPI (*acmStreamClose_ptr)(HACMSTREAM has, DWORD fdwClose); -static MMRESULT WINAPI (*acmStreamPrepareHeader_ptr)(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare); -static MMRESULT WINAPI (*acmStreamSize_ptr)(HACMSTREAM has, DWORD cbInput,LPDWORD pdwOutputBytes, DWORD fdwSize); -static MMRESULT WINAPI (*acmStreamUnprepareHeader_ptr)(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare); -static PWINE_ACMDRIVERID (*MSACM_RegisterDriver_ptr)(const char* pszFileName,WORD wFormatTag,HINSTANCE hinstModule); -#define acmStreamConvert(a,b,c) (*acmStreamConvert_ptr)(a,b,c) -#define acmStreamOpen(a,b,c,d,e,f,g,h) (*acmStreamOpen_ptr)(a,b,c,d,e,f,g,h) -#define acmStreamClose(a,b) (*acmStreamClose_ptr)(a,b) -#define acmStreamPrepareHeader(a,b,c) (*acmStreamPrepareHeader_ptr)(a,b,c) -#define acmStreamSize(a,b,c,d) (*acmStreamSize_ptr)(a,b,c,d) -#define acmStreamUnprepareHeader(a,b,c) (*acmStreamUnprepareHeader_ptr)(a,b,c) -#define MSACM_RegisterDriver(a,b,c) (*MSACM_RegisterDriver_ptr)(a,b,c) - typedef struct acm_priv_s { float pts; @@ -48,23 +31,6 @@ HACMSTREAM srcstream; // handle }acm_priv_t; -static void *dll_handle; -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - acmStreamConvert_ptr = ld_sym(dll_handle,"acmStreamConvert"); - acmStreamOpen_ptr = ld_sym(dll_handle,"acmStreamOpen"); - acmStreamClose_ptr = ld_sym(dll_handle,"acmStreamClose"); - acmStreamPrepareHeader_ptr = ld_sym(dll_handle,"acmStreamPrepareHeader"); - acmStreamSize_ptr = ld_sym(dll_handle,"acmStreamSize"); - acmStreamUnprepareHeader_ptr = ld_sym(dll_handle,"acmStreamUnprepareHeader"); - MSACM_RegisterDriver_ptr = ld_sym(dll_handle,"MSACM_RegisterDriver"); - return acmStreamConvert_ptr && acmStreamOpen_ptr && - acmStreamPrepareHeader_ptr && acmStreamSize_ptr && - acmStreamUnprepareHeader_ptr && acmStreamClose_ptr && - MSACM_RegisterDriver_ptr; -} - static int init_acm_audio_codec(sh_audio_t *sh_audio){ HRESULT ret; WAVEFORMATEX *in_fmt=sh_audio->wf; @@ -123,8 +89,6 @@ if(srcsize<in_fmt->nBlockAlign) srcsize=2*in_fmt->nBlockAlign; sh_audio->audio_in_minsize=srcsize; // audio input min. size MSG_V("Audio ACM input buffer min. size: %ld\n",srcsize); - - sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; sh_audio->channels=priv->o_wf.nChannels; sh_audio->samplerate=priv->o_wf.nSamplesPerSec; @@ -140,9 +104,9 @@ { HRESULT ret; acm_priv_t *priv=sh_audio->context; - + ret = acmStreamClose(priv->srcstream, 0); - + if (ret) switch(ret) { @@ -157,7 +121,7 @@ default: MSG_WARN( "ACM_Decoder: unknown error occured: %d\n", ret); return(0); - } + } /* MSACM_UnregisterAllDrivers();*/ return(1); } @@ -180,7 +144,6 @@ acm_priv_t *priv; if(!(sh_audio->context=malloc(sizeof(acm_priv_t)))) return 0; priv=sh_audio->context; - if(!load_lib(wineld_name("libloader"SLIBSUFFIX))) return 0; if(!init_acm_audio_codec(sh_audio)){ MSG_ERR(MSGTR_ACMiniterror); return 0; @@ -193,7 +156,6 @@ { close_acm_audio_codec(sh); free(sh->context); - dlclose(dll_handle); } int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) @@ -268,13 +230,13 @@ } hr=acmStreamConvert(priv->srcstream,&ash,0); if(hr){ - MSG_DBG2("ACM_Decoder: acmStreamConvert error %d\n",(int)hr); - switch(hr) - { - case ACMERR_NOTPOSSIBLE: - case ACMERR_UNPREPARED: - MSG_DBG2( "ACM_Decoder: acmStreamConvert error: probarly not initialized!\n"); - } + MSG_DBG2("ACM_Decoder: acmStreamConvert error %d\n",(int)hr); + switch(hr) + { + case ACMERR_NOTPOSSIBLE: + case ACMERR_UNPREPARED: + MSG_DBG2( "ACM_Decoder: acmStreamConvert error: probarly not initialized!\n"); + } } MSG_DBG2("acm converted %d -> %d\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed); if(ash.cbSrcLengthUsed>=sh_audio->a_in_buffer_len){ Modified: mplayerxp/libmpcodecs/ad_dmo.c =================================================================== --- mplayerxp/libmpcodecs/ad_dmo.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad_dmo.c 2009-12-26 10:39:37 UTC (rev 54) @@ -25,7 +25,7 @@ LIBAD_EXTERN(dmo) -#include "../../loader/dmo/DMO_AudioDecoder.h" +#include "loader/dmo/DMO_AudioDecoder.h" typedef struct dmo_priv_s { @@ -33,31 +33,6 @@ DMO_AudioDecoder* ds_adec; }dmo_priv_t; -static DMO_AudioDecoder* (*DMO_AudioDecoder_Open_ptr)(char* dllname, GUID* guid, WAVEFORMATEX* wf,int out_channels); -static void (*DMO_AudioDecoder_Destroy_ptr)(DMO_AudioDecoder *this); -static int (*DMO_AudioDecoder_Convert_ptr)(DMO_AudioDecoder *this, const void* in_data, unsigned int in_size, - void* out_data, unsigned int out_size, - unsigned int* size_read, unsigned int* size_written); -static int (*DMO_AudioDecoder_GetSrcSize_ptr)(DMO_AudioDecoder *this, int dest_size); - -#define DMO_AudioDecoder_Open(a,b,c,d) (*DMO_AudioDecoder_Open_ptr)(a,b,c,d) -#define DMO_AudioDecoder_Destroy(a) (*DMO_AudioDecoder_Destroy_ptr)(a) -#define DMO_AudioDecoder_Convert(a,b,c,d,e,f,g) (*DMO_AudioDecoder_Convert_ptr)(a,b,c,d,e,f,g) -#define DMO_AudioDecoder_GetSrcSize(a,b) (*DMO_AudioDecoder_GetSrcSize_ptr)(a,b) - -static void *dll_handle; -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - DMO_AudioDecoder_Open_ptr = ld_sym(dll_handle,"DMO_AudioDecoder_Open"); - DMO_AudioDecoder_Destroy_ptr = ld_sym(dll_handle,"DMO_AudioDecoder_Destroy"); - DMO_AudioDecoder_Convert_ptr = ld_sym(dll_handle,"DMO_AudioDecoder_Convert"); - DMO_AudioDecoder_GetSrcSize_ptr = ld_sym(dll_handle,"DMO_AudioDecoder_GetSrcSize"); - return DMO_AudioDecoder_Open_ptr && DMO_AudioDecoder_Destroy_ptr && DMO_AudioDecoder_Convert_ptr && - DMO_AudioDecoder_GetSrcSize_ptr; -} - - static int init(sh_audio_t *sh) { return 1; @@ -72,7 +47,6 @@ audio_output_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1); if(!(sh_audio->context=malloc(sizeof(dmo_priv_t)))) return 0; priv=sh_audio->context; - if(!load_lib(wineld_name("DMO_Filter"SLIBSUFFIX))) return 0; if(!(priv->ds_adec=DMO_AudioDecoder_Open(sh_audio->codec->dll_name,&sh_audio->codec->guid,sh_audio->wf,chans))) { MSG_ERR(MSGTR_MissingDLLcodec,sh_audio->codec->dll_name); @@ -94,7 +68,6 @@ dmo_priv_t*priv = sh->context; DMO_AudioDecoder_Destroy(priv->ds_adec); free(priv); - dlclose(dll_handle); } static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) Modified: mplayerxp/libmpcodecs/ad_dshow.c =================================================================== --- mplayerxp/libmpcodecs/ad_dshow.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad_dshow.c 2009-12-26 10:39:37 UTC (rev 54) @@ -5,7 +5,7 @@ #include "ad_internal.h" #include "mp_config.h" #include "help_mp.h" -#include "interface/dshow/DS_AudioDecoder.h" +#include "loader/dshow/DS_AudioDecoder.h" #include "codecs_ld.h" static const ad_info_t info = @@ -20,7 +20,7 @@ { NULL, NULL, 0, 0, 0, 0, NULL} }; -LIBAD_EXTERN(divx) +LIBAD_EXTERN(dshow) typedef struct dshow_priv_s { @@ -28,27 +28,6 @@ DS_AudioDecoder* ds_adec; }dshow_priv_t; -DS_AudioDecoder * (*DS_AudioDecoder_Open_ptr)(char* dllname, GUID* guid, WAVEFORMATEX* wf); -int (*DS_AudioDecoder_Convert_ptr)(DS_AudioDecoder *this, const void* in_data, unsigned int in_size, - void* out_data, unsigned int out_size, - unsigned int* size_read, unsigned int* size_written); -int (*DS_AudioDecoder_GetSrcSize_ptr)(DS_AudioDecoder *this, int dest_size); -void (*DS_AudioDecoder_Destroy_ptr)(DS_AudioDecoder *this); - -static void *dll_handle; - -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - DS_AudioDecoder_Open_ptr = ld_sym(dll_handle,"DS_AudioDecoder_Open"); - DS_AudioDecoder_Destroy_ptr = ld_sym(dll_handle,"DS_AudioDecoder_Destroy"); - DS_AudioDecoder_Convert_ptr = ld_sym(dll_handle,"DS_AudioDecoder_Convert"); - DS_AudioDecoder_GetSrcSize_ptr = ld_sym(dll_handle,"DS_AudioDecoder_GetSrcSize"); - return DS_AudioDecoder_Open_ptr && DS_AudioDecoder_Convert_ptr && - DS_AudioDecoder_GetSrcSize_ptr && DS_AudioDecoder_Destroy_ptr; -} - - int init(sh_audio_t *sh) { return 1; @@ -58,9 +37,8 @@ { dshow_priv_t *priv; if(!(sh_audio->context=malloc(sizeof(dshow_priv_t)))) return 0; - if(!load_lib(wineld_name("DS_Filter"SLIBSUFFIX))) return 0; priv=sh_audio->context; - if(!(priv->ds_adec=(*DS_AudioDecoder_Open_ptr)(sh_audio->codec->dll_name,&sh_audio->codec->guid,sh_audio->wf))) + if(!(priv->ds_adec=DS_AudioDecoder_Open(sh_audio->codec->dll_name,&sh_audio->codec->guid,sh_audio->wf))) { MSG_ERR(MSGTR_MissingDLLcodec,sh_audio->codec->dll_name); free(sh_audio->context); @@ -79,9 +57,8 @@ void uninit(sh_audio_t *sh) { dshow_priv_t* priv = sh->context; - (*DS_AudioDecoder_Destroy_ptr)(priv->ds_adec); + DS_AudioDecoder_Destroy(priv->ds_adec); free(priv); - dlclose(dll_handle); } int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) @@ -115,7 +92,7 @@ int len=-1; { int size_in=0; int size_out=0; - int srcsize=(*DS_AudioDecoder_GetSrcSize_ptr)(priv->ds_adec, maxlen); + int srcsize=DS_AudioDecoder_GetSrcSize(priv->ds_adec, maxlen); MSG_DBG3("DShow says: srcsize=%d (buffsize=%d) out_size=%d\n",srcsize,sh_audio->a_in_buffer_size,maxlen); if(srcsize>sh_audio->a_in_buffer_size) srcsize=sh_audio->a_in_buffer_size; // !!!!!! if(sh_audio->a_in_buffer_len<srcsize){ @@ -127,7 +104,7 @@ priv->pts=*pts; } else *pts=priv->pts; - (*DS_AudioDecoder_Convert_ptr)(priv->ds_adec, sh_audio->a_in_buffer,sh_audio->a_in_buffer_len, + DS_AudioDecoder_Convert(priv->ds_adec, sh_audio->a_in_buffer,sh_audio->a_in_buffer_len, buf,maxlen, &size_in,&size_out); MSG_DBG2("DShow: audio %d -> %d converted (in_buf_len=%d of %d) %d\n",size_in,size_out,sh_audio->a_in_buffer_len,sh_audio->a_in_buffer_size,ds_tell_pts_r(sh_audio->ds)); if(size_in>=sh_audio->a_in_buffer_len){ Modified: mplayerxp/libmpcodecs/ad_internal.h =================================================================== --- mplayerxp/libmpcodecs/ad_internal.h 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad_internal.h 2009-12-26 10:39:37 UTC (rev 54) @@ -1,5 +1,5 @@ #ifdef __AD_ACM /* simply ugly hack */ -#include "wine/msacm.h" +#include "loader/wine/msacm.h" #endif #include "codec-cfg.h" Modified: mplayerxp/libmpcodecs/ad_qtaudio.c =================================================================== --- mplayerxp/libmpcodecs/ad_qtaudio.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad_qtaudio.c 2009-12-26 10:39:37 UTC (rev 54) @@ -49,23 +49,23 @@ typedef int (__cdecl* LPFUNC2)(const SoundComponentData *, const SoundComponentData *,SoundConverter *); typedef int (__cdecl* LPFUNC3)(SoundConverter sc); typedef int (__cdecl* LPFUNC4)(void); -typedef int (__cdecl* LPFUNC5)(SoundConverter sc, OSType selector,void * infoPtr); -typedef int (__cdecl* LPFUNC6)(SoundConverter sc, - unsigned long inputBytesTarget, - unsigned long *inputFrames, - unsigned long *inputBytes, - unsigned long *outputBytes ); -typedef int (__cdecl* LPFUNC7)(SoundConverter sc, - const void *inputPtr, - unsigned long inputFrames, - void *outputPtr, - unsigned long *outputFrames, - unsigned long *outputBytes ); +typedef int (__cdecl* LPFUNC5)(SoundConverter sc, OSType selector,void * infoPtr); +typedef int (__cdecl* LPFUNC6)(SoundConverter sc, + unsigned long inputBytesTarget, + unsigned long *inputFrames, + unsigned long *inputBytes, + unsigned long *outputBytes ); +typedef int (__cdecl* LPFUNC7)(SoundConverter sc, + const void *inputPtr, + unsigned long inputFrames, + void *outputPtr, + unsigned long *outputFrames, + unsigned long *outputBytes ); typedef int (__cdecl* LPFUNC8)(SoundConverter sc, - void *outputPtr, + void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes); -typedef int (__cdecl* LPFUNC9)(SoundConverter sc) ; +typedef int (__cdecl* LPFUNC9)(SoundConverter sc); static HINSTANCE qtml_dll; static LPFUNC1 InitializeQTML; @@ -80,35 +80,10 @@ #define siDecompressionParams 2002876005 // siDecompressionParams = FOUR_CHAR_CODE('wave') -static HMODULE (* WINAPI LoadLibraryA_ptr)(LPCSTR); -static FARPROC (* WINAPI GetProcAddress_ptr)(HMODULE,LPCSTR); -static int (* WINAPI FreeLibrary_ptr)(HMODULE); -#ifdef WIN32_LOADER -static ldt_fs_t* (*Setup_LDT_Keeper_ptr)(void); -#endif -#define LoadLibraryA(a) (*LoadLibraryA_ptr)(a) -#define GetProcAddress(a,b) (*GetProcAddress_ptr)(a,b) -#define FreeLibrary(a) (*FreeLibrary_ptr)(a) -#define Setup_LDT_Keeper() (*Setup_LDT_Keeper_ptr)() +HMODULE WINAPI LoadLibraryA(LPCSTR); +FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR); +int WINAPI FreeLibrary(HMODULE); -static void *dll_handle; -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - LoadLibraryA_ptr = ld_sym(dll_handle,"LoadLibraryA"); - GetProcAddress_ptr = ld_sym(dll_handle,"GetProcAddress"); - FreeLibrary_ptr = ld_sym(dll_handle,"FreeLibrary"); -#ifdef WIN32_LOADER - Setup_LDT_Keeper_ptr = ld_sym(dll_handle,"Setup_LDT_Keeper"); -#endif - return LoadLibraryA_ptr && GetProcAddress_ptr && FreeLibrary_ptr -#ifdef WIN32_LOADER - && Setup_LDT_Keeper_ptr -#endif - ; -} - - static int loader_init() { #ifdef WIN32_LOADER @@ -181,8 +156,8 @@ return 0; } -static SoundConverter myConverter = NULL; -static SoundComponentData InputFormatInfo,OutputFormatInfo; +static SoundConverter myConverter = NULL; +static SoundComponentData InputFormatInfo,OutputFormatInfo; static int InFrameSize; static int OutFrameSize; @@ -200,20 +175,19 @@ return 0; } MSG_INFO("win32 libquicktime loader (c) Sascha Sommer\n"); - if(!load_lib(wineld_name("libloader"SLIBSUFFIX))) return 0; #ifdef MACOSX EnterMovies(); #else if(loader_init()) return 0; // failed to load DLL - + MSG_V("loader_init DONE!\n"); error = InitializeQTML(6+16); MSG_ERR("InitializeQTML:%i\n",error); if(error) return 0; #endif - + #if 1 OutputFormatInfo.flags = InputFormatInfo.flags = 0; OutputFormatInfo.sampleCount = InputFormatInfo.sampleCount = 0; @@ -244,7 +218,7 @@ MSG_V("InputBufferSize = %li\n",InputBufferSize); MSG_V("OutputBufferSize = %li\n",OutputBufferSize); MSG_V("FramesToGet = %li\n",FramesToGet); - + InFrameSize=(InputBufferSize+FramesToGet-1)/FramesToGet; OutFrameSize=OutputBufferSize/FramesToGet; @@ -256,7 +230,7 @@ sh->audio_out_minsize=OutputBufferSize; sh->audio_in_minsize=InputBufferSize; - + sh->channels=sh->wf->nChannels; sh->samplerate=sh->wf->nSamplesPerSec; sh->samplesize=2; //(sh->wf->wBitsPerSample+7)/8; @@ -301,7 +275,6 @@ #ifdef MACOSX ExitMovies(); #endif - dlclose(dll_handle); } static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen,float *pts){ @@ -310,7 +283,7 @@ unsigned long InputBufferSize=0; //size of the input buffer unsigned long ConvertedFrames=0; unsigned long ConvertedBytes=0; - + FramesToGet=minlen/OutFrameSize; if(FramesToGet*OutFrameSize<minlen && (FramesToGet+1)*OutFrameSize<=maxlen) ++FramesToGet; @@ -329,7 +302,7 @@ if(InputBufferSize>sh->a_in_buffer_len) FramesToGet=sh->a_in_buffer_len/InFrameSize; // not enough data! } - + // printf("\nSoundConverterConvertBuffer(myConv=%p,inbuf=%p,frames=%d,outbuf=%p,&convframes=%p,&convbytes=%p)\n", // myConverter,sh->a_in_buffer,FramesToGet,buf,&ConvertedFrames,&ConvertedBytes); error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer, @@ -337,7 +310,7 @@ // printf("SoundConverterConvertBuffer:%i\n",error); // printf("ConvertedFrames = %li\n",ConvertedFrames); // printf("ConvertedBytes = %li\n",ConvertedBytes); - + // InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!! InputBufferSize=FramesToGet*InFrameSize; sh->a_in_buffer_len-=InputBufferSize; Modified: mplayerxp/libmpcodecs/ad_twin.c =================================================================== --- mplayerxp/libmpcodecs/ad_twin.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/ad_twin.c 2009-12-26 10:39:37 UTC (rev 54) @@ -6,9 +6,8 @@ #include "ad_internal.h" #include "codecs_ld.h" #include "interface/vqf.h" -#ifdef WIN32_LOADER -#include "../../loader/ldt_keeper.h" -#endif +#include "loader/ldt_keeper.h" +#include "loader/wine/windef.h" #include "../libao2/afmt.h" #include "../libmpdemux/aviprint.h" @@ -28,16 +27,9 @@ LIBAD_EXTERN(twin) -static HMODULE (* WINAPI LoadLibraryA_ptr)(LPCSTR); -static FARPROC (* WINAPI GetProcAddress_ptr)(HMODULE,LPCSTR); -static int (* WINAPI FreeLibrary_ptr)(HMODULE); -#ifdef WIN32_LOADER -static ldt_fs_t* (*Setup_LDT_Keeper_ptr)(void); -#endif -#define LoadLibraryA(a) (*LoadLibraryA_ptr)(a) -#define GetProcAddress(a,b) (*GetProcAddress_ptr)(a,b) -#define FreeLibrary(a) (*FreeLibrary_ptr)(a) -#define Setup_LDT_Keeper() (*Setup_LDT_Keeper_ptr)() +extern void* WINAPI LoadLibraryA(char* name); +extern void* WINAPI GetProcAddress(void* handle, char* func); +extern int WINAPI FreeLibrary(void* handle); static int (*TvqInitialize_ptr)( headerInfo *setupInfo, INDEX *index, int dispErrorMessageBox ); #define TvqInitialize(a,b,c) (*TvqInitialize_ptr)(a,b,c) @@ -81,23 +73,7 @@ char buf[BBUFSIZ]; /* the bit buffer */ }vqf_priv_t; -static void *dll_handle; static HINSTANCE vqf_dll; -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - LoadLibraryA_ptr = ld_sym(dll_handle,"LoadLibraryA"); - GetProcAddress_ptr = ld_sym(dll_handle,"GetProcAddress"); - FreeLibrary_ptr = ld_sym(dll_handle,"FreeLibrary"); -#ifdef WIN32_LOADER - Setup_LDT_Keeper_ptr = ld_sym(dll_handle,"Setup_LDT_Keeper"); -#endif - return LoadLibraryA_ptr && GetProcAddress_ptr && FreeLibrary_ptr -#ifdef WIN32_LOADER - && Setup_LDT_Keeper_ptr -#endif - ; -} static int load_dll( const char *libname ) { @@ -199,7 +175,6 @@ vqf_priv_t *priv; if(!(sh_audio->context=malloc(sizeof(vqf_priv_t)))) return 0; priv=sh_audio->context; - if(!load_lib(wineld_name("libloader"SLIBSUFFIX))) return 0; if(!load_dll((const char *)sh_audio->codec->dll_name)) { MSG_ERR("win32.dll looks broken :(\n"); @@ -218,7 +193,6 @@ close_vqf_audio_codec(sh); free(sh->context); FreeLibrary(vqf_dll); - dlclose(dll_handle); } int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) Modified: mplayerxp/libmpcodecs/codecs_ld.c =================================================================== --- mplayerxp/libmpcodecs/codecs_ld.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/codecs_ld.c 2009-12-26 10:39:37 UTC (rev 54) @@ -33,13 +33,6 @@ return cname; } -char * wineld_name( const char *name ) -{ - strcpy(cname,CODECDIR"/wine/"); - strcat(cname,name); - return cname; -} - void * ld_sym(void *handle,const char *sym_name) { void *rval; Modified: mplayerxp/libmpcodecs/codecs_ld.h =================================================================== --- mplayerxp/libmpcodecs/codecs_ld.h 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/codecs_ld.h 2009-12-26 10:39:37 UTC (rev 54) @@ -7,7 +7,6 @@ extern void * ld_codec(const char *name,const char *url_hint); extern char * codec_name( const char *name ); -extern char * wineld_name( const char *name ); extern void * ld_sym(void *handle,const char *sym_name); #if defined(__OpenBSD__) && !defined(__ELF__) Modified: mplayerxp/libmpcodecs/vd.c =================================================================== --- mplayerxp/libmpcodecs/vd.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/vd.c 2009-12-26 10:39:37 UTC (rev 54) @@ -43,23 +43,25 @@ extern const vd_functions_t mpcodecs_vd_theora; const vd_functions_t* mpcodecs_vd_drivers[] = { - &mpcodecs_vd_null, - &mpcodecs_vd_ffmpeg, - &mpcodecs_vd_dshow, - &mpcodecs_vd_vfw, - &mpcodecs_vd_vfwex, - &mpcodecs_vd_divx4, - &mpcodecs_vd_raw, - &mpcodecs_vd_nuv, - &mpcodecs_vd_libmpeg2, - &mpcodecs_vd_xvid, - &mpcodecs_vd_mpegpes, - &mpcodecs_vd_huffyuv, - &mpcodecs_vd_xanim, - &mpcodecs_vd_real, - &mpcodecs_vd_dmo, - &mpcodecs_vd_qtvideo, - &mpcodecs_vd_theora, + &mpcodecs_vd_null, + &mpcodecs_vd_ffmpeg, +#ifdef HAVE_WIN32LOADER + &mpcodecs_vd_dshow, + &mpcodecs_vd_vfw, + &mpcodecs_vd_vfwex, + &mpcodecs_vd_dmo, + &mpcodecs_vd_qtvideo, +#endif + &mpcodecs_vd_divx4, + &mpcodecs_vd_raw, + &mpcodecs_vd_nuv, + &mpcodecs_vd_libmpeg2, + &mpcodecs_vd_xvid, + &mpcodecs_vd_mpegpes, + &mpcodecs_vd_huffyuv, + &mpcodecs_vd_xanim, + &mpcodecs_vd_real, + &mpcodecs_vd_theora, NULL }; static unsigned int nddrivers=sizeof(mpcodecs_vd_drivers)/sizeof(vd_functions_t*); Modified: mplayerxp/libmpcodecs/vd_dmo.c =================================================================== --- mplayerxp/libmpcodecs/vd_dmo.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/vd_dmo.c 2009-12-26 10:39:37 UTC (rev 54) @@ -11,7 +11,7 @@ #include "vd_internal.h" #include "codecs_ld.h" -#include "../../loader/dmo/DMO_VideoDecoder.h" +#include "loader/dmo/DMO_VideoDecoder.h" #include "vd_msg.h" static const vd_info_t info = { @@ -28,31 +28,6 @@ LIBVD_EXTERN(dmo) -static DMO_VideoDecoder * (*DMO_VideoDecoder_Open_ptr)(char* dllname, GUID* guid, BITMAPINFOHEADER * format, int flip, int maxauto); -static void (*DMO_VideoDecoder_Destroy_ptr)(DMO_VideoDecoder *this); -static void (*DMO_VideoDecoder_StartInternal_ptr)(DMO_VideoDecoder *this); -static int (*DMO_VideoDecoder_DecodeInternal_ptr)(DMO_VideoDecoder *this, const void* src, int size, int is_keyframe, char* pImage); -static int (*DMO_VideoDecoder_SetDestFmt_ptr)(DMO_VideoDecoder *this, int bits, unsigned int csp); - -#define DMO_VideoDecoder_Open(a,b,c,d,e) (*DMO_VideoDecoder_Open_ptr)(a,b,c,d,e) -#define DMO_VideoDecoder_Destroy(a) (*DMO_VideoDecoder_Destroy_ptr)(a) -#define DMO_VideoDecoder_StartInternal(a) (*DMO_VideoDecoder_StartInternal_ptr)(a) -#define DMO_VideoDecoder_DecodeInternal(a,b,c,d,e) (*DMO_VideoDecoder_DecodeInternal_ptr)(a,b,c,d,e) -#define DMO_VideoDecoder_SetDestFmt(a,b,c) (*DMO_VideoDecoder_SetDestFmt_ptr)(a,b,c) - -static void *dll_handle; -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - DMO_VideoDecoder_Open_ptr = ld_sym(dll_handle,"DMO_VideoDecoder_Open"); - DMO_VideoDecoder_Destroy_ptr = ld_sym(dll_handle,"DMO_VideoDecoder_Destroy"); - DMO_VideoDecoder_StartInternal_ptr = ld_sym(dll_handle,"DMO_VideoDecoder_StartInternal"); - DMO_VideoDecoder_DecodeInternal_ptr = ld_sym(dll_handle,"DMO_VideoDecoder_DecodeInternal"); - DMO_VideoDecoder_SetDestFmt_ptr = ld_sym(dll_handle,"DMO_VideoDecoder_SetDestFmt"); - return DMO_VideoDecoder_Open_ptr && DMO_VideoDecoder_Destroy_ptr && DMO_VideoDecoder_StartInternal_ptr && - DMO_VideoDecoder_DecodeInternal_ptr && DMO_VideoDecoder_SetDestFmt_ptr; -} - // to set/get/query special features/parameters static int control(sh_video_t *sh,int cmd,void* arg,...){ switch(cmd){ @@ -73,7 +48,6 @@ // init driver static int init(sh_video_t *sh){ unsigned int out_fmt; - if(!load_lib(wineld_name("DMO_Filter"SLIBSUFFIX))) return 0; if(!(sh->context=DMO_VideoDecoder_Open(sh->codec->dll_name,&sh->codec->guid, sh->bih, 0, 0))){ MSG_ERR(MSGTR_MissingDLLcodec,sh->codec->dll_name); MSG_HINT("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n" @@ -103,7 +77,6 @@ // uninit driver static void uninit(sh_video_t *sh){ DMO_VideoDecoder_Destroy(sh->context); - dlclose(dll_handle); } // decode a frame Modified: mplayerxp/libmpcodecs/vd_dshow.c =================================================================== --- mplayerxp/libmpcodecs/vd_dshow.c 2009-12-21 18:42:47 UTC (rev 53) +++ mplayerxp/libmpcodecs/vd_dshow.c 2009-12-26 10:39:37 UTC (rev 54) @@ -9,7 +9,7 @@ #include "vd_internal.h" -#include "interface/dshow/DS_VideoDecoder.h" +#include "loader/dshow/DS_VideoDecoder.h" #include "codecs_ld.h" static const vd_info_t info = { @@ -26,37 +26,6 @@ LIBVD_EXTERN(dshow) -void* (*DS_VideoDecoder_Open_ptr)(char* dllname, GUID* guid, BITMAPINFOHEADER* format, int flip, int maxauto); - -void (*DS_VideoDecoder_StartInternal_ptr)(void* _handle); - -void (*DS_VideoDecoder_Destroy_ptr)(void* _handle); - -int (*DS_VideoDecoder_DecodeInternal_ptr)(void* _handle, char* src, int size, int is_keyframe, char* dest); - -int (*DS_VideoDecoder_SetDestFmt_ptr)(void* _handle, int bits, int csp); - -int (*DS_VideoDecoder_SetValue_ptr)(void* _handle, char* name, int value); -int (*DS_SetAttr_DivX_ptr)(char* attribute, int value); - -static void *dll_handle; - -static int load_lib( const char *libname ) -{ - if(!(dll_handle=ld_codec(libname,NULL))) return 0; - DS_VideoDecoder_Open_ptr = ld_sym(dll_handle,"DS_VideoDecoder_Open"); - DS_VideoDecoder_StartInternal_ptr = ld_sym(dll_handle,"DS_VideoDecoder_StartInternal"); - DS_VideoDecoder_Destroy_ptr = ld_sym(dll_handle,"DS_VideoDecoder_Destroy"); - DS_VideoDecoder_DecodeInternal_ptr = ld_sym(dll_handle,"DS_VideoDecoder_DecodeInternal"); - DS_VideoDecoder_SetDestFmt_ptr = ld_sym(dll_handle,"DS_VideoDecoder_SetDestFmt"); - DS_VideoDecoder_SetValue_ptr = ld_sym(dll_handle,"DS_VideoDecoder_SetValue"); - DS_SetAttr_DivX_ptr = ld_sym(dll_handle,"DS_SetAttr_DivX"); - return DS_VideoDecoder_Open_ptr && DS_VideoDecoder_StartInternal_ptr && - DS_VideoDecoder_Destroy_ptr && DS_VideoDecoder_DecodeInternal_ptr && - DS_VideoDecoder_SetDestFmt_ptr && DS_VideoDecoder_SetValue_ptr && - DS_SetAttr_DivX_ptr; -} - // to set/get/query special features/parameters static int control(sh_video_t *sh,int cmd,void* arg,...){ switch(cmd){ @@ -64,7 +33,7 @@ return 4; case VDCTRL_SET_PP_LEVEL: if(!sh->context) return CONTROL_ERROR; - (*DS_VideoDecoder_SetValue_ptr)(sh->context,"Quality",*((int*)arg)); + DS_VideoDecoder_SetValue(sh->context,"Quality",*((int*)arg)); return CONTROL_OK; case VDCTRL_SET_EQUALIZER: { va_list ap; @@ -73,7 +42,7 @@ value=va_arg(ap, int); va_end(ap); value=(value/2)+50; - if((*DS_VideoDecoder_SetValue_ptr)(sh->context,arg,value)==0) + if(DS_VideoDecoder_SetValue(sh->context,arg,value)==0) return CONTROL_OK; return CONTROL_FALSE; } @@ -94,8 +63,7 @@ // init driver static int init(sh_video_t *sh){ unsigned int out_fmt; - if(!load_lib(wineld_name("DS_Filter"SLIBSUFFIX))) return 0; - if(!(sh->context=(*DS_VideoDecoder_Open_ptr)(sh->codec->dll_name,&sh->codec->guid, sh->bih, 0, 0))){ + if(!(sh->context=DS_VideoDecoder_Open(sh->codec->dll_name,&sh->codec->guid, sh->bih, 0, 0))){ MSG_ERR(MSGTR_MissingDLLcodec,sh->codec->dll_name); MSG_HINT("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n"); MSG_HINT("package from: ftp://mplayerhq.hu/MPlayer/releases/w32codec.zip !\n"); @@ -106,44 +74,43 @@ switch(out_fmt){ case IMGFMT_YUY2: case IMGFMT_UYVY: - (*DS_VideoDecoder_SetDestFmt_ptr)(sh->context,16,out_fmt);break; // packed YUV + DS_VideoDecoder_SetDestFmt(sh->context,16,out_fmt);break; // packed YUV case IMGFMT_YV12: case IMGFMT_I420: case IMGFMT_IYUV: - (*DS_VideoDecoder_SetDestFmt_ptr)(sh->context,12,out_fmt);break; // planar YUV + DS_VideoDecoder_SetDestFmt(sh->context,12,out_fmt);break; // planar YUV case IMGFMT_YVU9: - (*DS_VideoDecoder_SetDestFmt_ptr)(sh->context,9,out_fmt);break; + DS_VideoDecoder_SetDestFmt(sh->context,9,out_fmt);break; default: - (*DS_VideoDecoder_SetDestFmt_ptr)(sh->context,out_fmt&255,0); // RGB/BGR + DS_VideoDecoder_SetDestFmt(sh->context,out_fmt&255,0); // RGB/BGR } - (*DS_SetAtt... [truncated message content] |