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 733190 - [regression] aacparse: raw to ADTS conversion no longer works
[regression] aacparse: raw to ADTS conversion no longer works
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 1.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-15 09:55 UTC by Chris Bass
Modified: 2014-07-16 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW (2.81 KB, patch)
2014-07-16 15:19 UTC, Sebastian Dröge (slomo)
none Details | Review
aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW (3.69 KB, patch)
2014-07-16 15:28 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Chris Bass 2014-07-15 09:55:25 UTC
Using aacparse to convert from stream-format=raw to stream-format=adts no longer works.

This can be demonstrated by the following:

gst-launch-1.0 souphttpsrc location=http://rdmedia.bbc.co.uk/dash/ondemand/bbb/avc3/1/client_manifest-audio.mpd ! dashdemux ! qtdemux ! aacparse ! audio/mpeg,stream-format=adts ! faad ! audioconvert ! alsasink

Removing the caps filter after aacparse or changing 'adts' to 'raw' in the caps filter results in the stream playing correctly.

An initial look suggests that this might be a result of the changes introduced by commit e0a5c07e8d404e72654e016fa0a6c88d573f51f1 (3/12/2013).

In initial calls to gst_aac_parse_sink_getcaps, filter is NULL and so the caps of aacparse's src peer is returned, which in this case specifies stream-format=adts. However, I assume that this means the the upstream now has to output in adts format; but one reason for aacparse being in the pipeline is precisely because the upstream element can't output in adts and hence needs aacparse to convert from raw to adts. I'm guessing the reason it worked before this commit is that the template caps, which don't specificy a particular stream-format, were also appended to the returned caps.

I guess this is related to the discussions in https://bugzilla.gnome.org/show_bug.cgi?id=705024, but I'm not sure I understand the issues there well enough to know what the right solution is.
Comment 1 Sebastian Dröge (slomo) 2014-07-16 14:52:51 UTC
When was it last known to work?
Comment 2 Chris Bass 2014-07-16 15:01:51 UTC
I rolled back to the commit which added the raw->ADTS functionality (b40bf67526189db009bf768c0541aefeb0d697ca on 13/8/2013), and that worked.
Comment 3 Sebastian Dröge (slomo) 2014-07-16 15:09:33 UTC
The problem is that aacparse in getcaps() does not properly handle that it can do conversions. It should adjust the stream-format field appropiately, e.g. in your case from "adts" to "{adts, raw}".
Comment 4 Sebastian Dröge (slomo) 2014-07-16 15:12:20 UTC
Adding that now
Comment 5 Sebastian Dröge (slomo) 2014-07-16 15:19:54 UTC
Created attachment 280850 [details] [review]
aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
Comment 6 Sebastian Dröge (slomo) 2014-07-16 15:20:15 UTC
Does this fix it for you?
Comment 7 Sebastian Dröge (slomo) 2014-07-16 15:26:34 UTC
No it doesn't, fixing
Comment 8 Sebastian Dröge (slomo) 2014-07-16 15:28:06 UTC
Created attachment 280857 [details] [review]
aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
Comment 9 Sebastian Dröge (slomo) 2014-07-16 15:28:38 UTC
With this negotiation works. But faad complains when trying to decode the adts stream, avdec_aac works fine though.
Comment 10 Chris Bass 2014-07-16 15:36:06 UTC
Yep, works for me as well using avdec_aac - thanks.
Comment 11 Sebastian Dröge (slomo) 2014-07-16 15:43:40 UTC
commit 638a700463a96b53dc92e9db4522ca861e5c72a1
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Wed Jul 16 17:18:59 2014 +0200

    aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733190