Finished visualization pipeline

Hopefully, anyway.

I spent some time this last week (probably over 15 hours total) giving the Banshee visualization pipeline another overhaul. In the process of doing this I finally filed a bug I found in the spectrum GStreamer element that I’ve been trying to work around for a long time.

Even though Sebastian was able to fix this specific bug, another crept up, which he did fix, but it became apparent to me that using the spectrum element was the wrong approach. I won’t go into too many details, but it made disabling and re-enabling the pipeline incredibly tricky and required a buffer of spectrum slices that had to be synchronized with a mutex since it was being accessed by three threads.

Sebastian gave me some pointers on using libgstfft directly, and this has reduced the amount of code required to do spectrum analysis while making it less laggy and less of a hack.

I’m told this patch (and possibly Banshee.OpenVP) will be going into Banshee 1.6. Sweet.

Mandatory screen shot of the new code and of the new Voiceprint visualization in Banshee.OpenVP:

Update 2009-01-22: I had to revise the patch to fix a segfault caused by a race and to eliminate some timing issues with thawing synchronization. The link to the patch has been updated.

3 Replies to “Finished visualization pipeline”

  1. Beautiful. I can’t wait to get my eyes on this :). Thanks for the great work. Perhaps a nice Tango style icon for the source is in order.

  2. Good thinking. I like the looks, but I like the dev decision behind this one better.

    Code re-use is ‘Nice'(TM) but not always ‘Good'(TM)

    You have just provided a good description of one case in which it worked less than optimally 🙂

  3. @Kevin:

    The visualization source is temporary, for my own use during debugging. The plan is to integrate it with the Now Playing source. I’m waiting for someone else’s changes to do that part, but in the meantime I’m using my own source to work on the rest of the integration.

    @Seth:

    Indeed. The lesson to be learned here is that some abstractions just abstract too much control away and alter the flow of data just enough to cause more problems than they solve.

Comments are closed.