[vlc-devel] Re: vlc: svn commit r20432 (pdherbemont)

Pierre d'Herbemont pdherbemont at free.fr
Thu Jun 7 17:15:57 CEST 2007


On 7 juin 07, at 16:52, Rémi Denis-Courmont wrote:

> Le jeudi 7 juin 2007, Pierre d'Herbemont a écrit :
>> About polling I am not convinced that it is a good solution. Most of
>> the time you end up in wasting CPU time. (especially when polling for
>> an event that never occurs). Thus I really think it is fair to
>> consider a position event.
>
> Polling is bad... when you cannot predict when the event occurs.
>
> Performance position is likely enough to advance visibly every second
> that it may be reasonable to poll once or twice per sec, rather than
> use an event. Note that the input/demux stuff will cause a lot more
> wakeups than 1 or 2/sec while performing in any case, so the battery
> drain is not very significant.

Well, it sounds reasonable, but I don't see why using an event would  
be bad. It really looks sounder. And especially in the case of libvlc  
where this API is made available to third-parties. Let us save the  
work they'll have when setting up their polling thread, and prevent  
them from doing bad thing as much as we can.

Pierre.
-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list