mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 16:48:11 +00:00
gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
This commit is contained in:
parent
2a8784e218
commit
67fb3b12ee
6 changed files with 20 additions and 5 deletions
|
@ -62,7 +62,7 @@ gst_dmabuf_allocator_init (GstDmaBufAllocator * allocator)
|
||||||
*
|
*
|
||||||
* Return a new dmabuf allocator.
|
* Return a new dmabuf allocator.
|
||||||
*
|
*
|
||||||
* Returns: (transfer floating): a new dmabuf allocator, or NULL if the allocator
|
* Returns: (transfer full): a new dmabuf allocator, or NULL if the allocator
|
||||||
* isn't available. Use gst_object_unref() to release the allocator after
|
* isn't available. Use gst_object_unref() to release the allocator after
|
||||||
* usage
|
* usage
|
||||||
*
|
*
|
||||||
|
@ -71,9 +71,14 @@ gst_dmabuf_allocator_init (GstDmaBufAllocator * allocator)
|
||||||
GstAllocator *
|
GstAllocator *
|
||||||
gst_dmabuf_allocator_new (void)
|
gst_dmabuf_allocator_new (void)
|
||||||
{
|
{
|
||||||
|
GstAllocator *alloc;
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (dmabuf_debug, "dmabuf", 0, "dmabuf memory");
|
GST_DEBUG_CATEGORY_INIT (dmabuf_debug, "dmabuf", 0, "dmabuf memory");
|
||||||
|
|
||||||
return g_object_new (GST_TYPE_DMABUF_ALLOCATOR, NULL);
|
alloc = g_object_new (GST_TYPE_DMABUF_ALLOCATOR, NULL);
|
||||||
|
gst_object_ref_sink (alloc);
|
||||||
|
|
||||||
|
return alloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -236,7 +236,7 @@ gst_fd_allocator_init (GstFdAllocator * allocator)
|
||||||
*
|
*
|
||||||
* Return a new fd allocator.
|
* Return a new fd allocator.
|
||||||
*
|
*
|
||||||
* Returns: (transfer floating): a new fd allocator, or NULL if the allocator
|
* Returns: (transfer full): a new fd allocator, or NULL if the allocator
|
||||||
* isn't available. Use gst_object_unref() to release the allocator after
|
* isn't available. Use gst_object_unref() to release the allocator after
|
||||||
* usage
|
* usage
|
||||||
*
|
*
|
||||||
|
@ -245,7 +245,12 @@ gst_fd_allocator_init (GstFdAllocator * allocator)
|
||||||
GstAllocator *
|
GstAllocator *
|
||||||
gst_fd_allocator_new (void)
|
gst_fd_allocator_new (void)
|
||||||
{
|
{
|
||||||
return g_object_new (GST_TYPE_FD_ALLOCATOR, NULL);
|
GstAllocator *alloc;
|
||||||
|
|
||||||
|
alloc = g_object_new (GST_TYPE_FD_ALLOCATOR, NULL);
|
||||||
|
gst_object_ref_sink (alloc);
|
||||||
|
|
||||||
|
return alloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -280,7 +280,7 @@ no_memory:
|
||||||
* Create a new bufferpool that can allocate video frames. This bufferpool
|
* Create a new bufferpool that can allocate video frames. This bufferpool
|
||||||
* supports all the video bufferpool options.
|
* supports all the video bufferpool options.
|
||||||
*
|
*
|
||||||
* Returns: (transfer floating): a new #GstBufferPool to allocate video frames
|
* Returns: (transfer full): a new #GstBufferPool to allocate video frames
|
||||||
*/
|
*/
|
||||||
GstBufferPool *
|
GstBufferPool *
|
||||||
gst_video_buffer_pool_new ()
|
gst_video_buffer_pool_new ()
|
||||||
|
@ -288,6 +288,7 @@ gst_video_buffer_pool_new ()
|
||||||
GstVideoBufferPool *pool;
|
GstVideoBufferPool *pool;
|
||||||
|
|
||||||
pool = g_object_new (GST_TYPE_VIDEO_BUFFER_POOL, NULL);
|
pool = g_object_new (GST_TYPE_VIDEO_BUFFER_POOL, NULL);
|
||||||
|
gst_object_ref_sink (pool);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pool, "new video buffer pool %p", pool);
|
GST_LOG_OBJECT (pool, "new video buffer pool %p", pool);
|
||||||
|
|
||||||
|
|
|
@ -675,8 +675,10 @@ gst_ximage_buffer_pool_new (GstXImageSink * ximagesink)
|
||||||
g_return_val_if_fail (GST_IS_X_IMAGE_SINK (ximagesink), NULL);
|
g_return_val_if_fail (GST_IS_X_IMAGE_SINK (ximagesink), NULL);
|
||||||
|
|
||||||
pool = g_object_new (GST_TYPE_XIMAGE_BUFFER_POOL, NULL);
|
pool = g_object_new (GST_TYPE_XIMAGE_BUFFER_POOL, NULL);
|
||||||
|
gst_object_ref_sink (pool);
|
||||||
pool->sink = gst_object_ref (ximagesink);
|
pool->sink = gst_object_ref (ximagesink);
|
||||||
pool->allocator = g_object_new (GST_TYPE_XIMAGE_MEMORY_ALLOCATOR, NULL);
|
pool->allocator = g_object_new (GST_TYPE_XIMAGE_MEMORY_ALLOCATOR, NULL);
|
||||||
|
gst_object_ref_sink (pool->allocator);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pool, "new XImage buffer pool %p", pool);
|
GST_LOG_OBJECT (pool, "new XImage buffer pool %p", pool);
|
||||||
|
|
||||||
|
|
|
@ -328,6 +328,7 @@ gst_xvimage_allocator_new (GstXvContext * context)
|
||||||
|
|
||||||
alloc = g_object_new (GST_TYPE_XVIMAGE_ALLOCATOR, NULL);
|
alloc = g_object_new (GST_TYPE_XVIMAGE_ALLOCATOR, NULL);
|
||||||
alloc->context = gst_xvcontext_ref (context);
|
alloc->context = gst_xvcontext_ref (context);
|
||||||
|
gst_object_ref_sink (alloc);
|
||||||
|
|
||||||
return alloc;
|
return alloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,6 +209,7 @@ gst_xvimage_buffer_pool_new (GstXvImageAllocator * allocator)
|
||||||
GstXvImageBufferPool *pool;
|
GstXvImageBufferPool *pool;
|
||||||
|
|
||||||
pool = g_object_new (GST_TYPE_XVIMAGE_BUFFER_POOL, NULL);
|
pool = g_object_new (GST_TYPE_XVIMAGE_BUFFER_POOL, NULL);
|
||||||
|
gst_object_ref_sink (pool);
|
||||||
pool->allocator = gst_object_ref (allocator);
|
pool->allocator = gst_object_ref (allocator);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pool, "new XvImage buffer pool %p", pool);
|
GST_LOG_OBJECT (pool, "new XvImage buffer pool %p", pool);
|
||||||
|
|
Loading…
Reference in a new issue