X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstallocator.h;h=29c1a0f09481e343e2e5689398bb27c9a5f946a9;hb=57c8e0146f0e203058c95721527cf50a1dd19f72;hp=f0e84d82bf00a96fd43a6b37b75790f8c0a4bd3c;hpb=24e1abe367c702e366198beabbe5b760a3b9c12e;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstallocator.h b/gst/gstallocator.h index f0e84d8..29c1a0f 100644 --- a/gst/gstallocator.h +++ b/gst/gstallocator.h @@ -40,6 +40,8 @@ typedef struct _GstAllocatorClass GstAllocatorClass; #define GST_ALLOCATOR_CAST(obj) ((GstAllocator *)(obj)) #define GST_TYPE_ALLOCATION_PARAMS (gst_allocation_params_get_type()) + +GST_API GType gst_allocation_params_get_type(void); typedef struct _GstAllocationParams GstAllocationParams; @@ -50,7 +52,8 @@ typedef struct _GstAllocationParams GstAllocationParams; * The default memory alignment in bytes - 1 * an alignment of 7 would be the same as what malloc() guarantees. */ -GST_EXPORT gsize gst_memory_alignment; + +GST_API gsize gst_memory_alignment; /** * GST_ALLOCATOR_SYSMEM: @@ -148,28 +151,50 @@ struct _GstAllocatorClass { gpointer _gst_reserved[GST_PADDING]; }; -GType gst_allocator_get_type(void); +GST_API +GType gst_allocator_get_type (void); /* allocators */ + +GST_API void gst_allocator_register (const gchar *name, GstAllocator *allocator); + +GST_API GstAllocator * gst_allocator_find (const gchar *name); + +GST_API void gst_allocator_set_default (GstAllocator * allocator); /* allocation parameters */ + +GST_API void gst_allocation_params_init (GstAllocationParams *params); + +GST_API GstAllocationParams * gst_allocation_params_copy (const GstAllocationParams *params) G_GNUC_MALLOC; + +GST_API void gst_allocation_params_free (GstAllocationParams *params); /* allocating memory blocks */ + +GST_API GstMemory * gst_allocator_alloc (GstAllocator * allocator, gsize size, GstAllocationParams *params); + +GST_API void gst_allocator_free (GstAllocator * allocator, GstMemory *memory); +GST_API GstMemory * gst_memory_new_wrapped (GstMemoryFlags flags, gpointer data, gsize maxsize, gsize offset, gsize size, gpointer user_data, GDestroyNotify notify); +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAllocationParams, gst_allocation_params_free) +#endif + G_END_DECLS #endif /* __GST_ALLOCATOR_H__ */