[gst-devel] const properties during buffer processing

ensonic ensonic at hora-obscura.de
Sun May 28 23:06:03 CEST 2006


hi,

during the weeksend I did a little cleanup on GstVolume [1]. It uses
multiple processing functions (2) that are switched via function pointers.
I wanted to add a third one for the volume=0.0 case that uses memset. Now
the downside of this would be that when one sets volume to zero while a
buffer is beeing processed the old function would still achie the right
thing (but be slower). With the next buffer the memset variant becomes
active and if then one changes the volume back (or unmute) the chenge would
only become effective for the next buffer.

A similar roblem already exists in the current code. The int16 variant
processed the buffer differently wheter volume is greated that 1.0 or less.
This assumes that this is the case for the full buffer-time. I would like
to split that into separate functions too and then treat the volume as a
constant per buffer (read into separate variable before processing block).

Has anyone an idea of average buffer sizes (e.g. when decoding mp3/ogg)?
Should volume have an inner loop to process blocks of 1/10th second and
then update the volume to grant smooth volume changes.
In buzztard I tune buffersizes of sources to be a fraction of the tempo
anyway and thus circumvent this problem from the start.

Ciao
  Stefan

[1] http://webcvs.freedesktop.org/gstreamer/gst-plugins-base/gst/volume/gstvolume.c?view=markup





More information about the gstreamer-devel mailing list