XMMS Plugins

Loïc Minier lool at via.ecp.fr
Thu Apr 4 14:17:12 CEST 2002


  Just a note about XMMS Plugins.

 I had the idea of using vlc to launch a xmms plugin yesterday, and in a
couple of hours I had the first runnable result.

 I won't have enough time now to consider xmms plugins, but maybe
someone is interested, so I leave him a note here.


 I used the dsp plugin as a base but I could use a filter plugin
instead. I downloaded the sources of xmms and jess (a visualization
plugin showing some animations when you feed him with audio data). I
renamed the copy of the dsp plugin "jess" everywhere it was needed, and
I copy-pasted the code for module-loading from xmms in the aout_Open.
I store the xmms plugin structure in p_aout->p_sys->pvp_visplugin so I
have the addresses of the render_pcm() and render_freq() functions I use
in aout_Play.

 What I pass to these functions is the beginning of an audio packet
provided by the aout. Here is the first dirty hack : a xmms plugin
awaits 16bits audio data in two chunks of 2*512*2 bytes (16bit stereo).
I just give him 1024 bytes of pcm (I do not check the type of the
stream, I just suppose it's pcm for now ;^) and the biggest problem is
here : the size of an audio packet coming from the audio_output should
be fixed by the aout plugin, not by the audio_output. Typically here, we
would require the packet size to be 512*2 bytes.
 The second dirty hack is that a xmms plugin should be filled with some
structures when it's loaded. Here, jess discards this data, but other
plugins might fail on this. So you either have to be selective with the
plugins loaded, or you just have to emulate this xmms data.

 If you want to try that out, get <http://www.via.ecp.fr/~lool/jess.tgz>
and change your Makefile, Makefile.opts (yes I'm dirty), and the
included Makefile to match the path to your xmms headers.

 This is just a really dirty test, do not write anyone signalling
crashes, this is worthless.

-- 
Loïc Minier <lool at via.ecp.fr>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list