[mythtv-firehose] mythtv/master commit: 57b2cddc4 by Gavin Hurlbut (Beirdo)
MythTV
noreply at mythtv.org
Thu Jul 14 04:56:28 UTC 2011
Author: Gavin Hurlbut <ghurlbut at mythtv.org>
Change Date: 2011-07-13T21:47:57-07:00
Push Date: 2011/07/13 21:56:22 -0700
Repository: mythtv
Branch: master
New Revision: 57b2cddc4d52a4231e1d441b510131e4090e68d9
Changeset: https://github.com/MythTV/mythtv/commit/57b2cddc4
Log:
Fixed preview generation (at least for my case)
Fixes #9904
This was a death by many papercuts
1) seeking to the end of file seems to miss the last entry in the recordedseek
table. I left this as is.
2) seeking to the end of file does a linear search to find the frame. The one
thing I changed here was to make it actually fast-forward to the last known
frame position before starting the search. In the preview case, it was
doing a linear search from frame 0 to the last frame in the file, which took
longer than the timeout period. This fixed the timeouts by jumping as far
as we can first.
3) we were seeking to the end of the file due to a uint64 overflow caused by
doing an unqualified "frame - 1" even if frame was 0. The MAX_UINT64 value
was then capped to the last frame number pre-seek. I changed this to only
subtract 1 if the value wasn't 0, and to use 0 if it was 0.
4) we were asking for position 0 as the logic in the previewgenerator told it
to. if the value was 0 (which it always is on remote previews!), the code
fell through to ask for frame 0 (which then got buggered by the above
problems). I changed the logic such that it would instead seek to 1/3 into
the program as we originally desired.
Caveat: I do not yet know how this will act with a recording in progress,
however we do rebuild a preview (AFAIK) when the show finishes recording.
I also don't know how the code changed such that this started happening, but
whatever. It seems to be fixed again.
Modified:
mythtv/libs/libmythtv/decoderbase.cpp
mythtv/libs/libmythtv/mythplayer.cpp
mythtv/libs/libmythtv/previewgenerator.cpp
More information about the mythtv-firehose
mailing list