3 * Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_GL_FRAMEBUFFER_H__
22 #define __GST_GL_FRAMEBUFFER_H__
24 #include <gst/gl/gstgl_fwd.h>
29 GType gst_gl_framebuffer_get_type (void);
31 #define GST_TYPE_GL_FRAMEBUFFER (gst_gl_framebuffer_get_type())
32 #define GST_GL_FRAMEBUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FRAMEBUFFER,GstGLFramebuffer))
33 #define GST_GL_FRAMEBUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_FRAMEBUFFER,GstGLFramebufferClass))
34 #define GST_IS_GL_FRAMEBUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FRAMEBUFFER))
35 #define GST_IS_GL_FRAMEBUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_FRAMEBUFFER))
36 #define GST_GL_FRAMEBUFFER_CAST(obj) ((GstGLFramebuffer*)(obj))
38 typedef struct _GstGLFramebufferPrivate GstGLFramebufferPrivate;
41 * GstGLFramebufferFunc:
44 * callback definition for operating through a #GstGLFramebuffer object
46 typedef gboolean (*GstGLFramebufferFunc) (gpointer stuff);
51 * Opaque #GstGLFramebuffer struct
53 struct _GstGLFramebuffer
58 GstGLContext *context;
63 gpointer _padding[GST_PADDING];
65 GstGLFramebufferPrivate *priv;
69 * GstGLFramebufferClass:
71 * Opaque #GstGLFramebufferClass struct
73 struct _GstGLFramebufferClass
76 GstObjectClass object_class;
78 gpointer _padding[GST_PADDING];
82 GstGLFramebuffer * gst_gl_framebuffer_new (GstGLContext *context);
84 GstGLFramebuffer * gst_gl_framebuffer_new_with_default_depth (GstGLContext *context,
89 guint gst_gl_framebuffer_get_id (GstGLFramebuffer * fb);
92 void gst_gl_framebuffer_attach (GstGLFramebuffer * fb,
93 guint attachment_point,
94 GstGLBaseMemory * mem);
96 void gst_gl_framebuffer_bind (GstGLFramebuffer * fb);
98 void gst_gl_context_clear_framebuffer (GstGLContext * context);
101 void gst_gl_framebuffer_get_effective_dimensions (GstGLFramebuffer * fb,
106 gboolean gst_gl_context_check_framebuffer_status (GstGLContext * context,
110 gboolean gst_gl_framebuffer_draw_to_texture (GstGLFramebuffer * fb,
112 GstGLFramebufferFunc func,
115 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGLFramebuffer, gst_object_unref)