[MPlayer-cvslog] r25261 - in trunk: cfg-common.h cfg-mencoder.h cfg-mplayer.h

reimar subversion at mplayerhq.hu
Sun Dec 2 17:45:34 CET 2007


Author: reimar
Date: Sun Dec  2 17:45:34 2007
New Revision: 25261

Log:
Make the main m_option_t arrays const


Modified:
   trunk/cfg-common.h
   trunk/cfg-mencoder.h
   trunk/cfg-mplayer.h

Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h	(original)
+++ trunk/cfg-common.h	Sun Dec  2 17:45:34 2007
@@ -393,7 +393,7 @@ extern off_t ps_probe;
 
 
 #ifdef USE_RADIO
-m_option_t radioopts_conf[]={
+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},
 #ifdef RADIO_BSDBT848_HDR
@@ -410,7 +410,7 @@ m_option_t radioopts_conf[]={
 #endif /* USE_RADIO */
 
 #ifdef USE_TV
-m_option_t tvopts_conf[]={
+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},
 	{"noaudio", &stream_tv_defaults.noaudio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@@ -488,7 +488,7 @@ extern char *pvr_param_bitrate_mode;
 extern int pvr_param_bitrate_peak;
 extern char *pvr_param_stream_type;
 
-m_option_t pvropts_conf[]={
+const m_option_t pvropts_conf[]={
 	{"aspect", &pvr_param_aspect_ratio, CONF_TYPE_INT, 0, 1, 4, NULL},
 	{"arate", &pvr_param_sample_rate, CONF_TYPE_INT, 0, 32000, 48000, NULL},
 	{"alayer", &pvr_param_audio_layer, CONF_TYPE_INT, 0, 1, 2, NULL},
@@ -525,7 +525,7 @@ extern float sws_lum_gblur;
 extern float sws_chr_sharpen;
 extern float sws_lum_sharpen;
 
-m_option_t scaler_filter_conf[]={
+const m_option_t scaler_filter_conf[]={
 	{"lgb", &sws_lum_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
 	{"cgb", &sws_chr_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
 	{"cvs", &sws_chr_vshift, CONF_TYPE_INT, 0, 0, 0, NULL},
@@ -546,7 +546,7 @@ extern int vivo_param_height;
 extern int vivo_param_vformat;
 extern char *dvd_device, *cdrom_device;
 
-m_option_t vivoopts_conf[]={
+const m_option_t vivoopts_conf[]={
 	{"version", &vivo_param_version, CONF_TYPE_INT, 0, 0, 0, NULL},
 	/* audio options */
 	{"acodec", &vivo_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
@@ -567,7 +567,7 @@ extern char * mf_type;
 extern m_obj_settings_t* vf_settings;
 extern m_obj_list_t vf_obj_list;
 
-m_option_t mfopts_conf[]={
+const m_option_t mfopts_conf[]={
         {"on", "-mf on has been removed, use mf:// instead.\n", CONF_TYPE_PRINT, 0, 0, 1, NULL},
         {"w", &mf_w, CONF_TYPE_INT, 0, 0, 0, NULL},
         {"h", &mf_h, CONF_TYPE_INT, 0, 0, 0, NULL},
@@ -578,13 +578,13 @@ m_option_t mfopts_conf[]={
 
 #include "libaf/af.h"
 extern af_cfg_t af_cfg; // Audio filter configuration, defined in libmpcodecs/dec_audio.c
-m_option_t audio_filter_conf[]={       
+const m_option_t audio_filter_conf[]={       
 	{"list", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
         {"force", &af_cfg.force, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
-m_option_t msgl_config[]={
+const m_option_t msgl_config[]={
 	{ "all", &mp_msg_level_all, CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL},
 
 	{ "global", &mp_msg_levels[MSGT_GLOBAL], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
@@ -707,6 +707,6 @@ struct {
 extern m_option_t lavc_decode_opts_conf[];
 extern m_option_t xvid_dec_opts[];
 
-int dvd_parse_chapter_range(m_option_t*, const char*);
+int dvd_parse_chapter_range(const m_option_t*, const char*);
 
 #endif /* MAIN_CONF */

Modified: trunk/cfg-mencoder.h
==============================================================================
--- trunk/cfg-mencoder.h	(original)
+++ trunk/cfg-mencoder.h	Sun Dec  2 17:45:34 2007
@@ -18,13 +18,13 @@ extern m_option_t faacopts_conf[];
 extern m_option_t vfwopts_conf[];
 extern m_option_t xvidencopts_conf[];
 
-extern void x264enc_set_param(m_option_t* opt, char* arg);
+extern void x264enc_set_param(const m_option_t* opt, char* arg);
 
 extern m_option_t nuvopts_conf[];
 extern m_option_t mpegopts_conf[];
 extern m_option_t lavfopts_conf[];
 
-m_option_t ovc_conf[]={
+const m_option_t ovc_conf[]={
 	{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
 	{"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
 	{"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
@@ -63,7 +63,7 @@ m_option_t ovc_conf[]={
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
-m_option_t oac_conf[]={
+const m_option_t oac_conf[]={
 	{"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
 	{"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
 #ifdef HAVE_MP3LAME
@@ -113,7 +113,7 @@ m_option_t oac_conf[]={
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
-m_option_t info_conf[]={
+const m_option_t info_conf[]={
 	{"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
@@ -133,7 +133,7 @@ m_option_t info_conf[]={
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
-m_option_t of_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},
 #if defined(USE_LIBAVFORMAT) ||  defined(USE_LIBAVFORMAT_SO)
@@ -156,7 +156,7 @@ m_option_t of_conf[]={
 extern float avi_aspect_override; /* defined in libmpdemux/muxer_avi.c */
 extern int write_odml; /* defined in libmpdemux/muxer_avi.c */
 
-m_option_t mencoder_opts[]={
+const m_option_t mencoder_opts[]={
 	/* name, pointer, type, flags, min, max */
 
 	{"frameno-file", &frameno_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	(original)
+++ trunk/cfg-mplayer.h	Sun Dec  2 17:45:34 2007
@@ -35,8 +35,8 @@ extern char *menu_fribidi_charset;
 extern int menu_flip_hebrew;
 extern int menu_fribidi_flip_commas;
 
-extern int vo_zr_parseoption(m_option_t* conf, char *opt, char * param);
-extern void vo_zr_revertoption(m_option_t* opt,char* pram);
+extern int vo_zr_parseoption(const m_option_t* conf, char *opt, char * param);
+extern void vo_zr_revertoption(const m_option_t* opt,char* pram);
 
 extern m_option_t dxr2_opts[];
 
@@ -53,13 +53,13 @@ extern int readPPOpt(void *conf, char *a
 extern void revertPPOpt(void *conf, char* opt);
 extern char* pp_help;
 
-m_option_t vd_conf[]={
+const m_option_t vd_conf[]={
 	{"help", "Use MPlayer with an appropriate video file instead of live partners to avoid vd.\n", CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 #ifdef USE_TV
-m_option_t tvscan_conf[]={
+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},
 	{"period", &stream_tv_defaults.scan_period, CONF_TYPE_FLOAT, CONF_RANGE, 0.1, 2.0, NULL},
@@ -79,7 +79,7 @@ m_option_t tvscan_conf[]={
  * by Folke
  */
 
-m_option_t mplayer_opts[]={
+const m_option_t mplayer_opts[]={
 	/* name, pointer, type, flags, min, max */
 
 //---------------------- libao/libvo options ------------------------



More information about the MPlayer-cvslog mailing list