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 706884 - audioconvert: Only considers first structure when fixating caps
audioconvert: Only considers first structure when fixating caps
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 731601 767226 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-27 12:49 UTC by Sebastian Dröge (slomo)
Modified: 2018-11-03 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2013-08-27 12:49:00 UTC
This pipeline for example should negotiate to S32BE instead of S16LE:

gst-launch-1.0 audiotestsrc ! audioconvert ! capsfilter caps="audio/x-raw,format=S32LE" ! audioconvert ! capsfilter caps="audio/x-raw,format={S8, S16LE};audio/x-raw,format=S32BE" ! fakesink -v

But because the fixate function inside gstaudioconvert.c only looks at the first structure this does not happen. It should probably iterate over all structures after fixating each structure for itself, and then select the first best structure according to the same algorithm as it currently fixates every structure.
Comment 1 Sebastian Dröge (slomo) 2014-06-13 06:28:43 UTC
*** Bug 731601 has been marked as a duplicate of this bug. ***
Comment 2 berend 2014-06-13 07:59:38 UTC
Given this bug is old, here some feedback to bump it's importance: currently gstreamer 1.2.4 is broken on (some) FreeBSD 10 due to this issue. I.e. gst-play file.ogg does produce hissing due to down sampling to 8 bits.

Nicolas Dufresne reported that he had seen problems on Windows with gstreamer playback, but had not realised at that time this was due to incorrect audio resampling.

So we have two different OSes where there are real audio playback issues, not just hypothecial sink examples that are broken.
Comment 3 Sebastian Dröge (slomo) 2014-06-13 08:02:14 UTC
This can be worked around in the sink by ordering the caps structures by the sample width... but of course should be fixed properly in audioconvert.

There's a work-in-progress patch for this btw.
Comment 4 berend 2014-06-13 08:12:26 UTC
I suppose I can only do that with a source change right? None of my gstreamer based apps work right now.
Comment 5 Nicolas Dufresne (ndufresne) 2015-08-10 19:05:23 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> This can be worked around in the sink by ordering the caps structures by the
> sample width... but of course should be fixed properly in audioconvert.
> 
> There's a work-in-progress patch for this btw.

Maybe worth telling us where ? ;-P
Comment 6 Sebastian Dröge (slomo) 2015-08-11 09:44:34 UTC
I'm not sure anymore, I'll have to look for it :)
Comment 7 Sebastian Dröge (slomo) 2016-06-17 09:46:15 UTC
*** Bug 767226 has been marked as a duplicate of this bug. ***
Comment 8 Sebastian Dröge (slomo) 2016-06-17 09:48:37 UTC
There's a small unit test in https://bugzilla.gnome.org/show_bug.cgi?id=767226#c14

The solution for all this would be similar to what videoconvert is doing. Instead of truncating the caps to a single structure, it should generate a list of all possible conversion. The best conversion that is possible per structure (i.e. what it does now), and then for all those structures it should select the one that is "best" according to the metrics we already have.
Comment 9 GStreamer system administrator 2018-11-03 11:25:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/89.