GstShmAllocator: Update gir files

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5328>
This commit is contained in:
Xavier Claessens 2023-09-18 14:38:26 -04:00 committed by GStreamer Marge Bot
parent 19832bd3b3
commit ceb686a32b
2 changed files with 53 additions and 1 deletions

View file

@ -447,7 +447,16 @@ use an alignment of 7.</doc>
<bitfield name="AllocatorFlags" glib:type-name="GstAllocatorFlags" glib:get-type="gst_allocator_flags_get_type" c:type="GstAllocatorFlags">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstallocator.h">Flags for allocators.</doc>
<member name="custom_alloc" value="16" c:identifier="GST_ALLOCATOR_FLAG_CUSTOM_ALLOC" glib:nick="custom-alloc">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstallocator.h">The allocator has a custom alloc function.</doc>
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstallocator.h">The allocator has a custom alloc function.
Only elements designed to work with this allocator should be using it,
other elements should ignore it from allocation propositions.
This implies %GST_ALLOCATOR_FLAG_NO_COPY.</doc>
</member>
<member name="no_copy" value="32" c:identifier="GST_ALLOCATOR_FLAG_NO_COPY" version="1.24" glib:nick="no-copy">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstallocator.h">When copying a #GstMemory allocated with this allocator, the copy will
instead be allocated using the default allocator. Use this when allocating a
new memory is an heavy opperation that should only be done with a
#GstBufferPool for example.</doc>
</member>
<member name="last" value="1048576" c:identifier="GST_ALLOCATOR_FLAG_LAST" glib:nick="last">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstallocator.h">first flag that can be used for custom purposes</doc>

View file

@ -14,6 +14,12 @@ and/or use gtk-doc annotations. -->
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstfdmemory.h"/>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="ALLOCATOR_SHM" value="shm" c:type="GST_ALLOCATOR_SHM" version="1.24">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h">Name of this allocator, to be used for example with gst_allocator_find() and
gst_memory_is_type().</doc>
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h"/>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="CAPS_FEATURE_MEMORY_DMABUF" value="memory:DMABuf" c:type="GST_CAPS_FEATURE_MEMORY_DMABUF" version="1.12">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstdmabuf.h">Constant that defines the caps feature name for DMA buffer sharing.
@ -436,6 +442,43 @@ The memory is only mmapped on gst_buffer_map() request.</doc>
</callback>
</field>
</record>
<class name="ShmAllocator" c:symbol-prefix="shm_allocator" c:type="GstShmAllocator" version="1.24" parent="FdAllocator" glib:type-name="GstShmAllocator" glib:get-type="gst_shm_allocator_get_type" glib:type-struct="ShmAllocatorClass">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c">This is a subclass of #GstFdAllocator that implements the
gst_allocator_alloc() method using `memfd_create()` when available, POSIX
`shm_open()` otherwise. Platforms not supporting any of those (Windows) will
always return %NULL.
Note that allocating new shared memories has a significant performance cost,
it is thus recommended to keep a pool of pre-allocated #GstMemory, using
#GstBufferPool. For that reason, this allocator has the
%GST_ALLOCATOR_FLAG_NO_COPY flag set.</doc>
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h"/>
<function name="get" c:identifier="gst_shm_allocator_get" version="1.24">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c">Get the #GstShmAllocator singleton previously registered with
gst_shm_allocator_init_once().</doc>
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h"/>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c">a #GstAllocator or %NULL if
gst_shm_allocator_init_once() has not been previously called.</doc>
<type name="Gst.Allocator" c:type="GstAllocator*"/>
</return-value>
</function>
<function name="init_once" c:identifier="gst_shm_allocator_init_once" version="1.24">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c">Register a #GstShmAllocator using gst_allocator_register() with the name
%GST_ALLOCATOR_SHM. This is no-op after the first call.</doc>
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
</class>
<record name="ShmAllocatorClass" c:type="GstShmAllocatorClass" glib:is-gtype-struct-for="ShmAllocator">
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h"/>
<field name="parent_class" version="1.24">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.h">Parent Class.</doc>
<type name="FdAllocatorClass" c:type="GstFdAllocatorClass"/>
</field>
</record>
<function name="dmabuf_memory_get_fd" c:identifier="gst_dmabuf_memory_get_fd" version="1.2">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstdmabuf.c">Return the file descriptor associated with @mem.</doc>
<source-position filename="../subprojects/gst-plugins-base/gst-libs/gst/allocators/gstdmabuf.h"/>