Constify some static arrays everywhere

This commit is contained in:
Sebastian Dröge 2015-01-21 10:17:04 +01:00
parent 8941fcacec
commit 80e02cbdf9
29 changed files with 71 additions and 70 deletions

View File

@ -76,7 +76,7 @@ GType
gst_apexsink_jackstatus_get_type (void) gst_apexsink_jackstatus_get_type (void)
{ {
static GType jackstatus_type = 0; static GType jackstatus_type = 0;
static GEnumValue jackstatus[] = { static const GEnumValue jackstatus[] = {
{GST_APEX_JACK_STATUS_UNDEFINED, "GST_APEX_JACK_STATUS_UNDEFINED", {GST_APEX_JACK_STATUS_UNDEFINED, "GST_APEX_JACK_STATUS_UNDEFINED",
"Jack status undefined"}, "Jack status undefined"},
{GST_APEX_JACK_STATUS_DISCONNECTED, "GST_APEX_JACK_STATUS_DISCONNECTED", {GST_APEX_JACK_STATUS_DISCONNECTED, "GST_APEX_JACK_STATUS_DISCONNECTED",
@ -97,7 +97,7 @@ GType
gst_apexsink_jacktype_get_type (void) gst_apexsink_jacktype_get_type (void)
{ {
static GType jacktype_type = 0; static GType jacktype_type = 0;
static GEnumValue jacktype[] = { static const GEnumValue jacktype[] = {
{GST_APEX_JACK_TYPE_UNDEFINED, "GST_APEX_JACK_TYPE_UNDEFINED", {GST_APEX_JACK_TYPE_UNDEFINED, "GST_APEX_JACK_TYPE_UNDEFINED",
"Undefined jack type"}, "Undefined jack type"},
{GST_APEX_JACK_TYPE_ANALOG, "GST_APEX_JACK_TYPE_ANALOG", "Analog jack"}, {GST_APEX_JACK_TYPE_ANALOG, "GST_APEX_JACK_TYPE_ANALOG", "Analog jack"},
@ -116,7 +116,7 @@ GType
gst_apexsink_generation_get_type (void) gst_apexsink_generation_get_type (void)
{ {
static GType generation_type = 0; static GType generation_type = 0;
static GEnumValue generation[] = { static const GEnumValue generation[] = {
{GST_APEX_GENERATION_ONE, "generation-one", {GST_APEX_GENERATION_ONE, "generation-one",
"First generation (e.g., original AirPort Express)"}, "First generation (e.g., original AirPort Express)"},
{GST_APEX_GENERATION_TWO, "generation-two", {GST_APEX_GENERATION_TWO, "generation-two",
@ -135,7 +135,7 @@ GType
gst_apexsink_transport_protocol_get_type (void) gst_apexsink_transport_protocol_get_type (void)
{ {
static GType transport_protocol_type = 0; static GType transport_protocol_type = 0;
static GEnumValue transport_protocol[] = { static const GEnumValue transport_protocol[] = {
{GST_APEX_TCP, "tcp", "TCP"}, {GST_APEX_TCP, "tcp", "TCP"},
{GST_APEX_UDP, "udp", "UDP"}, {GST_APEX_UDP, "udp", "UDP"},
{0, NULL, NULL}, {0, NULL, NULL},

View File

@ -71,7 +71,7 @@ static GType
gst_afsink_types_get_type (void) gst_afsink_types_get_type (void)
{ {
static GType afsink_types_type = 0; static GType afsink_types_type = 0;
static GEnumValue afsink_types[] = { static const GEnumValue afsink_types[] = {
{AF_FILE_RAWDATA, "0", "raw PCM"}, {AF_FILE_RAWDATA, "0", "raw PCM"},
{AF_FILE_AIFFC, "1", "AIFFC"}, {AF_FILE_AIFFC, "1", "AIFFC"},
{AF_FILE_AIFF, "2", "AIFF"}, {AF_FILE_AIFF, "2", "AIFF"},

View File

@ -70,7 +70,7 @@ static GType
gst_afsrc_types_get_type (void) gst_afsrc_types_get_type (void)
{ {
static GType afsrc_types_type = 0; static GType afsrc_types_type = 0;
static GEnumValue afsrc_types[] = { static const GEnumValue afsrc_types[] = {
{AF_FILE_RAWDATA, "0", "raw PCM"}, {AF_FILE_RAWDATA, "0", "raw PCM"},
{AF_FILE_AIFFC, "1", "AIFFC"}, {AF_FILE_AIFFC, "1", "AIFFC"},
{AF_FILE_AIFF, "2", "AIFF"}, {AF_FILE_AIFF, "2", "AIFF"},

View File

@ -82,7 +82,7 @@ typedef struct
gint preset; gint preset;
} GstBs2bPreset; } GstBs2bPreset;
static GstBs2bPreset presets[3] = { static const GstBs2bPreset presets[3] = {
{ {
"default", "default",
"Closest to virtual speaker placement (30°, 3 meter) [700Hz, 4.5dB]", "Closest to virtual speaker placement (30°, 3 meter) [700Hz, 4.5dB]",

View File

@ -2536,7 +2536,7 @@ static gchar *
gst_mpdparser_build_URL_from_template (const gchar * url_template, gst_mpdparser_build_URL_from_template (const gchar * url_template,
const gchar * id, guint number, guint bandwidth, guint64 time) const gchar * id, guint number, guint bandwidth, guint64 time)
{ {
static gchar default_format[] = "%01d"; static const gchar default_format[] = "%01d";
gchar **tokens, *token, *ret; gchar **tokens, *token, *ret;
const gchar *format; const gchar *format;
gint i, num_tokens; gint i, num_tokens;
@ -2719,14 +2719,14 @@ gst_mpdparser_parse_baseURL (GstMpdClient * client, GstActiveStream * stream,
gchar ** query) gchar ** query)
{ {
GstStreamPeriod *stream_period; GstStreamPeriod *stream_period;
static gchar empty[] = ""; static const gchar empty[] = "";
gchar *ret = NULL; gchar *ret = NULL;
GstUri *abs_url; GstUri *abs_url;
g_return_val_if_fail (stream != NULL, empty); g_return_val_if_fail (stream != NULL, g_strdup (empty));
stream_period = gst_mpdparser_get_stream_period (client); stream_period = gst_mpdparser_get_stream_period (client);
g_return_val_if_fail (stream_period != NULL, empty); g_return_val_if_fail (stream_period != NULL, g_strdup (empty));
g_return_val_if_fail (stream_period->period != NULL, empty); g_return_val_if_fail (stream_period->period != NULL, g_strdup (empty));
/* NULLify query return before we start */ /* NULLify query return before we start */
if (query) if (query)

View File

@ -152,7 +152,7 @@ gst_faac_brtype_get_type (void)
static GType gst_faac_brtype_type = 0; static GType gst_faac_brtype_type = 0;
if (!gst_faac_brtype_type) { if (!gst_faac_brtype_type) {
static GEnumValue gst_faac_brtype[] = { static const GEnumValue gst_faac_brtype[] = {
{VBR, "VBR", "VBR encoding"}, {VBR, "VBR", "VBR encoding"},
{ABR, "ABR", "ABR encoding"}, {ABR, "ABR", "ABR encoding"},
{0, NULL, NULL}, {0, NULL, NULL},
@ -172,7 +172,7 @@ gst_faac_shortctl_get_type (void)
static GType gst_faac_shortctl_type = 0; static GType gst_faac_shortctl_type = 0;
if (!gst_faac_shortctl_type) { if (!gst_faac_shortctl_type) {
static GEnumValue gst_faac_shortctl[] = { static const GEnumValue gst_faac_shortctl[] = {
{SHORTCTL_NORMAL, "SHORTCTL_NORMAL", "Normal block type"}, {SHORTCTL_NORMAL, "SHORTCTL_NORMAL", "Normal block type"},
{SHORTCTL_NOSHORT, "SHORTCTL_NOSHORT", "No short blocks"}, {SHORTCTL_NOSHORT, "SHORTCTL_NOSHORT", "No short blocks"},
{SHORTCTL_NOLONG, "SHORTCTL_NOLONG", "No long blocks"}, {SHORTCTL_NOLONG, "SHORTCTL_NOLONG", "No long blocks"},

View File

@ -77,9 +77,9 @@ static void gst_gl_filter_reflected_screen_draw_separated_screen (GstGLFilter *
static void gst_gl_filter_reflected_screen_callback (gint width, gint height, static void gst_gl_filter_reflected_screen_callback (gint width, gint height,
guint texture, gpointer stuff); guint texture, gpointer stuff);
static GLfloat LightPos[] = { 4.0f, -4.0f, 6.0f, 1.0f }; // Light Position static const GLfloat LightPos[] = { 4.0f, -4.0f, 6.0f, 1.0f }; // Light Position
static GLfloat LightAmb[] = { 4.0f, 4.0f, 4.0f, 1.0f }; // Ambient Light static const GLfloat LightAmb[] = { 4.0f, 4.0f, 4.0f, 1.0f }; // Ambient Light
static GLfloat LightDif[] = { 1.0f, 1.0f, 1.0f, 1.0f }; // Diffuse Light static const GLfloat LightDif[] = { 1.0f, 1.0f, 1.0f, 1.0f }; // Diffuse Light
static void static void
gst_gl_filter_reflected_screen_class_init (GstGLFilterReflectedScreenClass * gst_gl_filter_reflected_screen_class_init (GstGLFilterReflectedScreenClass *

View File

@ -52,7 +52,7 @@ gst_openh264enc_usage_type_get_type (void)
static GType usage_type = 0; static GType usage_type = 0;
if (!usage_type) { if (!usage_type) {
static GEnumValue usage_types[] = { static const GEnumValue usage_types[] = {
{CAMERA_VIDEO_REAL_TIME, "video from camera", "camera"}, {CAMERA_VIDEO_REAL_TIME, "video from camera", "camera"},
{SCREEN_CONTENT_REAL_TIME, "screen content", "screen"}, {SCREEN_CONTENT_REAL_TIME, "screen content", "screen"},
{0, NULL, NULL}, {0, NULL, NULL},
@ -71,7 +71,7 @@ gst_openh264enc_rc_modes_get_type (void)
static GType rc_modes_type = 0; static GType rc_modes_type = 0;
if (!rc_modes_type) { if (!rc_modes_type) {
static GEnumValue rc_modes_types[] = { static const GEnumValue rc_modes_types[] = {
{RC_QUALITY_MODE, "Quality mode", "quality"}, {RC_QUALITY_MODE, "Quality mode", "quality"},
{RC_BITRATE_MODE, "Bitrate mode", "bitrate"}, {RC_BITRATE_MODE, "Bitrate mode", "bitrate"},
{RC_BUFFERBASED_MODE, "No bitrate control, just using buffer status", "buffer"}, {RC_BUFFERBASED_MODE, "No bitrate control, just using buffer status", "buffer"},

View File

@ -57,7 +57,7 @@ static GType
gst_voamrwbenc_bandmode_get_type (void) gst_voamrwbenc_bandmode_get_type (void)
{ {
static GType gst_voamrwbenc_bandmode_type = 0; static GType gst_voamrwbenc_bandmode_type = 0;
static GEnumValue gst_voamrwbenc_bandmode[] = { static const GEnumValue gst_voamrwbenc_bandmode[] = {
{MR660, "MR660", "MR660"}, {MR660, "MR660", "MR660"},
{MR885, "MR885", "MR885"}, {MR885, "MR885", "MR885"},
{MR1265, "MR1265", "MR1265"}, {MR1265, "MR1265", "MR1265"},

View File

@ -151,7 +151,7 @@ typedef struct
} PAR; } PAR;
/* Table E-1 - Meaning of sample aspect ratio indicator (1..16) */ /* Table E-1 - Meaning of sample aspect ratio indicator (1..16) */
static PAR aspect_ratios[17] = { static const PAR aspect_ratios[17] = {
{0, 0}, {0, 0},
{1, 1}, {1, 1},
{12, 11}, {12, 11},

View File

@ -137,7 +137,7 @@ typedef struct
} PAR; } PAR;
/* Table E-1 - Meaning of sample aspect ratio indicator (1..16) */ /* Table E-1 - Meaning of sample aspect ratio indicator (1..16) */
static PAR aspect_ratios[17] = { static const PAR aspect_ratios[17] = {
{0, 0}, {0, 0},
{1, 1}, {1, 1},
{12, 11}, {12, 11},

View File

@ -242,7 +242,7 @@ typedef struct
gint par_n, par_d; gint par_n, par_d;
} PAR; } PAR;
static PAR aspect_ratios[] = { static const PAR aspect_ratios[] = {
{0, 0}, {0, 0},
{1, 1}, {1, 1},
{12, 11}, {12, 11},

View File

@ -63,7 +63,7 @@ struct _GstGLUploadPrivate
GstBuffer *outbuf; GstBuffer *outbuf;
UploadMethod *method; const UploadMethod *method;
gpointer method_impl; gpointer method_impl;
int method_i; int method_i;
}; };
@ -169,7 +169,7 @@ _gl_memory_upload_free (gpointer impl)
g_free (impl); g_free (impl);
} }
static UploadMethod _gl_memory_upload = { static const UploadMethod _gl_memory_upload = {
"GLMemory", "GLMemory",
METHOD_FLAG_CAN_SHARE_CONTEXT, METHOD_FLAG_CAN_SHARE_CONTEXT,
&_gl_memory_upload_new, &_gl_memory_upload_new,
@ -281,7 +281,7 @@ _egl_image_upload_free (gpointer impl)
g_free (impl); g_free (impl);
} }
static UploadMethod _egl_image_upload = { static const UploadMethod _egl_image_upload = {
"EGLImage", "EGLImage",
0, 0,
&_egl_image_upload_new, &_egl_image_upload_new,
@ -433,7 +433,7 @@ _upload_meta_upload_free (gpointer impl)
g_free (upload); g_free (upload);
} }
static UploadMethod _upload_meta_upload = { static const UploadMethod _upload_meta_upload = {
"UploadMeta", "UploadMeta",
METHOD_FLAG_CAN_SHARE_CONTEXT, METHOD_FLAG_CAN_SHARE_CONTEXT,
&_upload_meta_upload_new, &_upload_meta_upload_new,
@ -536,7 +536,7 @@ _raw_data_upload_free (gpointer impl)
g_free (raw); g_free (raw);
} }
static UploadMethod _raw_data_upload = { static const UploadMethod _raw_data_upload = {
"Raw Data", "Raw Data",
0, 0,
&_raw_data_upload_new, &_raw_data_upload_new,
@ -546,7 +546,7 @@ static UploadMethod _raw_data_upload = {
&_raw_data_upload_free &_raw_data_upload_free
}; };
static UploadMethod *upload_methods[] = { &_gl_memory_upload, static const UploadMethod *upload_methods[] = { &_gl_memory_upload,
#if GST_GL_HAVE_PLATFORM_EGL #if GST_GL_HAVE_PLATFORM_EGL
&_egl_image_upload, &_egl_image_upload,
#endif #endif

View File

@ -100,7 +100,7 @@ adpcmenc_layout_get_type (void)
static GType adpcmenc_layout_type = 0; static GType adpcmenc_layout_type = 0;
if (!adpcmenc_layout_type) { if (!adpcmenc_layout_type) {
static GEnumValue layout_types[] = { static const GEnumValue layout_types[] = {
{LAYOUT_ADPCM_DVI, "DVI/IMA APDCM", "dvi"}, {LAYOUT_ADPCM_DVI, "DVI/IMA APDCM", "dvi"},
{0, NULL, NULL}, {0, NULL, NULL},
}; };

View File

@ -120,7 +120,7 @@ static gboolean gst_freeverb_transform_s2s_float (GstFreeverb * filter,
/* Table with processing functions: [channels][format] */ /* 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_int,
(GstFreeverbProcessFunc) gst_freeverb_transform_m2s_float, (GstFreeverbProcessFunc) gst_freeverb_transform_m2s_float,

View File

@ -36,12 +36,12 @@ static void unscrun (unsigned long *, unsigned char *);
static void desfunc (unsigned long *, unsigned long *); static void desfunc (unsigned long *, unsigned long *);
static void cookey (DESContext * ctx, 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 const unsigned long KnR[32] = { 0L };
//static unsigned long Kn3[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, * 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
* 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10, * 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10,
* 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 }; * 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 };

View File

@ -49,7 +49,7 @@
#endif #endif
/* This must match decoder and encoder tables */ /* This must match decoder and encoder tables */
static double picture_rates[16] = { static const double picture_rates[16] = {
0.0, 0.0,
24000.0 / 1001., 24000.0 / 1001.,
24.0, 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 #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 #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, 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, 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,}}, {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,}}, {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 }; { 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 /* deined but not used
static char mode [4][15] = static const char mode [4][15] =
{ "stereo", "joint stereo", "dual channel", "single channel" }; { "stereo", "joint stereo", "dual channel", "single channel" };
static char copyright [2][20] = static const char copyright [2][20] =
{ "no copyright","copyright protected" }; { "no copyright","copyright protected" };
static char original [2][10] = static const char original [2][10] =
{ "copy","original" }; { "copy","original" };
static char emphasis [4][20] = static const char emphasis [4][20] =
{ "none", "50/15 microseconds", "reserved", "CCITT J.17" }; { "none", "50/15 microseconds", "reserved", "CCITT J.17" };
*/ */
static void mpeg1mux_buffer_update_video_info (Mpeg1MuxBuffer * mb); static void mpeg1mux_buffer_update_video_info (Mpeg1MuxBuffer * mb);

View File

@ -40,7 +40,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
static guint32 crc_tab[256] = { static const guint32 crc_tab[256] = {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,

View File

@ -299,7 +299,7 @@ typedef struct
gboolean valid; gboolean valid;
} Patch; } Patch;
static Color patch_colors[24] = { static const Color patch_colors[24] = {
{115, 82, 68, 92, 119, 143}, {115, 82, 68, 92, 119, 143},
{194, 150, 130, 152, 115, 148}, {194, 150, 130, 152, 115, 148},
{98, 122, 157, 119, 146, 116}, {98, 122, 157, 119, 146, 116},

View File

@ -32,7 +32,7 @@
#define FILTERS_H #define FILTERS_H
///////// Filter Settings ////////// ///////// Filter Settings //////////
static long flt_set[3] = {10, 9, 10}; static const long flt_set[3] = {10, 9, 10};
static void static void
memshl (register long *pA, register long *pB) { memshl (register long *pA, register long *pB) {

View File

@ -96,7 +96,7 @@ static GType
gst_vbidec_caption_type_get_type (void) gst_vbidec_caption_type_get_type (void)
{ {
static GType vbidec_caption_type_type = 0; 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_OFF, "0", "Closed Captions off"},
{CAPTURE_CC1, "1", "Closed Caption CC1"}, {CAPTURE_CC1, "1", "Closed Caption CC1"},
{CAPTURE_CC2, "2", "Closed Caption CC2"}, {CAPTURE_CC2, "2", "Closed Caption CC2"},

View File

@ -96,21 +96,21 @@ struct vbidata_s
/* this is NOT exactly right */ /* this is NOT exactly right */
//static char ccode[] = " !\"#$%&'()\0341+,-./0123456789:;<=>?@" //static char ccode[] = " !\"#$%&'()\0341+,-./0123456789:;<=>?@"
static char ccode[] = " !\"#$%&'()a+,-./0123456789:;<=>?@" static const char ccode[] = " !\"#$%&'()a+,-./0123456789:;<=>?@"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
// "abcdefghijklmnopqrstuvwxyz" // "abcdefghijklmnopqrstuvwxyz"
// "[\0351]\0355\0363\0372abcdefghijklmnopqr" // "[\0351]\0355\0363\0372abcdefghijklmnopqr"
"[e]iouabcdefghijklmnopqr" "[e]iouabcdefghijklmnopqr"
// "stuvwxyz\0347\0367\0245\0244\0240"; // "stuvwxyz\0347\0367\0245\0244\0240";
"stuvwxyzcoNn "; "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"; "\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" "`\0241*'-\0251S*\"\"\0300\0302"
"\0307\0310\0312\0313\0353\0316\0317\0357" "\0324\0331\0371\0333\0253\0273"; "\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++++"; "{}\\^_|~\0304\0344\0326\0366\0337\0245\0244|" "\0305\0345\0330\0370++++";
int int

View File

@ -47,7 +47,7 @@ typedef struct
const gchar *description; const gchar *description;
} CamTagMessage; } CamTagMessage;
static CamTagMessage debugmessage[] = { static const CamTagMessage debugmessage[] = {
{TAG_PROFILE_ENQUIRY, "PROFILE_ENQUIRY"}, {TAG_PROFILE_ENQUIRY, "PROFILE_ENQUIRY"},
{TAG_PROFILE_REPLY, "PROFILE_REPLY"}, {TAG_PROFILE_REPLY, "PROFILE_REPLY"},
{TAG_PROFILE_CHANGE, "PROFILE_CHANGE"}, {TAG_PROFILE_CHANGE, "PROFILE_CHANGE"},

View File

@ -63,7 +63,7 @@ typedef struct
const gchar *description; const gchar *description;
} CamTagMessage; } CamTagMessage;
static CamTagMessage debugmessage[] = { static const CamTagMessage debugmessage[] = {
{TAG_SB, "SB"}, {TAG_SB, "SB"},
{TAG_RCV, "RCV"}, {TAG_RCV, "RCV"},
{TAG_CREATE_T_C, "CREATE_T_C"}, {TAG_CREATE_T_C, "CREATE_T_C"},

View File

@ -475,7 +475,7 @@ dvb_base_bin_reset (DvbBaseBin * dvbbasebin)
dvbbasebin->trycam = TRUE; dvbbasebin->trycam = TRUE;
} }
static gint16 initial_pids[] = { 0, 1, 0x10, 0x11, 0x12, 0x14, -1 }; static const gint16 initial_pids[] = { 0, 1, 0x10, 0x11, 0x12, 0x14, -1 };
static void static void
dvb_base_bin_init (DvbBaseBin * dvbbasebin) dvb_base_bin_init (DvbBaseBin * dvbbasebin)

View File

@ -257,7 +257,7 @@ static GType
gst_dvbsrc_code_rate_get_type (void) gst_dvbsrc_code_rate_get_type (void)
{ {
static GType dvbsrc_code_rate_type = 0; static GType dvbsrc_code_rate_type = 0;
static GEnumValue code_rate_types[] = { static const GEnumValue code_rate_types[] = {
{FEC_NONE, "NONE", "none"}, {FEC_NONE, "NONE", "none"},
{FEC_1_2, "1/2", "1/2"}, {FEC_1_2, "1/2", "1/2"},
{FEC_2_3, "2/3", "2/3"}, {FEC_2_3, "2/3", "2/3"},
@ -286,7 +286,7 @@ static GType
gst_dvbsrc_modulation_get_type (void) gst_dvbsrc_modulation_get_type (void)
{ {
static GType dvbsrc_modulation_type = 0; static GType dvbsrc_modulation_type = 0;
static GEnumValue modulation_types[] = { static const GEnumValue modulation_types[] = {
{QPSK, "QPSK", "qpsk"}, {QPSK, "QPSK", "qpsk"},
{QAM_16, "QAM 16", "qam-16"}, {QAM_16, "QAM 16", "qam-16"},
{QAM_32, "QAM 32", "qam-32"}, {QAM_32, "QAM 32", "qam-32"},
@ -316,7 +316,7 @@ static GType
gst_dvbsrc_transmission_mode_get_type (void) gst_dvbsrc_transmission_mode_get_type (void)
{ {
static GType dvbsrc_transmission_mode_type = 0; static GType dvbsrc_transmission_mode_type = 0;
static GEnumValue transmission_mode_types[] = { static const GEnumValue transmission_mode_types[] = {
{TRANSMISSION_MODE_2K, "2K", "2k"}, {TRANSMISSION_MODE_2K, "2K", "2k"},
{TRANSMISSION_MODE_8K, "8K", "8k"}, {TRANSMISSION_MODE_8K, "8K", "8k"},
{TRANSMISSION_MODE_AUTO, "AUTO", "auto"}, {TRANSMISSION_MODE_AUTO, "AUTO", "auto"},
@ -344,7 +344,7 @@ static GType
gst_dvbsrc_bandwidth_get_type (void) gst_dvbsrc_bandwidth_get_type (void)
{ {
static GType dvbsrc_bandwidth_type = 0; static GType dvbsrc_bandwidth_type = 0;
static GEnumValue bandwidth_types[] = { static const GEnumValue bandwidth_types[] = {
{BANDWIDTH_8_MHZ, "8", "8"}, {BANDWIDTH_8_MHZ, "8", "8"},
{BANDWIDTH_7_MHZ, "7", "7"}, {BANDWIDTH_7_MHZ, "7", "7"},
{BANDWIDTH_6_MHZ, "6", "6"}, {BANDWIDTH_6_MHZ, "6", "6"},
@ -367,7 +367,7 @@ static GType
gst_dvbsrc_guard_get_type (void) gst_dvbsrc_guard_get_type (void)
{ {
static GType dvbsrc_guard_type = 0; static GType dvbsrc_guard_type = 0;
static GEnumValue guard_types[] = { static const GEnumValue guard_types[] = {
{GUARD_INTERVAL_1_32, "32", "32"}, {GUARD_INTERVAL_1_32, "32", "32"},
{GUARD_INTERVAL_1_16, "16", "16"}, {GUARD_INTERVAL_1_16, "16", "16"},
{GUARD_INTERVAL_1_8, "8", "8"}, {GUARD_INTERVAL_1_8, "8", "8"},
@ -395,7 +395,7 @@ static GType
gst_dvbsrc_hierarchy_get_type (void) gst_dvbsrc_hierarchy_get_type (void)
{ {
static GType dvbsrc_hierarchy_type = 0; static GType dvbsrc_hierarchy_type = 0;
static GEnumValue hierarchy_types[] = { static const GEnumValue hierarchy_types[] = {
{HIERARCHY_NONE, "NONE", "none"}, {HIERARCHY_NONE, "NONE", "none"},
{HIERARCHY_1, "1", "1"}, {HIERARCHY_1, "1", "1"},
{HIERARCHY_2, "2", "2"}, {HIERARCHY_2, "2", "2"},
@ -416,7 +416,7 @@ static GType
gst_dvbsrc_inversion_get_type (void) gst_dvbsrc_inversion_get_type (void)
{ {
static GType dvbsrc_inversion_type = 0; static GType dvbsrc_inversion_type = 0;
static GEnumValue inversion_types[] = { static const GEnumValue inversion_types[] = {
{INVERSION_OFF, "OFF", "off"}, {INVERSION_OFF, "OFF", "off"},
{INVERSION_ON, "ON", "on"}, {INVERSION_ON, "ON", "on"},
{INVERSION_AUTO, "AUTO", "auto"}, {INVERSION_AUTO, "AUTO", "auto"},
@ -435,7 +435,7 @@ static GType
gst_dvbsrc_delsys_get_type (void) gst_dvbsrc_delsys_get_type (void)
{ {
static GType dvbsrc_delsys_type = 0; static GType dvbsrc_delsys_type = 0;
static GEnumValue delsys_types[] = { static const GEnumValue delsys_types[] = {
{SYS_UNDEFINED, "UNDEFINED", "undefined"}, {SYS_UNDEFINED, "UNDEFINED", "undefined"},
{SYS_DVBC_ANNEX_A, "DVB-C-A", "dvb-c-a"}, {SYS_DVBC_ANNEX_A, "DVB-C-A", "dvb-c-a"},
{SYS_DVBC_ANNEX_B, "DVB-C-B", "dvb-c-b"}, {SYS_DVBC_ANNEX_B, "DVB-C-B", "dvb-c-b"},
@ -474,7 +474,7 @@ static GType
gst_dvbsrc_pilot_get_type (void) gst_dvbsrc_pilot_get_type (void)
{ {
static GType dvbsrc_pilot_type = 0; static GType dvbsrc_pilot_type = 0;
static GEnumValue pilot_types[] = { static const GEnumValue pilot_types[] = {
{PILOT_ON, "ON", "on"}, {PILOT_ON, "ON", "on"},
{PILOT_OFF, "OFF", "off"}, {PILOT_OFF, "OFF", "off"},
{PILOT_AUTO, "AUTO", "auto"}, {PILOT_AUTO, "AUTO", "auto"},
@ -492,7 +492,7 @@ static GType
gst_dvbsrc_rolloff_get_type (void) gst_dvbsrc_rolloff_get_type (void)
{ {
static GType dvbsrc_rolloff_type = 0; static GType dvbsrc_rolloff_type = 0;
static GEnumValue rolloff_types[] = { static const GEnumValue rolloff_types[] = {
{ROLLOFF_35, "35", "35"}, {ROLLOFF_35, "35", "35"},
{ROLLOFF_20, "20", "20"}, {ROLLOFF_20, "20", "20"},
{ROLLOFF_25, "25", "25"}, {ROLLOFF_25, "25", "25"},
@ -512,7 +512,7 @@ static GType
gst_dvbsrc_interleaving_get_type (void) gst_dvbsrc_interleaving_get_type (void)
{ {
static GType dvbsrc_interleaving_type = 0; static GType dvbsrc_interleaving_type = 0;
static GEnumValue interleaving_types[] = { static const GEnumValue interleaving_types[] = {
#if HAVE_V5_MINOR(7) #if HAVE_V5_MINOR(7)
{INTERLEAVING_NONE, "NONE", "none"}, {INTERLEAVING_NONE, "NONE", "none"},
{INTERLEAVING_AUTO, "AUTO", "auto"}, {INTERLEAVING_AUTO, "AUTO", "auto"},

View File

@ -540,7 +540,7 @@ dxr3videosink_handle_event (GstPad * pad, GstEvent * event)
/* Write an MPEG2 sequence end code, to ensure that the card /* Write an MPEG2 sequence end code, to ensure that the card
actually displays the last picture. Apparently some DVDs are actually displays the last picture. Apparently some DVDs are
encoded without proper sequence end codes. */ encoded without proper sequence end codes. */
static guint8 sec[4] = { 0x00, 0x00, 0x01, 0xb7 }; static const guint8 sec[4] = { 0x00, 0x00, 0x01, 0xb7 };
if (sink->cur_buf != NULL) { if (sink->cur_buf != NULL) {
dxr3videosink_write_data (sink, 0); dxr3videosink_write_data (sink, 0);

View File

@ -318,7 +318,7 @@ gst_linsys_sdi_sink_preroll (GstBaseSink * sink, GstBuffer * buffer)
static int static int
get_av (int f, int v, int h) get_av (int f, int v, int h)
{ {
static int table[] = { static const int table[] = {
0x80, 0x9d, 0xab, 0xb6, 0xc7, 0xda, 0xec, 0xf1 0x80, 0x9d, 0xab, 0xb6, 0xc7, 0xda, 0xec, 0xf1
}; };

View File

@ -59,7 +59,7 @@ static GType
gst_autoexp_mode_get_type (void) gst_autoexp_mode_get_type (void)
{ {
static GType autoexp_mode_type = 0; static GType autoexp_mode_type = 0;
static GEnumValue autoexp_modes[] = { static const GEnumValue autoexp_modes[] = {
{AE_ALL_AVG, "0", "Average Picture"}, {AE_ALL_AVG, "0", "Average Picture"},
{AE_CTR_AVG, "1", "Average Center"}, {AE_CTR_AVG, "1", "Average Center"},
{AE_STD_AVG, "2", "Standard Deviation"}, {AE_STD_AVG, "2", "Standard Deviation"},