dd657d9216e93fb75aa74fd9bab7305e33529fce
[platform/upstream/gstreamer.git] / docs / random / buffers
1 Buffer mutability properties are the most important part of gst, and
2 similarly are the most complex.
3
4 The simple case is that a buffer is created, memory allocated, data put
5 in it, and passed to the next filter.  That filter reads the data, does
6 something (like creating a new buffer and decoding into it), and
7 unreferences the buffer.  This causes the data to be freed and the buffer
8 to be destroyed.
9
10 A more complex case is when the filter modifies the data in place.  It
11 does so and simply passes on the buffer to the next element.  This is just
12 as easy to deal with.
13
14 If the second filter adds metadata to the buffer, it just has to add the
15 pointer to the list.  The next element simply traverses the list and