as long as it's mapped.
Parameters
buffer | pointer to a #GstAudioBuffer |
info | the audio properties of the buffer |
gstbuffer | the #GstBuffer to be mapped |
flags | the access mode for the memory |
bool map(out gstaudio.audio_buffer.AudioBuffer buffer, gstaudio.audio_info.AudioInfo info, gst.buffer.Buffer gstbuffer, gst.types.MapFlags flags)Maps an audio gstbuffer so that it can be read or written and stores the result of the map operation in buffer.
This is especially useful when the gstbuffer is in non-interleaved (planar) layout, in which case this function will use the information in the gstbuffer's attached #GstAudioMeta in order to map each channel in a separate "plane" in #GstAudioBuffer. If a #GstAudioMeta is not attached on the gstbuffer, then it must be in interleaved layout.
If a #GstAudioMeta is attached, then the #GstAudioInfo on the meta is checked against info. Normally, they should be equal, but in case they are not, a g_critical will be printed and the #GstAudioInfo from the meta will be used.
In non-interleaved buffers, it is possible to have each channel on a separate #GstMemory. In this case, each memory will be mapped separately to avoid copying their contents in a larger memory area. Do note though that it is not supported to have a single channel spanning over two or more different #GstMemory objects. Although the map operation will likely succeed in this case, it will be highly sub-optimal and it is recommended to merge all the memories in the buffer before calling this function.
as long as it's mapped.
buffer | pointer to a #GstAudioBuffer |
info | the audio properties of the buffer |
gstbuffer | the #GstBuffer to be mapped |
flags | the access mode for the memory |