java.lang.Object
org.monte.media.avi.AbstractAVIStream
- Direct Known Subclasses:
AVIInputStream,AVIOutputStream
This is the base class for low-level AVI stream IO.
- Author:
- Werner Randelshofer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe format of a video track is defined in a "strf" chunk, which contains aWAVEFORMATEXstruct.static enumSupported media types.protected classChunk base class.protected classA CompositeChunk contains an ordered list of Chunks.protected classData Chunk.protected classA DataChunk with a fixed size.protected static classHolds information about the entire movie.protected classprotected static classAVI stores media data in sample chunks.protected classprotected classRepresents a track (or "stream") in an AVI file.protected classRepresents a video track in an AVI file. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intstatic final intstatic final intIndicates the AVI file has an index.static final intIndicates the AVI file is interleaved.static final intIndicates that application should use the index, rather than the physical ordering of the chunks in the file, to determine the order of presentation of the data.static final int??static final int// Indicates the AVI file is a specially allocated file used for capturing real-time video.protected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected ImageOutputStreamUnderlying output stream.protected static final intprotected static final intprotected static final intChunk IDs.protected static final intprotected longThe offset in the underlying ImageOutputStream.protected static final intstatic final intIndicates this stream should not be enabled by default.static final intIndicates this video stream contains palette changes.protected static final intprotected static final intprotected static final intprotected ArrayList<AbstractAVIStream.Track>The list of tracks in the file.protected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longGets the position relative to the beginning of the QuickTime stream.protected static StringintToType(int id) protected static booleanisFlagSet(int flag, int mask) Returns true, if the specified mask is set on the flag.protected voidseekRelative(long newPosition) Seeks relative to the beginning of the AVI stream.protected static int
-
Field Details
-
RIFF_ID
protected static final int RIFF_IDChunk IDs.- See Also:
-
AVI_ID
protected static final int AVI_ID- See Also:
-
AVIX_ID
protected static final int AVIX_ID- See Also:
-
LIST_ID
protected static final int LIST_ID- See Also:
-
MOVI_ID
protected static final int MOVI_ID- See Also:
-
HDRL_ID
protected static final int HDRL_ID- See Also:
-
AVIH_ID
protected static final int AVIH_ID- See Also:
-
STRL_ID
protected static final int STRL_ID- See Also:
-
STRH_ID
protected static final int STRH_ID- See Also:
-
STRN_ID
protected static final int STRN_ID- See Also:
-
STRF_ID
protected static final int STRF_ID- See Also:
-
STRD_ID
protected static final int STRD_ID- See Also:
-
IDX1_ID
protected static final int IDX1_ID- See Also:
-
REC_ID
protected static final int REC_ID- See Also:
-
CHUNK_SUBTYPE_MASK
protected static final int CHUNK_SUBTYPE_MASK- See Also:
-
PC_ID
protected static final int PC_ID- See Also:
-
DB_ID
protected static final int DB_ID- See Also:
-
DC_ID
protected static final int DC_ID- See Also:
-
WB_ID
protected static final int WB_ID- See Also:
-
AVIH_FLAG_HAS_INDEX
public static final int AVIH_FLAG_HAS_INDEXIndicates the AVI file has an index.- See Also:
-
AVIH_FLAG_MUST_USE_INDEX
public static final int AVIH_FLAG_MUST_USE_INDEXIndicates that application should use the index, rather than the physical ordering of the chunks in the file, to determine the order of presentation of the data. For example, this flag could be used to create a list of frames for editing.- See Also:
-
AVIH_FLAG_IS_INTERLEAVED
public static final int AVIH_FLAG_IS_INTERLEAVEDIndicates the AVI file is interleaved.- See Also:
-
AVIH_FLAG_TRUST_CK_TYPE
public static final int AVIH_FLAG_TRUST_CK_TYPE??- See Also:
-
AVIH_FLAG_WAS_CAPTURE_FILE
public static final int AVIH_FLAG_WAS_CAPTURE_FILE// Indicates the AVI file is a specially allocated file used for capturing real-time video. Applications should warn the user before writing over a file with this flag set because the user probably defragmented this file.- See Also:
-
AVIH_FLAG_COPYRIGHTED
public static final int AVIH_FLAG_COPYRIGHTED- See Also:
-
STRH_FLAG_DISABLED
public static final int STRH_FLAG_DISABLEDIndicates this stream should not be enabled by default.- See Also:
-
STRH_FLAG_VIDEO_PALETTE_CHANGES
public static final int STRH_FLAG_VIDEO_PALETTE_CHANGESIndicates this video stream contains palette changes. This flag warns the playback software that it will need to animate the palette.- See Also:
-
out
Underlying output stream. -
streamOffset
protected long streamOffsetThe offset in the underlying ImageOutputStream. Normally this is 0 unless the underlying stream already contained data when it was passed to the constructor. -
tracks
The list of tracks in the file.
-
-
Constructor Details
-
AbstractAVIStream
public AbstractAVIStream()
-
-
Method Details
-
getRelativeStreamPosition
Gets the position relative to the beginning of the QuickTime stream.Usually this value is equal to the stream position of the underlying ImageOutputStream, but can be larger if the underlying stream already contained data.
- Returns:
- The relative stream position.
- Throws:
IOException
-
seekRelative
Seeks relative to the beginning of the AVI stream.Usually this equal to seeking in the underlying ImageOutputStream, but can be different if the underlying stream already contained data.
- Throws:
IOException
-
typeToInt
-
intToType
-
isFlagSet
protected static boolean isFlagSet(int flag, int mask) Returns true, if the specified mask is set on the flag.
-