[mythtv-commits] mythtv commit: r8448 by danielk
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Sat Dec 31 15:26:12 EST 2005
Author: danielk
Date: 2005-12-31 20:26:11 +0000 (Sat, 31 Dec 2005)
New Revision: 8448
Changeset: http://cvs.mythtv.org/trac/changeset/8448
Modified:
trunk/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
trunk/mythtv/libs/libmythtv/NuppelVideoPlayer.h
trunk/mythtv/libs/libmythtv/avformatdecoder.cpp
trunk/mythtv/libs/libmythtv/nuppeldecoder.cpp
trunk/mythtv/libs/libmythtv/videobuffers.cpp
trunk/mythtv/libs/libmythtv/videobuffers.h
trunk/mythtv/libs/libmythtv/videoout_xv.cpp
trunk/mythtv/libs/libmythtv/videoout_xv.h
trunk/mythtv/libs/libmythtv/videooutbase.cpp
trunk/mythtv/libs/libmythtv/videooutbase.h
Log:
References #868. Makes most DiscardFrames() calls safe.
The old VideoBuffers::DiscardFrames() could only be called safely if the next frame decoded was a keyframe. This adds a parameter to the function 'next_frame_keyframe' if this is false only frames not in limbo are discarded and the list of frames in use by the decoder is not cleared. If 'next_frame_keyframe' is true the old DiscardFrames() is used.
There are only three remaining places where DiscardFrames() is called unsafely, one is when the prebuffer wait has timed out 100 times, and the other is when GetNextFreeFrame() is called with 'allow_unsafe' set to true and there are no frames available for decoding onto. Both of these are designed to prevent deadlock in some pretty dreadful error states so I think it is best to leave these as is. The final case is with XvMC, this is needed just because there are not enough frames available in the nVidia XvMC implementation to handle all seek in all cases. I would recomend not attempting to edit recordings with XvMC enabled anyway.
What this commit means in practice is fewer 'timed out' messages and fewer 'GetNextFreeFrames() returned busy frame, discarding' messages. Which means some seeks will be a little faster, and those bits of code where DiscardFrames() needs to be called unsafely is reduced. This in turn means you'll be less likely to see distorted frames after a seek.
More information about the mythtv-commits
mailing list