summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-26 16:35:40 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-26 16:35:40 +0300
commit05ad815133fcb0ade9a1040069dedba1abf9d6f0 (patch)
treecead166eb1f9fe7f1be9c0de374e0f93f8cf2e56
parent37e1edee352afb6d1b212403a84827aa6072943a (diff)
downloadmpv-05ad815133fcb0ade9a1040069dedba1abf9d6f0.tar.bz2
mpv-05ad815133fcb0ade9a1040069dedba1abf9d6f0.tar.xz
Mark some constant symbols as such
-rw-r--r--command.c2
-rw-r--r--input/input.c4
-rw-r--r--libmpcodecs/vf_delogo.c6
-rw-r--r--libmpcodecs/vf_eq.c4
-rw-r--r--libmpcodecs/vf_expand.c4
-rw-r--r--libmpcodecs/vf_format.c4
-rw-r--r--libmpcodecs/vf_geq.c4
-rw-r--r--libmpcodecs/vf_hue.c4
-rw-r--r--libmpcodecs/vf_noformat.c4
-rw-r--r--libmpcodecs/vf_noise.c2
-rw-r--r--libmpcodecs/vf_palette.c6
-rw-r--r--libmpcodecs/vf_pp.c2
-rw-r--r--libmpcodecs/vf_qp.c2
-rw-r--r--libmpcodecs/vf_scale.c16
-rw-r--r--libmpcodecs/vf_unsharp.c2
-rw-r--r--m_config.c2
16 files changed, 34 insertions, 34 deletions
diff --git a/command.c b/command.c
index f46c8e440a..fb34b8abbe 100644
--- a/command.c
+++ b/command.c
@@ -517,7 +517,7 @@ static int mp_property_metadata(m_option_t *prop, int action, void *arg,
MPContext *mpctx) {
m_property_action_t* ka;
char* meta;
- static m_option_t key_type =
+ static const m_option_t key_type =
{ "metadata", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL };
if (!mpctx->demuxer)
return M_PROPERTY_UNAVAILABLE;
diff --git a/input/input.c b/input/input.c
index a49de3c229..ac1a9d2b30 100644
--- a/input/input.c
+++ b/input/input.c
@@ -578,7 +578,7 @@ static int mp_input_print_key_list(m_option_t* cfg);
static int mp_input_print_cmd_list(m_option_t* cfg);
// Our command line options
-static m_option_t input_conf[] = {
+static const m_option_t input_conf[] = {
{ "conf", &config_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL },
{ "ar-delay", &ar_delay, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL },
{ "ar-rate", &ar_rate, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL },
@@ -589,7 +589,7 @@ static m_option_t input_conf[] = {
{ NULL, NULL, 0, 0, 0, 0, NULL}
};
-static m_option_t mp_input_opts[] = {
+static const m_option_t mp_input_opts[] = {
{ "input", &input_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
{ "nojoystick", &use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL },
{ "joystick", &use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL },
diff --git a/libmpcodecs/vf_delogo.c b/libmpcodecs/vf_delogo.c
index 493ddb55f0..e074b24428 100644
--- a/libmpcodecs/vf_delogo.c
+++ b/libmpcodecs/vf_delogo.c
@@ -193,7 +193,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){
return 0;
}
-static unsigned int fmt_list[]={
+static const unsigned int fmt_list[]={
IMGFMT_YV12,
IMGFMT_I420,
IMGFMT_IYUV,
@@ -253,7 +253,7 @@ static int open(vf_instance_t *vf, char* args){
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{ "x", ST_OFF(xoff), CONF_TYPE_INT, 0, 0, 0, NULL },
{ "y", ST_OFF(yoff), CONF_TYPE_INT, 0, 0, 0, NULL },
{ "w", ST_OFF(lw), CONF_TYPE_INT, 0, 0, 0, NULL },
@@ -263,7 +263,7 @@ static m_option_t vf_opts_fields[] = {
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"delogo",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_eq.c b/libmpcodecs/vf_eq.c
index d6bf1b001e..0b65720849 100644
--- a/libmpcodecs/vf_eq.c
+++ b/libmpcodecs/vf_eq.c
@@ -223,13 +223,13 @@ static int open(vf_instance_t *vf, char* args)
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{"brightness", ST_OFF(brightness), CONF_TYPE_INT, M_OPT_RANGE,-100 ,100, NULL},
{"contrast", ST_OFF(contrast), CONF_TYPE_INT, M_OPT_RANGE,-100 ,100, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"eq",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c
index d775961eec..0ed82f586f 100644
--- a/libmpcodecs/vf_expand.c
+++ b/libmpcodecs/vf_expand.c
@@ -444,7 +444,7 @@ static int open(vf_instance_t *vf, char* args){
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{"w", ST_OFF(exp_w), CONF_TYPE_INT, 0, 0 ,0, NULL},
{"h", ST_OFF(exp_h), CONF_TYPE_INT, 0, 0 ,0, NULL},
{"x", ST_OFF(exp_x), CONF_TYPE_INT, M_OPT_MIN, -1, 0, NULL},
@@ -455,7 +455,7 @@ static m_option_t vf_opts_fields[] = {
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"expand",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_format.c b/libmpcodecs/vf_format.c
index 7cfb80dffd..1a2fa5ce20 100644
--- a/libmpcodecs/vf_format.c
+++ b/libmpcodecs/vf_format.c
@@ -74,12 +74,12 @@ static int open(vf_instance_t *vf, char* args){
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{"fmt", ST_OFF(fmt), CONF_TYPE_IMGFMT, 0,0 ,0, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"format",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_geq.c b/libmpcodecs/vf_geq.c
index 0c628ead50..49f13286a1 100644
--- a/libmpcodecs/vf_geq.c
+++ b/libmpcodecs/vf_geq.c
@@ -150,7 +150,7 @@ static int open(vf_instance_t *vf, char* args){
if (!eq[2][0]) strncpy(eq[2], eq[1], sizeof(eq[0])-1);
for(plane=0; plane<3; plane++){
- static const char *const_names[]={
+ const char * const const_names[]={
"PI",
"E",
"X",
@@ -162,7 +162,7 @@ static int open(vf_instance_t *vf, char* args){
"SH",
NULL
};
- static const char *func2_names[]={
+ const char * const func2_names[]={
"lum",
"cb",
"cr",
diff --git a/libmpcodecs/vf_hue.c b/libmpcodecs/vf_hue.c
index 1776b2b54b..04697ea537 100644
--- a/libmpcodecs/vf_hue.c
+++ b/libmpcodecs/vf_hue.c
@@ -168,13 +168,13 @@ static int open(vf_instance_t *vf, char* args)
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{"hue", ST_OFF(hue), CONF_TYPE_FLOAT, M_OPT_RANGE,-180.0 ,180.0, NULL},
{"saturation", ST_OFF(saturation), CONF_TYPE_FLOAT, M_OPT_RANGE,-10.0 ,10.0, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"hue",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_noformat.c b/libmpcodecs/vf_noformat.c
index 26aaf3e62a..2e97744c54 100644
--- a/libmpcodecs/vf_noformat.c
+++ b/libmpcodecs/vf_noformat.c
@@ -74,12 +74,12 @@ static int open(vf_instance_t *vf, char* args){
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{"fmt", ST_OFF(fmt), CONF_TYPE_IMGFMT, 0,0 ,0, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"noformat",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c
index e74aec2733..db0ce68df1 100644
--- a/libmpcodecs/vf_noise.c
+++ b/libmpcodecs/vf_noise.c
@@ -414,7 +414,7 @@ static void parse(FilterParam *fp, char* args){
if(fp->strength) initNoise(fp);
}
-static unsigned int fmt_list[]={
+static const unsigned int fmt_list[]={
IMGFMT_YV12,
IMGFMT_I420,
IMGFMT_IYUV,
diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c
index 8b2615d000..fc56e50163 100644
--- a/libmpcodecs/vf_palette.c
+++ b/libmpcodecs/vf_palette.c
@@ -19,14 +19,14 @@
// routines are incorrrect. they assume the palette to be of the same
// depth as the output, which is incorrect. --Joey
-static unsigned int bgr_list[]={
+static const unsigned int bgr_list[]={
IMGFMT_BGR32,
IMGFMT_BGR24,
// IMGFMT_BGR16,
// IMGFMT_BGR15,
0
};
-static unsigned int rgb_list[]={
+static const unsigned int rgb_list[]={
IMGFMT_RGB32,
IMGFMT_RGB24,
// IMGFMT_RGB16,
@@ -39,7 +39,7 @@ static unsigned int gray_pal[256];
static unsigned int find_best(struct vf_instance* vf, unsigned int fmt){
unsigned int best=0;
int ret;
- unsigned int* p;
+ const unsigned int* p;
if(fmt==IMGFMT_BGR8) p=bgr_list;
else if(fmt==IMGFMT_RGB8) p=rgb_list;
else return 0;
diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c
index 4e8839a451..8735013ca2 100644
--- a/libmpcodecs/vf_pp.c
+++ b/libmpcodecs/vf_pp.c
@@ -138,7 +138,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
extern int divx_quality;
-static unsigned int fmt_list[]={
+static const unsigned int fmt_list[]={
IMGFMT_YV12,
IMGFMT_I420,
IMGFMT_IYUV,
diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c
index c20b81b0e1..a134d648b7 100644
--- a/libmpcodecs/vf_qp.c
+++ b/libmpcodecs/vf_qp.c
@@ -65,7 +65,7 @@ static int config(struct vf_instance* vf,
i,
0
};
- static const char *const_names[]={
+ const char * const const_names[]={
"PI",
"E",
"known",
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index d3ec57769c..9754370239 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -46,7 +46,7 @@ static struct vf_priv_s {
void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam);
-static unsigned int outfmt_list[]={
+static const unsigned int outfmt_list[]={
// YUV:
IMGFMT_444P,
IMGFMT_422P,
@@ -612,7 +612,7 @@ struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat,
}
/// An example of presets usage
-static struct size_preset {
+static const struct size_preset {
char* name;
int w, h;
} vf_size_presets_defs[] = {
@@ -627,21 +627,21 @@ static struct size_preset {
};
#define ST_OFF(f) M_ST_OFF(struct size_preset,f)
-static m_option_t vf_size_preset_fields[] = {
+static const m_option_t vf_size_preset_fields[] = {
{"w", ST_OFF(w), CONF_TYPE_INT, M_OPT_MIN,1 ,0, NULL},
{"h", ST_OFF(h), CONF_TYPE_INT, M_OPT_MIN,1 ,0, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_size_preset = {
+static const m_struct_t vf_size_preset = {
"scale_size_preset",
sizeof(struct size_preset),
NULL,
vf_size_preset_fields
};
-static m_struct_t vf_opts;
-static m_obj_presets_t size_preset = {
+static const m_struct_t vf_opts;
+static const m_obj_presets_t size_preset = {
&vf_size_preset, // Input struct desc
&vf_opts, // Output struct desc
vf_size_presets_defs, // The list of presets
@@ -651,7 +651,7 @@ static m_obj_presets_t size_preset = {
/// Now the options
#undef ST_OFF
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
{"w", ST_OFF(w), CONF_TYPE_INT, M_OPT_MIN,-11,0, NULL},
{"h", ST_OFF(h), CONF_TYPE_INT, M_OPT_MIN,-11,0, NULL},
{"interlaced", ST_OFF(interlaced), CONF_TYPE_INT, M_OPT_RANGE, 0, 1, NULL},
@@ -666,7 +666,7 @@ static m_option_t vf_opts_fields[] = {
{ NULL, NULL, 0, 0, 0, 0, NULL }
};
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
"scale",
sizeof(struct vf_priv_s),
&vf_priv_dflt,
diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c
index bdbbaa88d2..e349bbeda0 100644
--- a/libmpcodecs/vf_unsharp.c
+++ b/libmpcodecs/vf_unsharp.c
@@ -262,7 +262,7 @@ static void parse( FilterParam *fp, char* args ) {
//===========================================================================//
-static unsigned int fmt_list[] = {
+static const unsigned int fmt_list[] = {
IMGFMT_YV12,
IMGFMT_I420,
IMGFMT_IYUV,
diff --git a/m_config.c b/m_config.c
index fc61494f0d..09329ba287 100644
--- a/m_config.c
+++ b/m_config.c
@@ -61,7 +61,7 @@ m_config_t *m_config_new(void *optstruct,
m_config_t* config;
static int initialized = 0;
static m_option_type_t profile_opt_type;
- static m_option_t ref_opts[] = {
+ static const m_option_t ref_opts[] = {
{ "profile", NULL, &profile_opt_type, CONF_NOSAVE, 0, 0, NULL },
{ "show-profile", show_profile, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
{ "list-options", list_options, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },