Help: I need a proper method to detect 99% of all mp3 files
Scott Wheeler
wheeler at kde.org
Tue Jul 6 13:52:42 BST 2004
On Tuesday 06 July 2004 12:49, Matthias Welwarsky wrote:
> Well, the proper method is to parse the bitstream and see if it is compliant
> to the standard. This is both quick and reliable, and works with and without
> tags.
Well, except for the quick part. ;-)
Operations like this are bound by disk speed, not code complexity or CPU time.
Unfortunately TagLib doesn't contain anything for doing authoritative
verification of mp3 files -- it mostly leaves this up to the mimetype
recognition being used by the software using TagLib. TagLib does however
contain an implementation of MPEG headers and a mechanism for finding these
in a file that could be useful in such a tool.
See:
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdesupport/taglib/mpeg/mpegheader.h?rev=1.4&content-type=text/x-cvsweb-markup
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdesupport/taglib/mpeg/mpegfile.h?rev=1.27&content-type=text/x-cvsweb-markup
-Scott
More information about the kde-multimedia
mailing list