Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Ang: Re: Ang: Re: Vorbis metadata

Ang: Re: Ang: Re: Vorbis metadata

From: <lear_at_algonet.se>
Date: 2005-06-20

>The existing Ogg parser (in the same way as all the other parsers)
>currently converts the sample count to a duration in ms before storing
>it with the metadata about the file. So yes, unless that part of
>Rockbox changes, the duration in ms is all that's needed.
>
>But how do you calculate the length in ms without calculating the total
>samples? Is that information stored somewhere in the Ogg headers?

Well, I don't do much, vorbisfile.c does. :) It appears to be based on the
granulepos, which is a part of each ogg page. And the problem with sample
count was that I had to remove some calculations related to a field called
pcm_offset, and I wasn't sure at the time what it was used for.

I've looked at the memory usage a bit now, and it isn't great. To get full
information (including length), it needs up to 120 kB or so, on the test
files I've used (and that's excluding some alloca() stuff). A bit much for
static allocation, though in the iRiver case, not too bad really. :)

Btw, I had a look at the existing Ogg parser, and I noticed it doesn't handled
chained streams well. In those cases there are several end-of-stream pages
in one file, and they should be accumulated for the total length.

  Magnus

_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on Mon Jun 20 16:00:09 2005


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa