From 4b141479da70665db8d5780c9ca9e430c9dd1f09 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 30 Jul 2008 12:01:30 +0000 Subject: Start unifying names of internal preprocessor directives. Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-common-opts.h | 38 ++++---- cfg-common.h | 8 +- cfg-mencoder.h | 26 +++--- cfg-mplayer.h | 12 +-- command.c | 62 ++++++------- configure | 198 ++++++++++++++++++++-------------------- get_path.c | 12 +-- gui/cfg.c | 18 ++-- gui/cfg.h | 2 +- gui/interface.c | 32 +++---- gui/interface.h | 6 +- gui/mplayer/gtk/menu.c | 8 +- gui/mplayer/gtk/opts.c | 56 ++++++------ gui/mplayer/gui_common.c | 4 +- gui/mplayer/mw.c | 8 +- gui/mplayer/play.c | 8 +- gui/win32/dialogs.c | 2 +- gui/win32/gui.c | 6 +- gui/win32/interface.c | 20 ++-- gui/win32/widgetrender.c | 2 +- help/help_mp-bg.h | 2 +- help/help_mp-cs.h | 2 +- help/help_mp-de.h | 2 +- help/help_mp-dk.h | 2 +- help/help_mp-el.h | 2 +- help/help_mp-en.h | 2 +- help/help_mp-es.h | 2 +- help/help_mp-fr.h | 2 +- help/help_mp-hu.h | 2 +- help/help_mp-it.h | 2 +- help/help_mp-ja.h | 2 +- help/help_mp-ko.h | 2 +- help/help_mp-mk.h | 2 +- help/help_mp-nb.h | 2 +- help/help_mp-nl.h | 2 +- help/help_mp-pl.h | 2 +- help/help_mp-pt_BR.h | 2 +- help/help_mp-ro.h | 2 +- help/help_mp-ru.h | 2 +- help/help_mp-sk.h | 2 +- help/help_mp-sv.h | 2 +- help/help_mp-tr.h | 2 +- help/help_mp-uk.h | 2 +- help/help_mp-zh_CN.h | 2 +- help/help_mp-zh_TW.h | 2 +- input/input.c | 12 +-- libaf/af.c | 8 +- libao2/audio_out.c | 16 ++-- libass/ass.c | 10 +- libass/ass_mp.c | 2 +- libmenu/menu.c | 6 +- libmpcodecs/ad.c | 16 ++-- libmpcodecs/ad_faad.c | 2 +- libmpcodecs/ad_mp3lib.c | 2 +- libmpcodecs/ad_realaud.c | 28 +++--- libmpcodecs/ae.c | 4 +- libmpcodecs/ae_lavc.c | 6 +- libmpcodecs/dec_audio.c | 2 +- libmpcodecs/dec_video.c | 2 +- libmpcodecs/vd.c | 12 +-- libmpcodecs/vd_ffmpeg.c | 2 +- libmpcodecs/vd_realvid.c | 18 ++-- libmpcodecs/ve.c | 8 +- libmpcodecs/ve_lavc.c | 2 +- libmpcodecs/vf.c | 8 +- libmpcodecs/vf_pp.c | 2 +- libmpcodecs/vf_vo.c | 10 +- libmpdemux/demux_mkv.c | 12 +-- libmpdemux/demux_mov.c | 6 +- libmpdemux/demux_ogg.c | 6 +- libmpdemux/demux_rtp.cpp | 4 +- libmpdemux/demux_rtp_codec.cpp | 4 +- libmpdemux/demux_rtp_internal.h | 2 +- libmpdemux/demuxer.c | 18 ++-- libmpdemux/demuxer.h | 2 +- libmpdemux/extension.c | 2 +- libmpdemux/muxer.c | 2 +- libmpdemux/muxer_mpeg.c | 2 +- libmpdemux/stheader.h | 2 +- libvo/aclib.c | 5 +- libvo/fastmemcpy.h | 4 +- libvo/font_load_ft.c | 6 +- libvo/sub.c | 12 +-- libvo/sub.h | 2 +- loader/win32.c | 2 +- mencoder.c | 28 +++--- mp3lib/decod386.c | 2 +- mp3lib/mp3.h | 2 +- mp3lib/sr1.c | 4 +- mp3lib/test.c | 2 +- mp3lib/test2.c | 2 +- mp_core.h | 4 +- mp_msg.c | 10 +- mpcommon.c | 4 +- mplayer.c | 74 +++++++-------- osdep/getch2-os2.c | 6 +- osdep/getch2-win.c | 2 +- osdep/getch2.c | 16 ++-- stream/asf_mmst_streaming.c | 20 ++-- stream/audio_in.c | 16 ++-- stream/audio_in.h | 6 +- stream/librtsp/rtsp_rtp.c | 4 +- stream/network.c | 2 +- stream/stream.c | 12 +-- stream/stream.h | 2 +- stream/stream_dvd.h | 2 +- stream/stream_dvd_common.c | 2 +- stream/stream_dvd_common.h | 2 +- stream/stream_radio.c | 24 ++--- stream/tcp.c | 4 +- stream/tvi_bsdbt848.c | 8 +- stream/udp.c | 4 +- subreader.c | 46 +++++----- vobsub.c | 4 +- 114 files changed, 581 insertions(+), 582 deletions(-) diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 1ebcd99eb5..0472ba8d06 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -11,7 +11,7 @@ {"msglevel", 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 USE_ICONV +#ifdef CONFIG_ICONV {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, @@ -22,18 +22,18 @@ // ------------------------- stream options -------------------- -#ifdef USE_STREAM_CACHE +#ifdef CONFIG_STREAM_CACHE {"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL}, {"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"cache-min", &stream_cache_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL}, {"cache-seek-min", &stream_cache_seek_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL}, #else {"cache", "MPlayer was compiled without cache2 support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* USE_STREAM_CACHE */ +#endif /* CONFIG_STREAM_CACHE */ {"vcd", "-vcd N has been removed, use vcd://N instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL}, {"cuefile", "-cuefile has been removed, use cue://filename:N where N is the track number.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"cdrom-device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL}, -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD {"dvd-device", &dvd_device, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"dvd-speed", &dvd_speed, CONF_TYPE_INT, 0, 0, 0, NULL}, {"dvd", "-dvd N has been removed, use dvd://N instead.\n" , CONF_TYPE_PRINT, 0, 0, 0, NULL}, @@ -43,7 +43,7 @@ {"dvd-device", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"dvd-speed", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"dvd", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* USE_DVDREAD */ +#endif /* CONFIG_DVDREAD */ {"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL}, @@ -146,16 +146,16 @@ { "noextbased", &extension_parsing, CONF_TYPE_FLAG, 0, 1, 0, NULL }, {"mf", mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL}, -#ifdef USE_RADIO +#ifdef CONFIG_RADIO {"radio", radioopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #else {"radio", "MPlayer was compiled without Radio interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, -#endif /* USE_RADIO */ -#ifdef USE_TV +#endif /* CONFIG_RADIO */ +#ifdef CONFIG_TV {"tv", tvopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #else {"tv", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, -#endif /* USE_TV */ +#endif /* CONFIG_TV */ #ifdef HAVE_PVR {"pvr", pvropts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #else @@ -189,14 +189,14 @@ {"ignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 1, 0, NULL}, -#ifdef USE_LIBA52 +#ifdef CONFIG_LIBA52 {"a52drc", &a52_drc_level, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1, NULL}, #endif // ------------------------- codec/vfilter options -------------------- // MP3-only: select stereo/left/right -#ifdef USE_FAKE_MONO +#ifdef CONFIG_FAKE_MONO {"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL}, #endif @@ -220,10 +220,10 @@ {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, // postprocessing: -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC {"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL}, #endif -#ifdef USE_LIBPOSTPROC +#ifdef CONFIG_LIBPOSTPROC {"pphelp", &pp_help, CONF_TYPE_PRINT_INDIRECT, CONF_NOCFG, 0, 0, NULL}, #endif @@ -251,10 +251,10 @@ {"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL}, -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC {"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #endif -#ifdef USE_LIBAVFORMAT +#ifdef CONFIG_LIBAVFORMAT {"lavfdopts", lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif #if defined(HAVE_XVID3) || defined(HAVE_XVID4) @@ -264,7 +264,7 @@ // ------------------------- subtitles options -------------------- {"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -#ifdef USE_FRIBIDI +#ifdef CONFIG_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}, @@ -276,8 +276,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 /* USE_FRIBIDI */ -#ifdef USE_ICONV +#endif /* CONFIG_FRIBIDI */ +#ifdef CONFIG_ICONV {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL}, @@ -317,7 +317,7 @@ {"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL}, {"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL}, #endif -#ifdef USE_ASS +#ifdef CONFIG_ASS {"ass", &ass_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noass", &ass_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"ass-font-scale", &ass_font_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL}, diff --git a/cfg-common.h b/cfg-common.h index b7a6a07a75..14d3dd4339 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -60,7 +60,7 @@ extern off_t ps_probe; -#ifdef USE_RADIO +#ifdef CONFIG_RADIO const m_option_t radioopts_conf[]={ {"device", &stream_radio_defaults.device, CONF_TYPE_STRING, 0, 0 ,0, NULL}, {"driver", &stream_radio_defaults.driver, CONF_TYPE_STRING, 0, 0 ,0, NULL}, @@ -75,9 +75,9 @@ const m_option_t radioopts_conf[]={ {"achannels", &stream_radio_defaults.achannels, CONF_TYPE_INT, CONF_MIN, 0 ,0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; -#endif /* USE_RADIO */ +#endif /* CONFIG_RADIO */ -#ifdef USE_TV +#ifdef CONFIG_TV const m_option_t tvopts_conf[]={ {"on", "-tv on has been removed, use tv:// instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"immediatemode", &stream_tv_defaults.immediate, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL}, @@ -143,7 +143,7 @@ const m_option_t tvopts_conf[]={ #endif {NULL, NULL, 0, 0, 0, 0, NULL} }; -#endif /* USE_TV */ +#endif /* CONFIG_TV */ #ifdef HAVE_PVR extern int pvr_param_aspect_ratio; diff --git a/cfg-mencoder.h b/cfg-mencoder.h index cdc235f268..1cb5b55efa 100644 --- a/cfg-mencoder.h +++ b/cfg-mencoder.h @@ -42,13 +42,13 @@ const m_option_t ovc_conf[]={ " copy - frame copy, without re-encoding. Doesn't work with filters.\n" " frameno - special audio-only file for 3-pass encoding, see DOCS.\n" " raw - uncompressed video. Use fourcc option to set format explicitly.\n" -#ifdef USE_LIBLZO +#ifdef CONFIG_LIBLZO " nuv - nuppel video\n" #endif -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC " lavc - libavcodec codecs - best quality!\n" #endif -#ifdef USE_WIN32DLL +#ifdef CONFIG_WIN32DLL " vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n" " qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.\n" #endif @@ -73,11 +73,11 @@ const m_option_t oac_conf[]={ #else {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif /* HAVE_MP3LAME */ -#ifdef USE_LIBAVCODEC +#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 /* USE_LIBAVCODEC */ +#endif /* CONFIG_LIBAVCODEC */ #ifdef HAVE_TOOLAME {"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL}, #else @@ -99,7 +99,7 @@ const m_option_t oac_conf[]={ #ifdef HAVE_MP3LAME " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n" #endif -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n" #endif #ifdef HAVE_TOOLAME @@ -138,7 +138,7 @@ const m_option_t info_conf[]={ const m_option_t of_conf[]={ {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL}, {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL}, -#ifdef USE_LIBAVFORMAT +#ifdef CONFIG_LIBAVFORMAT {"lavf", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_LAVF, NULL}, #endif {"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL}, @@ -146,7 +146,7 @@ const m_option_t of_conf[]={ {"help", "\nAvailable output formats:\n" " avi - Microsoft Audio/Video Interleaved\n" " mpeg - MPEG-1/2 system stream format\n" -#ifdef USE_LIBAVFORMAT +#ifdef CONFIG_LIBAVFORMAT " lavf - FFmpeg libavformat muxers\n" #endif " rawvideo - (video only, one stream only) raw stream, no muxing\n" @@ -220,11 +220,11 @@ const m_option_t mencoder_opts[]={ #ifdef HAVE_MP3LAME {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC {"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #else {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* USE_LIBAVCODEC */ +#endif /* CONFIG_LIBAVCODEC */ #ifdef HAVE_TOOLAME {"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #else @@ -240,7 +240,7 @@ const m_option_t mencoder_opts[]={ #else {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif /* HAVE_FAAC */ -#ifdef USE_WIN32DLL +#ifdef CONFIG_WIN32DLL {"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif #if defined(HAVE_XVID3) || defined(HAVE_XVID4) @@ -250,11 +250,11 @@ const m_option_t mencoder_opts[]={ {"x264encopts", &x264enc_set_param, CONF_TYPE_FUNC_PARAM, CONF_GLOBAL, 0, 0, NULL}, #endif -#ifdef USE_LIBLZO +#ifdef CONFIG_LIBLZO {"nuvopts", nuvopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif {"mpegopts", mpegopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, -#ifdef USE_LIBAVFORMAT +#ifdef CONFIG_LIBAVFORMAT {"lavfopts", lavfopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, #endif diff --git a/cfg-mplayer.h b/cfg-mplayer.h index e1b57cba22..b6ab021ea7 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -63,7 +63,7 @@ const m_option_t vd_conf[]={ {NULL, NULL, 0, 0, 0, 0, NULL} }; -#ifdef USE_TV +#ifdef CONFIG_TV const m_option_t tvscan_conf[]={ {"autostart", &stream_tv_defaults.scan, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"threshold", &stream_tv_defaults.scan_threshold, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL}, @@ -259,13 +259,13 @@ 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 USE_FRIBIDI +#ifdef CONFIG_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 /* USE_FRIBIDI */ +#endif /* CONFIG_FRIBIDI */ #else {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, #endif /* HAVE_MENU */ @@ -273,7 +273,7 @@ const m_option_t mplayer_opts[]={ // these should be moved to -common, and supported in MEncoder {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, -#ifdef USE_UNRAR_EXEC +#ifdef CONFIG_UNRAR_EXEC {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif @@ -348,11 +348,11 @@ const m_option_t mplayer_opts[]={ {"mouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"nomouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL}, {"doubleclick-time", &doubleclick_time, CONF_TYPE_INT, CONF_RANGE, 0, 1000, NULL}, -#ifdef USE_TV +#ifdef CONFIG_TV {"tvscan", tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #else {"tvscan", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, -#endif /* USE_TV */ +#endif /* CONFIG_TV */ #include "cfg-common-opts.h" diff --git a/command.c b/command.c index 675b5977f3..61de8e68dc 100644 --- a/command.c +++ b/command.c @@ -28,10 +28,10 @@ #include "vobsub.h" #include "spudec.h" #include "get_path.h" -#ifdef USE_TV +#ifdef CONFIG_TV #include "stream/tv.h" #endif -#ifdef USE_RADIO +#ifdef CONFIG_RADIO #include "stream/stream_radio.h" #endif #ifdef HAVE_PVR @@ -40,13 +40,13 @@ #ifdef HAS_DVBIN_SUPPORT #include "stream/dvbin.h" #endif -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD #include "stream/stream_dvd.h" #endif -#ifdef USE_DVDNAV +#ifdef CONFIG_DVDNAV #include "stream/stream_dvdnav.h" #endif -#ifdef USE_ASS +#ifdef CONFIG_ASS #include "libass/ass.h" #include "libass/ass_mp.h" #endif @@ -813,7 +813,7 @@ static int mp_property_audio(m_option_t * prop, int action, void *arg, sh_audio_t* sh = mpctx->sh_audio; if (sh && sh->lang) av_strlcpy(lang, sh->lang, 40); -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD else if (mpctx->stream->type == STREAMTYPE_DVD) { int code = dvd_lang_from_aid(mpctx->stream, audio_id); if (code) { @@ -824,7 +824,7 @@ static int mp_property_audio(m_option_t * prop, int action, void *arg, } #endif -#ifdef USE_DVDNAV +#ifdef CONFIG_DVDNAV else if (mpctx->stream->type == STREAMTYPE_DVDNAV) mp_dvdnav_lang_from_aid(mpctx->stream, audio_id, lang); #endif @@ -1162,7 +1162,7 @@ static int mp_property_gamma(m_option_t * prop, int action, void *arg, return M_PROPERTY_NOT_IMPLEMENTED; } -#ifdef USE_TV +#ifdef CONFIG_TV if (mpctx->demuxer->type == DEMUXER_TYPE_TV) { int l = strlen(prop->name); char tv_prop[3 + l + 1]; @@ -1322,7 +1322,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, sub_name = 0; if (subdata) sub_name = subdata->filename; -#ifdef USE_ASS +#ifdef CONFIG_ASS if (ass_track && ass_track->name) sub_name = ass_track->name; #endif @@ -1338,7 +1338,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, strlen(tmp) < 20 ? tmp : tmp + strlen(tmp) - 19); return M_PROPERTY_OK; } -#ifdef USE_DVDNAV +#ifdef CONFIG_DVDNAV if (mpctx->stream->type == STREAMTYPE_DVDNAV) { if (vo_spudec && dvdsub_id >= 0) { unsigned char lang[3]; @@ -1367,7 +1367,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, vobsub_id, language ? language : MSGTR_Unknown); return M_PROPERTY_OK; } -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD if (vo_spudec && mpctx->stream->type == STREAMTYPE_DVD && dvdsub_id >= 0) { char lang[3]; @@ -1430,7 +1430,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, reset_spu = 1; d_sub->id = -2; } -#ifdef USE_ASS +#ifdef CONFIG_ASS ass_track = 0; #endif @@ -1439,7 +1439,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, } else if (source == SUB_SOURCE_SUBS) { mpctx->set_of_sub_pos = mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_SUBS]; -#ifdef USE_ASS +#ifdef CONFIG_ASS if (ass_enabled && mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos]) ass_track = mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos]; else @@ -1469,7 +1469,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, sh_sub_t *sh = d_sub->sh; if (sh->type == 'v') init_vo_spudec(); -#ifdef USE_ASS +#ifdef CONFIG_ASS else if (ass_enabled) ass_track = sh->ass_track; #endif @@ -1479,7 +1479,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, } } } -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD if (vo_spudec && (mpctx->stream->type == STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV) @@ -1729,7 +1729,7 @@ static int mp_property_sub_visibility(m_option_t * prop, int action, } } -#ifdef USE_ASS +#ifdef CONFIG_ASS /// Use margins for libass subtitles (RW) static int mp_property_ass_use_margins(m_option_t * prop, int action, void *arg, MPContext * mpctx) @@ -1783,7 +1783,7 @@ static int mp_property_sub_scale(m_option_t * prop, int action, void *arg, if (!arg) return M_PROPERTY_ERROR; M_PROPERTY_CLAMP(prop, *(float *) arg); -#ifdef USE_ASS +#ifdef CONFIG_ASS if (ass_enabled) { ass_font_scale = *(float *) arg; ass_force_reload = 1; @@ -1794,7 +1794,7 @@ static int mp_property_sub_scale(m_option_t * prop, int action, void *arg, return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: -#ifdef USE_ASS +#ifdef CONFIG_ASS if (ass_enabled) { ass_font_scale += (arg ? *(float *) arg : 0.1)* (action == M_PROPERTY_STEP_UP ? 1.0 : -1.0); @@ -1808,7 +1808,7 @@ static int mp_property_sub_scale(m_option_t * prop, int action, void *arg, force_load_font = 1; return M_PROPERTY_OK; default: -#ifdef USE_ASS +#ifdef CONFIG_ASS if (ass_enabled) return m_property_float_ro(prop, action, arg, ass_font_scale); else @@ -1824,7 +1824,7 @@ static int mp_property_sub_scale(m_option_t * prop, int action, void *arg, /// \ingroup Properties ///@{ -#ifdef USE_TV +#ifdef CONFIG_TV /// TV color settings (RW) static int mp_property_tv_color(m_option_t * prop, int action, void *arg, @@ -2076,12 +2076,12 @@ static const m_option_t mp_properties[] = { { "sub_scale", mp_property_sub_scale, CONF_TYPE_FLOAT, M_OPT_RANGE, 0, 100, NULL }, #endif -#ifdef USE_ASS +#ifdef CONFIG_ASS { "ass_use_margins", mp_property_ass_use_margins, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, #endif -#ifdef USE_TV +#ifdef CONFIG_TV { "tv_brightness", mp_property_tv_color, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, (void *) TV_COLOR_BRIGHTNESS }, { "tv_contrast", mp_property_tv_color, CONF_TYPE_INT, @@ -2208,10 +2208,10 @@ static struct { #ifdef HAVE_FREETYPE { "sub_scale", MP_CMD_SUB_SCALE, 0, 0, -1, MSGTR_SubScale}, #endif -#ifdef USE_ASS +#ifdef CONFIG_ASS { "ass_use_margins", MP_CMD_ASS_USE_MARGINS, 1, 0, -1, NULL }, #endif -#ifdef USE_TV +#ifdef CONFIG_TV { "tv_brightness", MP_CMD_TV_SET_BRIGHTNESS, 0, OSD_BRIGHTNESS, -1, MSGTR_Brightness }, { "tv_hue", MP_CMD_TV_SET_HUE, 0, OSD_HUE, -1, MSGTR_Hue }, { "tv_saturation", MP_CMD_TV_SET_SATURATION, 0, OSD_SATURATION, -1, MSGTR_Saturation }, @@ -2281,7 +2281,7 @@ static int set_property_command(MPContext * mpctx, mp_cmd_t * cmd) return 1; } -#ifdef USE_DVDNAV +#ifdef CONFIG_DVDNAV static const struct { const char *name; const mp_command_type cmd; @@ -2546,7 +2546,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) if (sh_video) { int movement = cmd->args[0].v.i; step_sub(subdata, sh_video->pts, movement); -#ifdef USE_ASS +#ifdef CONFIG_ASS if (ass_track) sub_delay += ass_step_sub(ass_track, @@ -2655,7 +2655,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) brk_cmd = 1; break; -#ifdef USE_RADIO +#ifdef CONFIG_RADIO case MP_CMD_RADIO_STEP_CHANNEL: if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) { int v = cmd->args[0].v.i; @@ -2695,7 +2695,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) break; #endif -#ifdef USE_TV +#ifdef CONFIG_TV case MP_CMD_TV_START_SCAN: if (mpctx->file_format == DEMUXER_TYPE_TV) tv_start_scan((tvi_handle_t *) (mpctx->demuxer->priv),1); @@ -2856,7 +2856,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) break; } #endif /* HAVE_TV_TELETEXT */ -#endif /* USE_TV */ +#endif /* CONFIG_TV */ case MP_CMD_SUB_LOAD: if (sh_video) { @@ -3111,7 +3111,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) pointer_x = cmd->args[0].v.i; pointer_y = cmd->args[1].v.i; rescale_input_coordinates(pointer_x, pointer_y, &dx, &dy); -#ifdef USE_DVDNAV +#ifdef CONFIG_DVDNAV if (mpctx->stream->type == STREAMTYPE_DVDNAV && dx > 0.0 && dy > 0.0) { int button = -1; @@ -3131,7 +3131,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) } break; -#ifdef USE_DVDNAV +#ifdef CONFIG_DVDNAV case MP_CMD_DVDNAV:{ int button = -1; int i; diff --git a/configure b/configure index d81e600018..429279e050 100755 --- a/configure +++ b/configure @@ -693,7 +693,7 @@ _ass=auto _rpath=no _asmalign_pot=auto _stream_cache=yes -_def_stream_cache="#define USE_STREAM_CACHE 1" +_def_stream_cache="#define CONFIG_STREAM_CACHE 1" _need_shmem=yes for ac_option do case "$ac_option" in @@ -1398,7 +1398,7 @@ if amigaos ; then _select=no _sighandler=no _stream_cache=no - _def_stream_cache="#undef USE_STREAM_CACHE" + _def_stream_cache="#undef CONFIG_STREAM_CACHE" fi if qnx ; then @@ -2598,9 +2598,9 @@ EOF cc_check && _langinfo=yes fi if test "$_langinfo" = yes ; then - _def_langinfo='#define USE_LANGINFO 1' + _def_langinfo='#define CONFIG_LANGINFO 1' else - _def_langinfo='#undef USE_LANGINFO' + _def_langinfo='#undef CONFIG_LANGINFO' fi echores "$_langinfo" @@ -2859,9 +2859,9 @@ EOF echores "$_use_aton" fi -_def_use_aton='#undef USE_ATON' +_def_use_aton='#undef CONFIG_ATON' if test "$_use_aton" = yes; then - _def_use_aton='#define USE_ATON 1' + _def_use_aton='#define CONFIG_ATON 1' fi @@ -3166,9 +3166,9 @@ EOF done fi if test "$_iconv" = yes ; then - _def_iconv='#define USE_ICONV 1' + _def_iconv='#define CONFIG_ICONV 1' else - _def_iconv='#undef USE_ICONV' + _def_iconv='#undef CONFIG_ICONV' fi echores "$_iconv" @@ -3327,10 +3327,10 @@ EOF done fi if test "$_termcap" = yes ; then - _def_termcap='#define USE_TERMCAP 1' + _def_termcap='#define CONFIG_TERMCAP 1' _res_comment="using $_ld_tmp" else - _def_termcap='#undef USE_TERMCAP' + _def_termcap='#undef CONFIG_TERMCAP' fi echores "$_termcap" @@ -5041,7 +5041,7 @@ EOF cc_check && _ossaudio=yes fi if test "$_ossaudio" = yes ; then - _def_ossaudio='#define USE_OSS_AUDIO 1' + _def_ossaudio='#define CONFIG_OSS_AUDIO 1' _aosrc="$_aosrc ao_oss.c" _aomodules="oss $_aomodules" if test "$_linux_devfs" = yes; then @@ -5070,7 +5070,7 @@ EOF _def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"' fi else - _def_ossaudio='#undef USE_OSS_AUDIO' + _def_ossaudio='#undef CONFIG_OSS_AUDIO' _def_ossaudio_devdsp='#define PATH_DEV_DSP ""' _def_ossaudio_devmixer='#define PATH_DEV_MIXER ""' _noaomodules="oss $_noaomodules" @@ -5093,7 +5093,7 @@ cc_check `artsc-config --libs` `artsc-config --cflags` && tmp_run && _arts=yes fi if test "$_arts" = yes ; then - _def_arts='#define USE_ARTS 1' + _def_arts='#define CONFIG_ARTS 1' _aosrc="$_aosrc ao_arts.c" _aomodules="arts $_aomodules" _libs_mplayer="$_libs_mplayer `artsc-config --libs`" @@ -5120,7 +5120,7 @@ fi echores "$_esd" if test "$_esd" = yes ; then - _def_esd='#define USE_ESD 1' + _def_esd='#define CONFIG_ESD 1' _aosrc="$_aosrc ao_esd.c" _aomodules="esd $_aomodules" _libs_mplayer="$_libs_mplayer `esd-config --libs`" @@ -5134,7 +5134,7 @@ EOF cc_check `esd-config --libs` `esd-config --cflags` && _esd_latency=yes && _def_esd_latency='#define HAVE_ESD_LATENCY' echores "$_esd_latency" else - _def_esd='#undef USE_ESD' + _def_esd='#undef CONFIG_ESD' _def_esd_latency='#undef HAVE_ESD_LATENCY' _noaomodules="esd $_noaomodules" fi @@ -5155,13 +5155,13 @@ fi echores "$_pulse" if test "$_pulse" = yes ; then - _def_pulse='#define USE_PULSE 1' + _def_pulse='#define CONFIG_PULSE 1' _aosrc="$_aosrc ao_pulse.c" _aomodules="pulse $_aomodules" _libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse`" _inc_extra="$_inc_extra `$_pkg_config --cflags libpulse`" else - _def_pulse='#undef USE_PULSE' + _def_pulse='#undef CONFIG_PULSE' _noaomodules="pulse $_noaomodules" fi @@ -5185,7 +5185,7 @@ EOF fi if test "$_jack" = yes ; then - _def_jack='#define USE_JACK 1' + _def_jack='#define CONFIG_JACK 1' _aosrc="$_aosrc ao_jack.c" _aomodules="jack $_aomodules" else @@ -5215,7 +5215,7 @@ EOF test "$_openal" = yes && _libs_mplayer="$_libs_mplayer $I" fi if test "$_openal" = yes ; then - _def_openal='#define USE_OPENAL 1' + _def_openal='#define CONFIG_OPENAL 1' _aosrc="$_aosrc ao_openal.c" _aomodules="openal $_aomodules" else @@ -5342,11 +5342,11 @@ EOF cc_check && _sunaudio=yes fi if test "$_sunaudio" = yes ; then - _def_sunaudio='#define USE_SUN_AUDIO 1' + _def_sunaudio='#define CONFIG_SUN_AUDIO 1' _aosrc="$_aosrc ao_sun.c" _aomodules="sun $_aomodules" else - _def_sunaudio='#undef USE_SUN_AUDIO' + _def_sunaudio='#undef CONFIG_SUN_AUDIO' _noaomodules="sun $_noaomodules" fi echores "$_sunaudio" @@ -5379,12 +5379,12 @@ EOF cc_check && _sgiaudio=yes fi if test "$_sgiaudio" = "yes" ; then - _def_sgiaudio='#define USE_SGI_AUDIO 1' + _def_sgiaudio='#define CONFIG_SGI_AUDIO 1' _libs_mplayer="$_libs_mplayer -laudio" _aosrc="$_aosrc ao_sgi.c" _aomodules="sgi $_aomodules" else - _def_sgiaudio='#undef USE_SGI_AUDIO' + _def_sgiaudio='#undef CONFIG_SGI_AUDIO' _noaomodules="sgi $_noaomodules" fi echores "$_sgiaudio" @@ -5441,20 +5441,20 @@ EOF fi if test "$_dvdread_internal" = yes; then - _def_dvdread_internal="#define USE_DVDREAD_INTERNAL 1" - _def_dvdread='#define USE_DVDREAD 1' + _def_dvdread_internal="#define CONFIG_DVDREAD_INTERNAL 1" + _def_dvdread='#define CONFIG_DVDREAD 1' _inputmodules="dvdread(internal) $_inputmodules" _largefiles=yes _res_comment="internal" elif test "$_dvdread" = yes; then - _def_dvdread='#define USE_DVDREAD 1' + _def_dvdread='#define CONFIG_DVDREAD 1' _largefiles=yes _ld_extra="$_ld_extra -ldvdread" _inputmodules="dvdread(external) $_inputmodules" _res_comment="external" else - _def_dvdread_internal="#undef USE_DVDREAD_INTERNAL" - _def_dvdread='#undef USE_DVDREAD' + _def_dvdread_internal="#undef CONFIG_DVDREAD_INTERNAL" + _def_dvdread='#undef CONFIG_DVDREAD' _noinputmodules="dvdread $_noinputmodules" fi echores "$_dvdread" @@ -5692,9 +5692,9 @@ EOF fi fi if test "$_ass" = yes ; then - _def_ass='#define USE_ASS' + _def_ass='#define CONFIG_ASS' else - _def_ass='#undef USE_ASS' + _def_ass='#undef CONFIG_ASS' fi echores "$_ass" @@ -5722,11 +5722,11 @@ EOF fi fi if test "$_fribidi" = yes ; then - _def_fribidi='#define USE_FRIBIDI' + _def_fribidi='#define CONFIG_FRIBIDI' _inc_extra="$_inc_extra `$_fribidiconfig --cflags`" _ld_extra="$_ld_extra `$_fribidiconfig --libs`" else - _def_fribidi='#undef USE_FRIBIDI' + _def_fribidi='#undef CONFIG_FRIBIDI' fi echores "$_fribidi" @@ -5763,10 +5763,10 @@ EOF _zlib=no cc_check -lz && _zlib=yes if test "$_zlib" = yes ; then - _def_zlib='#define HAVE_ZLIB 1' + _def_zlib='#define CONFIG_ZLIB 1' _ld_extra="$_ld_extra -lz" else - _def_zlib='#undef HAVE_ZLIB' + _def_zlib='#undef CONFIG_ZLIB' _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// ` _libavencoders=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// ` fi @@ -5807,11 +5807,11 @@ EOF cc_check -llzo2 && _liblzo=yes fi if test "$_liblzo" = yes ; then - _def_liblzo='#define USE_LIBLZO 1' + _def_liblzo='#define CONFIG_LIBLZO 1' _ld_extra="$_ld_extra -llzo2" _codecmodules="liblzo $_codecmodules" else - _def_liblzo='#undef USE_LIBLZO' + _def_liblzo='#undef CONFIG_LIBLZO' _nocodecmodules="liblzo $_nocodecmodules" fi echores "$_liblzo" @@ -5827,11 +5827,11 @@ EOF cc_check -lmad && _mad=yes fi if test "$_mad" = yes ; then - _def_mad='#define USE_LIBMAD 1' + _def_mad='#define CONFIG_LIBMAD 1' _ld_extra="$_ld_extra -lmad" _codecmodules="libmad $_codecmodules" else - _def_mad='#undef USE_LIBMAD' + _def_mad='#undef CONFIG_LIBMAD' _nocodecmodules="libmad $_nocodecmodules" fi echores "$_mad" @@ -6009,20 +6009,20 @@ echores "$_theora" echocheck "internal mp3lib support" if test "$_mp3lib" = yes ; then - _def_mp3lib='#define USE_MP3LIB 1' + _def_mp3lib='#define CONFIG_MP3LIB 1' _codecmodules="mp3lib $_codecmodules" else - _def_mp3lib='#undef USE_MP3LIB' + _def_mp3lib='#undef CONFIG_MP3LIB' _nocodecmodules="mp3lib $_nocodecmodules" fi echores "$_mp3lib" echocheck "internal liba52 support" if test "$_liba52" = yes ; then - _def_liba52='#define USE_LIBA52 1' + _def_liba52='#define CONFIG_LIBA52 1' _codecmodules="liba52 $_codecmodules" else - _def_liba52='#undef USE_LIBA52' + _def_liba52='#undef CONFIG_LIBA52' _nocodecmodules="liba52 $_nocodecmodules" fi echores "$_liba52" @@ -6040,10 +6040,10 @@ if test "$_libmpeg2" = auto ; then fi fi if test "$_libmpeg2" = yes ; then - _def_libmpeg2='#define USE_LIBMPEG2 1' + _def_libmpeg2='#define CONFIG_LIBMPEG2 1' _codecmodules="libmpeg2 $_codecmodules" else - _def_libmpeg2='#undef USE_LIBMPEG2' + _def_libmpeg2='#undef CONFIG_LIBMPEG2' _nocodecmodules="libmpeg2 $_nocodecmodules" fi echores "$_libmpeg2" @@ -6062,10 +6062,10 @@ EOF done fi if test "$_libdca" = yes ; then - _def_libdca='#define USE_LIBDCA 1' + _def_libdca='#define CONFIG_LIBDCA 1' _codecmodules="libdca $_codecmodules" else - _def_libdca='#undef USE_LIBDCA' + _def_libdca='#undef CONFIG_LIBDCA' _nocodecmodules="libdca $_nocodecmodules" fi echores "$_libdca" @@ -6157,7 +6157,7 @@ EOF fi if test "$_faad_internal" = yes ; then - _def_faad_internal="#define USE_FAAD_INTERNAL 1" + _def_faad_internal="#define CONFIG_FAAD_INTERNAL 1" _faad=yes _res_comment="internal floating-point" if test "$_faad_fixed" = yes ; then @@ -6170,7 +6170,7 @@ elif test "$_faad_external" = yes ; then _faad=yes _ld_extra="$_ld_extra -lfaad" else - _def_faad_internal="#undef USE_FAAD_INTERNAL" + _def_faad_internal="#undef CONFIG_FAAD_INTERNAL" _faad=no fi @@ -6230,7 +6230,7 @@ if test "$_win32dll" = auto ; then fi fi if test "$_win32dll" = yes ; then - _def_win32dll='#define USE_WIN32DLL 1' + _def_win32dll='#define CONFIG_WIN32DLL 1' test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir _res_comment="using $_win32codecsdir" if ! win32 ; then @@ -6242,7 +6242,7 @@ if test "$_win32dll" = yes ; then fi _codecmodules="win32 $_codecmodules" else - _def_win32dll='#undef USE_WIN32DLL' + _def_win32dll='#undef CONFIG_WIN32DLL' _def_win32_loader='#undef WIN32_LOADER' _nocodecmodules="win32 $_nocodecmodules" fi @@ -6259,12 +6259,12 @@ if test "$_xanim" = auto ; then fi if test "$_xanim" = yes ; then test -z "$_xanimcodecsdir" && _xanimcodecsdir=$_codecsdir - _def_xanim='#define USE_XANIM 1' + _def_xanim='#define CONFIG_XANIM 1' _def_xanim_path="#define XACODEC_PATH \"$_xanimcodecsdir\"" _codecmodules="xanim $_codecmodules" _res_comment="using $_xanimcodecsdir" else - _def_xanim='#undef USE_XANIM' + _def_xanim='#undef CONFIG_XANIM' _def_xanim_path='#undef XACODEC_PATH' _nocodecmodules="xanim $_nocodecmodules" fi @@ -6282,12 +6282,12 @@ if test "$_real" = auto ; then fi if test "$_real" = yes ; then test -z "$_realcodecsdir" && _realcodecsdir="$_codecsdir" - _def_real='#define USE_REALCODECS 1' + _def_real='#define CONFIG_REALCODECS 1' _def_real_path="#define REALCODEC_PATH \"$_realcodecsdir\"" _codecmodules="real $_codecmodules" _res_comment="using $_realcodecsdir" else - _def_real='#undef USE_REALCODECS' + _def_real='#undef CONFIG_REALCODECS' _def_real_path="#undef REALCODEC_PATH" _nocodecmodules="real $_nocodecmodules" fi @@ -6296,17 +6296,17 @@ echores "$_real" echocheck "QuickTime codecs" _qtx_emulation=no -_def_qtx_win32='#undef USE_QTX_CODECS_WIN32' +_def_qtx_win32='#undef CONFIG_QTX_CODECS_WIN32' if test "$_qtx" = auto ; then test "$_win32dll" = yes || darwin && _qtx=yes fi if test "$_qtx" = yes ; then - _def_qtx='#define USE_QTX_CODECS 1' - win32 && _qtx_codecs_win32=yes && _def_qtx_win32='#define USE_QTX_CODECS_WIN32 1' + _def_qtx='#define CONFIG_QTX_CODECS 1' + win32 && _qtx_codecs_win32=yes && _def_qtx_win32='#define CONFIG_QTX_CODECS_WIN32 1' _codecmodules="qtx $_codecmodules" darwin || win32 || _qtx_emulation=yes else - _def_qtx='#undef USE_QTX_CODECS' + _def_qtx='#undef CONFIG_QTX_CODECS' _nocodecmodules="qtx $_nocodecmodules" fi echores "$_qtx" @@ -6409,13 +6409,13 @@ EOF fi fi _libavutil=no -_def_libavutil='#undef USE_LIBAVUTIL' -_def_libavutil_a='#undef USE_LIBAVUTIL_A' -_def_libavutil_so='#undef USE_LIBAVUTIL_SO' +_def_libavutil='#undef CONFIG_LIBAVUTIL' +_def_libavutil_a='#undef CONFIG_LIBAVUTIL_A' +_def_libavutil_so='#undef CONFIG_LIBAVUTIL_SO' test "$_libavutil_a" = yes || test "$_libavutil_so" = yes && _libavutil=yes -test "$_libavutil" = yes && _def_libavutil='#define USE_LIBAVUTIL 1' -test "$_libavutil_a" = yes && _def_libavutil_a='#define USE_LIBAVUTIL_A 1' -test "$_libavutil_so" = yes && _def_libavutil_so='#define USE_LIBAVUTIL_SO 1' +test "$_libavutil" = yes && _def_libavutil='#define CONFIG_LIBAVUTIL 1' +test "$_libavutil_a" = yes && _def_libavutil_a='#define CONFIG_LIBAVUTIL_A 1' +test "$_libavutil_so" = yes && _def_libavutil_so='#define CONFIG_LIBAVUTIL_SO 1' # neither static nor shared libavutil is available, but it is mandatory ... if test "$_libavutil" = no ; then die "You need static or shared libavutil, MPlayer will not compile without!" @@ -6448,13 +6448,13 @@ EOF fi fi _libavcodec=no -_def_libavcodec='#undef USE_LIBAVCODEC' -_def_libavcodec_a='#undef USE_LIBAVCODEC_A' -_def_libavcodec_so='#undef USE_LIBAVCODEC_SO' +_def_libavcodec='#undef CONFIG_LIBAVCODEC' +_def_libavcodec_a='#undef CONFIG_LIBAVCODEC_A' +_def_libavcodec_so='#undef CONFIG_LIBAVCODEC_SO' test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes -test "$_libavcodec" = yes && _def_libavcodec='#define USE_LIBAVCODEC 1' -test "$_libavcodec_a" = yes && _def_libavcodec_a='#define USE_LIBAVCODEC_A 1' -test "$_libavcodec_so" = yes && _def_libavcodec_so='#define USE_LIBAVCODEC_SO 1' +test "$_libavcodec" = yes && _def_libavcodec='#define CONFIG_LIBAVCODEC 1' +test "$_libavcodec_a" = yes && _def_libavcodec_a='#define CONFIG_LIBAVCODEC_A 1' +test "$_libavcodec_so" = yes && _def_libavcodec_so='#define CONFIG_LIBAVCODEC_SO 1' test "$_libavcodec_mpegaudio_hp" = yes \ && _def_libavcodec_mpegaudio_hp='#define CONFIG_MPEGAUDIO_HP 1' if test "$_libavcodec_a" = yes ; then @@ -6492,14 +6492,14 @@ EOF fi fi _libavformat=no -_def_libavformat='#undef USE_LIBAVFORMAT' -_def_libavformat_a='#undef USE_LIBAVFORMAT_A' -_def_libavformat_so='#undef USE_LIBAVFORMAT_SO' +_def_libavformat='#undef CONFIG_LIBAVFORMAT' +_def_libavformat_a='#undef CONFIG_LIBAVFORMAT_A' +_def_libavformat_so='#undef CONFIG_LIBAVFORMAT_SO' test "$_libavformat_a" = yes || test "$_libavformat_so" = yes && _libavformat=yes -test "$_libavformat" = yes && _def_libavformat='#define USE_LIBAVFORMAT 1' -test "$_libavformat_a" = yes && _def_libavformat_a='#define USE_LIBAVFORMAT_A 1' +test "$_libavformat" = yes && _def_libavformat='#define CONFIG_LIBAVFORMAT 1' +test "$_libavformat_a" = yes && _def_libavformat_a='#define CONFIG_LIBAVFORMAT_A 1' test "$_libavformat_so" = yes \ - && _def_libavformat_so='#define USE_LIBAVFORMAT_SO 1' + && _def_libavformat_so='#define CONFIG_LIBAVFORMAT_SO 1' echores "$_libavformat" echocheck "FFmpeg libpostproc" @@ -6512,7 +6512,7 @@ if test "$_libpostproc_a" = auto ; then elif test "$_libpostproc_so" = auto ; then _libpostproc_so=no cat > $TMPC << EOF - #define USE_LIBPOSTPROC 1 + #define CONFIG_LIBPOSTPROC 1 #include #include int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; } @@ -6524,14 +6524,14 @@ EOF fi fi _libpostproc=no -_def_libpostproc='#undef USE_LIBPOSTPROC' -_def_libpostproc_a='#undef USE_LIBPOSTPROC_A' -_def_libpostproc_so='#undef USE_LIBPOSTPROC_SO' +_def_libpostproc='#undef CONFIG_LIBPOSTPROC' +_def_libpostproc_a='#undef CONFIG_LIBPOSTPROC_A' +_def_libpostproc_so='#undef CONFIG_LIBPOSTPROC_SO' test "$_libpostproc_a" = yes || test "$_libpostproc_so" = yes && _libpostproc=yes -test "$_libpostproc" = yes && _def_libpostproc='#define USE_LIBPOSTPROC 1' -test "$_libpostproc_a" = yes && _def_libpostproc_a='#define USE_LIBPOSTPROC_A 1' +test "$_libpostproc" = yes && _def_libpostproc='#define CONFIG_LIBPOSTPROC 1' +test "$_libpostproc_a" = yes && _def_libpostproc_a='#define CONFIG_LIBPOSTPROC_A 1' test "$_libpostproc_so" = yes \ - && _def_libpostproc_so='#define USE_LIBPOSTPROC_SO 1' + && _def_libpostproc_so='#define CONFIG_LIBPOSTPROC_SO 1' echores "$_libpostproc" @@ -6866,9 +6866,9 @@ echores "$_mencoder" echocheck "fastmemcpy" # fastmemcpy check is done earlier with tests of CPU & binutils features if test "$_fastmemcpy" = yes ; then - _def_fastmemcpy='#define USE_FASTMEMCPY 1' + _def_fastmemcpy='#define CONFIG_FASTMEMCPY 1' else - _def_fastmemcpy='#undef USE_FASTMEMCPY' + _def_fastmemcpy='#undef CONFIG_FASTMEMCPY' fi echores "$_fastmemcpy" @@ -6879,19 +6879,19 @@ if test "$_unrar_exec" = auto ; then mingw32 && _unrar_exec="no" fi if test "$_unrar_exec" = yes ; then - _def_unrar_exec='#define USE_UNRAR_EXEC 1' + _def_unrar_exec='#define CONFIG_UNRAR_EXEC 1' else - _def_unrar_exec='#undef USE_UNRAR_EXEC' + _def_unrar_exec='#undef CONFIG_UNRAR_EXEC' fi echores "$_unrar_exec" echocheck "TV interface" if test "$_tv" = yes ; then - _def_tv='#define USE_TV 1' + _def_tv='#define CONFIG_TV 1' _inputmodules="tv $_inputmodules" else _noinputmodules="tv $_noinputmodules" - _def_tv='#undef USE_TV' + _def_tv='#undef CONFIG_TV' fi echores "$_tv" @@ -7079,21 +7079,21 @@ echores "$_tv_teletext" echocheck "Radio interface" if test "$_radio" = yes ; then - _def_radio='#define USE_RADIO 1' + _def_radio='#define CONFIG_RADIO 1' _inputmodules="radio $_inputmodules" if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then _radio_capture=no fi if test "$_radio_capture" = yes ; then _audio_input=yes - _def_radio_capture="#define USE_RADIO_CAPTURE 1" + _def_radio_capture="#define CONFIG_RADIO_CAPTURE 1" else - _def_radio_capture="#undef USE_RADIO_CAPTURE" + _def_radio_capture="#undef CONFIG_RADIO_CAPTURE" fi else _noinputmodules="radio $_noinputmodules" - _def_radio='#undef USE_RADIO' - _def_radio_capture="#undef USE_RADIO_CAPTURE" + _def_radio='#undef CONFIG_RADIO' + _def_radio_capture="#undef CONFIG_RADIO_CAPTURE" _radio_capture=no fi echores "$_radio" @@ -7269,9 +7269,9 @@ echores "$_menu" echocheck "Subtitles sorting" if test "$_sortsub" = yes ; then - _def_sortsub='#define USE_SORTSUB 1' + _def_sortsub='#define CONFIG_SORTSUB 1' else - _def_sortsub='#undef USE_SORTSUB' + _def_sortsub='#undef CONFIG_SORTSUB' fi echores "$_sortsub" @@ -7630,12 +7630,12 @@ EOF fi if test "$_dvdnav" = yes ; then _largefiles=yes - _def_dvdnav='#define USE_DVDNAV 1' + _def_dvdnav='#define CONFIG_DVDNAV 1' _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" _ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`" _inputmodules="dvdnav $_inputmodules" else - _def_dvdnav='#undef USE_DVDNAV' + _def_dvdnav='#undef CONFIG_DVDNAV' _noinputmodules="dvdnav $_noinputmodules" fi echores "$_dvdnav" @@ -8105,7 +8105,7 @@ $_def_mp3lame_preset_medium -stereo has three possible values (0 for stereo, 1 for left-only, 2 for right-only), with 0 being the default. */ -#define USE_FAKE_MONO 1 +#define CONFIG_FAKE_MONO 1 /* Undefine this if your sound card driver has no working select(). If you have kernel Oops, player hangups, or just no audio, you should diff --git a/get_path.c b/get_path.c index 4265cdbd7c..b1f119e450 100644 --- a/get_path.c +++ b/get_path.c @@ -140,7 +140,7 @@ char *get_path(const char *filename){ return buff; } -#if defined(WIN32) && defined(USE_WIN32DLL) +#if defined(WIN32) && defined(CONFIG_WIN32DLL) void set_path_env() { /*make our codec dirs available for LoadLibraryA()*/ @@ -150,10 +150,10 @@ void set_path_env() #ifdef __CYGWIN__ cygwin_conv_to_full_win32_path(WIN32_PATH,win32path); strcpy(tmppath,win32path); -#ifdef USE_REALCODECS +#ifdef CONFIG_REALCODECS cygwin_conv_to_full_win32_path(REALCODEC_PATH,realpath); sprintf(tmppath,"%s;%s",win32path,realpath); -#endif /*USE_REALCODECS*/ +#endif /*CONFIG_REALCODECS*/ #else /*__CYGWIN__*/ /* Expand to absolute path unless it's already absolute */ if (!strstr(WIN32_PATH,":") && WIN32_PATH[0] != '\\'){ @@ -162,7 +162,7 @@ void set_path_env() } else strcpy(win32path,WIN32_PATH); strcpy(tmppath,win32path); -#ifdef USE_REALCODECS +#ifdef CONFIG_REALCODECS /* Expand to absolute path unless it's already absolute */ if (!strstr(REALCODEC_PATH,":") && REALCODEC_PATH[0] != '\\'){ GetModuleFileNameA(NULL, realpath, MAX_PATH); @@ -170,10 +170,10 @@ void set_path_env() } else strcpy(realpath,REALCODEC_PATH); sprintf(tmppath,"%s;%s",win32path,realpath); -#endif /*USE_REALCODECS*/ +#endif /*CONFIG_REALCODECS*/ #endif /*__CYGWIN__*/ mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath); if (!SetEnvironmentVariableA("PATH", tmppath)) mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!"); } -#endif /*WIN32 && USE_WIN32DLL*/ +#endif /*WIN32 && CONFIG_WIN32DLL*/ diff --git a/gui/cfg.c b/gui/cfg.c index f14ff6110e..c70d95bff3 100644 --- a/gui/cfg.c +++ b/gui/cfg.c @@ -45,7 +45,7 @@ int gtkEnableAudioEqualizer = 0; int gtkVfPP = 0; -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC int gtkVfLAVC = 0; #endif @@ -53,7 +53,7 @@ int gtkAONorm = 0; int gtkAOSurround = 0; int gtkAOExtraStereo = 0; float gtkAOExtraStereoMul = 1.0; -#ifdef USE_OSS_AUDIO +#ifdef CONFIG_OSS_AUDIO char * gtkAOOSSMixer; char * gtkAOOSSMixerChannel; char * gtkAOOSSDevice; @@ -66,7 +66,7 @@ char * gtkAOALSADevice; #ifdef HAVE_SDL char * gtkAOSDLDriver; #endif -#ifdef USE_ESD +#ifdef CONFIG_ESD char * gtkAOESDDevice; #endif @@ -93,7 +93,7 @@ int gui_main_pos_y = -2; int gui_sub_pos_x = -1; int gui_sub_pos_y = -1; -#ifdef USE_ASS +#ifdef CONFIG_ASS gtkASS_t gtkASS; #endif // --- @@ -124,7 +124,7 @@ static const m_option_t gui_opts[] = { "vf_pp",>kVfPP,CONF_TYPE_FLAG,0,0,1,NULL }, { "vf_autoq",&auto_quality,CONF_TYPE_INT,CONF_RANGE,0,100,NULL }, -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC { "vf_lavc",>kVfLAVC,CONF_TYPE_FLAG,0,0,1,NULL }, #endif @@ -134,7 +134,7 @@ static const m_option_t gui_opts[] = { "ao_surround",>kAOSurround,CONF_TYPE_FLAG,0,0,1,NULL }, { "ao_extra_stereo",>kAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL }, { "ao_extra_stereo_coefficient",>kAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL }, -#ifdef USE_OSS_AUDIO +#ifdef CONFIG_OSS_AUDIO { "ao_oss_mixer",>kAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL }, { "ao_oss_mixer_channel",>kAOOSSMixerChannel,CONF_TYPE_STRING,0,0,0,NULL }, { "ao_oss_device",>kAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL }, @@ -147,7 +147,7 @@ static const m_option_t gui_opts[] = #ifdef HAVE_SDL { "ao_sdl_subdriver",>kAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL }, #endif -#ifdef USE_ESD +#ifdef CONFIG_ESD { "ao_esd_device",>kAOESDDevice,CONF_TYPE_STRING,0,0,0,NULL }, #endif @@ -157,7 +157,7 @@ static const m_option_t gui_opts[] = { "osd_level",&osd_level,CONF_TYPE_INT,CONF_RANGE,0,3,NULL }, { "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL }, { "sub_unicode",&sub_unicode,CONF_TYPE_FLAG,0,0,1,NULL }, -#ifdef USE_ASS +#ifdef CONFIG_ASS { "ass_enabled",&ass_enabled,CONF_TYPE_FLAG,0,0,1,NULL }, { "ass_use_margins",&ass_use_margins,CONF_TYPE_FLAG,0,0,1,NULL }, { "ass_top_margin",&ass_top_margin,CONF_TYPE_INT,CONF_RANGE,0,512,NULL }, @@ -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 USE_ICONV +#ifdef CONFIG_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/cfg.h b/gui/cfg.h index c04d4614bf..8bd8fcc856 100644 --- a/gui/cfg.h +++ b/gui/cfg.h @@ -63,7 +63,7 @@ extern int gui_main_pos_y; extern int gui_sub_pos_x; extern int gui_sub_pos_y; -#ifdef USE_ASS +#ifdef CONFIG_ASS typedef struct { int enabled; int use_margins; diff --git a/gui/interface.c b/gui/interface.c index 7d5a3581d6..5884e7befb 100644 --- a/gui/interface.c +++ b/gui/interface.c @@ -51,7 +51,7 @@ extern af_cfg_t af_cfg; -#ifdef USE_ICONV +#ifdef CONFIG_ICONV #include #endif @@ -60,7 +60,7 @@ extern af_cfg_t af_cfg; #include "libmpdemux/stheader.h" #include "libmpcodecs/dec_video.h" -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD #include "stream/stream_dvd.h" #endif @@ -192,7 +192,7 @@ void guiInit( void ) else if ( stream_cache_size == 0 ) gtkCacheOn = 0; if ( autosync && autosync != gtkAutoSync ) { gtkAutoSyncOn=1; gtkAutoSync=autosync; } -#ifdef USE_ASS +#ifdef CONFIG_ASS gtkASS.enabled = ass_enabled; gtkASS.use_margins = ass_use_margins; gtkASS.top_margin = ass_top_margin; @@ -370,7 +370,7 @@ void guiDone( void ) gui_sub_pos_x=appMPlayer.subWindow.X; gui_sub_pos_y=appMPlayer.subWindow.Y; } -#ifdef USE_ASS +#ifdef CONFIG_ASS ass_enabled = gtkASS.enabled; ass_use_margins = gtkASS.use_margins; ass_top_margin = gtkASS.top_margin; @@ -528,7 +528,7 @@ int guiGetEvent( int type,char * arg ) mixer_t *mixer = NULL; stream_t * stream = (stream_t *) arg; -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD dvd_priv_t * dvdp = (dvd_priv_t *) arg; #endif @@ -592,7 +592,7 @@ int guiGetEvent( int type,char * arg ) wsMoveWindow( &appMPlayer.mainWindow,0,0, vo_dheight); } break; -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD case guiSetDVD: guiIntfStruct.DVD.titles=dvdp->vmg_file->tt_srpt->nr_of_srpts; guiIntfStruct.DVD.chapters=dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; @@ -611,7 +611,7 @@ int guiGetEvent( int type,char * arg ) guiIntfStruct.StreamType=stream->type; switch( stream->type ) { -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: guiGetEvent( guiSetDVD,(char *)stream->priv ); break; @@ -708,7 +708,7 @@ int guiGetEvent( int type,char * arg ) // -- subtitle #ifdef HAVE_DXR3 if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC && !gtkVfLAVC #endif ) @@ -752,7 +752,7 @@ int guiGetEvent( int type,char * arg ) } break; #endif -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: { char tmp[512]; @@ -796,14 +796,14 @@ int guiGetEvent( int type,char * arg ) } #ifdef HAVE_DXR3 -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC remove_vf( "lavc" ); #endif if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) ) { if ( ( guiIntfStruct.StreamType != STREAMTYPE_DVD)&&( guiIntfStruct.StreamType != STREAMTYPE_VCD ) ) { -#ifdef USE_LIBAVCODEC +#ifdef CONFIG_LIBAVCODEC if ( gtkVfLAVC ) add_vf( "lavc" ); #endif } @@ -827,7 +827,7 @@ int guiGetEvent( int type,char * arg ) greplace(&af_cfg.list, "extrastereo", name); free(name); } -#ifdef USE_OSS_AUDIO +#ifdef CONFIG_OSS_AUDIO if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) ) { char *tmp; @@ -870,7 +870,7 @@ int guiGetEvent( int type,char * arg ) free(tmp); } #endif -#ifdef USE_ESD +#ifdef CONFIG_ESD if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"esd",3 ) ) { char *tmp; @@ -903,7 +903,7 @@ int guiGetEvent( int type,char * arg ) guiIntfStruct.FilenameChanged=0; guiIntfStruct.NewPlay=0; -#ifdef USE_ASS +#ifdef CONFIG_ASS ass_enabled = gtkASS.enabled; ass_use_margins = gtkASS.use_margins; ass_top_margin = gtkASS.top_margin; @@ -1107,7 +1107,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) guiLoadFont(); return NULL; #endif -#ifdef USE_ICONV +#ifdef CONFIG_ICONV case gtkSetSubEncoding: gfree( (void **)&sub_cp ); sub_cp=gstrdup( (char *)vparam ); @@ -1122,7 +1122,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) gfree( (void **)&guiIntfStruct.AudioFile ); gtkSet( gtkDelPl,0,NULL ); } -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD if ( (unsigned int)vparam & guiDVD ) memset( &guiIntfStruct.DVD,0,sizeof( guiDVDStruct ) ); #endif #ifdef HAVE_VCD diff --git a/gui/interface.h b/gui/interface.h index 4b39511b93..372c888d15 100644 --- a/gui/interface.h +++ b/gui/interface.h @@ -24,7 +24,7 @@ #include "libvo/font_load.h" #include "cfg.h" -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD #include "stream/stream.h" #endif @@ -51,7 +51,7 @@ typedef struct char codecdll[128]; } guiVideoStruct; -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD typedef struct { int titles; @@ -83,7 +83,7 @@ typedef struct int DiskChanged; int NewPlay; -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD guiDVDStruct DVD; int Title; int Angle; diff --git a/gui/mplayer/gtk/menu.c b/gui/mplayer/gtk/menu.c index eefae6b31e..d54d4fe1e3 100644 --- a/gui/mplayer/gtk/menu.c +++ b/gui/mplayer/gtk/menu.c @@ -63,7 +63,7 @@ #include "../pixmaps/empty.xpm" #include "../pixmaps/loadeaf.xpm" #include "../pixmaps/title.xpm" -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD #include "../pixmaps/dvd.xpm" #include "../pixmaps/playdvd.xpm" #include "../pixmaps/chapter.xpm" @@ -377,7 +377,7 @@ static Languages_t Languages[] = }; #undef lng -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD static char * ChannelTypes[] = { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; static char * ChannelNumbers[] = @@ -424,7 +424,7 @@ GtkWidget * create_PopUpMenu( void ) #ifdef HAVE_VCD AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD ); #endif -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD ); #endif AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evSetURL ); @@ -467,7 +467,7 @@ GtkWidget * create_PopUpMenu( void ) gtk_widget_set_sensitive( MenuItem,FALSE ); } #endif -#ifdef USE_DVDREAD +#ifdef CONFIG_DVDREAD DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD ); AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_MENU_PlayDisc" ", evPlayDVD ); // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c index f0cb89731f..feb189171b 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 USE_ICONV +#ifdef CONFIG_ICONV static GtkWidget * CBSubEncoding, * ESubEncoding; #endif -#if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) +#if defined(HAVE_FREETYPE) || defined(CONFIG_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( USE_ICONV ) +#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ); #endif @@ -284,7 +284,7 @@ void ShowPreferences( void ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode ); -#ifdef USE_ASS +#ifdef CONFIG_ASS gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ),gtkASS.use_margins ); gtk_spin_button_set_value( (GtkSpinButton *)SBASSTopMargin,(gdouble)gtkASS.top_margin ); @@ -312,7 +312,7 @@ void ShowPreferences( void ) if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename ); #endif -#ifdef USE_ICONV +#ifdef CONFIG_ICONV if ( sub_cp ) { int i; @@ -421,7 +421,7 @@ void ShowPreferences( void ) else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE ); // -- disables -#ifndef USE_ASS +#ifndef CONFIG_ASS gtk_widget_set_sensitive( CBUseASS,FALSE ); gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); @@ -442,7 +442,7 @@ void ShowPreferences( void ) #endif gtk_signal_connect( GTK_OBJECT( CBCache ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)8); gtk_signal_connect( GTK_OBJECT( CBAutoSync ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)9); -#ifdef USE_ASS +#ifdef CONFIG_ASS gtk_signal_connect( GTK_OBJECT( CBUseASS ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)10); #endif @@ -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 USE_ICONV +#ifdef CONFIG_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( USE_ICONV ) +#if defined(HAVE_FREETYPE) || defined(CONFIG_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 USE_ICONV +#ifdef CONFIG_ICONV case 1: // sub encoding comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) @@ -563,7 +563,7 @@ void prButton( GtkButton * button,gpointer user_data ) gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) ); gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) ); sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) ); -#ifdef USE_ASS +#ifdef CONFIG_ASS gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ); gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) ); gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) ); @@ -751,7 +751,7 @@ static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ) if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE ); else gtk_widget_set_sensitive( SBAutoSync,FALSE ); break; -#ifdef USE_ASS +#ifdef CONFIG_ASS case 10: if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) ) { @@ -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 USE_ICONV +#ifdef CONFIG_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 USE_ICONV +#ifdef CONFIG_ICONV CBSubEncoding=gtk_combo_new(); gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" ); gtk_widget_show( CBSubEncoding ); @@ -1373,7 +1373,7 @@ GtkWidget * create_Preferences( void ) return Preferences; } -#ifdef USE_OSS_AUDIO +#ifdef CONFIG_OSS_AUDIO GList *appendOSSDevices(GList *l) { // careful! the current implementation allows only string constants! l = g_list_append(l, (gpointer)"/dev/dsp"); @@ -1462,7 +1462,7 @@ GList *appendSDLDevices(GList *l) { } #endif -#ifdef USE_ESD +#ifdef CONFIG_ESD GList *appendESDDevices(GList *l) { l = g_list_append(l, (gpointer)"Enter Remote IP"); l = g_list_append(l, (gpointer)"Use Software Mixer"); @@ -1503,7 +1503,7 @@ void ShowAudioConfig() { if (AudioConfig) gtkActive(AudioConfig); else AudioConfig = create_AudioConfig(); -#ifdef USE_OSS_AUDIO +#ifdef CONFIG_OSS_AUDIO if (strncmp(ao_driver[0], "oss", 3) == 0) { setGtkEntryText(CEAudioDevice, gtkAOOSSDevice); setGtkEntryText(CEAudioMixer, gtkAOOSSMixer); @@ -1522,7 +1522,7 @@ void ShowAudioConfig() { setGtkEntryText(CEAudioDevice, gtkAOSDLDriver); } #endif -#ifdef USE_ESD +#ifdef CONFIG_ESD if (strncmp(ao_driver[0], "esd", 3) == 0) { setGtkEntryText(CEAudioDevice, gtkAOESDDevice); } @@ -1542,7 +1542,7 @@ void HideAudioConfig() { static void audioButton(GtkButton *button, gpointer user_data) { switch( (int)user_data ) { case 1: -#ifdef USE_OSS_AUDIO +#ifdef CONFIG_OSS_AUDIO if (strncmp(ao_driver[0], "oss", 3) == 0) { gfree(>kAOOSSDevice); gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice)); @@ -1568,7 +1568,7 @@ static void audioButton(GtkButton *button, gpointer user_data) { gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice)); } #endif -#ifdef USE_ESD +#ifdef CONFIG_ESD if (strncmp(ao_driver[0], "esd", 3) == 0) { gfree(>kAOESDDevice); gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice)); @@ -1612,7 +1612,7 @@ GtkWidget *create_AudioConfig() { CBAudioDevice = AddComboBox(NULL); gtk_table_attach(GTK_TABLE(t