Class QuickTimeMeta.TimeToSampleGroup

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

protected static class QuickTimeMeta.TimeToSampleGroup extends QuickTimeMeta.Group
Groups consecutive samples of the same duration.
Author:
Werner Randelshofer
  • Constructor Details

  • Method Details

    • maybeAddSample

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

      A sample can only be added to a TimeToSampleGroup, if it has the same duration as previously added samples, and if the capacity of the group is not exceeded.

      Overrides:
      maybeAddSample in class QuickTimeMeta.Group
    • 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
    • getSampleDuration

      public long getSampleDuration()
      Returns the duration that all samples in this group share.