|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.monte.media.avi.AbstractAVIStream
org.monte.media.avi.AVIInputStream
public class AVIInputStream
Provides low-level support for reading encoded audio and video samples from an AVI 1.0 file.
The length of an AVI 1.0 file is limited to 1 GB. This class supports lengths of up to 4 GB, but such files may not work on all players.
For detailed information about the AVI 1.0 file format see:
msdn.microsoft.com AVI RIFF
www.microsoft.com FOURCC for Video Compression
www.saettler.com RIFF
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.monte.media.avi.AbstractAVIStream |
|---|
AbstractAVIStream.AudioTrack, AbstractAVIStream.AVIMediaType, AbstractAVIStream.Chunk, AbstractAVIStream.CompositeChunk, AbstractAVIStream.DataChunk, AbstractAVIStream.FixedSizeDataChunk, AbstractAVIStream.MainHeader, AbstractAVIStream.MidiTrack, AbstractAVIStream.Sample, AbstractAVIStream.TextTrack, AbstractAVIStream.Track, AbstractAVIStream.VideoTrack |
| Field Summary | |
|---|---|
protected java.util.ArrayList<AbstractAVIStream.Sample> |
idx1
|
protected javax.imageio.stream.ImageInputStream |
in
The image input stream. |
protected AbstractAVIStream.MainHeader |
mainHeader
|
| Fields inherited from class org.monte.media.avi.AbstractAVIStream |
|---|
AVI_ID, AVIH_FLAG_COPYRIGHTED, AVIH_FLAG_HAS_INDEX, AVIH_FLAG_IS_INTERLEAVED, AVIH_FLAG_MUST_USE_INDEX, AVIH_FLAG_TRUST_CK_TYPE, AVIH_FLAG_WAS_CAPTURE_FILE, AVIH_ID, HDRL_ID, IDX1_ID, LIST_ID, MOVI_ID, out, REC_ID, STRD_ID, streamOffset, STRF_ID, STRH_FLAG_DISABLED, STRH_FLAG_VIDEO_PALETTE_CHANGES, STRH_ID, STRL_ID, STRN_ID, tracks |
| Constructor Summary | |
|---|---|
AVIInputStream(java.io.File file)
Creates a new instance. |
|
AVIInputStream(javax.imageio.stream.ImageInputStream in)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected void |
ensureRealized()
Ensures that all meta-data has been read from the file. |
long |
getChunkCount(int track)
Returns the number of media data chunks in the track. |
byte[] |
getExtraHeader(int track,
java.lang.String fourcc)
Returns the contents of the extra track header. |
java.lang.String[] |
getExtraHeaderFourCCs(int track)
Returns the fourcc's of all extra stream headers. |
int |
getHeaderFlags()
Returns the main header flags. |
long |
getMicroSecPerFrame()
Returns the number of microseconds (10^-6 seconds) per frame. |
java.lang.String |
getName(int track)
Returns the name of the track, or null if the name is not specified. |
long |
getStartTime(int track)
Returns the start time of the track given as the number of frames in microSecPerFrame units. |
long |
getTimeScale(int track)
Returns the time scale of the specified track. |
int |
getTrackCount()
|
java.awt.Dimension |
getVideoDimension()
|
protected void |
readAllMetadata()
Reads all metadata of the file. |
| Methods inherited from class org.monte.media.avi.AbstractAVIStream |
|---|
getRelativeStreamPosition, intToType, isFlagSet, seekRelative, typeToInt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final javax.imageio.stream.ImageInputStream in
protected AbstractAVIStream.MainHeader mainHeader
protected java.util.ArrayList<AbstractAVIStream.Sample> idx1
| Constructor Detail |
|---|
public AVIInputStream(java.io.File file)
throws java.io.IOException
file - the input file
java.io.IOException
public AVIInputStream(javax.imageio.stream.ImageInputStream in)
throws java.io.IOException
in - the input stream.
java.io.IOException| Method Detail |
|---|
protected void ensureRealized()
throws java.io.IOException
java.io.IOException
public int getHeaderFlags()
throws java.io.IOException
AVIH_... values.
java.io.IOException
public java.awt.Dimension getVideoDimension()
throws java.io.IOException
java.io.IOException
public int getTrackCount()
throws java.io.IOException
java.io.IOException
public long getMicroSecPerFrame()
throws java.io.IOException
java.io.IOException
public long getTimeScale(int track)
throws java.io.IOException
java.io.IOException
public long getStartTime(int track)
throws java.io.IOException
java.io.IOException
public long getChunkCount(int track)
throws java.io.IOException
track -
java.io.IOException
public java.lang.String getName(int track)
throws java.io.IOException
java.io.IOException
public byte[] getExtraHeader(int track,
java.lang.String fourcc)
throws java.io.IOException
track - fourcc -
java.io.IOException
public java.lang.String[] getExtraHeaderFourCCs(int track)
throws java.io.IOException
track -
java.io.IOException
protected void readAllMetadata()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||