Class AbstractAVIStream

java.lang.Object
org.monte.media.avi.AbstractAVIStream
Direct Known Subclasses:
AVIInputStream, AVIOutputStream

public abstract class AbstractAVIStream extends Object
This is the base class for low-level AVI stream IO.
Author:
Werner Randelshofer
  • Field Details

    • RIFF_ID

      protected static final int RIFF_ID
      Chunk 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_INDEX
      Indicates the AVI file has an index.
      See Also:
    • AVIH_FLAG_MUST_USE_INDEX

      public static final int AVIH_FLAG_MUST_USE_INDEX
      Indicates 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_INTERLEAVED
      Indicates 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_DISABLED
      Indicates this stream should not be enabled by default.
      See Also:
    • STRH_FLAG_VIDEO_PALETTE_CHANGES

      public static final int STRH_FLAG_VIDEO_PALETTE_CHANGES
      Indicates this video stream contains palette changes. This flag warns the playback software that it will need to animate the palette.
      See Also:
    • out

      protected ImageOutputStream out
      Underlying output stream.
    • streamOffset

      protected long streamOffset
      The 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

      protected long getRelativeStreamPosition() throws IOException
      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

      protected void seekRelative(long newPosition) throws IOException
      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

      protected static int typeToInt(String str)
    • intToType

      protected static String intToType(int id)
    • isFlagSet

      protected static boolean isFlagSet(int flag, int mask)
      Returns true, if the specified mask is set on the flag.