gst_buffer_take_memory -> gst_buffer_insert_memory because insert is what the
method does.
Make all methods deal with ranges so that we can replace, merge, remove and map
a certain subset of the memory in a buffer. With the new methods we can make
some code nicer and reuse more code. Being able to deal with a subset of the
buffer memory allows us to optimize more cases later (most notably RTP headers
and payload that could be in different memory objects).
Make some more convenient macros that call the more generic range methods.
Make it possible to configure a GDestroyNotify and user_data for
gst_memory_new_wrapped() this allows for more flexible wrapping of foreign
memory blocks.
In 0.10, this can be done with a one-liner by using GST_BUFFER_DATA/SIZE with
put_data. A 0.11 user has to resort to gst_buffer_map, which is less convenient
and might require a memcpy internally.
API: gst_byte_writer_put_buffer()
Add an index to gst_buffer_take_memory() so that we can also insert memory at a
certain offset. This is mostly interesting to prepend a header memory block to
the buffer.
As the headers were broken in 0.10.26 the functions weren't really
usable back then, so we should advertise them as being there only
since 0.10.27.
Spotted by Mart Raudsepp.
Adds a new function to GstByteWriter that writes
a constant value to a memory area (aka memset).
Useful for adding padding to buffers.
Also updates .def file and docs.
API: gst_byte_writer_fill()
Some gcc versions warn about bytewriter writing to memory accessed
via a const guint8 pointer, despite our explicit cast to guint8 *.
Work around that by using an intermediary variable.
Fixes#598526.