1 /* 2 * GStreamer 3 * Copyright (C) 2016 Igalia 4 * 5 * Authors: 6 * Víctor Manuel Jáquez Leal <vjaquez@igalia.com> 7 * Javier Martin <javiermartin@by.com.es> 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Library General Public 11 * License as published by the Free Software Foundation; either 12 * version 2 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Library General Public License for more details. 18 * 19 * You should have received a copy of the GNU Library General Public 20 * License along with this library; if not, write to the 21 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 22 * Boston, MA 02110-1301, USA. 23 * 24 */ 25 26 #ifndef __GST_KMS_BUFFER_POOL_H__ 27 #define __GST_KMS_BUFFER_POOL_H__ 28 29 #include <gst/gst.h> 30 #include <gst/video/video.h> 31 32 #include "gstkmssink.h" 33 34 G_BEGIN_DECLS 35 36 /** 37 * GST_BUFFER_POOL_OPTION_KMS_BUFFER: 38 * 39 * An option that can be activated on buffer pool to request KMS 40 * buffers. NOT IMPLEMENTED 41 */ 42 #define GST_BUFFER_POOL_OPTION_KMS_BUFFER "GstBufferPoolOptionKMSBuffer" 43 44 /** 45 * GST_BUFFER_POOL_OPTION_KMS_PRIME_EXPORT: 46 * 47 * An option that can be activated on buffer pool to request DMABuf 48 * buffers. Callers are responsible to check if this is supported. Dumb buffers 49 * will be returned if not supported. 50 */ 51 #define GST_BUFFER_POOL_OPTION_KMS_PRIME_EXPORT "GstBufferPoolOptionKMSPrimeExport" 52 53 /* video bufferpool */ 54 typedef struct _GstKMSBufferPool GstKMSBufferPool; 55 typedef struct _GstKMSBufferPoolClass GstKMSBufferPoolClass; 56 typedef struct _GstKMSBufferPoolPrivate GstKMSBufferPoolPrivate; 57 58 #define GST_TYPE_KMS_BUFFER_POOL \ 59 (gst_kms_buffer_pool_get_type()) 60 #define GST_IS_KMS_BUFFER_POOL(obj) \ 61 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_KMS_BUFFER_POOL)) 62 #define GST_KMS_BUFFER_POOL(obj) \ 63 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_KMS_BUFFER_POOL, GstKMSBufferPool)) 64 #define GST_KMS_BUFFER_POOL_CAST(obj) \ 65 ((GstKMSBufferPool*)(obj)) 66 67 struct _GstKMSBufferPool 68 { 69 GstVideoBufferPool parent; 70 GstKMSBufferPoolPrivate *priv; 71 }; 72 73 struct _GstKMSBufferPoolClass 74 { 75 GstVideoBufferPoolClass parent_class; 76 }; 77 78 GType gst_kms_buffer_pool_get_type (void) G_GNUC_CONST; 79 80 GstBufferPool *gst_kms_buffer_pool_new (void); 81 82 G_END_DECLS 83 84 #endif /* __GST_KMS_BUFFER_POOL_H__ */ 85