diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-01-21 10:17:04 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-01-21 10:18:50 +0100 |
commit | 80e02cbdf9d4645d3daeccf4b233d65b4ff8a19c (patch) | |
tree | a4c53d3aa84367082b22c9381c22991e38ff5bee /gst | |
parent | 8941fcacecea043952a87909d48d4d239c5c13e9 (diff) | |
download | gstreamer-plugins-bad-80e02cbdf9d4645d3daeccf4b233d65b4ff8a19c.tar.gz |
Constify some static arrays everywhere
Diffstat (limited to 'gst')
-rw-r--r-- | gst/adpcmenc/adpcmenc.c | 2 | ||||
-rw-r--r-- | gst/freeverb/gstfreeverb.c | 2 | ||||
-rw-r--r-- | gst/librfb/d3des.c | 8 | ||||
-rw-r--r-- | gst/mpeg1sys/buffer.c | 21 | ||||
-rw-r--r-- | gst/mpegpsmux/crc.h | 2 | ||||
-rw-r--r-- | gst/patchdetect/gstpatchdetect.c | 2 | ||||
-rw-r--r-- | gst/tta/filters.h | 2 | ||||
-rw-r--r-- | gst/vbidec/gstvbidec.c | 2 | ||||
-rw-r--r-- | gst/vbidec/vbidata.c | 8 |
9 files changed, 25 insertions, 24 deletions
diff --git a/gst/adpcmenc/adpcmenc.c b/gst/adpcmenc/adpcmenc.c index 36f00bb45..7a8faabe3 100644 --- a/gst/adpcmenc/adpcmenc.c +++ b/gst/adpcmenc/adpcmenc.c @@ -100,7 +100,7 @@ adpcmenc_layout_get_type (void) static GType adpcmenc_layout_type = 0; if (!adpcmenc_layout_type) { - static GEnumValue layout_types[] = { + static const GEnumValue layout_types[] = { {LAYOUT_ADPCM_DVI, "DVI/IMA APDCM", "dvi"}, {0, NULL, NULL}, }; diff --git a/gst/freeverb/gstfreeverb.c b/gst/freeverb/gstfreeverb.c index 819d08cf6..4ee37791c 100644 --- a/gst/freeverb/gstfreeverb.c +++ b/gst/freeverb/gstfreeverb.c @@ -120,7 +120,7 @@ static gboolean gst_freeverb_transform_s2s_float (GstFreeverb * filter, /* Table with processing functions: [channels][format] */ -static GstFreeverbProcessFunc process_functions[2][2] = { +static const GstFreeverbProcessFunc process_functions[2][2] = { { (GstFreeverbProcessFunc) gst_freeverb_transform_m2s_int, (GstFreeverbProcessFunc) gst_freeverb_transform_m2s_float, diff --git a/gst/librfb/d3des.c b/gst/librfb/d3des.c index 785a3a80d..c05fea3f0 100644 --- a/gst/librfb/d3des.c +++ b/gst/librfb/d3des.c @@ -36,12 +36,12 @@ static void unscrun (unsigned long *, unsigned char *); static void desfunc (unsigned long *, unsigned long *); static void cookey (DESContext * ctx, unsigned long *); -//static unsigned long KnL[32] = { 0L }; +//static const unsigned long KnL[32] = { 0L }; -//static unsigned long KnR[32] = { 0L }; -//static unsigned long Kn3[32] = { 0L }; +//static const unsigned long KnR[32] = { 0L }; +//static const unsigned long Kn3[32] = { 0L }; /* - * static unsigned char Df_Key[24] = { + * static const unsigned char Df_Key[24] = { * 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, * 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10, * 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 }; diff --git a/gst/mpeg1sys/buffer.c b/gst/mpeg1sys/buffer.c index 0a279e64a..eb2ad285a 100644 --- a/gst/mpeg1sys/buffer.c +++ b/gst/mpeg1sys/buffer.c @@ -49,7 +49,7 @@ #endif /* This must match decoder and encoder tables */ -static double picture_rates[16] = { +static const double picture_rates[16] = { 0.0, 24000.0 / 1001., 24.0, @@ -76,10 +76,10 @@ static double ratio [16] = { 0., 1., 0.6735, 0.7031, 0.7615, 0.8055, */ #ifndef GST_DISABLE_GST_DEBUG -static char picture_types[4][3] = { "I", "P", "B", "D" }; +static const char picture_types[4][3] = { "I", "P", "B", "D" }; #endif -static int bitrate_index[2][3][16] = +static const int bitrate_index[2][3][16] = { {{0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448,}, {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384,}, {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320,}}, @@ -88,21 +88,22 @@ static int bitrate_index[2][3][16] = {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160,}}, }; -static long frequency[9] = +static const long frequency[9] = { 44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000 }; -static double dfrequency[9] = { 44.1, 48, 32, 22.05, 24, 16, 11.025, 12, 8 }; +static const double dfrequency[9] = + { 44.1, 48, 32, 22.05, 24, 16, 11.025, 12, 8 }; -static unsigned int samples[4] = { 192, 384, 1152, 1152 }; +static const unsigned int samples[4] = { 192, 384, 1152, 1152 }; /* deined but not used -static char mode [4][15] = +static const char mode [4][15] = { "stereo", "joint stereo", "dual channel", "single channel" }; -static char copyright [2][20] = +static const char copyright [2][20] = { "no copyright","copyright protected" }; -static char original [2][10] = +static const char original [2][10] = { "copy","original" }; -static char emphasis [4][20] = +static const char emphasis [4][20] = { "none", "50/15 microseconds", "reserved", "CCITT J.17" }; */ static void mpeg1mux_buffer_update_video_info (Mpeg1MuxBuffer * mb); diff --git a/gst/mpegpsmux/crc.h b/gst/mpegpsmux/crc.h index 35fb3e2ed..532b79751 100644 --- a/gst/mpegpsmux/crc.h +++ b/gst/mpegpsmux/crc.h @@ -40,7 +40,7 @@ * SOFTWARE. */ -static guint32 crc_tab[256] = { +static const guint32 crc_tab[256] = { 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, diff --git a/gst/patchdetect/gstpatchdetect.c b/gst/patchdetect/gstpatchdetect.c index 783ae0bd2..06a63965d 100644 --- a/gst/patchdetect/gstpatchdetect.c +++ b/gst/patchdetect/gstpatchdetect.c @@ -299,7 +299,7 @@ typedef struct gboolean valid; } Patch; -static Color patch_colors[24] = { +static const Color patch_colors[24] = { {115, 82, 68, 92, 119, 143}, {194, 150, 130, 152, 115, 148}, {98, 122, 157, 119, 146, 116}, diff --git a/gst/tta/filters.h b/gst/tta/filters.h index 2162b2046..9df5e1d43 100644 --- a/gst/tta/filters.h +++ b/gst/tta/filters.h @@ -32,7 +32,7 @@ #define FILTERS_H ///////// Filter Settings ////////// -static long flt_set[3] = {10, 9, 10}; +static const long flt_set[3] = {10, 9, 10}; static void memshl (register long *pA, register long *pB) { diff --git a/gst/vbidec/gstvbidec.c b/gst/vbidec/gstvbidec.c index ffcd38afd..28e8e532e 100644 --- a/gst/vbidec/gstvbidec.c +++ b/gst/vbidec/gstvbidec.c @@ -96,7 +96,7 @@ static GType gst_vbidec_caption_type_get_type (void) { static GType vbidec_caption_type_type = 0; - static GEnumValue vbidec_caption_type[] = { + static const GEnumValue vbidec_caption_type[] = { {CAPTURE_OFF, "0", "Closed Captions off"}, {CAPTURE_CC1, "1", "Closed Caption CC1"}, {CAPTURE_CC2, "2", "Closed Caption CC2"}, diff --git a/gst/vbidec/vbidata.c b/gst/vbidec/vbidata.c index 0abcf8dca..0dc013ad6 100644 --- a/gst/vbidec/vbidata.c +++ b/gst/vbidec/vbidata.c @@ -96,21 +96,21 @@ struct vbidata_s /* this is NOT exactly right */ //static char ccode[] = " !\"#$%&'()\0341+,-./0123456789:;<=>?@" -static char ccode[] = " !\"#$%&'()a+,-./0123456789:;<=>?@" +static const char ccode[] = " !\"#$%&'()a+,-./0123456789:;<=>?@" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // "abcdefghijklmnopqrstuvwxyz" // "[\0351]\0355\0363\0372abcdefghijklmnopqr" "[e]iouabcdefghijklmnopqr" // "stuvwxyz\0347\0367\0245\0244\0240"; "stuvwxyzcoNn "; -static char wccode[] = "\0256\0260\0275\0277T\0242\0243#\0340 " +static const char wccode[] = "\0256\0260\0275\0277T\0242\0243#\0340 " "\0350\0354\0362\0371"; -static char extcode1[] = "\0301\0311\0323\0332\0334\0374" +static const char extcode1[] = "\0301\0311\0323\0332\0334\0374" "`\0241*'-\0251S*\"\"\0300\0302" "\0307\0310\0312\0313\0353\0316\0317\0357" "\0324\0331\0371\0333\0253\0273"; -static char extcode2[] = "\0303\0343\0315\0314\0354\0322\0362\0325" +static const char extcode2[] = "\0303\0343\0315\0314\0354\0322\0362\0325" "{}\\^_|~\0304\0344\0326\0366\0337\0245\0244|" "\0305\0345\0330\0370++++"; int |