[vlc-devel] [PATCH] Patch to fix bug #1532, and improve http seek times.
Bill C. Riemers
briemers at redhat.com
Mon Jun 16 15:56:24 CEST 2008
Laurent Aimar wrote:
> On Fri, Jun 13, 2008, Bill C. Riemers wrote:
>
>> I guess I simply don't understand how CAN_FASTSEEK is supposed to be
>> used. But it is pretty clear from this discussion, that AVI's
>> demux'ing is not an instance when FASTSEEK is needed. Seek times on
>> the order of 3x ping times is good enough for avi demux. So I will
>> correct the patch not to mark http has fastseek, and modify avi demux
>> not to require fast seek.
>>
> At start, FAST_SEEK was supposed to help demuxer choose their policy to
> read the data, stating that seeking too much will destroy performance.
>
> The avi demuxer will either:
> - seek for each sample when FAST_SEEK is true.
> - try to read data as they come when FAST_SEEK is not defined. It should
> work on correctly interleaved data but yes it is not perfect. Seeking should
> still be allowed (when requested by the user).
> - when both FAST_SEEK and SEEK are false, I think it uses the same code
> than !FASt_SEEK without allowing the user to seek.
>
>
In that case, the seek enhancement for http would obsolete the need for
such a policy decision. Just always request the seek, and the
thresholds determine if that seek is accomplished by just continuing to
read the data stream, or by taking some action to change the seek
position. The biggest problem with seeking is backwards seeking. The
only way I know of to efficiently handle streams that wish to frequently
seek backwards is to block level cache. Basically for block level
caching, you treat each file like it is logically a set of blocks, and
you store the most recently read blocks so there is no need to reread
data just because of a backwards seek.
However, I would hope that no-one would be insane enough to write video
codecs that require frequent backward seeks to demux.
> Btw, there is the same problem for .mp4 (except that the mp4 demuxer refuses
> to open file if !FAST_SEEK)
>
Hmmm. Well maybe if we get a fix in for avi's I can look at mp4 files next.
Bill
More information about the vlc-devel
mailing list