[MPlayer-users] Problem changing channel with DVB + Solution
Oliver Rauch
Rauch-Gifhorn at T-Online.de
Thu May 27 01:05:29 CEST 2004
Hello.
When I changed the DVB-T channel mplayer was not able to read the stream
and exited in 9 of 10 cases.
mplayer: MPlayer 1.0pre3try2-3.2.2
DVB-T: Hauppauge WINTV Nova-T (DVB-T) (PCI card based on Technotrend)
Reason: FE_LOCK is not always stable when the channel just has been
changed.
Solution:
- make sure FE_LOCK is stable for more than one request (e.g. 3-10)
- to keep channel changing time constant: reduce poll timeout
in libmpdemux/dvb_tune.c, function: check_status(...) for HAVE_DVB_HEAD:
I hope it is usefull.
Best regards
Oliver
suggested code:
int lock_count = 0;
....
event.status=0;
/* TEST CONDITION CHANGED */
while (((event.status & FE_TIMEDOUT)==0) && (lock_count < 6))
{
mp_msg(MSGT_DEMUX, MSGL_V, "polling....\n");
if (poll(pfd,1,500)) /* TIMEOUT CHANGED */
{
if (pfd[0].revents & POLLIN)
{
mp_msg(MSGT_DEMUX, MSGL_V, "Getting frontend event\n");
if ( ioctl(fd_frontend, FE_GET_EVENT, &event) < 0)
{
mp_msg(MSGT_DEMUX, MSGL_ERR, "FE_GET_EVENT");
return -1;
}
}
print_status(event.status);
}
/* NEW */
if (event.status & FE_HAS_LOCK)
{
lock_count ++;
}
else
{
lock_count = 0;
}
}
More information about the MPlayer-users
mailing list