-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --add-include-path="$(top_builddir)/gst-libs/gst/video/" \
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
+ --include=GstVideo-@GST_API_VERSION@ \
--libtool="${LIBTOOL}" \
--pkg gstreamer-@GST_API_VERSION@ \
+ --pkg gstreamer-video-@GST_API_VERSION@ \
--pkg-export gstreamer-allocators-@GST_API_VERSION@ \
--output $@ \
$(gir_headers) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ --includedir="$(top_builddir)/gst-libs/gst/video/" \
$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
{TBM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_ARGB, GST_VIDEO_FORMAT_SR32}
};
+/**
+ * gst_video_format_to_tbm_format: (skip)
+ * @format: a #GstVideoFormat to be converted
+ *
+ * Return: a #tbm_format which is converted from @format.
+ */
tbm_format
gst_video_format_to_tbm_format (GstVideoFormat format)
{
return g_object_new (GST_TYPE_TIZEN_ALLOCATOR, NULL);
}
+/**
+ * gst_tizen_allocator_alloc:
+ * @allocator: a #GstAllocator to use
+ * @vinfo: a #GstVideoInfo to be refered for size and type of allocated memory
+ *
+ * Returns: (transfer full) (nullable): a new #GstMemory.
+ */
GstMemory *
gst_tizen_allocator_alloc (GstAllocator * allocator, GstVideoInfo * vinfo)
{
return (GstMemory *)_tizen_video_mem_new (allocator, NULL, vinfo, NULL, NULL, NULL);
}
+/**
+ * gst_tizen_allocator_alloc_surface: (skip)
+ * @allocator: a #GstAllocator to use
+ * @vinfo: a #GstVideoInfo to be refered for memory size and type
+ * @surface: a #tbm_surface_h to be used for allocated memory
+ * @user_data: (allow-none): user data pointer
+ * @notify: (allow-none) (closure user_data): called with @user_data when the memory is freed
+ *
+ * Returns: (transfer full) (nullable): a new #GstMemory.
+ */
GstMemory *
gst_tizen_allocator_alloc_surface (GstAllocator * allocator, GstVideoInfo * vinfo,
tbm_surface_h surface, gpointer user_data, GDestroyNotify notify)
return mem;
}
+/**
+ * gst_tizen_allocator_dmabuf_import: (skip)
+ * @allocator: a #GstAllocator to use
+ * @fds: fd array to be imported to #GstTizenMemory
+ * @planes: a number of planes
+ * @offsets: offset array
+ * @vinfo: a #GstVideoInfo to be refered
+ *
+ * Returns: (transfer full) (nullable): a new #GstTizenMemory.
+ */
GstTizenMemory *
gst_tizen_allocator_dmabuf_import (GstAllocator * allocator, gint * fds, gint planes, gsize offsets[4], GstVideoInfo * vinfo)
{
gst_memory_init (mem, GST_MEMORY_FLAG_NO_SHARE, allocator, NULL,
GST_VIDEO_INFO_SIZE (vinfo), 0, 0, GST_VIDEO_INFO_SIZE (vinfo));
-
return NULL;
}
+/**
+ * gst_tizen_video_meta_map:
+ * @meta: a #GstVideoMeta
+ * @plane: a plane
+ * @info: a #GstMapInfo
+ * @data: (out): the data of @plane
+ * @stride: (out): the stride of @plane
+ * @flags: @GstMapFlags
+ *
+ * Returns: TRUE if the map operation was successful.
+ */
gboolean
-gst_tizen_video_memory_map (GstVideoMeta * meta, guint plane, GstMapInfo * info,
+gst_tizen_video_meta_map (GstVideoMeta * meta, guint plane, GstMapInfo * info,
gpointer * data, gint * stride, GstMapFlags flags)
{
int tbm_ret = TBM_SURFACE_ERROR_NONE;
return mapped;
}
+/**
+ * gst_tizen_video_meta_unmap:
+ * @meta: a #GstVideoMeta
+ * @plane: a plane
+ * @info: a #GstMapInfo
+ *
+ * Returns: TRUE if the memory was successfully unmapped.
+ */
gboolean
-gst_tizen_video_memory_unmap (GstVideoMeta * meta, guint plane, GstMapInfo * info)
+gst_tizen_video_meta_unmap (GstVideoMeta * meta, guint plane, GstMapInfo * info)
{
int tbm_ret = TBM_SURFACE_ERROR_NONE;
gboolean unmapped = FALSE;
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,
+GST_VIDEO_API
+gboolean gst_tizen_video_meta_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_VIDEO_API
+gboolean gst_tizen_video_meta_unmap (GstVideoMeta * meta, guint plane, GstMapInfo * info);
GST_ALLOCATORS_API
-tbm_format gst_video_format_to_tbm_format (GstVideoFormat format);
+tbm_format gst_video_format_to_tbm_format (GstVideoFormat format);
G_END_DECLS