gstglframebuffer.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * GStreamer
  3. * Copyright (C) 2013 Matthew Waters <[email protected]>
  4. *
  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.
  9. *
  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.
  14. *
  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.
  19. */
  20. #ifndef __GST_GL_FRAMEBUFFER_H__
  21. #define __GST_GL_FRAMEBUFFER_H__
  22. #include <gst/gl/gstgl_fwd.h>
  23. G_BEGIN_DECLS
  24. GType gst_gl_framebuffer_get_type (void);
  25. #define GST_TYPE_GL_FRAMEBUFFER (gst_gl_framebuffer_get_type())
  26. #define GST_GL_FRAMEBUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FRAMEBUFFER,GstGLFramebuffer))
  27. #define GST_GL_FRAMEBUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_FRAMEBUFFER,GstGLFramebufferClass))
  28. #define GST_IS_GL_FRAMEBUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_FRAMEBUFFER))
  29. #define GST_IS_GL_FRAMEBUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_FRAMEBUFFER))
  30. #define GST_GL_FRAMEBUFFER_CAST(obj) ((GstGLFramebuffer*)(obj))
  31. typedef struct _GstGLFramebuffer GstGLFramebuffer;
  32. typedef struct _GstGLFramebufferClass GstGLFramebufferClass;
  33. typedef struct _GstGLFramebufferPrivate GstGLFramebufferPrivate;
  34. struct _GstGLFramebuffer
  35. {
  36. GObject object;
  37. /* <private> */
  38. GstGLContext *context;
  39. GstGLFramebufferPrivate *priv;
  40. };
  41. struct _GstGLFramebufferClass
  42. {
  43. GObjectClass object_class;
  44. };
  45. GstGLFramebuffer *gst_gl_framebuffer_new (GstGLContext *context);
  46. gboolean gst_gl_framebuffer_generate (GstGLFramebuffer *frame, gint width, gint height,
  47. guint * fbo, guint * depthbuffer);
  48. gboolean gst_gl_framebuffer_use (GstGLFramebuffer * frame, gint texture_fbo_width,
  49. gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
  50. GLuint texture_fbo, GLCB cb, gint input_tex_width,
  51. gint input_tex_height, GLuint input_tex, gdouble proj_param1,
  52. gdouble proj_param2, gdouble proj_param3, gdouble proj_param4,
  53. GstGLDisplayProjection projection, gpointer stuff);
  54. gboolean gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width,
  55. gint texture_fbo_height, GLuint fbo, GLuint depth_buffer,
  56. GLuint texture_fbo, GLCB_V2 cb, gpointer stuff);
  57. void gst_gl_framebuffer_delete (GstGLFramebuffer *frame, guint fbo, guint depth);
  58. G_END_DECLS
  59. #endif