[vlc-devel] [PATCH] ProjectM API (libvlc)
XilasZ
xilasz at gmail.com
Mon Dec 27 23:25:02 CET 2010
After a good night, i realized :
1) i need to learn how to read, i though you were talking about the callback
in the aout
2) the issue is the callback in projectm module, and i knew there was an
issue, the b_changed / i_preset_id variables was just quick a hack (and
useless)
3) i could have done it correctly the first time, as there are already a few
vlc_mutex_* in the module
anyway, here is a new thread-safe version (i hope), with one variable for
each command.
2010/12/26 XilasZ <xilasz at gmail.com>
> Here is a patch with just the new settings and the crash fix.
>
> I will change to one variable per command later, now i wait for a good soul
> to help me do the right thing. i'll be on irc from time to time.
>
> 2010/12/26 XilasZ <xilasz at gmail.com>
>
>
>> It's not completely obvious to me what the lock is meant for. I think you
>>> should explain it in Doxygen.
>>>
>>
>> ok, i'll add some details in doxygen (projectm change the preset every
>> 30s, lock is meant to prevent the change and keep the current preset).
>>
>> I think different variable names for each command would be clearer for
>>> VLC
>>> developers, even if this is not visible to external LibVLC applications.
>>>
>>
>> ok, i'll do that, and remove #define too.
>>
>> > 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.
>>>
>>
>> That's what i was afraid of (even if it works flawlessly), unfortunatelly
>> i'm kind of new to thread-safety problems in vlc (i know the possible
>> issues, i don't know how to fix them), so i would need help to fix this.
>> Can you help me ?
>>
>> > 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.
>>>
>>
>> i'll send a separate patch for this soon.
>>
>> Thanks.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20101227/aaed8510/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: projectm-api.patch
Type: application/octet-stream
Size: 19957 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20101227/aaed8510/attachment.obj>
More information about the vlc-devel
mailing list