[mythtv] [mythtv-commits] Ticket #1356: DTVRecorder::FindKeyframes in 0.19 causes video gltiches in firewire recordings

Jim Westfall jwestfall at surrealistic.net
Sat Mar 4 22:15:08 UTC 2006


Steven Adeff <adeffs.mythtv at gmail.com> wrote [03.04.06]:
> On 3/4/06, Jim Westfall <jwestfall at surrealistic.net> wrote:
> > Been bugging the firewire driver folks with a patch that cuts cpu usage in
> > half.  I have been running it for a few days and it fixes glitches and
> > pre-buffer pauses I was seeing on livetv.
> >
> > You can try it if you want, it should apply to any recent 2.6 kernel.
> >
> > jim
> 
> hrm, little apprehensive on having to build a kernel for this, I think
> I'll wait for it to get included in the normal kernels.

yeah no problem, I dont blame ya.

> 
> What's the difference between the old method in mythtv and the new one
> that causes the new method to use more cpu?
> 

yeah I kinda thinks so.  

can anyone explain this part of ::FindKeyframes?

    // if packet contains start of PES packet, start
    // looking for first byte of MPEG start code (3 bytes 0 0 1)
    // otherwise, pick up search where we left off.
    const bool payloadStart = tspacket->PayloadStart();
    _header_pos = (payloadStart) ? 0 : _header_pos;

If the packet doesnt contain the start of a PES packet, which is what 
we are looking for, why do we process the packet?  

I would think we could short circuit on (!payloadStart && !_header_pos).

jim


More information about the mythtv-dev mailing list