-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
[To: mad-dev@lists.mars.org, chris.wohlgemuth@cityweb.de]
On Tue, 5 Nov 2002, Joe Drew wrote:
The way mpg321 calculates size is:
if (is_constant_bit_rate(file)) do_straight_multiplication(); else if (has_xing(file)) read_xing(); else count_all_frames();
I'm a little concerned about do_straight_multiplication(); If the file has extra headers randomly placed about it, you can be off by a small amount (or perhaps large amount).
For my application, I'd tempted to try finding the time in the following order:
1. check file's extended attribute (OS/2ism here) 2. check for xing header 3. check for TLEN in ID3 v2 tag. 4. count frames 5. assume CBR and just multiply 6. give up
(3 could fail and 4 succeed if you are accessing data over HTTP and have a Content-Length field).
Anyone have a reference to a Xing specification?
Presumably the Bytes field is the number of decode bytes.
The TOC seems useless for byte perfect seeking since the locations are only approximate.
Thanks for everyone's help.
- -- Russell O'Connor http://www.math.berkeley.edu/~roconnor/ ``[Law enforcement officials] suggested that the activists were stopped not because their names are on the list, but because their names resemble those of suspected criminals or terrorists.'' -- SFGate.com