gstgldownload.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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_DOWNLOAD_H__
  21. #define __GST_GL_DOWNLOAD_H__
  22. #include <gst/video/video.h>
  23. #include <gst/gstmemory.h>
  24. #include <gst/gl/gl.h>
  25. G_BEGIN_DECLS
  26. GType gst_gl_download_get_type (void);
  27. #define GST_TYPE_GL_DOWNLOAD (gst_gl_download_get_type())
  28. #define GST_GL_DOWNLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DOWNLOAD,GstGLDownload))
  29. #define GST_GL_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLDownloadClass))
  30. #define GST_IS_GL_DOWNLOAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DOWNLOAD))
  31. #define GST_IS_GL_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_DOWNLOAD))
  32. #define GST_GL_DOWNLOAD_CAST(obj) ((GstGLDownload*)(obj))
  33. /**
  34. * GstGLDownload:
  35. *
  36. * Opaque #GstGLDownload object
  37. */
  38. struct _GstGLDownload
  39. {
  40. /* <private> */
  41. GstObject parent;
  42. GstGLContext *context;
  43. GstGLColorConvert *convert;
  44. /* output data */
  45. GstVideoInfo info;
  46. gboolean initted;
  47. GstGLDownloadPrivate *priv;
  48. gpointer _reserved[GST_PADDING];
  49. };
  50. /**
  51. * GstGLDownloadClass:
  52. *
  53. * The #GstGLDownloadClass struct only contains private data
  54. */
  55. struct _GstGLDownloadClass
  56. {
  57. /* <private> */
  58. GstObjectClass object_class;
  59. };
  60. GstGLDownload * gst_gl_download_new (GstGLContext * context);
  61. void gst_gl_download_set_format (GstGLDownload * download, GstVideoInfo * out_info);
  62. gboolean gst_gl_download_perform_with_data (GstGLDownload * download, GLuint texture_id,
  63. gpointer data[GST_VIDEO_MAX_PLANES]);
  64. G_END_DECLS
  65. #endif /* __GST_GL_DOWNLOAD_H__ */