Class QuickTimeMeta.Chunk

java.lang.Object
org.monte.media.quicktime.QuickTimeMeta.Group
org.monte.media.quicktime.QuickTimeMeta.Chunk
Enclosing class:
QuickTimeMeta

protected static class QuickTimeMeta.Chunk extends QuickTimeMeta.Group
Groups consecutive samples with the same sample description Id and with adjacent offsets in the movie file.
Author:
Werner Randelshofer
  • Field Details

    • sampleDescriptionId

      protected int sampleDescriptionId
  • Constructor Details

    • Chunk

      public Chunk(QuickTimeMeta.MediaSample firstSample, int sampleDescriptionId)
      Creates a new Chunk.
      Parameters:
      firstSample - The first sample contained in this chunk.
      sampleDescriptionId - The description id of the sample.
    • Chunk

      public Chunk(QuickTimeMeta.MediaSample firstSample, QuickTimeMeta.MediaSample lastSample, int sampleCount, int sampleDescriptionId)
      Creates a new Chunk.
      Parameters:
      firstSample - The first sample contained in this chunk.
      sampleDescriptionId - The description Id of the sample.
  • Method Details

    • maybeAddSample

      public boolean maybeAddSample(QuickTimeMeta.MediaSample sample, int sampleDescriptionId)
      Returns true, if the sample was added to the chunk. If false is returned, the sample must be added to a new chunk.

      A sample can only be added to a chunk, if it has the same sample description Id as previously added samples, if the capacity of the chunk is not exceeded and if the sample offset is adjacent to the last sample in this chunk.

    • maybeAddChunk

      public boolean maybeAddChunk(QuickTimeMeta.Chunk chunk)
      Description copied from class: QuickTimeMeta.Group
      Returns true, if the chunk was added to the group. If false is returned, the chunk must be added to a new group.

      A chunk can only be added to a group, if the capacity of the group is not exceeded.

      Overrides:
      maybeAddChunk in class QuickTimeMeta.Group
    • getChunkOffset

      public long getChunkOffset()
      Returns the offset of the chunk in the movie file.