[gst-devel] Audio format identifiers and portability

zaheer at grid9.net zaheer at grid9.net
Wed Mar 14 00:49:21 CET 2001


It looks like depth sould be stored as an integer rather than have 32
flags.  Same I guess applies to width. Endian, signed look as if a boolean
or a flag will do.  Also sample rate should be an integer.
Whether its physically an integer, float or fixed point (or other) is
ialso important.

These are just the physical properties, then you have the actual
format/compression codec used.

You have PCM, mu law, A law, GSM, G.723.1, G.723, G.729, ADPCM and many
others, some of which need extra properties to fully describe the audio.

All these can fall under the umbrella audio/raw too.

And I bet the same kind of detail is required for video.

These details need to be carefully looked at and planned.


Regards

Zaheer



On Tue, 13 Mar 2001, Thomas Nyberg wrote:

> On Tue, Mar 13, 2001 at 01:45:54PM -0800, Erik Walthinsen wrote:
> > 
> > So the question is, do we want to have an enum with standard types,
> > potentially making yet another mess like soundcards.h, or do we want to
> > use the properties system to describe things, such as:
> > 
> > depth: 8-32
> > width: 8-32
> > endian: 0,1
> > signed: 0,1
> > float: 0,1
> >
> 
> The nice thing about enums are that they are easy to store internally and
> to move around. The drawback with the above is that you get long lists
> which are hard and takes a lot of time to go through. One possibility
> would be to have 
> enum {
>      DEPTH_8 = 1 << 0,
>      DEPTH_16 = 1 << 1,
>      ...
> }
> and just format = DEPTH_8 | LITTLE_ENDIAN | SIGNED;
> which makes use of a small datatype(int) to store the values, you
> do not need lists or anything like that.
> 
> The drawback is that support for new and strange types are hard to
> add - you would have to change a header-file and add it. Also,
> only 32-different flags can be used with any ease.
> 
> There is always the compromise, functions to convert between
> the two possibilities but that is just too much work. However,
> it would be nice to have
> gst_make_audio_format_nice_thingy_prop(DEPTH_8 | UNSIGNED) and it
> filled the correct prop-lists in.
> 
> /Thomas
> 
> -- 
> Thomas Nyberg                    thomas.nyberg at codefactory.se
> CodeFactory AB                   http://www.codefactory.se/
> Office: +46 (0)90 71 86 10       Cell: +46 (0)70 335 61 64
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> 





More information about the gstreamer-devel mailing list