Re: [vdr] VDR not cleaning .del directories

2018-01-21 Thread Teemu Suikki
2018-01-21 15:46 GMT+02:00 Klaus Schmidinger :
> As long as a cPlayer (or a cReceiver, for that matter) is attached to
> a cDevice, VDR will not perform its housekeeping tasks. This is to
> avoid any problems during replay or recording, possibly caused by
> heavy disk access.

Ah, I see.. I think softhddevice uses the dummy player to receive
keypresses, so it can exit from suspend on demand.

But the full check in vdr.c is this:

   if ((Now - LastInteract) > ACTIVITYTIMEOUT &&
!cRecordControls::Active() && !RecordingsHandler.Active() &&
!Interface->HasSVDRPConnection() && (Now - cRemote::LastActivity()) >
ACTIVITYTIMEOUT) {


So, there is a separate check for active recordings, and user activity
(cRemote)..

I think I just remove the LastInteract check. I think it is not really
useful on my current system anyway. I have a commercial detector
running after each recording, and it will run no matter what.. There
could be another active recording going, or playback or whatever. VDR
housekeeping is a  much lighter process.

And currently the check works pretty much the wrong way around.. :) If
softhddevice is suspended and vdr left "idle", it will never enter
housekeeping because of the check.

-- 
Teemu Suikki
http://www.z-power.fi/

___
vdr mailing list
vdr@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR not cleaning .del directories

2018-01-21 Thread Klaus Schmidinger

On 19.01.2018 18:48, Teemu Suikki wrote:

I'm starting to think that maybe my problem IS caused entirely by this
softhddevice bug. Because my softhddevice keep freezing quite
frequently, I have added a shutdown command that detaches softhddevice
and leaves vdr running. And then when I watch something, I'm pressing
buttons and using menus and there might be timers recording etc, so
vdr never becomes idle enough to do the housekeeping?

I tried to understand the code, but I'm having difficulties. :) in
vdr.c, only place that sets LastInteract is this:

 Interact = Menu ? Menu : cControl::Control(); // might have
been closed in the mean time
 if (Interact) {
LastInteract = Now;
eOSState state = Interact->ProcessKey(key);
if (state == osUnknown && Interact != cControl::Control()) {

So.. Does this mean that softhddevice's dummy player has menu open all
the time? softhddevice.cpp doesn't have really anything menu-related
in the dummy player, all those methods must be inherited from main vdr
class.

Only thing that looks suspicious is this, dummy player's ProcessKey:

eOSState cSoftHdControl::ProcessKey(eKeys key)
{
 if (SuspendMode == SUSPEND_NORMAL && (!ISMODELESSKEY(key)
 || key == kMenu || key == kBack || key == kStop)) {
 delete Player;

 Player = NULL;
 Resume();
 SuspendMode = NOT_SUSPENDED;
 return osEnd;
 }
 return osContinue;
}

Should it really return osContinue all the time?


As long as a cPlayer (or a cReceiver, for that matter) is attached to
a cDevice, VDR will not perform its housekeeping tasks. This is to
avoid any problems during replay or recording, possibly caused by
heavy disk access.

Klaus


___
vdr mailing list
vdr@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr