Input buffers in 1.0

Wim Taymans wim.taymans at
Tue Apr 9 10:44:56 PDT 2013

On 04/09/2013 07:23 PM, Tonu Jaansoo wrote:
> Hello!

It depends on what your input is. If you have an mp3 decoder, it 
probably can only output one complete frame at a time.

For filesrc and other sources you could attempt to propose a bufferpool 
upstream, that should contain fixed sized buffers but again, it depends 
on upstream if this will actually be used.

What kind of input do you have?

> If i want to get exact multiple bytes of data from audioconvert plugin in GstBaseTransform audio filter plugin, what are my options?
> The purpose of fixing input size is that currently each buffer that is coming into my plugin is in different size (10024 and 10032 alternating if i believe correctly). Because of that I would have to reallocate/change my internal stuff on each buffer - i do FFT on the data. I have tried to implement propose_allocation vmethod, but that method gives me correct size buffer on input (inside my transform vmethod), but the data is not filled using proposed size. How can i ask  upstream element to give me nice chunk. Logically it should not be a problem for audioconvert - the size should just be divideable by channels*sizeof(typeofdata), right?
> In an older and working hack I use not-in-place transform vmethod and two GstAdapters inside it - one for input and one for output. If there is way of fixing input buf size, I could avoid some memcpys.
> Tonu
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at

More information about the gstreamer-devel mailing list