gstvideopool.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* GStreamer
  2. * Copyright (C) <2011> Wim Taymans <[email protected]>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  17. * Boston, MA 02110-1301, USA.
  18. */
  19. #ifndef __GST_VIDEO_POOL_H__
  20. #define __GST_VIDEO_POOL_H__
  21. #include <gst/gst.h>
  22. #include <gst/video/video.h>
  23. G_BEGIN_DECLS
  24. /**
  25. * GST_BUFFER_POOL_OPTION_VIDEO_META:
  26. *
  27. * An option that can be activated on bufferpool to request video metadata
  28. * on buffers from the pool.
  29. */
  30. #define GST_BUFFER_POOL_OPTION_VIDEO_META "GstBufferPoolOptionVideoMeta"
  31. /**
  32. * GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT:
  33. *
  34. * A bufferpool option to enable extra padding. When a bufferpool supports this
  35. * option, gst_buffer_pool_config_set_video_alignment() can be called.
  36. *
  37. * When this option is enabled on the bufferpool,
  38. * #GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled.
  39. */
  40. #define GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT "GstBufferPoolOptionVideoAlignment"
  41. /* setting a bufferpool config */
  42. void gst_buffer_pool_config_set_video_alignment (GstStructure *config, GstVideoAlignment *align);
  43. gboolean gst_buffer_pool_config_get_video_alignment (GstStructure *config, GstVideoAlignment *align);
  44. /* video bufferpool */
  45. typedef struct _GstVideoBufferPool GstVideoBufferPool;
  46. typedef struct _GstVideoBufferPoolClass GstVideoBufferPoolClass;
  47. typedef struct _GstVideoBufferPoolPrivate GstVideoBufferPoolPrivate;
  48. #define GST_TYPE_VIDEO_BUFFER_POOL (gst_video_buffer_pool_get_type())
  49. #define GST_IS_VIDEO_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_BUFFER_POOL))
  50. #define GST_VIDEO_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_BUFFER_POOL, GstVideoBufferPool))
  51. #define GST_VIDEO_BUFFER_POOL_CAST(obj) ((GstVideoBufferPool*)(obj))
  52. struct _GstVideoBufferPool
  53. {
  54. GstBufferPool bufferpool;
  55. GstVideoBufferPoolPrivate *priv;
  56. };
  57. struct _GstVideoBufferPoolClass
  58. {
  59. GstBufferPoolClass parent_class;
  60. };
  61. GType gst_video_buffer_pool_get_type (void);
  62. GstBufferPool * gst_video_buffer_pool_new (void);
  63. G_END_DECLS
  64. #endif /* __GST_VIDEO_POOL_H__ */