|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tika.parser.mp3.AudioFrame
public class AudioFrame
An Audio Frame in an MP3 file. These come after the ID3v2 tags in the file. Currently, only the header is processed, not the raw audio data.
| Field Summary | |
|---|---|
static int |
LAYER_1
Constant for audio layer 1. |
static int |
LAYER_2
Constant for audio layer 2. |
static int |
LAYER_3
Constant for audio layer 3. |
static int |
MPEG_V1
Constant for the MPEG version 1. |
static int |
MPEG_V2
Constant for the MPEG version 2. |
static int |
MPEG_V2_5
Constant for the MPEG version 2.5. |
| Constructor Summary | |
|---|---|
AudioFrame(InputStream stream,
ContentHandler handler)
Deprecated. Use the constructor which is passed all values directly. |
|
AudioFrame(int h1,
int h2,
int h3,
int h4,
InputStream in)
Deprecated. Use the constructor which is passed all values directly. |
|
AudioFrame(int mpegVersion,
int layer,
int bitRate,
int sampleRate,
int channels,
int length,
float duration)
Creates a new instance of AudioFrame and initializes all properties. |
|
| Method Summary | |
|---|---|
int |
getBitRate()
Get the bit rate in bit per second. |
int |
getChannels()
Get the number of channels (1=mono, 2=stereo) |
float |
getDuration()
Returns the duration in milliseconds. |
int |
getLayer()
Get the audio layer code. |
int |
getLength()
Returns the frame length in bytes. |
int |
getSampleRate()
Get the sampling rate, in Hz |
String |
getVersion()
|
int |
getVersionCode()
Get the version code. |
static boolean |
isAudioHeader(int h1,
int h2,
int h3,
int h4)
Does this appear to be a 4 byte audio frame header? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MPEG_V1
public static final int MPEG_V2
public static final int MPEG_V2_5
public static final int LAYER_1
public static final int LAYER_2
public static final int LAYER_3
| Constructor Detail |
|---|
@Deprecated
public AudioFrame(InputStream stream,
ContentHandler handler)
throws IOException,
SAXException,
org.apache.tika.exception.TikaException
IOException
SAXException
org.apache.tika.exception.TikaException
@Deprecated
public AudioFrame(int h1,
int h2,
int h3,
int h4,
InputStream in)
throws IOException
IOException
public AudioFrame(int mpegVersion,
int layer,
int bitRate,
int sampleRate,
int channels,
int length,
float duration)
AudioFrame and initializes all properties.
mpegVersion - the code for the MPEG versionlayer - the code for the layerbitRate - the bit rate (in bps)sampleRate - the sample rate (in samples per second)channels - the number of channelslength - the frame length (in bytes)duration - the duration of this frame (in milliseconds)| Method Detail |
|---|
public String getVersion()
public int getSampleRate()
public int getChannels()
public int getVersionCode()
MPEG constants)public int getLayer()
LAYER constants)public int getBitRate()
public int getLength()
public float getDuration()
public static boolean isAudioHeader(int h1,
int h2,
int h3,
int h4)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||