From: Matthew Waters Date: Mon, 7 Jan 2013 03:08:39 +0000 (+1100) Subject: [635/906] fixup compile errors X-Git-Tag: 1.19.3~511^2~1989^2~1884 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17e6d70dbaa027f1996faa6d5b136974840595f1;p=platform%2Fupstream%2Fgstreamer.git [635/906] fixup compile errors --- diff --git a/gst-libs/gst/gl/glprototypes/opengl_functions.h b/gst-libs/gst/gl/glprototypes/opengl_functions.h index e6facd8..823820b 100644 --- a/gst-libs/gst/gl/glprototypes/opengl_functions.h +++ b/gst-libs/gst/gl/glprototypes/opengl_functions.h @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include "gl-prototypes/cogl-opengl.h" -#include "gl-prototypes/cogl-gles1-opengl.h" -#include "gl-prototypes/cogl-gles1-gles2-opengl.h" -#include "gl-prototypes/cogl-gles2-opengl.h" +#include "glprototypes/opengl.h" +#include "glprototypes/gles1opengl.h" +#include "glprototypes/gles1gles2opengl.h" +#include "glprototypes/gles2opengl.h" diff --git a/gst-libs/gst/gl/gstglfeature.c b/gst-libs/gst/gl/gstglfeature.c index 8a8b858..2c924e2 100644 --- a/gst-libs/gst/gl/gstglfeature.c +++ b/gst-libs/gst/gl/gstglfeature.c @@ -59,7 +59,7 @@ gst_gl_check_extension (const char *name, const gchar * ext) min_gl_major, min_gl_minor, \ gles_availability, \ namespaces, extension_names) \ - static const GstGLFeatureFunction cogl_ext_ ## name ## _funcs_opengl[] = { + static const GstGLFeatureFunction gst_gl_ext_ ## name ## _funcs_opengl[] = { #define GST_GL_EXT_FUNCTION(ret, name, args) \ { G_STRINGIFY (name), G_STRUCT_OFFSET (GstGLFuncs, name) }, #define GST_GL_EXT_END() \ @@ -68,20 +68,20 @@ gst_gl_check_extension (const char *name, const gchar * ext) #include "glprototypes/opengl_functions.h" #undef GST_GL_EXT_BEGIN -#define GST_GL_EXT_BEGIN(name, \ +#define GST_GL_EXT_BEGIN(name, \ min_gl_major, min_gl_minor, \ gles_availability, \ namespaces, extension_names) \ { min_gl_major, min_gl_minor, gles_availability, namespaces, \ - extension_names, 0, \ - cogl_ext_ ## name ## _funcs_opengl }, + extension_names, \ + gst_gl_ext_ ## name ## _funcs_opengl }, #undef GST_GL_EXT_FUNCTION #define GST_GL_EXT_FUNCTION(ret, name, args) #undef GST_GL_EXT_END #define GST_GL_EXT_END() -static const GstGLFeatureData cogl_feature_ext_functions_data_opengl[] = { -#include "gl-prototypes/opengl_functions.h" +static const GstGLFeatureData gst_gl_feature_ext_functions_data_opengl[] = { +#include "glprototypes/opengl_functions.h" }; #endif /* HAVE_OPENGL */ @@ -90,11 +90,11 @@ static const GstGLFeatureData cogl_feature_ext_functions_data_opengl[] = { #undef GST_GL_EXT_END #if HAVE_GLES2 -#define GST_GL_EXT_BEGIN(name, \ +#define GST_GL_EXT_BEGIN(name, \ min_gl_major, min_gl_minor, \ gles_availability, \ namespaces, extension_names) \ - static const GstGLFeatureFunction cogl_ext_ ## name ## _funcs_gles2[] = { + static const GstGLFeatureFunction gst_gl_ext_ ## name ## _funcs_gles2[] = { #define GST_GL_EXT_FUNCTION(ret, name, args) \ { G_STRINGIFY (name), G_STRUCT_OFFSET (GstGLES2Funcs, name) }, #define GST_GL_EXT_END() \ @@ -108,14 +108,14 @@ static const GstGLFeatureData cogl_feature_ext_functions_data_opengl[] = { gles_availability, \ namespaces, extension_names) \ { min_gl_major, min_gl_minor, gles_availability, namespaces, \ - extension_names, 0, \ - cogl_ext_ ## name ## _funcs_gles2 }, + extension_names, \ + gst_gl_ext_ ## name ## _funcs_gles2 }, #undef GST_GL_EXT_FUNCTION #define GST_GL_EXT_FUNCTION(ret, name, args) #undef GST_GL_EXT_END #define GST_GL_EXT_END() -static const GstGLFeatureData cogl_feature_ext_functions_data_gles2[] = { +static const GstGLFeatureData gst_gl_feature_ext_functions_data_gles2[] = { #include "glprototypes/gles2_functions.h" }; #endif /* HAVE_GLES2 */ @@ -127,11 +127,26 @@ static const GstGLFeatureData cogl_feature_ext_functions_data_gles2[] = { gboolean _gst_gl_feature_check (GstGLDisplay * display, const char *driver_prefix, - const CoglFeatureData * data, + const GstGLFeatureData * data, int gl_major, int gl_minor, const char *extensions_string) { const char *suffix = NULL; int func_num; +#if HAVE_OPENGL + static const GstGLFuncs *gst_gl = NULL; +#endif +#if HAVE_GLES2 + static const GstGLES2Funcs *gst_gles2 = NULL; +#endif + +#if HAVE_OPENGL + if (!gst_gl) + gst_gl = gst_gl_get_opengl_vtable (); +#endif +#if HAVE_GLES2 + if (!gst_gles2) + gst_gles2 = gst_gl_get_gles2_vtable (); +#endif /* First check whether the functions should be directly provided by GL */ @@ -139,7 +154,7 @@ _gst_gl_feature_check (GstGLDisplay * display, GST_GL_CHECK_GL_VERSION (gl_major, gl_minor, data->min_gl_major, data->min_gl_minor)) || ((display->gl_api & GST_GL_API_GLES2) && - (data->gles_availability & COGL_EXT_IN_GLES2))) { + (data->gl_availability & GST_GL_API_GLES2))) { suffix = ""; } else { /* Otherwise try all of the extensions */ @@ -206,13 +221,13 @@ _gst_gl_feature_check (GstGLDisplay * display, /* Set the function pointer in the context */ #if HAVE_OPENGL if (display->gl_api & GST_GL_API_OPENGL) { - *(void **) ((guint8 *) & gst_gl + + *(void **) ((guint8 *) gst_gl + data->functions[func_num].pointer_offset) = func; } #endif #if HAVE_GLES2 if (display->gl_api & GST_GL_API_GLES2) { - *(void **) ((guint8 *) & gst_gles2 + + *(void **) ((guint8 *) gst_gles2 + data->functions[func_num].pointer_offset) = func; } #endif @@ -227,13 +242,13 @@ error: for (func_num = 0; data->functions[func_num].name; func_num++) { #if HAVE_OPENGL if (display->gl_api & GST_GL_API_OPENGL) { - *(void **) ((guint8 *) & gst_gl + + *(void **) ((guint8 *) gst_gl + data->functions[func_num].pointer_offset) = NULL; } #endif #if HAVE_GLES2 if (display->gl_api & GST_GL_API_GLES2) { - *(void **) ((guint8 *) & gst_gles2 + + *(void **) ((guint8 *) gst_gles2 + data->functions[func_num].pointer_offset) = NULL; } #endif @@ -250,17 +265,18 @@ _gst_gl_feature_check_ext_functions (GstGLDisplay * display, #if HAVE_OPENGL if (display->gl_api & GST_GL_API_OPENGL) { - for (i = 0; i < G_N_ELEMENTS (cogl_feature_ext_functions_data_opengl); i++) - _cogl_feature_check (display, "GL", - cogl_feature_ext_functions_data_opengl + i, gl_major, gl_minor, + for (i = 0; i < G_N_ELEMENTS (gst_gl_feature_ext_functions_data_opengl); + i++) + _gst_gl_feature_check (display, "GL", + gst_gl_feature_ext_functions_data_opengl + i, gl_major, gl_minor, gl_extensions); } #endif #if HAVE_GLES2 if (display->gl_api & GST_GL_API_GLES2) { - for (i = 0; i < G_N_ELEMENTS (cogl_feature_ext_functions_data_gles2); i++) - _cogl_feature_check (display, "GL", - cogl_feature_ext_functions_data_gles2 + i, gl_major, gl_minor, + for (i = 0; i < G_N_ELEMENTS (gst_gl_feature_ext_functions_data_gles2); i++) + _gst_gl_feature_check (display, "GL", + gst_gl_feature_ext_functions_data_gles2 + i, gl_major, gl_minor, gl_extensions); } #endif diff --git a/gst-libs/gst/gl/gstglfeature.h b/gst-libs/gst/gl/gstglfeature.h index f1a8e55..14e884c 100644 --- a/gst-libs/gst/gl/gstglfeature.h +++ b/gst-libs/gst/gl/gstglfeature.h @@ -53,7 +53,7 @@ struct _GstGLFeatureData int min_gl_major, min_gl_minor; /* Flags specifying which versions of GL the feature is available in core in */ - GstGLApi gl_availability; + GstGLAPI gl_availability; /* \0 separated list of namespaces to try. Eg "EXT\0ARB\0" */ const char *namespaces; /* \0 separated list of required extension names without the GL_EXT @@ -62,13 +62,6 @@ struct _GstGLFeatureData extension is different from the namespace, you can specify it with a ':' after the namespace */ const char *extension_names; - /* A set of feature flags to enable if the extension is available */ - GstGLFeatureFlags feature_flags; - /* A set of private feature flags to enable if the extension is - * available */ - int feature_flags_private; - /* An optional corresponding winsys feature. */ -// CoglWinsysFeature winsys_feature; /* A list of functions required for this feature. Terminated with a NULL name */ const GstGLFeatureFunction *functions;