[gst-devel] One more step on the road to gstreamer enlightenment

David Schleef ds at schleef.org
Sun Sep 1 13:11:21 CEST 2002


On Sun, Sep 01, 2002 at 03:28:55AM -0400, Andy Wingo wrote:
> On Sun, 01 Sep 2002, iain wrote:
> 
> > Yes, me again, still fighting my way through GStreamer.
> > 
> > In my element, I need to convert a GstBuffer from ints to floats. The
> > code I'm using is
> 
> erik is of course right. I assume you're coding an element; if you
> really want floats, why not specify that in the pad caps? that will
> force the user or autoplugger to put in an int2float if necessary.

AOL this.

Integer to floating point conversion (and the opposite) is highly
optimizable from the simple for()-loop with a C cast, and should
really be part of a separate plugin.  That is, unless you are
implementing both floating-point and integer algorithms.  (But in
that case, you don't need to convert.)



dave...





More information about the gstreamer-devel mailing list