After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588218 - Siren in .wav support
Siren in .wav support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.22
Other Linux
: Normal enhancement
: 0.10.24
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-10 05:56 UTC by Elliott Sales de Andrade
Modified: 2009-07-13 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Siren to RIFF parser (1.43 KB, patch)
2009-07-10 05:57 UTC, Elliott Sales de Andrade
committed Details | Review
Siren sample (15.84 KB, application/octet-stream)
2009-07-11 03:38 UTC, Youness Alaoui
  Details

Description Elliott Sales de Andrade 2009-07-10 05:56:39 UTC
MSN's audio clips (not AV calls and such) come in as the Siren(7?) codec contained in a WAV. It'd be nice to just use a 'playbin' to play these, but it doesn't work because the RIFF parser doesn't support the Siren codec ID.

I've attached a patch that adds the siren codec ID (0x28E) and hopefully the remaining parameters with the correct settings.
Comment 1 Elliott Sales de Andrade 2009-07-10 05:57:22 UTC
Created attachment 138171 [details] [review]
Add Siren to RIFF parser
Comment 2 Sebastian Dröge (slomo) 2009-07-10 06:36:21 UTC
The patch looks good but can you provide a sample file?

Also sirendec from gst-plugins-bad seems to need a dct-length parameter in the caps (and requires it to be 320)
Comment 3 Elliott Sales de Andrade 2009-07-11 00:44:45 UTC
A sample file can be found here: http://developer.pidgin.im/attachment/ticket/393/voice_clip.wav

It appears to play fine without setting dct-length in the caps. I can only find the dct mentioned in siren_rmlt_decode/encode_samples and siren_dct4 (called from the previous two), but it doesn't appear to be called with the dct-length parameter from the caps. (Perhaps that's a bug, too?)
Comment 4 Youness Alaoui 2009-07-11 03:38:55 UTC
Created attachment 138225 [details]
Siren sample

Here's a sample of an encoded siren wav file. It only contain garbage noise (scratching the microphone), but it's a good example. I have other examples, as well as encoded/decoded samples if you need. Tell me if you want me to upload them too.
Comment 5 Olivier Crête 2009-07-11 23:09:17 UTC
The dct-lenght is always fixed at 320 in the decoder/encoder anyway afaik, so no need to provide it from wavparse (unless you can read it from the .wav file header).
Comment 6 Youness Alaoui 2009-07-12 01:08:36 UTC
yes, it is part of the optional WAV header. The extra header size is 2 bytes and the dct length is 320 as an unsigned short. You can see it in : 
http://amsn.svn.sourceforge.net/viewvc/amsn/trunk/amsn/utils/tcl_siren/src/common.h?revision=9715&view=markup

and in the init function of the encoder where the WAV header is initialized : 
http://amsn.svn.sourceforge.net/viewvc/amsn/trunk/amsn/utils/tcl_siren/src/encoder.c?revision=9710&view=markup
Comment 7 Wim Taymans 2009-07-13 16:19:50 UTC
wav sets the dct length in the codec_data and can't really generically create the dct-length caps property without hardcoding siren codec_data parsing. 

Two options:
 - implement codec_data parsing in wavparse and set the dct-length property on
   the caps. 
 - remove the dct-length property from sirendec and implement codec_data parsing
   when we need it.

I would vote for 2, for now. If we need to make autoplugging more granular (a decoder that only accepts certain dct-lengths?) we can add parsing and put dct-length on the caps.
Comment 8 Wim Taymans 2009-07-13 16:23:38 UTC
commit 132fb5c050039c6778e5d80e3f0df3a3f539c515
Author: Elliott Sales de Andrade <quantum.analyst at gmail.com>
Date:   Mon Jul 13 18:21:49 2009 +0200

    riff: add siren to the RIFF parser
    
    Add siren7 caps to the RIFF parser.
Comment 9 Olivier Crête 2009-07-13 16:29:57 UTC
Shouldn't it parse the dct-lenght from the header ?