Blame gst-libs/gst/gl/gstglframebuffer.h

Packit 971217
/* 
Packit 971217
 * GStreamer
Packit 971217
 * Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the
Packit 971217
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 971217
 * Boston, MA 02110-1301, USA.
Packit 971217
 */
Packit 971217
Packit 971217
#ifndef __GST_GL_FRAMEBUFFER_H__
Packit 971217
#define __GST_GL_FRAMEBUFFER_H__
Packit 971217
Packit 971217
#include <gst/gl/gstgl_fwd.h>
Packit 971217
Packit 971217
G_BEGIN_DECLS
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
GType gst_gl_framebuffer_get_type (void);
Packit 971217
Packit 971217
#define GST_TYPE_GL_FRAMEBUFFER             (gst_gl_framebuffer_get_type())
Packit 971217
#define GST_GL_FRAMEBUFFER(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FRAMEBUFFER,GstGLFramebuffer))
Packit 971217
#define GST_GL_FRAMEBUFFER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_FRAMEBUFFER,GstGLFramebufferClass))
Packit 971217
#define GST_IS_GL_FRAMEBUFFER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FRAMEBUFFER))
Packit 971217
#define GST_IS_GL_FRAMEBUFFER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_FRAMEBUFFER))
Packit 971217
#define GST_GL_FRAMEBUFFER_CAST(obj)        ((GstGLFramebuffer*)(obj))
Packit 971217
Packit 971217
typedef struct _GstGLFramebufferPrivate GstGLFramebufferPrivate;
Packit 971217
Packit 971217
/**
Packit 971217
 * GstGLFramebufferFunc:
Packit 971217
 * @stuff: user data
Packit 971217
 *
Packit 971217
 * callback definition for operating through a #GstGLFramebuffer object
Packit 971217
 */
Packit 971217
typedef gboolean (*GstGLFramebufferFunc) (gpointer stuff);
Packit 971217
Packit 971217
/**
Packit 971217
 * GstGLFramebuffer:
Packit 971217
 *
Packit 971217
 * Opaque #GstGLFramebuffer struct
Packit 971217
 */
Packit 971217
struct _GstGLFramebuffer
Packit 971217
{
Packit 971217
  /* <private> */
Packit 971217
  GstObject             object;
Packit 971217
Packit 971217
  GstGLContext *context;
Packit 971217
Packit 971217
  guint fbo_id;
Packit 971217
  GArray *attachments;
Packit 971217
Packit 971217
  gpointer          _padding[GST_PADDING];
Packit 971217
Packit 971217
  GstGLFramebufferPrivate  *priv;
Packit 971217
};
Packit 971217
Packit 971217
/**
Packit 971217
 * GstGLFramebufferClass:
Packit 971217
 *
Packit 971217
 * Opaque #GstGLFramebufferClass struct
Packit 971217
 */
Packit 971217
struct _GstGLFramebufferClass
Packit 971217
{
Packit 971217
  /* <private> */
Packit 971217
  GstObjectClass object_class;
Packit 971217
Packit 971217
  gpointer          _padding[GST_PADDING];
Packit 971217
};
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
GstGLFramebuffer *      gst_gl_framebuffer_new                      (GstGLContext *context);
Packit 971217
GST_GL_API
Packit 971217
GstGLFramebuffer *      gst_gl_framebuffer_new_with_default_depth   (GstGLContext *context,
Packit 971217
                                                                     guint width,
Packit 971217
                                                                     guint height);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
guint                   gst_gl_framebuffer_get_id                   (GstGLFramebuffer * fb);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
void                    gst_gl_framebuffer_attach                   (GstGLFramebuffer * fb,
Packit 971217
                                                                     guint attachment_point,
Packit 971217
                                                                     GstGLBaseMemory * mem);
Packit 971217
GST_GL_API
Packit 971217
void                    gst_gl_framebuffer_bind                     (GstGLFramebuffer * fb);
Packit 971217
GST_GL_API
Packit 971217
void                    gst_gl_context_clear_framebuffer            (GstGLContext * context);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
void                    gst_gl_framebuffer_get_effective_dimensions (GstGLFramebuffer * fb,
Packit 971217
                                                                     guint * width,
Packit 971217
                                                                     guint * height);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
gboolean                gst_gl_context_check_framebuffer_status     (GstGLContext * context,
Packit 971217
                                                                     guint fbo_target);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
gboolean                gst_gl_framebuffer_draw_to_texture          (GstGLFramebuffer * fb,
Packit 971217
                                                                     GstGLMemory * mem,
Packit 971217
                                                                     GstGLFramebufferFunc func,
Packit 971217
                                                                     gpointer user_data);
Packit 971217
Packit 971217
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
Packit 971217
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGLFramebuffer, gst_object_unref)
Packit 971217
#endif
Packit 971217
Packit 971217
G_END_DECLS
Packit 971217
Packit 971217
#endif