1 /* 2 * GStreamer 3 * Copyright (C) 2012 Collabora Ltd. 4 * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk> 5 * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef _GST_GL_MEMORY_EGL_H_ 24 #define _GST_GL_MEMORY_EGL_H_ 25 26 #include <gst/gl/gstglmemory.h> 27 #include <gst/gl/egl/gsteglimage.h> 28 #include <gst/gl/egl/gstgldisplay_egl.h> 29 30 G_BEGIN_DECLS 31 32 #define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type()) 33 GST_GL_API GType gst_gl_memory_egl_allocator_get_type(void); 34 35 #define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR)) 36 #define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR)) 37 #define GST_GL_MEMORY_EGL_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass)) 38 #define GST_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocator)) 39 #define GST_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass)) 40 #define GST_GL_MEMORY_EGL_ALLOCATOR_CAST(obj) ((GstGLMemoryEGLAllocator *)(obj)) 41 42 /** 43 * GstGLMemoryEGL: 44 * 45 * Private instance 46 */ 47 struct _GstGLMemoryEGL 48 { 49 /* <private> */ 50 GstGLMemory mem; 51 52 GstEGLImage *image; 53 54 gpointer _padding[GST_PADDING]; 55 }; 56 57 /** 58 * GST_GL_MEMORY_EGL_ALLOCATOR_NAME: 59 * 60 * The name of the GL Memory EGL allocator 61 */ 62 #define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL" 63 64 GST_GL_API 65 void gst_gl_memory_egl_init_once (void); 66 67 GST_GL_API 68 gboolean gst_is_gl_memory_egl (GstMemory * mem); 69 70 GST_GL_API 71 gpointer gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem); 72 73 GST_GL_API 74 gpointer gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem); 75 76 /** 77 * GstGLMemoryEGLAllocator 78 * 79 * Opaque #GstGLMemoryEGLAllocator struct 80 */ 81 struct _GstGLMemoryEGLAllocator 82 { 83 /* <private> */ 84 85 GstGLMemoryAllocator parent; 86 87 gpointer _padding[GST_PADDING]; 88 }; 89 90 /** 91 * GstGLMemoryEGLAllocatorClass: 92 * 93 * The #GstGLMemoryEGLAllocatorClass only contains private data 94 */ 95 struct _GstGLMemoryEGLAllocatorClass 96 { 97 /* <private> */ 98 GstGLMemoryAllocatorClass parent_class; 99 100 gpointer _padding[GST_PADDING]; 101 }; 102 103 G_END_DECLS 104 105 #endif /* _GST_GL_MEMORY_EGL_H_ */ 106