Audio-resampling isn't actually performed?

Sebastian Dröge sebastian at
Thu Nov 12 10:06:18 UTC 2020

On Thu, 2020-11-12 at 12:03 +0200, Sebastian Dröge wrote:
> On Thu, 2020-11-12 at 20:44 +1100, Matthew Waters wrote:
> > No, the buffer size is not a direct relation with the sample rate
> > of the audio.  There can be any number of samples within an audio
> > buffer that still have the same sample rate.
> > It sounds like you probably want to base your element on
> > GstAudioAggregator though for the audio-specifics.
> Or alternatively you could make use of GstAdapter for converting the
> input buffers with arbitrary number of samples into equally-sized
> buffers.
> However GstAudioAggregator also takes care of inter-stream
> synchronization and various other things that are not too easy to
> reimplement, so if you need that it would be a better idea to use it
> instead.

And I forgot to add that when using GstAudioAggregator you should not
override GstAggregator::aggregate() but instead GstAudioAggregator::cre
ate_output_buffer() and GstAudioAggregator::aggregate_one_buffer().

If you override the former then all the processing logic of GstAudioAgg
regator is disabled.

Sebastian Dröge, Centricular Ltd ·

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list