gstgluploadmeta.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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_UPLOAD_META_H__
  21. #define __GST_GL_UPLOAD_META_H__
  22. #include <gst/video/video.h>
  23. #include <gst/gstmemory.h>
  24. #include <gst/gl/gstgl_fwd.h>
  25. G_BEGIN_DECLS
  26. GType gst_gl_upload_meta_get_type (void);
  27. #define GST_TYPE_GL_UPLOAD_META (gst_gl_upload_meta_get_type())
  28. #define GST_GL_UPLOAD_META(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_UPLOAD_META,GstGLUploadMeta))
  29. #define GST_GL_UPLOAD_META_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_UPLOAD_META,GstGLUploadMetaClass))
  30. #define GST_IS_GL_UPLOAD_META(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_UPLOAD_META))
  31. #define GST_IS_GL_UPLOAD_META_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_UPLOAD_META))
  32. #define GST_GL_UPLOAD_META_CAST(obj) ((GstGLUploadMeta*)(obj))
  33. /**
  34. * GstGLUploadMeta
  35. *
  36. * Opaque #GstGLUploadMeta object
  37. */
  38. struct _GstGLUploadMeta
  39. {
  40. /* <private> */
  41. GstObject parent;
  42. GstGLContext *context;
  43. /* input data */
  44. GstVideoInfo info;
  45. /* <private> */
  46. GstGLUploadMetaPrivate *priv;
  47. gpointer _reserved[GST_PADDING];
  48. };
  49. /**
  50. * GstGLUploadMetaClass:
  51. *
  52. * The #GstGLUploadMetaClass struct only contains private data
  53. */
  54. struct _GstGLUploadMetaClass
  55. {
  56. GstObjectClass object_class;
  57. };
  58. GstGLUploadMeta * gst_gl_upload_meta_new (GstGLContext * context);
  59. void gst_gl_upload_meta_set_format (GstGLUploadMeta * upload, GstVideoInfo * info);
  60. GstVideoInfo * gst_gl_upload_meta_get_format (GstGLUploadMeta * upload);
  61. gboolean gst_gl_upload_meta_add_to_buffer (GstGLUploadMeta * upload, GstBuffer * buffer);
  62. G_END_DECLS
  63. #endif /* __GST_GL_UPLOAD_META_H__ */