diff options
author | Matthew Waters <matthew@centricular.com> | 2016-06-28 13:51:22 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-06-29 18:04:28 +1000 |
commit | 989200820d43c78fb179d7984827800d83787390 (patch) | |
tree | 4e26370accaa68b3e7b96610aed3b518c57766f9 /gst-libs/gst/gl/egl | |
parent | 6958b7a0147334e6d02c30f6f236fbd7e1089081 (diff) | |
download | gstreamer-plugins-bad-989200820d43c78fb179d7984827800d83787390.tar.gz |
glmemory: add the texture type to allocate to parameters
Rather than assuming something. e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
Diffstat (limited to 'gst-libs/gst/gl/egl')
-rw-r--r-- | gst-libs/gst/gl/egl/gstglmemoryegl.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c index 15008c13e..0094c34c3 100644 --- a/gst-libs/gst/gl/egl/gstglmemoryegl.c +++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c @@ -66,8 +66,8 @@ EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem) { g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), NULL); - return GST_GL_CONTEXT_EGL (_gl_mem_get_parent (mem)->mem.mem.context)-> - egl_display; + return GST_GL_CONTEXT_EGL (_gl_mem_get_parent (mem)->mem.mem. + context)->egl_display; } GstVideoGLTextureOrientation @@ -99,17 +99,6 @@ _gl_mem_destroy (GstGLMemoryEGL * mem) *) mem); } -static void -_gl_mem_init (GstGLMemoryEGL * mem, GstAllocator * allocator, - GstMemory * parent, GstGLContext * context, GstGLTextureTarget target, - GstAllocationParams * params, GstVideoInfo * info, - guint plane, GstVideoAlignment * valign, gpointer user_data, - GDestroyNotify notify) -{ - gst_gl_memory_init ((GstGLMemory *) mem, allocator, parent, - context, target, params, info, plane, valign, user_data, notify); -} - static GstGLMemoryEGL * _gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator, GstGLVideoAllocationParams * params) @@ -136,10 +125,10 @@ _gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator, mem->image = gst_egl_image_ref (params->parent.gl_handle); } - _gl_mem_init (mem, GST_ALLOCATOR_CAST (allocator), NULL, - params->parent.context, params->target, params->parent.alloc_params, - params->v_info, params->plane, params->valign, params->parent.user_data, - params->parent.notify); + gst_gl_memory_init (GST_GL_MEMORY_CAST (mem), GST_ALLOCATOR_CAST (allocator), + NULL, params->parent.context, params->target, params->tex_type, + params->parent.alloc_params, params->v_info, params->plane, + params->valign, params->parent.user_data, params->parent.notify); return mem; } |