{
GstIOSGLMemory *mem = (GstIOSGLMemory *) gl_mem;
+ CFRelease (mem->texture);
gst_memory_unref (GST_MEMORY_CAST (mem->cv_mem));
GST_GL_BASE_MEMORY_ALLOCATOR_CLASS
(gst_ios_gl_memory_allocator_parent_class)->destroy (gl_mem);
GstVideoGLTextureType tex_type,
guint tex_id,
GstVideoInfo * info,
- guint plane,
- GstVideoAlignment * valign, gpointer user_data, GDestroyNotify notify)
+ guint plane, GstVideoAlignment * valign, CVOpenGLESTextureRef texture)
{
GstIOSGLMemory *mem;
mem->gl_mem.tex_id = tex_id;
mem->gl_mem.texture_wrapped = TRUE;
gst_gl_memory_init (&mem->gl_mem, _ios_gl_memory_allocator, NULL, context,
- target, tex_type, NULL, info, plane, valign, user_data, notify);
+ target, tex_type, NULL, info, plane, valign, NULL, NULL);
mem->cv_mem = cv_mem;
+ mem->texture = texture;
GST_MINI_OBJECT_FLAG_SET (mem, GST_MEMORY_FLAG_READONLY);
GstVideoGLTextureType tex_type,
guint tex_id,
GstVideoInfo * info,
- guint plane,
- GstVideoAlignment * valign, gpointer user_data, GDestroyNotify notify)
+ guint plane, GstVideoAlignment * valign, CVOpenGLESTextureRef texture)
{
return _ios_gl_memory_new (context, cv_mem, target, tex_type, tex_id, info,
- plane, valign, user_data, notify);
+ plane, valign, texture);
}
{
GstGLMemory gl_mem;
GstAppleCoreVideoMemory *cv_mem;
+ CVOpenGLESTextureRef texture;
} GstIOSGLMemory;
#define GST_IOS_GL_MEMORY_ALLOCATOR_NAME "IOSGLMemory"
GstVideoInfo * info,
guint plane,
GstVideoAlignment *valign,
- gpointer user_data,
- GDestroyNotify notify);
+ CVOpenGLESTextureRef texture);
gboolean gst_is_ios_gl_memory (GstMemory * mem);
gl_target, GST_VIDEO_GL_TEXTURE_TYPE_RGBA,
CVOpenGLESTextureGetName (texture),
&cache->input_info,
- 0, NULL, texture, (GDestroyNotify) CFRelease);
+ 0, NULL, texture);
break;
case GST_VIDEO_FORMAT_NV12: {
GstVideoGLTextureType textype;
memory = gst_apple_core_video_memory_new_wrapped (gpixbuf, plane, size);
gl_memory = gst_ios_gl_memory_new_wrapped (context, memory,
gl_target, textype, CVOpenGLESTextureGetName (texture), &cache->input_info,
- plane, NULL, texture, (GDestroyNotify) CFRelease);
+ plane, NULL, texture);
break;
}
default: