[MPlayer-users] Problem changing channel with DVB + Solution

Nico Sabbi nsabbi at tiscali.it
Thu May 27 10:27:22 CEST 2004


Oliver Rauch wrote:

>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;
>   }
> }
>
>
>  
>

ok, but the driver shouldn't signals FE_HAS_LOCK if doesn't really have it;
btw I will enable your patch with an option to -dvbin

I was thinking that if tuning fails mplayer should go back to the 
channel you came from,
in order not to quit. I will add this code when I have my connection 
restored :(


Thanks,
       Nico




More information about the MPlayer-users mailing list