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

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