[mythtv] ring buffer and live TV

Daniel Kristjansson danielk at cuymedia.net
Sat Apr 15 13:11:16 UTC 2006


On Sat, 2006-04-15 at 14:43 +0200, Felix Rubinstein wrote:
> Please see my posts on users list by topic "MythTV channel buffer"
> How is that possible to watch live TV and have PVR: pause, rewind,
> etc. functionality with S-Video/RCA connection?
> What was the intention of quite large delay?

MythTV needs to work on many different systems with different
video bitrates and different levels of hardware performance.
Hence the buffering requirements are somewhat conservative
compared to a dedicated piece of hardware. There are many
things that could be done to speed up channel changing without
ever touching the buffering code. But if you want this to improve,
you will have to implement it yourself as LiveTV performance
is not a huge priority for us. I would suggest benchmarking using
oprofile as the first step, to find the low hanging fruit.

Then there are other things you could do, for instance the ring
buffer estimates the number of bytes it needs in the buffer
based on the bitrate estimate from ffmeg, but this isn't always
accurate. Maybe if the backend communicated the number of frames
sent/written it would improve performance, maybe not. At one
point we found that regular expression parsing of the channel
entry code was consuming massive amounts of CPU on Mac OS X
machines, benchmarking might reveal another such surprise.
There are also many usleeps in the code where a QWaitCondition
would suffice. Just go at it, benchmark everything and attach
small independent patches to trac.

-- Daniel





More information about the mythtv-dev mailing list