[mythtv] Ticket #10414: HDHomeRun: Bad Recordings

Daniel Kristjansson danielk at cuymedia.net
Mon Mar 12 15:34:27 UTC 2012

On Mon, 2012-03-12 at 10:22 -0400, Raymond Wagner wrote:
> If the expense is in QDateTime's internal conversions from one type to 
> the next, is there any reason to not just use time() directly?  Looking 
> through recorderbase.cpp and recordingquality.cpp, I don't see anything 
> that has need for better than the second precision provided by time_t, 
> and QDateTime is just used for convenience with its toString() method.

Even just calling time() or using MythTimer::elapsed() would
cause us to enter the kernel context which we don't want to
do on every packet. Ideally we'd just use a timer that checks
if we've seen data since it was last fired. But since we're
not using a Qt event thread in the recorder we don't have
access to Qt timers. So what I've done is just introduce a
counter which get set to approximately the number of packets
seen in the every five seconds. Then we only update the time
when we've seen the appropriate number of packets.

-- Daniel

More information about the mythtv-dev mailing list