Constify some static arrays everywhere
authorSebastian Dröge <sebastian@centricular.com>
Wed, 21 Jan 2015 09:17:04 +0000 (10:17 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:53 +0000 (19:31 +0000)
ext/gl/gstglfilterreflectedscreen.c
gst-libs/gst/gl/gstglupload.c

index 8188d3f..b0d5711 100644 (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,
     guint texture, gpointer stuff);
 
-static 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 GLfloat LightDif[] = { 1.0f, 1.0f, 1.0f, 1.0f }; // Diffuse Light
+static const GLfloat LightPos[] = { 4.0f, -4.0f, 6.0f, 1.0f };  // Light Position
+static const GLfloat LightAmb[] = { 4.0f, 4.0f, 4.0f, 1.0f };   // Ambient Light
+static const GLfloat LightDif[] = { 1.0f, 1.0f, 1.0f, 1.0f };   // Diffuse Light
 
 static void
 gst_gl_filter_reflected_screen_class_init (GstGLFilterReflectedScreenClass *
index 782d447..23142d5 100644 (file)
@@ -63,7 +63,7 @@ struct _GstGLUploadPrivate
 
   GstBuffer *outbuf;
 
-  UploadMethod *method;
+  const UploadMethod *method;
   gpointer method_impl;
   int method_i;
 };
@@ -169,7 +169,7 @@ _gl_memory_upload_free (gpointer impl)
   g_free (impl);
 }
 
-static UploadMethod _gl_memory_upload = {
+static const UploadMethod _gl_memory_upload = {
   "GLMemory",
   METHOD_FLAG_CAN_SHARE_CONTEXT,
   &_gl_memory_upload_new,
@@ -281,7 +281,7 @@ _egl_image_upload_free (gpointer impl)
   g_free (impl);
 }
 
-static UploadMethod _egl_image_upload = {
+static const UploadMethod _egl_image_upload = {
   "EGLImage",
   0,
   &_egl_image_upload_new,
@@ -433,7 +433,7 @@ _upload_meta_upload_free (gpointer impl)
   g_free (upload);
 }
 
-static UploadMethod _upload_meta_upload = {
+static const UploadMethod _upload_meta_upload = {
   "UploadMeta",
   METHOD_FLAG_CAN_SHARE_CONTEXT,
   &_upload_meta_upload_new,
@@ -536,7 +536,7 @@ _raw_data_upload_free (gpointer impl)
   g_free (raw);
 }
 
-static UploadMethod _raw_data_upload = {
+static const UploadMethod _raw_data_upload = {
   "Raw Data",
   0,
   &_raw_data_upload_new,
@@ -546,7 +546,7 @@ static UploadMethod _raw_data_upload = {
   &_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
   &_egl_image_upload,
 #endif