Dongxu Ma > Audio-TagLib-1.43 > Audio::TagLib::MPEG::XingHeader

Download:
Audio-TagLib-1.43.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 1.41   Source   Latest Release: Audio-TagLib-1.50_01

NAME ^

Audio::TagLib::MPEG::XingHeader - An implementation of the Xing VBR headers

SYNOPSIS ^

  use Audio::TagLib::MPEG::XingHeader;
  
  my $i = Audio::TagLib::MPEG::XingHeader->new($data);
  print $i->isValid() ? "valid" : "invalid", "\n";

DESCRIPTION ^

This is a minimalistic implementation of the Xing VBR headers. Xing headers are often added to VBR (variable bit rate) MP3 streams to make it easy to compute the length and quality of a VBR stream. Our implementation is only concerned with the total size of the stream (so that we can calculate the total playing time and the average bitrate). It uses http://home.pcisys.net/~melanson/codecs/mp3extensions.txt and the XMMS sources as references.

new(ByteVector $data)

Parses a Xing header based on $data. The data must be at least 16 bytes long (anything longer than this is discarded).

DESTROY()

Destroy this XingHeader instance

BOOL isValid()

Returns true if the data was parsed properly and if there is a vaild Xing header present.

UV totalFrames()

Returns the total number of frames.

UV totalSize()

Returns the total size of stream in bytes.

IV xingHeaderOffset(PV $version, PV $channelMode) [static]

Returns the offset for the start of this Xing header, given the version and channels of the frame

see Audio::TagLib::MPEG::Header

EXPORT

None by default.

SEE ALSO ^

Audio::TagLib

AUTHOR ^

Dongxu Ma, <dongxu@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: