[Bug 751605] audio: Add proper support for non-interleaved / planar audio

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 9 14:06:57 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=751605

--- Comment #7 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to George Kiagiadakis from comment #6)
> (In reply to Sebastian Dröge (slomo) from comment #5)
> > Making the meta mandatory is problematic as various elements can already
> > handle non-interleaved audio. Without meta, it has to be tightly packed.
> 
> Is that really true? Do they really handle non-interleaved audio? Is it
> tested? It seemed to me that they advertise it, but nobody really supports
> it. For example, audioresample advertises it, but it actually crashes if you
> negotiate it with non-interleaved.

Well, that's a bug :) If nothing ever worked with non-interleaved then it's
probably OK to change behaviour.

> A reason for making it mandatory is that there is API that won't be able to
> handle non-interleaved audio otherwise, like gst_audio_buffer_clip() (the
> arguments of the function are not sufficient). It is also incredibly
> convenient for mapping the audio buffer without having to take cases.

I agree with that, yes. Keep in mind though that metas are not free.

> > Also why (multiple) offsets for the meta instead of a single "stride"?
> 
> This allows to do zero-copy clipping as well as channel reordering. As long
> as every element uses the new gst_audio_buffer_map/unmap() API, clipping or
> reordering is just a matter of modifying the offsets and/or the 'samples'
> variable.

Ah, good idea indeed. Just requires yet another memory allocation for the meta
as there would be n_channels offsets.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list