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

Download:
Audio-TagLib-1.43.tar.gz

Dependencies

Annotate this POD

CPAN RT

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

NAME ^

Audio::TagLib::MPEG::Header - An implementation of MP3 frame headers

SYNOPSIS ^

  use Audio::TagLib::MPEG::Header;
  
  my $i = Audio::TagLib::MPEG::Header->new($data);
  print $i->layer(), "\n"; # normally got 3

DESCRIPTION ^

This is an implementation of MPEG Layer III headers. The API follows more or less the binary format of these headers. Refer to http://www.mp3-tech.org/programmer/frame_header.html

new(ByteVector $data)

Parses an MPEG header based on $data.

new(Header $h)

Does a shallow copy of $h.

DESTROY()

Destroys this Header instance.

BOOL isValid()

Returns true if the frame is at least an appropriate size and has legal values.

%_Version

The MPEG Version. keys %Audio::TagLib::MPEG::Header::_Version lists all available values used in Perl code.

PV version()

Returns the MPEG Version of the header.

IV layer()

Returns the layer version. This will be between the values 1-3.

BOOL protectionEnabled()

Returns true if the MPEG protection bit is enabled.

IV bitrate()

Returns the bitrate encoded in the header.

IV sampleRate()

Returns the sample rate in Hz.

BOOL isPadded()

Returns true if the frame is padded.

%_ChannelMode

There are a few combinations or one or two channel audio that are possible. keys %Audio::TagLib::MPEG::Header::_ChannelMode lists all available values used in Perl code.

PV channelMode()

Returns the channel mode for this frame.

BOOL isCopyrighted()

Returns true if the copyrighted bit is set.

BOOL isOriginal()

Returns true if the "original" bit is set.

IV frameLength()

Returns the frame length.

copy(Header $h)

Makes a shallow copy of the 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: