[RFC] Shutdown rewrite for 1.5.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 13, 2007 at 09:48:47PM +0100, Udo Richter wrote:
> >A more important suggestion: Could you please add a notification method
> >to status.h for notifying plugins whether VDR is currently in
> >interactive mode?  
> 
> You can poll this state on your own by calling 
> Shutdown.IsUserInactive(). There is currently no internal notification 
> anyway, VDR itself does poll it and would need to poll it to call 
> MsgSetSuspend.

Can you please explain to me why this could not be based on events?

While VDR is running, I would guess that the only way it can become
interactive is by receiving button events from the remote control unit.
You could have the RCU dispatcher thread (or any other place that
changes the flag) call MsgSetInteractive().  If this is not possible,
then you could declare a condition variable.  The main loop of the
main thread would check it with pthread_cond_timedwait() and call
MsgSetInteractive() when the status changes.

> The function itself is a light-weighted inline function, 
> so its no problem to poll it once a second from cPlugin::MainThreadHook 
> or similar.

Users would certainly prefer not to wait for a random time (0..1 seconds)
for VDR to become active.

In softdevice, this delay could be bypassed when softdevice is in charge
of the remote control unit.  But softdevice (or DirectFB) doesn't support
all types of remote control units.

	Marko


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux