[mythtv] Channel change time improvements

Robert Johnston anaerin at gmail.com
Tue Jun 22 16:45:03 UTC 2010


On 22/06/2010 3:03 AM, James Courtier-Dutton wrote:
> Hi,
>
> I have done some more work looking at the channel change time.
> The main cause of the long channel change time is that myth deletes
> all the C++ objects of the old channel, waits for them to all
> disappear, and the creates new C++ objects for the new channel.
> The delete takes at least 2 seconds to do.
> I would suggest that it would be better if instead of deleting objects
> when changing channel, is to leave all the objects there, and just
> change to writing to a different filename. Much like log rotating.
>
> I did a lot of development on xine media player, which has a stream
> model from input to output.
> if the input stream changes, e.g. A DVD menu selection happens, the
> input is told to change to different content, the input inserts a
> control packet into the stream between the old content and the new.
> This allows downstream processes, e.g. codecs, to flush themselves
> correctly before starting to process the new content.
> This permits xine to react to DVD menu selections very quickly.
>
> I cannot find anywhere in myth where this "control packet" concept appears.
> Can someone point me to it if it exists, and if not, I will try to
> implement support for it.

What happens if the "Channel Change" happens across inputs? Or across 
backends?

If you are changing channel across inputs, you will need to tear down 
and rebuild the channel. So in theory this could be backgrounded (Don't 
wait for the objects to be destroyed before building the new ones), but 
if there is only one input, doing this will cause an error (As you're 
trying to open an object before it's been closed fully).



More information about the mythtv-dev mailing list