Package limn.video

Enum Class VideoStreamSource.SeekMode

java.lang.Object
java.lang.Enum<VideoStreamSource.SeekMode>
limn.video.VideoStreamSource.SeekMode
All Implemented Interfaces:
Serializable, Comparable<VideoStreamSource.SeekMode>, Constable
Enclosing interface:
VideoStreamSource

public static enum VideoStreamSource.SeekMode extends Enum<VideoStreamSource.SeekMode>
How close to the target a seek is asked to land. The two are different costs rather than degrees of the same one: a container can jump to an independently decodable picture for the price of an index lookup, and reaching anything between two of them means decoding every picture in between and throwing it away.

Both are wanted by the same transport control seconds apart: KEYFRAME while a thumb is being dragged, so that dragging costs one cheap seek per update rather than a decode per pixel, and EXACT when it is let go, because that is where the viewer says the video should be.

  • Enum Constant Details

    • KEYFRAME

      public static final VideoStreamSource.SeekMode KEYFRAME
      The next picture's presentation time is at or before the target, as close to it as the source can get without decoding pictures it would discard. The distance is whatever the input's structure imposes and is not knowable in advance: seconds, for a container whose independently decodable pictures are seconds apart.

      A source whose every picture is independently decodable (a raw format, a generator) has nothing to skip past, so this lands on the picture immediately at or before the target: the one that would be on screen at that instant, for no cost at all.

    • EXACT

      public static final VideoStreamSource.SeekMode EXACT
      The next picture is the first whose presentation time is at or after the target: under one picture interval late rather than any amount early. Costs whatever decoding from the last independently decodable picture costs, all of it discarded.
  • Method Details

    • values

      public static VideoStreamSource.SeekMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VideoStreamSource.SeekMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null