gstglbufferpool.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * GStreamer
  3. * Copyright (C) 2012 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_BUFFER_POOL_H_
  21. #define _GST_GL_BUFFER_POOL_H_
  22. #include <gst/video/video.h>
  23. #include <gst/video/gstvideometa.h>
  24. #include <gst/video/gstvideopool.h>
  25. #include <gst/gl/gstgl_fwd.h>
  26. G_BEGIN_DECLS
  27. typedef struct _GstGLBufferPool GstGLBufferPool;
  28. typedef struct _GstGLBufferPoolClass GstGLBufferPoolClass;
  29. typedef struct _GstGLBufferPoolPrivate GstGLBufferPoolPrivate;
  30. /* buffer pool functions */
  31. GType gst_gl_buffer_pool_get_type (void);
  32. #define GST_TYPE_GL_BUFFER_POOL (gst_gl_buffer_pool_get_type())
  33. #define GST_IS_GL_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_BUFFER_POOL))
  34. #define GST_GL_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_BUFFER_POOL, GstGLBufferPool))
  35. #define GST_GL_BUFFER_POOL_CAST(obj) ((GstGLBufferPool*)(obj))
  36. /**
  37. * GstGLBufferPool:
  38. *
  39. * Opaque GstGLBufferPool struct
  40. */
  41. struct _GstGLBufferPool
  42. {
  43. GstBufferPool bufferpool;
  44. GstGLContext *context;
  45. GstGLUploadMeta *upload;
  46. GstGLBufferPoolPrivate *priv;
  47. };
  48. /**
  49. * GstGLBufferPoolClass:
  50. *
  51. * The #GstGLBufferPoolClass structure contains only private data
  52. */
  53. struct _GstGLBufferPoolClass
  54. {
  55. GstBufferPoolClass parent_class;
  56. };
  57. GstBufferPool *gst_gl_buffer_pool_new (GstGLContext * context);
  58. void gst_gl_buffer_pool_replace_last_buffer (GstGLBufferPool * pool,
  59. GstBuffer * buffer);
  60. G_END_DECLS
  61. #endif /* _GST_GL_BUFFER_POOL_H_ */