gl: silence all the compiler warnings

This commit is contained in:
Matthew Waters 2014-03-16 15:06:37 +01:00 committed by Tim-Philipp Müller
parent a884d6feee
commit e225af3e0d
39 changed files with 84 additions and 108 deletions

View file

@ -37,7 +37,7 @@ gst_gl_effects_bulge_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "bulge0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "bulge0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -37,7 +37,7 @@ gst_gl_effects_fisheye_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "fisheye0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "fisheye0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -40,7 +40,7 @@ gst_gl_effects_glow_step_one (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "glow0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "glow0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -80,7 +80,7 @@ gst_gl_effects_glow_step_two (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "glow1", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "glow1", shader);
}
if (!kernel_ready) {
@ -113,7 +113,7 @@ gst_gl_effects_glow_step_two (gint width, gint height, guint texture,
gst_gl_filter_draw_texture (filter, texture, width, height);
}
void
static void
gst_gl_effects_glow_step_three (gint width, gint height, guint texture,
gpointer data)
{
@ -127,7 +127,7 @@ gst_gl_effects_glow_step_three (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "glow2", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "glow2", shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -155,7 +155,7 @@ gst_gl_effects_glow_step_three (gint width, gint height, guint texture,
gst_gl_filter_draw_texture (filter, texture, width, height);
}
void
static void
gst_gl_effects_glow_step_four (gint width, gint height, guint texture,
gpointer data)
{
@ -169,7 +169,7 @@ gst_gl_effects_glow_step_four (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "glow3", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "glow3", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -51,7 +51,8 @@ gst_gl_effects_identity_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "identity0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "identity0",
shader);
if (shader) {
GError *error = NULL;

View file

@ -38,7 +38,7 @@ gst_gl_effects_luma_to_curve (GstGLEffects * effects,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "lumamap0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "lumamap0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -43,7 +43,7 @@ gst_gl_effects_mirror_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "mirror0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "mirror0", shader);
#if GST_GL_HAVE_GLES2
if (USING_GLES2 (context)) {

View file

@ -38,7 +38,7 @@ gst_gl_effects_rgb_to_curve (GstGLEffects * effects,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "rgbmap0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "rgbmap0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -37,7 +37,7 @@ gst_gl_effects_sin_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "sin0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "sin0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -37,7 +37,7 @@ gst_gl_effects_square_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "square0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "square0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -43,7 +43,7 @@ gst_gl_effects_squeeze_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "squeeze0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "squeeze0", shader);
#if GST_GL_HAVE_GLES2
if (USING_GLES2 (context)) {

View file

@ -37,7 +37,7 @@ gst_gl_effects_stretch_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "stretch0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "stretch0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -37,7 +37,7 @@ gst_gl_effects_tunnel_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "tunnel0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "tunnel0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -37,7 +37,7 @@ gst_gl_effects_twirl_callback (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (GST_GL_FILTER (effects)->context);
g_hash_table_insert (effects->shaderstable, "twirl0", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "twirl0", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -52,7 +52,7 @@ gst_gl_effects_xray_step_two (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray1", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray1", shader);
}
if (!kernel_ready) {
@ -99,7 +99,7 @@ gst_gl_effects_xray_step_three (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray2", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray2", shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -142,7 +142,7 @@ gst_gl_effects_xray_desaturate (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray_desat", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray_desat", shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -182,7 +182,8 @@ gst_gl_effects_xray_sobel_hconv (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray_sob_hconv", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray_sob_hconv",
shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -224,7 +225,8 @@ gst_gl_effects_xray_sobel_vconv (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray_sob_vconv", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray_sob_vconv",
shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -266,7 +268,8 @@ gst_gl_effects_xray_sobel_length (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray_sob_len", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray_sob_len",
shader);
}
if (!gst_gl_shader_compile_and_check (shader,
@ -295,7 +298,7 @@ gst_gl_effects_xray_sobel_length (gint width, gint height, guint texture,
/* end of sobel passes */
void
static void
gst_gl_effects_xray_step_five (gint width, gint height, guint texture,
gpointer data)
{
@ -309,7 +312,7 @@ gst_gl_effects_xray_step_five (gint width, gint height, guint texture,
if (!shader) {
shader = gst_gl_shader_new (context);
g_hash_table_insert (effects->shaderstable, "xray4", shader);
g_hash_table_insert (effects->shaderstable, (gchar *) "xray4", shader);
}
if (!gst_gl_shader_compile_and_check (shader,

View file

@ -56,4 +56,6 @@ struct _GstGLDifferenceMatteClass
GstGLFilterClass filter_class;
};
GType gst_gl_differencematte_get_type (void);
#endif /* _GST_GL_DIFFERENCEMATTE_H_ */

View file

@ -48,7 +48,7 @@ struct _GstGLFilterAppClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfilterapp_get_type (void);
GType gst_gl_filter_app_get_type (void);
G_END_DECLS

View file

@ -48,6 +48,6 @@ struct _GstGLFilterBlurClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfilterblur_get_type (void);
GType gst_gl_filterblur_get_type (void);
#endif /* _GST_GL_FILTERBLUR_H_ */

View file

@ -58,7 +58,7 @@ struct _GstGLFilterCubeClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfiltercube_get_type (void);
GType gst_gl_filter_cube_get_type (void);
G_END_DECLS

View file

@ -49,7 +49,7 @@ struct _GstGLFilterGlassClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfilterglass_get_type (void);
GType gst_gl_filter_glass_get_type (void);
G_END_DECLS

View file

@ -46,7 +46,7 @@ struct _GstGLFilterLaplacianClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfilterlaplacian_get_type (void);
GType gst_gl_filter_laplacian_get_type (void);
G_END_DECLS

View file

@ -334,7 +334,7 @@ gst_gl_filter_reflected_screen_draw_screen (GstGLFilter * filter,
}
static void
gst_gl_filter_reflected_screen_draw_background ()
gst_gl_filter_reflected_screen_draw_background (void)
{
glBegin (GL_QUADS);
@ -352,7 +352,7 @@ gst_gl_filter_reflected_screen_draw_background ()
}
static void
gst_gl_filter_reflected_screen_draw_floor ()
gst_gl_filter_reflected_screen_draw_floor (void)
{
GLUquadricObj *q;
//create a quadric for the floor's drawing

View file

@ -53,7 +53,7 @@ struct _GstGLFilterReflectedScreenClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfilterreflectedscreen_get_type (void);
GType gst_gl_filter_reflected_screen_get_type (void);
G_END_DECLS

View file

@ -50,6 +50,6 @@ struct _GstGLFilterShaderClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfiltershader_get_type (void);
GType gst_gl_filtershader_get_type (void);
#endif /* _GST_GL_FILTERSHADER_H_ */

View file

@ -51,6 +51,6 @@ struct _GstGLFilterSobelClass
GstGLFilterClass filter_class;
};
GType gst_gl_glfiltersobel_get_type (void);
GType gst_gl_filtersobel_get_type (void);
#endif /* _GST_GL_FILTERSOBEL_H_ */

View file

@ -75,6 +75,8 @@ struct _GstGLOverlayClass
GstGLFilterClass filter_class;
};
GType gst_gl_overlay_get_type (void);
G_END_DECLS
#endif /* _GST_GL_OVERLAY_H_ */

View file

@ -55,42 +55,23 @@
#include "gstgleffects.h"
#include "gstglcolorscale.h"
GType gst_gl_filter_cube_get_type (void);
GType gst_gl_effects_get_type (void);
#if GST_GL_HAVE_OPENGL
#include "gstgltestsrc.h"
#include "gstglfilterlaplacian.h"
#include "gstglfilterglass.h"
#include "gstglfilterapp.h"
#include "gstglfilterblur.h"
#include "gstglfilterreflectedscreen.h"
#include "gstglfiltershader.h"
#include "gstglfiltersobel.h"
#include "gstgldeinterlace.h"
#include "gstglmosaic.h"
#include "gstglvideomixer.h"
GType gst_gl_deinterlace_get_type (void);
GType gst_gl_filter_app_get_type (void);
GType gst_gl_filter_reflected_screen_get_type (void);
GType gst_gl_filterblur_get_type (void);
GType gst_gl_filtershader_get_type (void);
GType gst_gl_filtersobel_get_type (void);
GType gst_gl_filter_laplacian_get_type (void);
GType gst_gl_filter_glass_get_type (void);
GType gst_gl_mosaic_get_type (void);
#if HAVE_PNG
#include "gstgldifferencematte.h"
#include "gstglbumper.h"
GType gst_gl_differencematte_get_type (void);
GType gst_gl_bumper_get_type (void);
#if HAVE_JPEG
#include "gstgloverlay.h"
GType gst_gl_overlay_get_type (void);
#endif /* HAVE_JPEG */
#endif /* HAVE_PNG */
#endif /* GST_GL_HAVE_OPENGL */

View file

@ -78,7 +78,7 @@ gst_gl_api_to_string (GstGLAPI api)
out:
if (!str)
return "unknown";
str = g_string_new ("unknown");
ret = g_string_free (str, FALSE);
return ret;
@ -168,7 +168,7 @@ gst_gl_platform_to_string (GstGLPlatform platform)
out:
if (!str)
return "unknown";
str = g_string_new ("unknown");
ret = g_string_free (str, FALSE);
return ret;

View file

@ -585,7 +585,7 @@ _create_context_gles2 (GstGLContext * context, gint * gl_major, gint * gl_minor,
return TRUE;
}
gboolean
static gboolean
_create_context_opengl (GstGLContext * context, gint * gl_major,
gint * gl_minor, GError ** error)
{
@ -631,7 +631,7 @@ _create_context_opengl (GstGLContext * context, gint * gl_major,
return TRUE;
}
GstGLAPI
static GstGLAPI
_compiled_api (void)
{
GstGLAPI ret = GST_GL_API_NONE;
@ -999,13 +999,3 @@ static void
gst_gl_wrapped_context_init (GstGLWrappedContext * context)
{
}
/* Must be called in the gl thread */
GstGLWrappedContext *
gst_gl_wrapped_context_new (void)
{
GstGLWrappedContext *context =
g_object_new (GST_GL_TYPE_WRAPPED_CONTEXT, NULL);
return context;
}

View file

@ -86,7 +86,7 @@ static const GstGLFeatureData gst_gl_feature_ext_functions_data[] = {
#undef GST_GL_EXT_FUNCTION
#undef GST_GL_EXT_END
gboolean
static gboolean
_gst_gl_feature_check_for_extension (const GstGLFeatureData * data,
const char *driver_prefix, const char *extensions_string,
const char **suffix)

View file

@ -112,7 +112,7 @@ _gl_mem_new (GstAllocator * allocator, GstMemory * parent,
return mem;
}
gpointer
static gpointer
_gl_mem_map (GstGLMemory * gl_mem, gsize maxsize, GstMapFlags flags)
{
gpointer data;
@ -182,7 +182,7 @@ error:
}
}
void
static void
_gl_mem_unmap (GstGLMemory * gl_mem)
{
if ((gl_mem->map_flags & GST_MAP_WRITE) == GST_MAP_WRITE) {
@ -196,7 +196,7 @@ _gl_mem_unmap (GstGLMemory * gl_mem)
gl_mem->map_flags = 0;
}
void
static void
_gl_mem_copy_thread (GstGLContext * context, gpointer data)
{
GstGLMemoryCopyParams *copy_params;
@ -303,7 +303,7 @@ error:
}
}
GstMemory *
static GstMemory *
_gl_mem_copy (GstGLMemory * src, gssize offset, gssize size)
{
GstGLMemory *dest;
@ -344,19 +344,19 @@ _gl_mem_copy (GstGLMemory * src, gssize offset, gssize size)
return (GstMemory *) dest;
}
GstMemory *
static GstMemory *
_gl_mem_share (GstGLMemory * mem, gssize offset, gssize size)
{
return NULL;
}
gboolean
static gboolean
_gl_mem_is_span (GstGLMemory * mem1, GstGLMemory * mem2, gsize * offset)
{
return FALSE;
}
GstMemory *
static GstMemory *
_gl_mem_alloc (GstAllocator * allocator, gsize size,
GstAllocationParams * params)
{
@ -366,7 +366,7 @@ _gl_mem_alloc (GstAllocator * allocator, gsize size,
return NULL;
}
void
static void
_gl_mem_free (GstAllocator * allocator, GstMemory * mem)
{
GstGLMemory *gl_mem = (GstGLMemory *) mem;

View file

@ -46,9 +46,6 @@ GST_DEBUG_CATEGORY (gst_gl_mixer_debug);
#define GST_GL_MIXER_UNLOCK(mix) \
(g_mutex_unlock(&GST_GL_MIXER_GET_LOCK (mix)))
static void gst_gl_mixer_pad_class_init (GstGLMixerPadClass * klass);
static void gst_gl_mixer_pad_init (GstGLMixerPad * mixerpad);
static void gst_gl_mixer_pad_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void gst_gl_mixer_pad_set_property (GObject * object, guint prop_id,
@ -540,8 +537,6 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
"RGBA"))
);
static void gst_gl_mixer_finalize (GObject * object);
static gboolean gst_gl_mixer_src_query (GstPad * pad, GstObject * object,
GstQuery * query);
static gboolean gst_gl_mixer_src_activate_mode (GstPad * pad,

View file

@ -294,7 +294,7 @@ gst_gl_shader_init (GstGLShader * self)
priv->active = FALSE; /* unused at the moment */
}
gboolean
static gboolean
_fill_vtable (GstGLShader * shader, GstGLContext * context)
{
GstGLFuncs *gl = context->gl_vtable;

View file

@ -39,7 +39,7 @@
while(end>=s && strchr(chars,end[0])) (end--)[0]=0; \
}
char *gst_gl_shadervariable_datatype[] = {
const char *gst_gl_shadervariable_datatype[] = {
"bool",
"int",
"uint",

View file

@ -861,7 +861,7 @@ gst_gl_upload_perform_with_gl_texture_upload_meta (GstGLUpload * upload,
return ret;
}
gboolean
static gboolean
_gst_gl_upload_perform_for_gl_texture_upload_meta (GstVideoGLTextureUploadMeta *
meta, guint texture_id[4])
{

View file

@ -130,7 +130,7 @@ gst_gl_context_gen_texture (GstGLContext * context, GLuint * pTexture,
*pTexture = data.result;
}
void
static void
_del_texture (GstGLContext * context, guint * texture)
{
context->gl_vtable->DeleteTextures (1, texture);

View file

@ -44,6 +44,8 @@ G_DEFINE_TYPE (GstGLWindowX11, gst_gl_window_x11, GST_GL_TYPE_WINDOW);
static int TrappedErrorCode = 0;
static int (*old_error_handler) (Display *, XErrorEvent *);
gboolean gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11);
enum
{
ARG_0,
@ -464,7 +466,7 @@ gst_gl_window_x11_run (GstGLWindow * window)
g_main_loop_run (window_x11->loop);
}
static inline gchar *
static inline const gchar *
event_type_to_string (guint type)
{
switch (type) {

View file

@ -53,13 +53,13 @@ static const gchar *fragment_shader_str_gles2 =
static GstGLDisplay *display;
void
static void
setup (void)
{
display = gst_gl_display_new ();
}
void
static void
teardown (void)
{
gst_object_unref (display);
@ -74,7 +74,7 @@ static GLint shader_attr_position_loc;
static GLint shader_attr_texture_loc;
#endif
void
static void
init (gpointer data)
{
GstGLContext *context = data;
@ -109,7 +109,7 @@ init (gpointer data)
#endif
}
void
static void
deinit (gpointer data)
{
GstGLContext *context = data;
@ -122,7 +122,7 @@ deinit (gpointer data)
#endif
}
void
static void
clear_tex (gpointer data)
{
GstGLContext *context = data;
@ -137,14 +137,14 @@ clear_tex (gpointer data)
b = b > 1.0 ? 0.0 : b + 0.015;
}
void
static void
draw_tex (gpointer data)
{
gst_gl_framebuffer_use_v2 (fbo, 320, 240, fbo_id, rbo, tex,
(GLCB_V2) clear_tex, data);
}
void
static void
draw_render (gpointer data)
{
GstGLContext *context = data;
@ -343,8 +343,8 @@ GST_START_TEST (test_wrapped_context)
GST_END_TEST;
Suite *
gst_gl_memory_suite (void)
static Suite *
gst_gl_context_suite (void)
{
Suite *s = suite_create ("GstGLContext");
TCase *tc_chain = tcase_create ("general");
@ -357,4 +357,4 @@ gst_gl_memory_suite (void)
return s;
}
GST_CHECK_MAIN (gst_gl_memory);
GST_CHECK_MAIN (gst_gl_context);

View file

@ -33,7 +33,7 @@
static GstGLDisplay *display;
static GstGLContext *context;
void
static void
setup (void)
{
display = gst_gl_display_new ();
@ -42,7 +42,7 @@ setup (void)
gst_gl_memory_init ();
}
void
static void
teardown (void)
{
gst_object_unref (display);
@ -115,7 +115,7 @@ GST_START_TEST (test_basic)
GST_END_TEST;
Suite *
static Suite *
gst_gl_memory_suite (void)
{
Suite *s = suite_create ("GstGLMemory");

View file

@ -85,7 +85,7 @@ static gchar rgba_data[] =
RED, GREEN, BLUE, RED, GREEN, BLUE, RED, GREEN, BLUE, RED
};
void
static void
setup (void)
{
GError *error = NULL;
@ -102,7 +102,7 @@ setup (void)
upload = gst_gl_upload_new (context);
}
void
static void
teardown (void)
{
GLuint error = context->gl_vtable->GetError ();
@ -115,7 +115,7 @@ teardown (void)
gst_object_unref (display);
}
void
static void
init (gpointer data)
{
#if GST_GL_HAVE_GLES2
@ -139,7 +139,7 @@ init (gpointer data)
#endif
}
void
static void
draw_render (gpointer data)
{
GstGLContext *context = data;
@ -403,7 +403,7 @@ GST_START_TEST (test_upload_meta_producer)
GST_END_TEST;
Suite *
static Suite *
gst_gl_upload_suite (void)
{
Suite *s = suite_create ("GstGLUpload");