[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE

Rémi Denis-Courmont remi at remlab.net
Thu Jun 25 22:12:42 CEST 2015


Le jeudi 25 juin 2015, 12:43:14 Ross Finlayson a écrit :
> >>> The VLC process is not supposed to wake up while playback is paused
> >> 
> >> How do you handle the 'mouse click’ event on the ‘play’ button (when the
> >> user tells VLC to resume playing)?
> > 
> > That is OS-dependent and abstracted away by Qt GUI framework.
> 
> But it’s a relevant question.

No, it is not relevant. We are not going to run the VLC UI from within the 
live555 main loop. If you are curious, you can always refer to the Qt 
documentation and source code.

> If VLC is not waking up periodically to
> ‘poll’ for this event occurring, then how does it detect it?

VLC does not poll for input events periodically. On my system, it sleeps for 
30 seconds at a time if left undisturbed, and yet it reacts within 
milliseconds to user interaction. This is easy to check with strace on Linux.

This is all possible thanks to the ground-breaking cutting-edge technology 
called The Interrupt. In fact, I am not sure who came up with this brilliant 
idea, but IBM popularized it with the PC/XT in 1981.

> >> But anyway, this is silly - why would you possibly object to the LIVE555
> >> event loop thread waking up every 10ms (and then going straight back to
> >> sleep in “select()” if nothing else is happening)?
> > 
> > Because it ruins power management obviously (and makes VLC look bad in
> > powertop).
> 
> I’m sorry - I just don’t buy that.

I don't care.

> We’re talking about maybe 1-10
> microseconds worth of code (on most modern CPUs) getting executed every
> 10ms.  That’s 0.1% CPU utilization at most.

My users and I care about Watt-hours, not (only) processor cycles.

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




More information about the vlc-devel mailing list