[tizenmemory] Fix build warning 62/226762/1 accepted/tizen/unified/20200323.173033 submit/tizen/20200320.023549
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 5 Mar 2020 07:16:55 +0000 (16:16 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 5 Mar 2020 07:20:01 +0000 (16:20 +0900)
- Add annotations for gobject instrospection
- Update Makefile.am to refer GstVideo-1.0.gir

[Version] 1.16.2-3
[Profile] Common
[Issue Type] Update

Change-Id: Ib685fd17f5503442501b42d848fd384fe97f0ed9
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
gst-libs/gst/allocators/Makefile.am
gst-libs/gst/allocators/gsttizenbufferpool.c
gst-libs/gst/allocators/gsttizenmemory.c
gst-libs/gst/allocators/gsttizenmemory.h
packaging/gst-plugins-base.spec

index c996e6a..1453339 100755 (executable)
@@ -58,10 +58,14 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
                -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) \
@@ -82,6 +86,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
                --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)
index d643425..3212c2d 100644 (file)
@@ -178,8 +178,8 @@ gst_tizen_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
         GST_VIDEO_INFO_HEIGHT (info),
         GST_VIDEO_INFO_N_PLANES (info), offsets, info->stride);
 
-    vmeta->map = gst_tizen_video_memory_map;
-    vmeta->unmap = gst_tizen_video_memory_unmap;
+    vmeta->map = gst_tizen_video_meta_map;
+    vmeta->unmap = gst_tizen_video_meta_unmap;
   }
 
   gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (buf),
index 0e18a07..efbb62a 100644 (file)
@@ -54,6 +54,12 @@ GstTizenBufferFormats yuv_formats[] = {
     {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)
 {
@@ -290,6 +296,13 @@ gst_tizen_allocator_new (void)
   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)
 {
@@ -298,6 +311,16 @@ 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)
@@ -399,6 +422,16 @@ gst_tizen_allocator_dmabuf_export (GstAllocator * allocator, GstMemory * _tmem,
   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)
 {
@@ -412,12 +445,22 @@ gst_tizen_allocator_dmabuf_import (GstAllocator * allocator, gint * fds, gint pl
   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;
@@ -477,8 +520,16 @@ _VIDEO_MEMORY_MAP_DONE:
   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;
index 5827ddc..fc4449c 100644 (file)
@@ -121,15 +121,15 @@ GstMemory *     gst_tizen_allocator_dmabuf_export (GstAllocator * allocator, Gst
 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
 
index 5495060..bf5d058 100644 (file)
@@ -5,7 +5,7 @@
 
 Name:           gst-plugins-base
 Version:        1.16.2
-Release:        2
+Release:        3
 License:        LGPL-2.0+
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 Url:            http://gstreamer.freedesktop.org/