Gets the first @size bytes stored in the @adapter. The returned pointer is
valid until the next function is called on the adapter.
Note that setting the returned pointer as the data of a #GstBuffer is
incorrect for general-purpose plugins. The reason is that if a downstream
element stores the buffer so that it has access to it outside of the bounds
of its chain function, the buffer will have an invalid data pointer after
your element flushes the bytes. In that case you should use
gst_adapter_take(), which returns a freshly-allocated buffer that you can set
as #GstBuffer memory or the potentially more performant
gst_adapter_take_buffer().
Gets the first @size bytes stored in the @adapter. The returned pointer is valid until the next function is called on the adapter.
Note that setting the returned pointer as the data of a #GstBuffer is incorrect for general-purpose plugins. The reason is that if a downstream element stores the buffer so that it has access to it outside of the bounds of its chain function, the buffer will have an invalid data pointer after your element flushes the bytes. In that case you should use gst_adapter_take(), which returns a freshly-allocated buffer that you can set as #GstBuffer memory or the potentially more performant gst_adapter_take_buffer().
Returns %NULL if @size bytes are not available.