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 661874 - aacparse fails to forward caps to encoder
aacparse fails to forward caps to encoder
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-15 22:53 UTC by Christian Fredrik Kalager Schaller
Modified: 2011-11-24 09:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Png showing issue (285.32 KB, image/png)
2011-10-15 22:53 UTC, Christian Fredrik Kalager Schaller
  Details
baseparse: add getcaps function (3.92 KB, patch)
2011-10-17 17:44 UTC, Thiago Sousa Santos
committed Details | Review
h264parse: implement getcaps (3.30 KB, patch)
2011-10-20 03:13 UTC, Thiago Sousa Santos
none Details | Review
h264parse: implement getcaps (5.40 KB, patch)
2011-10-21 02:47 UTC, Thiago Sousa Santos
rejected Details | Review

Description Christian Fredrik Kalager Schaller 2011-10-15 22:53:16 UTC
Created attachment 199094 [details]
Png showing issue

I am trying to encode an AAC file using ADTS stream format, but the parser seems to block the capsfilter setting, so the encoder creates a raw stream. Attaching gst-dot-file-dump file to show issue.
Comment 1 Christian Fredrik Kalager Schaller 2011-10-17 09:54:53 UTC
To explain more in detail how I did this, using git master Transmageddon I loaded the gravity.mpg file from : http://gstreamer.freedesktop.org/media/large/gravity.mpg

I then choose the 'no container option' which disables video (I am trying to create a pure audio file here) and choose AAC. Once I press transcode the pipeline halts. If I try mp3 or FLAC it works as expected.

Ishould be quite clear from the PNG as you see the capsfilter behind the aacparser tries to set stream format to ADTS, but in front of the accparser this information doesn't reach and thus is defaults to raw
 in order words faac doesn't get told to ouput ADTS instead of raw due to the message being 'blocked' by the aacparser
Comment 2 Thiago Sousa Santos 2011-10-17 17:44:52 UTC
Created attachment 199236 [details] [review]
baseparse: add getcaps function

Adds a getcaps function to the sink pad to make parsers propagate
downstream caps restrictions to upstream.

The pipeline "audiotestsrc num-buffers=100 ! faac ! aacparse !
"audio/mpeg, version=(int)4, stream-format=(string)adts" ! filesink"
wouldn't work because aacparse wouldn't propagate the adts restriction
upstream to faac.

This patch adds a default getcaps to the sink pad to simply proxy
downstream caps and also adds a 'get_sink_caps' function pointer
to GstBaseParseClass for subclasses that need more refined getcaps.
Comment 3 Thiago Sousa Santos 2011-10-17 17:45:42 UTC
Causes regressions on encodebin scenarios, marking as blocker.

Waiting for patch review to push.
Comment 4 Sebastian Dröge (slomo) 2011-10-18 07:00:40 UTC
Comment on attachment 199236 [details] [review]
baseparse: add getcaps function

Looks good in general but you should probably change the parser/converter (h264parse and dcaparse) to use this instead of their own getcaps function.
Comment 5 Christian Fredrik Kalager Schaller 2011-10-18 10:20:05 UTC
Did the patch really get comited? I can't see it anywhere
Comment 6 Tim-Philipp Müller 2011-10-18 11:43:06 UTC
The doc blurb for get_sink_caps could use a "(Since: 0.10.36)".

Got to be careful here to get things right with profiles/levels and stream-format conversions supported.

Also note that the caps above are not quite correct, it should be mpegversion=4, not version=4.
Comment 7 Thiago Sousa Santos 2011-10-20 03:13:48 UTC
Created attachment 199496 [details] [review]
h264parse: implement getcaps

First attempt at a getcaps on h264parse, I think it still can be improved
by avoiding extra structures when not needed, but it is getting late here.
Will continue this tomorrow.
Comment 8 Thiago Sousa Santos 2011-10-21 02:47:02 UTC
Created attachment 199604 [details] [review]
h264parse: implement getcaps

Improves the previous patch a little, avoiding adding useless
structures
Comment 9 Sebastian Dröge (slomo) 2011-11-24 08:38:43 UTC
Comment on attachment 199604 [details] [review]
h264parse: implement getcaps

This was already fixed differently in -bad
Comment 10 Sebastian Dröge (slomo) 2011-11-24 09:01:20 UTC
commit c114e7c073c5da7c46f06c6c908383f3b0f0d3e1
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:59:40 2011 +0100

    mpegaudioparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream

commit 996b4eb4ccf90ce94604fe5dc034a4dfd23d9489
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:57:57 2011 +0100

    flacparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream

commit e6a21299778538f7ec5d63a1ba6dd1ce248e233c
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:55:47 2011 +0100

    dcaparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream

commit c5b770df0937ada20df065d3a9a3397b644bb1dc
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:53:18 2011 +0100

    amrparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream

commit 5203b0884abc1deeec5943557dd4c7b49bb91579
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:49:27 2011 +0100

    amrparse: Mark some more functions as static

commit fabc5c969be34e496662a810ba1b3f0b2721163d
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:48:33 2011 +0100

    ac3parse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream

commit 48b07ae434d4d6ca5284f92ba9f68deffa505ecd
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:44:58 2011 +0100

    aacparse: Mark some functions as static and remove unused function declarations

commit 94daabf71fc1e439a1ef49c607383a1d349e5277
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 24 09:43:14 2011 +0100

    aacparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream