All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface joeshmoe.mpeg.MPEGInfo

public interface MPEGInfo
A class which implements this interface contains information about an MPEG audio file.

See Also:
MPEGProber

Method Index

 o getBitrate()
Returns (in KB/s) the bitrate of the MPEG audio file.
 o getChannelMode()
Returns the channel mode of the file.
 o getFileSize()
Returns the number of bytes of audio data in this file.
 o getID3()
Returns the ID3 tag contained inside the file.
 o getIntensityBands()
Returns a numeric code indicating the frequency bands for which intensity stereo was applied.
 o getLayer()
Returns the MPEG audio layer number.
 o getLength()
Returns the length of the audio data in milliseconds.
 o getSamplingRate()
Returns the sampling rate of the MPEG audio file.
 o getVersion()
Returns the version of the MPEG audio file.
 o isCopyright()
Returns true if the copyright bit is set, false otherwise.
 o isCRCProtected()
Returns true if the file contains CRC protection data, false otherwise.
 o isIntensityStereo()
Returns true if the file uses intensity stereo.
 o isMSStereo()
Returns true if the file uses m/s stereo.
 o isOriginal()
Returns true if the original bit is set, false otherwise.
 o isVBR()
Returns true if the MPEG audio file has a variable bit rate (VBR), false if the bit rate is constant (CBR).

Methods

 o getVersion
 public abstract int getVersion()
Returns the version of the MPEG audio file.
1 - MPEG1
2 - MPEG2
Currently, only MPEG1 and MPEG2 are supported. MPEG2.5 files will simple be classified as MPEG2 and certain pieces of information about the files may be incorrect.

See Also:
ID3Tagger
 o getLayer
 public abstract int getLayer()
Returns the MPEG audio layer number. Valid values are 1, 2, and 3.

 o isVBR
 public abstract boolean isVBR()
Returns true if the MPEG audio file has a variable bit rate (VBR), false if the bit rate is constant (CBR).

 o getBitrate
 public abstract int getBitrate()
Returns (in KB/s) the bitrate of the MPEG audio file. For CBR files, this is the actual bitrate of the file. For VBR, this is the average bitrate across the entire file.

 o getSamplingRate
 public abstract int getSamplingRate()
Returns the sampling rate of the MPEG audio file. The value is in samples per second.

 o getChannelMode
 public abstract int getChannelMode()
Returns the channel mode of the file. Valid values are:
1 - True stereo
2 - Joint stereo
3 - Dual channel (2 mono channels)
4 - Single channel mono

 o isIntensityStereo
 public abstract boolean isIntensityStereo()
Returns true if the file uses intensity stereo. This only applies if the channel mode is joint stereo. All other channel modes will return false. Layer 1 and layer 2 MPEG audio files will always return true. For these files, you can call getIntensityBands to determine the frequency bands where intensity stereo is applied. For layer 3 files, this method may return false.

 o isMSStereo
 public abstract boolean isMSStereo()
Returns true if the file uses m/s stereo. This may return true if the file is layer 3 and channel mode is joint stereo. All other channel modes and layers will always return false.

 o getIntensityBands
 public abstract int getIntensityBands()
Returns a numeric code indicating the frequency bands for which intensity stereo was applied. This will return -1 for all files that are not encoded in joint stereo or for all layer 3 joint stereo files. The valid return values are:
-1 - not applicable
1  - bands 4 to 31
2  - bands 8 to 31
3  - bands 12 to 31
4  - bands 16 to 31

 o getLength
 public abstract long getLength()
Returns the length of the audio data in milliseconds.

 o getFileSize
 public abstract long getFileSize()
Returns the number of bytes of audio data in this file. This number is not always equal to the actual size of the file because of extra header information and/or an ID3 tag.

 o isCRCProtected
 public abstract boolean isCRCProtected()
Returns true if the file contains CRC protection data, false otherwise.

 o isCopyright
 public abstract boolean isCopyright()
Returns true if the copyright bit is set, false otherwise.

 o isOriginal
 public abstract boolean isOriginal()
Returns true if the original bit is set, false otherwise.

 o getID3
 public abstract ID3Tag getID3()
Returns the ID3 tag contained inside the file. If there is no ID3 tag, null is returned.


All Packages  Class Hierarchy  This Package  Previous  Next  Index