[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[614] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-12-28 07:23:56
|
Revision: 614 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=614&view=rev Author: nickols_k Date: 2012-12-28 07:23:44 +0000 (Fri, 28 Dec 2012) Log Message: ----------- improve readability of sources: rename config_t -> mpxp_option_t Modified Paths: -------------- mplayerxp/input2/input.cpp mplayerxp/libmpcodecs/ad.h mplayerxp/libmpcodecs/ad_a52.cpp mplayerxp/libmpcodecs/ad_acm.cpp mplayerxp/libmpcodecs/ad_dca.cpp mplayerxp/libmpcodecs/ad_dmo.cpp mplayerxp/libmpcodecs/ad_dshow.cpp mplayerxp/libmpcodecs/ad_dvdpcm.cpp mplayerxp/libmpcodecs/ad_faad.cpp mplayerxp/libmpcodecs/ad_hwac3.cpp mplayerxp/libmpcodecs/ad_lavc.cpp mplayerxp/libmpcodecs/ad_libdv.cpp mplayerxp/libmpcodecs/ad_mp3.cpp mplayerxp/libmpcodecs/ad_null.cpp mplayerxp/libmpcodecs/ad_pcm.cpp mplayerxp/libmpcodecs/ad_qtaudio.cpp mplayerxp/libmpcodecs/ad_real.cpp mplayerxp/libmpcodecs/ad_twin.cpp mplayerxp/libmpcodecs/ad_vorbis.cpp mplayerxp/libmpcodecs/vd.h mplayerxp/libmpcodecs/vd_divx4.cpp mplayerxp/libmpcodecs/vd_dmo.cpp mplayerxp/libmpcodecs/vd_dshow.cpp mplayerxp/libmpcodecs/vd_huffyuv.cpp mplayerxp/libmpcodecs/vd_internal.h mplayerxp/libmpcodecs/vd_lavc.cpp mplayerxp/libmpcodecs/vd_libdv.cpp mplayerxp/libmpcodecs/vd_libmpeg2.cpp mplayerxp/libmpcodecs/vd_mpegpes.cpp mplayerxp/libmpcodecs/vd_null.cpp mplayerxp/libmpcodecs/vd_nuv.cpp mplayerxp/libmpcodecs/vd_qtvideo.cpp mplayerxp/libmpcodecs/vd_raw.cpp mplayerxp/libmpcodecs/vd_real.cpp mplayerxp/libmpcodecs/vd_theora.cpp mplayerxp/libmpcodecs/vd_vfw.cpp mplayerxp/libmpcodecs/vd_xanim.cpp mplayerxp/libmpcodecs/vd_xvid.cpp mplayerxp/libmpconf/cfgparser.cpp mplayerxp/libmpconf/cfgparser.h mplayerxp/libmpdemux/demux_ac3.cpp mplayerxp/libmpdemux/demux_avi.cpp mplayerxp/libmpdemux/demux_dca.cpp mplayerxp/libmpdemux/demux_flac.cpp mplayerxp/libmpdemux/demux_lavf.cpp mplayerxp/libmpdemux/demux_mp3.cpp mplayerxp/libmpdemux/demux_musepack.cpp mplayerxp/libmpdemux/demux_null.cpp mplayerxp/libmpdemux/demux_rawaudio.cpp mplayerxp/libmpdemux/demux_rawvideo.cpp mplayerxp/libmpdemux/demux_snd_au.cpp mplayerxp/libmpdemux/demux_viv.cpp mplayerxp/libmpdemux/demux_voc.cpp mplayerxp/libmpdemux/demux_wav.cpp mplayerxp/libmpdemux/demuxer.cpp mplayerxp/libmpdemux/demuxer_internal.h mplayerxp/libmpstream2/cdda.cpp mplayerxp/mplayerxp.cpp mplayerxp/mplayerxp.h mplayerxp/xmpcore/xmp_context.cpp mplayerxp/xmpcore/xmp_context.h Modified: mplayerxp/input2/input.cpp =================================================================== --- mplayerxp/input2/input.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/input2/input.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -430,7 +430,7 @@ static int mp_input_print_key_list(libinput_t&); static int mp_input_print_cmd_list(libinput_t&); -static const config_t joystick_conf[] = { +static const mpxp_option_t joystick_conf[] = { { "on", &libinput_conf.use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, "enables using of joystick" }, { "off", &libinput_conf.use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, "disables using of joystick" }, { "dev", &libinput_conf.js_dev, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, "specifies the joystick device" }, @@ -439,7 +439,7 @@ extern char *lirc_configfile; // Our command line options -static const config_t input_conf[] = { +static const mpxp_option_t input_conf[] = { { "conf", (any_t*)&config_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, "specifies alternative input.conf" }, { "ar-delay", (any_t*)&libinput_conf.ar_delay, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, "autorepeate a key delay in milliseconds (0 to disable)" }, { "ar-rate", (any_t*)&libinput_conf.ar_rate, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, "number of key-presses per second generating on autorepeat" }, @@ -457,7 +457,7 @@ { NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t mp_input_opts[] = { +static const mpxp_option_t mp_input_opts[] = { { "input", (any_t*)&input_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Input specific options"}, { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad.h =================================================================== --- mplayerxp/libmpcodecs/ad.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad.h 2012-12-28 07:23:44 UTC (rev 614) @@ -48,7 +48,7 @@ struct ad_functions_t { const ad_info_t* info; - const config_t* options;/**< Optional: MPlayerXP's option related */ + const mpxp_option_t* options;/**< Optional: MPlayerXP's option related */ const audio_probe_t*(* __FASTCALL__ probe)(uint32_t wtag); Opaque* (* __FASTCALL__ preinit)(const audio_probe_t&,sh_audio_t*,audio_filter_info_t&); MPXP_Rc (* __FASTCALL__ init)(Opaque& ctx); Modified: mplayerxp/libmpcodecs/ad_a52.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_a52.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_a52.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -46,7 +46,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_acm.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_acm.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_acm.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_dca.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_dca.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_dca.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -45,7 +45,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_dmo.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_dmo.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_dmo.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_dshow.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_dshow.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_dshow.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -17,7 +17,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_dvdpcm.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_dvdpcm.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_dvdpcm.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -24,7 +24,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_faad.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_faad.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_faad.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -29,7 +29,7 @@ "http://www.audiocoding.com/faad2.html" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_hwac3.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_hwac3.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_hwac3.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -155,7 +155,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_lavc.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_lavc.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_lavc.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -88,7 +88,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_libdv.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_libdv.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_libdv.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -41,7 +41,7 @@ "http://libdv.sourceforge.net" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_mp3.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_mp3.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_mp3.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -23,7 +23,7 @@ "http://www.mpg123.de" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_null.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_null.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_null.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -22,7 +22,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_pcm.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_pcm.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_pcm.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -25,7 +25,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_qtaudio.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_qtaudio.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_qtaudio.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -27,7 +27,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_real.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_real.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_real.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -22,7 +22,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_twin.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_twin.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_twin.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/ad_vorbis.cpp =================================================================== --- mplayerxp/libmpcodecs/ad_vorbis.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/ad_vorbis.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -23,7 +23,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd.h =================================================================== --- mplayerxp/libmpcodecs/vd.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd.h 2012-12-28 07:23:44 UTC (rev 614) @@ -53,7 +53,7 @@ /* interface of video decoder drivers */ struct vd_functions_t { const vd_info_t* info; - const config_t* options;/**< Optional: MPlayerXP's option related */ + const mpxp_option_t* options;/**< Optional: MPlayerXP's option related */ const video_probe_t*(*__FASTCALL__ probe)(uint32_t fourcc); Opaque* (*__FASTCALL__ preinit)(const video_probe_t& probe,sh_video_t *sh,put_slice_info_t& psi); MPXP_Rc (*__FASTCALL__ init)(Opaque& ctx,video_decoder_t& opaque); Modified: mplayerxp/libmpcodecs/vd_divx4.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_divx4.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_divx4.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -32,7 +32,7 @@ "http://labs.divx.com/DivXLinuxCodec" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_dmo.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_dmo.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_dmo.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -21,7 +21,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_dshow.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_dshow.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_dshow.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -23,7 +23,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_huffyuv.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_huffyuv.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_huffyuv.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -34,7 +34,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_internal.h =================================================================== --- mplayerxp/libmpcodecs/vd_internal.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_internal.h 2012-12-28 07:23:44 UTC (rev 614) @@ -6,7 +6,7 @@ #include "vd_msg.h" // prototypes: //static vd_info_t info; -//static const config_t options[]; +//static const mpxp_option_t options[]; static const video_probe_t* __FASTCALL__ probe(uint32_t fourcc); static MPXP_Rc control_vd(Opaque& ctx,int cmd,any_t* arg,...); @@ -17,7 +17,7 @@ #define LIBVD_EXTERN(x) extern const vd_functions_t mpcodecs_vd_##x = {\ &info,\ - (const config_t*)options,\ + (const mpxp_option_t*)options,\ probe, \ preinit, \ init,\ Modified: mplayerxp/libmpcodecs/vd_lavc.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_lavc.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_lavc.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -50,7 +50,7 @@ static char *lavc_avopt = NULL; static int enable_ffslices=1; -static const config_t ff_options[] = { +static const mpxp_option_t ff_options[] = { {"slices", &enable_ffslices, CONF_TYPE_FLAG, 0, 0, 1, "enables slice-based method of frame rendering in lavc decoder"}, {"noslices", &enable_ffslices, CONF_TYPE_FLAG, 0, 1, 0, "disables slice-based method of frame rendering in lavc decoder"}, {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, "specifies error resilience for lavc decoders"}, @@ -70,7 +70,7 @@ { NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t options[] = { +static const mpxp_option_t options[] = { {"lavc", (any_t*)&ff_options, CONF_TYPE_SUBCONFIG, 0, 0, 0, "lavc specific options"}, { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_libdv.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_libdv.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_libdv.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -38,7 +38,7 @@ "http://libdv.sourceforge.net" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_libmpeg2.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_libmpeg2.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_libmpeg2.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -28,7 +28,7 @@ "http://libmpeg2.sourceforge.net" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_mpegpes.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_mpegpes.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_mpegpes.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -14,7 +14,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_null.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_null.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_null.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -22,7 +22,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_nuv.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_nuv.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_nuv.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -25,7 +25,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_qtvideo.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_qtvideo.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_qtvideo.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -25,7 +25,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_raw.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_raw.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_raw.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -24,7 +24,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_real.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_real.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_real.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_theora.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_theora.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_theora.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -23,7 +23,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_vfw.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_vfw.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_vfw.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -29,7 +29,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_xanim.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_xanim.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_xanim.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -34,7 +34,7 @@ "build-in" }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpcodecs/vd_xvid.cpp =================================================================== --- mplayerxp/libmpcodecs/vd_xvid.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpcodecs/vd_xvid.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -27,7 +27,7 @@ }; -static const config_t options[] = { +static const mpxp_option_t options[] = { { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpconf/cfgparser.cpp =================================================================== --- mplayerxp/libmpconf/cfgparser.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpconf/cfgparser.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -18,6 +18,12 @@ #include <string.h> #include <errno.h> +#include "mplayerxp.h" +#include "cfgparser.h" +#include "libplaytree/playtree.h" +#include "parser_msg.h" + +namespace mpxp { enum { COMMAND_LINE=0, CONFIG_FILE=1, @@ -27,10 +33,6 @@ MAX_RECURSION_DEPTH=8 }; -#include "mplayerxp.h" -#include "cfgparser.h" -#include "libplaytree/playtree.h" -#include "parser_msg.h" inline void SET_GLOBAL(m_config_t& c) { c.flags |= CONFIG_GLOBAL; } inline void UNSET_GLOBAL(m_config_t& c) { c.flags &= (!CONFIG_GLOBAL); } @@ -38,12 +40,12 @@ inline void SET_RUNNING(m_config_t& c) { c.flags |= CONFIG_RUNNING; } inline int IS_RUNNING(const m_config_t& c) { return c.flags & CONFIG_RUNNING; } -typedef int (*cfg_func_arg_param_t)(const config_t *,const std::string& ,const std::string& ); -typedef int (*cfg_func_param_t)(const config_t *,const std::string& ); -typedef int (*cfg_func_t)(const config_t *); +typedef int (*cfg_func_arg_param_t)(const mpxp_option_t *,const std::string& ,const std::string& ); +typedef int (*cfg_func_param_t)(const mpxp_option_t *,const std::string& ); +typedef int (*cfg_func_t)(const mpxp_option_t *); static void -m_config_save_option(m_config_t& config,const config_t* conf,const std::string& opt,const std::string& param) { +m_config_save_option(m_config_t& config,const mpxp_option_t* conf,const std::string& opt,const std::string& param) { config_save_t* save; int sl=0; @@ -242,14 +244,14 @@ static int cfg_inc_int(int value){ return ++value; } -static int config_read_option(m_config_t& config,const std::vector<const config_t*>& conf_list,const std::string& opt,const std::string& param) +static int config_read_option(m_config_t& config,const std::vector<const mpxp_option_t*>& conf_list,const std::string& opt,const std::string& param) { int i=0,nconf = 0; long tmp_int; double tmp_float; int ret = -1; char *endptr; - const config_t* conf=NULL; + const mpxp_option_t* conf=NULL; mpxp_dbg3<<"read_option: opt='"<<opt<<"' param='"<<param<<"'"<<std::endl; std::string lopt=opt; @@ -451,11 +453,11 @@ goto out; } -static const config_t* m_config_find_option(const std::vector<const config_t*>& list,const std::string& name); +static const mpxp_option_t* m_config_find_option(const std::vector<const mpxp_option_t*>& list,const std::string& name); int m_config_set_option(m_config_t& config,const std::string& _opt,const std::string& param) { size_t e; - std::vector<const config_t*> clist=config.opt_list; + std::vector<const mpxp_option_t*> clist=config.opt_list; std::string opt=_opt; std::string s; mpxp_dbg2<<"Setting option "<<opt<<"="<<param<<std::endl; @@ -464,7 +466,7 @@ e=opt.find('.'); if(e!=std::string::npos) { int flg,ret; - const config_t *subconf=NULL; + const mpxp_option_t *subconf=NULL; mpxp_dbg2<<"Parsing "<<opt<<" as subconfig"<<std::endl; do { if((e = opt.find('.'))==std::string::npos) break; @@ -474,7 +476,7 @@ clist.clear(); if(!subconf) return ERR_NO_SUBCONF; if(subconf->type!=CONF_TYPE_SUBCONFIG) return ERR_NO_SUBCONF; - clist.push_back(reinterpret_cast<const config_t*>(subconf->p)); + clist.push_back(reinterpret_cast<const mpxp_option_t*>(subconf->p)); opt = opt.substr(e+1); mpxp_dbg2<<"switching next subconf="<<subconf->name<<std::endl; }while(1); @@ -488,10 +490,10 @@ e = opt.find(':'); if(e!=std::string::npos && e<(opt.length()-1)) { int ret; - const config_t* m_opt; - std::vector<const config_t*> opt_list; + const mpxp_option_t* m_opt; + std::vector<const mpxp_option_t*> opt_list; s=opt.substr(0,e); - m_opt=(const config_t*)m_config_get_option_ptr(config,s); + m_opt=(const mpxp_option_t*)m_config_get_option_ptr(config,s); if(!m_opt) { mpxp_err<<"m_config_set_option "<<opt<<"="<<param<<" : no "<<s<<" subconfig"<<std::endl; return ERR_NOT_AN_OPTION; @@ -678,7 +680,6 @@ return ret; } -namespace mpxp { MPXP_Rc mpxp_parse_command_line(m_config_t& config, const std::vector<std::string>& argv,const std::map<std::string,std::string>& envm) { size_t i,siz=argv.size(); @@ -699,7 +700,7 @@ exit(0); } if(opt=="--long-help") { - show_long_help(envm); + show_long_help(config,envm); exit(0); } /* check for -- (no more options id.) except --help! */ @@ -794,18 +795,15 @@ mpxp_err<<"command line: "<<argv[i]<<std::endl; return MPXP_False; } -} // namespace mpxp -int m_config_register_options(m_config_t& config,const config_t *args) { - std::vector<const config_t*>& conf_list = config.opt_list; - conf_list.push_back(args); - - return 1; +MPXP_Rc m_config_register_options(m_config_t& config,const mpxp_option_t *args) { + config.opt_list.push_back(args); + return MPXP_Ok; } -static const config_t* m_config_find_option(const std::vector<const config_t*>& list,const std::string& name) { +static const mpxp_option_t* m_config_find_option(const std::vector<const mpxp_option_t*>& list,const std::string& name) { unsigned i,j; - const config_t *conf; + const mpxp_option_t *conf; if(!list.empty()) { std::string ln=name; std::transform(ln.begin(),ln.end(),ln.begin(), ::tolower); @@ -821,13 +819,13 @@ return NULL; } -const config_t* m_config_get_option(const m_config_t& config,const std::string& arg) { +const mpxp_option_t* m_config_get_option(const m_config_t& config,const std::string& arg) { size_t e; e = arg.find(':'); if(e!=std::string::npos) { - std::vector<const config_t*> cl; - const config_t* opt; + std::vector<const mpxp_option_t*> cl; + const mpxp_option_t* opt; std::string s; s=arg.substr(0,e); opt = m_config_get_option(config,s); @@ -838,7 +836,7 @@ } any_t* m_config_get_option_ptr(const m_config_t& config,const std::string& arg) { - const config_t* conf; + const mpxp_option_t* conf; conf = m_config_get_option(config,arg); if(!conf) return NULL; @@ -869,11 +867,11 @@ return *ret; } -inline int AS_INT(const config_t* c) { return *((int*)c->p); } -inline void AS_INT(const config_t* c,int val) { *((int*)c->p)=val; } +inline int AS_INT(const mpxp_option_t* c) { return *((int*)c->p); } +inline void AS_INT(const mpxp_option_t* c,int val) { *((int*)c->p)=val; } int m_config_set_int(m_config_t& config,const std::string& arg,int val) { - const config_t* opt; + const mpxp_option_t* opt; opt = m_config_get_option(config,arg); @@ -892,7 +890,7 @@ } int m_config_set_float(m_config_t& config,const std::string& arg,float val) { - const config_t* opt; + const mpxp_option_t* opt; opt = m_config_get_option(config,arg); @@ -912,7 +910,7 @@ int m_config_switch_flag(m_config_t& config,const std::string& opt) { - const config_t *conf; + const mpxp_option_t *conf; conf = m_config_get_option(config,opt); if(!conf || conf->type != CONF_TYPE_FLAG) return 0; @@ -924,7 +922,7 @@ } int m_config_set_flag(m_config_t& config,const std::string& opt, int state) { - const config_t *conf; + const mpxp_option_t *conf; conf = m_config_get_option(config,opt); if(!conf || conf->type != CONF_TYPE_FLAG) return 0; @@ -935,7 +933,7 @@ int m_config_get_flag(const m_config_t& config,const std::string& opt) { - const config_t* conf = m_config_get_option(config,opt); + const mpxp_option_t* conf = m_config_get_option(config,opt); if(!conf || conf->type != CONF_TYPE_FLAG) return -1; if(AS_INT(conf) == conf->max) return 1; else if(AS_INT(conf) == conf->min) return 0; @@ -943,7 +941,7 @@ } int m_config_is_option_set(const m_config_t& config,const std::string& arg) { - const config_t* opt; + const mpxp_option_t* opt; config_save_t* save; int l,i; @@ -965,7 +963,7 @@ return 0; } -static void __m_config_show_options(unsigned ntabs,const std::string& pfx,const config_t* opts) { +static void __m_config_show_options(unsigned ntabs,const std::string& pfx,const mpxp_option_t* opts) { unsigned i,n; i=0; while(opts[i].name) { @@ -980,7 +978,7 @@ else newpfx=""; newpfx+=opts[i].name; newpfx+="."; - __m_config_show_options(ntabs+2,newpfx,(const config_t *)opts[i].p); + __m_config_show_options(ntabs+2,newpfx,(const mpxp_option_t *)opts[i].p); } else if(opts[i].type<=CONF_TYPE_PRINT) { @@ -1053,12 +1051,13 @@ } void m_config_show_options(const m_config_t& args) { - unsigned j; - const config_t *opts; + size_t j,sz=args.opt_list.size(); + const mpxp_option_t *opts; j=0; mpxp_info<<"List of available command-line options:"<<std::endl; - while((opts=args.opt_list[j])!=NULL) { - __m_config_show_options(2,NULL,opts); - j++; + for(j=0;j<sz;j++) { + opts=args.opt_list[j]; + __m_config_show_options(2,"",opts); }; } +} // namespace mpxp Modified: mplayerxp/libmpconf/cfgparser.h =================================================================== --- mplayerxp/libmpconf/cfgparser.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpconf/cfgparser.h 2012-12-28 07:23:44 UTC (rev 614) @@ -11,164 +11,165 @@ namespace mpxp { struct libinput_t; struct PlayTree; -} -/* config types */ -enum { - CONF_TYPE_FLAG =0, - CONF_TYPE_INT =1, - CONF_TYPE_FLOAT =2, - CONF_TYPE_STRING =3, - CONF_TYPE_PRINT =4, - CONF_TYPE_INC =5, - CONF_TYPE_INCLUDE =6, - CONF_TYPE_SUBCONFIG =7 -}; -enum { - ERR_NOT_AN_OPTION =-1, - ERR_MISSING_PARAM =-2, - ERR_OUT_OF_RANGE =-3, - ERR_FUNC_ERR =-4, - ERR_NO_SUBCONF =-5 -}; -/* config flags */ -enum { - CONF_MIN =(1<<0), - CONF_MAX =(1<<1), - CONF_RANGE =(CONF_MIN|CONF_MAX), - CONF_NOCFG =(1<<2), - CONF_NOCMD =(1<<3), - CONF_GLOBAL =(1<<4), - CONF_NOSAVE =(1<<5) -}; -struct config_t { - const char *name; - any_t* const p; - unsigned int type; - unsigned int flags; - float min,max; - const char *help; -}; -typedef void (*cfg_default_func_t)(config_t*,const std::string&); + /* config types */ + enum { + CONF_TYPE_FLAG =0, + CONF_TYPE_INT =1, + CONF_TYPE_FLOAT =2, + CONF_TYPE_STRING=3, + CONF_TYPE_PRINT =4, + CONF_TYPE_INC =5, + CONF_TYPE_INCLUDE=6, + CONF_TYPE_SUBCONFIG=7 + }; -struct config_save_t; -struct m_config_t : public Opaque { - m_config_t(libinput_t& _libinput):libinput(_libinput) {} - ~m_config_t() {} + enum { + ERR_NOT_AN_OPTION =-1, + ERR_MISSING_PARAM =-2, + ERR_OUT_OF_RANGE =-3, + ERR_FUNC_ERR =-4, + ERR_NO_SUBCONF =-5 + }; - std::vector<const config_t*> opt_list; - config_save_t** config_stack; - int cs_level; - int parser_mode; /* COMMAND_LINE or CONFIG_FILE */ - int flags; - const char* sub_conf; // When we save a subconfig - PlayTree* pt; // play tree we use for playlist option, etc - PlayTree* last_entry; // last added entry - PlayTree* last_parent; // if last_entry is NULL we must create child of this - int recursion_depth; - libinput_t& libinput; -}; + /* config flags */ + enum { + CONF_MIN =(1<<0), + CONF_MAX =(1<<1), + CONF_RANGE =(CONF_MIN|CONF_MAX), + CONF_NOCFG =(1<<2), + CONF_NOCMD =(1<<3), + CONF_GLOBAL =(1<<4), + CONF_NOSAVE =(1<<5) + }; -struct config_save_t { - const config_t* opt; - union { - int as_int; - float as_float; - any_t* as_pointer; - } param; - char* opt_name; -}; + struct mpxp_option_t { + const char *name; + any_t* const p; + unsigned int type; + unsigned int flags; + float min,max; + const char *help; + }; -/* parse_config_file returns: - * -1 on error (can't mp_malloc, invalid option...) - * 0 if can't open configfile - * 1 on success - */ -MPXP_Rc m_config_parse_config_file(m_config_t& config,const std::string& conffile); + typedef void (*cfg_default_func_t)(mpxp_option_t*,const std::string&); -/* parse_command_line returns: - * -1 on error (invalid option...) - * 1 otherwise - */ -namespace mpxp { + struct config_save_t; + struct m_config_t : public Opaque { + m_config_t(libinput_t& _libinput):libinput(_libinput) {} + virtual ~m_config_t() {} + + std::vector<const mpxp_option_t*> opt_list; + config_save_t** config_stack; + int cs_level; + int parser_mode; /* COMMAND_LINE or CONFIG_FILE */ + int flags; + const char* sub_conf; // When we save a subconfig + PlayTree* pt; // play tree we use for playlist option, etc + PlayTree* last_entry; // last added entry + PlayTree* last_parent; // if last_entry is NULL we must create child of this + int recursion_depth; + libinput_t& libinput; + }; + + struct config_save_t { + const mpxp_option_t* opt; + union { + int as_int; + float as_float; + any_t* as_pointer; + } param; + const char* opt_name; + }; + + /* parse_command_line returns: + * -1 on error (invalid option...) + * 1 otherwise + */ MPXP_Rc mpxp_parse_command_line(m_config_t& config, const std::vector<std::string>& argv,const std::map<std::string,std::string>& envm); -} + /* + * Return 0 on error 1 on success + */ + MPXP_Rc m_config_register_options(m_config_t& config,const mpxp_option_t *args); -m_config_t& m_config_new(PlayTree* pt,libinput_t&libinput); + /* parse_config_file returns: + * -1 on error (can't mp_malloc, invalid option...) + * 0 if can't open configfile + * 1 on success + */ + MPXP_Rc m_config_parse_config_file(m_config_t& config,const std::string& conffile); -void m_config_free(m_config_t* config); + m_config_t& m_config_new(PlayTree* pt,libinput_t&libinput); -void m_config_push(m_config_t& config); + void m_config_free(m_config_t* config); -/* - * Return 0 on error 1 on success - */ -int m_config_pop(m_config_t& config); + void m_config_push(m_config_t& config); -/* - * Return 0 on error 1 on success - */ -int m_config_register_options(m_config_t& config,const config_t *args); + /* + * Return 0 on error 1 on success + */ + int m_config_pop(m_config_t& config); -void m_config_show_options(const m_config_t& args); + void m_config_show_options(const m_config_t& args); -/* - * For all the following function when it's a subconfig option - * you must give an option name like 'tv:channel' and not just - * 'channel' - */ + /* + * For all the following function when it's a subconfig option + * you must give an option name like 'tv:channel' and not just + * 'channel' + */ -/** Return 1 on sucess 0 on failure -**/ -int m_config_set_option(m_config_t& config,const std::string& opt,const std::string& param); + /** Return 1 on sucess 0 on failure + **/ + int m_config_set_option(m_config_t& config,const std::string& opt,const std::string& param); -/** Get the config struct defining an option - * @return NULL on error -**/ -const config_t* m_config_get_option(const m_config_t& config,const std::string& arg); + /** Get the config struct defining an option + * @return NULL on error + **/ + const mpxp_option_t* m_config_get_option(const m_config_t& config,const std::string& arg); -/** Get the p field of the struct defining an option - * @return NULL on error -**/ -any_t* m_config_get_option_ptr(const m_config_t& config,const std::string& arg); + /** Get the p field of the struct defining an option + * @return NULL on error + **/ + any_t* m_config_get_option_ptr(const m_config_t& config,const std::string& arg); -/** Tell is an option is alredy set or not - * @return -1 one error (requested option arg exist) otherwise 0 or 1 -**/ -int m_config_is_option_set(const m_config_t& config,const std::string& arg); + /** Tell is an option is alredy set or not + * @return -1 one error (requested option arg exist) otherwise 0 or 1 + **/ + int m_config_is_option_set(const m_config_t& config,const std::string& arg); -/** Return 0 on error 1 on success -**/ -int m_config_switch_flag(m_config_t& config,const std::string& opt); + /** Return 0 on error 1 on success + **/ + int m_config_switch_flag(m_config_t& config,const std::string& opt); -/** Return 0 on error 1 on success -**/ -int m_config_set_flag(m_config_t& config,const std::string& opt, int max); + /** Return 0 on error 1 on success + **/ + int m_config_set_flag(m_config_t& config,const std::string& opt, int max); -/** Return the value of a flag (O or 1) and -1 on error -**/ -int m_config_get_flag(const m_config_t& config,const std::string& opt); + /** Return the value of a flag (O or 1) and -1 on error + **/ + int m_config_get_flag(const m_config_t& config,const std::string& opt); -/** Set the value of an int option - * @return 0 on error 1 on success -**/ -int m_config_set_int(m_config_t& config,const std::string& arg,int val); + /** Set the value of an int option + * @return 0 on error 1 on success + **/ + int m_config_set_int(m_config_t& config,const std::string& arg,int val); -/** Get the value of an int option - * @param err_ret If it is not NULL it's set to 1 on error - * @return the option value or -1 on error -**/ -int m_config_get_int (const m_config_t&,const std::string& arg,int& err_ret); + /** Get the value of an int option + * @param err_ret If it is not NULL it's set to 1 on error + * @return the option value or -1 on error + **/ + int m_config_get_int (const m_config_t&,const std::string& arg,int& err_ret); -/** Set the value of a float option - * @return 0 on error 1 on success -**/ -int m_config_set_float(m_config_t& config,const std::string& arg,float val); + /** Set the value of a float option + * @return 0 on error 1 on success + **/ + int m_config_set_float(m_config_t& config,const std::string& arg,float val); -/** Get the value of a float option - * @param err_ret If it is not NULL it's set to 1 on error - * @return the option value or -1 on error -**/ -float m_config_get_float (const m_config_t&,const std::string& arg,int& err_ret); + /** Get the value of a float option + * @param err_ret If it is not NULL it's set to 1 on error + * @return the option value or -1 on error + **/ + float m_config_get_float (const m_config_t&,const std::string& arg,int& err_ret); +} // namespace mpxp #endif /* __CONFIG_H */ Modified: mplayerxp/libmpdemux/demux_ac3.cpp =================================================================== --- mplayerxp/libmpdemux/demux_ac3.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_ac3.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -398,7 +398,7 @@ #include "libmpconf/cfgparser.h" -static const config_t ac3_opts[] = { +static const mpxp_option_t ac3_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_avi.cpp =================================================================== --- mplayerxp/libmpdemux/demux_avi.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_avi.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -1370,14 +1370,14 @@ return MPXP_Unknown; } -static const config_t avi_options[] = { +static const mpxp_option_t avi_options[] = { {"noidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 0, "disables INDEXES for AVI's demuxing"}, {"idx", &index_mode, CONF_TYPE_FLAG, 0, -1, 1, "builds internal INDEXES of incomplete AVIs"}, {"forceidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 2, "forces rebuilding of INDEXES for broken AVIs"}, { NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t avi_opts[] = { +static const mpxp_option_t avi_opts[] = { { "avi", (any_t*)&avi_options, CONF_TYPE_SUBCONFIG, 0, 0, 0, "AVI related options" }, { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_dca.cpp =================================================================== --- mplayerxp/libmpdemux/demux_dca.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_dca.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -575,7 +575,7 @@ #include "libmpconf/cfgparser.h" -static const config_t dca_opts[] = { +static const mpxp_option_t dca_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_flac.cpp =================================================================== --- mplayerxp/libmpdemux/demux_flac.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_flac.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -286,7 +286,7 @@ #include "libmpconf/cfgparser.h" -static const config_t flac_opts[] = { +static const mpxp_option_t flac_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_lavf.cpp =================================================================== --- mplayerxp/libmpdemux/demux_lavf.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_lavf.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -65,13 +65,13 @@ static char *opt_cryptokey; extern int ts_prog; -static const config_t lavf_opts[] = { +static const mpxp_option_t lavf_opts[] = { {"format", &(opt_format), CONF_TYPE_STRING, 0, 0, 0, "forces format of lavf demuxer"}, {"cryptokey", &(opt_cryptokey), CONF_TYPE_STRING, 0, 0, 0, "specifies cryptokey for lavf demuxer"}, {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t lavfdopts_conf[] = { +static const mpxp_option_t lavfdopts_conf[] = { {"lavf", (any_t*)&lavf_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "LAVF-demuxer related options"}, {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_mp3.cpp =================================================================== --- mplayerxp/libmpdemux/demux_mp3.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_mp3.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -709,13 +709,13 @@ #include "libmpconf/cfgparser.h" -static const config_t mp3_opts[] = { +static const mpxp_option_t mp3_opts[] = { { "hr-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 0, 1, "enables hight-resolution mp3 seeking" }, { "nohr-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 1, 0, "disables hight-resolution mp3 seeking"}, {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t mp3_options[] = { +static const mpxp_option_t mp3_options[] = { { "mp3", (any_t*)&mp3_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "MP3 related options" }, {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_musepack.cpp =================================================================== --- mplayerxp/libmpdemux/demux_musepack.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_musepack.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -297,7 +297,7 @@ #include "libmpconf/cfgparser.h" -static const config_t musepack_opts[] = { +static const mpxp_option_t musepack_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_null.cpp =================================================================== --- mplayerxp/libmpdemux/demux_null.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_null.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -10,11 +10,11 @@ #include "stheader.h" #include "libmpconf/cfgparser.h" -static const config_t demux_null_opts[] = { +static const mpxp_option_t demux_null_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t null_conf[] = { +static const mpxp_option_t null_conf[] = { { "null", (any_t*)&demux_null_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Null specific commands"}, { NULL,NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_rawaudio.cpp =================================================================== --- mplayerxp/libmpdemux/demux_rawaudio.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_rawaudio.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ static int afmt = AFMT_S16_LE; static int wtag = 0x1; // Raw PCM -static const config_t demux_rawaudio_opts[] = { +static const mpxp_option_t demux_rawaudio_opts[] = { { "on", &use_rawaudio, CONF_TYPE_FLAG, 0,0, 1, "forces treating stream as raw-audio" }, { "channels", &channels, CONF_TYPE_INT,CONF_RANGE,1,8, "specifies number of channels in raw-audio steram" }, { "rate", &samplerate, CONF_TYPE_INT,CONF_RANGE,1000,8*48000, "specifies sample-rate of raw-audio steram" }, @@ -29,7 +29,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t rawaudio_conf[] = { +static const mpxp_option_t rawaudio_conf[] = { { "rawaudio", (any_t*)&demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Raw-audio specific commands"}, { NULL,NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_rawvideo.cpp =================================================================== --- mplayerxp/libmpdemux/demux_rawvideo.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_rawvideo.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -27,7 +27,7 @@ }; static rawvideo_conf_t priv; -static const config_t demux_rawvideo_opts[] = { +static const mpxp_option_t demux_rawvideo_opts[] = { { "on", &priv.use_rawvideo, CONF_TYPE_FLAG, 0,0, 1, "forces treating stream as raw-vidio" }, // size: { "w", &priv.width, CONF_TYPE_INT,CONF_RANGE,1,8192, "specifies image width of raw-video stream" }, @@ -53,7 +53,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t rawvideo_conf[] = { +static const mpxp_option_t rawvideo_conf[] = { { "rawvideo", (any_t*)&demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Raw-video specific options"}, { NULL,NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_snd_au.cpp =================================================================== --- mplayerxp/libmpdemux/demux_snd_au.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_snd_au.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -249,7 +249,7 @@ #include "libmpconf/cfgparser.h" -static const config_t snd_au_opts[] = { +static const mpxp_option_t snd_au_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_viv.cpp =================================================================== --- mplayerxp/libmpdemux/demux_viv.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_viv.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -105,7 +105,7 @@ if (producer) delete producer; } -static const config_t vivoopts_conf[]={ +static const mpxp_option_t vivoopts_conf[]={ {"version", &vivo_param.version, CONF_TYPE_INT, 0, 0, 0, "forces version of VIVO stream"}, /* audio options */ {"acodec", &vivo_param.acodec, CONF_TYPE_STRING, 0, 0, 0, "specifies audio-codec of VIVO stream"}, @@ -119,7 +119,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t vivo_conf[] = { +static const mpxp_option_t vivo_conf[] = { { "vivo", (any_t*)&vivoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Vivo specific options"}, { NULL,NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_voc.cpp =================================================================== --- mplayerxp/libmpdemux/demux_voc.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_voc.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -262,7 +262,7 @@ #include "libmpconf/cfgparser.h" -static const config_t voc_opts[] = { +static const mpxp_option_t voc_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demux_wav.cpp =================================================================== --- mplayerxp/libmpdemux/demux_wav.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demux_wav.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -358,7 +358,7 @@ #include "libmpconf/cfgparser.h" -static const config_t audio_opts[] = { +static const mpxp_option_t audio_opts[] = { {NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demuxer.cpp =================================================================== --- mplayerxp/libmpdemux/demuxer.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demuxer.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -516,14 +516,14 @@ /******************* Options stuff **********************/ -static const config_t demux_opts[] = { +static const mpxp_option_t demux_opts[] = { { "audiofile", &demux_conf.audio_stream, CONF_TYPE_STRING, 0, 0, 0, "forces reading of audio-stream from other file" }, { "subfile", &demux_conf.sub_stream, CONF_TYPE_STRING, 0, 0, 0, "forces reading of subtitles from other file" }, { "type", &demux_conf.type, CONF_TYPE_STRING, 0, 0, 0, "forces demuxer by given name" }, { NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t demuxer_opts[] = { +static const mpxp_option_t demuxer_opts[] = { { "demuxer", (any_t*)&demux_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Demuxer related options" }, { NULL, NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/libmpdemux/demuxer_internal.h =================================================================== --- mplayerxp/libmpdemux/demuxer_internal.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpdemux/demuxer_internal.h 2012-12-28 07:23:44 UTC (rev 614) @@ -7,7 +7,7 @@ const char* short_name; /**< for forcing through comand line */ const char* name; /**< Name of driver ("Matroska MKV parser") */ const char* defext; /**< Default file extension for this movie type */ - const config_t* options;/**< Optional: MPlayerXP's option related */ + const mpxp_option_t* options;/**< Optional: MPlayerXP's option related */ /** Probing stream. * @param d _this demuxer **/ Modified: mplayerxp/libmpstream2/cdda.cpp =================================================================== --- mplayerxp/libmpstream2/cdda.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/libmpstream2/cdda.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ static int search_overlap = -1; static int no_skip = 0; -static const config_t cdda_opts[] = { +static const mpxp_option_t cdda_opts[] = { { "speed", &speed, CONF_TYPE_INT, CONF_RANGE,1,100, "sets driver speed" }, { "overlap", &search_overlap, CONF_TYPE_INT, CONF_RANGE,0,75, "reserved" }, { "noskip", &no_skip, CONF_TYPE_FLAG, 0 , 0, 1, "reserved" }, @@ -28,7 +28,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -static const config_t cdda_conf[] = { +static const mpxp_option_t cdda_conf[] = { { "cdda", (any_t*)&cdda_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, "CD-DA related options"}, { NULL,NULL, 0, 0, 0, 0, NULL} }; Modified: mplayerxp/mplayerxp.cpp =================================================================== --- mplayerxp/mplayerxp.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/mplayerxp.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -616,9 +616,9 @@ mpxp_info<<"Use --long-help option for full help"<<std::endl; } -void show_long_help(const std::map<std::string,std::string>& envm) { +void show_long_help(const m_config_t& cfg,const std::map<std::string,std::string>& envm) { MPXPSystem& MPXPSys=*mpxp_context().engine().MPXPSys; - m_config_show_options(*mpxp_context().mconfig); + m_config_show_options(cfg); mp_input_print_binds(MPXPSys.libinput()); Stream::print_drivers(); Video_Output::print_help(); @@ -2171,9 +2171,9 @@ } return MPlayerXP(argv,envm); } catch(const std::string& what) { - std::cout<<"Exception '"<<what<<"'caught in module: MPlayerXP"<<std::endl; - } catch(...) { - std::cout<<"Exception caught in module: MPlayerXP"<<std::endl; + std::cout<<"[main_module] Exception '"<<what<<"'caught in module: MPlayerXP"<<std::endl; +// } catch(...) { +// std::cout<<"[main_module] Exception caught in module: MPlayerXP"<<std::endl; } return EXIT_FAILURE; } Modified: mplayerxp/mplayerxp.h =================================================================== --- mplayerxp/mplayerxp.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/mplayerxp.h 2012-12-28 07:23:44 UTC (rev 614) @@ -17,8 +17,8 @@ struct audio_decoder_t; struct video_decoder_t; -struct m_config_t; namespace mpxp { + struct m_config_t; struct _PlayTree_Iter; /* List of all modules which require protection by pin-code */ enum { @@ -198,9 +198,8 @@ unsigned get_number_cpu(void); void show_help(void); - void show_long_help(const std::map<std::string,std::string>& envm); + void show_long_help(const m_config_t& cfg,const std::map<std::string,std::string>& envm); - void update_osd( float v_pts ); extern pthread_mutex_t audio_timer_mutex; Modified: mplayerxp/xmpcore/xmp_context.cpp =================================================================== --- mplayerxp/xmpcore/xmp_context.cpp 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/xmpcore/xmp_context.cpp 2012-12-28 07:23:44 UTC (rev 614) @@ -20,7 +20,7 @@ #endif extern const char *oss_mixer_device; -static const config_t xpcore_config[]={ +static const mpxp_option_t xpcore_config[]={ {"xp", &mp_conf.xp, CONF_TYPE_INT, CONF_RANGE, 0, UINT_MAX, "specifies number cpus to use for playback"}, {"dump", &mp_conf.stream_dump, CONF_TYPE_STRING, 0, 0, 0, "specifies dump type and name for the dump of stream"}, {"gomp", &mp_conf.gomp, CONF_TYPE_FLAG, 0, 0, 1, "enables usage of OpenMP extensions"}, @@ -38,7 +38,7 @@ }; #ifdef HAVE_STREAMING -static const config_t net_config[]={ +static const mpxp_option_t net_config[]={ {"ipv4", &net_conf.prefer_ipv4, CONF_TYPE_FLAG, 0, 0, 1, "forces mplayerxp to use IPv4 protocol over network"}, #ifdef HAVE_AF_INET6 {"ipv6", &net_conf.prefer_ipv4, CONF_TYPE_FLAG, 0, 1, 0, "forces mplayerxp to use IPv6 protocol over network"}, @@ -57,7 +57,7 @@ #endif #if defined( ARCH_X86 ) || defined(ARCH_X86_64) -static const config_t cpu_config[]={ +static const mpxp_option_t cpu_config[]={ {"simd", &mp_conf.x86.simd, CONF_TYPE_FLAG, 0, 0, 1, "enables using of SIMD extensions of CPU"}, {"nosimd", &mp_conf.x86.simd, CONF_TYPE_FLAG, 0, 1, 0, "disables using of SIMD extensions of CPU"}, {"mmx", &mp_conf.x86.mmx, CONF_TYPE_FLAG, 0, 0, 1, "enables using of MMX extensions of CPU"}, @@ -90,7 +90,7 @@ }; #endif -static const config_t osd_config[]={ +static const mpxp_option_t osd_config[]={ {"level", &mp_conf.osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 2 , "specifies initial mode of the OSD"}, #ifdef USE_OSD {"font", &mp_conf.font_name, CONF_TYPE_STRING, 0, 0, 0, "specifies an alternative directory of font.desc location"}, @@ -102,7 +102,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL}, }; -static const config_t veq_config[]={ +static const mpxp_option_t veq_config[]={ {"brightness",&vo_conf.gamma.brightness, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, "specifies brightness-level for output image"}, {"saturation",&vo_conf.gamma.saturation, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, "specifies saturation-level for output image"}, {"contrast",&vo_conf.gamma.contrast, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, "specifies contrast-level for output image"}, @@ -114,7 +114,7 @@ }; -static const config_t avsync_config[]={ +static const mpxp_option_t avsync_config[]={ {"framedrop", &mp_conf.frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, "enables frame-dropping on slow systems: decodes all video frames, but skips displaying some ones"}, /*UD*/ {"hardframedrop", &mp_conf.frame_dropping, CONF_TYPE_FLAG, 0, 0, 2, "enables hard frame-dropping on slow systems: skips displaying and decoding of some frames"}, {"noframedrop", &mp_conf.frame_dropping, CONF_TYPE_FLAG, 0, 1, 0, "disables frame dropping"}, @@ -137,7 +137,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL}, }; -static const config_t subtitle_config[]={ +static const mpxp_option_t subtitle_config[]={ {"on", &mp_conf.has_dvdsub, CONF_TYPE_FLAG, 0, 0, 1, "enables subtitle-steam playback"}, {"off", &mp_conf.has_dvdsub, CONF_TYPE_FLAG, 0, 1, 0, "disables subtitle-stream playback"}, {"vob", &mp_conf.vobsub_name, CONF_TYPE_STRING, 0, 0, 0, "specifies the VobSub files that are to be used for subtitle"}, @@ -164,7 +164,7 @@ }; #ifdef HAVE_X11 -static const config_t x11_config[]={ +static const mpxp_option_t x11_config[]={ {"display", &vo_conf.mDisplayName, CONF_TYPE_STRING, 0, 0, 0, "specifies the hostname and display number of the X server"}, #ifdef HAVE_XINERAMA {"xinerama", &vo_conf.xinerama_screen, CONF_TYPE_INT, CONF_RANGE, 0, 32, "tells MPlayerXP the display for movie playback"}, @@ -173,7 +173,7 @@ }; #endif -static const config_t audio_config[]={ +static const mpxp_option_t audio_config[]={ {"on", &mp_conf.has_audio, CONF_TYPE_FLAG, 0, 0, 1, "enables audio-steam playback"}, {"off", &mp_conf.has_audio, CONF_TYPE_FLAG, 0, 1, 0, "disables audio-stream playback"}, {"mixer", &oss_mixer_device, CONF_TYPE_STRING, 0, 0, 0, "select audio-mixer device"}, @@ -184,7 +184,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL}, }; -static const config_t video_config[]={ +static const mpxp_option_t video_config[]={ {"on", &mp_conf.has_video, CONF_TYPE_FLAG, 0, 0, 1, "enables video-steam playback"}, {"off", &mp_conf.has_video, CONF_TYPE_FLAG, 0, 1, 0, "disables video-stream playback"}, {"width", &vo_conf.image_width, CONF_TYPE_INT, CONF_RANGE, 0, 4096, "scale output image to width (if driver supports)"}, @@ -220,7 +220,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL}, }; -static const config_t playback_config[]={ +static const mpxp_option_t playback_config[]={ {"sb", &mp_conf.seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, "seek to given byte position before playback"}, {"ss", &mp_conf.seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0, "seek to given time position before playback"}, {"loop", &mp_conf.loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000, "loops movie playback given number of times. 0 means forever"}, @@ -232,7 +232,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL}, }; -static const config_t mplayerxp_options[]={ +static const mpxp_option_t mplayerxp_options[]={ /* name, pointer, type, flags, min, max, help */ {"include", NULL, CONF_TYPE_INCLUDE, CONF_NOSAVE, 0, 0, ""}, /* this don't need anymore to be the first!!! */ @@ -269,7 +269,7 @@ // ------------------------- codec/pp options -------------------- {NULL, NULL, 0, 0, 0, 0, NULL} }; -const config_t* mplayerxp_opts=mplayerxp_options; +const mpxp_option_t* mplayerxp_opts=mplayerxp_options; } // namespace mpxp extern void libmpcodecs_ad_register_options(m_config_t& cfg); Modified: mplayerxp/xmpcore/xmp_context.h =================================================================== --- mplayerxp/xmpcore/xmp_context.h 2012-12-28 06:34:01 UTC (rev 613) +++ mplayerxp/xmpcore/xmp_context.h 2012-12-28 07:23:44 UTC (rev 614) @@ -1,9 +1,9 @@ #ifndef _XMP_CONTEXT_H_INCLUDED #define _XMP_CONTEXT_H_INCLUDED 1 -struct config_t; namespace mpxp { - extern const config_t* mplayerxp_opts; + struct mpxp_option_t; + extern const mpxp_option_t* mplayerxp_opts; } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |