diff options
84 files changed, 425 insertions, 435 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index ec17c3f873..888f3454b4 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -8196,24 +8196,14 @@ the quantizer more over time (slower change). .TP .B vqcomp=<0.0\-1.0> Quantizer compression, vrc_eq depends upon this (default: 0.5). -For instance, assuming the default rate control equation is used, -if vqcomp=1.0, the ratecontrol allocates to each frame the number of bits -needed to encode them all at the same QP. -If vqcomp=0.0, the ratecontrol allocates the same number of bits to each -frame, i.e. strict CBR. .I NOTE: -Those are extreme settings and should never be used. -Perceptual quality will be optimal somewhere in between these two extremes. +Perceptual quality will be optimal somewhere in between the range's extremes. . .TP .B vrc_eq=<equation> main ratecontrol equation .RE .RSs -.IPs "1\ \ \ \ " -constant bitrate -.IPs "tex\ \ " -constant quality .IPs 1+(tex/\:avgTex-1)*qComp approximately the equation of the old ratecontrol code .IPs tex^qComp diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1 index 9479e66411..2b1ebc814f 100644 --- a/DOCS/man/fr/mplayer.1 +++ b/DOCS/man/fr/mplayer.1 @@ -1,4 +1,4 @@ -.\" synced with r27337 +.\" synced with r27236 .\" Encoding: iso-8859-1 .\" MPlayer (C) 2000-2008 MPlayer Team .\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann @@ -961,10 +961,10 @@ fastmemcpybench: TOOLS/fastmemcpybench.c $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_3DNOW $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2 $(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2 - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DHAVE_MGA -DHAVE_MMX - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2 - $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2 + $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DCONFIG_MGA -DHAVE_MMX + $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_3DNOW + $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2 + $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DCONFIG_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2 REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c) REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0) diff --git a/TOOLS/README b/TOOLS/README index 7acf57daef..7aa32bd150 100644 --- a/TOOLS/README +++ b/TOOLS/README @@ -429,15 +429,15 @@ Note: You will need the libwww-perl stuff and the cabextract utility which can be found at http://www.kyz.uklinux.net/cabextract.php3. -install-w32codecs.sh +binary_codecs.sh Author: Andrea Menucci, thuglife Description: Downloads binary codecs from mplayerhq.hu and installs them on a Debian system. -Usage: install-w32codecs.sh install - install-w32codecs.sh uninstall +Usage: binary_codecs.sh install + binary_codecs.sh uninstall vobshift.py diff --git a/TOOLS/install-w32codecs.sh b/TOOLS/binary_codecs.sh index c4ab61cf4b..c4ab61cf4b 100755 --- a/TOOLS/install-w32codecs.sh +++ b/TOOLS/binary_codecs.sh diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c index 9a2e34a850..1e3cc14ce3 100644 --- a/TOOLS/fastmemcpybench.c +++ b/TOOLS/fastmemcpybench.c @@ -20,7 +20,7 @@ //#define ARR_SIZE 100000 #define ARR_SIZE (1024*768*2) -#ifdef HAVE_MGA +#ifdef CONFIG_MGA #include "drivers/mga_vid.h" @@ -98,7 +98,7 @@ int main( void ) unsigned char * marr1,*marr2; int i; unsigned int t; -#ifdef HAVE_MGA +#ifdef CONFIG_MGA mga_init(); marr1 = &frame[3]; #else diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 02b97ca770..bed907c14e 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -6,7 +6,7 @@ {"msglevel", (void *) msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif #ifdef WIN32 @@ -251,14 +251,14 @@ #ifdef CONFIG_LIBAVFORMAT {"lavfdopts", (void *) lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif -#if defined(HAVE_XVID3) || defined(HAVE_XVID4) +#ifdef CONFIG_XVID4 {"xvidopts", xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #endif {"codecs-file", &codecs_file, CONF_TYPE_STRING, 0, 0, 0, NULL}, // ------------------------- subtitles options -------------------- {"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI {"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL}, @@ -270,8 +270,8 @@ {"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* CONFIG_FRIBIDI */ -#ifdef CONFIG_ICONV +#endif /* HAVE_FRIBIDI */ +#ifdef HAVE_ICONV {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL}, diff --git a/cfg-mencoder.h b/cfg-mencoder.h index 5338a6f91f..2afd25945a 100644 --- a/cfg-mencoder.h +++ b/cfg-mencoder.h @@ -52,13 +52,13 @@ const m_option_t ovc_conf[]={ " vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n" " qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.\n" #endif -#ifdef HAVE_LIBDV095 +#ifdef CONFIG_LIBDV095 " libdv - DV encoding with libdv v0.9.5\n" #endif -#if defined(HAVE_XVID3) || defined(HAVE_XVID4) +#ifdef CONFIG_XVID4 " xvid - XviD encoding\n" #endif -#ifdef HAVE_X264 +#ifdef CONFIG_X264 " x264 - H.264 encoding\n" #endif "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, @@ -68,47 +68,47 @@ const m_option_t ovc_conf[]={ const m_option_t oac_conf[]={ {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL}, {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL}, -#ifdef HAVE_MP3LAME +#ifdef CONFIG_MP3LAME {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL}, #else {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_MP3LAME */ +#endif /* CONFIG_MP3LAME */ #ifdef CONFIG_LIBAVCODEC {"lavc", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_LAVC, NULL}, #else {"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif /* CONFIG_LIBAVCODEC */ -#ifdef HAVE_TOOLAME +#ifdef CONFIG_TOOLAME {"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL}, #else {"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_TOOLAME */ -#ifdef HAVE_TWOLAME +#endif /* CONFIG_TOOLAME */ +#ifdef CONFIG_TWOLAME {"twolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TWOLAME, NULL}, #else {"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_TWOLAME */ -#ifdef HAVE_FAAC +#endif /* CONFIG_TWOLAME */ +#ifdef CONFIG_FAAC {"faac", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_FAAC, NULL}, #else {"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_FAAC */ +#endif /* CONFIG_FAAC */ {"help", "\nAvailable codecs:\n" " copy - frame copy, without re-encoding (useful for AC3)\n" " pcm - uncompressed PCM audio\n" -#ifdef HAVE_MP3LAME +#ifdef CONFIG_MP3LAME " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n" #endif #ifdef CONFIG_LIBAVCODEC " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n" #endif -#ifdef HAVE_TOOLAME +#ifdef CONFIG_TOOLAME " toolame - Toolame MP2 audio encoder\n" #endif -#ifdef HAVE_TWOLAME +#ifdef CONFIG_TWOLAME " twolame - Twolame MP2 audio encoder\n" #endif -#ifdef HAVE_FAAC +#ifdef CONFIG_FAAC " faac - FAAC AAC audio encoder\n" #endif "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, @@ -217,7 +217,7 @@ const m_option_t mencoder_opts[]={ // info header strings {"info", (void *) info_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, -#ifdef HAVE_MP3LAME +#ifdef CONFIG_MP3LAME {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif #ifdef CONFIG_LIBAVCODEC @@ -225,28 +225,28 @@ const m_option_t mencoder_opts[]={ #else {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif /* CONFIG_LIBAVCODEC */ -#ifdef HAVE_TOOLAME +#ifdef CONFIG_TOOLAME {"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #else {"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_TOOLAME */ -#ifdef HAVE_TWOLAME +#endif /* CONFIG_TOOLAME */ +#ifdef CONFIG_TWOLAME {"twolameopts", twolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #else {"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_TWOLAME */ -#ifdef HAVE_FAAC +#endif /* CONFIG_TWOLAME */ +#ifdef CONFIG_FAAC {"faacopts", faacopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #else {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* HAVE_FAAC */ +#endif /* CONFIG_FAAC */ #ifdef CONFIG_WIN32DLL {"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif -#if defined(HAVE_XVID3) || defined(HAVE_XVID4) +#ifdef CONFIG_XVID4 {"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif -#if defined(HAVE_X264) +#if defined(CONFIG_X264) {"x264encopts", &x264enc_set_param, CONF_TYPE_FUNC_PARAM, CONF_GLOBAL, 0, 0, NULL}, #endif diff --git a/cfg-mplayer.h b/cfg-mplayer.h index a4350eefee..b3a4fd0451 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -135,17 +135,17 @@ const m_option_t mplayer_opts[]={ {"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, -#if defined(HAVE_FBDEV)||defined(HAVE_VESA) +#if defined(CONFIG_FBDEV) || defined(CONFIG_VESA) {"monitor-hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"monitor-vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"monitor-dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif -#ifdef HAVE_FBDEV +#ifdef CONFIG_FBDEV {"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif -#ifdef HAVE_DIRECTFB +#ifdef CONFIG_DIRECTFB #if DIRECTFBVERSION > 912 {"dfbopts", "-dfbopts has been removed. Use -vf directfb:dfbopts=... instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, #endif @@ -216,7 +216,7 @@ const m_option_t mplayer_opts[]={ {"vaa_dr", "-vaa_dr has been removed, use -dr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"vaa_nodr", "-vaa_nodr has been removed, use -nodr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, -#ifdef HAVE_AA +#ifdef CONFIG_AA // -vo aa {"aa*", "-aa* has been removed. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, #endif @@ -241,7 +241,7 @@ const m_option_t mplayer_opts[]={ #endif {"osdlevel", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL}, {"osd-duration", &osd_duration, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, -#ifdef HAVE_MENU +#ifdef CONFIG_MENU {"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL}, {"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, @@ -249,16 +249,16 @@ const m_option_t mplayer_opts[]={ {"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL}, -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI {"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL}, -#endif /* CONFIG_FRIBIDI */ +#endif /* HAVE_FRIBIDI */ #else {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, -#endif /* HAVE_MENU */ +#endif /* CONFIG_MENU */ // these should be moved to -common, and supported in MEncoder {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, @@ -297,7 +297,7 @@ const m_option_t mplayer_opts[]={ {"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1}, {"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1}, -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI {"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, {"enqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL}, diff --git a/codec-cfg.c b/codec-cfg.c index e293fb85dc..221c88dd18 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -883,7 +883,7 @@ void list_codecs(int audioflag){ /* * Fake out GUI references when building the codecs2html utility. */ -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI void gtkMessageBox( int type,char * str ) { return; } int use_gui = 0; #endif @@ -51,11 +51,11 @@ #include "libass/ass.h" #include "libass/ass_mp.h" #endif -#ifdef HAVE_MENU +#ifdef CONFIG_MENU #include "m_struct.h" #include "libmenu/menu.h" #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -977,7 +977,7 @@ static int mp_property_fullscreen(m_option_t *prop, int action, void *arg, return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiIEvent, (char *) MP_CMD_GUI_FULLSCREEN); else @@ -2492,7 +2492,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) int n = cmd->args[0].v.i == 0 ? 1 : cmd->args[0].v.i; int force = cmd->args[1].v.i; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { int i = 0; if (n > 0) @@ -3132,7 +3132,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) "Selected button number %d", button); } #endif -#ifdef HAVE_MENU +#ifdef CONFIG_MENU if (use_menu && dx >= 0.0 && dy >= 0.0) menu_update_mouse_pos(dx, dy); #endif @@ -3168,7 +3168,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) #endif default: -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ((use_gui) && (cmd->id > MP_CMD_GUI_EVENTS)) guiGetEvent(guiIEvent, (char *) cmd->id); else @@ -2598,9 +2598,9 @@ EOF cc_check && _langinfo=yes fi if test "$_langinfo" = yes ; then - _def_langinfo='#define CONFIG_LANGINFO 1' + _def_langinfo='#define HAVE_LANGINFO 1' else - _def_langinfo='#undef CONFIG_LANGINFO' + _def_langinfo='#undef HAVE_LANGINFO' fi echores "$_langinfo" @@ -2859,18 +2859,21 @@ EOF echores "$_use_aton" fi -_def_use_aton='#undef CONFIG_ATON' +_def_use_aton='#undef HAVE_ATON' if test "$_use_aton" = yes; then - _def_use_aton='#define CONFIG_ATON 1' + _def_use_aton='#define HAVE_ATON 1' fi echocheck "socklen_t" -cat > $TMPC << EOF -#include <sys/socket.h> +_socklen_t=no +for header in "sys/socket.h" "ws2tcpip.h" ; do + cat > $TMPC << EOF +#include <$header> int main(void) { socklen_t v = 0; return v; } EOF -cc_check && _socklen_t=yes + cc_check && _socklen_t=yes && break +done if test "$_socklen_t" = yes ; then _def_socklen_t='#define HAVE_SOCKLEN_T 1' else @@ -3166,9 +3169,9 @@ EOF done fi if test "$_iconv" = yes ; then - _def_iconv='#define CONFIG_ICONV 1' + _def_iconv='#define HAVE_ICONV 1' else - _def_iconv='#undef CONFIG_ICONV' + _def_iconv='#undef HAVE_ICONV' fi echores "$_iconv" @@ -3327,10 +3330,10 @@ EOF done fi if test "$_termcap" = yes ; then - _def_termcap='#define CONFIG_TERMCAP 1' + _def_termcap='#define HAVE_TERMCAP 1' _res_comment="using $_ld_tmp" else - _def_termcap='#undef CONFIG_TERMCAP' + _def_termcap='#undef HAVE_TERMCAP' fi echores "$_termcap" @@ -3739,33 +3742,33 @@ echores "$_smbsupport" echocheck "tdfxfb" if test "$_tdfxfb" = yes ; then - _def_tdfxfb='#define HAVE_TDFXFB 1' + _def_tdfxfb='#define CONFIG_TDFXFB 1' _vosrc="$_vosrc vo_tdfxfb.c" _vomodules="tdfxfb $_vomodules" else - _def_tdfxfb='#undef HAVE_TDFXFB' + _def_tdfxfb='#undef CONFIG_TDFXFB' _novomodules="tdfxfb $_novomodules" fi echores "$_tdfxfb" echocheck "s3fb" if test "$_s3fb" = yes ; then - _def_s3fb='#define HAVE_S3FB 1' + _def_s3fb='#define CONFIG_S3FB 1' _vosrc="$_vosrc vo_s3fb.c" _vomodules="s3fb $_vomodules" else - _def_s3fb='#undef HAVE_S3FB' + _def_s3fb='#undef CONFIG_S3FB' _novomodules="s3fb $_novomodules" fi echores "$_s3fb" echocheck "tdfxvid" if test "$_tdfxvid" = yes ; then - _def_tdfxvid='#define HAVE_TDFX_VID 1' + _def_tdfxvid='#define CONFIG_TDFX_VID 1' _vosrc="$_vosrc vo_tdfx_vid.c" _vomodules="tdfx_vid $_vomodules" else - _def_tdfxvid='#undef HAVE_TDFX_VID' + _def_tdfxvid='#undef CONFIG_TDFX_VID' _novomodules="tdfx_vid $_novomodules" fi echores "$_tdfxvid" @@ -3788,22 +3791,22 @@ EOF cc_check && _xvr100=yes fi if test "$_xvr100" = yes ; then - _def_xvr100='#define HAVE_XVR100 1' + _def_xvr100='#define CONFIG_XVR100 1' _vosrc="$_vosrc vo_xvr100.c" _vomodules="xvr100 $_vomodules" else - _def_tdfxvid='#undef HAVE_XVR100' + _def_tdfxvid='#undef CONFIG_XVR100' _novomodules="xvr100 $_novomodules" fi echores "$_xvr100" echocheck "tga" if test "$_tga" = yes ; then - _def_tga='#define HAVE_TGA 1' + _def_tga='#define CONFIG_TGA 1' _vosrc="$_vosrc vo_tga.c" _vomodules="tga $_vomodules" else - _def_tga='#undef HAVE_TGA' + _def_tga='#undef CONFIG_TGA' _novomodules="tga $_novomodules" fi echores "$_tga" @@ -3811,11 +3814,11 @@ echores "$_tga" echocheck "md5sum support" if test "$_md5sum" = yes; then - _def_md5sum="#define HAVE_MD5SUM" + _def_md5sum="#define CONFIG_MD5SUM" _vosrc="$_vosrc vo_md5sum.c" _vomodules="md5sum $_vomodules" else - _def_md5sum="#undef HAVE_MD5SUM" + _def_md5sum="#undef CONFIG_MD5SUM" _novomodules="md5sum $_novomodules" fi echores "$_md5sum" @@ -3823,11 +3826,11 @@ echores "$_md5sum" echocheck "yuv4mpeg support" if test "$_yuv4mpeg" = yes; then - _def_yuv4mpeg="#define HAVE_YUV4MPEG" + _def_yuv4mpeg="#define CONFIG_YUV4MPEG" _vosrc="$_vosrc vo_yuv4mpeg.c" _vomodules="yuv4mpeg $_vomodules" else - _def_yuv4mpeg="#undef HAVE_YUV4MPEG" + _def_yuv4mpeg="#undef CONFIG_YUV4MPEG" _novomodules="yuv4mpeg $_novomodules" fi echores "$_yuv4mpeg" @@ -3835,11 +3838,11 @@ echores "$_yuv4mpeg" echocheck "bl" if test "$_bl" = yes ; then - _def_bl='#define HAVE_BL 1' + _def_bl='#define CONFIG_BL 1' _vosrc="$_vosrc vo_bl.c" _vomodules="bl $_vomodules" else - _def_bl='#undef HAVE_BL' + _def_bl='#undef CONFIG_BL' _novomodules="bl $_novomodules" fi echores "$_bl" @@ -3893,21 +3896,21 @@ fi echores "$_directfb" if test "$_directfb" = yes ; then - _def_directfb='#define HAVE_DIRECTFB 1' + _def_directfb='#define CONFIG_DIRECTFB 1' _vosrc="$_vosrc vo_directfb2.c" _vomodules="directfb $_vomodules" _libs_mplayer="$_libs_mplayer -ldirectfb" else - _def_directfb='#undef HAVE_DIRECTFB' + _def_directfb='#undef CONFIG_DIRECTFB' _novomodules="directfb $_novomodules" fi if test "$_dfbmga" = yes; then _vosrc="$_vosrc vo_dfbmga.c" _vomodules="dfbmga $_vomodules" - _def_dfbmga='#define HAVE_DFBMGA 1' + _def_dfbmga='#define CONFIG_DFBMGA 1' else _novomodules="dfbmga $_novomodules" - _def_dfbmga='#undef HAVE_DFBMGA' + _def_dfbmga='#undef CONFIG_DFBMGA' fi @@ -4185,11 +4188,11 @@ echores "$_dga" echocheck "3dfx" if test "$_3dfx" = yes && test "$_dga" = yes ; then - _def_3dfx='#define HAVE_3DFX 1' + _def_3dfx='#define CONFIG_3DFX 1' _vosrc="$_vosrc vo_3dfx.c" _vomodules="3dfx $_vomodules" else - _def_3dfx='#undef HAVE_3DFX' + _def_3dfx='#undef CONFIG_3DFX' _novomodules="3dfx $_novomodules" fi echores "$_3dfx" @@ -4234,7 +4237,7 @@ else _gl=no fi if test "$_gl" = yes ; then - _def_gl='#define HAVE_GL 1' + _def_gl='#define CONFIG_GL 1' _vosrc="$_vosrc vo_gl.c vo_gl2.c gl_common.c" if test "$_gl_win32" = yes ; then _def_gl_win32='#define GL_WIN32 1' @@ -4243,7 +4246,7 @@ if test "$_gl" = yes ; then fi _vomodules="opengl $_vomodules" else - _def_gl='#undef HAVE_GL' + _def_gl='#undef CONFIG_GL' _def_gl_win32='#undef GL_WIN32' _novomodules="opengl $_novomodules" fi @@ -4344,11 +4347,11 @@ if test "$_mga" = auto ; then test -c /dev/mga_vid && _mga=yes fi if test "$_mga" = yes ; then - _def_mga='#define HAVE_MGA 1' + _def_mga='#define CONFIG_MGA 1' _vosrc="$_vosrc vo_mga.c" _vomodules="mga $_vomodules" else - _def_mga='#undef HAVE_MGA' + _def_mga='#undef CONFIG_MGA' _novomodules="mga $_novomodules" fi echores "$_mga" @@ -4360,11 +4363,11 @@ if test "$_xmga" = auto ; then test "$_x11" = yes && test "$_mga" = yes && _xmga=yes fi if test "$_xmga" = yes ; then - _def_xmga='#define HAVE_XMGA 1' + _def_xmga='#define CONFIG_XMGA 1' _vosrc="$_vosrc vo_xmga.c" _vomodules="xmga $_vomodules" else - _def_xmga='#undef HAVE_XMGA' + _def_xmga='#undef CONFIG_XMGA' _novomodules="xmga $_novomodules" fi echores "$_xmga" @@ -4380,12 +4383,12 @@ EOF cc_check -lggi && _ggi=yes fi if test "$_ggi" = yes ; then - _def_ggi='#define HAVE_GGI 1' + _def_ggi='#define CONFIG_GGI 1' _libs_mplayer="$_libs_mplayer -lggi" _vosrc="$_vosrc vo_ggi.c" _vomodules="ggi $_vomodules" else - _def_ggi='#undef HAVE_GGI' + _def_ggi='#undef CONFIG_GGI' _novomodules="ggi $_novomodules" fi echores "$_ggi" @@ -4403,11 +4406,11 @@ fi # needed to get right output on obscure combination # like --disable-ggi --enable-ggiwmh if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then - _def_ggiwmh='#define HAVE_GGIWMH 1' + _def_ggiwmh='#define CONFIG_GGIWMH 1' _libs_mplayer="$_libs_mplayer -lggiwmh" else _ggiwmh=no - _def_ggiwmh='#undef HAVE_GGIWMH' + _def_ggiwmh='#undef CONFIG_GGIWMH' fi echores "$_ggiwmh" @@ -4433,14 +4436,14 @@ EOF done fi if test "$_aa" = yes ; then - _def_aa='#define HAVE_AA 1' + _def_aa='#define CONFIG_AA 1' if cygwin ; then _libs_mplayer="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`" fi _vosrc="$_vosrc vo_aa.c" _vomodules="aa $_vomodules" else - _def_aa='#undef HAVE_AA' + _def_aa='#undef CONFIG_AA' _novomodules="aa $_novomodules" fi echores "$_aa" @@ -4461,13 +4464,13 @@ EOF fi fi if test "$_caca" = yes ; then - _def_caca='#define HAVE_CACA 1' + _def_caca='#define CONFIG_CACA 1' _inc_extra="$_inc_extra `caca-config --cflags`" _libs_mplayer="$_libs_mplayer `caca-config --libs`" _vosrc="$_vosrc vo_caca.c" _vomodules="caca $_vomodules" else - _def_caca='#undef HAVE_CACA' + _def_caca='#undef CONFIG_CACA' _novomodules="caca $_novomodules" fi echores "$_caca" @@ -4483,12 +4486,12 @@ EOF cc_check -lvga $_ld_lm && _svga=yes fi if test "$_svga" = yes ; then - _def_svga='#define HAVE_SVGALIB 1' + _def_svga='#define CONFIG_SVGALIB 1' _libs_mplayer="$_libs_mplayer -lvga" _vosrc="$_vosrc vo_svga.c" _vomodules="svga $_vomodules" else - _def_svga='#undef HAVE_SVGALIB' + _def_svga='#undef CONFIG_SVGALIB' _novomodules="svga $_novomodules" fi echores "$_svga" @@ -4500,11 +4503,11 @@ if test "$_fbdev" = auto ; then linux && _fbdev=yes fi if test "$_fbdev" = yes ; then - _def_fbdev='#define HAVE_FBDEV 1' + _def_fbdev='#define CONFIG_FBDEV 1' _vosrc="$_vosrc vo_fbdev.c vo_fbdev2.c" _vomodules="fbdev $_vomodules" else - _def_fbdev='#undef HAVE_FBDEV' + _def_fbdev='#undef CONFIG_FBDEV' _novomodules="fbdev $_novomodules" fi echores "$_fbdev" @@ -4767,12 +4770,12 @@ EOF cc_check -lvbe -llrmi && _vesa=yes fi if test "$_vesa" = yes ; then - _def_vesa='#define HAVE_VESA 1' + _def_vesa='#define CONFIG_VESA 1' _libs_mplayer="$_libs_mplayer -lvbe -llrmi" _vosrc="$_vosrc vo_vesa.c vesa_lvo.c gtf.c" _vomodules="vesa $_vomodules" else - _def_vesa='#undef HAVE_VESA' + _def_vesa='#undef CONFIG_VESA' _novomodules="vesa $_novomodules" fi echores "$_vesa" @@ -5722,11 +5725,11 @@ EOF fi fi if test "$_fribidi" = yes ; then - _def_fribidi='#define CONFIG_FRIBIDI' + _def_fribidi='#define HAVE_FRIBIDI' _inc_extra="$_inc_extra `$_fribidiconfig --cflags`" _ld_extra="$_ld_extra `$_fribidiconfig --libs`" else - _def_fribidi='#undef CONFIG_FRIBIDI' + _def_fribidi='#undef HAVE_FRIBIDI' fi echores "$_fribidi" @@ -5846,11 +5849,11 @@ EOF cc_check -ltwolame $_ld_lm && _twolame=yes fi if test "$_twolame" = yes ; then - _def_twolame='#define HAVE_TWOLAME 1' + _def_twolame='#define CONFIG_TWOLAME 1' _libs_mencoder="$_libs_mencoder -ltwolame" _codecmodules="twolame $_codecmodules" else - _def_twolame='#undef HAVE_TWOLAME' + _def_twolame='#undef CONFIG_TWOLAME' _nocodecmodules="twolame $_nocodecmodules" fi echores "$_twolame" @@ -5869,11 +5872,11 @@ EOF fi fi if test "$_toolame" = yes ; then - _def_toolame='#define HAVE_TOOLAME 1' + _def_toolame='#define CONFIG_TOOLAME 1' _libs_mencoder="$_libs_mencoder -ltoolame" _codecmodules="toolame $_codecmodules" else - _def_toolame='#undef HAVE_TOOLAME' + _def_toolame='#undef CONFIG_TOOLAME' _nocodecmodules="toolame $_nocodecmodules" fi if test "$_toolamedir" ; then @@ -5902,7 +5905,7 @@ EOF fi if test "$_tremor_internal" = yes ; then _vorbis=yes - _def_vorbis='#define HAVE_OGGVORBIS 1' + _def_vorbis='#define CONFIG_OGGVORBIS 1' _def_tremor='#define TREMOR 1' _codecmodules="tremor(internal) $_codecmodules" _res_comment="internal Tremor" @@ -5912,14 +5915,14 @@ if test "$_tremor_internal" = yes ; then fi elif test "$_tremor_external" = yes ; then _vorbis=yes - _def_vorbis='#define HAVE_OGGVORBIS 1' + _def_vorbis='#define CONFIG_OGGVORBIS 1' _def_tremor='#define TREMOR 1' _codecmodules="tremor(external) $_codecmodules" _res_comment="external Tremor" _ld_extra="$_ld_extra -logg -lvorbisidec" elif test "$_libvorbis" = yes ; then _vorbis=yes - _def_vorbis='#define HAVE_OGGVORBIS 1' + _def_vorbis='#define CONFIG_OGGVORBIS 1' _codecmodules="libvorbis $_codecmodules" _res_comment="libvorbis" _ld_extra="$_ld_extra -lvorbis -logg" @@ -5939,11 +5942,11 @@ EOF cc_check -lspeex $_ld_lm && _speex=yes fi if test "$_speex" = yes ; then - _def_speex='#define HAVE_SPEEX 1' + _def_speex='#define CONFIG_SPEEX 1' _ld_extra="$_ld_extra -lspeex" _codecmodules="speex $_codecmodules" else - _def_speex='#undef HAVE_SPEEX' + _def_speex='#undef CONFIG_SPEEX' _nocodecmodules="speex $_nocodecmodules" fi echores "$_speex" @@ -5996,13 +5999,13 @@ EOF fi fi if test "$_theora" = yes ; then - _def_theora='#define HAVE_OGGTHEORA 1' + _def_theora='#define CONFIG_OGGTHEORA 1' _codecmodules="libtheora $_codecmodules" # when --enable-theora is forced, we'd better provide a probably sane # $_ld_theora than nothing test -z "$_ld_theora" && _ld_extra="$_ld_extra -ltheora -logg" else - _def_theora='#undef HAVE_OGGTHEORA' + _def_theora='#undef CONFIG_OGGTHEORA' _nocodecmodules="libtheora $_nocodecmodules" fi echores "$_theora" @@ -6087,11 +6090,11 @@ EOF cc_check -lmpcdec $_ld_lm && _musepack=yes fi if test "$_musepack" = yes ; then - _def_musepack='#define HAVE_MUSEPACK 1' + _def_musepack='#define CONFIG_MUSEPACK 1' _ld_extra="$_ld_extra -lmpcdec" _codecmodules="musepack $_codecmodules" else - _def_musepack='#undef HAVE_MUSEPACK' + _def_musepack='#undef CONFIG_MUSEPACK' _nocodecmodules="musepack $_nocodecmodules" fi echores "$_musepack" @@ -6110,7 +6113,7 @@ EOF done fi if test "$_faac" = yes ; then - _def_faac="#define HAVE_FAAC 1" + _def_faac="#define CONFIG_FAAC 1" test "$_faac_lavc" = auto && _faac_lavc=yes if test "$_faac_lavc" = yes ; then _def_faac_lavc="#define CONFIG_LIBFAAC 1" @@ -6120,7 +6123,7 @@ if test "$_faac" = yes ; then _codecmodules="faac $_codecmodules" else _faac_lavc=no - _def_faac="#undef HAVE_FAAC" + _def_faac="#undef CONFIG_FAAC" _def_faac_lavc="#undef CONFIG_LIBFAAC" _nocodecmodules="faac $_nocodecmodules" fi @@ -6175,10 +6178,10 @@ else fi if test "$_faad" = yes ; then - _def_faad='#define HAVE_FAAD 1' + _def_faad='#define CONFIG_FAAD 1' _codecmodules="faad2 $_codecmodules" else - _def_faad='#undef HAVE_FAAD' + _def_faad='#undef CONFIG_FAAD' _nocodecmodules="faad2 $_nocodecmodules" fi echores "$_faad" @@ -6600,11 +6603,11 @@ EOF cc_check -ldv $_ld_pthread $_ld_lm && _libdv=yes fi if test "$_libdv" = yes ; then - _def_libdv='#define HAVE_LIBDV095 1' + _def_libdv='#define CONFIG_LIBDV095 1' _ld_extra="$_ld_extra -ldv" _codecmodules="libdv $_codecmodules" else - _def_libdv='#undef HAVE_LIBDV095' + _def_libdv='#undef CONFIG_LIBDV095' _nocodecmodules="libdv $_nocodecmodules" fi echores "$_libdv" @@ -6623,10 +6626,10 @@ EOF fi if test "$_xvid" = yes ; then - _def_xvid='#define HAVE_XVID4 1' + _def_xvid='#define CONFIG_XVID4 1' _codecmodules="xvid $_codecmodules" else - _def_xvid='#undef HAVE_XVID4' + _def_xvid='#undef CONFIG_XVID4' _nocodecmodules="xvid $_nocodecmodules" fi echores "$_xvid" @@ -6666,7 +6669,7 @@ EOF fi if test "$_x264" = yes ; then - _def_x264='#define HAVE_X264 1' + _def_x264='#define CONFIG_X264 1' _codecmodules="x264 $_codecmodules" test "$_x264_lavc" = auto && _x264_lavc=yes if test "$_x264_lavc" = yes ; then @@ -6676,7 +6679,7 @@ if test "$_x264" = yes ; then fi else _x264_lavc=no - _def_x264='#undef HAVE_X264' + _def_x264='#undef CONFIG_X264' _def_x264_lavc='#undef CONFIG_LIBX264' _nocodecmodules="x264 $_nocodecmodules" fi @@ -6771,10 +6774,10 @@ EOF fi if test "$_libnut" = yes ; then - _def_libnut='#define HAVE_LIBNUT 1' + _def_libnut='#define CONFIG_LIBNUT 1' _ld_extra="$_ld_extra -lnut" else - _def_libnut='#undef HAVE_LIBNUT' + _def_libnut='#undef CONFIG_LIBNUT' fi echores "$_libnut" @@ -6809,8 +6812,8 @@ echores "$_zr" if test "$_mencoder" != no ; then echocheck "libmp3lame (for mencoder)" -_def_mp3lame_preset='#undef HAVE_MP3LAME_PRESET' -_def_mp3lame_preset_medium='#undef HAVE_MP3LAME_PRESET_MEDIUM' +_def_mp3lame_preset='#undef CONFIG_MP3LAME_PRESET' +_def_mp3lame_preset_medium='#undef CONFIG_MP3LAME_PRESET_MEDIUM' if test "$_mp3lame" = auto ; then _mp3lame=no cat > $TMPC <<EOF @@ -6822,19 +6825,19 @@ EOF cc_check -lmp3lame $_ld_lm && tmp_run && _mp3lame=yes fi if test "$_mp3lame" = yes ; then - _def_mp3lame="#define HAVE_MP3LAME" + _def_mp3lame="#define CONFIG_MP3LAME" _ld_mp3lame=-lmp3lame _libs_mencoder="$_libs_mencoder $_ld_mp3lame" cat > $TMPC << EOF #include <lame/lame.h> int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; } EOF - cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset="#define HAVE_MP3LAME_PRESET" + cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET" cat > $TMPC << EOF #include <lame/lame.h> int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; } EOF - cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium="#define HAVE_MP3LAME_PRESET_MEDIUM" + cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM" test "$_mp3lame_lavc" = auto && _mp3lame_lavc=yes if test "$_mp3lame_lavc" = yes ; then _def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 1" @@ -6843,7 +6846,7 @@ EOF fi else _mp3lame_lavc=no - _def_mp3lame='#undef HAVE_MP3LAME' + _def_mp3lame='#undef CONFIG_MP3LAME' _def_mp3lame_lavc="#undef CONFIG_LIBMP3LAME" fi _res_comment="in libavcodec: $_mp3lame_lavc" @@ -6852,9 +6855,7 @@ echores "$_mp3lame" fi echocheck "mencoder" -_mencoder_flag='#undef HAVE_MENCODER' if test "$_mencoder" = yes ; then - _mencoder_flag='#define HAVE_MENCODER' _def_muxers='#define CONFIG_MUXERS 1' else # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint @@ -7258,10 +7259,10 @@ echores "$_byte_order" echocheck "OSD menu" if test "$_menu" = yes ; then - _def_menu='#define HAVE_MENU 1' + _def_menu='#define CONFIG_MENU 1' test $_dvbin = "yes" && _menu_dvbin=yes else -_def_menu='#undef HAVE_MENU' +_def_menu='#undef CONFIG_MENU' _menu_dvbin=no fi echores "$_menu" @@ -7410,8 +7411,8 @@ if test "$_gtk1" = no ; then _libs_mplayer="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`" echores "$_glib" - _def_gui='#define HAVE_NEW_GUI 1' - _def_gtk2_gui='#define HAVE_GTK2_GUI 1' + _def_gui='#define CONFIG_GUI 1' + _def_gtk2='#define CONFIG_GTK2 1' else _gtk1=yes echo "GLIB-2 devel packages were not found, trying GTK 1.2" @@ -7454,20 +7455,20 @@ if test "$_gtk1" = yes ; then _libs_mplayer="$_libs_mplayer `$_glibconfig --libs 2>&1`" echores "$_glib (using $_glibconfig)" - _def_gui='#define HAVE_NEW_GUI 1' - _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _def_gui='#define CONFIG_GUI 1' + _def_gtk2='#undef CONFIG_GTK2' fi else #if ! win32 _gui_win32=yes _libs_mplayer="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32" - _def_gui='#define HAVE_NEW_GUI 1' - _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _def_gui='#define CONFIG_GUI 1' + _def_gtk2='#undef CONFIG_GTK2' fi #if ! win32 else #if test "$_gui" - _def_gui='#undef HAVE_NEW_GUI' - _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _def_gui='#undef CONFIG_GUI' + _def_gtk2='#undef CONFIG_GTK2' fi #if test "$_gui" # --------------- GUI specific tests end ------------------- @@ -8092,9 +8093,6 @@ $_def_libnut /* Define to include support for libdv-0.9.5 */ $_def_libdv -/* If build mencoder */ -$_mencoder_flag - /* Indicates if libmp3lame is available Note: for mencoder */ $_def_mp3lame @@ -8346,7 +8344,7 @@ $_def_unrar_exec /* gui support, please do not edit this option */ $_def_gui -$_def_gtk2_gui +$_def_gtk2 /* Audio output drivers */ $_def_ossaudio @@ -8586,6 +8584,7 @@ $_def_use_aton /* socklen_t support */ $_def_socklen_t #ifndef HAVE_SOCKLEN_T +#define HAVE_SOCKLEN_T 1 typedef int socklen_t; #endif @@ -8689,7 +8688,7 @@ $_def_twolame /* used by GUI: */ $_def_xshape -#if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV) +#if defined(CONFIG_GL) || defined(HAVE_X11) || defined(HAVE_XV) #define X11_FULLSCREEN 1 #endif diff --git a/etc/codecs.conf b/etc/codecs.conf index 0541315108..cd00c4d210 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -77,6 +77,8 @@ videocodec mpegpes format 0x10000002 ; mpeg 2 fourcc mpg1,MPG1,mpg2,MPG2 fourcc MPEG + fourcc hdv1,hdv2,hdv3 + fourcc hdv5 fourcc hdv6,hdv7,hdv8 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 @@ -104,6 +106,7 @@ videocodec ffmpeg2 format 0x10000002 ; MPEG-2 fourcc mpg2,MPG2 fourcc "DVR " + fourcc hdv1 fourcc hdv2 fourcc MPEG fourcc hdv3 ; HDV 1080i50 @@ -133,6 +136,7 @@ videocodec ffmpeg12 fourcc "DVR " fourcc hdv2 fourcc MPEG + fourcc hdv1 fourcc hdv3 ; HDV 1080i50 fourcc hdv5 ; HDV 720p25 fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) @@ -161,6 +165,7 @@ videocodec mpeg12 fourcc VCR2 fourcc mpg2,MPG2 fourcc MPEG + fourcc hdv1 fourcc hdv3 ; HDV 1080i50 fourcc hdv5 ; HDV 720p25 fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) @@ -183,6 +188,7 @@ videocodec ffmpeg12mc format 0x10000002 ; MPEG-2 fourcc mpg1,mpg2,MPG2 fourcc "DVR " + fourcc hdv1 fourcc hdv2 fourcc PIM1 ; Pinnacle hardware-MPEG-1 fourcc VCR2 @@ -594,6 +600,7 @@ videocodec ffvixl status working fourcc VIXL fourcc PIXL ; this is Pinnacle one + fourcc XIXL driver ffmpeg dll xl out 411P @@ -974,6 +981,7 @@ videocodec ffmjpeg status working fourcc MJPG,mjpg fourcc AVRn,AVDJ ; AVID + fourcc ADJV ; Avid Motion JPEG fourcc jpeg ; MOV Photo-JPEG fourcc mjpa ; Apple MJPEG-A (Quicktime) fourcc JFIF ; SMJPEG (Loki) @@ -1170,7 +1178,9 @@ videocodec ffh263 status working fourcc H263,U263,h263,X263,M263 fourcc viv1 h263 - fourcc s263 + fourcc s263,S263 + fourcc D263 ; DEC H263 + fourcc L263 ; Lead H263 driver ffmpeg dll h263 out YV12,I420,IYUV @@ -165,7 +165,7 @@ static const m_option_t gui_opts[] = #endif { "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL }, { "sub_overlap",&suboverlap_enabled,CONF_TYPE_FLAG,0,0,0,NULL }, -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV { "sub_cp",&sub_cp,CONF_TYPE_STRING,0,0,0,NULL }, #endif { "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL }, diff --git a/gui/interface.c b/gui/interface.c index 5884e7befb..a0e5ae72c5 100644 --- a/gui/interface.c +++ b/gui/interface.c @@ -51,7 +51,7 @@ extern af_cfg_t af_cfg; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> #endif @@ -1107,7 +1107,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) guiLoadFont(); return NULL; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV case gtkSetSubEncoding: gfree( (void **)&sub_cp ); sub_cp=gstrdup( (char *)vparam ); diff --git a/gui/mplayer/gtk/about.c b/gui/mplayer/gtk/about.c index ccb04ff8ad..d14d449e5f 100644 --- a/gui/mplayer/gtk/about.c +++ b/gui/mplayer/gtk/about.c @@ -45,10 +45,10 @@ GtkWidget * create_About( void ) GtkWidget * AboutText; GtkWidget * Ok; -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 GtkTextBuffer * AboutTextBuffer; GtkTextIter iter; -#endif //HAVE_GTK2_GUI +#endif /* CONFIG_GTK2 */ GtkStyle * pixmapstyle; GdkPixmap * pixmapwid; @@ -89,7 +89,7 @@ GtkWidget * create_About( void ) gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 AboutText = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(AboutText), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(AboutText), FALSE); @@ -102,7 +102,7 @@ GtkWidget * create_About( void ) gtk_widget_set_name( AboutText,"AboutText" ); gtk_widget_show( AboutText ); gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 gtk_text_buffer_insert (AboutTextBuffer, &iter, #else gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c index feb189171b..281f49de71 100644 --- a/gui/mplayer/gtk/opts.c +++ b/gui/mplayer/gtk/opts.c @@ -133,11 +133,11 @@ static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoSc //static GtkWidget * AutoScale; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static GtkWidget * CBSubEncoding, * ESubEncoding; #endif -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static struct { char * name; @@ -188,7 +188,7 @@ static int old_video_driver = 0; static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ); static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ); static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ); -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ); #endif @@ -312,7 +312,7 @@ void ShowPreferences( void ) if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename ); #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if ( sub_cp ) { int i; @@ -460,7 +460,7 @@ void ShowPreferences( void ) gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 ); gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 ); #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); #endif gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); @@ -492,7 +492,7 @@ void HidePreferences( void ) #endif } -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ) { const char * comment; @@ -508,7 +508,7 @@ static void prEntry( GtkContainer * container,gpointer user_data ) if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); break; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV case 1: // sub encoding comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) @@ -782,7 +782,7 @@ static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,g !strncmp( ao_driver[0],"esd",3 ) || !strncmp( ao_driver[0],"sdl",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE ); -#ifndef HAVE_GTK2_GUI +#ifndef CONFIG_GTK2 if ( !strncmp( ao_driver[0],"arts",4 ) ) gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken); #endif @@ -1030,7 +1030,7 @@ GtkWidget * create_Preferences( void ) label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); #endif @@ -1051,7 +1051,7 @@ GtkWidget * create_Preferences( void ) gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE ); gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV CBSubEncoding=gtk_combo_new(); gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" ); gtk_widget_show( CBSubEncoding ); diff --git a/gui/mplayer/widgets.c b/gui/mplayer/widgets.c index bf3dd61989..0cf3c1fbd9 100644 --- a/gui/mplayer/widgets.c +++ b/gui/mplayer/widgets.c @@ -76,7 +76,7 @@ Pixmap guiIconMask; void gtkInit( void ) { mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init GTK ...\n" ); -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 gtk_disable_setlocale(); #endif gtk_init( 0,NULL ); diff --git a/help/help_mp-bg.h b/help/help_mp-bg.h index 5cadb0b45e..47e393b1be 100644 --- a/help/help_mp-bg.h +++ b/help/help_mp-bg.h @@ -565,7 +565,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Информация" diff --git a/help/help_mp-cs.h b/help/help_mp-cs.h index c6772f6a49..635173d71a 100644 --- a/help/help_mp-cs.h +++ b/help/help_mp-cs.h @@ -705,7 +705,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "O aplikaci" diff --git a/help/help_mp-dk.h b/help/help_mp-dk.h index fae973d53c..a3b5472153 100644 --- a/help/help_mp-dk.h +++ b/help/help_mp-dk.h @@ -332,7 +332,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Om" diff --git a/help/help_mp-el.h b/help/help_mp-el.h index b3f05b8a20..e7a3a3fcb2 100644 --- a/help/help_mp-el.h +++ b/help/help_mp-el.h @@ -342,7 +342,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Περί" diff --git a/help/help_mp-es.h b/help/help_mp-es.h index d4cb70fd81..f0303fa3a5 100644 --- a/help/help_mp-es.h +++ b/help/help_mp-es.h @@ -711,7 +711,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Acerca de" diff --git a/help/help_mp-fr.h b/help/help_mp-fr.h index fd0369bf18..7389a82b7d 100644 --- a/help/help_mp-fr.h +++ b/help/help_mp-fr.h @@ -709,7 +709,7 @@ static char help_text[]= // ====================== messages/boutons GUI ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "À propos..." diff --git a/help/help_mp-it.h b/help/help_mp-it.h index dda7a009b8..9bdd4195f2 100644 --- a/help/help_mp-it.h +++ b/help/help_mp-it.h @@ -717,7 +717,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Informazioni su" diff --git a/help/help_mp-ja.h b/help/help_mp-ja.h index 7c9cfd3aee..f7355685a3 100644 --- a/help/help_mp-ja.h +++ b/help/help_mp-ja.h @@ -273,7 +273,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "アバウト" diff --git a/help/help_mp-ko.h b/help/help_mp-ko.h index 878c985f68..0fb904e0a8 100644 --- a/help/help_mp-ko.h +++ b/help/help_mp-ko.h @@ -336,7 +336,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "정보" diff --git a/help/help_mp-mk.h b/help/help_mp-mk.h index 7913d64090..8d590ec552 100644 --- a/help/help_mp-mk.h +++ b/help/help_mp-mk.h @@ -333,7 +333,7 @@ static char help_text[]= // ====================== GUI пораки/копчиња ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- лабели --- #define MSGTR_About "За" diff --git a/help/help_mp-nb.h b/help/help_mp-nb.h index 0c9d866865..9e6c860c12 100644 --- a/help/help_mp-nb.h +++ b/help/help_mp-nb.h @@ -164,7 +164,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Om" diff --git a/help/help_mp-nl.h b/help/help_mp-nl.h index 7c40863786..003b0fb65e 100644 --- a/help/help_mp-nl.h +++ b/help/help_mp-nl.h @@ -550,7 +550,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Info over" diff --git a/help/help_mp-pl.h b/help/help_mp-pl.h index 16938f2789..2c1f9ef2b3 100644 --- a/help/help_mp-pl.h +++ b/help/help_mp-pl.h @@ -673,7 +673,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "O programie" diff --git a/help/help_mp-pt_BR.h b/help/help_mp-pt_BR.h index a133e6cd69..9d3481c16a 100644 --- a/help/help_mp-pt_BR.h +++ b/help/help_mp-pt_BR.h @@ -337,7 +337,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Sobre" diff --git a/help/help_mp-ro.h b/help/help_mp-ro.h index 1912c0525b..61641ebf9e 100644 --- a/help/help_mp-ro.h +++ b/help/help_mp-ro.h @@ -291,7 +291,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Despre MPlayer" diff --git a/help/help_mp-ru.h b/help/help_mp-ru.h index c91dd9294e..ff6f6f960f 100644 --- a/help/help_mp-ru.h +++ b/help/help_mp-ru.h @@ -715,7 +715,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "О себе" diff --git a/help/help_mp-sk.h b/help/help_mp-sk.h index 46e9f4be0c..64b0bd8e81 100644 --- a/help/help_mp-sk.h +++ b/help/help_mp-sk.h @@ -656,7 +656,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "O aplikácii" diff --git a/help/help_mp-sv.h b/help/help_mp-sv.h index 8ea80bacae..94d1f192c2 100644 --- a/help/help_mp-sv.h +++ b/help/help_mp-sv.h @@ -563,7 +563,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Om" diff --git a/help/help_mp-tr.h b/help/help_mp-tr.h index 9bf05d4ef8..22a58bcd66 100644 --- a/help/help_mp-tr.h +++ b/help/help_mp-tr.h @@ -719,7 +719,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Hakkında" diff --git a/help/help_mp-uk.h b/help/help_mp-uk.h index 837668806a..9481918d12 100644 --- a/help/help_mp-uk.h +++ b/help/help_mp-uk.h @@ -323,7 +323,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Про програму" diff --git a/help/help_mp-zh_TW.h b/help/help_mp-zh_TW.h index 59fabaa60b..a1050cf5fa 100644 --- a/help/help_mp-zh_TW.h +++ b/help/help_mp-zh_TW.h @@ -692,7 +692,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "關于" diff --git a/input/input.c b/input/input.c index 9b0ad576b5..be272929a3 100644 --- a/input/input.c +++ b/input/input.c @@ -170,7 +170,7 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_TV_TELETEXT_GO_LINK, "teletext_go_link", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI { MP_CMD_GUI_LOADFILE, "gui_loadfile", 0, { {-1,{0}} } }, { MP_CMD_GUI_LOADSUBTITLE, "gui_loadsubtitle", 0, { {-1,{0}} } }, { MP_CMD_GUI_ABOUT, "gui_about", 0, { {-1,{0}} } }, @@ -185,7 +185,7 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_DVDNAV, "dvdnav", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, #endif -#ifdef HAVE_MENU +#ifdef CONFIG_MENU { MP_CMD_MENU, "menu",1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, { MP_CMD_SET_MENU, "set_menu",1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, { MP_CMD_CHELP, "help", 0, { {-1,{0}} } }, @@ -491,7 +491,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = { }; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI static const mp_cmd_bind_t gui_def_cmd_binds[] = { { { 'l', 0 }, "gui_loadfile" }, @@ -1677,7 +1677,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui) char* file; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) add_binds(ictx, gui_def_cmd_binds); #endif diff --git a/libass/ass.c b/libass/ass.c index 659f08c4e3..3f78afa994 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -32,7 +32,7 @@ #include <unistd.h> #include <inttypes.h> -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> #endif @@ -810,7 +810,7 @@ void ass_process_chunk(ass_track_t* track, char *data, int size, long long timec free(str); } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV /** \brief recode buffer to utf-8 * constraint: codepage != 0 * \param data pointer to text buffer @@ -991,7 +991,7 @@ ass_track_t* ass_read_memory(ass_library_t* library, char* buf, size_t bufsize, if (!buf) return 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) buf = sub_recode(buf, bufsize, codepage); if (!buf) @@ -1017,7 +1017,7 @@ char* read_file_recode(char* fname, char* codepage, int* size) buf = read_file(fname, &bufsize); if (!buf) return 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) { char* tmpbuf = sub_recode(buf, bufsize, codepage); free(buf); @@ -1071,7 +1071,7 @@ int ass_read_styles(ass_track_t* track, char* fname, char* codepage) buf = read_file(fname, &sz); if (!buf) return 1; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) { char* tmpbuf; tmpbuf = sub_recode(buf, sz, codepage); diff --git a/libass/ass_mp.c b/libass/ass_mp.c index 063580e0e5..2e56a93518 100644 --- a/libass/ass_mp.c +++ b/libass/ass_mp.c @@ -65,7 +65,7 @@ extern char* sub_font_name; extern float text_font_scale_factor; extern int subtitle_autoscale; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV extern char* sub_cp; #else static char* sub_cp = 0; diff --git a/libmenu/menu.c b/libmenu/menu.c index 164aa99cd0..9ceae087cb 100644 --- a/libmenu/menu.c +++ b/libmenu/menu.c @@ -413,7 +413,7 @@ static void render_txt(char *txt) } } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #include <fribidi/fribidi.h> #include "libavutil/common.h" char *menu_fribidi_charset = NULL; @@ -469,7 +469,7 @@ void menu_draw_text(mp_image_t* mpi,char* txt, int x, int y) { return; } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI txt = menu_fribidi(txt); #endif render_txt(txt); @@ -503,7 +503,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, return; } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI txt = menu_fribidi(txt); #endif render_txt(txt); diff --git a/libmpcodecs/ad.c b/libmpcodecs/ad.c index fa3bbf4a46..3f191826fa 100644 --- a/libmpcodecs/ad.c +++ b/libmpcodecs/ad.c @@ -73,13 +73,13 @@ const ad_functions_t * const mpcodecs_ad_drivers[] = #ifdef CONFIG_QTX_CODECS &mpcodecs_ad_qtaudio, #endif -#ifdef HAVE_FAAD +#ifdef CONFIG_FAAD &mpcodecs_ad_faad, #endif -#ifdef HAVE_OGGVORBIS +#ifdef CONFIG_OGGVORBIS &mpcodecs_ad_libvorbis, #endif -#ifdef HAVE_SPEEX +#ifdef CONFIG_SPEEX &mpcodecs_ad_speex, #endif #ifdef CONFIG_LIBMAD @@ -88,10 +88,10 @@ const ad_functions_t * const mpcodecs_ad_drivers[] = #ifdef CONFIG_REALCODECS &mpcodecs_ad_realaud, #endif -#ifdef HAVE_LIBDV095 +#ifdef CONFIG_LIBDV095 &mpcodecs_ad_libdv, #endif -#ifdef HAVE_MUSEPACK +#ifdef CONFIG_MUSEPACK &mpcodecs_ad_libmusepack, #endif #ifdef CONFIG_LIBDCA diff --git a/libmpcodecs/ae.c b/libmpcodecs/ae.c index f671f294dc..5e7b76b4e9 100644 --- a/libmpcodecs/ae.c +++ b/libmpcodecs/ae.c @@ -14,11 +14,11 @@ #include "ae_pcm.h" -#ifdef HAVE_TOOLAME +#ifdef CONFIG_TOOLAME #include "ae_toolame.h" #endif -#ifdef HAVE_MP3LAME +#ifdef CONFIG_MP3LAME #include "ae_lame.h" #endif @@ -26,11 +26,11 @@ #include "ae_lavc.h" #endif -#ifdef HAVE_FAAC +#ifdef CONFIG_FAAC #include "ae_faac.h" #endif -#ifdef HAVE_TWOLAME +#ifdef CONFIG_TWOLAME #include "ae_twolame.h" #endif @@ -50,7 +50,7 @@ audio_encoder_t *new_audio_encoder(muxer_stream_t *stream, audio_encoding_params case ACODEC_PCM: ris = mpae_init_pcm(encoder); break; -#ifdef HAVE_TOOLAME +#ifdef CONFIG_TOOLAME case ACODEC_TOOLAME: ris = mpae_init_toolame(encoder); break; @@ -60,17 +60,17 @@ audio_encoder_t *new_audio_encoder(muxer_stream_t *stream, audio_encoding_params ris = mpae_init_lavc(encoder); break; #endif -#ifdef HAVE_MP3LAME +#ifdef CONFIG_MP3LAME case ACODEC_VBRMP3: ris = mpae_init_lame(encoder); break; #endif -#ifdef HAVE_FAAC +#ifdef CONFIG_FAAC case ACODEC_FAAC: ris = mpae_init_faac(encoder); break; #endif -#ifdef HAVE_TWOLAME +#ifdef CONFIG_TWOLAME case ACODEC_TWOLAME: ris = mpae_init_twolame(encoder); break; diff --git a/libmpcodecs/ae_lame.c b/libmpcodecs/ae_lame.c index 80242dd351..c539d6ba6d 100644 --- a/libmpcodecs/ae_lame.c +++ b/libmpcodecs/ae_lame.c @@ -33,7 +33,7 @@ static int lame_param_free_format = 0; //disabled static int lame_param_br_min = 0; //not specified static int lame_param_br_max = 0; //not specified -#ifdef HAVE_MP3LAME_PRESET +#ifdef CONFIG_MP3LAME_PRESET int lame_param_fast=0; // unset static char* lame_param_preset=NULL; // unset static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_name ); @@ -57,7 +57,7 @@ m_option_t lameopts_conf[]={ {"free", &lame_param_free_format, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"br_min", &lame_param_br_min, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL}, {"br_max", &lame_param_br_max, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL}, -#ifdef HAVE_MP3LAME_PRESET +#ifdef CONFIG_MP3LAME_PRESET {"fast", &lame_param_fast, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"preset", &lame_param_preset, CONF_TYPE_STRING, 0, 0, 0, NULL}, #else @@ -178,7 +178,7 @@ int mpae_init_lame(audio_encoder_t *encoder) } if(lame_param_lowpassfreq>=-1) lame_set_lowpassfreq(lame,lame_param_lowpassfreq); if(lame_param_highpassfreq>=-1) lame_set_highpassfreq(lame,lame_param_highpassfreq); -#ifdef HAVE_MP3LAME_PRESET +#ifdef CONFIG_MP3LAME_PRESET if(lame_param_preset != NULL) { mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_LamePresetEquals,lame_param_preset); if(lame_presets_set(lame,lame_param_fast, (lame_param_vbr==0), lame_param_preset) < 0) @@ -202,7 +202,7 @@ int mpae_init_lame(audio_encoder_t *encoder) return 1; } -#ifdef HAVE_MP3LAME_PRESET +#ifdef CONFIG_MP3LAME_PRESET /* lame_presets_set taken out of presets_set in lame-3.93.1/frontend/parse.c and modified */ static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_name ) @@ -253,7 +253,7 @@ static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_ preset_name = "256"; } -#ifdef HAVE_MP3LAME_PRESET_MEDIUM +#ifdef CONFIG_MP3LAME_PRESET_MEDIUM if (strcmp(preset_name, "medium") == 0) { if (fast > 0) lame_set_preset(gfp, MEDIUM_FAST); diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 835f809f98..e8c02798ab 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -52,7 +52,7 @@ const vd_functions_t * const mpcodecs_vd_drivers[] = { #ifdef CONFIG_LIBAVCODEC &mpcodecs_vd_ffmpeg, #endif -#ifdef HAVE_OGGTHEORA +#ifdef CONFIG_OGGTHEORA &mpcodecs_vd_theora, #endif #ifdef CONFIG_WIN32DLL @@ -86,10 +86,10 @@ const vd_functions_t * const mpcodecs_vd_drivers[] = { #ifdef CONFIG_REALCODECS &mpcodecs_vd_realvid, #endif -#ifdef HAVE_XVID4 +#ifdef CONFIG_XVID4 &mpcodecs_vd_xvid, #endif -#ifdef HAVE_LIBDV095 +#ifdef CONFIG_LIBDV095 &mpcodecs_vd_libdv, #endif #ifdef CONFIG_QTX_CODECS diff --git a/libmpcodecs/ve.c b/libmpcodecs/ve.c index 5d88a0fd77..9d083f5d86 100644 --- a/libmpcodecs/ve.c +++ b/libmpcodecs/ve.c @@ -32,17 +32,17 @@ static vf_info_t* encoder_list[]={ &ve_info_qtvideo, #endif #endif -#ifdef HAVE_LIBDV095 +#ifdef CONFIG_LIBDV095 &ve_info_libdv, #endif &ve_info_raw, -#ifdef HAVE_XVID4 +#ifdef CONFIG_XVID4 &ve_info_xvid, #endif #ifdef CONFIG_LIBLZO &ve_info_nuv, #endif -#ifdef HAVE_X264 +#ifdef CONFIG_X264 &ve_info_x264, #endif /* Please do not add any new encoders here. If you want to implement a new diff --git a/libmpcodecs/ve_raw.c b/libmpcodecs/ve_raw.c index d0f54df81b..225fd3bfaf 100644 --- a/libmpcodecs/ve_raw.c +++ b/libmpcodecs/ve_raw.c @@ -27,7 +27,8 @@ struct vf_priv_s { #define mux_v (vf->priv->mux) static int set_format(struct vf_instance *vf, unsigned int fmt) { - mux_v->bih->biCompression = fmt; + if (!force_fourcc) + mux_v->bih->biCompression = fmt; mux_v->bih->biPlanes = 1; if (IMGFMT_IS_RGB(fmt)) { diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index 345e67b4a0..7fed0abc43 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -831,7 +831,7 @@ static demuxer_t* demux_open_hack_avi(demuxer_t *demuxer) if(!demuxer) return NULL; // failed to open sh_a = demuxer->audio->sh; if(demuxer->audio->id != -2 && sh_a) { -#ifdef HAVE_OGGVORBIS +#ifdef CONFIG_OGGVORBIS // support for Ogg-in-AVI: if(sh_a->format == 0xFFFE) demuxer = init_avi_with_ogg(demuxer); diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 2bd996e207..fe5697fc3d 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -28,7 +28,7 @@ #include <vorbis/codec.h> #endif -#ifdef HAVE_OGGTHEORA +#ifdef CONFIG_OGGTHEORA #include <theora/theora.h> extern int _ilog (unsigned int); /* defined in many places in theora/lib/ */ #endif @@ -39,7 +39,7 @@ extern int _ilog (unsigned int); /* defined in many places in theora/lib/ */ * without using theora_granule_time with the theora_state of the stream. * This is duplicated in `vd_theora.c'; put this in a common header? */ -#ifdef HAVE_OGGTHEORA +#ifdef CONFIG_OGGTHEORA typedef struct theora_struct_st { theora_state st; theora_comment cc; @@ -196,7 +196,7 @@ void demux_ogg_add_sub (ogg_stream_t* os,ogg_packet* pack) { mp_msg(MSGT_DEMUX,MSGL_DBG2,"Ogg sub lines: %d first: '%s'\n", ogg_sub.lines, ogg_sub.text[0]); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_recode(&ogg_sub); #endif vo_sub = &ogg_sub; @@ -266,7 +266,7 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,fl } } else if (os->speex) { // whole packet (default) -# ifdef HAVE_OGGTHEORA +# ifdef CONFIG_OGGTHEORA } else if (os->theora) { /* we pass complete packets to theora, mustn't strip the header! */ os->lastsize = 1; @@ -292,7 +292,7 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,fl pack->granulepos = os->lastpos; *pts = (double)os->lastpos / (double)os->samplerate; } -#endif /* HAVE_OGGTHEORA */ +#endif /* CONFIG_OGGTHEORA */ } else if (os->flac) { /* we pass complete packets to flac, mustn't strip the header! */ if (os->flac == 2 && pack->packet[0] != 0xff) @@ -745,7 +745,7 @@ int demux_ogg_open(demuxer_t* demuxer) { sh_audio_t* sh_a; sh_video_t* sh_v; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_open(NULL); #endif @@ -838,7 +838,7 @@ int demux_ogg_open(demuxer_t* demuxer) { mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: audio (Speex), -aid %d\n",ogg_d->num_sub,n_audio-1); // check for Theora -# ifdef HAVE_OGGTHEORA +# ifdef CONFIG_OGGTHEORA } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) { int errorCode = 0; theora_info inf; @@ -884,7 +884,7 @@ int demux_ogg_open(demuxer_t* demuxer) { } theora_comment_clear(&cc); theora_info_clear(&inf); -# endif /* HAVE_OGGTHEORA */ +# endif /* CONFIG_OGGTHEORA */ } else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) { sh_a = new_sh_audio_aid(demuxer,ogg_d->num_sub, n_audio); sh_a->format = mmioFOURCC('f', 'L', 'a', 'C'); @@ -1487,7 +1487,7 @@ static void demux_close_ogg(demuxer_t* demuxer) { if(!ogg_d) return; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index 6ca1f4aaa4..6d27566d71 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -114,7 +114,7 @@ const demuxer_desc_t *const demuxer_list[] = { #ifdef HAVE_GIF &demuxer_desc_gif, #endif -#ifdef HAVE_OGGVORBIS +#ifdef CONFIG_OGGVORBIS &demuxer_desc_ogg, #endif #ifdef CONFIG_WIN32DLL @@ -143,11 +143,11 @@ const demuxer_desc_t *const demuxer_list[] = { #ifdef MUSEPACK &demuxer_desc_mpc, #endif -#ifdef HAVE_LIBDV095 +#ifdef CONFIG_LIBDV095 &demuxer_desc_rawdv, #endif &demuxer_desc_aac, -#ifdef HAVE_LIBNUT +#ifdef CONFIG_LIBNUT &demuxer_desc_nut, #endif #ifdef HAVE_XMMS diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index be4339b62e..5e5a54558f 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -386,7 +386,7 @@ char* demux_info_get(demuxer_t *demuxer, const char *opt); int demux_info_print(demuxer_t *demuxer); int demux_control(demuxer_t *demuxer, int cmd, void *arg); -#ifdef HAVE_OGGVORBIS +#ifdef CONFIG_OGGVORBIS /* Found in demux_ogg.c */ int demux_ogg_num_subs(demuxer_t *demuxer); int demux_ogg_sub_id(demuxer_t *demuxer, int index); diff --git a/libmpeg2/libmpeg-0.4.1.diff b/libmpeg2/libmpeg-0.4.1.diff index 16e9cff950..133ea8b4e4 100644 --- a/libmpeg2/libmpeg-0.4.1.diff +++ b/libmpeg2/libmpeg-0.4.1.diff @@ -194,14 +194,17 @@ if (accel & MPEG2_ACCEL_PPC_ALTIVEC) mpeg2_mc = mpeg2_mc_altivec; else -@@ -67,6 +61,13 @@ +@@ -61,6 +61,16 @@ mpeg2_mc = mpeg2_mc_vis; else #endif +#ifdef ARCH_ARM ++#ifdef HAVE_IWMMXT + if (accel & MPEG2_ACCEL_ARM_IWMMXT) + mpeg2_mc = mpeg2_mc_iwmmxt; -+ else if (accel & MPEG2_ACCEL_ARM) ++ else ++#endif ++ if (accel & MPEG2_ACCEL_ARM) + mpeg2_mc = mpeg2_mc_arm; + else +#endif @@ -336,20 +339,6 @@ /* work around gcc <3.3 vec_mergel bug */ static inline vector_s16_t my_vec_mergel (vector_s16_t const A, vector_s16_t const B) -@@ -56,10 +56,10 @@ - #define vec_mergel my_vec_mergel - #endif - --#ifdef HAVE_ALTIVEC_H /* gnu */ --#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} --#else /* apple */ -+#if defined(__APPLE_CC__) /* apple */ - #define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h) -+#else /* gnu */ -+#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} - #endif - - static const vector_s16_t constants ATTR_ALIGN(16) = Index: libmpeg2/motion_comp_arm.c =================================================================== --- libmpeg2/motion_comp_arm.c (revision 0) diff --git a/libmpeg2/motion_comp.c b/libmpeg2/motion_comp.c index a8232c9fa3..37c9c3db0e 100644 --- a/libmpeg2/motion_comp.c +++ b/libmpeg2/motion_comp.c @@ -62,9 +62,12 @@ void mpeg2_mc_init (uint32_t accel) else #endif #ifdef ARCH_ARM +#ifdef HAVE_IWMMXT if (accel & MPEG2_ACCEL_ARM_IWMMXT) mpeg2_mc = mpeg2_mc_iwmmxt; - else if (accel & MPEG2_ACCEL_ARM) + else +#endif + if (accel & MPEG2_ACCEL_ARM) mpeg2_mc = mpeg2_mc_arm; else #endif diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index 5d99a59b5f..ee7c1dae9b 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -16,7 +16,7 @@ #include <math.h> #include <string.h> -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> #endif @@ -716,7 +716,7 @@ static int generate_tables(font_desc_t *desc, double thickness, double radius) return 0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV /* decode from 'encoding' to unicode */ static FT_ULong decode_char(iconv_t *cd, char c) { FT_ULong o; @@ -1009,7 +1009,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int movie_width, int movie_hei } desc->face_cnt++; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (unicode) { charset_size = prepare_charset_unicode(face, my_charset, my_charcodes); } else { diff --git a/libvo/mga_common.c b/libvo/mga_common.c index acd7d88cd2..9fe2777b4f 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -313,7 +313,7 @@ static int control(uint32_t request, void *data) return VO_TRUE; #endif -#if defined( VO_XMGA ) && defined( HAVE_NEW_GUI ) +#if defined(VO_XMGA) && defined(CONFIG_GUI) case VOCTRL_GUISUPPORT: return VO_TRUE; #endif diff --git a/libvo/video_out.c b/libvo/video_out.c index ba5051d4c4..e932e3c59c 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -103,13 +103,13 @@ extern struct vo_driver video_out_md5sum; const struct vo_driver *video_out_drivers[] = { -#ifdef HAVE_XVR100 +#ifdef CONFIG_XVR100 &video_out_xvr100, #endif -#ifdef HAVE_TDFX_VID +#ifdef CONFIG_TDFX_VID &video_out_tdfx_vid, #endif -#ifdef HAVE_DIRECTX +#ifdef CONFIG_DIRECTX &video_out_directx, #endif #ifdef HAVE_COREVIDEO @@ -118,19 +118,19 @@ const struct vo_driver *video_out_drivers[] = #ifdef HAVE_QUARTZ &video_out_quartz, #endif -#ifdef HAVE_XMGA +#ifdef CONFIG_XMGA &video_out_xmga, #endif -#ifdef HAVE_MGA +#ifdef CONFIG_MGA &video_out_mga, #endif -#ifdef HAVE_TDFXFB +#ifdef CONFIG_TDFXFB &video_out_tdfxfb, #endif -#ifdef HAVE_S3FB +#ifdef CONFIG_S3FB &video_out_s3fb, #endif -#ifdef HAVE_3DFX +#ifdef CONFIG_3DFX &video_out_3dfx, #endif #ifdef HAVE_XV @@ -140,30 +140,30 @@ const struct vo_driver *video_out_drivers[] = &video_out_x11, &video_out_xover, #endif -#ifdef HAVE_GL +#ifdef CONFIG_GL &video_out_gl, &video_out_gl2, #endif #ifdef HAVE_DGA &video_out_dga, #endif -#ifdef HAVE_SDL +#ifdef CONFIG_SDL &video_out_sdl, #endif -#ifdef HAVE_GGI +#ifdef CONFIG_GGI &video_out_ggi, #endif -#ifdef HAVE_FBDEV +#ifdef CONFIG_FBDEV &video_out_fbdev, &video_out_fbdev2, #endif -#ifdef HAVE_SVGALIB +#ifdef CONFIG_SVGALIB &video_out_svga, #endif -#ifdef HAVE_AA +#ifdef CONFIG_AA &video_out_aa, #endif -#ifdef HAVE_CACA +#ifdef CONFIG_CACA &video_out_caca, #endif #ifdef HAVE_DXR2 @@ -182,16 +182,16 @@ const struct vo_driver *video_out_drivers[] = &video_out_zr, &video_out_zr2, #endif -#ifdef HAVE_BL +#ifdef CONFIG_BL &video_out_bl, #endif -#ifdef HAVE_VESA +#ifdef CONFIG_VESA &video_out_vesa, #endif -#ifdef HAVE_DIRECTFB +#ifdef CONFIG_DIRECTFB &video_out_directfb, #endif -#ifdef HAVE_DFBMGA +#ifdef CONFIG_DFBMGA &video_out_dfbmga, #endif #ifdef CONFIG_VIDIX @@ -209,7 +209,7 @@ const struct vo_driver *video_out_drivers[] = &video_out_xvmc, #endif &video_out_mpegpes, -#ifdef HAVE_YUV4MPEG +#ifdef CONFIG_YUV4MPEG &video_out_yuv4mpeg, #endif #ifdef HAVE_PNG @@ -221,13 +221,13 @@ const struct vo_driver *video_out_drivers[] = #ifdef HAVE_GIF &video_out_gif89a, #endif -#ifdef HAVE_TGA +#ifdef CONFIG_TGA &video_out_tga, #endif #ifdef HAVE_PNM &video_out_pnm, #endif -#ifdef HAVE_MD5SUM +#ifdef CONFIG_MD5SUM &video_out_md5sum, #endif NULL @@ -381,7 +381,7 @@ int vo_config(struct vo *vo, uint32_t width, uint32_t height, return ret; } -#if defined(HAVE_FBDEV)||defined(HAVE_VESA) +#if defined(CONFIG_FBDEV)||defined(CONFIG_VESA) /* Borrowed from vo_fbdev.c Monitor ranges related functions*/ diff --git a/libvo/video_out.h b/libvo/video_out.h index 6a9908e19b..e392b55f2b 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -286,7 +286,7 @@ extern int vo_colorkey; extern int WinID; -#if defined(HAVE_FBDEV) || defined(HAVE_VESA) +#if defined(CONFIG_FBDEV) || defined(CONFIG_VESA) typedef struct { float min; @@ -300,6 +300,6 @@ extern char *monitor_hfreq_str; extern char *monitor_vfreq_str; extern char *monitor_dotclock_str; -#endif /* defined(HAVE_FBDEV) || defined(HAVE_VESA) */ +#endif /* defined(CONFIG_FBDEV) || defined(CONFIG_VESA) */ #endif /* MPLAYER_VIDEO_OUT_H */ diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index 7053c8bc01..67ed453d04 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -38,7 +38,7 @@ #include "geometry.h" #include "mp_fifo.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -1291,7 +1291,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin if(format != primary_image_format)nooverlay = 0; window_aspect= (float)d_image_width / (float)d_image_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui){ guiGetEvent(guiSetShVideo, 0); } diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 2e8e7cedc5..982a8eb265 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -32,7 +32,7 @@ #include "aspect.h" #include "spuenc.h" #include "sub.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif #ifdef HAVE_X11 @@ -476,7 +476,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ vo_dy = (vo_screenheight - d_height) / 2; vo_dwidth = d_width; vo_dheight = d_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { guiGetEvent(guiSetShVideo, 0); XSetWindowBackground(mDisplay, vo_window, KEY_COLOR); @@ -693,12 +693,12 @@ static void uninit(void) overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF); overlay_release(overlay_data); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (!use_gui) { #endif vo_x11_uninit(); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif } @@ -875,14 +875,14 @@ static int preinit(const char *arg) /* Initialize overlay and X11 */ overlay_data = overlay_init(fd_control); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (!use_gui) { #endif if (!vo_init()) { mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToInitX11); return -1; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif } diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c index b3f970ad8c..935e64ea95 100644 --- a/libvo/vo_ggi.c +++ b/libvo/vo_ggi.c @@ -29,7 +29,7 @@ #include <ggi/ggi.h> -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH #include <ggi/wmh.h> #endif @@ -72,7 +72,7 @@ static struct ggi_conf_s { } ggi_conf; -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH static void window_ontop(void) { mp_msg(MSGT_VO, MSGL_V, "[ggi] debug: window_ontop() called\n"); @@ -163,7 +163,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, #endif -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH ggiWmhSetTitle(ggi_conf.vis, title); if (vo_ontop) window_ontop(); #endif @@ -397,7 +397,7 @@ static int preinit(const char *arg) mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize GGI\n"); return -1; } -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH if (ggiWmhInit() < 0) { mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize libggiwmh\n"); return -1; @@ -426,7 +426,7 @@ static int preinit(const char *arg) ggi_conf.drawvis = ggi_conf.vis; -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH ggiWmhAttach(ggi_conf.vis); #endif @@ -442,7 +442,7 @@ static void uninit(void) if (ggi_conf.driver) free(ggi_conf.driver); -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH ggiWmhDetach(ggi_conf.vis); ggiWmhExit(); #endif @@ -461,7 +461,7 @@ static int control(uint32_t request, void *data) return query_format(*((uint32_t *) data)); case VOCTRL_GET_IMAGE: return get_image(data); -#ifdef HAVE_GGIWMH +#ifdef CONFIG_GGIWMH case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); window_ontop(); diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 5a1f3c43ff..f1431e227c 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -13,7 +13,7 @@ #include "gl_common.h" #include "aspect.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif #include "fastmemcpy.h" @@ -459,7 +459,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin int_pause = 0; vo_flipped = !!(flags & VOFLAG_FLIPPING); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { // GUI creates and manages window for us guiGetEvent(guiSetShVideo, 0); diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 9af9b255c5..d7814948aa 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -17,7 +17,7 @@ #include "gl_common.h" #include "aspect.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -542,7 +542,7 @@ static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_ } #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI static int config_glx_gui(uint32_t d_width, uint32_t d_height) { guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window return 0; @@ -616,7 +616,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin int_pause = 0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { if (config_glx_gui(d_width, d_height) == -1) return -1; diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index fd44bbf3dd..4c2e1e5ff8 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -44,7 +44,7 @@ int XShmGetEventBase(Display *); #include "mp_msg.h" #include "help_mp.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #include "mplayer.h" #endif @@ -369,7 +369,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, aspect = ((1 << 16) * d_width + d_height / 2) / d_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 175bda9533..1e1edd91aa 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -43,7 +43,7 @@ static unsigned int timer = 0; static unsigned int timerd = 0; #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -171,7 +171,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, initialized = 1; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c index 04f51790e6..1a2f833913 100644 --- a/libvo/vo_xover.c +++ b/libvo/vo_xover.c @@ -32,7 +32,7 @@ #include "aspect.h" #include "mp_msg.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -258,7 +258,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, vo_dy += xinerama_y; vo_dwidth=d_width; vo_dheight=d_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window else { @@ -308,7 +308,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index d63b2f732d..b7082ed44c 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -46,7 +46,7 @@ Buffer allocation: #include "input/input.h" #include "mp_fifo.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -221,7 +221,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, if (!ctx->xv_format) return -1; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // let the GUI to setup/resize our window else diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index f2136817ae..9e14eac9e7 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -33,7 +33,7 @@ #include "vosub_vidix.h" #include "vidix/vidix.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -273,7 +273,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else @@ -341,7 +341,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (vo_gc != None) XFreeGC(mDisplay, vo_gc); vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index 7a60e2bbbd..56d57c16c2 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -31,7 +31,7 @@ #include "subopt-helper.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -645,7 +645,7 @@ skip_surface_allocation: if( flags&VOFLAG_MODESWITCHING ) vm = 1; #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiGetEvent( guiSetShVideo,0 ); // let the GUI to setup/resize our window else diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 858acda3be..de3a8411fd 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -58,7 +58,7 @@ #include "input/input.h" #include "input/mouse.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #include "mplayer.h" #endif @@ -943,7 +943,7 @@ void vo_x11_uninit(struct vo *vo) XFreeGC(vo->x11->display, x11->f_gc); x11->f_gc = NULL; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI /* destroy window only if it's not controlled by the GUI */ if (!use_gui) #endif @@ -998,7 +998,7 @@ int vo_x11_check_events(struct vo *vo) while (XPending(display)) { XNextEvent(display, &Event); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { guiGetEvent(0, (char *) &Event); @@ -1042,7 +1042,7 @@ int vo_x11_check_events(struct vo *vo) { int key; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) { break; } #endif @@ -1081,7 +1081,7 @@ int vo_x11_check_events(struct vo *vo) x11->mouse_waiting_hide = 1; x11->mouse_timer = GetTimerMS(); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // Ignore mouse button 1-3 under GUI. if (use_gui && (Event.xbutton.button >= 1) && (Event.xbutton.button <= 3)) @@ -1098,7 +1098,7 @@ int vo_x11_check_events(struct vo *vo) x11->mouse_waiting_hide = 1; x11->mouse_timer = GetTimerMS(); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // Ignore mouse button 1-3 under GUI. if (use_gui && (Event.xbutton.button >= 1) && (Event.xbutton.button <= 3)) @@ -1797,7 +1797,7 @@ void vo_vm_close(struct vo *vo) { Display *dpy = vo->x11->display; struct MPOpts *opts = vo->opts; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (vidmodes != NULL && vo->x11->vo_window != None) #else if (vidmodes != NULL) diff --git a/loader/win32.c b/loader/win32.c index 9bc7062f68..29e7348616 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -75,9 +75,7 @@ for DLL to know too much about its environment. #endif #include "osdep/mmap_anon.h" -#if HAVE_VSSCANF -int vsscanf( const char *str, const char *format, va_list ap); -#else +#ifndef HAVE_VSSCANF /* system has no vsscanf. try to provide one */ static int vsscanf( const char *str, const char *format, va_list ap) { @@ -5,18 +5,18 @@ #include "config.h" -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> #include <errno.h> extern char* get_term_charset(void); #endif #if defined(FOR_MENCODER) -#undef HAVE_NEW_GUI +#undef CONFIG_GUI int use_gui; #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif #include "mp_msg.h" @@ -29,7 +29,7 @@ int mp_msg_level_all = MSGL_STATUS; int verbose = 0; int mp_msg_color = 0; int mp_msg_module = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char *mp_msg_charset = NULL; static char *old_charset = NULL; static iconv_t msgiconv; @@ -37,7 +37,7 @@ static iconv_t msgiconv; const char* filename_recode(const char* filename) { -#if !defined(CONFIG_ICONV) || !defined(MSG_CHARSET) +#if !defined(HAVE_ICONV) || !defined(MSG_CHARSET) return filename; #else static iconv_t inv_msgiconv = (iconv_t)(-1); @@ -73,7 +73,7 @@ void mp_msg_init(void){ verbose = atoi(env); for(i=0;i<MSGT_MAX;i++) mp_msg_levels[i] = -2; mp_msg_levels[MSGT_IDENTIFY] = -1; // no -identify output by default -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV mp_msg_charset = getenv("MPLAYER_CHARSET"); if (!mp_msg_charset) mp_msg_charset = get_term_charset(); @@ -179,12 +179,12 @@ void mp_msg(int mod, int lev, const char *format, ... ){ tmp[MSGSIZE_MAX-2] = '\n'; tmp[MSGSIZE_MAX-1] = 0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiMessageBox(lev, tmp); #endif -#if defined(CONFIG_ICONV) && defined(MSG_CHARSET) +#if defined(HAVE_ICONV) && defined(MSG_CHARSET) if (mp_msg_charset && strcasecmp(mp_msg_charset, "noconv")) { char tmp2[MSGSIZE_MAX]; size_t inlen = strlen(tmp), outlen = MSGSIZE_MAX; diff --git a/mpcommon.c b/mpcommon.c index c577dce4fd..980da30d4e 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -212,26 +212,26 @@ int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang) /* Parse -noconfig common to both programs */ int disable_system_conf=0; int disable_user_conf=0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI int disable_gui_conf=0; -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ /* Disable all configuration files */ static void noconfig_all(void) { disable_system_conf = 1; disable_user_conf = 1; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI disable_gui_conf = 1; -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ } const m_option_t noconfig_opts[] = { {"all", noconfig_all, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, {"system", &disable_system_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, {"user", &disable_user_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI {"gui", &disable_gui_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -78,7 +78,7 @@ #include "cpudetect.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -202,7 +202,7 @@ static int output_quality=0; int use_gui=0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI int enqueue=0; #endif @@ -300,7 +300,7 @@ char* current_module=NULL; // for debugging // --- -#ifdef HAVE_MENU +#ifdef CONFIG_MENU #include "m_struct.h" #include "libmenu/menu.h" extern void vf_menu_pause_update(struct vf_instance* vf); @@ -561,7 +561,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){ mpctx->initialized_flags&=~INITIALIZED_ACODEC; current_module="uninit_acodec"; if(mpctx->sh_audio) uninit_audio(mpctx->sh_audio); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetAfilter, (char *)NULL); #endif mpctx->sh_audio=NULL; @@ -573,7 +573,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){ current_module="uninit_vcodec"; if(mpctx->sh_video) uninit_video(mpctx->sh_video); mpctx->sh_video=NULL; -#ifdef HAVE_MENU +#ifdef CONFIG_MENU vf_menu=NULL; #endif } @@ -636,7 +636,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){ mpctx->audio_out->uninit(mpctx->eof?0:1); mpctx->audio_out=NULL; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(mask&INITIALIZED_GUI){ mpctx->initialized_flags&=~INITIALIZED_GUI; current_module="uninit_gui"; @@ -655,7 +655,7 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ timeEndPeriod(1); #endif #ifdef HAVE_X11 -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( !use_gui ) #endif vo_uninit(mpctx->x11_state); // Close the X11 connection (if any is open). @@ -663,7 +663,7 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ current_module="uninit_input"; mp_input_uninit(mpctx->input); -#ifdef HAVE_MENU +#ifdef CONFIG_MENU if (use_menu) menu_uninit(); #endif @@ -957,7 +957,7 @@ static int playtree_add_playlist(struct MPContext *mpctx, play_tree_t* entry) { play_tree_add_bpf(entry,mpctx->filename); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { if (entry) { import_playtree_playlist_into_gui(entry, mpctx->mconfig); @@ -1004,7 +1004,7 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr subd = sub_read_file(filename, fps); #ifdef CONFIG_ASS if (ass_enabled) -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV asst = ass_read_file(ass_library, filename, sub_cp); #else asst = ass_read_file(ass_library, filename, 0); @@ -1276,7 +1276,7 @@ int build_afilter_chain(struct MPContext *mpctx, sh_audio_t *sh_audio, ao_data_t int result; if (!sh_audio) { -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetAfilter, (char *)NULL); #endif mpctx->mixer.afilter = NULL; @@ -1300,7 +1300,7 @@ int build_afilter_chain(struct MPContext *mpctx, sh_audio_t *sh_audio, ao_data_t result = init_audio_filters(sh_audio, new_srate, &ao_data->samplerate, &ao_data->channels, &ao_data->format); mpctx->mixer.afilter = sh_audio->afilter; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetAfilter, (char *)sh_audio->afilter); #endif return result; @@ -2158,7 +2158,7 @@ int reinit_video_chain(struct MPContext *mpctx) char* vf_arg[] = { "_oldargs_", (char*)mpctx->video_out , NULL }; sh_video->vfilter = vf_open_filter(opts, NULL,"vo",vf_arg); } -#ifdef HAVE_MENU +#ifdef CONFIG_MENU if(use_menu) { char* vf_arg[] = { "_oldargs_", menu_root, NULL }; vf_menu = vf_open_plugin(opts,libmenu_vfs,sh_video->vfilter,"menu",vf_arg); @@ -2343,7 +2343,7 @@ static void pause_loop(struct MPContext *mpctx) mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_PAUSED\n"); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiCEvent, (char *)guiSetPause); #endif @@ -2362,7 +2362,7 @@ static void pause_loop(struct MPContext *mpctx) } if (mpctx->sh_video && mpctx->video_out) vo_check_events(mpctx->video_out); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { guiEventHandling(); guiGetEvent(guiReDraw, NULL); @@ -2370,7 +2370,7 @@ static void pause_loop(struct MPContext *mpctx) break; } #endif -#ifdef HAVE_MENU +#ifdef CONFIG_MENU if (vf_menu) vf_menu_pause_update(vf_menu); #endif @@ -2386,7 +2386,7 @@ static void pause_loop(struct MPContext *mpctx) if (mpctx->video_out && mpctx->sh_video && mpctx->video_out->config_ok) vo_control(mpctx->video_out, VOCTRL_RESUME, NULL); // resume video (void)get_relative_time(mpctx); // ignore time that passed during pause -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { if (guiIntfStruct.Playing == guiSetStop) mpctx->eof = 1; @@ -2619,7 +2619,7 @@ int gui_no_filename=0; parse_cfgfiles(mpctx, mpctx->mconfig); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) cfg_read(); #endif @@ -2641,7 +2641,7 @@ int gui_no_filename=0; } mpctx->key_fifo = mp_fifo_create(opts); -#if defined(WIN32) && defined(HAVE_NEW_GUI) +#if defined(WIN32) && defined(CONFIG_GUI) void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); if(runningmplayer && mpctx->filename && use_gui){ COPYDATASTRUCT csData; @@ -2670,7 +2670,7 @@ int gui_no_filename=0; SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio); } #endif -#ifndef HAVE_NEW_GUI +#ifndef CONFIG_GUI if(use_gui){ mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui); use_gui=0; @@ -2697,7 +2697,7 @@ int gui_no_filename=0; // Import initital playtree into GUI. import_initial_playtree_into_gui(mpctx->playtree, mpctx->mconfig, enqueue); } -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ if(opts->video_driver_list && strcmp(opts->video_driver_list[0],"help")==0){ list_video_out(); @@ -2865,7 +2865,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_UsingRTCTiming, irqp); } } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // breaks DGA and SVGAlib and VESA drivers: --A'rpi // and now ? -- Pontscho if(use_gui) setuid( getuid() ); // strongly test, please check this. @@ -2875,7 +2875,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ mp_msg(MSGT_CPLAYER, MSGL_V, "Using %s timing\n", softsleep?"software":timer_name); -#ifdef CONFIG_TERMCAP +#ifdef HAVE_TERMCAP if ( !use_gui ) load_termcap(NULL); // load key-codes #endif @@ -2892,7 +2892,7 @@ else if(!noconsolecontrols) // Set the libstream interrupt callback stream_set_interrupt_callback(mp_input_check_interrupt, mpctx->input); -#ifdef HAVE_MENU +#ifdef CONFIG_MENU if(use_menu) { if(menu_cfg && menu_init(mpctx, mpctx->mconfig, mpctx->input, menu_cfg)) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg); @@ -2945,7 +2945,7 @@ current_module = NULL; #endif #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui){ guiInit(); guiGetEvent(guiSetContext, mpctx); @@ -2985,7 +2985,7 @@ if(!noconsolecontrols && !slave_mode){ } // =================== GUI idle loop (STOP state) =========================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) { mpctx->file_format=DEMUXER_TYPE_UNKNOWN; guiGetEvent( guiSetDefaults,0 ); @@ -3023,7 +3023,7 @@ if(!noconsolecontrols && !slave_mode){ } } } -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ while (player_idle_mode && !mpctx->filename) { play_tree_t * entry = NULL; @@ -3168,7 +3168,7 @@ if (edl_output_filename) { } mpctx->initialized_flags|=INITIALIZED_STREAM; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) guiGetEvent( guiSetStream,(char *)mpctx->stream ); #endif @@ -3654,7 +3654,7 @@ if(force_fps && mpctx->sh_video){ mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,mpctx->sh_video->fps,mpctx->sh_video->frametime); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) { if ( mpctx->sh_audio ) guiIntfStruct.AudioType=mpctx->sh_audio->channels; else guiIntfStruct.AudioType=0; if ( !mpctx->sh_video && mpctx->sh_audio ) guiGetEvent( guiSetAudioOnly,(char *)1 ); else guiGetEvent( guiSetAudioOnly,(char *)0 ); @@ -3772,7 +3772,7 @@ if(!mpctx->sh_video) { // current_module="draw_osd"; // if(vo_config_count) mpctx->video_out->draw_osd(); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiEventHandling(); #endif @@ -3921,7 +3921,7 @@ if(mpctx->rel_seek_secs || mpctx->abs_seek_pos){ edl_decision = 0; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui){ guiEventHandling(); if(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength>2){ @@ -3946,7 +3946,7 @@ if(mpctx->rel_seek_secs || mpctx->abs_seek_pos){ } #endif } -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ } // while(!mpctx->eof) @@ -4054,7 +4054,7 @@ while(mpctx->playtree_iter != NULL) { break; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui && !mpctx->playtree_iter) { #ifdef CONFIG_DVDREAD if(!guiIntfStruct.DiskChanged) diff --git a/osdep/getch2-os2.c b/osdep/getch2-os2.c index 5d21efbcd0..3b94b4d736 100644 --- a/osdep/getch2-os2.c +++ b/osdep/getch2-os2.c @@ -33,7 +33,7 @@ #include "mp_fifo.h" #include "getch2.h" -#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV) +#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV) #include <locale.h> #include <langinfo.h> #endif @@ -183,12 +183,12 @@ void getch2_disable( void ) getch2_status = 0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char *get_term_charset( void ) { char *charset = NULL; -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO setlocale( LC_CTYPE, ""); charset = nl_langinfo( CODESET ); setlocale( LC_CTYPE, "C"); diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c index 49ec9c46b3..feaf5f74d9 100644 --- a/osdep/getch2-win.c +++ b/osdep/getch2-win.c @@ -144,7 +144,7 @@ void getch2_disable(){ getch2_status=0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static const struct { unsigned cp; char* alias; diff --git a/osdep/getch2.c b/osdep/getch2.c index 92ac4a844d..c9cb4f6319 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -2,7 +2,7 @@ #include "config.h" -//#define CONFIG_TERMCAP +//#define HAVE_TERMCAP #if !defined(__OS2__) && !defined(__MORPHOS__) #define CONFIG_IOCTL #endif @@ -28,7 +28,7 @@ #endif #endif -#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV) +#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV) #include <locale.h> #include <langinfo.h> #endif @@ -57,7 +57,7 @@ typedef struct { static keycode_st getch2_keys[MAX_KEYS]; static int getch2_key_db=0; -#ifdef CONFIG_TERMCAP +#ifdef HAVE_TERMCAP #if 0 #include <termcap.h> @@ -271,11 +271,11 @@ void getch2_disable(void){ getch2_status=0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char* get_term_charset(void) { char* charset = NULL; -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO setlocale(LC_CTYPE, ""); charset = nl_langinfo(CODESET); setlocale(LC_CTYPE, "C"); diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 54e62bf560..6301711176 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -46,12 +46,12 @@ #endif #ifndef CONFIG_SETLOCALE -#undef CONFIG_ICONV +#undef HAVE_ICONV #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO #include <langinfo.h> #endif #endif @@ -143,13 +143,13 @@ static void send_command (int s, int command, uint32_t switches, } } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static iconv_t url_conv; #endif static void string_utf16(char *dest, char *src, int len) { int i; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV size_t len1, len2; char *ip, *op; @@ -172,7 +172,7 @@ static void string_utf16(char *dest, char *src, int len) { /* trailing zeroes */ dest[i*2] = 0; dest[i*2+1] = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV } #endif } @@ -575,8 +575,8 @@ int asf_mmst_streaming_start(stream_t *stream) * */ /* prepare for the url encoding conversion */ -#ifdef CONFIG_ICONV -#ifdef CONFIG_LANGINFO +#ifdef HAVE_ICONV +#ifdef HAVE_LANGINFO url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); #else url_conv = iconv_open("UTF-16LE", NULL); @@ -691,7 +691,7 @@ int asf_mmst_streaming_start(stream_t *stream) packet_length1 = packet_length; mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (url_conv != (iconv_t)(-1)) iconv_close(url_conv); #endif diff --git a/stream/cache2.c b/stream/cache2.c index 0696526f32..366727302a 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -369,7 +369,7 @@ static void ThreadProc( void *s ){ #endif #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI use_gui = 0; // mp_msg may not use gui stuff in forked code #endif // cache thread mainloop: diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c index beda0dac4f..b582b1a700 100644 --- a/stream/librtsp/rtsp_rtp.c +++ b/stream/librtsp/rtsp_rtp.c @@ -297,7 +297,7 @@ rtp_connect (char *hostname, int port) sin.sin_addr.s_addr = htonl (INADDR_ANY); else #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (hostname, &sin.sin_addr); #else inet_pton (AF_INET, hostname, &sin.sin_addr); @@ -386,7 +386,7 @@ is_multicast_address (char *addr) sin.sin_family = AF_INET; #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (addr, &sin.sin_addr); #else inet_pton (AF_INET, addr, &sin.sin_addr); diff --git a/stream/tcp.c b/stream/tcp.c index f4c71f651d..950c434886 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -116,7 +116,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { memset(&server_address, 0, sizeof(server_address)); #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON if (inet_aton(host, our_s_addr)!=1) #else if (inet_pton(af, host, our_s_addr)!=1) @@ -164,7 +164,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { return TCP_ERROR_FATAL; } -#if defined(CONFIG_ATON) || defined(HAVE_WINSOCK2) +#if defined(HAVE_ATON) || defined(HAVE_WINSOCK2) strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); #else inet_ntop(af, our_s_addr, buf, 255); diff --git a/stream/udp.c b/stream/udp.c index 7ad2542ba1..759c5a9675 100644 --- a/stream/udp.c +++ b/stream/udp.c @@ -92,11 +92,11 @@ udp_open_socket (URL_t *url) else { #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (url->hostname, &server_address.sin_addr); #else inet_pton (AF_INET, url->hostname, &server_address.sin_addr); -#endif /* CONFIG_ATON */ +#endif /* HAVE_ATON */ #else server_address.sin_addr.s_addr = htonl(INADDR_ANY); #endif /* HAVE_WINSOCK2 */ diff --git a/subreader.c b/subreader.c index 16bcad625f..3d607a6a10 100644 --- a/subreader.c +++ b/subreader.c @@ -26,11 +26,11 @@ #define ERR ((void *) -1) -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> char *sub_cp=NULL; #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #include <fribidi/fribidi.h> char *fribidi_charset = NULL; ///character set that will be passed to FriBiDi int flip_hebrew = 1; ///flip subtitles using fribidi @@ -1071,7 +1071,7 @@ int sub_utf8_prev=0; extern float sub_delay; extern float sub_fps; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static iconv_t icdsc = (iconv_t)(-1); void subcp_open (stream_t *st) @@ -1146,7 +1146,7 @@ subtitle* subcp_recode (subtitle *sub) } #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #ifndef max #define max(a,b) (((a)>(b))?(a):(b)) #endif @@ -1369,7 +1369,7 @@ sub_data* sub_read_file (char *filename, float fps) { stream_reset(fd); stream_seek(fd,0); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV sub_utf8_prev=sub_utf8; { int l,k; @@ -1389,7 +1389,7 @@ sub_data* sub_read_file (char *filename, float fps) { sub_num=0;n_max=32; first=malloc(n_max*sizeof(subtitle)); if(!first){ -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); sub_utf8=sub_utf8_prev; #endif @@ -1413,15 +1413,15 @@ sub_data* sub_read_file (char *filename, float fps) { memset(sub, '\0', sizeof(subtitle)); sub=srp->read(fd,sub); if(!sub) break; // EOF -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if ((sub!=ERR) && (sub_utf8 & 2)) sub=subcp_recode(sub); #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8); #endif if ( sub == ERR ) { -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif if ( first ) free(first); @@ -1474,7 +1474,7 @@ sub_data* sub_read_file (char *filename, float fps) { free_stream(fd); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif @@ -1876,7 +1876,7 @@ char** sub_filenames(const char* path, char *fname) // does it end with a subtitle extension? found = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #ifdef HAVE_ENCA for (i = ((sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0); sub_exts[i]; i++) { #else @@ -1931,7 +1931,7 @@ char** sub_filenames(const char* path, char *fname) if (prio) { prio += prio; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (i<3){ // prefer UTF-8 coded prio++; } |