[vdr] Eggtimer-0.9.1 thread won't end
Peter Juszack
vdr at unterbrecher.de
Fri Mar 24 10:52:54 CET 2006
C.Y.M wrote:
> I wanted to test this "eggtimer-0.9.1" plugin with vdr-1.3.44 and it seems to
> work pretty well. But, when I have the eggtimer switch to a specific channel on
> a timer, I get the following error message when I try to change channels
> manually after the eggtimer switched the channel.
>
> vdr: [13902] ERROR: Eggtimer thread 13902 won't end (waited 30 seconds) -
> canceling it...
>
> Has anyone seen this error?
>
> Best Regards,
>
> _______________________________________________
> vdr mailing list
> vdr at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
I tried to reproduce the problem but things worked well on my
2-card-system. Eggtimer switched
channel, I was able to zap to another transponder, start a recording
there and then zapped to channel
that was provided by a third transponder - worked so far.
I then started VDR with only one device and got the same error as
mentioned by C.Y.M.
Do I have to lock/unlock the cDevice when switching to a channel?
I think the error must be within that code:
void cEggtimerThread::Stop(void) {
#ifdef DEBUG
printf("cEggtimerThread::Stop\n" );
#endif
running = false;
Cancel(30);
}
void cEggtimerThread::Action(void) {
#ifdef DEBUG
printf("cEggtimerThread::Action\n" );
#endif
while ( running ) {
// time is over ?
if (eggtimer->TimeReached()) {
switch (eggtimer->action) {
case EGGTIMER_ACTION_SWITCH: { // switch to channel
cChannel *chan = Channels.GetByNumber(
eggtimer->channel );
cDevice *device = cDevice::ActualDevice();
if ( chan == NULL || device == NULL ||
!device->SwitchChannel(chan , true) ) {
#if VDRVERSNUM < 10314
Interface->Error( tr("Eggtimer: could not switch
channel") );
#else
Skins.Message( mtError, tr("Eggtimer: could not
switch channel") );
#endif
}
Stop(); // Stop eggtimer thread
} break;
case EGGTIMER_ACTION_MSG: { // OSD message
time_t now = time(NULL); // for repeating messages
we need
// current time
// If 2.5 * MessageTime (VDR Setup) has expired =>
display again
if (now - lastInfo >= (int) (2.5 *
Setup.OSDMessageTime) ) {
// Display a status msg for OSDMessageTime seconds
#if VDRVERSNUM < 10307
Interface->Status( eggtimer->msg );
usleep( Setup.OSDMessageTime * 1000);
Interface->Status( NULL );
#else
Skins.Message( mtStatus, eggtimer->msg );
cCondWait::SleepMs( Setup.OSDMessageTime * 1000);
Skins.Message( mtStatus, NULL );
#endif
// remember time when message was displayed
lastInfo = now;
}
} break;
case EGGTIMER_ACTION_COMMAND: { // Execute command
cCommand *command = Commands.Get(
eggtimer->command );
if (command != NULL) {
command->Execute();
} else
#if VDRVERSNUM < 10314
Interface->Error( tr("Eggtimer: command not
found") );
#else
Skins.Message( mtError, tr("Eggtimer:
command not found") );
#endif
Stop();
} break;
}
}
// Sleep 0.5 seconds
#if VDRVERSNUM < 10314
usleep(500000);
#else
cCondWait::SleepMs(500);
#endif
}
if (eggtimer != NULL)
delete eggtimer;
}
Thanks for any hints
http://www.wi-bw.tfh-wildau.de/~pjuszack/digicam
More information about the vdr
mailing list