[mythtv] Re: [mythtv-commits] Re: Ticket #126: DVB: avoid unnecessary tuning when already tuned to the target transponder

John Pullan john.pullan at gmail.com
Tue Jul 26 06:46:58 EDT 2005


On 26/07/05, Marcus Metzler <mocm at mocm.de> wrote:
> >>>>> "Pekka" == Pekka Jääskeläinen <pekka.jaaskelainen at gmail.com> writes:
> 
>     >> No the delay is longer, I'm just saying that these are the
>     >> timings from the tune part of the code. (Move this back to
>     >> -dev)
> 
>     Pekka> OK, so the delay is probably the same for you.
> 
>     Pekka> Are you familiar with the DVB code? I started to wonder
>     Pekka> that if it's the prebuffering that causes the annoying
>     Pekka> delay, could one prebuffer in background all the time
>     Pekka> different transponders (as many as possible) so that when
>     Pekka> channel is changed, the buffer is already filled? I could
>     Pekka> implement this if somebody who knows the code could say
>     Pekka> whether it's possible without rewriting most of the code
>     Pekka> base.
> 
> Tuning times vary widely with the cards. There are cards that can tune
> in .3 secs and others that need 2 secs or even more time (I am talking
> about DVB-S). In addition to the tuning time you have the time you
> need until you can start decoding the MPEG stream, which depends on
> the position of the first I-frame and of course on how your program
> handles setting the demuxer and extracting the stream from the driver.
> 

Can remove some of this by disabling the key frame sync. (Makes things
look ugly though)

> The main problem is to write tuning software that works with all types
> of cards and is still as fast as possible. of course you can always
> tune the delays to your own situation and get much better switching times.
> 
> You could also use some tricks to reduce tuning times, e.g.
> 
> 1) Only tune if you have to, i.e. when you change transponders.
> 2) Only switch the parameters that change between transponders,
>    i.e. leave polarity and diseqc settings alone when they don't change.
> 

1. should be true now. 
2. not sure if it's true or not.

David Shirley did write a while back :
> in libs/libmythtv/dvbsiparser.cpp -> DVBSIParser::StartSectionReader
>
> the line (approx #242)
>
> int ret = poll(pollArray, pollLength, 1000);
>
> is causing the initial tuning process to be blown out by 1 second.
> 
> Probably because the pollArray hasn't been initialised to grab PMT by the
> time this function gets called.
>
> easy fix was to decrease the 1000ms to 10ms so the first time round it
> hits the timeout - outcome was 1 second improvment in channel
> changing/tuning.
> 
> but i suspect a better fix would be to only start the StartSectionReader
> after we want to grab the initial PMT.

Which might be a better place to start (?)

-- 
John


More information about the mythtv-dev mailing list