From 4cbddec9fe06008d61877e9864a8d724a2178eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 30 Jun 2014 19:15:01 +0200 Subject: [PATCH] eagl: Disable usage of R and RG textures on iOS They don't work currently and just render zeroes, while the fallback code path with LUM and LUM_ALPHA textures still works. https://bugzilla.gnome.org/show_bug.cgi?id=732390 --- gst-libs/gst/gl/gstglcolorconvert.c | 8 ++++++++ gst-libs/gst/gl/gstglmemory.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index e056523013..42cc95d94e 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -690,9 +690,13 @@ _YUV_to_RGB (GstGLColorConvert * convert) GstVideoFormat out_format = GST_VIDEO_INFO_FORMAT (&convert->out_info); const gchar *out_format_str = gst_video_format_to_string (out_format); gchar *pixel_order = _RGB_pixel_order ("rgba", out_format_str); +#ifdef GST_GL_HAVE_PLATFORM_EAGL + gboolean texture_rg = FALSE; +#else gboolean texture_rg = gst_gl_context_check_feature (convert->context, "GL_EXT_texture_rg") || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg"); +#endif info->out_n_textures = 1; @@ -885,9 +889,13 @@ _GRAY_to_RGB (GstGLColorConvert * convert) GstVideoFormat out_format = GST_VIDEO_INFO_FORMAT (&convert->out_info); const gchar *out_format_str = gst_video_format_to_string (out_format); gchar *pixel_order = _RGB_pixel_order ("rgba", out_format_str); +#ifdef GST_GL_HAVE_PLATFORM_EAGL + gboolean texture_rg = FALSE; +#else gboolean texture_rg = gst_gl_context_check_feature (convert->context, "GL_EXT_texture_rg") || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg"); +#endif info->in_n_textures = 1; info->out_n_textures = 1; diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index 54582552b1..94ce468f83 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -193,9 +193,13 @@ GstVideoGLTextureType gst_gl_texture_type_from_format (GstGLContext * context, GstVideoFormat v_format, guint plane) { +#ifdef GST_GL_HAVE_PLATFORM_EAGL + gboolean texture_rg = FALSE; +#else gboolean texture_rg = gst_gl_context_check_feature (context, "GL_EXT_texture_rg") || gst_gl_context_check_feature (context, "GL_ARB_texture_rg"); +#endif guint n_plane_components; switch (v_format) {