[vlc-devel] [PATCH] ProjectM API (libvlc)

Rémi Denis-Courmont remi at remlab.net
Sun Dec 26 18:32:17 CET 2010


   Hello,

On Sunday 26 December 2010, XilasZ wrote:
> After some research and advices, i've made a new version of my projectm
> API, without using vlc_object_find_name or p_owner.

It's not completely obvious to me what the lock is meant for. I think you 
should explain it in Doxygen.

> I added 3 variables and a callback inside aout (created in InputNew when
> projectm is created, destroyed in InputDelete, so that they should have the
> same lifecycle as projectm module).

I think different variable names for each command would be clearer for VLC 
developers, even if this is not visible to external LibVLC applications.

> I gave the p_filter to the callback at its creation.
> So libvlc set/get variables to the aout, then the aout callback set/get
> variables to the filter, and the filter react and do his job.
> If projectm is not used, variables doesn't exists in the aout, so nothing
> happens.

There seems to be a thread-safety problem here. The callback cannot access the 
projectM pointer directly. Similarly, b_changed and i_preset_id lack memory 
synchronization.

> I also added 3 settings to projectm module to set meshx, meshy and
> texturesize, and fixed a crash if there is no available presets.

That's probably good (I don't know projectM much), but it should be a separate 
patch.

Best regards,

-- 
Rémi Denis-Courmont
http://www.remlab.info



More information about the vlc-devel mailing list