#define __GST_TIZEN_MEMORY_H__
#include <gst/gst.h>
+#include <gst/allocators/allocators-prelude.h>
#include <gst/video/video.h>
#include <gst/video/gstvideometa.h>
-#include <gst/gstallocator.h>
+//#include <gst/gstallocator.h>
#include <gst/gstmemory.h>
#include <tbm_bufmgr.h>
#include <tbm_surface.h>
typedef struct _GstTizenMemory GstTizenMemory;
#define GST_TYPE_TIZEN_ALLOCATOR (gst_tizen_allocator_get_type())
+
+GST_ALLOCATORS_API
GType gst_tizen_allocator_get_type(void);
#define GST_IS_TIZEN_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIZEN_ALLOCATOR))
GstAllocatorClass parent_class;
};
-
+GST_ALLOCATORS_API
GstAllocator * gst_tizen_allocator_new (void);
+GST_ALLOCATORS_API
GstMemory * gst_tizen_allocator_alloc (GstAllocator * allocator, GstVideoInfo * vinfo);
+GST_ALLOCATORS_API
GstMemory * gst_tizen_allocator_alloc_surface (GstAllocator * allocator, GstVideoInfo * vinfo,
tbm_surface_h surface, gpointer user_data, GDestroyNotify notify);
+GST_ALLOCATORS_API
gboolean gst_is_tizen_memory (GstMemory *mem);
+GST_ALLOCATORS_API
gint gst_tizen_memory_get_num_bos (GstMemory *mem);
+GST_ALLOCATORS_API
void * gst_tizen_memory_get_bos (GstMemory *mem, gint index);
+GST_ALLOCATORS_API
void * gst_tizen_memory_get_surface (GstMemory *mem);
+GST_ALLOCATORS_API
GstMemory * gst_tizen_allocator_dmabuf_export (GstAllocator * allocator, GstMemory *tmem, int bo_idx);
+
+GST_ALLOCATORS_API
GstTizenMemory *gst_tizen_allocator_dmabuf_import (GstAllocator * allocator, gint * fds, gint planes, gsize offsets[4], GstVideoInfo * vinfo);
+GST_ALLOCATORS_API
gboolean gst_tizen_video_memory_map (GstVideoMeta * meta, guint plane, GstMapInfo * info,
gpointer * data, gint * stride, GstMapFlags flags);
+GST_ALLOCATORS_API
gboolean gst_tizen_video_memory_unmap (GstVideoMeta * meta, guint plane, GstMapInfo * info);
+GST_ALLOCATORS_API
tbm_format gst_video_format_to_tbm_format (GstVideoFormat format);
G_END_DECLS