[vlc-devel] LibVLC API suggestions
    Rémi Denis-Courmont 
    remi at remlab.net
       
    Wed Sep  1 17:52:06 CEST 2010
    
    
  
On Wed, 1 Sep 2010 13:27:05 +0200, "Pierre d'Herbemont"
<pdherbemont at free.fr> wrote:
>> 4. Of course it would be nice to be able to call the API from inside
>> an event callback (ex, do a play from inside the reached end
>> callback), but I understand that this ain't as simple as it sounds.
> 
> We have an internal API and badly named API for this:
> libvlc_event_attach_async(). This could be somehow made public.
> However it spawns a thread per observed object in its current
> implementation.
It's not that simple. If the event callbacks were called from a dedicated
thread, then there would be no warranty that the event is still "valid" at
the time when it is delivered to the application. Depending on the event
and what the applications wants to do with it, it can be a totally fine or
a severe issue.
-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
    
    
More information about the vlc-devel
mailing list