My quest for a Linux audio player (Linux.com)
Posted Apr 5, 2006 11:53 UTC (Wed) by
thaytan (guest, #25908)
In reply to:
My quest for a Linux audio player (Linux.com) by jwb
Parent article:
My quest for a Linux audio player (Linux.com)
I'm not quite sure how to respond to your comment. I'm a GStreamer developer, so obviously I don't agree with your assessment that it's a 'fundamental design flaw' for players to use it.
Your statement that "If your program uses GStreamer, there is basically no way to report useful error messages back to the user (or even back to the program) and no way to just get a damn array of audio samples." is wrong on both points, although the first is partly true.
1) Producing useful error messages in a generic streaming framework is hard. The big problem currently is that many GStreamer plugins report generic errors where they should report specific ones. We're improving that as we go, and they're getting better. In 0.10 there is a clear mechanism for producing error messages to the application, categorised into one of a bunch of defined error classes and providing a mechanism for supplying translations to different languages.
2) You mentioned trying to hack your MusicIP fingerprinting into Rhythmbox. I assume that means during the song import? You can do this in a couple of ways:
a) Write a GStreamer element based on the BaseTransform base class and drop it into the pipeline somewhere. You'll pretty quickly have a GStreamer element that can be reused in every existing GStreamer based player with the addition of maybe 10 lines of code to each.
b) Look at the part of the metadata importer that connects fakesink to the pipeline and either add a buffer-probe to the input of fakesink or connect to the handoff signal. Either one will provide you with a way to have GStreamer call a callback whenever there's a buffer of audio data to be processed.
a) has a longer lead time, but is more reusable. b) will get you there quicker.
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/... shows you sample code of how to do b)
http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/... is a good example of a filter element that analyses the audio passing through and sends custom messages to the application reporting the results.
In case you didn't already find it last week when you were having trouble, you are welcome to jump on the #gstreamer channel of the freenode.net IRC server and ask before deciding the mechanism isn't there.
(
Log in to post comments)