2 * GStreamer tizen buffer pool
3 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Author: Sejun Park <sejun79.park@samsung.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef _GST_TIZEN_BUFFERPOOL_H_
23 #define _GST_TIZEN_BUFFERPOOL_H_
26 #include <gst/video/video.h>
27 #include <gst/video/gstvideometa.h>
28 #include <gst/video/gstvideopool.h>
29 #include <gst/allocators/gsttizenmemory.h>
34 * GST_BUFFER_POOL_OPTION_TIZEN_META:
36 * An option that can be activated on bufferpool to request TizenVideo metadata
37 * on buffers from the pool.
39 #define GST_BUFFER_POOL_OPTION_TIZEN_META "GstBufferPoolOptionTizenVideoMeta"
41 typedef struct _GstTizenBufferPool GstTizenBufferPool;
42 typedef struct _GstTizenBufferPoolClass GstTizenBufferPoolClass;
43 typedef struct _GstTizenBufferPoolPrivate GstTizenBufferPoolPrivate;
45 /* buffer pool functions */
46 #define GST_TYPE_TIZEN_BUFFER_POOL (gst_tizen_buffer_pool_get_type())
47 #define GST_IS_TIZEN_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIZEN_BUFFER_POOL))
48 #define GST_TIZEN_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIZEN_BUFFER_POOL, GstTizenBufferPool))
49 #define GST_TIZEN_BUFFER_POOL_CAST(obj) ((GstTizenBufferPool*)(obj))
51 struct _GstTizenBufferPool
53 GstBufferPool bufferpool;
55 GstAllocator *allocator;
58 gboolean add_videometa;
59 gboolean add_tizenmeta;
64 gint current_buffer_index;
68 GstTizenBufferPoolPrivate *priv;
71 struct _GstTizenBufferPoolClass
73 GstBufferPoolClass parent_class;
77 GType gst_tizen_buffer_pool_get_type (void);
80 GstBufferPool *gst_tizen_buffer_pool_new (void);
85 #endif /* _GST_TIZEN_BUFFER_POOL_H_ */