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 341562 - audioconvert doesn't list formats in order of preference
audioconvert doesn't list formats in order of preference
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-12 17:17 UTC by Michael Smith
Modified: 2006-06-02 09:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Preliminary patch (6.60 KB, patch)
2006-05-12 17:19 UTC, Michael Smith
none Details | Review
Patch for multichannel vorbisenc (8.53 KB, patch)
2006-05-12 17:51 UTC, Michael Smith
committed Details | Review
updated patch (4.93 KB, patch)
2006-05-14 13:16 UTC, Michael Smith
none Details | Review
updated patch (8.95 KB, patch)
2006-05-14 13:26 UTC, Michael Smith
committed Details | Review

Description Michael Smith 2006-05-12 17:17:24 UTC
Audioconvert just returns its template caps from its transform_caps function.

This means that it often won't make good choices about conversions in complex cases (I found this doing multichannel vorbis - in a forthcoming patch).

I'll attach a preliminary patch changing this behaviour: feedback much desired!
Comment 1 Michael Smith 2006-05-12 17:19:33 UTC
Created attachment 65335 [details] [review]
Preliminary patch
Comment 2 Michael Smith 2006-05-12 17:51:52 UTC
Created attachment 65338 [details] [review]
Patch for multichannel vorbisenc

This patch to vorbisenc will allow you to test multichannel vorbis encoding; it doesn't work right without the preceeding audioconvert bugfix.
Putting it here so that people can have a useful testcase, I tested it with:
gst-launch-0.10 filesrc location=51Test.wav ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=/tmp/out2.ogg -v
Comment 3 Michael Smith 2006-05-14 13:16:42 UTC
Created attachment 65436 [details] [review]
updated patch

Updated audioconvert patch. Cleans up code, removes memory leaks, adds comments, and improves format selection.
Comment 4 Michael Smith 2006-05-14 13:26:41 UTC
Created attachment 65437 [details] [review]
updated patch

Updated patch; this time the right file.
Comment 5 Jan Schmidt 2006-05-26 13:17:40 UTC
dude, you should put this in now so we can get some testing
Comment 6 Wim Taymans 2006-05-29 10:48:44 UTC
the vorbisenc patch looks weird; why not just define the sinkcaps as the padtemplate instead of dynamically create it in a getcaps function? Also it clears the sinkcaps when going to READY in a non-threasafe way. getcaps can be called at any time.
Comment 7 Michael Smith 2006-05-29 11:01:58 UTC
We can't define these caps as a pad template: they include audio positions. Pad templates get written to the registry, so then when something reads the registry, it fails - channel positions are defined in gst-plugins-base, not in core, so the type isn't registered when we read the registry. I did it as a pad template the first time, and ran into this problem

Committing audioconvert now; will try to fix up vorbisenc patch for teh threadsafety thing when I have a moment.
Comment 8 Wim Taymans 2006-05-29 11:08:13 UTC
ah yes.  Not clearing the ->sinkcaps would be enough.