[Tremor] Clarification regarding the stream seeking in Tremor
xiphmont at xiph.org
xiphmont at xiph.org
Mon Jun 18 14:54:28 PDT 2007
On 4/4/07, Bharan Giridhar <bharan.giridhar at gmail.com> wrote:
> This is regarding a small clarification regarding stream seeking in tremor.
> The original tremor code (low-branch version) uses std file i/o functions
> and file seeking functions such as fseek. However, as we need to implement
> the code on a SHARC DSP, we need to get rid of the std file i/o and replace
> it with our own callbacks. But in the blackfin port of the vorbis player
> that you mailed us some time back, you have disabled the seek_callback
> (basically now returning only a -1), adding a comment that the stream is not
> seekable. How did you manipulate the all the occurrences of the fseek (i.e.
> seek_func) in the code that are used to chk whether input is a valid ogg
> vorbis file or not? Because, if we simply disable the fseek function, the
> vorbis test fails.
Returning -1 for the seek_callback causes vorbisfile to treat the file
as nonseekable, and it will read the file strictly as a stream. In
this case, the custom fseek() must always return -1, regardless the
situation.
If the file is being rejected as not Vorbis, there is some other
problem. Disallowing seeks will also make vorbisfile less tolerant of
files that don't adhere to the spec properly (eg, files with ID3 tags,
which are illegal as they break Ogg paging), or it could simply be
exposing some other bug. Obviously, *something* isn't working....
Monty
More information about the Tremor
mailing list