GNOME Bugzilla – Bug 661874
aacparse fails to forward caps to encoder
Last modified: 2011-11-24 09:01:20 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.
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
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.
Causes regressions on encodebin scenarios, marking as blocker. Waiting for patch review to push.
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.
Did the patch really get comited? I can't see it anywhere
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.
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.
Created attachment 199604 [details] [review] h264parse: implement getcaps Improves the previous patch a little, avoiding adding useless structures
Comment on attachment 199604 [details] [review] h264parse: implement getcaps This was already fixed differently in -bad
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