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
-
getBitrate()
- Returns (in KB/s) the bitrate of the MPEG audio file.
-
getChannelMode()
- Returns the channel mode of the file.
-
getFileSize()
- Returns the number of bytes of audio data in this file.
-
getID3()
- Returns the ID3 tag contained inside the file.
-
getIntensityBands()
- Returns a numeric code indicating the frequency bands for which
intensity stereo was applied.
-
getLayer()
- Returns the MPEG audio layer number.
-
getLength()
- Returns the length of the audio data in milliseconds.
-
getSamplingRate()
- Returns the sampling rate of the MPEG audio file.
-
getVersion()
- Returns the version of the MPEG audio file.
-
isCopyright()
- Returns true if the copyright bit is set, false otherwise.
-
isCRCProtected()
- Returns true if the file contains CRC protection data, false otherwise.
-
isIntensityStereo()
- Returns true if the file uses intensity stereo.
-
isMSStereo()
- Returns true if the file uses m/s stereo.
-
isOriginal()
- Returns true if the original bit is set, false otherwise.
-
isVBR()
- Returns true if the MPEG audio file has a variable bit rate (VBR), false
if the bit rate is constant (CBR).
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
getLayer
public abstract int getLayer()
- Returns the MPEG audio layer number. Valid values are 1, 2, and 3.
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).
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.
getSamplingRate
public abstract int getSamplingRate()
- Returns the sampling rate of the MPEG audio file. The value is in
samples per second.
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
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.
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.
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
getLength
public abstract long getLength()
- Returns the length of the audio data in milliseconds.
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.
isCRCProtected
public abstract boolean isCRCProtected()
- Returns true if the file contains CRC protection data, false otherwise.
isCopyright
public abstract boolean isCopyright()
- Returns true if the copyright bit is set, false otherwise.
isOriginal
public abstract boolean isOriginal()
- Returns true if the original bit is set, false otherwise.
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