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 161712 - [auparse] .au files don't play in playbin
[auparse] .au files don't play in playbin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-19 16:59 UTC by Stephane Loeuillet
Modified: 2006-04-26 17:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
int 24bits au file (137.75 KB, application/octet-stream)
2004-12-19 17:00 UTC, Stephane Loeuillet
Details
int 32bits au file (183.64 KB, application/octet-stream)
2004-12-19 17:01 UTC, Stephane Loeuillet
Details

Description Stephane Loeuillet 2004-12-19 16:59:34 UTC
this bug is a spin of bug #142812

with the following files :
M1F1-int24-AFsp.au
M1F1-int32-AFsp.au

trying to play them, i've got this with totem :
** (totem:6246): WARNING **: could not link audio/x-raw-int, rate=(int)8000,
channels=(int)2, endianness=(int)4321, depth=(int)24, width=(int)24,
signed=(boolean)true

and that with gst-launch :
totem: pcm.c:2439: snd_pcm_areas_copy:  l'assertion « frames > 0 » a échoué.

pipeline used is :
filesrc location=xxx ! auparse ! audioconvert ! alsasink
Comment 1 Stephane Loeuillet 2004-12-19 17:00:13 UTC
Created attachment 35011 [details]
int 24bits au file
Comment 2 Stephane Loeuillet 2004-12-19 17:01:35 UTC
Created attachment 35012 [details]
int 32bits au file
Comment 3 Ronald Bultje 2004-12-21 13:43:30 UTC
Can you give a backtrace for that assertion?
Comment 4 Stephane Loeuillet 2004-12-21 18:46:05 UTC
nope, i can't get it

i retried the 32bits file adding audioconvert, it now works :
filesrc location=M1F1-int32-AFsp.au ! auparse ! audioconvert ! audioscale ! alsasink

---

for the 24bits file, it won't put the caps warning (if i add audioconvert) but
it won't play any sound either
Comment 5 Ronald Bultje 2004-12-21 18:56:31 UTC
Ok, so invalid then?
Comment 6 Stephane Loeuillet 2004-12-21 19:12:06 UTC
well no, because totem won't add audioconvert while it is needed for the 24bit files
Comment 7 Ronald Bultje 2004-12-21 21:37:57 UTC
Totem always uses audioconvert.
Comment 8 Stephane Loeuillet 2004-12-22 10:24:57 UTC
got this caps problem (24bits int) and the failled alsa assert (32bits int) in 2
cases :

   - gst-launch without audioconvert (adding audioconvert betwenn auparse and
audioscale fixes it)
   - totem in any case

so, who's to blame ? totem/playbin/decodebin ?
Comment 9 Stephane Loeuillet 2005-01-10 23:13:20 UTC
it looks like those 2 case could be the common problem that totem/playbin have
with small files

as both give now :

ERROR (0x80890a0 - 307055:12:21.873883000)     playbasebin( 6492)
gstplaybasebin.c(1582):gst_play_base_bin_change_state:<play> There were no
decoders found to handle the stream in file
"file:///home/leroutier/Desktop/T%C3%A9l%C3%A9chargements/media-files/M1F1-int24-AFsp.au",
you might need to install the corresponding plugins


i'm able to play the 32 bits one on the command line
the 24bit one doesn't error but it stays silent (bug in auparse)

so, feel free to close
Comment 10 Andy Wingo 2005-07-15 16:41:59 UTC
This is odd, the files don't typefind in head. Ronald, any ideas?
Comment 11 Tim-Philipp Müller 2006-02-01 10:57:45 UTC
Typefinding fixed in HEAD:

2006-02-01  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/typefind/gsttypefindfunctions.c: (au_type_find),
        (paris_type_find), (ilbc_type_find), (plugin_init):
          Fix typefinding for audio/x-au, audio/x-paris and
          audio/iLBC-sh. We cannot use the START_WITH macros
          here, because there can only be one typefind factory
          with the same name (caps), so the second one would
          replace the first one and the first one would never
          be called when doing typefinding (see #161712).

... and the attached 24/32 bit int files work as well, but there is still some problem with alaw/mulaw files and decodebin in HEAD:

  works: filesrc ! auparse ! alawdec ! alsasink  
  works: filesrc ! auparse ! alawdec ! audioconvert ! alsasink
  works: filesrc ! decodebin ! alsasink
  fails: filesrc ! decodebin ! audioconvert ! alsasink

same with audioresample instead of audioconvert.

The files are available here:
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/AU/Samples.html
Comment 12 Tim-Philipp Müller 2006-04-26 17:25:02 UTC
The issue with the alaw/mulaw files here was that decodebin doesn't automaticlly plug alawdec/mulawdec into the pipeline after auparse, as it only investigates the first structure of the template caps, sees 'raw format', and stops processing there. What decodebin does here isn't really correct, but it's much easier to make auparse use dynamically created sometimes pads like all the other parsers/demuxers:

 2006-04-26  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/auparse/gstauparse.c: (gst_au_parse_base_init),
        (gst_au_parse_class_init), (gst_au_parse_init),
        (gst_au_parse_reset), (gst_au_parse_add_srcpad),
        (gst_au_parse_remove_srcpad), (gst_au_parse_parse_header),
        (gst_au_parse_chain), (gst_au_parse_src_convert),
        (gst_au_parse_src_query), (gst_au_parse_handle_seek),
        (gst_au_parse_sink_event), (gst_au_parse_src_event),
        (gst_au_parse_change_state):
        * gst/auparse/gstauparse.h:
          Rewrite auparse to suck a little bit less: make source pad
          dynamic, so decodebin/playbin work with non-raw formats
          like alaw/mulaw; add query function for duration/position
          queries; check whether we have enough data before attempting
          to parse the header (instead of crashing when that is not the
          case); work around audioconvert sucking by swapping endianness
          to the native endianness ourselves for float formats; send
          initial newsegment event. Fixes #161712.

The 64-bit float sample file won't play currently, but I am too lazy to add a hack for that to auparse. This needs fixing in audioconvert IMHO, filed as bug #339837.