mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
pwg: improve allocation docs
This commit is contained in:
parent
b48400b7a4
commit
25fc832d49
1 changed files with 18 additions and 13 deletions
|
@ -41,12 +41,22 @@
|
||||||
never be changed after the object is created, however, the offset
|
never be changed after the object is created, however, the offset
|
||||||
and size can be changed.
|
and size can be changed.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<sect2 id="section-allocation-allocator" xreflabel="GstAllocator">
|
||||||
<classname>GstMemory</classname> objects are created by a
|
<title>GstAllocator</title>
|
||||||
<classname>GstAllocator</classname> object. To implement support
|
<para>
|
||||||
for a new kind of memory type, you must implement a new allocator
|
<classname>GstMemory</classname> objects are created by a
|
||||||
object.
|
<classname>GstAllocator</classname> object. Most allocators implement the
|
||||||
</para>
|
default <function>gst_allocator_alloc()</function> method but some allocator
|
||||||
|
might implement a different method, for example when additional parameters
|
||||||
|
are needed to allocate the specific memory.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Different allocators exist for, for example, system memory, shared memory
|
||||||
|
and memory backed by a DMAbuf file descriptor. To implement support for a
|
||||||
|
new kind of memory type, you must implement a new allocator object as shown
|
||||||
|
below.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
<sect2 id="section-allocation-memory-ex" xreflabel="GstMemory-ex">
|
<sect2 id="section-allocation-memory-ex" xreflabel="GstMemory-ex">
|
||||||
<title>GstMemory API example</title>
|
<title>GstMemory API example</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -88,7 +98,7 @@
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="section-allocation-allocator" xreflabel="GstAllocator">
|
<sect2 id="section-allocation-allocator-ex" xreflabel="GstAllocator-ex">
|
||||||
<title>Implementing a GstAllocator</title>
|
<title>Implementing a GstAllocator</title>
|
||||||
<para>
|
<para>
|
||||||
WRITEME
|
WRITEME
|
||||||
|
@ -209,14 +219,9 @@
|
||||||
<title>GstMeta</title>
|
<title>GstMeta</title>
|
||||||
<para>
|
<para>
|
||||||
With the <classname>GstMeta</classname> system you can add arbitrary
|
With the <classname>GstMeta</classname> system you can add arbitrary
|
||||||
structures of on buffers. These structures describe extra properties
|
structures on buffers. These structures describe extra properties
|
||||||
of the buffer such as cropping, stride, region of interest etc.
|
of the buffer such as cropping, stride, region of interest etc.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
Metadata is also used to store, for example, the X image that is
|
|
||||||
backing up the memory of the buffer. This makes it easier for elements
|
|
||||||
to locate the X image from the buffer.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
The metadata system separates API specification (what the metadata
|
The metadata system separates API specification (what the metadata
|
||||||
and its API look like) and the implementation (how it works). This makes
|
and its API look like) and the implementation (how it works). This makes
|
||||||
|
|
Loading…
Reference in a new issue