|
|||||||||
| Home >> All >> joeshmoe >> [ mpeg overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
joeshmoe.mpeg
Interface MPEGInfo

- All Known Implementing Classes:
- ProbedMPEGInfo
- public interface MPEGInfo
A class which implements this interface contains information about an MPEG audio file.
| Method Summary | |
int |
getBitrate()
Returns (in KB/s) the bitrate of the MPEG audio file. |
int |
getChannelMode()
Returns the channel mode of the file. |
long |
getFileSize()
Returns the number of bytes of audio data in this file. |
ID3Tag |
getID3()
Returns the ID3 tag contained inside the file. |
int |
getIntensityBands()
Returns a numeric code indicating the frequency bands for which intensity stereo was applied. |
int |
getLayer()
Returns the MPEG audio layer number. |
long |
getLength()
Returns the length of the audio data in milliseconds. |
int |
getSamplingRate()
Returns the sampling rate of the MPEG audio file. |
int |
getVersion()
Returns the version of the MPEG audio file. |
boolean |
isCopyright()
Returns true if the copyright bit is set, false otherwise. |
boolean |
isCRCProtected()
Returns true if the file contains CRC protection data, false otherwise. |
boolean |
isIntensityStereo()
Returns true if the file uses intensity stereo. |
boolean |
isMSStereo()
Returns true if the file uses m/s stereo. |
boolean |
isOriginal()
Returns true if the original bit is set, false otherwise. |
boolean |
isVBR()
Returns true if the MPEG audio file has a variable bit rate (VBR), false if the bit rate is constant (CBR). |
| Method Detail |
getVersion
public int getVersion()
- Returns the version of the MPEG audio file.
1 - MPEG1
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.
2 - MPEG2
getLayer
public int getLayer()
- Returns the MPEG audio layer number. Valid values are 1, 2, and 3.
isVBR
public 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 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 int getSamplingRate()
- Returns the sampling rate of the MPEG audio file. The value is in
samples per second.
getChannelMode
public 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 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 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 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 long getLength()
- Returns the length of the audio data in milliseconds.
getFileSize
public 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 boolean isCRCProtected()
- Returns true if the file contains CRC protection data, false otherwise.
isCopyright
public boolean isCopyright()
- Returns true if the copyright bit is set, false otherwise.
isOriginal
public boolean isOriginal()
- Returns true if the original bit is set, false otherwise.
getID3
public ID3Tag getID3()
- Returns the ID3 tag contained inside the file. If there is no ID3
tag, null is returned.
|
|||||||||
| Home >> All >> joeshmoe >> [ mpeg overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC