Input buffers in 1.0

Tonu Jaansoo chain at bsd.ee
Tue Apr 9 10:23:19 PDT 2013


Hello!

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


More information about the gstreamer-devel mailing list