[vlc-devel] byte ranges in vlc HTTP requests

Rémi Denis-Courmont remi at remlab.net
Sun Jul 12 21:02:12 CEST 2009


Le dimanche 12 juillet 2009 21:26:19 Rainer Joswig, vous avez écrit :
> Why doesn't it request byte ranges of  0-198511 and 198512-397023  ?
> Why not ask the web server for a specific byte range like above?
>
> How is VLC's current transfer method supposed to work? Is there a
> description of what is implemented?
>
> VLC requests bytes from 0 to the end of the data source, but then ends
> the transfer some point (?) and requests a new range from some number
> to the end?
> Is that a good idea?

VLC just follows the usual file I/O API pattern: open, close, read, seek. When 
seek occurs, VLC will abort the current request and start a new one from a new 
offset.

There is an internal buffer to limit the number of seeks, but it does not 
alwways work. Also, the seeking pattern depends a lot on the actual format of 
the HTTP entity. Reading data from some (crappy) format is impossible without 
seeking. Also, VLC needs to seek if the user tries to seek the currently 
playing media item.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list