[gst-devel] int2float - float2int is broken?

iain iain at prettypeople.org
Thu Jan 22 05:12:01 CET 2004


>  ---
> i will 'try' to make a converter myself. seems quite tough tho, can anyone describe how the conversion should go (from int2float)?
> 
> 
>  looking at the int2float code, 
> in file gstint2float.c
> 
>   GST_CAPS_NEW (
>     "float_src",
>     "audio/x-raw-float",
>     "rate",             GST_PROPS_INT_RANGE (4000, 96000),
>     "buffer-frames",    GST_PROPS_INT_RANGE (1, G_MAXINT),
>     "width",            GST_PROPS_INT (32), 
>     "channels",         GST_PROPS_INT (1),
>     "endianness",       GST_PROPS_INT (G_BYTE_ORDER)
>   )
> 
> 
>  it seems channels has been set as 1, instead of a range (unlike the int data).  
> and then in the init function:

>  i.e: int2float : 
>         if the incoming int data is 44100,2 channels per pad (int2floatsink ),
>         then the float data should be 44100, 2 channels per pad. (int2floatsrc)
>         ( using the principle of 'least suprising behaviour')

It is the standard for float data to be mono.
Don't know why, thats just the way it is.
the LAD mailing list apparently has the reasons.

iain
-- 





More information about the gstreamer-devel mailing list