| 1 | /* GStreamer | 
| 2 |  * Copyright (C) <2011> Wim Taymans <wim.taymans@gmail.com> | 
| 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 |  | 
| 20 | #ifndef __GST_VIDEO_POOL_H__ | 
| 21 | #define __GST_VIDEO_POOL_H__ | 
| 22 |  | 
| 23 | #include <gst/gst.h> | 
| 24 |  | 
| 25 | #include <gst/video/video.h> | 
| 26 |  | 
| 27 | G_BEGIN_DECLS | 
| 28 |  | 
| 29 | /** | 
| 30 |  * GST_BUFFER_POOL_OPTION_VIDEO_META: | 
| 31 |  * | 
| 32 |  * An option that can be activated on bufferpool to request video metadata | 
| 33 |  * on buffers from the pool. | 
| 34 |  */ | 
| 35 | #define GST_BUFFER_POOL_OPTION_VIDEO_META "GstBufferPoolOptionVideoMeta" | 
| 36 |  | 
| 37 | /** | 
| 38 |  * GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT: | 
| 39 |  * | 
| 40 |  * A bufferpool option to enable extra padding. When a bufferpool supports this | 
| 41 |  * option, gst_buffer_pool_config_set_video_alignment() can be called. | 
| 42 |  * | 
| 43 |  * When this option is enabled on the bufferpool, | 
| 44 |  * #GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled. | 
| 45 |  */ | 
| 46 | #define GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT "GstBufferPoolOptionVideoAlignment" | 
| 47 |  | 
| 48 | /* setting a bufferpool config */ | 
| 49 |  | 
| 50 | GST_VIDEO_API | 
| 51 | void             gst_buffer_pool_config_set_video_alignment  (GstStructure *config, const GstVideoAlignment *align); | 
| 52 |  | 
| 53 | GST_VIDEO_API | 
| 54 | gboolean         gst_buffer_pool_config_get_video_alignment  (GstStructure *config, GstVideoAlignment *align); | 
| 55 |  | 
| 56 | /* video bufferpool */ | 
| 57 | typedef struct _GstVideoBufferPool GstVideoBufferPool; | 
| 58 | typedef struct _GstVideoBufferPoolClass GstVideoBufferPoolClass; | 
| 59 | typedef struct _GstVideoBufferPoolPrivate GstVideoBufferPoolPrivate; | 
| 60 |  | 
| 61 | #define GST_TYPE_VIDEO_BUFFER_POOL      (gst_video_buffer_pool_get_type()) | 
| 62 | #define GST_IS_VIDEO_BUFFER_POOL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_BUFFER_POOL)) | 
| 63 | #define GST_VIDEO_BUFFER_POOL(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_BUFFER_POOL, GstVideoBufferPool)) | 
| 64 | #define GST_VIDEO_BUFFER_POOL_CAST(obj) ((GstVideoBufferPool*)(obj)) | 
| 65 |  | 
| 66 | struct _GstVideoBufferPool | 
| 67 | { | 
| 68 |   GstBufferPool bufferpool; | 
| 69 |  | 
| 70 |   GstVideoBufferPoolPrivate *priv; | 
| 71 | }; | 
| 72 |  | 
| 73 | struct _GstVideoBufferPoolClass | 
| 74 | { | 
| 75 |   GstBufferPoolClass parent_class; | 
| 76 | }; | 
| 77 |  | 
| 78 | GST_VIDEO_API | 
| 79 | GType             gst_video_buffer_pool_get_type      (void); | 
| 80 |  | 
| 81 | GST_VIDEO_API | 
| 82 | GstBufferPool *   gst_video_buffer_pool_new           (void); | 
| 83 |  | 
| 84 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoBufferPool, gst_object_unref) | 
| 85 |  | 
| 86 | G_END_DECLS | 
| 87 |  | 
| 88 | #endif /* __GST_VIDEO_POOL_H__ */ | 
| 89 |  |